@livenetworks/ashlar 2.1.12 → 2.2.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.
Files changed (108) hide show
  1. package/README.md +25 -2
  2. package/components/COMPONENTS.md +29 -25
  3. package/components/ln-api-connector/ln-api-connector.schema.json +105 -105
  4. package/components/ln-chart/ln-chart-dev.scss +0 -4
  5. package/components/ln-core/README.md +16 -60
  6. package/components/ln-core/index.js +1 -1
  7. package/components/ln-core/ln-core.schema.json +120 -120
  8. package/components/ln-core/query.js +113 -113
  9. package/components/ln-core/reactive.js +0 -59
  10. package/components/ln-data-coordinator/README.md +2 -0
  11. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  12. package/components/ln-data-coordinator/ln-data-coordinator.schema.json +196 -196
  13. package/components/ln-data-coordinator/src/ln-data-coordinator.js +457 -432
  14. package/components/ln-data-store/ln-data-store.schema.json +92 -92
  15. package/components/ln-date/ln-date.js +1 -1
  16. package/components/ln-date/src/ln-date.js +1 -1
  17. package/components/ln-debug/ln-debug.js +1 -1
  18. package/components/ln-debug/ln-debug.schema.json +28 -28
  19. package/components/ln-debug/src/generated-attributes.js +304 -302
  20. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  21. package/components/ln-external-links/README.md +19 -19
  22. package/components/ln-external-links/ln-external-links.js +1 -1
  23. package/components/ln-external-links/ln-external-links.schema.json +9 -0
  24. package/components/ln-external-links/ln-external-links.scss +12 -0
  25. package/components/ln-external-links/src/ln-external-links.js +3 -2
  26. package/components/ln-filter/README.md +2 -1
  27. package/components/ln-filter/ln-filter.js +1 -1
  28. package/components/ln-filter/ln-filter.schema.json +157 -169
  29. package/components/ln-filter/src/ln-filter.js +4 -4
  30. package/components/ln-form/ln-form.schema.json +57 -57
  31. package/components/ln-key/ln-key.js +1 -1
  32. package/components/ln-key/ln-key.schema.json +8 -0
  33. package/components/ln-key/src/ln-key.js +8 -5
  34. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  35. package/components/ln-obfuscator/ln-obfuscator.schema.json +6 -0
  36. package/components/ln-obfuscator/src/ln-obfuscator.js +2 -2
  37. package/components/ln-options/ln-options.schema.json +47 -47
  38. package/components/ln-popover/ln-popover.schema.json +82 -82
  39. package/components/ln-progress/ln-progress.schema.json +0 -13
  40. package/components/ln-search/ln-search.schema.json +111 -111
  41. package/components/ln-sort/README.md +1 -0
  42. package/components/ln-sort/ln-sort.js +1 -1
  43. package/components/ln-sort/ln-sort.schema.json +100 -112
  44. package/components/ln-sort/src/sort-model.js +1 -6
  45. package/components/ln-sortable/ln-sortable.schema.json +38 -38
  46. package/components/ln-sortable/ln-sortable.scss +25 -25
  47. package/components/ln-table/README.md +8 -1
  48. package/components/ln-table/ln-table.js +1 -1
  49. package/components/ln-table/ln-table.schema.json +195 -195
  50. package/components/ln-table/src/ln-table.js +43 -7
  51. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  52. package/components/ln-table-coordinator/ln-table-coordinator.schema.json +18 -0
  53. package/components/ln-table-coordinator/src/ln-table-coordinator.js +104 -2
  54. package/components/ln-toast/README.md +1 -1
  55. package/components/ln-toast/ln-toast.js +1 -1
  56. package/components/ln-toast/ln-toast.schema.json +6 -0
  57. package/components/ln-toast/src/ln-toast.js +1 -1
  58. package/components/ln-validate/README.md +6 -6
  59. package/components/ln-validate/ln-validate-dev.scss +0 -5
  60. package/components/ln-validate/ln-validate.js +1 -1
  61. package/components/ln-validate/ln-validate.schema.json +0 -6
  62. package/components/ln-validate/src/ln-validate.js +48 -29
  63. package/ln-ashlar.html-data.json +1824 -1814
  64. package/package.json +15 -5
  65. package/theme/README.md +74 -0
  66. package/theme/base/_global.scss +2 -2
  67. package/theme/base/_reset.scss +11 -0
  68. package/theme/components/_app-shell.scss +0 -8
  69. package/theme/components/_form.scss +6 -6
  70. package/theme/components/_ln-table.scss +6 -3
  71. package/theme/components/_scrollbar.scss +5 -4
  72. package/theme/components/_sortable.scss +19 -19
  73. package/theme/components/_stat-card.scss +1 -0
  74. package/theme/components/_table.scss +11 -35
  75. package/theme/config/_density.scss +110 -65
  76. package/theme/config/_palette.scss +71 -49
  77. package/theme/config/_theme.scss +27 -31
  78. package/theme/config/_tokens.scss +28 -26
  79. package/theme/config/mixins/_app-shell.scss +17 -21
  80. package/theme/config/mixins/_avatar.scss +2 -2
  81. package/theme/config/mixins/_btn.scss +4 -2
  82. package/theme/config/mixins/_card.scss +88 -71
  83. package/theme/config/mixins/_colors.scss +2 -1
  84. package/theme/config/mixins/_display.scss +12 -0
  85. package/theme/config/mixins/_footer.scss +3 -1
  86. package/theme/config/mixins/_form.scss +74 -55
  87. package/theme/config/mixins/_layout.scss +9 -0
  88. package/theme/config/mixins/_ln-table.scss +22 -15
  89. package/theme/config/mixins/_modal.scss +3 -0
  90. package/theme/config/mixins/_nav.scss +31 -8
  91. package/theme/config/mixins/_sidebar.scss +2 -1
  92. package/theme/config/mixins/_spacing.scss +4 -4
  93. package/theme/config/mixins/_stat-card.scss +33 -2
  94. package/theme/config/mixins/_status-badge.scss +1 -0
  95. package/theme/config/mixins/_table.scss +87 -69
  96. package/theme/config/mixins/_tabs.scss +31 -0
  97. package/theme/config/mixins/_toast.scss +0 -1
  98. package/theme/designs/relaxed/_card.scss +12 -0
  99. package/theme/designs/relaxed/_layout.scss +24 -0
  100. package/theme/ln-ashlar-core.scss +1 -0
  101. package/theme/ln-ashlar-dev.scss +0 -1
  102. package/theme/ln-ashlar-relaxed.scss +67 -0
  103. package/theme/tailwind/components.css +2198 -0
  104. package/theme/tailwind/entry.css +3 -0
  105. package/theme/tailwind/theme.css +23 -0
  106. package/theme/utilities/_utilities.scss +1 -11
  107. package/web-types.json +2351 -2337
  108. package/components/ln-progress/ln-progress-dev.scss +0 -8
