@livenetworks/ashlar 2.1.13 → 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 (101) hide show
  1. package/components/COMPONENTS.md +80 -80
  2. package/components/ln-api-connector/ln-api-connector.schema.json +105 -105
  3. package/components/ln-chart/ln-chart-dev.scss +0 -4
  4. package/components/ln-core/README.md +21 -21
  5. package/components/ln-core/ln-core.schema.json +120 -120
  6. package/components/ln-core/query.js +113 -113
  7. package/components/ln-data-coordinator/README.md +2 -0
  8. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  9. package/components/ln-data-coordinator/ln-data-coordinator.schema.json +196 -196
  10. package/components/ln-data-coordinator/src/ln-data-coordinator.js +457 -432
  11. package/components/ln-data-store/ln-data-store.schema.json +92 -92
  12. package/components/ln-date/ln-date.js +1 -1
  13. package/components/ln-date/src/ln-date.js +1 -1
  14. package/components/ln-debug/ln-debug.js +1 -1
  15. package/components/ln-debug/ln-debug.schema.json +28 -28
  16. package/components/ln-debug/src/generated-attributes.js +304 -302
  17. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  18. package/components/ln-external-links/README.md +19 -19
  19. package/components/ln-external-links/ln-external-links.js +1 -1
  20. package/components/ln-external-links/ln-external-links.schema.json +9 -0
  21. package/components/ln-external-links/ln-external-links.scss +12 -0
  22. package/components/ln-external-links/src/ln-external-links.js +3 -2
  23. package/components/ln-filter/README.md +2 -1
  24. package/components/ln-filter/ln-filter.js +1 -1
  25. package/components/ln-filter/ln-filter.schema.json +157 -169
  26. package/components/ln-filter/src/ln-filter.js +1 -3
  27. package/components/ln-form/ln-form.schema.json +57 -57
  28. package/components/ln-key/ln-key.js +1 -1
  29. package/components/ln-key/ln-key.schema.json +8 -0
  30. package/components/ln-key/src/ln-key.js +8 -5
  31. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  32. package/components/ln-obfuscator/ln-obfuscator.schema.json +6 -0
  33. package/components/ln-obfuscator/src/ln-obfuscator.js +2 -2
  34. package/components/ln-options/ln-options.schema.json +47 -47
  35. package/components/ln-popover/ln-popover.schema.json +82 -82
  36. package/components/ln-progress/ln-progress.schema.json +0 -13
  37. package/components/ln-search/ln-search.schema.json +111 -111
  38. package/components/ln-sort/README.md +1 -0
  39. package/components/ln-sort/ln-sort.js +1 -1
  40. package/components/ln-sort/ln-sort.schema.json +100 -112
  41. package/components/ln-sort/src/sort-model.js +1 -6
  42. package/components/ln-sortable/ln-sortable.schema.json +38 -38
  43. package/components/ln-sortable/ln-sortable.scss +25 -25
  44. package/components/ln-table/README.md +8 -1
  45. package/components/ln-table/ln-table.js +1 -1
  46. package/components/ln-table/ln-table.schema.json +195 -195
  47. package/components/ln-table/src/ln-table.js +43 -7
  48. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  49. package/components/ln-table-coordinator/ln-table-coordinator.schema.json +18 -0
  50. package/components/ln-table-coordinator/src/ln-table-coordinator.js +104 -2
  51. package/components/ln-toast/README.md +1 -1
  52. package/components/ln-toast/ln-toast.js +1 -1
  53. package/components/ln-toast/ln-toast.schema.json +6 -0
  54. package/components/ln-toast/src/ln-toast.js +1 -1
  55. package/components/ln-validate/README.md +6 -6
  56. package/components/ln-validate/ln-validate-dev.scss +0 -5
  57. package/components/ln-validate/ln-validate.js +1 -1
  58. package/components/ln-validate/ln-validate.schema.json +0 -6
  59. package/components/ln-validate/src/ln-validate.js +48 -29
  60. package/ln-ashlar.html-data.json +1824 -1814
  61. package/package.json +95 -95
  62. package/theme/README.md +7 -6
  63. package/theme/base/_global.scss +2 -2
  64. package/theme/base/_reset.scss +11 -0
  65. package/theme/components/_app-shell.scss +0 -8
  66. package/theme/components/_form.scss +6 -6
  67. package/theme/components/_ln-table.scss +6 -3
  68. package/theme/components/_scrollbar.scss +5 -4
  69. package/theme/components/_sortable.scss +19 -19
  70. package/theme/components/_stat-card.scss +1 -0
  71. package/theme/components/_table.scss +10 -33
  72. package/theme/config/_density.scss +236 -104
  73. package/theme/config/_palette.scss +71 -49
  74. package/theme/config/_theme.scss +27 -31
  75. package/theme/config/_tokens.scss +28 -26
  76. package/theme/config/mixins/_app-shell.scss +17 -21
  77. package/theme/config/mixins/_btn.scss +4 -2
  78. package/theme/config/mixins/_card.scss +87 -67
  79. package/theme/config/mixins/_colors.scss +2 -1
  80. package/theme/config/mixins/_display.scss +12 -0
  81. package/theme/config/mixins/_footer.scss +3 -1
  82. package/theme/config/mixins/_form.scss +48 -16
  83. package/theme/config/mixins/_layout.scss +9 -0
  84. package/theme/config/mixins/_ln-table.scss +22 -15
  85. package/theme/config/mixins/_modal.scss +3 -0
  86. package/theme/config/mixins/_nav.scss +27 -4
  87. package/theme/config/mixins/_sidebar.scss +2 -1
  88. package/theme/config/mixins/_stat-card.scss +33 -2
  89. package/theme/config/mixins/_status-badge.scss +1 -0
  90. package/theme/config/mixins/_table.scss +81 -39
  91. package/theme/config/mixins/_tabs.scss +31 -0
  92. package/theme/config/mixins/_toast.scss +0 -1
  93. package/theme/designs/relaxed/_card.scss +12 -0
  94. package/theme/designs/relaxed/_layout.scss +24 -0
  95. package/theme/ln-ashlar-core.scss +1 -0
  96. package/theme/ln-ashlar-dev.scss +0 -1
  97. package/theme/ln-ashlar-relaxed.scss +67 -0
  98. package/theme/tailwind/components.css +561 -24
  99. package/theme/utilities/_utilities.scss +1 -11
  100. package/web-types.json +2351 -2337
  101. package/components/ln-progress/ln-progress-dev.scss +0 -8
@@ -1 +1 @@
1
- (function(){"use strict";function Y(){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 j(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 o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!j(o))return}e.apply(console,t)}}function R(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function Te(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function F(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){F(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function X(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 Re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Fe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let d=0;d<r.options.length;d++)r.options[d].selected&&i[r.name].push(r.options[d].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const d=Number(r.value);i[r.name]=r.value===""||isNaN(d)?null:d}else i[r.name]=r.value}return i}function Oe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function De(e,t){const n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const d=String(r).split(",").map(function(m){return m.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=Oe(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let d=0;d<l.options.length;d++)l.options[d].selected=r.indexOf(l.options[d].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=De,window.lnCore.serializeForm=Fe,window.lnCore.resolveFormMethod=Re);const Z={};function Ne(e,t){Z[e]=t}function Be(e){return Z[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ne,window.lnCore.getDataMapper=Be);function Me(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,F(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const ee={};function $e(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];ee[n]=t}function je(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return ee[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=$e,window.lnCore.getLocaleFallback=je,window.lnCore.ensureLocaleObserver=Me);const P={};function Pe(e,t){P[e]||(P[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=P[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function te(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-attr").split(",");for(let d=0;d<r.length;d++){const m=r[d].trim().split(":");if(m.length!==2)continue;const y=m[0].trim(),k=m[1].trim();t[k]!=null&&c.setAttribute(y,t[k])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let d=0;d<r.length;d++){const m=r[d].trim().split(":");if(m.length!==2)continue;const y=m[0].trim(),k=m[1].trim();k in t&&c.classList.toggle(y,!!t[k])}}return e}function He(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 o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].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)te(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 ne(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],c=l.attributes;for(let r=0;r<c.length;r++){const d=c[r];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ve(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const d=e.children[r],m=d.getAttribute("data-ln-render-key");m&&(l[m]=d)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const d=t[r],m=String(o(d));let y=l[m];if(y)i(y,d,r);else{const k=Pe(n,s);if(!k||(ne(k,d),y=k.firstElementChild,!y))continue;y.setAttribute("data-ln-render-key",m),i(y,d,r)}c.appendChild(y)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=ne,window.lnCore.fill=te,window.lnCore.lnFill=He,window.lnCore.renderList=Ve);function O(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function re(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function oe(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function ie(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const H=new Map;function le(e,t){const n=(e?e.join("|"):"")+"::"+t;if(H.has(n))return H.get(n);const o=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&o.has(c)?c:t};return H.set(n,i),i}function se(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ue(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ce(e,t,n,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ae(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=le(o.values,o.fallback);break;case"integer":i=re;break;case"float":i=se;break;case"boolean":i=oe;break;case"list":i=ie;break;case"json":i=ue;break;case"string":default:i=O;break}i||(i=O),t[o.prop]=[i,n,o.fallback]}return t}function Ue(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function We(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=ae,window.lnCore.attrSpec=de,window.lnCore.attrStr=O,window.lnCore.attrInt=re,window.lnCore.attrBool=oe,window.lnCore.attrList=ie,window.lnCore.attrEnum=le,window.lnCore.attrFloat=se,window.lnCore.attrJson=ue);function D(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 fe(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&D(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)D(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ke(){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 he(){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 Qe(e){const t=he(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];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 o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=We(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function we(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ge(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=he(),i=o.byAttr.get(t),s=Y()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&j(l)){const c=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let d=0;d<c.length;d++)ce(c[d].spec,r,t,c[d].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&we(c,l,t,e.oldValue),o.reactiveWildcard.length&&we(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const r=i[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(fe(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,F(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ge(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function U(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function ge(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=V();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 o=U();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType!==1)continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],d=r.query;if(d&&(s.matches&&s.matches(d)&&(r.ComponentFn&&D(s,r),r.onInit&&r.onInit(s)),l&&s.querySelectorAll)){const m=s.querySelectorAll(d);for(let y=0;y<m.length;y++)r.ComponentFn&&D(m[y],r),r.onInit&&r.onInit(m[y])}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType!==1||document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],d=r.query;if(d&&(s.matches&&s.matches(d)&&ge(s,r),l&&s.querySelectorAll)){const m=s.querySelectorAll(d);for(let y=0;y<m.length;y++)ge(m[y],r)}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,F(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ye(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ze(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 o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{ye(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ye(e){V().push(e),e.onSubtreeChange&&e.query&&U().push(e),pe()}function be(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,r=i.onInit||null,d=i.onAttrChange||null,m=i.effects||null,y=i.attributes||null,k=y?Ue(y):m,z=y?new Set(Object.keys(y)):null,L=i.persist||null;function v(x){const a=x||document.body;if(fe(a,e,t,n),y&&Y())for(const f in y){const u=y[f],h=Array.from(a.querySelectorAll("["+f+"]"));a.matches&&a.matches("["+f+"]")&&h.push(a);for(let g=0;g<h.length;g++){const w=h[g];j(w)&&ce(u,w.getAttribute(f),f,o,w)}}r&&r(a)}const q=[];if(e.indexOf("[")!==-1){const x=/\[([\w-]+)/g;let a;for(;(a=x.exec(e))!==null;)q.push(a[1])}else q.push(e);Qe({selector:e,attribute:t,componentTag:o,attributes:y,ComponentFn:n,onInit:r,observed:q.concat(s),onAttributeChange:l,onAttrChange:d,effects:k,declared:z,persist:L}),Je();const S=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,E=i.subtreeQuery||(S?e:"["+e+"]"),B={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:E};V().push(B),c&&E&&U().push(B),pe(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ye,window.lnCore.withoutLifecycle=ze);function M(){Ke()>0?I(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",M):M(),v}function me(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function Ce(e){return(e||"").replace(/^#/,"")}function W(e){const t=e===void 0?location.hash:e,n={},o=Ce(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,d=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(d)}catch{n[r]=d}}return n}function K(e){if(!e)return null;const t=W();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=W();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Ce(location.hash)!==i&&(location.hash=i)}function Xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function N(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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ze(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function et(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 _e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Q(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=W,window.lnCore.hashGet=K,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=Xe,window.lnCore.resolveHashNamespace=N,window.lnCore.hashSortEncode=Ze,window.lnCore.hashSortDecode=et,window.lnCore.hashFilterEncode=_e,window.lnCore.hashFilterDecode=Q);function tt(e){return(e||"").replace(/^\?/,"")}function nt(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=tt(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function G(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function ve(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 o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function ke(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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function rt(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ot(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 o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Se(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function J(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=nt,window.lnCore.queryGet=G,window.lnCore.querySet=ve,window.lnCore.resolveQueryParam=ke,window.lnCore.querySortEncode=rt,window.lnCore.querySortDecode=ot,window.lnCore.queryFilterEncode=Se,window.lnCore.queryFilterDecode=J);function it(){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=it);function Ee(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let o=0;o<t.length;o++)if(String(t[o]).trim().toLowerCase()===n)return!0;return!1}function lt(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function st(e,t,n){if(!t||typeof t!="object")return!0;const o=Object.keys(t);if(o.length===0)return!0;for(let i=0;i<o.length;i++){const s=t[o[i]];let l="";if(s.col!==null&&s.col!==void 0?l=e[s.col]||"":s.attr&&n&&typeof n.getAttribute=="function"&&(l=n.getAttribute(s.attr)||""),!Ee(l,s.values))return!1}return!0}function xe(e,t,n,o){if(o!=null&&!isNaN(o))return parseInt(o,10);if(t&&typeof t.getAttribute=="function"){const i=t.getAttribute("data-ln-filter-col");if(i!==null&&!isNaN(parseInt(i,10)))return parseInt(i,10);if(typeof t.closest=="function"){const s=t.closest("th");if(s&&typeof s.cellIndex=="number")return s.cellIndex;const l=t.closest("[data-ln-popover], [id]");if(l&&l.id){const c=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(c&&typeof c.querySelector=="function"){const r=c.querySelector('[data-ln-popover-for="'+l.id+'"]');if(r&&typeof r.closest=="function"){const d=r.closest("th");if(d&&typeof d.cellIndex=="number")return d.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const i=e.querySelectorAll("thead th, tr:first-child th"),s=String(n).trim().toLowerCase();for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-table-filter-col")||c.getAttribute("data-ln-filter-col")||c.getAttribute("data-ln-filter-key")||c.getAttribute("data-ln-table-col")||c.getAttribute("data-ln-col")||c.getAttribute("data-ln-field");if(r&&r.trim().toLowerCase()===s)return typeof c.cellIndex=="number"?c.cellIndex:l}if(t){const l=t.closest?t.closest("[data-ln-popover], [id]"):null,c=l&&l.id||t.id||null;if(c)for(let r=0;r<i.length;r++){const d=i[r];if(typeof d.querySelector=="function"&&d.querySelector('[data-ln-popover-for="'+c+'"]'))return typeof d.cellIndex=="number"?d.cellIndex:r}}for(let l=0;l<i.length;l++){const c=i[l],d=Array.from(c.childNodes||[]).filter(y=>y.nodeType===3),m=(d.length>0?d.map(y=>y.textContent.trim()).join(" "):c.textContent||"").trim().toLowerCase();if(m&&m===s)return typeof c.cellIndex=="number"?c.cellIndex:l}}return null}function ut(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let o=0;o<e.length;o++){const i=e[o];!t&&i.key&&(t=i.key),i.checked&&!i.isReset&&i.value&&n.push(i.value)}return{key:t,values:n}}function ct(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function qe(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",o="data-ln-filter-value",i="data-ln-filter-hide",s="data-ln-filter-reset",l="data-ln-filter-col",c="data-ln-hash",r="data-ln-query",d="data-ln-filter-values",m="data-ln-filter-target",y=new WeakMap;if(window[t]!==void 0)return;const k={"data-ln-filter":{prop:"targetId",type:"string",read:O,fallback:null,effect:x,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:x,description:"URL hash routing key for filter state persistence"},"data-ln-query":{type:"string",effect:x,description:"URL query parameter name for filter state synchronization"},"data-ln-filter-values":{type:"string",effect:x,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-filter-target":{type:"marker",description:"Marker on target container or table observed by ln-filter"}},z=de(k);function L(a){if(!a.hasAttribute(r))return null;const f=a.getAttribute(r);if(f&&f.trim()!=="")return f.trim();const u=a.getAttribute(l);if(u&&isNaN(parseInt(u,10)))return u.trim();const h=a.querySelector("["+n+"]");if(h){const g=h.getAttribute(n);if(g&&g.trim()!=="")return g.trim()}return ke(a,"filter")}function v(a){return a.hasAttribute(s)||!a.getAttribute(o)}function q(a){const f=a.dom.querySelectorAll("["+n+"]"),u=[];for(let g=0;g<f.length;g++){const w=f[g];u.push({key:w.getAttribute(n),value:w.getAttribute(o)||"",checked:w.checked,isReset:v(w)})}const h=ut(u);return{key:h.key,values:h.values,targetId:a.targetId}}function S(a,f,u){const h=a.querySelectorAll("["+n+"]"),g=Array.isArray(u)&&u.length>0;for(let w=0;w<h.length;w++){const p=h[w];v(p)?p.checked=!g:g&&p.getAttribute(n)===f&&u.indexOf(p.getAttribute(o))!==-1?p.checked=!0:p.checked=!1}}function E(a){this.dom=a,ae(this,a,z);const f=a.getAttribute(l);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=N(a,"filter"),this.hashEnabled=!!this.nsKey,this.queryParam=L(a),this.queryEnabled=!!this.queryParam;const u=this,h=me(function(){u._destroyed||u._render()});this._queueRender=h;const g=me(function(){u._destroyed||u._applyDomFilter()});this._queueDomFilter=g;function w(){if(!u.targetId)return;const b=document.getElementById(u.targetId);b&&!b.hasAttribute(m)&&b.setAttribute(m,u.targetId)}this._ensureTargetMarked=w,w(),I(function(){u._destroyed||w()}),this._attachHandlers(),this._onHashChange=function(){if(u._destroyed||!u.hashEnabled)return;const b=K(u.nsKey),C=Q(b);C&&C.key&&C.values.length>0?S(u.dom,C.key,C.values):S(u.dom,null,[]),u._render()},this._onPopState=function(){if(u._destroyed||!u.queryEnabled)return;const b=G(u.queryParam),C=J(b),_=u.dom.querySelector("["+n+"]"),A=_?_.getAttribute(n):u.queryParam;S(u.dom,A,C),u._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let p=!1;if(this.hashEnabled){const b=K(this.nsKey),C=Q(b);C&&C.key&&C.values.length>0&&(S(a,C.key,C.values),I(function(){u._destroyed||u._render()}),p=!0)}else if(this.queryEnabled){const b=G(this.queryParam),C=J(b);if(C.length>0){const _=a.querySelector("["+n+"]"),A=_?_.getAttribute(n):u.queryParam;S(a,A,C),I(function(){u._destroyed||u._render()}),p=!0}}if(!p){const b=qe(a.getAttribute(d));if(b.length>0){const C=a.querySelector("["+n+"]"),_=C?C.getAttribute(n):null;_&&(S(a,_,b),I(function(){u._destroyed||u._render()}),p=!0)}}if(!p){const b=a.querySelectorAll("["+n+"]");for(let C=0;C<b.length;C++)if(b[C].checked&&!v(b[C])){I(function(){u._destroyed||u._render()});break}}return this}E.prototype._attachHandlers=function(){const a=this;this._onDomChange=function(f){const u=f.target;if(!u||!u.hasAttribute||!u.hasAttribute(n))return;const h=Array.from(a.dom.querySelectorAll("["+n+"]"));if(v(u)){for(let g=0;g<h.length;g++)v(h[g])||(h[g].checked=!1);u.checked=!0,a._queueRender();return}if(u.checked){for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!1);let g=!1;for(let w=0;w<h.length;w++)if(v(h[w])){g=!0;break}if(g){let w=!0;for(let p=0;p<h.length;p++)if(!v(h[p])&&!h[p].checked){w=!1;break}if(w)for(let p=0;p<h.length;p++)v(h[p])?h[p].checked=!0:h[p].checked=!1}}else{let g=!1;for(let w=0;w<h.length;w++)if(!v(h[w])&&h[w].checked){g=!0;break}if(!g)for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!0)}a._queueRender()},this.dom.addEventListener("change",this._onDomChange)},E.prototype._render=function(){const a=this,f=q(this),u=this._lastSnapshot;if(!(!u||u.key!==f.key||lt(u.values,f.values)))return;f.key===null||f.values.length;const g=document.getElementById(a.targetId),w={key:f.key,values:f.values.slice(),targetId:a.targetId};R(a.dom,"ln-filter:change",w);let p=!1;g&&g!==a.dom&&Te(g,"ln-filter:change",w).defaultPrevented&&(p=!0);const b=u&&u.values.length>0,C=f.values.length===0;if(b&&C){const A={targetId:a.targetId};R(a.dom,"ln-filter:reset",A),g&&g!==a.dom&&R(g,"ln-filter:reset",A)}this._lastSnapshot={key:f.key,values:f.values.slice()};const _=ct(f.values);if(_?this.dom.setAttribute(d,_):this.dom.removeAttribute(d),this.hashEnabled){const A=_e(f.key,f.values);Ae(this.nsKey,A)}else if(this.queryEnabled){const A=Se(f.values),T=this.queryParam||f.key;T&&ve(T,A)}p||a._applyDomFilter(g)},E.prototype._applyDomFilter=function(a){const f=a||document.getElementById(this.targetId);if(!f)return;const u=q(this),h=u.key===null||u.values.length===0,g=f.tagName==="TABLE"?f:f.querySelector?f.querySelector("table"):null;if(g)this._filterTableRows(u,g);else{const w=f.children;for(let p=0;p<w.length;p++){const b=w[p],C=h?null:b.getAttribute("data-"+u.key),_=!h&&C!==null&&!Ee(C,u.values),A=b.hasAttribute(i);_&&!A?b.setAttribute(i,"true"):!_&&A&&b.removeAttribute(i)}}};function B(a){if(!a)return"";const f=a.querySelector?a.querySelector("[data-ln-value]"):null;return X(f||a)}function M(a){return!!(!a||typeof a!="object"||a.tagName==="TEMPLATE"||typeof a.hasAttribute=="function"&&(a.hasAttribute("data-ln-sort-exclude")||a.hasAttribute("hidden"))||a.classList&&a.classList.contains("hidden")||a.style&&a.style.display==="none"||typeof a.matches=="function"&&a.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof a.querySelector=="function"&&a.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}E.prototype._filterTableRows=function(a,f){if(!f){const b=document.getElementById(this.targetId);if(!b||(f=b.tagName==="TABLE"?b:b.querySelector?b.querySelector("table"):null,!f))return}const u=xe(f,this.dom,a.key,this.colIndex),h=a.key||this.dom.getAttribute("data-ln-filter-key")||(u!==null?"col"+u:"attr-filter"),g=a.values;y.has(f)||y.set(f,{});const w=y.get(f);h&&g.length>0?w[h]={col:u,values:g.slice(),attr:"data-"+h}:h&&delete w[h];const p=f.tBodies;for(let b=0;b<p.length;b++){const C=p[b].rows;for(let _=0;_<C.length;_++){const A=C[_];if(M(A))continue;const T={};for(let $=0;$<A.cells.length;$++)T[$]=B(A.cells[$]);const Ie=!st(T,w,A),Le=A.hasAttribute(i);Ie&&!Le?A.setAttribute(i,"true"):!Ie&&Le&&A.removeAttribute(i)}}},E.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const a=document.getElementById(this.targetId);if(a){const f=a.tagName==="TABLE"?a:a.querySelector?a.querySelector("table"):null;if(f&&y.has(f)){const u=y.get(f),h=xe(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),g=this.dom.getAttribute("data-ln-filter-key")||(h!==null?"col"+h:this.colIndex!==null?"col"+this.colIndex:null);g&&u[g]&&(delete u[g],this._filterTableRows({key:null,values:[]},f)),Object.keys(u).length===0&&y.delete(f)}this.targetId&&document.querySelectorAll("["+e+'="'+this.targetId+'"]').length<=1&&a.removeAttribute(m)}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t]};function x(a,f){const u=a[t];if(!(!u||u._destroyed))if(f===c)u.hashEnabled&&u._onHashChange&&window.removeEventListener("hashchange",u._onHashChange),u.nsKey=N(a,"filter"),u.hashEnabled=!!u.nsKey,u.hashEnabled&&window.addEventListener("hashchange",u._onHashChange);else if(f===r)u.queryEnabled&&u._onPopState&&window.removeEventListener("popstate",u._onPopState),u.queryParam=L(a),u.queryEnabled=!!u.queryParam,u.queryEnabled&&window.addEventListener("popstate",u._onPopState);else if(f===d){const h=qe(a.getAttribute(d)),g=a.querySelector("["+n+"]"),w=g?g.getAttribute(n):null;w&&(S(a,w,h),u._render())}else f===e&&(u.targetId=a.getAttribute(e)||null,u._ensureTargetMarked(),u._render())}be(e,t,E,"ln-filter",{attributes:k,subtreeQuery:"["+e+"], ["+m+"]",onSubtreeChange:function(a,f){if(f.addedNodes.length===0&&f.removedNodes.length===0)return;let u=null,h=null;if(a.hasAttribute(m)?(h=a,u=a.getAttribute(m)||a.id):a.hasAttribute(e)&&(u=a.getAttribute(e),h=u?document.getElementById(u):null),!u||!h)return;const g=document.querySelectorAll("["+e+'="'+u+'"]');for(let w=0;w<g.length;w++){const p=g[w][t];p&&!p._destroyed&&q(p).values.length>0&&p._queueDomFilter()}},persist:{attr:d,hashActive:function(a){return!!N(a,"filter")||!!L(a)}}})})()})();
1
+ (function(){"use strict";function Y(){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 j(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 o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!j(o))return}e.apply(console,t)}}function R(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function Te(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function F(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){F(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function X(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 Re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Fe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let u=0;u<s.length;u++){const r=s[u];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let u=0;u<s.length;u++){const r=s[u];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let d=0;d<r.options.length;d++)r.options[d].selected&&i[r.name].push(r.options[d].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const d=Number(r.value);i[r.name]=r.value===""||isNaN(d)?null:d}else i[r.name]=r.value}return i}function Oe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function De(e,t){const n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];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 r=t[u];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const d=String(r).split(",").map(function(m){return m.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=Oe(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let d=0;d<l.options.length;d++)l.options[d].selected=r.indexOf(l.options[d].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=De,window.lnCore.serializeForm=Fe,window.lnCore.resolveFormMethod=Re);const Z={};function Ne(e,t){Z[e]=t}function Be(e){return Z[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ne,window.lnCore.getDataMapper=Be);function Me(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,F(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const ee={};function $e(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];ee[n]=t}function je(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return ee[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=$e,window.lnCore.getLocaleFallback=je,window.lnCore.ensureLocaleObserver=Me);const P={};function Pe(e,t){P[e]||(P[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=P[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function te(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],r=u.getAttribute("data-ln-field");t[r]!=null&&(u.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const u=o[l],r=u.getAttribute("data-ln-attr").split(",");for(let d=0;d<r.length;d++){const m=r[d].trim().split(":");if(m.length!==2)continue;const y=m[0].trim(),k=m[1].trim();t[k]!=null&&u.setAttribute(y,t[k])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const u=i[l],r=u.getAttribute("data-ln-show");r in t&&u.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const u=s[l],r=u.getAttribute("data-ln-class").split(",");for(let d=0;d<r.length;d++){const m=r[d].trim().split(":");if(m.length!==2)continue;const y=m[0].trim(),k=m[1].trim();k in t&&u.classList.toggle(y,!!t[k])}}return e}function He(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 o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].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)te(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 ne(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,u){return t[u]!==void 0?t[u]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],u=l.attributes;for(let r=0;r<u.length;r++){const d=u[r];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ve(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const d=e.children[r],m=d.getAttribute("data-ln-render-key");m&&(l[m]=d)}const u=document.createDocumentFragment();for(let r=0;r<t.length;r++){const d=t[r],m=String(o(d));let y=l[m];if(y)i(y,d,r);else{const k=Pe(n,s);if(!k||(ne(k,d),y=k.firstElementChild,!y))continue;y.setAttribute("data-ln-render-key",m),i(y,d,r)}u.appendChild(y)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=ne,window.lnCore.fill=te,window.lnCore.lnFill=He,window.lnCore.renderList=Ve);function O(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function re(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function oe(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function ie(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const H=new Map;function le(e,t){const n=(e?e.join("|"):"")+"::"+t;if(H.has(n))return H.get(n);const o=new Set(e||[]),i=function(s,l){const u=s.getAttribute(l);return u!==null&&o.has(u)?u:t};return H.set(n,i),i}function se(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ce(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ue(e,t,n,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const u=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(u(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(u(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return u(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(u(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(u(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(u(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return u(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ae(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=le(o.values,o.fallback);break;case"integer":i=re;break;case"float":i=se;break;case"boolean":i=oe;break;case"list":i=ie;break;case"json":i=ce;break;case"string":default:i=O;break}i||(i=O),t[o.prop]=[i,n,o.fallback]}return t}function Ue(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function We(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=ae,window.lnCore.attrSpec=de,window.lnCore.attrStr=O,window.lnCore.attrInt=re,window.lnCore.attrBool=oe,window.lnCore.attrList=ie,window.lnCore.attrEnum=le,window.lnCore.attrFloat=se,window.lnCore.attrJson=ce);function D(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 fe(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&D(e,l),e.querySelectorAll){const u=e.querySelectorAll(s);for(let r=0;r<u.length;r++)D(u[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ke(){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 he(){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 Qe(e){const t=he(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];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 o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=We(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function we(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ge(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=he(),i=o.byAttr.get(t),s=Y()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&j(l)){const u=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let d=0;d<u.length;d++)ue(u[d].spec,r,t,u[d].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const u=o.byReactive.get(t);u&&we(u,l,t,e.oldValue),o.reactiveWildcard.length&&we(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let u=0;u<i.length;u++){const r=i[u];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(fe(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,F(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ge(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function U(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function ge(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=V();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 o=U();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.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&&s.onSubtreeChange(u,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType!==1)continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let u=0;u<t.length;u++){const r=t[u],d=r.query;if(d&&(s.matches&&s.matches(d)&&(r.ComponentFn&&D(s,r),r.onInit&&r.onInit(s)),l&&s.querySelectorAll)){const m=s.querySelectorAll(d);for(let y=0;y<m.length;y++)r.ComponentFn&&D(m[y],r),r.onInit&&r.onInit(m[y])}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType!==1||document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let u=0;u<t.length;u++){const r=t[u],d=r.query;if(d&&(s.matches&&s.matches(d)&&ge(s,r),l&&s.querySelectorAll)){const m=s.querySelectorAll(d);for(let y=0;y<m.length;y++)ge(m[y],r)}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,F(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ye(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ze(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 o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{ye(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ye(e){V().push(e),e.onSubtreeChange&&e.query&&U().push(e),pe()}function be(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,u=i.onSubtreeChange||null,r=i.onInit||null,d=i.onAttrChange||null,m=i.effects||null,y=i.attributes||null,k=y?Ue(y):m,z=y?new Set(Object.keys(y)):null,L=i.persist||null;function v(x){const a=x||document.body;if(fe(a,e,t,n),y&&Y())for(const f in y){const c=y[f],h=Array.from(a.querySelectorAll("["+f+"]"));a.matches&&a.matches("["+f+"]")&&h.push(a);for(let g=0;g<h.length;g++){const w=h[g];j(w)&&ue(c,w.getAttribute(f),f,o,w)}}r&&r(a)}const q=[];if(e.indexOf("[")!==-1){const x=/\[([\w-]+)/g;let a;for(;(a=x.exec(e))!==null;)q.push(a[1])}else q.push(e);Qe({selector:e,attribute:t,componentTag:o,attributes:y,ComponentFn:n,onInit:r,observed:q.concat(s),onAttributeChange:l,onAttrChange:d,effects:k,declared:z,persist:L}),Je();const S=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,E=i.subtreeQuery||(S?e:"["+e+"]"),B={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:u,query:E};V().push(B),u&&E&&U().push(B),pe(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ye,window.lnCore.withoutLifecycle=ze);function M(){Ke()>0?I(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",M):M(),v}function me(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function Ce(e){return(e||"").replace(/^#/,"")}function W(e){const t=e===void 0?location.hash:e,n={},o=Ce(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const u=l.indexOf(":"),r=u>-1?l.slice(0,u):l,d=u>-1?l.slice(u+1):"";if(r)try{n[r]=decodeURIComponent(d)}catch{n[r]=d}}return n}function K(e){if(!e)return null;const t=W();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=W();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Ce(location.hash)!==i&&(location.hash=i)}function Xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function N(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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ze(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function et(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 _e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Q(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=W,window.lnCore.hashGet=K,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=Xe,window.lnCore.resolveHashNamespace=N,window.lnCore.hashSortEncode=Ze,window.lnCore.hashSortDecode=et,window.lnCore.hashFilterEncode=_e,window.lnCore.hashFilterDecode=Q);function tt(e){return(e||"").replace(/^\?/,"")}function nt(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=tt(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function G(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function ve(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 o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function ke(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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function rt(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ot(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 o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Se(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function J(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=nt,window.lnCore.queryGet=G,window.lnCore.querySet=ve,window.lnCore.resolveQueryParam=ke,window.lnCore.querySortEncode=rt,window.lnCore.querySortDecode=ot,window.lnCore.queryFilterEncode=Se,window.lnCore.queryFilterDecode=J);function it(){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=it);function Ee(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let o=0;o<t.length;o++)if(String(t[o]).trim().toLowerCase()===n)return!0;return!1}function lt(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function st(e,t,n){if(!t||typeof t!="object")return!0;const o=Object.keys(t);if(o.length===0)return!0;for(let i=0;i<o.length;i++){const s=t[o[i]];let l="";if(s.col!==null&&s.col!==void 0?l=e[s.col]||"":s.attr&&n&&typeof n.getAttribute=="function"&&(l=n.getAttribute(s.attr)||""),!Ee(l,s.values))return!1}return!0}function xe(e,t,n,o){if(o!=null&&!isNaN(o))return parseInt(o,10);if(t&&typeof t.getAttribute=="function"){const i=t.getAttribute("data-ln-filter-col");if(i!==null&&!isNaN(parseInt(i,10)))return parseInt(i,10);if(typeof t.closest=="function"){const s=t.closest("th");if(s&&typeof s.cellIndex=="number")return s.cellIndex;const l=t.closest("[data-ln-popover], [id]");if(l&&l.id){const u=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(u&&typeof u.querySelector=="function"){const r=u.querySelector('[data-ln-popover-for="'+l.id+'"]');if(r&&typeof r.closest=="function"){const d=r.closest("th");if(d&&typeof d.cellIndex=="number")return d.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const i=e.querySelectorAll("thead th, tr:first-child th"),s=String(n).trim().toLowerCase();for(let l=0;l<i.length;l++){const u=i[l],r=u.getAttribute("data-ln-table-filter-col")||u.getAttribute("data-ln-filter-col")||u.getAttribute("data-ln-filter-key")||u.getAttribute("data-ln-table-col")||u.getAttribute("data-ln-col")||u.getAttribute("data-ln-field");if(r&&r.trim().toLowerCase()===s)return typeof u.cellIndex=="number"?u.cellIndex:l}if(t){const l=t.closest?t.closest("[data-ln-popover], [id]"):null,u=l&&l.id||t.id||null;if(u)for(let r=0;r<i.length;r++){const d=i[r];if(typeof d.querySelector=="function"&&d.querySelector('[data-ln-popover-for="'+u+'"]'))return typeof d.cellIndex=="number"?d.cellIndex:r}}for(let l=0;l<i.length;l++){const u=i[l],d=Array.from(u.childNodes||[]).filter(y=>y.nodeType===3),m=(d.length>0?d.map(y=>y.textContent.trim()).join(" "):u.textContent||"").trim().toLowerCase();if(m&&m===s)return typeof u.cellIndex=="number"?u.cellIndex:l}}return null}function ct(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let o=0;o<e.length;o++){const i=e[o];!t&&i.key&&(t=i.key),i.checked&&!i.isReset&&i.value&&n.push(i.value)}return{key:t,values:n}}function ut(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function qe(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",o="data-ln-filter-value",i="data-ln-filter-hide",s="data-ln-filter-reset",l="data-ln-filter-col",u="data-ln-hash",r="data-ln-query",d="data-ln-filter-values",m="data-ln-filter-target",y=new WeakMap;if(window[t]!==void 0)return;const k={"data-ln-filter":{prop:"targetId",type:"string",read:O,fallback:null,effect:x,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:x,description:"URL hash routing key for filter state persistence"},"data-ln-query":{type:"string",effect:x,description:"URL query parameter name for filter state synchronization"},"data-ln-filter-values":{type:"string",effect:x,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-filter-target":{type:"marker",description:"Marker on target container or table observed by ln-filter"}},z=de(k);function L(a){if(!a.hasAttribute(r))return null;const f=a.getAttribute(r);if(f&&f.trim()!=="")return f.trim();const c=a.getAttribute(l);if(c&&isNaN(parseInt(c,10)))return c.trim();const h=a.querySelector("["+n+"]");if(h){const g=h.getAttribute(n);if(g&&g.trim()!=="")return g.trim()}return ke(a,"filter")}function v(a){return a.hasAttribute(s)||!a.getAttribute(o)}function q(a){const f=a.dom.querySelectorAll("["+n+"]"),c=[];for(let g=0;g<f.length;g++){const w=f[g];c.push({key:w.getAttribute(n),value:w.getAttribute(o)||"",checked:w.checked,isReset:v(w)})}const h=ct(c);return{key:h.key,values:h.values,targetId:a.targetId}}function S(a,f,c){const h=a.querySelectorAll("["+n+"]"),g=Array.isArray(c)&&c.length>0;for(let w=0;w<h.length;w++){const p=h[w];v(p)?p.checked=!g:g&&p.getAttribute(n)===f&&c.indexOf(p.getAttribute(o))!==-1?p.checked=!0:p.checked=!1}}function E(a){this.dom=a,ae(this,a,z);const f=a.getAttribute(l);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=N(a,"filter"),this.hashEnabled=!!this.nsKey,this.queryParam=L(a),this.queryEnabled=!!this.queryParam;const c=this,h=me(function(){c._destroyed||c._render()});this._queueRender=h;const g=me(function(){c._destroyed||c._applyDomFilter()});this._queueDomFilter=g;function w(){if(!c.targetId)return;const b=document.getElementById(c.targetId);b&&!b.hasAttribute(m)&&b.setAttribute(m,c.targetId)}this._ensureTargetMarked=w,w(),I(function(){c._destroyed||w()}),this._attachHandlers(),this._onHashChange=function(){if(c._destroyed||!c.hashEnabled)return;const b=K(c.nsKey),C=Q(b);C&&C.key&&C.values.length>0?S(c.dom,C.key,C.values):S(c.dom,null,[]),c._render()},this._onPopState=function(){if(c._destroyed||!c.queryEnabled)return;const b=G(c.queryParam),C=J(b),_=c.dom.querySelector("["+n+"]"),A=_?_.getAttribute(n):c.queryParam;S(c.dom,A,C),c._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let p=!1;if(this.hashEnabled){const b=K(this.nsKey),C=Q(b);C&&C.key&&C.values.length>0&&(S(a,C.key,C.values),I(function(){c._destroyed||c._render()}),p=!0)}else if(this.queryEnabled){const b=G(this.queryParam),C=J(b);if(C.length>0){const _=a.querySelector("["+n+"]"),A=_?_.getAttribute(n):c.queryParam;S(a,A,C),I(function(){c._destroyed||c._render()}),p=!0}}if(!p){const b=qe(a.getAttribute(d));if(b.length>0){const C=a.querySelector("["+n+"]"),_=C?C.getAttribute(n):null;_&&(S(a,_,b),I(function(){c._destroyed||c._render()}),p=!0)}}if(!p){const b=a.querySelectorAll("["+n+"]");for(let C=0;C<b.length;C++)if(b[C].checked&&!v(b[C])){I(function(){c._destroyed||c._render()});break}}return this}E.prototype._attachHandlers=function(){const a=this;this._onDomChange=function(f){const c=f.target;if(!c||!c.hasAttribute||!c.hasAttribute(n))return;const h=Array.from(a.dom.querySelectorAll("["+n+"]"));if(v(c)){for(let g=0;g<h.length;g++)v(h[g])||(h[g].checked=!1);c.checked=!0,a._queueRender();return}if(c.checked){for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!1);let g=!1;for(let w=0;w<h.length;w++)if(v(h[w])){g=!0;break}if(g){let w=!0;for(let p=0;p<h.length;p++)if(!v(h[p])&&!h[p].checked){w=!1;break}if(w)for(let p=0;p<h.length;p++)v(h[p])?h[p].checked=!0:h[p].checked=!1}}else{let g=!1;for(let w=0;w<h.length;w++)if(!v(h[w])&&h[w].checked){g=!0;break}if(!g)for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!0)}a._queueRender()},this.dom.addEventListener("change",this._onDomChange)},E.prototype._render=function(){const a=this,f=q(this),c=this._lastSnapshot;if(!(!c||c.key!==f.key||lt(c.values,f.values)))return;f.key===null||f.values.length;const g=document.getElementById(a.targetId),w={key:f.key,values:f.values.slice(),targetId:a.targetId};R(a.dom,"ln-filter:change",w);let p=!1;g&&g!==a.dom&&Te(g,"ln-filter:change",w).defaultPrevented&&(p=!0);const b=c&&c.values.length>0,C=f.values.length===0;if(b&&C){const A={targetId:a.targetId};R(a.dom,"ln-filter:reset",A),g&&g!==a.dom&&R(g,"ln-filter:reset",A)}this._lastSnapshot={key:f.key,values:f.values.slice()};const _=ut(f.values);if(_?this.dom.setAttribute(d,_):this.dom.removeAttribute(d),this.hashEnabled){const A=_e(f.key,f.values);Ae(this.nsKey,A)}else if(this.queryEnabled){const A=Se(f.values),T=this.queryParam||f.key;T&&ve(T,A)}p||a._applyDomFilter(g)},E.prototype._applyDomFilter=function(a){const f=a||document.getElementById(this.targetId);if(!f)return;const c=q(this),h=c.key===null||c.values.length===0,g=f.tagName==="TABLE"?f:f.querySelector?f.querySelector("table"):null;if(g)this._filterTableRows(c,g);else{const w=f.children;for(let p=0;p<w.length;p++){const b=w[p],C=h?null:b.getAttribute("data-"+c.key),_=!h&&C!==null&&!Ee(C,c.values),A=b.hasAttribute(i);_&&!A?b.setAttribute(i,"true"):!_&&A&&b.removeAttribute(i)}}};function B(a){if(!a)return"";const f=a.querySelector?a.querySelector("[data-ln-value]"):null;return X(f||a)}function M(a){return!!(!a||typeof a!="object"||a.tagName==="TEMPLATE"||typeof a.hasAttribute=="function"&&(a.hasAttribute("data-ln-sort-exclude")||a.hasAttribute("data-ln-table-empty")||a.hasAttribute("hidden"))||a.classList&&a.classList.contains("hidden")||a.style&&a.style.display==="none")}E.prototype._filterTableRows=function(a,f){if(!f){const b=document.getElementById(this.targetId);if(!b||(f=b.tagName==="TABLE"?b:b.querySelector?b.querySelector("table"):null,!f))return}const c=xe(f,this.dom,a.key,this.colIndex),h=a.key||this.dom.getAttribute("data-ln-filter-key")||(c!==null?"col"+c:"attr-filter"),g=a.values;y.has(f)||y.set(f,{});const w=y.get(f);h&&g.length>0?w[h]={col:c,values:g.slice(),attr:"data-"+h}:h&&delete w[h];const p=f.tBodies;for(let b=0;b<p.length;b++){const C=p[b].rows;for(let _=0;_<C.length;_++){const A=C[_];if(M(A))continue;const T={};for(let $=0;$<A.cells.length;$++)T[$]=B(A.cells[$]);const Ie=!st(T,w,A),Le=A.hasAttribute(i);Ie&&!Le?A.setAttribute(i,"true"):!Ie&&Le&&A.removeAttribute(i)}}},E.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const a=document.getElementById(this.targetId);if(a){const f=a.tagName==="TABLE"?a:a.querySelector?a.querySelector("table"):null;if(f&&y.has(f)){const c=y.get(f),h=xe(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),g=this.dom.getAttribute("data-ln-filter-key")||(h!==null?"col"+h:this.colIndex!==null?"col"+this.colIndex:null);g&&c[g]&&(delete c[g],this._filterTableRows({key:null,values:[]},f)),Object.keys(c).length===0&&y.delete(f)}this.targetId&&document.querySelectorAll("["+e+'="'+this.targetId+'"]').length<=1&&a.removeAttribute(m)}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t]};function x(a,f){const c=a[t];if(!(!c||c._destroyed))if(f===u)c.hashEnabled&&c._onHashChange&&window.removeEventListener("hashchange",c._onHashChange),c.nsKey=N(a,"filter"),c.hashEnabled=!!c.nsKey,c.hashEnabled&&window.addEventListener("hashchange",c._onHashChange);else if(f===r)c.queryEnabled&&c._onPopState&&window.removeEventListener("popstate",c._onPopState),c.queryParam=L(a),c.queryEnabled=!!c.queryParam,c.queryEnabled&&window.addEventListener("popstate",c._onPopState);else if(f===d){const h=qe(a.getAttribute(d)),g=a.querySelector("["+n+"]"),w=g?g.getAttribute(n):null;w&&(S(a,w,h),c._render())}else f===e&&(c.targetId=a.getAttribute(e)||null,c._ensureTargetMarked(),c._render())}be(e,t,E,"ln-filter",{attributes:k,subtreeQuery:"["+e+"], ["+m+"]",onSubtreeChange:function(a,f){if(f.addedNodes.length===0&&f.removedNodes.length===0)return;let c=null,h=null;if(a.hasAttribute(m)?(h=a,c=a.getAttribute(m)||a.id):a.hasAttribute(e)&&(c=a.getAttribute(e),h=c?document.getElementById(c):null),!c||!h)return;const g=document.querySelectorAll("["+e+'="'+c+'"]');for(let w=0;w<g.length;w++){const p=g[w][t];p&&!p._destroyed&&q(p).values.length>0&&p._queueDomFilter()}},persist:{attr:d,hashActive:function(a){return!!N(a,"filter")||!!L(a)}}})})()})();
@@ -1,169 +1,157 @@
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-filter",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-col": {
7
- "direction": "author",
8
- "sources": [
9
- "src/filter-model.js"
10
- ]
11
- },
12
- "data-ln-debug": {
13
- "direction": null,
14
- "sources": [
15
- "ln-filter-dev.scss"
16
- ]
17
- },
18
- "data-ln-empty": {
19
- "direction": "author",
20
- "sources": [
21
- "src/ln-filter.js"
22
- ]
23
- },
24
- "data-ln-empty-state": {
25
- "direction": "author",
26
- "sources": [
27
- "src/ln-filter.js"
28
- ]
29
- },
30
- "data-ln-field": {
31
- "direction": "author",
32
- "sources": [
33
- "src/filter-model.js"
34
- ]
35
- },
36
- "data-ln-filter": {
37
- "direction": "author",
38
- "sources": [
39
- "ln-filter-dev.scss",
40
- "src/ln-filter.js"
41
- ],
42
- "type": "string",
43
- "description": "Target table or list element ID to filter"
44
- },
45
- "data-ln-filter-col": {
46
- "direction": "author",
47
- "sources": [
48
- "src/filter-model.js",
49
- "src/ln-filter.js"
50
- ],
51
- "type": "string",
52
- "description": "Column name or index filter specifier"
53
- },
54
- "data-ln-filter-hide": {
55
- "direction": "both",
56
- "sources": [
57
- "ln-filter.scss",
58
- "src/ln-filter.js"
59
- ],
60
- "type": "enum",
61
- "values": [
62
- "collapse",
63
- "none"
64
- ],
65
- "fallback": "collapse",
66
- "description": "CSS hiding strategy for non-matching rows"
67
- },
68
- "data-ln-filter-key": {
69
- "direction": "author",
70
- "sources": [
71
- "ln-filter-dev.scss",
72
- "src/filter-model.js",
73
- "src/ln-filter.js"
74
- ],
75
- "type": "string",
76
- "description": "Field key for filter matching"
77
- },
78
- "data-ln-filter-reset": {
79
- "direction": "author",
80
- "sources": [
81
- "src/ln-filter.js"
82
- ],
83
- "type": "trigger",
84
- "description": "Filter reset button or option trigger"
85
- },
86
- "data-ln-filter-target": {
87
- "direction": "both",
88
- "sources": [
89
- "src/ln-filter.js"
90
- ],
91
- "type": "marker",
92
- "description": "Marker on target container or table observed by ln-filter"
93
- },
94
- "data-ln-filter-value": {
95
- "direction": "author",
96
- "sources": [
97
- "src/ln-filter.js"
98
- ],
99
- "type": "string",
100
- "description": "Value to match for this filter input"
101
- },
102
- "data-ln-filter-values": {
103
- "direction": "both",
104
- "sources": [
105
- "src/ln-filter.js"
106
- ],
107
- "type": "string",
108
- "description": "Encoded active filter values"
109
- },
110
- "data-ln-hash": {
111
- "direction": null,
112
- "sources": [
113
- "src/ln-filter.js"
114
- ],
115
- "type": "string",
116
- "description": "URL hash routing key for filter state persistence"
117
- },
118
- "data-ln-popover": {
119
- "direction": "author",
120
- "sources": [
121
- "src/filter-model.js"
122
- ]
123
- },
124
- "data-ln-popover-for": {
125
- "direction": "author",
126
- "sources": [
127
- "src/filter-model.js"
128
- ]
129
- },
130
- "data-ln-query": {
131
- "direction": "author",
132
- "sources": [
133
- "src/ln-filter.js"
134
- ],
135
- "type": "string",
136
- "description": "URL query parameter name for filter state synchronization"
137
- },
138
- "data-ln-sort-exclude": {
139
- "direction": "author",
140
- "sources": [
141
- "src/ln-filter.js"
142
- ]
143
- },
144
- "data-ln-table-col": {
145
- "direction": "author",
146
- "sources": [
147
- "src/filter-model.js"
148
- ]
149
- },
150
- "data-ln-table-empty": {
151
- "direction": "author",
152
- "sources": [
153
- "src/ln-filter.js"
154
- ]
155
- },
156
- "data-ln-table-filter-col": {
157
- "direction": "author",
158
- "sources": [
159
- "src/filter-model.js"
160
- ]
161
- },
162
- "data-ln-value": {
163
- "direction": "author",
164
- "sources": [
165
- "src/ln-filter.js"
166
- ]
167
- }
168
- }
169
- }
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-filter",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-col": {
7
+ "direction": "author",
8
+ "sources": [
9
+ "src/filter-model.js"
10
+ ]
11
+ },
12
+ "data-ln-debug": {
13
+ "direction": null,
14
+ "sources": [
15
+ "ln-filter-dev.scss"
16
+ ]
17
+ },
18
+ "data-ln-field": {
19
+ "direction": "author",
20
+ "sources": [
21
+ "src/filter-model.js"
22
+ ]
23
+ },
24
+ "data-ln-filter": {
25
+ "direction": "author",
26
+ "sources": [
27
+ "ln-filter-dev.scss",
28
+ "src/ln-filter.js"
29
+ ],
30
+ "type": "string",
31
+ "description": "Target table or list element ID to filter"
32
+ },
33
+ "data-ln-filter-col": {
34
+ "direction": "author",
35
+ "sources": [
36
+ "src/filter-model.js",
37
+ "src/ln-filter.js"
38
+ ],
39
+ "type": "string",
40
+ "description": "Column name or index filter specifier"
41
+ },
42
+ "data-ln-filter-hide": {
43
+ "direction": "both",
44
+ "sources": [
45
+ "ln-filter.scss",
46
+ "src/ln-filter.js"
47
+ ],
48
+ "type": "enum",
49
+ "values": [
50
+ "collapse",
51
+ "none"
52
+ ],
53
+ "fallback": "collapse",
54
+ "description": "CSS hiding strategy for non-matching rows"
55
+ },
56
+ "data-ln-filter-key": {
57
+ "direction": "author",
58
+ "sources": [
59
+ "ln-filter-dev.scss",
60
+ "src/filter-model.js",
61
+ "src/ln-filter.js"
62
+ ],
63
+ "type": "string",
64
+ "description": "Field key for filter matching"
65
+ },
66
+ "data-ln-filter-reset": {
67
+ "direction": "author",
68
+ "sources": [
69
+ "src/ln-filter.js"
70
+ ],
71
+ "type": "trigger",
72
+ "description": "Filter reset button or option trigger"
73
+ },
74
+ "data-ln-filter-target": {
75
+ "direction": "both",
76
+ "sources": [
77
+ "src/ln-filter.js"
78
+ ],
79
+ "type": "marker",
80
+ "description": "Marker on target container or table observed by ln-filter"
81
+ },
82
+ "data-ln-filter-value": {
83
+ "direction": "author",
84
+ "sources": [
85
+ "src/ln-filter.js"
86
+ ],
87
+ "type": "string",
88
+ "description": "Value to match for this filter input"
89
+ },
90
+ "data-ln-filter-values": {
91
+ "direction": "both",
92
+ "sources": [
93
+ "src/ln-filter.js"
94
+ ],
95
+ "type": "string",
96
+ "description": "Encoded active filter values"
97
+ },
98
+ "data-ln-hash": {
99
+ "direction": null,
100
+ "sources": [
101
+ "src/ln-filter.js"
102
+ ],
103
+ "type": "string",
104
+ "description": "URL hash routing key for filter state persistence"
105
+ },
106
+ "data-ln-popover": {
107
+ "direction": "author",
108
+ "sources": [
109
+ "src/filter-model.js"
110
+ ]
111
+ },
112
+ "data-ln-popover-for": {
113
+ "direction": "author",
114
+ "sources": [
115
+ "src/filter-model.js"
116
+ ]
117
+ },
118
+ "data-ln-query": {
119
+ "direction": "author",
120
+ "sources": [
121
+ "src/ln-filter.js"
122
+ ],
123
+ "type": "string",
124
+ "description": "URL query parameter name for filter state synchronization"
125
+ },
126
+ "data-ln-sort-exclude": {
127
+ "direction": "author",
128
+ "sources": [
129
+ "src/ln-filter.js"
130
+ ]
131
+ },
132
+ "data-ln-table-col": {
133
+ "direction": "author",
134
+ "sources": [
135
+ "src/filter-model.js"
136
+ ]
137
+ },
138
+ "data-ln-table-empty": {
139
+ "direction": "author",
140
+ "sources": [
141
+ "src/ln-filter.js"
142
+ ]
143
+ },
144
+ "data-ln-table-filter-col": {
145
+ "direction": "author",
146
+ "sources": [
147
+ "src/filter-model.js"
148
+ ]
149
+ },
150
+ "data-ln-value": {
151
+ "direction": "author",
152
+ "sources": [
153
+ "src/ln-filter.js"
154
+ ]
155
+ }
156
+ }
157
+ }
@@ -394,11 +394,9 @@ import { arraysDiffer, decodeFilterValues, deriveActiveFilters, encodeFilterValu
394
394
  function _isSkipRow(row) {
395
395
  if (!row || typeof row !== 'object') return true;
396
396
  if (row.tagName === 'TEMPLATE') return true;
397
- if (typeof row.hasAttribute === 'function' && (row.hasAttribute('data-ln-sort-exclude') || row.hasAttribute('hidden'))) return true;
397
+ if (typeof row.hasAttribute === 'function' && (row.hasAttribute('data-ln-sort-exclude') || row.hasAttribute('data-ln-table-empty') || row.hasAttribute('hidden'))) return true;
398
398
  if (row.classList && row.classList.contains('hidden')) return true;
399
399
  if (row.style && row.style.display === 'none') return true;
400
- if (typeof row.matches === 'function' && row.matches('.empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]')) return true;
401
- if (typeof row.querySelector === 'function' && row.querySelector('.empty-state, [data-ln-empty], [data-ln-empty-state]')) return true;
402
400
  return false;
403
401
  }
404
402