@@ -1,82 +1,82 @@
1
- {
2
- "$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
3
- "component": "ln-popover",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-popover-dev.scss"
10
- ]
11
- },
12
- "data-ln-popover": {
13
- "direction": "both",
14
- "sources": [
15
- "ln-popover-dev.scss",
16
- "ln-popover.scss",
17
- "src/ln-popover.js"
18
- ],
19
- "type": "enum",
20
- "values": [
21
- "open",
22
- "close"
23
- ],
24
- "fallback": "close",
25
- "description": "Control state of the popover"
26
- },
27
- "data-ln-popover-for": {
28
- "direction": "author",
29
- "sources": [
30
- "ln-popover-dev.scss",
31
- "src/ln-popover.js"
32
- ],
33
- "type": "string",
34
- "description": "Target element ID that this trigger controls"
35
- },
36
- "data-ln-popover-placement": {
37
- "direction": "both",
38
- "sources": [
39
- "src/ln-popover.js"
40
- ],
41
- "type": "enum",
42
- "values": [
43
- "top",
44
- "top-start",
45
- "top-end",
46
- "bottom",
47
- "bottom-start",
48
- "bottom-end",
49
- "left",
50
- "left-start",
51
- "left-end",
52
- "right",
53
- "right-start",
54
- "right-end"
55
- ],
56
- "description": "Active calculated placement applied at runtime"
57
- },
58
- "data-ln-popover-position": {
59
- "direction": "author",
60
- "sources": [
61
- "src/ln-popover.js"
62
- ],
63
- "type": "enum",
64
- "values": [
65
- "top",
66
- "top-start",
67
- "top-end",
68
- "bottom",
69
- "bottom-start",
70
- "bottom-end",
71
- "left",
72
- "left-start",
73
- "left-end",
74
- "right",
75
- "right-start",
76
- "right-end"
77
- ],
78
- "fallback": "bottom",
79
- "description": "Preferred positioning anchor"
80
- }
81
- }
82
- }
1
+ {
2
+ "$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
3
+ "component": "ln-popover",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-debug": {
7
+ "direction": null,
8
+ "sources": [
9
+ "ln-popover-dev.scss"
10
+ ]
11
+ },
12
+ "data-ln-popover": {
13
+ "direction": "both",
14
+ "sources": [
15
+ "ln-popover-dev.scss",
16
+ "ln-popover.scss",
17
+ "src/ln-popover.js"
18
+ ],
19
+ "type": "enum",
20
+ "values": [
21
+ "open",
22
+ "close"
23
+ ],
24
+ "fallback": "close",
25
+ "description": "Control state of the popover"
26
+ },
27
+ "data-ln-popover-for": {
28
+ "direction": "author",
29
+ "sources": [
30
+ "ln-popover-dev.scss",
31
+ "src/ln-popover.js"
32
+ ],
33
+ "type": "string",
34
+ "description": "Target element ID that this trigger controls"
35
+ },
36
+ "data-ln-popover-placement": {
37
+ "direction": "both",
38
+ "sources": [
39
+ "src/ln-popover.js"
40
+ ],
41
+ "type": "enum",
42
+ "values": [
43
+ "top",
44
+ "top-start",
45
+ "top-end",
46
+ "bottom",
47
+ "bottom-start",
48
+ "bottom-end",
49
+ "left",
50
+ "left-start",
51
+ "left-end",
52
+ "right",
53
+ "right-start",
54
+ "right-end"
55
+ ],
56
+ "description": "Active calculated placement applied at runtime"
57
+ },
58
+ "data-ln-popover-position": {
59
+ "direction": "author",
60
+ "sources": [
61
+ "src/ln-popover.js"
62
+ ],
63
+ "type": "enum",
64
+ "values": [
65
+ "top",
66
+ "top-start",
67
+ "top-end",
68
+ "bottom",
69
+ "bottom-start",
70
+ "bottom-end",
71
+ "left",
72
+ "left-start",
73
+ "left-end",
74
+ "right",
75
+ "right-start",
76
+ "right-end"
77
+ ],
78
+ "fallback": "bottom",
79
+ "description": "Preferred positioning anchor"
80
+ }
81
+ }
82
+ }
@@ -3,16 +3,9 @@
3
3
  "component": "ln-progress",
4
4
  "generator": "scripts/sync-ln-schemas.mjs",
5
5
  "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-progress-dev.scss"
10
- ]
11
- },
12
6
  "data-ln-progress": {
13
7
  "direction": "author",
14
8
  "sources": [
15
- "ln-progress-dev.scss",
16
9
  "src/ln-progress.js"
17
10
  ],
18
11
  "type": "float",
@@ -29,12 +22,6 @@
29
22
  "fallback": 100,
30
23
  "min": 0,
31
24
  "description": "Maximum progress scale value"
32
- },
33
- "data-ln-upload-progress": {
34
- "direction": null,
35
- "sources": [
36
- "ln-progress-dev.scss"
37
- ]
38
25
  }
39
26
  }
40
27
  }
@@ -1,111 +1,111 @@
1
- {
2
- "$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
3
- "component": "ln-search",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-search-dev.scss"
10
- ]
11
- },
12
- "data-ln-hash": {
13
- "direction": null,
14
- "sources": [
15
- "src/ln-search.js"
16
- ],
17
- "type": "string",
18
- "description": "URL hash routing key for search state persistence"
19
- },
20
- "data-ln-list-source": {
21
- "direction": "author",
22
- "sources": [
23
- "src/ln-search.js"
24
- ]
25
- },
26
- "data-ln-query": {
27
- "direction": null,
28
- "sources": [
29
- "src/ln-search.js"
30
- ],
31
- "type": "string",
32
- "description": "URL query parameter name for search query state synchronization"
33
- },
34
- "data-ln-search": {
35
- "direction": "both",
36
- "sources": [
37
- "ln-search-dev.scss",
38
- "src/ln-search.js"
39
- ],
40
- "type": "string",
41
- "description": "Active search query term on target element or container"
42
- },
43
- "data-ln-search-clear": {
44
- "direction": "author",
45
- "sources": [
46
- "src/ln-search.js"
47
- ]
48
- },
49
- "data-ln-search-clear-for": {
50
- "direction": "author",
51
- "sources": [
52
- "src/ln-search.js"
53
- ],
54
- "type": "trigger",
55
- "description": "Click trigger to clear search input for target"
56
- },
57
- "data-ln-search-exclude": {
58
- "direction": "author",
59
- "sources": [
60
- "src/ln-search.js"
61
- ],
62
- "type": "string",
63
- "description": "CSS selector matching child items to exclude from search"
64
- },
65
- "data-ln-search-fields": {
66
- "direction": "author",
67
- "sources": [
68
- "src/ln-search.js"
69
- ],
70
- "type": "list",
71
- "description": "Comma-separated field names to include in client search"
72
- },
73
- "data-ln-search-for": {
74
- "direction": "author",
75
- "sources": [
76
- "ln-search-dev.scss",
77
- "src/ln-search.js"
78
- ],
79
- "type": "string",
80
- "description": "Target table or list element ID that this input controls"
81
- },
82
- "data-ln-search-hide": {
83
- "direction": "both",
84
- "sources": [
85
- "ln-search.scss",
86
- "src/ln-search.js"
87
- ],
88
- "type": "enum",
89
- "values": [
90
- "collapse",
91
- "none"
92
- ],
93
- "fallback": "collapse",
94
- "description": "CSS hiding strategy for non-matching rows"
95
- },
96
- "data-ln-search-items": {
97
- "direction": "author",
98
- "sources": [
99
- "src/ln-search.js"
100
- ],
101
- "type": "string",
102
- "description": "CSS selector matching searchable child items"
103
- },
104
- "data-ln-table-source": {
105
- "direction": "author",
106
- "sources": [
107
- "src/ln-search.js"
108
- ]
109
- }
110
- }
111
- }
1
+ {
2
+ "$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
3
+ "component": "ln-search",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-debug": {
7
+ "direction": null,
8
+ "sources": [
9
+ "ln-search-dev.scss"
10
+ ]
11
+ },
12
+ "data-ln-hash": {
13
+ "direction": null,
14
+ "sources": [
15
+ "src/ln-search.js"
16
+ ],
17
+ "type": "string",
18
+ "description": "URL hash routing key for search state persistence"
19
+ },
20
+ "data-ln-list-source": {
21
+ "direction": "author",
22
+ "sources": [
23
+ "src/ln-search.js"
24
+ ]
25
+ },
26
+ "data-ln-query": {
27
+ "direction": null,
28
+ "sources": [
29
+ "src/ln-search.js"
30
+ ],
31
+ "type": "string",
32
+ "description": "URL query parameter name for search query state synchronization"
33
+ },
34
+ "data-ln-search": {
35
+ "direction": "both",
36
+ "sources": [
37
+ "ln-search-dev.scss",
38
+ "src/ln-search.js"
39
+ ],
40
+ "type": "string",
41
+ "description": "Active search query term on target element or container"
42
+ },
43
+ "data-ln-search-clear": {
44
+ "direction": "author",
45
+ "sources": [
46
+ "src/ln-search.js"
47
+ ]
48
+ },
49
+ "data-ln-search-clear-for": {
50
+ "direction": "author",
51
+ "sources": [
52
+ "src/ln-search.js"
53
+ ],
54
+ "type": "trigger",
55
+ "description": "Click trigger to clear search input for target"
56
+ },
57
+ "data-ln-search-exclude": {
58
+ "direction": "author",
59
+ "sources": [
60
+ "src/ln-search.js"
61
+ ],
62
+ "type": "string",
63
+ "description": "CSS selector matching child items to exclude from search"
64
+ },
65
+ "data-ln-search-fields": {
66
+ "direction": "author",
67
+ "sources": [
68
+ "src/ln-search.js"
69
+ ],
70
+ "type": "list",
71
+ "description": "Comma-separated field names to include in client search"
72
+ },
73
+ "data-ln-search-for": {
74
+ "direction": "author",
75
+ "sources": [
76
+ "ln-search-dev.scss",
77
+ "src/ln-search.js"
78
+ ],
79
+ "type": "string",
80
+ "description": "Target table or list element ID that this input controls"
81
+ },
82
+ "data-ln-search-hide": {
83
+ "direction": "both",
84
+ "sources": [
85
+ "ln-search.scss",
86
+ "src/ln-search.js"
87
+ ],
88
+ "type": "enum",
89
+ "values": [
90
+ "collapse",
91
+ "none"
92
+ ],
93
+ "fallback": "collapse",
94
+ "description": "CSS hiding strategy for non-matching rows"
95
+ },
96
+ "data-ln-search-items": {
97
+ "direction": "author",
98
+ "sources": [
99
+ "src/ln-search.js"
100
+ ],
101
+ "type": "string",
102
+ "description": "CSS selector matching searchable child items"
103
+ },
104
+ "data-ln-table-source": {
105
+ "direction": "author",
106
+ "sources": [
107
+ "src/ln-search.js"
108
+ ]
109
+ }
110
+ }
111
+ }
@@ -94,6 +94,7 @@ cannot substitute for this — these icons are an SVG sprite via `<use href>`, n
94
94
  | `data-ln-persist` | Same as root | Opt-in. Persists `{ field, column, direction }` to `localStorage`. Give each `[data-ln-sort]` its own value (or `id`) — persistence is per-instance, not per-table. |
95
95
  | `data-ln-hash` | Same as root | Opt-in. Synchronizes sort state to URL hash fragment (e.g. `#users-sort:price.asc`). Value is custom namespace; if empty defaults to `[targetId]-sort`. |
96
96
  | `data-ln-query` | Same as root | Opt-in. Synchronizes sort column and direction to URL query parameter (e.g. `?sort=price.asc` or `?sort=amount.desc`). Value specifies query parameter name (defaults to `'sort'`). Interoperable with browser back/forward history (`popstate`). |
97
+ | `data-ln-table-empty` | Table rows | Rows carrying this attribute are excluded from sorting, alongside `hidden` rows and `data-ln-sort-exclude`. ln-table writes it on its empty and loading placeholder row; author it on a hand-written placeholder row in a plain table. |
97
98
 
98
99
  ### JavaScript API (`el.lnSort`)
99
100
 
@@ -1 +1 @@
1
- (function(){"use strict";function J(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!D(r))return}e.apply(console,t)}}function _e(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function R(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function F(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function Se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ve(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},c=e.elements,l={};if(n)for(let u=0;u<c.length;u++){const o=c[u];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let u=0;u<c.length;u++){const o=c[u];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let a=0;a<o.options.length;a++)o.options[a].selected&&i[o.name].push(o.options[a].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const a=Number(o.value);i[o.name]=o.value===""||isNaN(a)?null:a}else i[o.name]=o.value}return i}function Ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function xe(e,t){const n=e.elements,r=[],i={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const u=l.getAttribute("data-ln-fill-as")||l.name;if(!u||!(u in t))continue;const o=t[u];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const a=String(o).split(",").map(function(h){return h.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=Ee(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<l.options.length;a++)l.options[a].selected=o.indexOf(l.options[a].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=xe,window.lnCore.serializeForm=ve,window.lnCore.resolveFormMethod=Se);const G={};function ke(e,t){G[e]=t}function qe(e){return G[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ke,window.lnCore.getDataMapper=qe);function Le(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function Ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_e(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const X={};function Te(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];X[n]=t}function Oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return X[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Te,window.lnCore.getLocaleFallback=Oe,window.lnCore.ensureLocaleObserver=Ie);const N={};function De(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const u=n[l],o=u.getAttribute("data-ln-field");t[o]!=null&&(u.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const u=r[l],o=u.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const p=h[0].trim(),A=h[1].trim();t[A]!=null&&u.setAttribute(p,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const u=i[l],o=u.getAttribute("data-ln-show");o in t&&u.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const u=c[l],o=u.getAttribute("data-ln-class").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const p=h[0].trim(),A=h[1].trim();A in t&&u.classList.toggle(p,!!t[A])}}return e}function Re(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Z(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,u){return t[u]!==void 0?t[u]:""}))}const r=function(c,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let c=0;c<i.length;c++){const l=i[c],u=l.attributes;for(let o=0;o<u.length;o++){const a=u[o];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Fe(e,t,n,r,i,c){const l={};for(let o=0;o<e.children.length;o++){const a=e.children[o],h=a.getAttribute("data-ln-render-key");h&&(l[h]=a)}const u=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],h=String(r(a));let p=l[h];if(p)i(p,a,o);else{const A=De(n,c);if(!A||(Z(A,a),p=A.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",h),i(p,a,o)}u.appendChild(p)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Z,window.lnCore.fill=Y,window.lnCore.lnFill=Re,window.lnCore.renderList=Fe);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function ee(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function te(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function ne(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function re(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(c,l){const u=c.getAttribute(l);return u!==null&&r.has(u)?u:t};return $.set(n,i),i}function oe(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ie(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function le(e,t,n,r,i){if(!e||t===null)return!0;const c=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const u=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(u(`[${c}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(u(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return u(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(u(`[${c}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(u(`[${c}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(u(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return u(`[${c}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function se(e,t,n){for(const r in n){const[i,c,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,c,l)},enumerable:!0,configurable:!0})}return e}function ce(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=re(r.values,r.fallback);break;case"integer":i=ee;break;case"float":i=oe;break;case"boolean":i=te;break;case"list":i=ne;break;case"json":i=ie;break;case"string":default:i=q;break}i||(i=q),t[r.prop]=[i,n,r.fallback]}return t}function Ne(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function $e(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=se,window.lnCore.attrSpec=ce,window.lnCore.attrStr=q,window.lnCore.attrInt=ee,window.lnCore.attrBool=te,window.lnCore.attrList=ne,window.lnCore.attrEnum=re,window.lnCore.attrFloat=oe,window.lnCore.attrJson=ie);function L(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function ue(e,t,n,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(c)&&L(e,l),e.querySelectorAll){const u=e.querySelectorAll(c);for(let o=0;o<u.length;o++)L(u[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function I(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ae(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Pe(e){const t=ae(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(c=>c.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=$e(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function de(e,t,n,r){for(let i=0;i<e.length;i++){const c=e[i];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,r):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,r)}}function Me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=ae(),i=r.byAttr.get(t),c=J()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&D(l)){const u=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let a=0;a<u.length;a++)le(u[a].spec,o,t,u[a].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const u=r.byReactive.get(t);u&&de(u,l,t,e.oldValue),r.reactiveWildcard.length&&de(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let u=0;u<i.length;u++){const o=i[u];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(ue(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Me(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function fe(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function he(e){const t=B();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=P();if(e.target&&r.length)for(let i=0;i<r.length;i++){const c=r[i],l=c.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;u&&c.onSubtreeChange(u,e)}for(let i=0;i<e.addedNodes.length;i++){const c=e.addedNodes[i];if(c.nodeType!==1)continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let u=0;u<t.length;u++){const o=t[u],a=o.query;if(a&&(c.matches&&c.matches(a)&&(o.ComponentFn&&L(c,o),o.onInit&&o.onInit(c)),l&&c.querySelectorAll)){const h=c.querySelectorAll(a);for(let p=0;p<h.length;p++)o.ComponentFn&&L(h[p],o),o.onInit&&o.onInit(h[p])}}}for(let i=0;i<e.removedNodes.length;i++){const c=e.removedNodes[i];if(c.nodeType!==1||document.contains(c))continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let u=0;u<t.length;u++){const o=t[u],a=o.query;if(a&&(c.matches&&c.matches(a)&&fe(c,o),l&&c.querySelectorAll)){const h=c.querySelectorAll(a);for(let p=0;p<h.length;p++)fe(h[p],o)}}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{he(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{he(i)}catch(c){console.error("[ln-core] lifecycle handler failed",i.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ue(e){B().push(e),e.onSubtreeChange&&e.query&&P().push(e),we()}function be(e,t,n,r,i={}){const c=i.extraAttributes||[],l=i.onAttributeChange||null,u=i.onSubtreeChange||null,o=i.onInit||null,a=i.onAttrChange||null,h=i.effects||null,p=i.attributes||null,A=p?Ne(p):h,E=p?new Set(Object.keys(p)):null,d=i.persist||null;function g(C){const m=C||document.body;if(ue(m,e,t,n),p&&J())for(const S in p){const Q=p[S],x=Array.from(m.querySelectorAll("["+S+"]"));m.matches&&m.matches("["+S+"]")&&x.push(m);for(let _=0;_<x.length;_++){const z=x[_];D(z)&&le(Q,z.getAttribute(S),S,r,z)}}o&&o(m)}const s=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let m;for(;(m=C.exec(e))!==null;)s.push(m[1])}else s.push(e);Pe({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:n,onInit:o,observed:s.concat(c),onAttributeChange:l,onAttrChange:a,effects:A,declared:E,persist:d}),je();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,w=i.subtreeQuery||(y?e:"["+e+"]"),b={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:u,query:w};B().push(b),u&&w&&P().push(b),we(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ue,window.lnCore.withoutLifecycle=pe);function f(){Be()>0?I(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function Ve(e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(!(r===""||r==null)&&(t=!0,!Number.isFinite(Number(r))))return"string"}return t?"number":"string"}function He(e,t,n,r){if(n==="number"){const l=parseFloat(e),u=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(u)?0:u)}const i=e!=null?String(e):"",c=t!=null?String(t):"";return r?r.compare(i,c):i<c?-1:i>c?1:0}function ge(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=ge(t);if(!r)return n;const i=r.split("&");for(let c=0;c<i.length;c++){const l=i[c];if(!l)continue;const u=l.indexOf(":"),o=u>-1?l.slice(0,u):l,a=u>-1?l.slice(u+1):"";if(o)try{n[o]=decodeURIComponent(a)}catch{n[o]=a}}return n}function j(e){if(!e)return null;const t=M();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");ge(location.hash)!==i&&(location.hash=i)}function We(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function T(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function U(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=j,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=We,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=U,window.lnCore.hashFilterEncode=Ke,window.lnCore.hashFilterDecode=Qe);function ze(e){return(e||"").replace(/^\?/,"")}function V(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=ze(t);if(!r)return n;const i=new URLSearchParams(r);for(const[c,l]of i.entries())n[c]=l;return n}function H(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function O(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function W(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=V,window.lnCore.queryGet=H,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=O,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=W,window.lnCore.queryFilterEncode=Je,window.lnCore.queryFilterDecode=Ge);function Xe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Xe);function v(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ye(e){const t=v(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function Ze(e,t){return!e||!t?!1:e.field!==null&&e.field!==void 0&&t.field!==null&&t.field!==void 0?e.field===t.field:e.column!==null&&e.column!==void 0&&t.column!==null&&t.column!==void 0?String(e.column)===String(t.column):!1}function et(e,t,n,r){const i=v(e);if(i==="none")return()=>0;const c=i==="desc"?-1:1,l=typeof r=="function"?r:u=>u;return function(u,o){const a=l(u),h=l(o);return He(a,h,t,n)*c}}function K(e){return!!(!e||typeof e!="object"||e.nodeType!==1||e.tagName==="TEMPLATE"||typeof e.hasAttribute=="function"&&(e.hasAttribute("data-ln-sort-exclude")||e.hasAttribute("hidden"))||e.classList&&e.classList.contains("hidden")||e.style&&e.style.display==="none"||typeof e.matches=="function"&&e.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]"))}function tt(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const n=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(n&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(n));if(e.tagName==="TABLE"){const r=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(r)return Array.from(r.children||[]);if(typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll("tbody tr, tr"))}return Array.from(e.children||[])}(function(){const e="data-ln-sort",t="lnSort",n="data-ln-sort-field",r="data-ln-sort-state",i="data-ln-sort-dir",c="data-ln-hash",l="data-ln-query";if(window[t]!==void 0)return;function u(d,g){return d.getAttribute(g)||null}const o={"data-ln-sort":{prop:"targetId",type:"string",read:q,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:u,effect:E,description:"Field name or column key to sort by"},"data-ln-sort-dir":{type:"enum",values:["asc","desc"],fallback:"asc",description:"Default or requested sort direction"},"data-ln-sort-items":{prop:"itemsSelector",type:"string",read:u,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:E,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:E,description:"URL hash routing key for sort state persistence"},"data-ln-query":{type:"string",effect:E,description:"URL query parameter name for sort state persistence"}},a=ce(o),h=new WeakMap;function p(d,g,s){if(g){const y=d.querySelector('[data-ln-field="'+g+'"]');return y?F(y):""}return s!=null&&d.cells&&d.cells[s]?F(d.cells[s]):F(d)}function A(d){this.dom=d,se(this,d,a);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=v(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=T(d,"sort"),this.hashEnabled=!!this.nsKey,this.queryParam=O(d,"sort"),this.queryEnabled=!!this.queryParam;const s=this;this._onClick=function(w){const b=w.target.closest("["+i+"]");if(!b)return;const f=v(b.getAttribute(i));s._apply(f)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(s._destroyed||!w.detail)return;const b=s._resolveTarget();if(!(b&&(w.target===b||b.contains(w.target))||w.detail.targetId&&w.detail.targetId===s.targetId))return;if(Ze({field:s.field,column:s.column},{field:w.detail.field,column:w.detail.column})){const m=v(w.detail.direction);m&&d.getAttribute(r)!==m&&(s._state=m,d.setAttribute(r,m),s._updateAriaSort(m));return}d.getAttribute(r)!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(s._destroyed||!s.hashEnabled)return;const w=j(s.nsKey),b=U(w);if(b)s.field!==null&&b.fieldOrColumn===s.field||s.column!==null&&String(s.column)===b.fieldOrColumn?s._state!==b.direction&&s._apply(b.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const f=s._resolveTarget();f&&(R(f,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(f,"none"))}},this._onPopState=function(){if(s._destroyed||!s.queryEnabled)return;const w=H(s.queryParam),b=V(),f=W(w,b);if(f)s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn?s._state!==f.direction&&s._apply(f.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const C=s._resolveTarget();C&&(R(C,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(C,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let y=!1;if(this.hashEnabled){const w=j(this.nsKey),b=U(w);b&&((s.field!==null&&b.fieldOrColumn===s.field||s.column!==null&&String(s.column)===b.fieldOrColumn)&&I(function(){s._destroyed||s._apply(b.direction,!0)}),y=!0)}else if(this.queryEnabled){const w=H(this.queryParam),b=V(),f=W(w,b);f&&((s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn)&&I(function(){s._destroyed||s._apply(f.direction,!0)}),y=!0)}if(!y){const w=v(d.getAttribute(r));w&&w!=="none"&&I(function(){s._destroyed||s._apply(w,!0)})}return this}A.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},A.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ye(d))},A.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const f=this.dom.closest("th");f&&f.cellIndex!==void 0&&(this.column=f.cellIndex)}const s=v(d);this._state=s,this.dom.getAttribute(r)!==s&&this.dom.setAttribute(r,s),this._updateAriaSort(s);const y=this._resolveTarget();if(!y)return;const w={field:this.field,column:this.column,direction:s,targetId:this.targetId};if(!g){if(this.hashEnabled){const f=ye(this.field!==null?this.field:this.column,s);me(this.nsKey,f)}else if(this.queryEnabled){const f=Ae(this.field!==null?this.field:this.column,s);Ce(this.queryParam,f)}}R(y,"ln-sort:change",w).defaultPrevented||this._defaultSort(y,s)},A.prototype._defaultSort=function(d,g){const s=tt(d,this.itemsSelector);if(!s.length)return;const y=s[0].parentNode,w=s.filter(function(f){return!K(f)});if(!w.length)return;h.has(d)||h.set(d,w.slice());let b;if(g==="none"){const f=h.get(d)||w;h.delete(d),b=f.filter(function(C){return C.parentNode===y&&!K(C)})}else{const f=this.field,C=this.column,m=w.map(function(_){return{el:_,val:p(_,f,C)}}),S=Ve(m.map(function(_){return _.val})),Q=typeof Intl<"u"?new Intl.Collator(Le(this.dom),{sensitivity:"base",numeric:!0}):null,x=et(g,S,Q,function(_){return _.val});m.sort(x),b=m.map(function(_){return _.el})}pe(function(){const f=document.createDocumentFragment();let C=0;for(let m=0;m<s.length;m++){const S=s[m];K(S)?f.appendChild(S):C<b.length&&f.appendChild(b[C++])}y.appendChild(f)})},A.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.dom.removeEventListener("click",this._onClick),document.removeEventListener("ln-sort:change",this._onSortChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function E(d,g){const s=d[t];if(!(!s||s._destroyed))if(g===n){const y=d.closest("th");s.column=!s.field&&y?y.cellIndex:null}else if(g===r){const y=v(d.getAttribute(r));y!==s._state&&s._apply(y)}else g===c?(s.hashEnabled&&s._onHashChange&&window.removeEventListener("hashchange",s._onHashChange),s.nsKey=T(d,"sort"),s.hashEnabled=!!s.nsKey,s.hashEnabled&&window.addEventListener("hashchange",s._onHashChange)):g===l&&(s.queryEnabled&&s._onPopState&&window.removeEventListener("popstate",s._onPopState),s.queryParam=O(d,"sort"),s.queryEnabled=!!s.queryParam,s.queryEnabled&&window.addEventListener("popstate",s._onPopState))}be(e,t,A,"ln-sort",{attributes:o,persist:{attr:r,hashActive:function(d){return!!T(d,"sort")||!!O(d,"sort")}}})})()})();
1
+ (function(){"use strict";function J(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!D(r))return}e.apply(console,t)}}function _e(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function R(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function F(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function Se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ve(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},c=e.elements,l={};if(n)for(let u=0;u<c.length;u++){const o=c[u];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let u=0;u<c.length;u++){const o=c[u];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let a=0;a<o.options.length;a++)o.options[a].selected&&i[o.name].push(o.options[a].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const a=Number(o.value);i[o.name]=o.value===""||isNaN(a)?null:a}else i[o.name]=o.value}return i}function Ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function xe(e,t){const n=e.elements,r=[],i={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const u=l.getAttribute("data-ln-fill-as")||l.name;if(!u||!(u in t))continue;const o=t[u];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const a=String(o).split(",").map(function(h){return h.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=Ee(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<l.options.length;a++)l.options[a].selected=o.indexOf(l.options[a].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=xe,window.lnCore.serializeForm=ve,window.lnCore.resolveFormMethod=Se);const G={};function ke(e,t){G[e]=t}function qe(e){return G[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ke,window.lnCore.getDataMapper=qe);function Le(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function Ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_e(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const X={};function Te(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];X[n]=t}function Oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return X[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Te,window.lnCore.getLocaleFallback=Oe,window.lnCore.ensureLocaleObserver=Ie);const N={};function De(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const u=n[l],o=u.getAttribute("data-ln-field");t[o]!=null&&(u.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const u=r[l],o=u.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const p=h[0].trim(),A=h[1].trim();t[A]!=null&&u.setAttribute(p,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const u=i[l],o=u.getAttribute("data-ln-show");o in t&&u.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const u=c[l],o=u.getAttribute("data-ln-class").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const p=h[0].trim(),A=h[1].trim();A in t&&u.classList.toggle(p,!!t[A])}}return e}function Re(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Z(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,u){return t[u]!==void 0?t[u]:""}))}const r=function(c,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let c=0;c<i.length;c++){const l=i[c],u=l.attributes;for(let o=0;o<u.length;o++){const a=u[o];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Fe(e,t,n,r,i,c){const l={};for(let o=0;o<e.children.length;o++){const a=e.children[o],h=a.getAttribute("data-ln-render-key");h&&(l[h]=a)}const u=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],h=String(r(a));let p=l[h];if(p)i(p,a,o);else{const A=De(n,c);if(!A||(Z(A,a),p=A.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",h),i(p,a,o)}u.appendChild(p)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Z,window.lnCore.fill=Y,window.lnCore.lnFill=Re,window.lnCore.renderList=Fe);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function ee(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function te(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function ne(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function re(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(c,l){const u=c.getAttribute(l);return u!==null&&r.has(u)?u:t};return $.set(n,i),i}function oe(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ie(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function le(e,t,n,r,i){if(!e||t===null)return!0;const c=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const u=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(u(`[${c}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(u(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return u(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(u(`[${c}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(u(`[${c}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(u(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return u(`[${c}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function se(e,t,n){for(const r in n){const[i,c,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,c,l)},enumerable:!0,configurable:!0})}return e}function ce(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=re(r.values,r.fallback);break;case"integer":i=ee;break;case"float":i=oe;break;case"boolean":i=te;break;case"list":i=ne;break;case"json":i=ie;break;case"string":default:i=q;break}i||(i=q),t[r.prop]=[i,n,r.fallback]}return t}function Ne(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function $e(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=se,window.lnCore.attrSpec=ce,window.lnCore.attrStr=q,window.lnCore.attrInt=ee,window.lnCore.attrBool=te,window.lnCore.attrList=ne,window.lnCore.attrEnum=re,window.lnCore.attrFloat=oe,window.lnCore.attrJson=ie);function L(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function ue(e,t,n,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(c)&&L(e,l),e.querySelectorAll){const u=e.querySelectorAll(c);for(let o=0;o<u.length;o++)L(u[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function I(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ae(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Pe(e){const t=ae(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(c=>c.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=$e(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function de(e,t,n,r){for(let i=0;i<e.length;i++){const c=e[i];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,r):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,r)}}function Me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=ae(),i=r.byAttr.get(t),c=J()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&D(l)){const u=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let a=0;a<u.length;a++)le(u[a].spec,o,t,u[a].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const u=r.byReactive.get(t);u&&de(u,l,t,e.oldValue),r.reactiveWildcard.length&&de(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let u=0;u<i.length;u++){const o=i[u];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(ue(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Me(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function fe(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function he(e){const t=B();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=P();if(e.target&&r.length)for(let i=0;i<r.length;i++){const c=r[i],l=c.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;u&&c.onSubtreeChange(u,e)}for(let i=0;i<e.addedNodes.length;i++){const c=e.addedNodes[i];if(c.nodeType!==1)continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let u=0;u<t.length;u++){const o=t[u],a=o.query;if(a&&(c.matches&&c.matches(a)&&(o.ComponentFn&&L(c,o),o.onInit&&o.onInit(c)),l&&c.querySelectorAll)){const h=c.querySelectorAll(a);for(let p=0;p<h.length;p++)o.ComponentFn&&L(h[p],o),o.onInit&&o.onInit(h[p])}}}for(let i=0;i<e.removedNodes.length;i++){const c=e.removedNodes[i];if(c.nodeType!==1||document.contains(c))continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let u=0;u<t.length;u++){const o=t[u],a=o.query;if(a&&(c.matches&&c.matches(a)&&fe(c,o),l&&c.querySelectorAll)){const h=c.querySelectorAll(a);for(let p=0;p<h.length;p++)fe(h[p],o)}}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{he(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{he(i)}catch(c){console.error("[ln-core] lifecycle handler failed",i.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ue(e){B().push(e),e.onSubtreeChange&&e.query&&P().push(e),we()}function be(e,t,n,r,i={}){const c=i.extraAttributes||[],l=i.onAttributeChange||null,u=i.onSubtreeChange||null,o=i.onInit||null,a=i.onAttrChange||null,h=i.effects||null,p=i.attributes||null,A=p?Ne(p):h,E=p?new Set(Object.keys(p)):null,d=i.persist||null;function g(C){const m=C||document.body;if(ue(m,e,t,n),p&&J())for(const S in p){const Q=p[S],x=Array.from(m.querySelectorAll("["+S+"]"));m.matches&&m.matches("["+S+"]")&&x.push(m);for(let _=0;_<x.length;_++){const z=x[_];D(z)&&le(Q,z.getAttribute(S),S,r,z)}}o&&o(m)}const s=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let m;for(;(m=C.exec(e))!==null;)s.push(m[1])}else s.push(e);Pe({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:n,onInit:o,observed:s.concat(c),onAttributeChange:l,onAttrChange:a,effects:A,declared:E,persist:d}),je();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,w=i.subtreeQuery||(y?e:"["+e+"]"),b={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:u,query:w};B().push(b),u&&w&&P().push(b),we(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ue,window.lnCore.withoutLifecycle=pe);function f(){Be()>0?I(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function Ve(e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(!(r===""||r==null)&&(t=!0,!Number.isFinite(Number(r))))return"string"}return t?"number":"string"}function He(e,t,n,r){if(n==="number"){const l=parseFloat(e),u=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(u)?0:u)}const i=e!=null?String(e):"",c=t!=null?String(t):"";return r?r.compare(i,c):i<c?-1:i>c?1:0}function ge(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=ge(t);if(!r)return n;const i=r.split("&");for(let c=0;c<i.length;c++){const l=i[c];if(!l)continue;const u=l.indexOf(":"),o=u>-1?l.slice(0,u):l,a=u>-1?l.slice(u+1):"";if(o)try{n[o]=decodeURIComponent(a)}catch{n[o]=a}}return n}function j(e){if(!e)return null;const t=M();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");ge(location.hash)!==i&&(location.hash=i)}function We(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function T(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function U(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=j,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=We,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=U,window.lnCore.hashFilterEncode=Ke,window.lnCore.hashFilterDecode=Qe);function ze(e){return(e||"").replace(/^\?/,"")}function V(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=ze(t);if(!r)return n;const i=new URLSearchParams(r);for(const[c,l]of i.entries())n[c]=l;return n}function H(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function O(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function W(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=V,window.lnCore.queryGet=H,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=O,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=W,window.lnCore.queryFilterEncode=Je,window.lnCore.queryFilterDecode=Ge);function Xe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Xe);function v(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ye(e){const t=v(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function Ze(e,t){return!e||!t?!1:e.field!==null&&e.field!==void 0&&t.field!==null&&t.field!==void 0?e.field===t.field:e.column!==null&&e.column!==void 0&&t.column!==null&&t.column!==void 0?String(e.column)===String(t.column):!1}function et(e,t,n,r){const i=v(e);if(i==="none")return()=>0;const c=i==="desc"?-1:1,l=typeof r=="function"?r:u=>u;return function(u,o){const a=l(u),h=l(o);return He(a,h,t,n)*c}}function K(e){return!!(!e||typeof e!="object"||e.nodeType!==1||e.tagName==="TEMPLATE"||typeof e.hasAttribute=="function"&&(e.hasAttribute("data-ln-sort-exclude")||e.hasAttribute("data-ln-table-empty")||e.hasAttribute("hidden"))||e.classList&&e.classList.contains("hidden")||e.style&&e.style.display==="none")}function tt(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const n=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(n&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(n));if(e.tagName==="TABLE"){const r=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(r)return Array.from(r.children||[]);if(typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll("tbody tr, tr"))}return Array.from(e.children||[])}(function(){const e="data-ln-sort",t="lnSort",n="data-ln-sort-field",r="data-ln-sort-state",i="data-ln-sort-dir",c="data-ln-hash",l="data-ln-query";if(window[t]!==void 0)return;function u(d,g){return d.getAttribute(g)||null}const o={"data-ln-sort":{prop:"targetId",type:"string",read:q,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:u,effect:E,description:"Field name or column key to sort by"},"data-ln-sort-dir":{type:"enum",values:["asc","desc"],fallback:"asc",description:"Default or requested sort direction"},"data-ln-sort-items":{prop:"itemsSelector",type:"string",read:u,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:E,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:E,description:"URL hash routing key for sort state persistence"},"data-ln-query":{type:"string",effect:E,description:"URL query parameter name for sort state persistence"}},a=ce(o),h=new WeakMap;function p(d,g,s){if(g){const y=d.querySelector('[data-ln-field="'+g+'"]');return y?F(y):""}return s!=null&&d.cells&&d.cells[s]?F(d.cells[s]):F(d)}function A(d){this.dom=d,se(this,d,a);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=v(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=T(d,"sort"),this.hashEnabled=!!this.nsKey,this.queryParam=O(d,"sort"),this.queryEnabled=!!this.queryParam;const s=this;this._onClick=function(w){const b=w.target.closest("["+i+"]");if(!b)return;const f=v(b.getAttribute(i));s._apply(f)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(s._destroyed||!w.detail)return;const b=s._resolveTarget();if(!(b&&(w.target===b||b.contains(w.target))||w.detail.targetId&&w.detail.targetId===s.targetId))return;if(Ze({field:s.field,column:s.column},{field:w.detail.field,column:w.detail.column})){const m=v(w.detail.direction);m&&d.getAttribute(r)!==m&&(s._state=m,d.setAttribute(r,m),s._updateAriaSort(m));return}d.getAttribute(r)!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(s._destroyed||!s.hashEnabled)return;const w=j(s.nsKey),b=U(w);if(b)s.field!==null&&b.fieldOrColumn===s.field||s.column!==null&&String(s.column)===b.fieldOrColumn?s._state!==b.direction&&s._apply(b.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const f=s._resolveTarget();f&&(R(f,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(f,"none"))}},this._onPopState=function(){if(s._destroyed||!s.queryEnabled)return;const w=H(s.queryParam),b=V(),f=W(w,b);if(f)s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn?s._state!==f.direction&&s._apply(f.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const C=s._resolveTarget();C&&(R(C,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(C,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let y=!1;if(this.hashEnabled){const w=j(this.nsKey),b=U(w);b&&((s.field!==null&&b.fieldOrColumn===s.field||s.column!==null&&String(s.column)===b.fieldOrColumn)&&I(function(){s._destroyed||s._apply(b.direction,!0)}),y=!0)}else if(this.queryEnabled){const w=H(this.queryParam),b=V(),f=W(w,b);f&&((s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn)&&I(function(){s._destroyed||s._apply(f.direction,!0)}),y=!0)}if(!y){const w=v(d.getAttribute(r));w&&w!=="none"&&I(function(){s._destroyed||s._apply(w,!0)})}return this}A.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},A.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ye(d))},A.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const f=this.dom.closest("th");f&&f.cellIndex!==void 0&&(this.column=f.cellIndex)}const s=v(d);this._state=s,this.dom.getAttribute(r)!==s&&this.dom.setAttribute(r,s),this._updateAriaSort(s);const y=this._resolveTarget();if(!y)return;const w={field:this.field,column:this.column,direction:s,targetId:this.targetId};if(!g){if(this.hashEnabled){const f=ye(this.field!==null?this.field:this.column,s);me(this.nsKey,f)}else if(this.queryEnabled){const f=Ae(this.field!==null?this.field:this.column,s);Ce(this.queryParam,f)}}R(y,"ln-sort:change",w).defaultPrevented||this._defaultSort(y,s)},A.prototype._defaultSort=function(d,g){const s=tt(d,this.itemsSelector);if(!s.length)return;const y=s[0].parentNode,w=s.filter(function(f){return!K(f)});if(!w.length)return;h.has(d)||h.set(d,w.slice());let b;if(g==="none"){const f=h.get(d)||w;h.delete(d),b=f.filter(function(C){return C.parentNode===y&&!K(C)})}else{const f=this.field,C=this.column,m=w.map(function(_){return{el:_,val:p(_,f,C)}}),S=Ve(m.map(function(_){return _.val})),Q=typeof Intl<"u"?new Intl.Collator(Le(this.dom),{sensitivity:"base",numeric:!0}):null,x=et(g,S,Q,function(_){return _.val});m.sort(x),b=m.map(function(_){return _.el})}pe(function(){const f=document.createDocumentFragment();let C=0;for(let m=0;m<s.length;m++){const S=s[m];K(S)?f.appendChild(S):C<b.length&&f.appendChild(b[C++])}y.appendChild(f)})},A.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.dom.removeEventListener("click",this._onClick),document.removeEventListener("ln-sort:change",this._onSortChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function E(d,g){const s=d[t];if(!(!s||s._destroyed))if(g===n){const y=d.closest("th");s.column=!s.field&&y?y.cellIndex:null}else if(g===r){const y=v(d.getAttribute(r));y!==s._state&&s._apply(y)}else g===c?(s.hashEnabled&&s._onHashChange&&window.removeEventListener("hashchange",s._onHashChange),s.nsKey=T(d,"sort"),s.hashEnabled=!!s.nsKey,s.hashEnabled&&window.addEventListener("hashchange",s._onHashChange)):g===l&&(s.queryEnabled&&s._onPopState&&window.removeEventListener("popstate",s._onPopState),s.queryParam=O(d,"sort"),s.queryEnabled=!!s.queryParam,s.queryEnabled&&window.addEventListener("popstate",s._onPopState))}be(e,t,A,"ln-sort",{attributes:o,persist:{attr:r,hashActive:function(d){return!!T(d,"sort")||!!O(d,"sort")}}})})()})();