@livenetworks/ashlar 2.1.4 → 2.1.5

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 (56) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-queue/ln-api-queue.js +1 -1
  5. package/components/ln-autosave/ln-autosave.js +1 -1
  6. package/components/ln-chart/ln-chart.js +1 -1
  7. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  8. package/components/ln-confirm/ln-confirm.js +1 -1
  9. package/components/ln-core/helpers.js +1 -1
  10. package/components/ln-core/index.js +1 -1
  11. package/components/ln-core/lifecycle.js +41 -0
  12. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  13. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  14. package/components/ln-data-store/ln-data-store.js +1 -1
  15. package/components/ln-date/ln-date.js +1 -1
  16. package/components/ln-debug/ln-debug.js +1 -1
  17. package/components/ln-dropdown/ln-dropdown.js +1 -1
  18. package/components/ln-editor/ln-editor.js +1 -1
  19. package/components/ln-external-links/ln-external-links.js +1 -1
  20. package/components/ln-filter/ln-filter.js +1 -1
  21. package/components/ln-form/ln-form.js +1 -1
  22. package/components/ln-icon/ln-icon.js +1 -1
  23. package/components/ln-include/ln-include.js +1 -1
  24. package/components/ln-key/ln-key.js +1 -1
  25. package/components/ln-link/ln-link.js +1 -1
  26. package/components/ln-list/ln-list.js +1 -1
  27. package/components/ln-modal/ln-modal.js +1 -1
  28. package/components/ln-nav/ln-nav.js +1 -1
  29. package/components/ln-number/ln-number.js +1 -1
  30. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  31. package/components/ln-options/ln-options.js +1 -1
  32. package/components/ln-picklist/ln-picklist.js +1 -1
  33. package/components/ln-popover/ln-popover.js +1 -1
  34. package/components/ln-progress/ln-progress.js +1 -1
  35. package/components/ln-router/ln-router.js +1 -1
  36. package/components/ln-scroll/ln-scroll.js +1 -1
  37. package/components/ln-search/ln-search.js +1 -1
  38. package/components/ln-slug/ln-slug.js +1 -1
  39. package/components/ln-sort/ln-sort.js +1 -1
  40. package/components/ln-sort/src/ln-sort.js +13 -11
  41. package/components/ln-sortable/ln-sortable.js +1 -1
  42. package/components/ln-stat/ln-stat.js +1 -1
  43. package/components/ln-table/ln-table.js +1 -1
  44. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  45. package/components/ln-tabs/ln-tabs.js +1 -1
  46. package/components/ln-time/ln-time.js +1 -1
  47. package/components/ln-toast/ln-toast.js +1 -1
  48. package/components/ln-toggle/ln-toggle.js +1 -1
  49. package/components/ln-tooltip/ln-tooltip.js +1 -1
  50. package/components/ln-translations/ln-translations.js +1 -1
  51. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  52. package/components/ln-upload/ln-upload.js +1 -1
  53. package/components/ln-validate/ln-validate.js +1 -1
  54. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  55. package/package.json +1 -1
  56. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function nt(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function G(t){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return t?window.lnCore._debugIsContained(t):window.lnCore._debugSink!==null;if(t&&t.closest){const e=t.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===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 t=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let o=null;for(let d=1;d<e.length;d++)if(e[d]&&e[d].nodeType===1){o=e[d];break}if(!G(o))return}t.apply(console,e)}}function D(t,e,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,o),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))}function St(t,e,r){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const o={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};o[r]=t.name,D(t.dom,e,o)}function $(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){$(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function it(t){return t.hasAttribute("value")?t.getAttribute("value"):t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.textContent.trim()}function At(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function Et(t,e){const r=!!(e&&e.typed),o=e&&e.exclude,d={},u=t.elements,c={};if(r)for(let h=0;h<u.length;h++){const s=u[h];s.name&&s.type==="checkbox"&&!s.disabled&&(c[s.name]=(c[s.name]||0)+1)}for(let h=0;h<u.length;h++){const s=u[h];if(!(!s.name||s.disabled||s.type==="file"||s.type==="submit"||s.type==="button")&&!(o&&s.matches&&s.matches(o)))if(s.type==="checkbox")r&&c[s.name]===1?d[s.name]=s.checked:(d[s.name]||(d[s.name]=[]),s.checked&&d[s.name].push(s.value));else if(s.type==="radio")s.checked&&(d[s.name]=s.value);else if(s.type==="select-multiple"){d[s.name]=[];for(let _=0;_<s.options.length;_++)s.options[_].selected&&d[s.name].push(s.options[_].value)}else if(r&&s.type==="hidden")d[s.name]=s.value;else if(r&&(s.type==="number"||s.type==="range")){const _=Number(s.value);d[s.name]=s.value===""||isNaN(_)?null:_}else d[s.name]=s.value}return d}function Dt(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function kt(t,e){const r=t.elements,o=[],d={};for(let u=0;u<r.length;u++){const c=r[u];c.name&&c.type==="checkbox"&&(d[c.name]=(d[c.name]||0)+1)}for(let u=0;u<r.length;u++){const c=r[u];if(c.type==="file"||c.type==="submit"||c.type==="button")continue;const h=c.getAttribute("data-ln-fill-as")||c.name;if(!h||!(h in e))continue;const s=e[h];if(c.type==="checkbox"){if(Array.isArray(s))c.checked=s.indexOf(c.value)!==-1;else if(d[c.name]>1){const _=String(s).split(",").map(function(w){return w.trim()});c.checked=_.indexOf(c.value)!==-1}else c.checked=Dt(s);o.push(c)}else if(c.type==="radio")c.checked=c.value===String(s),o.push(c);else if(c.type==="select-multiple"){if(Array.isArray(s))for(let _=0;_<c.options.length;_++)c.options[_].selected=s.indexOf(c.options[_].value)!==-1;o.push(c)}else c.value=s,c.tagName==="SELECT"&&s!=null&&c.setAttribute("data-ln-value",s),o.push(c)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=kt,window.lnCore.serializeForm=Et,window.lnCore.resolveFormMethod=At);const lt={};function Lt(t,e){lt[t]=e}function xt(t){return lt[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Lt,window.lnCore.getDataMapper=xt);function rt(t){const e=t?t.closest("[lang]"):null,r=(e?e.getAttribute("lang")||e.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function It(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,$(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const st={};function Tt(t,e){if(!t||typeof e!="object")return;const r=t.toLowerCase().split("-")[0];st[r]=e}function Ft(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return st[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Tt,window.lnCore.getLocaleFallback=Ft,window.lnCore.ensureLocaleObserver=It);const P={};function ot(t,e){P[t]||(P[t]=document.querySelector('[data-ln-template="'+t+'"]'));const r=P[t];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function at(t,e,r){if(t){const o=t.querySelector('[data-ln-template="'+e+'"]');if(o)return o.content.cloneNode(!0)}return ot(e,r)}function K(t,e){if(!t||!e)return t;const r=t.querySelectorAll("[data-ln-field]");for(let c=0;c<r.length;c++){const h=r[c],s=h.getAttribute("data-ln-field");e[s]!=null&&(h.textContent=e[s])}const o=t.querySelectorAll("[data-ln-attr]");for(let c=0;c<o.length;c++){const h=o[c],s=h.getAttribute("data-ln-attr").split(",");for(let _=0;_<s.length;_++){const w=s[_].trim().split(":");if(w.length!==2)continue;const b=w[0].trim(),k=w[1].trim();e[k]!=null&&h.setAttribute(b,e[k])}}const d=t.querySelectorAll("[data-ln-show]");for(let c=0;c<d.length;c++){const h=d[c],s=h.getAttribute("data-ln-show");s in e&&h.classList.toggle("hidden",!e[s])}const u=t.querySelectorAll("[data-ln-class]");for(let c=0;c<u.length;c++){const h=u[c],s=h.getAttribute("data-ln-class").split(",");for(let _=0;_<s.length;_++){const w=s[_].trim().split(":");if(w.length!==2)continue;const b=w[0].trim(),k=w[1].trim();k in e&&h.classList.toggle(b,!!e[k])}}return t}function qt(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",t,e??null),t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const r=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],e??null),r[o].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)K(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function Q(t,e){if(!t||!e)return t;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,h){return e[h]!==void 0?e[h]:""}))}const o=function(u,c){return e[c]!==void 0?e[c]:""},d=Array.from(t.querySelectorAll("*"));t.nodeType===1&&d.push(t);for(let u=0;u<d.length;u++){const c=d[u],h=c.attributes;for(let s=0;s<h.length;s++){const _=h[s];_.value.indexOf("{{")!==-1&&c.setAttribute(_.name,_.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return t}function Rt(t,e,r,o,d,u){const c={};for(let s=0;s<t.children.length;s++){const _=t.children[s],w=_.getAttribute("data-ln-render-key");w&&(c[w]=_)}const h=document.createDocumentFragment();for(let s=0;s<e.length;s++){const _=e[s],w=String(o(_));let b=c[w];if(b)d(b,_,s);else{const k=ot(r,u);if(!k||(Q(k,_),b=k.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",w),d(b,_,s)}h.appendChild(b)}t.textContent="",t.appendChild(h)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=K,window.lnCore.lnFill=qt,window.lnCore.renderList=Rt);function U(t,e,r){const o=t.getAttribute(e);return o===null?r:o}function ct(t,e,r){const o=parseInt(t.getAttribute(e),10);return isNaN(o)?r:o}function Y(t,e,r=!1){const o=t.getAttribute(e);if(o===null)return!!r;const d=o.trim().toLowerCase();return!(d==="false"||d==="0")}function dt(t,e){return(t.getAttribute(e)||"").split(",").map(r=>r.trim()).filter(Boolean)}const J=new Map;function ut(t,e){const r=(t?t.join("|"):"")+"::"+e;if(J.has(r))return J.get(r);const o=new Set(t||[]),d=function(u,c){const h=u.getAttribute(c);return h!==null&&o.has(h)?h:e};return J.set(r,d),d}function ht(t,e,r){const o=parseFloat(t.getAttribute(e));return isNaN(o)?r:o}function ft(t,e,r){const o=t.getAttribute(e);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function _t(t,e,r,o,d){if(!t||e===null)return!0;const u=o||"ln-component",c=t.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||e===""&&t.fallback!==void 0)return!0;const h=s=>{d?console.warn(s,d):console.warn(s)};if(c==="boolean"){const s=e.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(h(`[${u}] Invalid value "${e}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const s=t.values||[];return s.includes(e)?!0:(h(`[${u}] Invalid value "${e}" for attribute "${r}". Allowed: ${s.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(e))return h(`[${u}] Invalid integer "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1;const s=parseInt(e,10);return t.min!==void 0&&s<t.min?(h(`[${u}] Value ${s} for attribute "${r}" is less than min (${t.min}).`),!1):t.max!==void 0&&s>t.max?(h(`[${u}] Value ${s} for attribute "${r}" is greater than max (${t.max}).`),!1):!0}if(c==="float")return isNaN(Number(e))?(h(`[${u}] Invalid float "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(e),!0}catch(s){return h(`[${u}] Invalid JSON for attribute "${r}": ${s.message}. Fallback: ${t.fallback}.`),!1}return!0}function pt(t,e,r){for(const o in r){const[d,u,c]=r[o];Object.defineProperty(t,o,{get:function(){return d(e,u,c)},enumerable:!0,configurable:!0})}return t}function gt(t){const e={};for(const r in t){const o=t[r];if(!o||!o.prop)continue;let d=o.read;if(!d&&o.type)switch(o.type){case"enum":d=ut(o.values,o.fallback);break;case"integer":d=ct;break;case"float":d=ht;break;case"boolean":d=Y;break;case"list":d=dt;break;case"json":d=ft;break;case"string":default:d=U;break}d||(d=U),e[o.prop]=[d,r,o.fallback]}return e}function Ot(t){const e={};for(const r in t){const o=t[r];o&&o.effect&&(e[r]=o.effect)}return Object.keys(e).length?e:null}function Mt(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const r in t.effects)e.add(r);if(t.onAttrChange&&t.declared)for(const r of t.declared)e.add(r);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pt,window.lnCore.attrSpec=gt,window.lnCore.attrStr=U,window.lnCore.attrInt=ct,window.lnCore.attrBool=Y,window.lnCore.attrList=dt,window.lnCore.attrEnum=ut,window.lnCore.attrFloat=ht,window.lnCore.attrJson=ft);function V(t,e){if(!t[e.attribute]){window.lnCore._persistSink&&t.hasAttribute&&t.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(t,e.selector);try{t[e.attribute]=new e.ComponentFn(t)}catch(r){console.error("["+e.attribute+"] init failed",t,r)}}}function mt(t,e,r,o){if(t.nodeType!==1)return;const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",c={selector:e,attribute:r,ComponentFn:o};if(t.matches&&t.matches(u)&&V(t,c),t.querySelectorAll){const h=t.querySelectorAll(u);for(let s=0;s<h.length;s++)V(h[s],c)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ht(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Nt(t){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(t):setTimeout(t,0)):t()}function wt(){window.lnCore=window.lnCore||{};const t=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return t.byReactive=t.byReactive||new Map,t.reactiveWildcard=t.reactiveWildcard||[],t}function Wt(t){const e=wt(),r=t.observed||[];for(let o=0;o<r.length;o++){const d=r[o];e.byAttr.has(d)||e.byAttr.set(d,[]),e.byAttr.get(d).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const o in t.attributes){e.byDeclaredAttr.has(o)||e.byDeclaredAttr.set(o,[]);const d=e.byDeclaredAttr.get(o);d.some(u=>u.componentTag===t.componentTag)||d.push({spec:t.attributes[o],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const o=Mt(t);if(o===null)e.reactiveWildcard.push(t);else for(const d of o)e.byReactive.has(d)||e.byReactive.set(d,[]),e.byReactive.get(d).push(t)}t.persist&&e.persist.push(t)}function bt(t,e,r,o){for(let d=0;d<t.length;d++){const u=t[d];if(!e[u.attribute])continue;const c=u.effects&&u.effects[r];c?c(e,r,o):u.onAttrChange&&(!u.declared||u.declared.has(r))&&u.onAttrChange(e,r,o)}}function zt(t){const e=t.attributeName,r=e.indexOf("data-ln-")===0,o=wt(),d=o.byAttr.get(e),u=nt()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(e);if(!r&&!d&&!u)return;const c=t.target;if(t.oldValue!==c.getAttribute(e)){if(u&&G(c)){const h=o.byDeclaredAttr.get(e),s=c.getAttribute(e);for(let _=0;_<h.length;_++)_t(h[_].spec,s,e,h[_].componentTag,c)}if(window.lnCore._debugSink&&(r||d)&&window.lnCore._debugSink("attr",e,c,{oldValue:t.oldValue,newValue:c.getAttribute(e)}),r){const h=o.byReactive.get(e);h&&bt(h,c,e,t.oldValue),o.reactiveWildcard.length&&bt(o.reactiveWildcard,c,e,t.oldValue)}if(d)for(let h=0;h<d.length;h++){const s=d[h];if(s.handler){s.handler(c,e,t.oldValue);continue}s.onAttributeChange&&c[s.attribute]?s.onAttributeChange(c,e):(mt(c,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(c))}}}function Bt(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++)try{zt(e[r])}catch(o){console.error("[ln-core] mutation handler failed",e[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function X(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Z(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function tt(t,e){if(!document.contains(t))if(e.attribute){const r=t[e.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+e.attribute+"] destroy failed",t,o)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function Ut(t){const e=X();if(!e.length)return;const r=t.target;if(r){const d=r.nodeType===1?r:r.parentElement;if(d&&(d.isContentEditable||d.closest&&d.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=Z();if(t.target&&o.length)for(let d=0;d<o.length;d++){const u=o[d],c=u.query,h=t.target.nodeType===1?t.target.matches&&t.target.matches(c)?t.target:t.target.closest?t.target.closest(c):null:t.target.parentElement&&t.target.parentElement.closest?t.target.parentElement.closest(c):null;h&&u.onSubtreeChange(h,t)}for(let d=0;d<t.addedNodes.length;d++){const u=t.addedNodes[d];if(u.nodeType===1){const c=!!(u.firstElementChild||u.children&&u.children.length);for(let h=0;h<e.length;h++){const s=e[h];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)u.matches&&u.matches(s.query)&&V(u,s);else if(u.matches&&u.matches(s.query)&&V(u,s),u.querySelectorAll){const _=u.querySelectorAll(s.query);for(let w=0;w<_.length;w++)V(_[w],s)}}s.onInit&&s.onInit(u)}}}for(let d=0;d<t.removedNodes.length;d++){const u=t.removedNodes[d];if(u.nodeType===1){const c=!!(u.firstElementChild||u.children&&u.children.length);for(let h=0;h<e.length;h++){const s=e[h],_=s.query;if(_){if(!c)u.matches&&u.matches(_)&&tt(u,s);else if(u.matches&&u.matches(_)&&tt(u,s),u.querySelectorAll){const w=u.querySelectorAll(_);for(let b=0;b<w.length;b++)tt(w[b],s)}}}}}}function yt(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++){const o=e[r];if(o.type==="childList")try{Ut(o)}catch(d){console.error("[ln-core] lifecycle handler failed",o.target,d)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Vt(t){X().push(t),t.onSubtreeChange&&t.query&&Z().push(t),yt()}function Ct(t,e,r,o,d={}){const u=d.extraAttributes||[],c=d.onAttributeChange||null,h=d.onSubtreeChange||null,s=d.onInit||null,_=d.onAttrChange||null,w=d.effects||null,b=d.attributes||null,k=b?Ot(b):w,F=b?new Set(Object.keys(b)):null,q=d.persist||null;function N(i){const l=i||document.body;if(mt(l,t,e,r),b&&nt())for(const a in b){const f=b[a],p=Array.from(l.querySelectorAll("["+a+"]"));l.matches&&l.matches("["+a+"]")&&p.push(l);for(let g=0;g<p.length;g++){const y=p[g];G(y)&&_t(f,y.getAttribute(a),a,o,y)}}s&&s(l)}const I=[];if(t.indexOf("[")!==-1){const i=/\[([\w-]+)/g;let l;for(;(l=i.exec(t))!==null;)I.push(l[1])}else I.push(t);Wt({selector:t,attribute:e,componentTag:o,attributes:b,ComponentFn:r,onInit:s,observed:I.concat(u),onAttributeChange:c,onAttrChange:_,effects:k,declared:F,persist:q}),Bt();const T=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,O=d.subtreeQuery||(T?t:"["+t+"]"),v={selector:t,attribute:e,ComponentFn:r,onInit:s,onSubtreeChange:h,query:O};X().push(v),h&&O&&Z().push(v),yt(),window[e]=N,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Ct,window.lnCore.observeLifecycle=Vt);function n(){Ht()>0?Nt(function(){N(document.body)}):N(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n(),N}function $t(t){let e=!1;for(let r=0;r<t.length;r++){const o=t[r];if(!(o===""||o==null)&&(e=!0,!Number.isFinite(Number(o))))return"string"}return e?"number":"string"}function jt(t,e,r,o){if(r==="number"){const c=parseFloat(t),h=parseFloat(e);return(isNaN(c)?0:c)-(isNaN(h)?0:h)}const d=t!=null?String(t):"",u=e!=null?String(e):"";return o?o.compare(d,u):d<u?-1:d>u?1:0}function Gt(t,e){let r=!1;return function(){r||(r=!0,queueMicrotask(function(){r=!1,t()}))}}function Pt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,r=t.pageSize>0?t.pageSize:200,o=t.threshold!=null?t.threshold:25,d=t.fetchDebounce!=null?t.fetchDebounce:120;const u=typeof t.requestPage=="function"?t.requestPage:function(){},c=typeof t.onChange=="function"?t.onChange:function(){},h=new Map,s=new Map,_=new Set;let w=0,b=0,k=0,F={sort:null,filters:{},search:""},q=null,N=0,I=0,T=!1;function O(l){s.set(l,++N)}function v(){return!!(F&&(F.search||F.filters&&Object.keys(F.filters).length))}function n(){if(h.size<=e)return;const l=Array.from(h.keys()).sort(function(f,p){return(s.get(f)||0)-(s.get(p)||0)});let a=0;for(;h.size>e&&a<l.length;)h.delete(l[a]),s.delete(l[a]),a++}function i(l,a){_.add(l),u(F,l,a)}return{get:function(l){return h.get(l)},has:function(l){return h.has(l)},peek:function(){return h.size?h.values().next().value:void 0},get logicalTotal(){return w},get grandTotal(){return b},get queryGen(){return k},get size(){return h.size},ensure:function(l,a){clearTimeout(q),I=l;for(let m=l;m<a;m++)h.has(m)&&O(m);if(w<=0)return;const f=Math.max(0,l-o),p=Math.min(w,a+o),g=Math.floor(f/r),y=Math.floor(Math.max(0,p-1)/r);let E=-1;for(let m=g;m<=y;m++){const C=m*r,L=Math.min(r,w-C);let W=!1;const z=Math.max(C,f),M=Math.min(C+L,p);for(let R=z;R<M;R++)if(!h.has(R)){W=!0;break}if(W&&!_.has(C)){E=C;break}}E!==-1&&(q=setTimeout(function(){i(E,r)},d))},ingest:function(l){if(l=l||{},l.queryGen!=null&&l.queryGen!==k)return!1;const a=l.offset||0,f=l.data||[];let p=0;for(let g=0;g<f.length;g++)f[g]!=null&&p++;if(p===0&&(l.provisional||l.filtered>0))return _.delete(a),!1;T&&(h.clear(),s.clear(),T=!1),l.provisional||(b=l.total!=null?l.total:b,w=l.filtered!=null?l.filtered:l.data?l.data.length:w);for(let g=0;g<f.length;g++)f[g]!=null&&(h.set(a+g,f[g]),O(a+g));return _.delete(a),n(),c(),!0},requestInitial:function(l){l&&(F=l),i(0,r)},invalidate:function(l){k++,_.clear(),clearTimeout(q),l&&(F=l),T=!0,i(0,r)},revalidate:function(){k++,_.clear(),clearTimeout(q),T=!0;const l=Math.max(0,Math.floor(I/r)*r);i(l,r)},release:function(l){_.delete(l)},destroy:function(){clearTimeout(q),h.clear(),s.clear(),_.clear()},configure:function(l){l=l||{};let a=!1;if(l.windowSize!=null&&l.windowSize>0&&l.windowSize!==e){const f=l.windowSize<e;e=l.windowSize,f&&n(),a=!0}l.pageSize!=null&&l.pageSize>0&&(r=l.pageSize),l.threshold!=null&&l.threshold>=0&&(o=l.threshold),l.fetchDebounce!=null&&l.fetchDebounce>=0&&(d=l.fetchDebounce),a&&c()},setGrandTotal:function(l){l==null||isNaN(l)||l<0||(b=l,v()||(w=l),c())}}}function vt(t){return(t||"").replace(/^#/,"")}function et(t){const e=t===void 0?location.hash:t,r={},o=vt(e);if(!o)return r;const d=o.split("&");for(let u=0;u<d.length;u++){const c=d[u];if(!c)continue;const h=c.indexOf(":"),s=h>-1?c.slice(0,h):c,_=h>-1?c.slice(h+1):"";if(s)try{r[s]=decodeURIComponent(_)}catch{r[s]=_}}return r}function Kt(t){if(!t)return null;const e=et();return t in e?e[t]:null}function Qt(t,e){if(!t)return;const r=et();e==null?delete r[t]:r[t]=String(e);const d=Object.keys(r).map(function(u){const c=r[u];return c===""?u:u+":"+encodeURIComponent(c)}).join("&");vt(location.hash)!==d&&(location.hash=d)}function Yt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function Jt(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const r=t.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const o=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return o?e?o+"-"+e:o:e||null}function Xt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Zt(t){return!t||typeof t!="string"?null:t.endsWith(".asc")?{fieldOrColumn:t.slice(0,-4),direction:"asc"}:t.endsWith(".desc")?{fieldOrColumn:t.slice(0,-5),direction:"desc"}:null}function te(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function ee(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const r=t.slice(0,e),o=t.slice(e+1),d=o?o.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:d}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=et,window.lnCore.hashGet=Kt,window.lnCore.hashSet=Qt,window.lnCore.hashLinkClick=Yt,window.lnCore.resolveHashNamespace=Jt,window.lnCore.hashSortEncode=Xt,window.lnCore.hashSortDecode=Zt,window.lnCore.hashFilterEncode=te,window.lnCore.hashFilterDecode=ee);function ne(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=ne),(function(){const t="data-ln-list",e="lnList",r="data-ln-list-empty";if(window[e]!==void 0)return;function s(n,i){if(!n||!n.isDataDriven)return;const l=n.dom.hasAttribute("data-ln-list-window");if(l&&!n._windowed)n._enterWindowedMode(),n._kickWindowInitial();else if(!l&&n._windowed)n._exitWindowedMode();else if(l&&n._windowed){const a=parseInt(i,10);a>0&&n._cache.configure({windowSize:a})}}function _(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>0&&n._cache.configure({pageSize:l})}function w(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.configure({threshold:l})}function b(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.setGrandTotal(l)}const k={"data-ln-list":{prop:"name",type:"string",read:U,fallback:"",description:"List instance name or identifier"},"data-ln-list-source":{prop:"source",type:"string",read:U,fallback:"",description:"Source store or coordinator addressing"},"data-ln-list-selectable":{prop:"_selectable",type:"boolean",read:Y,description:"Enables item selection controls"},"data-ln-list-window":{type:"integer",fallback:1e3,min:10,effect:s,description:"Virtual scrolling window size in items"},"data-ln-list-window-page":{type:"integer",fallback:200,min:5,effect:_,description:"Virtual scrolling slice page size"},"data-ln-list-window-threshold":{type:"integer",fallback:50,min:0,effect:w,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-list-count":{type:"integer",min:0,effect:b,description:"Total item count override for virtual scrollbar calculation"},"data-ln-list-empty":{type:"marker",description:"Container for list empty state"},"data-ln-list-field":{type:"string",description:"Field name mapping for list item binding"}},F=gt(k);function q(n,i){if(n==null||isNaN(n))return"";try{return new Intl.NumberFormat(rt(i)).format(n)}catch{return String(n)}}function N(n){let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const a=getComputedStyle(i).overflowY;if(a==="auto"||a==="scroll")return i;i=i.parentElement}return null}function I(n){const i=n._scrollContainer||N(n.dom);return{container:i,top:i?i.scrollTop:window.scrollY}}function T(n){n.container?n.container.scrollTop=n.top:window.scrollTo(window.scrollX,n.top)}function O(n){if(!n)return 0;const i=getComputedStyle(n),l=parseFloat(i.marginTop)||0,a=parseFloat(i.marginBottom)||0;return n.offsetHeight+l+a}function v(n){this.dom=n,pt(this,n,F),this.tbody=n.querySelector("[data-ln-list-body]")||n,this.isDataDriven=n.hasAttribute("data-ln-list-source"),this._totalSpan=n.querySelector("[data-ln-list-total]"),this._filteredSpan=n.querySelector("[data-ln-list-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==n?this._filteredSpan.parentElement:null),this._selectedSpan=n.querySelector("[data-ln-list-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==n?this._selectedSpan.parentElement:null),this._data=[],this._filteredData=[],this.selectedIds=new Set,this._searchTerm="",this._filters={},this._sortField=null,this._sortDir=null,this._virtual=!1,this._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._resizeHandler=null,this._scrollContainer=null,this.isUl=this.tbody.tagName==="UL"||this.tbody.tagName==="OL";const i=this;return this._onSetSearch=function(l){const a=(l.detail&&l.detail.query!=null?l.detail.query:l.detail&&l.detail.term!=null?l.detail.term:"").trim();i.isDataDriven?(i.currentSearch=a,D(n,"ln-list:search",{list:i.name,query:i.currentSearch}),i._requestData()):(i._searchTerm=a.toLowerCase(),i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list:set-search",this._onSetSearch),this._onSearchChange=function(l){l.preventDefault(),i._onSetSearch(l)},n.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){i.isDataDriven?(i.currentFilters={},i.currentSearch="",D(n,"ln-list:clear-filters",{list:i.name}),i._requestData()):(i._searchTerm="",i._filters={},i._sortField=null,i._sortDir=null,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:"",matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list:request-clear-filters",this._onRequestClearFilters),this._selectableActive=!1,this._selectable&&this._enableSelection(),this.isDataDriven?(this.isLoaded=!1,this.totalCount=0,this.visibleCount=0,this.currentSort=null,this.currentFilters={},this.currentSearch="",this._lastTotal=0,this._lastFiltered=0,this._hasInitialSeed=!1,this._windowed=!1,this._cache=null,n.hasAttribute("data-ln-list-window")&&this._enterWindowedMode(),this._onSetData=function(l){const a=l.detail||{},f=a.data||[],p=a.total!=null?a.total:f.length;if(!(i._hasInitialSeed&&!i.isLoaded&&f.length===0&&p===0)){if(i._windowed){i._cache.ingest(a)&&!a.provisional&&n.classList.remove("ln-list--loading");return}i._data=f,i._lastTotal=p,i._lastFiltered=a.filtered!=null?a.filtered:i._data.length,i.totalCount=i._lastTotal,i.visibleCount=i._lastFiltered,i.isLoaded=!0,i._hasInitialSeed=!1,n.classList.remove("ln-list--loading"),i._vStart=-1,i._vEnd=-1,i._applyFilterAndSort(),i._render(),i._updateFooter(),D(n,"ln-list:rendered",{list:i.name,total:i.totalCount,visible:i.visibleCount})}},n.addEventListener("ln-list:set-data",this._onSetData),this._onSetLoading=function(l){const a=l.detail&&l.detail.loading;n.classList.toggle("ln-list--loading",!!a),a&&(i.isLoaded=!1)},n.addEventListener("ln-list:set-loading",this._onSetLoading),this._onPageFailed=function(l){!i._windowed||!i._cache||i._cache.release(l.detail&&l.detail.offset)},n.addEventListener("ln-list:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!i._windowed||!i._cache||i._cache.revalidate()},n.addEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(){!i._windowed||!i._cache||i._requestData()},n.addEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this._onSort=function(l){!l.detail||l.detail.field==null||(l.preventDefault(),i.currentSort=l.detail.direction==="none"?null:{field:l.detail.field,direction:l.detail.direction},i._requestData())},n.addEventListener("ln-sort:change",this._onSort),this._onItemClick=function(l){if(l.target.closest("[data-ln-item-select]")||l.target.closest("[data-ln-item-action]")||l.target.closest("a")||l.target.closest("button")||l.ctrlKey||l.metaKey||l.button===1)return;const a=l.target.closest("[data-ln-item]");if(!a)return;const f=a.getAttribute("data-ln-item-id"),p=a._lnRecord||{};D(n,"ln-list:item-click",{list:i.name,id:f,record:p})},this.tbody&&this.tbody.addEventListener("click",this._onItemClick),this._onItemAction=function(l){const a=l.target.closest("[data-ln-item-action]");if(!a)return;const f=a.closest("[data-ln-item]");if(!f)return;const p=a.getAttribute("data-ln-item-action"),g=f.getAttribute("data-ln-item-id"),y=f._lnRecord||{};D(n,"ln-list:item-action",{list:i.name,id:g,action:p,record:y})},this.tbody&&this.tbody.addEventListener("click",this._onItemAction),this.tbody&&this.tbody.children.length>0&&this._parseChildren(),this._windowed?this._kickWindowInitial():D(n,"ln-list:request-data",{list:this.name,sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})):(this._emptyObserver=null,this.tbody&&this.tbody.children.length>0?this._parseChildren():this.tbody&&(this._emptyObserver=new MutationObserver(function(){i.tbody.children.length>0&&(i._emptyObserver.disconnect(),i._emptyObserver=null,i._parseChildren())}),this._emptyObserver.observe(this.tbody,{childList:!0})),this._onFilterChange=function(l){if(l.preventDefault(),!l.detail)return;const a=l.detail.key,f=l.detail.values||[];if(a){if(f.length===0)delete i._filters[a];else{const p=[];for(let g=0;g<f.length;g++)p.push(f[g].toLowerCase());i._filters[a]=p}i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length})}},n.addEventListener("ln-filter:change",this._onFilterChange),this._onSort=function(l){if(!l.detail||l.detail.field==null)return;l.preventDefault();const a=l.detail.direction==="none"?null:l.detail.direction;i._sortField=a===null?null:l.detail.field,i._sortDir=a,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:sorted",{field:i._sortField,direction:l.detail&&l.detail.direction,matched:i._filteredData.length,total:i._data.length})},n.addEventListener("ln-sort:change",this._onSort)),this}v.prototype._parseChildren=function(){const n=Array.from(this.tbody.children).filter(i=>!i.classList.contains("ln-list__spacer"));this._data=[],n.length>0&&(this._itemHeight=O(n[0])||50);for(let i=0;i<n.length;i++){const l=n[i],a=l.getAttribute("data-ln-item-id")||l.getAttribute("id"),f=l.textContent.trim().toLowerCase();let p=null;if(this.isDataDriven){p={},a!=null&&(p.id=a);const E=l.querySelectorAll("[data-ln-list-field]");for(let m=0;m<E.length;m++){const C=E[m],L=C.getAttribute("data-ln-list-field");L&&(p[L]=it(C))}}const g={},y=l.querySelectorAll("[data-ln-list-field], [data-ln-field]");for(let E=0;E<y.length;E++){const m=y[E],C=m.getAttribute("data-ln-list-field")||m.getAttribute("data-ln-field");C&&(g[C]=it(m))}for(let E=0;E<l.attributes.length;E++){const m=l.attributes[E];if(m.name.startsWith("data-")&&!m.name.startsWith("data-ln-")){const C=m.name.slice(5);C&&(g[C]=m.value)}}this._data.push({html:l.outerHTML,id:a,searchText:f,fields:g,...p||{}})}this._filteredData=this._data.slice(),this._data.length>0&&(this._hasInitialSeed=!0),this.isDataDriven&&(this._lastTotal=this._data.length,this._lastFiltered=this._data.length,this.totalCount=this._data.length,this.visibleCount=this._data.length,this._updateFooter()),this._render(),D(this.dom,"ln-list:ready",{total:this._data.length})},v.prototype._applyFilterAndSort=function(){if(this.isDataDriven)this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length;else{const n=this._searchTerm,i=n?n.split(/\s+/).filter(Boolean):[],l=this._filters||{},a=Object.keys(l).length>0;if(i.length===0&&!a?this._filteredData=this._data.slice():this._filteredData=this._data.filter(function(f){if(i.length>0&&!i.every(function(g){return f.searchText&&f.searchText.indexOf(g)!==-1}))return!1;if(a)for(const p in l){const g=l[p];if(g&&g.length>0){const y=f.fields&&f.fields[p]!==void 0?f.fields[p]:f[p]!==void 0?f[p]:null,E=y!=null?String(y).toLowerCase():"";if(g.indexOf(E)===-1)return!1}}return!0}),this._sortField&&this._sortDir){const f=this._sortField,p=this._sortDir==="desc"?-1:1,g=typeof Intl<"u"?new Intl.Collator(rt(this.dom),{sensitivity:"base"}):null,y=this._filteredData.map(function(m){return m.fields&&m.fields[f]!==void 0?m.fields[f]:m[f]}),E=$t(y);this._filteredData.sort(function(m,C){const L=m.fields&&m.fields[f]!==void 0?m.fields[f]:m[f],W=C.fields&&C.fields[f]!==void 0?C.fields[f]:C[f];return jt(L,W,E,g)*p})}}},v.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const n=this._lastTotal,i=this.visibleCount;if(n===0||this._filteredData.length===0||i===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const n=this._filteredData.length;n===0&&(this._searchTerm||Object.keys(this._filters||{}).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):n>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},v.prototype._renderAll=function(){if(this.isDataDriven){const n=this._filteredData,i=document.createDocumentFragment();for(let a=0;a<n.length;a++){const f=this._buildItem(n[a]);f&&i.appendChild(f)}const l=I(this);this.tbody.replaceChildren(i),T(l),this._selectable&&this._updateSelectAll()}else{const n=[],i=this._filteredData;for(let a=0;a<i.length;a++)n.push(i[a].html);const l=I(this);this.tbody.innerHTML=n.join(""),T(l),this._selectable&&this._restoreSelection()}},v.prototype._readGridLayout=function(){const n=getComputedStyle(this.tbody),i=n.gridTemplateColumns;let l=1;if(i&&i!=="none"){const f=i.trim().split(/\s+/).filter(Boolean);f.length>0&&(l=f.length)}const a=parseFloat(n.rowGap);return{columns:l,rowGap:isNaN(a)?0:a}},v.prototype._measureItemHeight=function(){if(this._windowed){const n=this._cache.peek(),i=n?this._buildItem(n):this._buildPlaceholderItem();i&&(this.tbody.textContent="",this.tbody.appendChild(i),this._itemHeight=O(i)||50,this.tbody.textContent="")}else if(this.isDataDriven){if(this._data.length>0){const n=this._buildItem(this._data[0]);n&&(this.tbody.textContent="",this.tbody.appendChild(n),this._itemHeight=O(n)||50,this.tbody.textContent="")}}else{const n=this.tbody.children;n.length>0&&(this._itemHeight=O(n[0])||50)}},v.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const n=this;this._itemHeight||this._measureItemHeight(),this._scrollContainer=N(this.dom);const i=this._scrollContainer||window;this._scrollHandler=function(){n._rafId||(n._rafId=requestAnimationFrame(function(){n._rafId=null,n._windowed?n._renderWindowed():n._renderVirtual()}))},this._resizeRafId=null,this._resizeHandler=function(){n._resizeRafId||(n._resizeRafId=requestAnimationFrame(function(){n._resizeRafId=null,n._itemHeight=0,n._measureItemHeight(),n._vStart=-1,n._vEnd=-1,n._windowed?n._renderWindowed():n._renderVirtual()}))},i.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._resizeHandler,{passive:!0})},v.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._resizeRafId&&(cancelAnimationFrame(this._resizeRafId),this._resizeRafId=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},v.prototype._renderVirtual=function(){const n=this._filteredData,i=n.length,l=this._itemHeight;if(!l||!i)return;const a=this._scrollContainer;let f,p;if(a){const x=this.tbody.getBoundingClientRect(),A=a.getBoundingClientRect(),S=a===this.tbody?0:x.top-A.top+a.scrollTop;f=a.scrollTop-S,p=a.clientHeight}else{const A=this.tbody.getBoundingClientRect().top+window.scrollY;f=window.scrollY-A,p=window.innerHeight}const g=this._readGridLayout(),y=g.columns,E=g.rowGap,m=l+E,C=Math.ceil(i/y);let L=Math.max(0,Math.floor(f/m)-15);L=Math.min(L,C);const W=Math.ceil(p/m)+30,z=Math.min(L+W,C),M=Math.min(L*y,i),R=Math.min(z*y,i);if(M===this._vStart&&R===this._vEnd)return;this._vStart=M,this._vEnd=R;const B=L*m,H=(C-z)*m;if(this.isDataDriven){const x=document.createDocumentFragment();if(B>0){const S=document.createElement(this.isUl?"li":"div");S.className="ln-list__spacer",S.setAttribute("aria-hidden","true"),S.style.height=B+"px",x.appendChild(S)}for(let S=M;S<R;S++){const j=this._buildItem(n[S]);j&&x.appendChild(j)}if(H>0){const S=document.createElement(this.isUl?"li":"div");S.className="ln-list__spacer",S.setAttribute("aria-hidden","true"),S.style.height=H+"px",x.appendChild(S)}const A=I(this);this.tbody.replaceChildren(x),T(A),this._selectable&&this._updateSelectAll()}else{let x="";B>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${B}px"></${this.isUl?"li":"div"}>`);for(let S=M;S<R;S++)x+=n[S].html;H>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${H}px"></${this.isUl?"li":"div"}>`);const A=I(this);this.tbody.innerHTML=x,T(A),this._selectable&&this._restoreSelection()}},v.prototype._buildPlaceholderItem=function(){const n=document.createElement(this.isUl?"li":"div");return n.className="ln-list__placeholder",n.setAttribute("aria-hidden","true"),n.style.height=this._itemHeight+"px",n},v.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const n=this._itemHeight;if(!n)return;const i=this._scrollContainer;let l,a;if(i){const A=this.tbody.getBoundingClientRect(),S=i.getBoundingClientRect(),j=i===this.tbody?0:A.top-S.top+i.scrollTop;l=i.scrollTop-j,a=i.clientHeight}else{const S=this.tbody.getBoundingClientRect().top+window.scrollY;l=window.scrollY-S,a=window.innerHeight}const f=this._readGridLayout(),p=f.columns,g=f.rowGap,y=n+g,E=this._cache.logicalTotal,m=Math.ceil(E/p);let C=Math.max(0,Math.floor(l/y)-15);C=Math.min(C,m);const L=Math.ceil(a/y)+30,W=Math.min(C+L,m),z=Math.min(C*p,E),M=Math.min(W*p,E),R=C*y,B=(m-W)*y,H=document.createDocumentFragment();if(R>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=R+"px",H.appendChild(A)}for(let A=z;A<M;A++)if(this._cache.has(A)){const S=this._buildItem(this._cache.get(A));S&&H.appendChild(S)}else H.appendChild(this._buildPlaceholderItem());if(B>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=B+"px",H.appendChild(A)}const x=I(this);this.tbody.replaceChildren(H),T(x),this._vStart=z,this._vEnd=M,this._cache.ensure(z,M)},v.prototype._showEmptyState=function(){let n=null;if(this.isDataDriven){const i=this._lastTotal!=null?this._lastTotal:this._data.length,a=this.visibleCount===0&&i>0,f=a?this.name+"-empty-filtered":this.name+"-empty";if(n=at(this.dom,f,"ln-list"),!n){const p=this.dom.querySelector("template[data-ln-empty], template[data-ln-list-empty]");if(p){const g=a?"search":"initial",y=p.content.querySelector(`[data-ln-empty-when="${g}"]`)||p.content.firstElementChild;y&&(n=document.importNode(y,!0))}}}else{const i=this.dom.querySelector(`template[${r}]`);if(i){const l=i.content.firstElementChild;l&&(n=document.importNode(l,!0))}}if(n)if(n.tagName==="LI"||n.tagName==="TR")this.tbody.replaceChildren(n);else{const i=document.createElement(this.isUl?"li":"div");i.appendChild(n),this.tbody.replaceChildren(i)}else this.tbody.replaceChildren();D(this.dom,"ln-list:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},v.prototype._buildItem=function(n){let i=at(this.dom,this.name+"-row","ln-list");if(!i){const a=this.dom.querySelector("template[data-ln-item]");a&&(i=document.importNode(a.content,!0))}let l=i?i.querySelector("[data-ln-item]")||i.firstElementChild:null;if(l)Q(l,n),K(l,n);else if(n&&n.html){const a=document.createElement(this.isUl?"ul":"div");a.innerHTML=n.html,l=a.firstElementChild}else if(l=document.createElement(this.isUl?"li":"div"),l.setAttribute("data-ln-item",""),n&&typeof n=="object"){for(const a in n)if(a!=="html"&&n[a]!=null){const f=document.createElement("span");f.setAttribute("data-ln-field",a),f.textContent=String(n[a]),l.appendChild(f)}}if(l._lnRecord=n,n&&n.id!=null&&(l.setAttribute("data-ln-item-id",n.id),this._selectable&&this.selectedIds.has(String(n.id)))){l.classList.add("ln-item-selected");const a=l.querySelector("[data-ln-item-select]");a&&(a.checked=!0)}return l},v.prototype._restoreSelection=function(){if(!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-item]");for(let i=0;i<n.length;i++){const l=n[i].getAttribute("data-ln-item-id"),a=l!=null&&this.selectedIds.has(String(l));n[i].classList.toggle("ln-item-selected",a);const f=n[i].querySelector("[data-ln-item-select]");f&&(f.checked=a)}this._updateSelectAll()},v.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const n=this;this._onSelectionChange=function(i){const l=i.target.closest("[data-ln-item-select]");if(!l)return;const a=l.closest("[data-ln-item]");if(!a)return;const f=a.getAttribute("data-ln-item-id");f!=null&&(l.checked?(n.selectedIds.add(String(f)),a.classList.add("ln-item-selected")):(n.selectedIds.delete(String(f)),a.classList.remove("ln-item-selected")),n._updateSelectAll(),n._updateFooter(),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}))},this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector("[data-ln-list-select-all]"),this._selectAllCheckbox&&(this._onSelectAll=function(){const i=n._selectAllCheckbox.checked,l=n.tbody.querySelectorAll("[data-ln-item]");for(let a=0;a<l.length;a++){const f=l[a],p=f.getAttribute("data-ln-item-id"),g=f.querySelector("[data-ln-item-select]");p!=null&&(i?(n.selectedIds.add(String(p)),f.classList.add("ln-item-selected")):(n.selectedIds.delete(String(p)),f.classList.remove("ln-item-selected")),g&&(g.checked=i))}D(n.dom,"ln-list:select-all",{list:n.name,selected:i}),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}),n._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll))},v.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox)return;const n=this.tbody.querySelectorAll("[data-ln-item]");let i=n.length>0;for(let l=0;l<n.length;l++){const a=n[l].getAttribute("data-ln-item-id");if(a!=null&&!this.selectedIds.has(String(a))){i=!1;break}}this._selectAllCheckbox.checked=i},v.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-list--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}St(this,"ln-list:request-data","list")},v.prototype._enterWindowedMode=function(){const n=this,i=this.dom,l=parseInt(i.getAttribute("data-ln-list-window"),10),a=parseInt(i.getAttribute("data-ln-list-window-page"),10),f=parseInt(i.getAttribute("data-ln-list-window-threshold"),10);this._onCacheChange=function(){!n._windowed||!n._cache||(n.totalCount=n._cache.grandTotal,n.visibleCount=n._cache.logicalTotal,n._lastTotal=n._cache.grandTotal,n.isLoaded=!0,n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),D(i,"ln-list:rendered",{list:n.name,total:n.totalCount,visible:n.visibleCount}))},this._renderBatch=Gt(this._onCacheChange),this._cache=Pt({windowSize:l>0?l:1e3,pageSize:a>0?a:200,threshold:f>=0?f:25,fetchDebounce:120,requestPage:function(p,g,y){D(i,"ln-list:request-data",{list:n.name,sort:p.sort,filters:p.filters,search:p.search,offset:g,limit:y,queryGen:n._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},v.prototype._kickWindowInitial=function(){if(this._data.length>0){const n=parseInt(this.dom.getAttribute("data-ln-list-count"),10),i=n>0?n:this._data.length;this._cache.ingest({data:this._data,offset:0,total:i,filtered:i})}else this.dom.classList.add("ln-list--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},v.prototype._exitWindowedMode=function(){this._disableVirtualScroll(),this._cache&&this._cache.destroy(),this._cache=null,this._windowed=!1,this._renderBatch=null,this._onCacheChange=null,this._selectAllCheckbox&&this._selectAllCheckbox.classList.remove("hidden"),this._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-list--loading"),this._requestData()},v.prototype._updateFooter=function(){let n=0,i=0;this.isDataDriven?(n=this._lastTotal!=null?this._lastTotal:this._data.length,i=this.visibleCount):(n=this._data.length,i=this._filteredData.length);const l=i<n;if(this._totalSpan&&(this._totalSpan.textContent=q(n,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=l?q(i,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!l),this._selectedSpan){const a=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=a>0?q(a,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",a===0)}},v.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-list:set-search",this._onSetSearch),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-list:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this._cache&&this._cache.destroy(),this.dom.removeEventListener("ln-list:set-data",this._onSetData),this.dom.removeEventListener("ln-list:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-list:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onItemClick),this.tbody.removeEventListener("click",this._onItemAction))):(this._emptyObserver&&(this._emptyObserver.disconnect(),this._emptyObserver=null),this._onFilterChange&&this.dom.removeEventListener("ln-filter:change",this._onFilterChange),this._onSort&&this.dom.removeEventListener("ln-sort:change",this._onSort)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._data=[],this._filteredData=[],delete this.dom[e])},Ct(t,e,v,"ln-list",{attributes:k})})()})();
1
+ (function(){"use strict";function nt(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function G(t){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return t?window.lnCore._debugIsContained(t):window.lnCore._debugSink!==null;if(t&&t.closest){const e=t.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===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 t=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let o=null;for(let c=1;c<e.length;c++)if(e[c]&&e[c].nodeType===1){o=e[c];break}if(!G(o))return}t.apply(console,e)}}function D(t,e,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,o),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))}function At(t,e,r){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const o={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};o[r]=t.name,D(t.dom,e,o)}function $(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){$(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function it(t){return t.hasAttribute("value")?t.getAttribute("value"):t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.textContent.trim()}function Et(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function Dt(t,e){const r=!!(e&&e.typed),o=e&&e.exclude,c={},u=t.elements,d={};if(r)for(let h=0;h<u.length;h++){const s=u[h];s.name&&s.type==="checkbox"&&!s.disabled&&(d[s.name]=(d[s.name]||0)+1)}for(let h=0;h<u.length;h++){const s=u[h];if(!(!s.name||s.disabled||s.type==="file"||s.type==="submit"||s.type==="button")&&!(o&&s.matches&&s.matches(o)))if(s.type==="checkbox")r&&d[s.name]===1?c[s.name]=s.checked:(c[s.name]||(c[s.name]=[]),s.checked&&c[s.name].push(s.value));else if(s.type==="radio")s.checked&&(c[s.name]=s.value);else if(s.type==="select-multiple"){c[s.name]=[];for(let _=0;_<s.options.length;_++)s.options[_].selected&&c[s.name].push(s.options[_].value)}else if(r&&s.type==="hidden")c[s.name]=s.value;else if(r&&(s.type==="number"||s.type==="range")){const _=Number(s.value);c[s.name]=s.value===""||isNaN(_)?null:_}else c[s.name]=s.value}return c}function Lt(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function kt(t,e){const r=t.elements,o=[],c={};for(let u=0;u<r.length;u++){const d=r[u];d.name&&d.type==="checkbox"&&(c[d.name]=(c[d.name]||0)+1)}for(let u=0;u<r.length;u++){const d=r[u];if(d.type==="file"||d.type==="submit"||d.type==="button")continue;const h=d.getAttribute("data-ln-fill-as")||d.name;if(!h||!(h in e))continue;const s=e[h];if(d.type==="checkbox"){if(Array.isArray(s))d.checked=s.indexOf(d.value)!==-1;else if(c[d.name]>1){const _=String(s).split(",").map(function(m){return m.trim()});d.checked=_.indexOf(d.value)!==-1}else d.checked=Lt(s);o.push(d)}else if(d.type==="radio")d.checked=d.value===String(s),o.push(d);else if(d.type==="select-multiple"){if(Array.isArray(s))for(let _=0;_<d.options.length;_++)d.options[_].selected=s.indexOf(d.options[_].value)!==-1;o.push(d)}else d.value=s,d.tagName==="SELECT"&&s!=null&&d.setAttribute("data-ln-value",s),o.push(d)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=kt,window.lnCore.serializeForm=Dt,window.lnCore.resolveFormMethod=Et);const lt={};function xt(t,e){lt[t]=e}function It(t){return lt[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=xt,window.lnCore.getDataMapper=It);function rt(t){const e=t?t.closest("[lang]"):null,r=(e?e.getAttribute("lang")||e.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function Tt(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,$(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const st={};function Ft(t,e){if(!t||typeof e!="object")return;const r=t.toLowerCase().split("-")[0];st[r]=e}function qt(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return st[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ft,window.lnCore.getLocaleFallback=qt,window.lnCore.ensureLocaleObserver=Tt);const P={};function ot(t,e){P[t]||(P[t]=document.querySelector('[data-ln-template="'+t+'"]'));const r=P[t];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function at(t,e,r){if(t){const o=t.querySelector('[data-ln-template="'+e+'"]');if(o)return o.content.cloneNode(!0)}return ot(e,r)}function K(t,e){if(!t||!e)return t;const r=t.querySelectorAll("[data-ln-field]");for(let d=0;d<r.length;d++){const h=r[d],s=h.getAttribute("data-ln-field");e[s]!=null&&(h.textContent=e[s])}const o=t.querySelectorAll("[data-ln-attr]");for(let d=0;d<o.length;d++){const h=o[d],s=h.getAttribute("data-ln-attr").split(",");for(let _=0;_<s.length;_++){const m=s[_].trim().split(":");if(m.length!==2)continue;const b=m[0].trim(),L=m[1].trim();e[L]!=null&&h.setAttribute(b,e[L])}}const c=t.querySelectorAll("[data-ln-show]");for(let d=0;d<c.length;d++){const h=c[d],s=h.getAttribute("data-ln-show");s in e&&h.classList.toggle("hidden",!e[s])}const u=t.querySelectorAll("[data-ln-class]");for(let d=0;d<u.length;d++){const h=u[d],s=h.getAttribute("data-ln-class").split(",");for(let _=0;_<s.length;_++){const m=s[_].trim().split(":");if(m.length!==2)continue;const b=m[0].trim(),L=m[1].trim();L in e&&h.classList.toggle(b,!!e[L])}}return t}function Rt(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",t,e??null),t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const r=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],e??null),r[o].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)K(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function Q(t,e){if(!t||!e)return t;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(d,h){return e[h]!==void 0?e[h]:""}))}const o=function(u,d){return e[d]!==void 0?e[d]:""},c=Array.from(t.querySelectorAll("*"));t.nodeType===1&&c.push(t);for(let u=0;u<c.length;u++){const d=c[u],h=d.attributes;for(let s=0;s<h.length;s++){const _=h[s];_.value.indexOf("{{")!==-1&&d.setAttribute(_.name,_.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return t}function Ot(t,e,r,o,c,u){const d={};for(let s=0;s<t.children.length;s++){const _=t.children[s],m=_.getAttribute("data-ln-render-key");m&&(d[m]=_)}const h=document.createDocumentFragment();for(let s=0;s<e.length;s++){const _=e[s],m=String(o(_));let b=d[m];if(b)c(b,_,s);else{const L=ot(r,u);if(!L||(Q(L,_),b=L.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",m),c(b,_,s)}h.appendChild(b)}t.textContent="",t.appendChild(h)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=K,window.lnCore.lnFill=Rt,window.lnCore.renderList=Ot);function U(t,e,r){const o=t.getAttribute(e);return o===null?r:o}function ct(t,e,r){const o=parseInt(t.getAttribute(e),10);return isNaN(o)?r:o}function Y(t,e,r=!1){const o=t.getAttribute(e);if(o===null)return!!r;const c=o.trim().toLowerCase();return!(c==="false"||c==="0")}function dt(t,e){return(t.getAttribute(e)||"").split(",").map(r=>r.trim()).filter(Boolean)}const J=new Map;function ut(t,e){const r=(t?t.join("|"):"")+"::"+e;if(J.has(r))return J.get(r);const o=new Set(t||[]),c=function(u,d){const h=u.getAttribute(d);return h!==null&&o.has(h)?h:e};return J.set(r,c),c}function ht(t,e,r){const o=parseFloat(t.getAttribute(e));return isNaN(o)?r:o}function ft(t,e,r){const o=t.getAttribute(e);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function _t(t,e,r,o,c){if(!t||e===null)return!0;const u=o||"ln-component",d=t.type;if(d==="trigger"||d==="marker"||d==="string"||d==="list"||!d||e===""&&t.fallback!==void 0)return!0;const h=s=>{c?console.warn(s,c):console.warn(s)};if(d==="boolean"){const s=e.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(h(`[${u}] Invalid value "${e}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(d==="enum"){const s=t.values||[];return s.includes(e)?!0:(h(`[${u}] Invalid value "${e}" for attribute "${r}". Allowed: ${s.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(d==="integer"){if(!/^-?\d+$/.test(e))return h(`[${u}] Invalid integer "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1;const s=parseInt(e,10);return t.min!==void 0&&s<t.min?(h(`[${u}] Value ${s} for attribute "${r}" is less than min (${t.min}).`),!1):t.max!==void 0&&s>t.max?(h(`[${u}] Value ${s} for attribute "${r}" is greater than max (${t.max}).`),!1):!0}if(d==="float")return isNaN(Number(e))?(h(`[${u}] Invalid float "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1):!0;if(d==="json")try{return JSON.parse(e),!0}catch(s){return h(`[${u}] Invalid JSON for attribute "${r}": ${s.message}. Fallback: ${t.fallback}.`),!1}return!0}function pt(t,e,r){for(const o in r){const[c,u,d]=r[o];Object.defineProperty(t,o,{get:function(){return c(e,u,d)},enumerable:!0,configurable:!0})}return t}function gt(t){const e={};for(const r in t){const o=t[r];if(!o||!o.prop)continue;let c=o.read;if(!c&&o.type)switch(o.type){case"enum":c=ut(o.values,o.fallback);break;case"integer":c=ct;break;case"float":c=ht;break;case"boolean":c=Y;break;case"list":c=dt;break;case"json":c=ft;break;case"string":default:c=U;break}c||(c=U),e[o.prop]=[c,r,o.fallback]}return e}function Mt(t){const e={};for(const r in t){const o=t[r];o&&o.effect&&(e[r]=o.effect)}return Object.keys(e).length?e:null}function Ht(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const r in t.effects)e.add(r);if(t.onAttrChange&&t.declared)for(const r of t.declared)e.add(r);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pt,window.lnCore.attrSpec=gt,window.lnCore.attrStr=U,window.lnCore.attrInt=ct,window.lnCore.attrBool=Y,window.lnCore.attrList=dt,window.lnCore.attrEnum=ut,window.lnCore.attrFloat=ht,window.lnCore.attrJson=ft);function V(t,e){if(!t[e.attribute]){window.lnCore._persistSink&&t.hasAttribute&&t.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(t,e.selector);try{t[e.attribute]=new e.ComponentFn(t)}catch(r){console.error("["+e.attribute+"] init failed",t,r)}}}function wt(t,e,r,o){if(t.nodeType!==1)return;const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",d={selector:e,attribute:r,ComponentFn:o};if(t.matches&&t.matches(u)&&V(t,d),t.querySelectorAll){const h=t.querySelectorAll(u);for(let s=0;s<h.length;s++)V(h[s],d)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Nt(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Wt(t){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(t):setTimeout(t,0)):t()}function mt(){window.lnCore=window.lnCore||{};const t=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return t.byReactive=t.byReactive||new Map,t.reactiveWildcard=t.reactiveWildcard||[],t}function zt(t){const e=mt(),r=t.observed||[];for(let o=0;o<r.length;o++){const c=r[o];e.byAttr.has(c)||e.byAttr.set(c,[]),e.byAttr.get(c).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const o in t.attributes){e.byDeclaredAttr.has(o)||e.byDeclaredAttr.set(o,[]);const c=e.byDeclaredAttr.get(o);c.some(u=>u.componentTag===t.componentTag)||c.push({spec:t.attributes[o],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const o=Ht(t);if(o===null)e.reactiveWildcard.push(t);else for(const c of o)e.byReactive.has(c)||e.byReactive.set(c,[]),e.byReactive.get(c).push(t)}t.persist&&e.persist.push(t)}function bt(t,e,r,o){for(let c=0;c<t.length;c++){const u=t[c];if(!e[u.attribute])continue;const d=u.effects&&u.effects[r];d?d(e,r,o):u.onAttrChange&&(!u.declared||u.declared.has(r))&&u.onAttrChange(e,r,o)}}function Bt(t){const e=t.attributeName,r=e.indexOf("data-ln-")===0,o=mt(),c=o.byAttr.get(e),u=nt()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(e);if(!r&&!c&&!u)return;const d=t.target;if(t.oldValue!==d.getAttribute(e)){if(u&&G(d)){const h=o.byDeclaredAttr.get(e),s=d.getAttribute(e);for(let _=0;_<h.length;_++)_t(h[_].spec,s,e,h[_].componentTag,d)}if(window.lnCore._debugSink&&(r||c)&&window.lnCore._debugSink("attr",e,d,{oldValue:t.oldValue,newValue:d.getAttribute(e)}),r){const h=o.byReactive.get(e);h&&bt(h,d,e,t.oldValue),o.reactiveWildcard.length&&bt(o.reactiveWildcard,d,e,t.oldValue)}if(c)for(let h=0;h<c.length;h++){const s=c[h];if(s.handler){s.handler(d,e,t.oldValue);continue}s.onAttributeChange&&d[s.attribute]?s.onAttributeChange(d,e):(wt(d,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(d))}}}function Ut(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++)try{Bt(e[r])}catch(o){console.error("[ln-core] mutation handler failed",e[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function X(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Z(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function tt(t,e){if(!document.contains(t))if(e.attribute){const r=t[e.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+e.attribute+"] destroy failed",t,o)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function yt(t){const e=X();if(!e.length)return;const r=t.target;if(r){const c=r.nodeType===1?r:r.parentElement;if(c&&(c.isContentEditable||c.closest&&c.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=Z();if(t.target&&o.length)for(let c=0;c<o.length;c++){const u=o[c],d=u.query,h=t.target.nodeType===1?t.target.matches&&t.target.matches(d)?t.target:t.target.closest?t.target.closest(d):null:t.target.parentElement&&t.target.parentElement.closest?t.target.parentElement.closest(d):null;h&&u.onSubtreeChange(h,t)}for(let c=0;c<t.addedNodes.length;c++){const u=t.addedNodes[c];if(u.nodeType===1){const d=!!(u.firstElementChild||u.children&&u.children.length);for(let h=0;h<e.length;h++){const s=e[h];if(s.selector&&s.attribute&&s.ComponentFn){if(!d)u.matches&&u.matches(s.query)&&V(u,s);else if(u.matches&&u.matches(s.query)&&V(u,s),u.querySelectorAll){const _=u.querySelectorAll(s.query);for(let m=0;m<_.length;m++)V(_[m],s)}}s.onInit&&s.onInit(u)}}}for(let c=0;c<t.removedNodes.length;c++){const u=t.removedNodes[c];if(u.nodeType===1){if(document.contains(u))continue;const d=!!(u.firstElementChild||u.children&&u.children.length);for(let h=0;h<e.length;h++){const s=e[h],_=s.query;if(_){if(!d)u.matches&&u.matches(_)&&tt(u,s);else if(u.matches&&u.matches(_)&&tt(u,s),u.querySelectorAll){const m=u.querySelectorAll(_);for(let b=0;b<m.length;b++)tt(m[b],s)}}}}}}function Ct(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,$(function(){const t=new MutationObserver(function(e){for(let r=0;r<e.length;r++){const o=e[r];if(o.type==="childList")try{yt(o)}catch(c){console.error("[ln-core] lifecycle handler failed",o.target,c)}}});window.lnCore._lifecycleObserver=t,t.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Vt(t){if(typeof window>"u")return t();window.lnCore=window.lnCore||{};const e=window.lnCore._lifecycleObserver;if(!e)return t();const r=e.takeRecords();for(let o=0;o<r.length;o++){const c=r[o];if(c.type==="childList")try{yt(c)}catch(u){console.error("[ln-core] lifecycle handler failed",c.target,u)}}e.disconnect();try{return t()}finally{e.observe(document.body,{childList:!0,subtree:!0})}}function $t(t){X().push(t),t.onSubtreeChange&&t.query&&Z().push(t),Ct()}function vt(t,e,r,o,c={}){const u=c.extraAttributes||[],d=c.onAttributeChange||null,h=c.onSubtreeChange||null,s=c.onInit||null,_=c.onAttrChange||null,m=c.effects||null,b=c.attributes||null,L=b?Mt(b):m,F=b?new Set(Object.keys(b)):null,q=c.persist||null;function N(i){const l=i||document.body;if(wt(l,t,e,r),b&&nt())for(const a in b){const f=b[a],p=Array.from(l.querySelectorAll("["+a+"]"));l.matches&&l.matches("["+a+"]")&&p.push(l);for(let g=0;g<p.length;g++){const y=p[g];G(y)&&_t(f,y.getAttribute(a),a,o,y)}}s&&s(l)}const I=[];if(t.indexOf("[")!==-1){const i=/\[([\w-]+)/g;let l;for(;(l=i.exec(t))!==null;)I.push(l[1])}else I.push(t);zt({selector:t,attribute:e,componentTag:o,attributes:b,ComponentFn:r,onInit:s,observed:I.concat(u),onAttributeChange:d,onAttrChange:_,effects:L,declared:F,persist:q}),Ut();const T=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,O=c.subtreeQuery||(T?t:"["+t+"]"),v={selector:t,attribute:e,ComponentFn:r,onInit:s,onSubtreeChange:h,query:O};X().push(v),h&&O&&Z().push(v),Ct(),window[e]=N,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=vt,window.lnCore.observeLifecycle=$t,window.lnCore.withoutLifecycle=Vt);function n(){Nt()>0?Wt(function(){N(document.body)}):N(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n(),N}function jt(t){let e=!1;for(let r=0;r<t.length;r++){const o=t[r];if(!(o===""||o==null)&&(e=!0,!Number.isFinite(Number(o))))return"string"}return e?"number":"string"}function Gt(t,e,r,o){if(r==="number"){const d=parseFloat(t),h=parseFloat(e);return(isNaN(d)?0:d)-(isNaN(h)?0:h)}const c=t!=null?String(t):"",u=e!=null?String(e):"";return o?o.compare(c,u):c<u?-1:c>u?1:0}function Pt(t,e){let r=!1;return function(){r||(r=!0,queueMicrotask(function(){r=!1,t()}))}}function Kt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,r=t.pageSize>0?t.pageSize:200,o=t.threshold!=null?t.threshold:25,c=t.fetchDebounce!=null?t.fetchDebounce:120;const u=typeof t.requestPage=="function"?t.requestPage:function(){},d=typeof t.onChange=="function"?t.onChange:function(){},h=new Map,s=new Map,_=new Set;let m=0,b=0,L=0,F={sort:null,filters:{},search:""},q=null,N=0,I=0,T=!1;function O(l){s.set(l,++N)}function v(){return!!(F&&(F.search||F.filters&&Object.keys(F.filters).length))}function n(){if(h.size<=e)return;const l=Array.from(h.keys()).sort(function(f,p){return(s.get(f)||0)-(s.get(p)||0)});let a=0;for(;h.size>e&&a<l.length;)h.delete(l[a]),s.delete(l[a]),a++}function i(l,a){_.add(l),u(F,l,a)}return{get:function(l){return h.get(l)},has:function(l){return h.has(l)},peek:function(){return h.size?h.values().next().value:void 0},get logicalTotal(){return m},get grandTotal(){return b},get queryGen(){return L},get size(){return h.size},ensure:function(l,a){clearTimeout(q),I=l;for(let w=l;w<a;w++)h.has(w)&&O(w);if(m<=0)return;const f=Math.max(0,l-o),p=Math.min(m,a+o),g=Math.floor(f/r),y=Math.floor(Math.max(0,p-1)/r);let E=-1;for(let w=g;w<=y;w++){const C=w*r,k=Math.min(r,m-C);let W=!1;const z=Math.max(C,f),M=Math.min(C+k,p);for(let R=z;R<M;R++)if(!h.has(R)){W=!0;break}if(W&&!_.has(C)){E=C;break}}E!==-1&&(q=setTimeout(function(){i(E,r)},c))},ingest:function(l){if(l=l||{},l.queryGen!=null&&l.queryGen!==L)return!1;const a=l.offset||0,f=l.data||[];let p=0;for(let g=0;g<f.length;g++)f[g]!=null&&p++;if(p===0&&(l.provisional||l.filtered>0))return _.delete(a),!1;T&&(h.clear(),s.clear(),T=!1),l.provisional||(b=l.total!=null?l.total:b,m=l.filtered!=null?l.filtered:l.data?l.data.length:m);for(let g=0;g<f.length;g++)f[g]!=null&&(h.set(a+g,f[g]),O(a+g));return _.delete(a),n(),d(),!0},requestInitial:function(l){l&&(F=l),i(0,r)},invalidate:function(l){L++,_.clear(),clearTimeout(q),l&&(F=l),T=!0,i(0,r)},revalidate:function(){L++,_.clear(),clearTimeout(q),T=!0;const l=Math.max(0,Math.floor(I/r)*r);i(l,r)},release:function(l){_.delete(l)},destroy:function(){clearTimeout(q),h.clear(),s.clear(),_.clear()},configure:function(l){l=l||{};let a=!1;if(l.windowSize!=null&&l.windowSize>0&&l.windowSize!==e){const f=l.windowSize<e;e=l.windowSize,f&&n(),a=!0}l.pageSize!=null&&l.pageSize>0&&(r=l.pageSize),l.threshold!=null&&l.threshold>=0&&(o=l.threshold),l.fetchDebounce!=null&&l.fetchDebounce>=0&&(c=l.fetchDebounce),a&&d()},setGrandTotal:function(l){l==null||isNaN(l)||l<0||(b=l,v()||(m=l),d())}}}function St(t){return(t||"").replace(/^#/,"")}function et(t){const e=t===void 0?location.hash:t,r={},o=St(e);if(!o)return r;const c=o.split("&");for(let u=0;u<c.length;u++){const d=c[u];if(!d)continue;const h=d.indexOf(":"),s=h>-1?d.slice(0,h):d,_=h>-1?d.slice(h+1):"";if(s)try{r[s]=decodeURIComponent(_)}catch{r[s]=_}}return r}function Qt(t){if(!t)return null;const e=et();return t in e?e[t]:null}function Yt(t,e){if(!t)return;const r=et();e==null?delete r[t]:r[t]=String(e);const c=Object.keys(r).map(function(u){const d=r[u];return d===""?u:u+":"+encodeURIComponent(d)}).join("&");St(location.hash)!==c&&(location.hash=c)}function Jt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function Xt(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const r=t.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const o=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return o?e?o+"-"+e:o:e||null}function Zt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function te(t){return!t||typeof t!="string"?null:t.endsWith(".asc")?{fieldOrColumn:t.slice(0,-4),direction:"asc"}:t.endsWith(".desc")?{fieldOrColumn:t.slice(0,-5),direction:"desc"}:null}function ee(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function ne(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const r=t.slice(0,e),o=t.slice(e+1),c=o?o.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:c}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=et,window.lnCore.hashGet=Qt,window.lnCore.hashSet=Yt,window.lnCore.hashLinkClick=Jt,window.lnCore.resolveHashNamespace=Xt,window.lnCore.hashSortEncode=Zt,window.lnCore.hashSortDecode=te,window.lnCore.hashFilterEncode=ee,window.lnCore.hashFilterDecode=ne);function ie(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=ie),(function(){const t="data-ln-list",e="lnList",r="data-ln-list-empty";if(window[e]!==void 0)return;function s(n,i){if(!n||!n.isDataDriven)return;const l=n.dom.hasAttribute("data-ln-list-window");if(l&&!n._windowed)n._enterWindowedMode(),n._kickWindowInitial();else if(!l&&n._windowed)n._exitWindowedMode();else if(l&&n._windowed){const a=parseInt(i,10);a>0&&n._cache.configure({windowSize:a})}}function _(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>0&&n._cache.configure({pageSize:l})}function m(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.configure({threshold:l})}function b(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.setGrandTotal(l)}const L={"data-ln-list":{prop:"name",type:"string",read:U,fallback:"",description:"List instance name or identifier"},"data-ln-list-source":{prop:"source",type:"string",read:U,fallback:"",description:"Source store or coordinator addressing"},"data-ln-list-selectable":{prop:"_selectable",type:"boolean",read:Y,description:"Enables item selection controls"},"data-ln-list-window":{type:"integer",fallback:1e3,min:10,effect:s,description:"Virtual scrolling window size in items"},"data-ln-list-window-page":{type:"integer",fallback:200,min:5,effect:_,description:"Virtual scrolling slice page size"},"data-ln-list-window-threshold":{type:"integer",fallback:50,min:0,effect:m,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-list-count":{type:"integer",min:0,effect:b,description:"Total item count override for virtual scrollbar calculation"},"data-ln-list-empty":{type:"marker",description:"Container for list empty state"},"data-ln-list-field":{type:"string",description:"Field name mapping for list item binding"}},F=gt(L);function q(n,i){if(n==null||isNaN(n))return"";try{return new Intl.NumberFormat(rt(i)).format(n)}catch{return String(n)}}function N(n){let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const a=getComputedStyle(i).overflowY;if(a==="auto"||a==="scroll")return i;i=i.parentElement}return null}function I(n){const i=n._scrollContainer||N(n.dom);return{container:i,top:i?i.scrollTop:window.scrollY}}function T(n){n.container?n.container.scrollTop=n.top:window.scrollTo(window.scrollX,n.top)}function O(n){if(!n)return 0;const i=getComputedStyle(n),l=parseFloat(i.marginTop)||0,a=parseFloat(i.marginBottom)||0;return n.offsetHeight+l+a}function v(n){this.dom=n,pt(this,n,F),this.tbody=n.querySelector("[data-ln-list-body]")||n,this.isDataDriven=n.hasAttribute("data-ln-list-source"),this._totalSpan=n.querySelector("[data-ln-list-total]"),this._filteredSpan=n.querySelector("[data-ln-list-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==n?this._filteredSpan.parentElement:null),this._selectedSpan=n.querySelector("[data-ln-list-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==n?this._selectedSpan.parentElement:null),this._data=[],this._filteredData=[],this.selectedIds=new Set,this._searchTerm="",this._filters={},this._sortField=null,this._sortDir=null,this._virtual=!1,this._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._resizeHandler=null,this._scrollContainer=null,this.isUl=this.tbody.tagName==="UL"||this.tbody.tagName==="OL";const i=this;return this._onSetSearch=function(l){const a=(l.detail&&l.detail.query!=null?l.detail.query:l.detail&&l.detail.term!=null?l.detail.term:"").trim();i.isDataDriven?(i.currentSearch=a,D(n,"ln-list:search",{list:i.name,query:i.currentSearch}),i._requestData()):(i._searchTerm=a.toLowerCase(),i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list:set-search",this._onSetSearch),this._onSearchChange=function(l){l.preventDefault(),i._onSetSearch(l)},n.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){i.isDataDriven?(i.currentFilters={},i.currentSearch="",D(n,"ln-list:clear-filters",{list:i.name}),i._requestData()):(i._searchTerm="",i._filters={},i._sortField=null,i._sortDir=null,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:"",matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list:request-clear-filters",this._onRequestClearFilters),this._selectableActive=!1,this._selectable&&this._enableSelection(),this.isDataDriven?(this.isLoaded=!1,this.totalCount=0,this.visibleCount=0,this.currentSort=null,this.currentFilters={},this.currentSearch="",this._lastTotal=0,this._lastFiltered=0,this._hasInitialSeed=!1,this._windowed=!1,this._cache=null,n.hasAttribute("data-ln-list-window")&&this._enterWindowedMode(),this._onSetData=function(l){const a=l.detail||{},f=a.data||[],p=a.total!=null?a.total:f.length;if(!(i._hasInitialSeed&&!i.isLoaded&&f.length===0&&p===0)){if(i._windowed){i._cache.ingest(a)&&!a.provisional&&n.classList.remove("ln-list--loading");return}i._data=f,i._lastTotal=p,i._lastFiltered=a.filtered!=null?a.filtered:i._data.length,i.totalCount=i._lastTotal,i.visibleCount=i._lastFiltered,i.isLoaded=!0,i._hasInitialSeed=!1,n.classList.remove("ln-list--loading"),i._vStart=-1,i._vEnd=-1,i._applyFilterAndSort(),i._render(),i._updateFooter(),D(n,"ln-list:rendered",{list:i.name,total:i.totalCount,visible:i.visibleCount})}},n.addEventListener("ln-list:set-data",this._onSetData),this._onSetLoading=function(l){const a=l.detail&&l.detail.loading;n.classList.toggle("ln-list--loading",!!a),a&&(i.isLoaded=!1)},n.addEventListener("ln-list:set-loading",this._onSetLoading),this._onPageFailed=function(l){!i._windowed||!i._cache||i._cache.release(l.detail&&l.detail.offset)},n.addEventListener("ln-list:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!i._windowed||!i._cache||i._cache.revalidate()},n.addEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(){!i._windowed||!i._cache||i._requestData()},n.addEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this._onSort=function(l){!l.detail||l.detail.field==null||(l.preventDefault(),i.currentSort=l.detail.direction==="none"?null:{field:l.detail.field,direction:l.detail.direction},i._requestData())},n.addEventListener("ln-sort:change",this._onSort),this._onItemClick=function(l){if(l.target.closest("[data-ln-item-select]")||l.target.closest("[data-ln-item-action]")||l.target.closest("a")||l.target.closest("button")||l.ctrlKey||l.metaKey||l.button===1)return;const a=l.target.closest("[data-ln-item]");if(!a)return;const f=a.getAttribute("data-ln-item-id"),p=a._lnRecord||{};D(n,"ln-list:item-click",{list:i.name,id:f,record:p})},this.tbody&&this.tbody.addEventListener("click",this._onItemClick),this._onItemAction=function(l){const a=l.target.closest("[data-ln-item-action]");if(!a)return;const f=a.closest("[data-ln-item]");if(!f)return;const p=a.getAttribute("data-ln-item-action"),g=f.getAttribute("data-ln-item-id"),y=f._lnRecord||{};D(n,"ln-list:item-action",{list:i.name,id:g,action:p,record:y})},this.tbody&&this.tbody.addEventListener("click",this._onItemAction),this.tbody&&this.tbody.children.length>0&&this._parseChildren(),this._windowed?this._kickWindowInitial():D(n,"ln-list:request-data",{list:this.name,sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})):(this._emptyObserver=null,this.tbody&&this.tbody.children.length>0?this._parseChildren():this.tbody&&(this._emptyObserver=new MutationObserver(function(){i.tbody.children.length>0&&(i._emptyObserver.disconnect(),i._emptyObserver=null,i._parseChildren())}),this._emptyObserver.observe(this.tbody,{childList:!0})),this._onFilterChange=function(l){if(l.preventDefault(),!l.detail)return;const a=l.detail.key,f=l.detail.values||[];if(a){if(f.length===0)delete i._filters[a];else{const p=[];for(let g=0;g<f.length;g++)p.push(f[g].toLowerCase());i._filters[a]=p}i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length})}},n.addEventListener("ln-filter:change",this._onFilterChange),this._onSort=function(l){if(!l.detail||l.detail.field==null)return;l.preventDefault();const a=l.detail.direction==="none"?null:l.detail.direction;i._sortField=a===null?null:l.detail.field,i._sortDir=a,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:sorted",{field:i._sortField,direction:l.detail&&l.detail.direction,matched:i._filteredData.length,total:i._data.length})},n.addEventListener("ln-sort:change",this._onSort)),this}v.prototype._parseChildren=function(){const n=Array.from(this.tbody.children).filter(i=>!i.classList.contains("ln-list__spacer"));this._data=[],n.length>0&&(this._itemHeight=O(n[0])||50);for(let i=0;i<n.length;i++){const l=n[i],a=l.getAttribute("data-ln-item-id")||l.getAttribute("id"),f=l.textContent.trim().toLowerCase();let p=null;if(this.isDataDriven){p={},a!=null&&(p.id=a);const E=l.querySelectorAll("[data-ln-list-field]");for(let w=0;w<E.length;w++){const C=E[w],k=C.getAttribute("data-ln-list-field");k&&(p[k]=it(C))}}const g={},y=l.querySelectorAll("[data-ln-list-field], [data-ln-field]");for(let E=0;E<y.length;E++){const w=y[E],C=w.getAttribute("data-ln-list-field")||w.getAttribute("data-ln-field");C&&(g[C]=it(w))}for(let E=0;E<l.attributes.length;E++){const w=l.attributes[E];if(w.name.startsWith("data-")&&!w.name.startsWith("data-ln-")){const C=w.name.slice(5);C&&(g[C]=w.value)}}this._data.push({html:l.outerHTML,id:a,searchText:f,fields:g,...p||{}})}this._filteredData=this._data.slice(),this._data.length>0&&(this._hasInitialSeed=!0),this.isDataDriven&&(this._lastTotal=this._data.length,this._lastFiltered=this._data.length,this.totalCount=this._data.length,this.visibleCount=this._data.length,this._updateFooter()),this._render(),D(this.dom,"ln-list:ready",{total:this._data.length})},v.prototype._applyFilterAndSort=function(){if(this.isDataDriven)this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length;else{const n=this._searchTerm,i=n?n.split(/\s+/).filter(Boolean):[],l=this._filters||{},a=Object.keys(l).length>0;if(i.length===0&&!a?this._filteredData=this._data.slice():this._filteredData=this._data.filter(function(f){if(i.length>0&&!i.every(function(g){return f.searchText&&f.searchText.indexOf(g)!==-1}))return!1;if(a)for(const p in l){const g=l[p];if(g&&g.length>0){const y=f.fields&&f.fields[p]!==void 0?f.fields[p]:f[p]!==void 0?f[p]:null,E=y!=null?String(y).toLowerCase():"";if(g.indexOf(E)===-1)return!1}}return!0}),this._sortField&&this._sortDir){const f=this._sortField,p=this._sortDir==="desc"?-1:1,g=typeof Intl<"u"?new Intl.Collator(rt(this.dom),{sensitivity:"base"}):null,y=this._filteredData.map(function(w){return w.fields&&w.fields[f]!==void 0?w.fields[f]:w[f]}),E=jt(y);this._filteredData.sort(function(w,C){const k=w.fields&&w.fields[f]!==void 0?w.fields[f]:w[f],W=C.fields&&C.fields[f]!==void 0?C.fields[f]:C[f];return Gt(k,W,E,g)*p})}}},v.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const n=this._lastTotal,i=this.visibleCount;if(n===0||this._filteredData.length===0||i===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const n=this._filteredData.length;n===0&&(this._searchTerm||Object.keys(this._filters||{}).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):n>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},v.prototype._renderAll=function(){if(this.isDataDriven){const n=this._filteredData,i=document.createDocumentFragment();for(let a=0;a<n.length;a++){const f=this._buildItem(n[a]);f&&i.appendChild(f)}const l=I(this);this.tbody.replaceChildren(i),T(l),this._selectable&&this._updateSelectAll()}else{const n=[],i=this._filteredData;for(let a=0;a<i.length;a++)n.push(i[a].html);const l=I(this);this.tbody.innerHTML=n.join(""),T(l),this._selectable&&this._restoreSelection()}},v.prototype._readGridLayout=function(){const n=getComputedStyle(this.tbody),i=n.gridTemplateColumns;let l=1;if(i&&i!=="none"){const f=i.trim().split(/\s+/).filter(Boolean);f.length>0&&(l=f.length)}const a=parseFloat(n.rowGap);return{columns:l,rowGap:isNaN(a)?0:a}},v.prototype._measureItemHeight=function(){if(this._windowed){const n=this._cache.peek(),i=n?this._buildItem(n):this._buildPlaceholderItem();i&&(this.tbody.textContent="",this.tbody.appendChild(i),this._itemHeight=O(i)||50,this.tbody.textContent="")}else if(this.isDataDriven){if(this._data.length>0){const n=this._buildItem(this._data[0]);n&&(this.tbody.textContent="",this.tbody.appendChild(n),this._itemHeight=O(n)||50,this.tbody.textContent="")}}else{const n=this.tbody.children;n.length>0&&(this._itemHeight=O(n[0])||50)}},v.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const n=this;this._itemHeight||this._measureItemHeight(),this._scrollContainer=N(this.dom);const i=this._scrollContainer||window;this._scrollHandler=function(){n._rafId||(n._rafId=requestAnimationFrame(function(){n._rafId=null,n._windowed?n._renderWindowed():n._renderVirtual()}))},this._resizeRafId=null,this._resizeHandler=function(){n._resizeRafId||(n._resizeRafId=requestAnimationFrame(function(){n._resizeRafId=null,n._itemHeight=0,n._measureItemHeight(),n._vStart=-1,n._vEnd=-1,n._windowed?n._renderWindowed():n._renderVirtual()}))},i.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._resizeHandler,{passive:!0})},v.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._resizeRafId&&(cancelAnimationFrame(this._resizeRafId),this._resizeRafId=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},v.prototype._renderVirtual=function(){const n=this._filteredData,i=n.length,l=this._itemHeight;if(!l||!i)return;const a=this._scrollContainer;let f,p;if(a){const x=this.tbody.getBoundingClientRect(),A=a.getBoundingClientRect(),S=a===this.tbody?0:x.top-A.top+a.scrollTop;f=a.scrollTop-S,p=a.clientHeight}else{const A=this.tbody.getBoundingClientRect().top+window.scrollY;f=window.scrollY-A,p=window.innerHeight}const g=this._readGridLayout(),y=g.columns,E=g.rowGap,w=l+E,C=Math.ceil(i/y);let k=Math.max(0,Math.floor(f/w)-15);k=Math.min(k,C);const W=Math.ceil(p/w)+30,z=Math.min(k+W,C),M=Math.min(k*y,i),R=Math.min(z*y,i);if(M===this._vStart&&R===this._vEnd)return;this._vStart=M,this._vEnd=R;const B=k*w,H=(C-z)*w;if(this.isDataDriven){const x=document.createDocumentFragment();if(B>0){const S=document.createElement(this.isUl?"li":"div");S.className="ln-list__spacer",S.setAttribute("aria-hidden","true"),S.style.height=B+"px",x.appendChild(S)}for(let S=M;S<R;S++){const j=this._buildItem(n[S]);j&&x.appendChild(j)}if(H>0){const S=document.createElement(this.isUl?"li":"div");S.className="ln-list__spacer",S.setAttribute("aria-hidden","true"),S.style.height=H+"px",x.appendChild(S)}const A=I(this);this.tbody.replaceChildren(x),T(A),this._selectable&&this._updateSelectAll()}else{let x="";B>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${B}px"></${this.isUl?"li":"div"}>`);for(let S=M;S<R;S++)x+=n[S].html;H>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${H}px"></${this.isUl?"li":"div"}>`);const A=I(this);this.tbody.innerHTML=x,T(A),this._selectable&&this._restoreSelection()}},v.prototype._buildPlaceholderItem=function(){const n=document.createElement(this.isUl?"li":"div");return n.className="ln-list__placeholder",n.setAttribute("aria-hidden","true"),n.style.height=this._itemHeight+"px",n},v.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const n=this._itemHeight;if(!n)return;const i=this._scrollContainer;let l,a;if(i){const A=this.tbody.getBoundingClientRect(),S=i.getBoundingClientRect(),j=i===this.tbody?0:A.top-S.top+i.scrollTop;l=i.scrollTop-j,a=i.clientHeight}else{const S=this.tbody.getBoundingClientRect().top+window.scrollY;l=window.scrollY-S,a=window.innerHeight}const f=this._readGridLayout(),p=f.columns,g=f.rowGap,y=n+g,E=this._cache.logicalTotal,w=Math.ceil(E/p);let C=Math.max(0,Math.floor(l/y)-15);C=Math.min(C,w);const k=Math.ceil(a/y)+30,W=Math.min(C+k,w),z=Math.min(C*p,E),M=Math.min(W*p,E),R=C*y,B=(w-W)*y,H=document.createDocumentFragment();if(R>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=R+"px",H.appendChild(A)}for(let A=z;A<M;A++)if(this._cache.has(A)){const S=this._buildItem(this._cache.get(A));S&&H.appendChild(S)}else H.appendChild(this._buildPlaceholderItem());if(B>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=B+"px",H.appendChild(A)}const x=I(this);this.tbody.replaceChildren(H),T(x),this._vStart=z,this._vEnd=M,this._cache.ensure(z,M)},v.prototype._showEmptyState=function(){let n=null;if(this.isDataDriven){const i=this._lastTotal!=null?this._lastTotal:this._data.length,a=this.visibleCount===0&&i>0,f=a?this.name+"-empty-filtered":this.name+"-empty";if(n=at(this.dom,f,"ln-list"),!n){const p=this.dom.querySelector("template[data-ln-empty], template[data-ln-list-empty]");if(p){const g=a?"search":"initial",y=p.content.querySelector(`[data-ln-empty-when="${g}"]`)||p.content.firstElementChild;y&&(n=document.importNode(y,!0))}}}else{const i=this.dom.querySelector(`template[${r}]`);if(i){const l=i.content.firstElementChild;l&&(n=document.importNode(l,!0))}}if(n)if(n.tagName==="LI"||n.tagName==="TR")this.tbody.replaceChildren(n);else{const i=document.createElement(this.isUl?"li":"div");i.appendChild(n),this.tbody.replaceChildren(i)}else this.tbody.replaceChildren();D(this.dom,"ln-list:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},v.prototype._buildItem=function(n){let i=at(this.dom,this.name+"-row","ln-list");if(!i){const a=this.dom.querySelector("template[data-ln-item]");a&&(i=document.importNode(a.content,!0))}let l=i?i.querySelector("[data-ln-item]")||i.firstElementChild:null;if(l)Q(l,n),K(l,n);else if(n&&n.html){const a=document.createElement(this.isUl?"ul":"div");a.innerHTML=n.html,l=a.firstElementChild}else if(l=document.createElement(this.isUl?"li":"div"),l.setAttribute("data-ln-item",""),n&&typeof n=="object"){for(const a in n)if(a!=="html"&&n[a]!=null){const f=document.createElement("span");f.setAttribute("data-ln-field",a),f.textContent=String(n[a]),l.appendChild(f)}}if(l._lnRecord=n,n&&n.id!=null&&(l.setAttribute("data-ln-item-id",n.id),this._selectable&&this.selectedIds.has(String(n.id)))){l.classList.add("ln-item-selected");const a=l.querySelector("[data-ln-item-select]");a&&(a.checked=!0)}return l},v.prototype._restoreSelection=function(){if(!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-item]");for(let i=0;i<n.length;i++){const l=n[i].getAttribute("data-ln-item-id"),a=l!=null&&this.selectedIds.has(String(l));n[i].classList.toggle("ln-item-selected",a);const f=n[i].querySelector("[data-ln-item-select]");f&&(f.checked=a)}this._updateSelectAll()},v.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const n=this;this._onSelectionChange=function(i){const l=i.target.closest("[data-ln-item-select]");if(!l)return;const a=l.closest("[data-ln-item]");if(!a)return;const f=a.getAttribute("data-ln-item-id");f!=null&&(l.checked?(n.selectedIds.add(String(f)),a.classList.add("ln-item-selected")):(n.selectedIds.delete(String(f)),a.classList.remove("ln-item-selected")),n._updateSelectAll(),n._updateFooter(),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}))},this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector("[data-ln-list-select-all]"),this._selectAllCheckbox&&(this._onSelectAll=function(){const i=n._selectAllCheckbox.checked,l=n.tbody.querySelectorAll("[data-ln-item]");for(let a=0;a<l.length;a++){const f=l[a],p=f.getAttribute("data-ln-item-id"),g=f.querySelector("[data-ln-item-select]");p!=null&&(i?(n.selectedIds.add(String(p)),f.classList.add("ln-item-selected")):(n.selectedIds.delete(String(p)),f.classList.remove("ln-item-selected")),g&&(g.checked=i))}D(n.dom,"ln-list:select-all",{list:n.name,selected:i}),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}),n._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll))},v.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox)return;const n=this.tbody.querySelectorAll("[data-ln-item]");let i=n.length>0;for(let l=0;l<n.length;l++){const a=n[l].getAttribute("data-ln-item-id");if(a!=null&&!this.selectedIds.has(String(a))){i=!1;break}}this._selectAllCheckbox.checked=i},v.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-list--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}At(this,"ln-list:request-data","list")},v.prototype._enterWindowedMode=function(){const n=this,i=this.dom,l=parseInt(i.getAttribute("data-ln-list-window"),10),a=parseInt(i.getAttribute("data-ln-list-window-page"),10),f=parseInt(i.getAttribute("data-ln-list-window-threshold"),10);this._onCacheChange=function(){!n._windowed||!n._cache||(n.totalCount=n._cache.grandTotal,n.visibleCount=n._cache.logicalTotal,n._lastTotal=n._cache.grandTotal,n.isLoaded=!0,n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),D(i,"ln-list:rendered",{list:n.name,total:n.totalCount,visible:n.visibleCount}))},this._renderBatch=Pt(this._onCacheChange),this._cache=Kt({windowSize:l>0?l:1e3,pageSize:a>0?a:200,threshold:f>=0?f:25,fetchDebounce:120,requestPage:function(p,g,y){D(i,"ln-list:request-data",{list:n.name,sort:p.sort,filters:p.filters,search:p.search,offset:g,limit:y,queryGen:n._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},v.prototype._kickWindowInitial=function(){if(this._data.length>0){const n=parseInt(this.dom.getAttribute("data-ln-list-count"),10),i=n>0?n:this._data.length;this._cache.ingest({data:this._data,offset:0,total:i,filtered:i})}else this.dom.classList.add("ln-list--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},v.prototype._exitWindowedMode=function(){this._disableVirtualScroll(),this._cache&&this._cache.destroy(),this._cache=null,this._windowed=!1,this._renderBatch=null,this._onCacheChange=null,this._selectAllCheckbox&&this._selectAllCheckbox.classList.remove("hidden"),this._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-list--loading"),this._requestData()},v.prototype._updateFooter=function(){let n=0,i=0;this.isDataDriven?(n=this._lastTotal!=null?this._lastTotal:this._data.length,i=this.visibleCount):(n=this._data.length,i=this._filteredData.length);const l=i<n;if(this._totalSpan&&(this._totalSpan.textContent=q(n,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=l?q(i,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!l),this._selectedSpan){const a=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=a>0?q(a,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",a===0)}},v.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-list:set-search",this._onSetSearch),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-list:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this._cache&&this._cache.destroy(),this.dom.removeEventListener("ln-list:set-data",this._onSetData),this.dom.removeEventListener("ln-list:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-list:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onItemClick),this.tbody.removeEventListener("click",this._onItemAction))):(this._emptyObserver&&(this._emptyObserver.disconnect(),this._emptyObserver=null),this._onFilterChange&&this.dom.removeEventListener("ln-filter:change",this._onFilterChange),this._onSort&&this.dom.removeEventListener("ln-sort:change",this._onSort)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._data=[],this._filteredData=[],delete this.dom[e])},vt(t,e,v,"ln-list",{attributes:L})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function B(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(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 l=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){l=t[i];break}if(!E(l))return}e.apply(console,t)}}function _(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function j(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});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 O(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function re(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function ie(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function le(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function se(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,i={},s=e.elements,r={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&r[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&i[n.name].push(n.options[a].value)}else if(o&&n.type==="hidden")i[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const a=Number(n.value);i[n.name]=n.value===""||isNaN(a)?null:a}else i[n.name]=n.value}return i}function ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ue(e,t){const o=e.elements,l=[],i={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(i[r.name]=(i[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const n=t[c];if(r.type==="checkbox"){if(Array.isArray(n))r.checked=n.indexOf(r.value)!==-1;else if(i[r.name]>1){const a=String(n).split(",").map(function(f){return f.trim()});r.checked=a.indexOf(r.value)!==-1}else r.checked=ce(n);l.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),l.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<r.options.length;a++)r.options[a].selected=n.indexOf(r.options[a].value)!==-1;l.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),l.push(r)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ue,window.lnCore.serializeForm=se,window.lnCore.resolveFormMethod=le);const W={};function ae(e,t){W[e]=t}function de(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=de);function fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const U={};function we(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];U[o]=t}function he(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return U[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=we,window.lnCore.getLocaleFallback=he,window.lnCore.ensureLocaleObserver=fe);const L={};function be(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=L[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function V(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[r],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const f=n[a].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();t[d]!=null&&c.setAttribute(u,t[d])}}const i=e.querySelectorAll("[data-ln-show]");for(let r=0;r<i.length;r++){const c=i[r],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const f=n[a].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();d in t&&c.classList.toggle(u,!!t[d])}}return e}function pe(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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].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)V(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function H(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,r){return t[r]!==void 0?t[r]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const r=i[s],c=r.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&r.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function me(e,t,o,l,i,s){const r={};for(let n=0;n<e.children.length;n++){const a=e.children[n],f=a.getAttribute("data-ln-render-key");f&&(r[f]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],f=String(l(a));let u=r[f];if(u)i(u,a,n);else{const d=be(o,s);if(!d||(H(d,a),u=d.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",f),i(u,a,n)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=H,window.lnCore.fill=V,window.lnCore.lnFill=pe,window.lnCore.renderList=me);function q(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function K(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function G(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const i=l.trim().toLowerCase();return!(i==="false"||i==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const I=new Map;function J(e,t){const o=(e?e.join("|"):"")+"::"+t;if(I.has(o))return I.get(o);const l=new Set(e||[]),i=function(s,r){const c=s.getAttribute(r);return c!==null&&l.has(c)?c:t};return I.set(o,i),i}function P(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function z(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function X(e,t,o,l,i){if(!e||t===null)return!0;const s=l||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=n=>{i?console.warn(n,i):console.warn(n)};if(r==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ge(e,t,o){for(const l in o){const[i,s,r]=o[l];Object.defineProperty(e,l,{get:function(){return i(t,s,r)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let i=l.read;if(!i&&l.type)switch(l.type){case"enum":i=J(l.values,l.fallback);break;case"integer":i=K;break;case"float":i=P;break;case"boolean":i=G;break;case"list":i=Q;break;case"json":i=z;break;case"string":default:i=q;break}i||(i=q),t[l.prop]=[i,o,l.fallback]}return t}function ye(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function Ae(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ge,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=q,window.lnCore.attrInt=K,window.lnCore.attrBool=G,window.lnCore.attrList=Q,window.lnCore.attrEnum=J,window.lnCore.attrFloat=P,window.lnCore.attrJson=z);function g(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(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Y(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&g(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)g(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ve(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function _e(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 Z(){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 ke(e){const t=Z(),o=e.observed||[];for(let l=0;l<o.length;l++){const i=o[l];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 l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const i=t.byDeclaredAttr.get(l);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=Ae(e);if(l===null)t.reactiveWildcard.push(e);else for(const i of l)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,o,l){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=Z(),i=l.byAttr.get(t),s=B()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!i&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&E(r)){const c=l.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let a=0;a<c.length;a++)X(c[a].spec,n,t,c[a].componentTag,r)}if(window.lnCore._debugSink&&(o||i)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&ee(c,r,t,e.oldValue),l.reactiveWildcard.length&&ee(l.reactiveWildcard,r,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const n=i[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(Y(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function Se(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Ee(e){const t=D();if(!t.length)return;const o=e.target;if(o){const i=o.nodeType===1?o:o.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=R();if(e.target&&l.length)for(let i=0;i<l.length;i++){const s=l[i],r=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!r)s.matches&&s.matches(n.query)&&g(s,n);else if(s.matches&&s.matches(n.query)&&g(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let f=0;f<a.length;f++)g(a[f],n)}}n.onInit&&n.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!r)s.matches&&s.matches(a)&&T(s,n);else if(s.matches&&s.matches(a)&&T(s,n),s.querySelectorAll){const f=s.querySelectorAll(a);for(let u=0;u<f.length;u++)T(f[u],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{Ee(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){D().push(e),e.onSubtreeChange&&e.query&&R().push(e),te()}function ne(e,t,o,l,i={}){const s=i.extraAttributes||[],r=i.onAttributeChange||null,c=i.onSubtreeChange||null,n=i.onInit||null,a=i.onAttrChange||null,f=i.effects||null,u=i.attributes||null,d=u?ye(u):f,w=u?new Set(Object.keys(u)):null,h=i.persist||null;function p(m){const b=m||document.body;if(Y(b,e,t,o),u&&B())for(const v in u){const Ne=u[v],M=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&M.push(b);for(let $=0;$<M.length;$++){const N=M[$];E(N)&&X(Ne,N.getAttribute(v),v,l,N)}}n&&n(b)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let b;for(;(b=m.exec(e))!==null;)C.push(b[1])}else C.push(e);ke({selector:e,attribute:t,componentTag:l,attributes:u,ComponentFn:o,onInit:n,observed:C.concat(s),onAttributeChange:r,onAttrChange:a,effects:d,declared:w,persist:h}),Se();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,x=i.subtreeQuery||(y?e:"["+e+"]"),A={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:x};D().push(A),c&&x&&R().push(A),te(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ne,window.lnCore.observeLifecycle=Oe);function S(){ve()>0?_e(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",S):S(),p}function oe(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},l=oe(t);if(!l)return o;const i=l.split("&");for(let s=0;s<i.length;s++){const r=i[s];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,a=c>-1?r.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function Le(e){if(!e)return null;const t=F();return e in t?t[e]:null}function qe(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const i=Object.keys(o).map(function(s){const r=o[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");oe(location.hash)!==i&&(location.hash=i)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function De(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Re(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Te(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 Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Me(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),i=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=Le,window.lnCore.hashSet=qe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=De,window.lnCore.hashSortEncode=Re,window.lnCore.hashSortDecode=Te,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=Me);function $e(){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=$e),(function(){const e="data-ln-modal",t="lnModal",o="data-ln-modal-for",l="data-ln-modal-close";if(window[t]!==void 0)return;const i={"data-ln-modal":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the modal dialog"},"data-ln-modal-for":{type:"string",description:"Target modal ID to open on trigger click"},"data-ln-modal-mode":{type:"enum",values:["new","edit"],fallback:"new",description:"Operational mode of the modal (new vs edit)"},"data-ln-modal-close":{type:"trigger",description:"Click dismiss trigger inside the modal"}},s=new Set;let r=null;function c(){r||(r=function(u){if(re(u))return;const d=u.target.closest("["+o+"]");if(!d||ie(d))return;const w=d.getAttribute(o);if(!w)return;const h=document.getElementById(w);!h||!h[t]||(u.preventDefault(),d.hasAttribute("data-ln-modal-mode")?h.setAttribute("data-ln-modal-mode",d.getAttribute("data-ln-modal-mode")):h.hasAttribute("data-ln-modal-mode")&&h.setAttribute("data-ln-modal-mode","new"),h.setAttribute(e,"open"))},document.addEventListener("click",r))}function n(){s.size>0||!r||(document.removeEventListener("click",r),r=null)}function a(u){this.dom=u,this.isOpen=u.getAttribute(e)==="open";const d=this;return this._onRequestOpen=function(){d.dom.setAttribute(e,"open")},this._onRequestClose=function(){d.dom.setAttribute(e,"close")},this._onCancel=function(w){w.preventDefault(),d.dom.setAttribute(e,"close")},this._onClose=function(){!d.isOpen||d.dom.getAttribute(e)!=="open"||d.dom.open||(d._isNativeClosing=!0,d.dom.setAttribute(e,"close"))},this._onClickClose=function(w){const h=w.target.closest("["+l+"]");h&&d.dom.contains(h)&&(w.preventDefault(),d.dom.setAttribute(e,"close"))},this.dom.addEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.addEventListener("ln-modal:request-close",this._onRequestClose),this.dom.addEventListener("cancel",this._onCancel),this.dom.addEventListener("close",this._onClose),this.dom.addEventListener("click",this._onClickClose),s.add(this),c(),this.isOpen&&(typeof this.dom.showModal=="function"&&this.dom.showModal(),document.body.classList.add("ln-modal-open"),_(this.dom,"ln-modal:open",{modalId:this.dom.id,target:this.dom})),this}a.prototype.open=function(){this.dom.setAttribute(e,"open")},a.prototype.close=function(){this.dom.setAttribute(e,"close")},a.prototype.toggle=function(){const u=this.dom.getAttribute(e);this.dom.setAttribute(e,u==="open"?"close":"open")},a.prototype.destroy=function(){if(this.dom[t]){if(this.dom.removeEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-modal:request-close",this._onRequestClose),this.dom.removeEventListener("cancel",this._onCancel),this.dom.removeEventListener("close",this._onClose),this.dom.removeEventListener("click",this._onClickClose),s.delete(this),n(),this.isOpen){const u=this.dom;Array.prototype.some.call(document.querySelectorAll("["+e+'="open"]'),function(w){return w!==u})||document.body.classList.remove("ln-modal-open")}delete this.dom[t]}};function f(u){const d=u[t];if(!d)return;const w=!!d._isNativeClosing;d._isNativeClosing=!1;const p=u.getAttribute(e)==="open";if(p===d.isOpen){p&&u.isConnected&&!u.open&&typeof u.showModal=="function"&&u.showModal();return}if(p){if(j(u,"ln-modal:before-open",{modalId:u.id,target:u}).defaultPrevented){u.setAttribute(e,"close");return}d.isOpen=!0,document.body.classList.add("ln-modal-open"),typeof u.showModal=="function"&&u.showModal();const y=u.querySelector("[autofocus]");if(y&&O(y))y.focus();else{const x=u.querySelectorAll('input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled])'),A=Array.prototype.find.call(x,O);if(A)A.focus();else{const S=u.querySelectorAll("a[href], button:not([disabled])"),m=Array.prototype.find.call(S,O);m&&m.focus()}}_(u,"ln-modal:open",{modalId:u.id,target:u})}else{if(!w&&j(u,"ln-modal:before-close",{modalId:u.id,target:u}).defaultPrevented){u.setAttribute(e,"open");return}d.isOpen=!1,u.hasAttribute("data-ln-modal-mode")&&u.setAttribute("data-ln-modal-mode","new"),typeof u.close=="function"&&u.open&&u.close(),document.querySelector("["+e+'="open"]')||document.body.classList.remove("ln-modal-open"),_(u,"ln-modal:close",{modalId:u.id,target:u})}}ne(e,t,a,"ln-modal",{attributes:i})})()})();
1
+ (function(){"use strict";function B(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(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 l=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){l=t[r];break}if(!E(l))return}e.apply(console,t)}}function _(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function j(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(r),r}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 L(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ie(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function le(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,r={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&r[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);r[n.name]=n.value===""||isNaN(u)?null:u}else r[n.name]=n.value}return r}function de(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ue(e,t){const o=e.elements,l=[],r={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const u=String(n).split(",").map(function(f){return f.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=de(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ue,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=se);const W={};function ae(e,t){W[e]=t}function fe(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=fe);function we(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const U={};function he(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];U[o]=t}function be(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return U[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=he,window.lnCore.getLocaleFallback=be,window.lnCore.ensureLocaleObserver=we);const O={};function pe(e,t){O[e]||(O[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=O[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function V(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),a=f[1].trim();t[a]!=null&&c.setAttribute(d,t[a])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),a=f[1].trim();a in t&&c.classList.toggle(d,!!t[a])}}return e}function me(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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].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)V(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function H(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const i=r[s],c=i.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function ge(e,t,o,l,r,s){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],f=u.getAttribute("data-ln-render-key");f&&(i[f]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],f=String(l(u));let d=i[f];if(d)r(d,u,n);else{const a=pe(o,s);if(!a||(H(a,u),d=a.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",f),r(d,u,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=H,window.lnCore.fill=V,window.lnCore.lnFill=me,window.lnCore.renderList=ge);function q(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function K(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function G(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const r=l.trim().toLowerCase();return!(r==="false"||r==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const I=new Map;function J(e,t){const o=(e?e.join("|"):"")+"::"+t;if(I.has(o))return I.get(o);const l=new Set(e||[]),r=function(s,i){const c=s.getAttribute(i);return c!==null&&l.has(c)?c:t};return I.set(o,r),r}function P(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function z(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function X(e,t,o,l,r){if(!e||t===null)return!0;const s=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ce(e,t,o){for(const l in o){const[r,s,i]=o[l];Object.defineProperty(e,l,{get:function(){return r(t,s,i)},enumerable:!0,configurable:!0})}return e}function ye(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let r=l.read;if(!r&&l.type)switch(l.type){case"enum":r=J(l.values,l.fallback);break;case"integer":r=K;break;case"float":r=P;break;case"boolean":r=G;break;case"list":r=Q;break;case"json":r=z;break;case"string":default:r=q;break}r||(r=q),t[l.prop]=[r,o,l.fallback]}return t}function Ae(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ce,window.lnCore.attrSpec=ye,window.lnCore.attrStr=q,window.lnCore.attrInt=K,window.lnCore.attrBool=G,window.lnCore.attrList=Q,window.lnCore.attrEnum=J,window.lnCore.attrFloat=P,window.lnCore.attrJson=z);function g(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(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Y(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&g(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)g(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function _e(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ke(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 Z(){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 xe(e){const t=Z(),o=e.observed||[];for(let l=0;l<o.length;l++){const r=o[l];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const r=t.byDeclaredAttr.get(l);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=ve(e);if(l===null)t.reactiveWildcard.push(e);else for(const r of l)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,o,l){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function Se(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=Z(),r=l.byAttr.get(t),s=B()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!r&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&E(i)){const c=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<c.length;u++)X(c[u].spec,n,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&ee(c,i,t,e.oldValue),l.reactiveWildcard.length&&ee(l.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Y(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Se(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function te(e){const t=D();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=R();if(e.target&&l.length)for(let r=0;r<l.length;r++){const s=l[r],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&g(s,n);else if(s.matches&&s.matches(n.query)&&g(s,n),s.querySelectorAll){const u=s.querySelectorAll(n.query);for(let f=0;f<u.length;f++)g(u[f],n)}}n.onInit&&n.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){if(document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!i)s.matches&&s.matches(u)&&T(s,n);else if(s.matches&&s.matches(u)&&T(s,n),s.querySelectorAll){const f=s.querySelectorAll(u);for(let d=0;d<f.length;d++)T(f[d],n)}}}}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{te(l)}catch(r){console.error("[ln-core] lifecycle handler failed",l.target,r)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Le(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const o=t.takeRecords();for(let l=0;l<o.length;l++){const r=o[l];if(r.type==="childList")try{te(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Oe(e){D().push(e),e.onSubtreeChange&&e.query&&R().push(e),ne()}function oe(e,t,o,l,r={}){const s=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,u=r.onAttrChange||null,f=r.effects||null,d=r.attributes||null,a=d?Ae(d):f,w=d?new Set(Object.keys(d)):null,h=r.persist||null;function p(m){const b=m||document.body;if(Y(b,e,t,o),d&&B())for(const v in d){const Be=d[v],M=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&M.push(b);for(let $=0;$<M.length;$++){const N=M[$];E(N)&&X(Be,N.getAttribute(v),v,l,N)}}n&&n(b)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let b;for(;(b=m.exec(e))!==null;)C.push(b[1])}else C.push(e);xe({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:o,onInit:n,observed:C.concat(s),onAttributeChange:i,onAttrChange:u,effects:a,declared:w,persist:h}),Ee();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,x=r.subtreeQuery||(y?e:"["+e+"]"),A={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:x};D().push(A),c&&x&&R().push(A),ne(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=Oe,window.lnCore.withoutLifecycle=Le);function S(){_e()>0?ke(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",S):S(),p}function re(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},l=re(t);if(!l)return o;const r=l.split("&");for(let s=0;s<r.length;s++){const i=r[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function qe(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Ie(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");re(location.hash)!==r&&(location.hash=r)}function De(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(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 Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function $e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),r=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=qe,window.lnCore.hashSet=Ie,window.lnCore.hashLinkClick=De,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=$e);function Ne(){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=Ne),(function(){const e="data-ln-modal",t="lnModal",o="data-ln-modal-for",l="data-ln-modal-close";if(window[t]!==void 0)return;const r={"data-ln-modal":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the modal dialog"},"data-ln-modal-for":{type:"string",description:"Target modal ID to open on trigger click"},"data-ln-modal-mode":{type:"enum",values:["new","edit"],fallback:"new",description:"Operational mode of the modal (new vs edit)"},"data-ln-modal-close":{type:"trigger",description:"Click dismiss trigger inside the modal"}},s=new Set;let i=null;function c(){i||(i=function(d){if(ie(d))return;const a=d.target.closest("["+o+"]");if(!a||le(a))return;const w=a.getAttribute(o);if(!w)return;const h=document.getElementById(w);!h||!h[t]||(d.preventDefault(),a.hasAttribute("data-ln-modal-mode")?h.setAttribute("data-ln-modal-mode",a.getAttribute("data-ln-modal-mode")):h.hasAttribute("data-ln-modal-mode")&&h.setAttribute("data-ln-modal-mode","new"),h.setAttribute(e,"open"))},document.addEventListener("click",i))}function n(){s.size>0||!i||(document.removeEventListener("click",i),i=null)}function u(d){this.dom=d,this.isOpen=d.getAttribute(e)==="open";const a=this;return this._onRequestOpen=function(){a.dom.setAttribute(e,"open")},this._onRequestClose=function(){a.dom.setAttribute(e,"close")},this._onCancel=function(w){w.preventDefault(),a.dom.setAttribute(e,"close")},this._onClose=function(){!a.isOpen||a.dom.getAttribute(e)!=="open"||a.dom.open||(a._isNativeClosing=!0,a.dom.setAttribute(e,"close"))},this._onClickClose=function(w){const h=w.target.closest("["+l+"]");h&&a.dom.contains(h)&&(w.preventDefault(),a.dom.setAttribute(e,"close"))},this.dom.addEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.addEventListener("ln-modal:request-close",this._onRequestClose),this.dom.addEventListener("cancel",this._onCancel),this.dom.addEventListener("close",this._onClose),this.dom.addEventListener("click",this._onClickClose),s.add(this),c(),this.isOpen&&(typeof this.dom.showModal=="function"&&this.dom.showModal(),document.body.classList.add("ln-modal-open"),_(this.dom,"ln-modal:open",{modalId:this.dom.id,target:this.dom})),this}u.prototype.open=function(){this.dom.setAttribute(e,"open")},u.prototype.close=function(){this.dom.setAttribute(e,"close")},u.prototype.toggle=function(){const d=this.dom.getAttribute(e);this.dom.setAttribute(e,d==="open"?"close":"open")},u.prototype.destroy=function(){if(this.dom[t]){if(this.dom.removeEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-modal:request-close",this._onRequestClose),this.dom.removeEventListener("cancel",this._onCancel),this.dom.removeEventListener("close",this._onClose),this.dom.removeEventListener("click",this._onClickClose),s.delete(this),n(),this.isOpen){const d=this.dom;Array.prototype.some.call(document.querySelectorAll("["+e+'="open"]'),function(w){return w!==d})||document.body.classList.remove("ln-modal-open")}delete this.dom[t]}};function f(d){const a=d[t];if(!a)return;const w=!!a._isNativeClosing;a._isNativeClosing=!1;const p=d.getAttribute(e)==="open";if(p===a.isOpen){p&&d.isConnected&&!d.open&&typeof d.showModal=="function"&&d.showModal();return}if(p){if(j(d,"ln-modal:before-open",{modalId:d.id,target:d}).defaultPrevented){d.setAttribute(e,"close");return}a.isOpen=!0,document.body.classList.add("ln-modal-open"),typeof d.showModal=="function"&&d.showModal();const y=d.querySelector("[autofocus]");if(y&&L(y))y.focus();else{const x=d.querySelectorAll('input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled])'),A=Array.prototype.find.call(x,L);if(A)A.focus();else{const S=d.querySelectorAll("a[href], button:not([disabled])"),m=Array.prototype.find.call(S,L);m&&m.focus()}}_(d,"ln-modal:open",{modalId:d.id,target:d})}else{if(!w&&j(d,"ln-modal:before-close",{modalId:d.id,target:d}).defaultPrevented){d.setAttribute(e,"open");return}a.isOpen=!1,d.hasAttribute("data-ln-modal-mode")&&d.setAttribute("data-ln-modal-mode","new"),typeof d.close=="function"&&d.open&&d.close(),document.querySelector("["+e+'="open"]')||document.body.classList.remove("ln-modal-open"),_(d,"ln-modal:close",{modalId:d.id,target:d})}}oe(e,t,u,"ln-modal",{attributes:r})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function v(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 l=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){l=t[o];break}if(!v(l))return}e.apply(console,t)}}function T(e,t,r){const l=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function re(e,t,r){const l=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(o),o}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const r=!!(t&&t.typed),l=t&&t.exclude,o={},s=e.elements,i={};if(r)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")r&&i[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&o[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);o[n.name]=n.value===""||isNaN(c)?null:c}else o[n.name]=n.value}return o}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const r=e.elements,l=[],o={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(o[i.name]=(o[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const n=t[a];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(o[i.name]>1){const c=String(n).split(",").map(function(u){return u.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=le(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<i.options.length;c++)i.options[c].selected=n.indexOf(i.options[c].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=se,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=oe);const F={};function ae(e,t){F[e]=t}function ce(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=ce);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){T(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function de(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ue);const A={};function we(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=A[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const a=r[i],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const a=l[i],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&a.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const a=o[i],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&a.classList.toggle(d,!!t[f])}}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 r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<r.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[l],t??null),r[l].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)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function j(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const l=function(s,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const i=o[s],a=i.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function be(e,t,r,l,o,s){const i={};for(let n=0;n<e.children.length;n++){const c=e.children[n],u=c.getAttribute("data-ln-render-key");u&&(i[u]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],u=String(l(c));let d=i[u];if(d)o(d,c,n);else{const f=we(r,s);if(!f||(j(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,c,n)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=M,window.lnCore.lnFill=he,window.lnCore.renderList=be);function x(e,t,r){const l=e.getAttribute(t);return l===null?r:l}function B(e,t,r){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?r:l}function _(e,t,r=!1){const l=e.getAttribute(t);if(l===null)return!!r;const o=l.trim().toLowerCase();return!(o==="false"||o==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const k=new Map;function H(e,t){const r=(e?e.join("|"):"")+"::"+t;if(k.has(r))return k.get(r);const l=new Set(e||[]),o=function(s,i){const a=s.getAttribute(i);return a!==null&&l.has(a)?a:t};return k.set(r,o),o}function U(e,t,r){const l=parseFloat(e.getAttribute(t));return isNaN(l)?r:l}function V(e,t,r){const l=e.getAttribute(t);if(!l)return r;try{return JSON.parse(l)}catch{return r}}function P(e,t,r,l,o){if(!e||t===null)return!0;const s=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=n=>{o?console.warn(n,o):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,r){for(const l in r){const[o,s,i]=r[l];Object.defineProperty(e,l,{get:function(){return o(t,s,i)},enumerable:!0,configurable:!0})}return e}function z(e){const t={};for(const r in e){const l=e[r];if(!l||!l.prop)continue;let o=l.read;if(!o&&l.type)switch(l.type){case"enum":o=H(l.values,l.fallback);break;case"integer":o=B;break;case"float":o=U;break;case"boolean":o=_;break;case"list":o=W;break;case"json":o=V;break;case"string":default:o=x;break}o||(o=x),t[l.prop]=[o,r,l.fallback]}return t}function pe(e){const t={};for(const r in e){const l=e[r];l&&l.effect&&(t[r]=l.effect)}return Object.keys(t).length?t:null}function ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Q,window.lnCore.attrSpec=z,window.lnCore.attrStr=x,window.lnCore.attrInt=B,window.lnCore.attrBool=_,window.lnCore.attrList=W,window.lnCore.attrEnum=H,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function p(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(r){console.error("["+t.attribute+"] init failed",e,r)}}}function J(e,t,r,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:l};if(e.matches&&e.matches(s)&&p(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)p(a[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function me(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 K(){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 ye(e){const t=K(),r=e.observed||[];for(let l=0;l<r.length;l++){const o=r[l];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const o=t.byDeclaredAttr.get(l);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=ge(e);if(l===null)t.reactiveWildcard.push(e);else for(const o of l)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function G(e,t,r,l){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,l):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,l)}}function ve(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,l=K(),o=l.byAttr.get(t),s=I()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&v(i)){const a=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let c=0;c<a.length;c++)P(a[c].spec,n,t,a[c].componentTag,i)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const a=l.byReactive.get(t);a&&G(a,i,t,e.oldValue),l.reactiveWildcard.length&&G(l.reactiveWildcard,i,t,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const n=o[a];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(J(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ve(t[r])}catch(l){console.error("[ln-core] mutation handler failed",t[r].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function S(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function L(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function E(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=S();if(!t.length)return;const r=e.target;if(r){const o=r.nodeType===1?r:r.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=L();if(e.target&&l.length)for(let o=0;o<l.length;o++){const s=l[o],i=s.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;a&&s.onSubtreeChange(a,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&p(s,n);else if(s.matches&&s.matches(n.query)&&p(s,n),s.querySelectorAll){const c=s.querySelectorAll(n.query);for(let u=0;u<c.length;u++)p(c[u],n)}}n.onInit&&n.onInit(s)}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a],c=n.query;if(c){if(!i)s.matches&&s.matches(c)&&E(s,n);else if(s.matches&&s.matches(c)&&E(s,n),s.querySelectorAll){const u=s.querySelectorAll(c);for(let d=0;d<u.length;d++)E(u[d],n)}}}}}}function X(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const l=t[r];if(l.type==="childList")try{xe(l)}catch(o){console.error("[ln-core] lifecycle handler failed",l.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){S().push(e),e.onSubtreeChange&&e.query&&L().push(e),X()}function Y(e,t,r,l,o={}){const s=o.extraAttributes||[],i=o.onAttributeChange||null,a=o.onSubtreeChange||null,n=o.onInit||null,c=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?pe(d):u,w=d?new Set(Object.keys(d)):null,g=o.persist||null;function b(D){const h=D||document.body;if(J(h,e,t,r),d&&I())for(const m in d){const Te=d[m],N=Array.from(h.querySelectorAll("["+m+"]"));h.matches&&h.matches("["+m+"]")&&N.push(h);for(let q=0;q<N.length;q++){const $=N[q];v($)&&P(Te,$.getAttribute(m),m,l,$)}}n&&n(h)}const C=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let h;for(;(h=D.exec(e))!==null;)C.push(h[1])}else C.push(e);ye({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:r,onInit:n,observed:C.concat(s),onAttributeChange:i,onAttrChange:c,effects:f,declared:w,persist:g}),Ae();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ee=o.subtreeQuery||(Ie?e:"["+e+"]"),te={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:a,query:ee};S().push(te),a&&ee&&L().push(te),X(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Y,window.lnCore.observeLifecycle=_e);function ne(){Ce()>0?me(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ne):ne(),b}function Z(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,r={},l=Z(t);if(!l)return r;const o=l.split("&");for(let s=0;s<o.length;s++){const i=o[s];if(!i)continue;const a=i.indexOf(":"),n=a>-1?i.slice(0,a):i,c=a>-1?i.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function ke(e){if(!e)return null;const t=O();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=O();t==null?delete r[e]:r[e]=String(t);const o=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");Z(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(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 Ne(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 r=e.slice(0,t),l=e.slice(t+1),o=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=ke,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ne,window.lnCore.hashFilterDecode=qe);function $e(){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=$e),(function(){const e="data-ln-nav",t="lnNav";if(window[t]!==void 0)return;const r={"data-ln-nav":{effect:i,type:"string",fallback:"active",description:"CSS class name applied to active navigation links"},"data-ln-nav-exact":{prop:"exact",read:_,effect:i,type:"boolean",fallback:!1,description:"Match exact URL pathname instead of prefix matching"}},l=z(r);if(history._lnNavCallbacks=history._lnNavCallbacks||[],!history._lnNavPatched){const a=history.pushState;history.pushState=function(){a.apply(history,arguments);for(const c of history._lnNavCallbacks)c()};const n=history.replaceState;history.replaceState=function(){n.apply(history,arguments);for(const c of history._lnNavCallbacks)c()},history._lnNavPatched=!0}function o(a){return this.dom=a,Q(this,a,l),this.activeClass=a.getAttribute(e)||"active",this.updateHandler=()=>this.update(),window.addEventListener("popstate",this.updateHandler),history._lnNavCallbacks.push(this.updateHandler),this.observer=null,this.update(),this}o.prototype.update=function(){if(!this.activeClass||re(this.dom,"ln-nav:before-update",{target:this.dom}).defaultPrevented)return;const n=Array.from(this.dom.querySelectorAll("a")),c=window.location.pathname,u=s(c),d=[];for(const f of n){const w=f.getAttribute("href");if(!w||w==="#"||w.startsWith("#")||w.startsWith("javascript:")||w.startsWith("mailto:")||w.startsWith("tel:")){f.classList.remove(this.activeClass),f.removeAttribute("aria-current");continue}if(f.hostname&&f.hostname!==window.location.hostname){f.classList.remove(this.activeClass),f.removeAttribute("aria-current");continue}const g=s(w),b=g===u,C=!this.exact&&g!=="/"&&u.startsWith(g+"/");b||C?(f.classList.add(this.activeClass),f.setAttribute("aria-current","page"),d.push(f)):(f.classList.remove(this.activeClass),f.removeAttribute("aria-current"))}T(this.dom,"ln-nav:update",{target:this.dom,activeLinks:d})},o.prototype.destroy=function(){if(!this.dom[t])return;this.observer&&this.observer.disconnect(),window.removeEventListener("popstate",this.updateHandler);const a=history._lnNavCallbacks.indexOf(this.updateHandler);a!==-1&&history._lnNavCallbacks.splice(a,1),delete this.dom[t]};function s(a){try{return new URL(a,window.location.href).pathname.replace(/\/$/,"")||"/"}catch{return a.replace(/\/$/,"")||"/"}}function i(a,n){const c=a[t];if(c){if(n===e){if(!a.hasAttribute(e)){c.destroy();return}const u=c.activeClass,d=a.getAttribute(e)||"active";if(u!==d){const f=a.querySelectorAll("a");for(const w of f)u&&w.classList.remove(u);c.activeClass=d}}c.update()}}Y(e,t,o,"ln-nav",{attributes:r,onSubtreeChange:function(a){a[t]&&a[t].update()}})})()})();
1
+ (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function v(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 i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!v(i))return}e.apply(console,t)}}function T(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function oe(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(o),o}function m(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){m(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,o={},s=e.elements,l={};if(r)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&o[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);o[n.name]=n.value===""||isNaN(c)?null:c}else o[n.name]=n.value}return o}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ae(e,t){const r=e.elements,i=[],o={};for(let s=0;s<r.length;s++){const l=r[s];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let s=0;s<r.length;s++){const l=r[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const n=t[a];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const c=String(n).split(",").map(function(u){return u.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=se(n);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<l.options.length;c++)l.options[c].selected=n.indexOf(l.options[c].value)!==-1;i.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ae,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=ie);const F={};function ce(e,t){F[e]=t}function ue(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){T(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function fe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=de);const A={};function he(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=A[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const a=r[l],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const a=i[l],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&a.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const a=o[l],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&a.classList.toggle(d,!!t[f])}}return e}function be(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 r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].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)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function j(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],a=l.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function pe(e,t,r,i,o,s){const l={};for(let n=0;n<e.children.length;n++){const c=e.children[n],u=c.getAttribute("data-ln-render-key");u&&(l[u]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],u=String(i(c));let d=l[u];if(d)o(d,c,n);else{const f=he(r,s);if(!f||(j(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,c,n)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=M,window.lnCore.lnFill=be,window.lnCore.renderList=pe);function _(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function B(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function x(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const k=new Map;function H(e,t){const r=(e?e.join("|"):"")+"::"+t;if(k.has(r))return k.get(r);const i=new Set(e||[]),o=function(s,l){const a=s.getAttribute(l);return a!==null&&i.has(a)?a:t};return k.set(r,o),o}function U(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function V(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function P(e,t,r,i,o){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,r){for(const i in r){const[o,s,l]=r[i];Object.defineProperty(e,i,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function z(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=H(i.values,i.fallback);break;case"integer":o=B;break;case"float":o=U;break;case"boolean":o=x;break;case"list":o=W;break;case"json":o=V;break;case"string":default:o=_;break}o||(o=_),t[i.prop]=[o,r,i.fallback]}return t}function ge(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function Ce(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Q,window.lnCore.attrSpec=z,window.lnCore.attrStr=_,window.lnCore.attrInt=B,window.lnCore.attrBool=x,window.lnCore.attrList=W,window.lnCore.attrEnum=H,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function p(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(r){console.error("["+t.attribute+"] init failed",e,r)}}}function J(e,t,r,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(s)&&p(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)p(a[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function me(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 K(){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 ve(e){const t=K(),r=e.observed||[];for(let i=0;i<r.length;i++){const o=r[i];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Ce(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function G(e,t,r,i){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const l=s.effects&&s.effects[r];l?l(t,r,i):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,i)}}function Ae(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=K(),o=i.byAttr.get(t),s=I()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&v(l)){const a=i.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let c=0;c<a.length;c++)P(a[c].spec,n,t,a[c].componentTag,l)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const a=i.byReactive.get(t);a&&G(a,l,t,e.oldValue),i.reactiveWildcard.length&&G(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const n=o[a];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(J(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,m(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ae(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function S(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function L(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function O(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function X(e){const t=S();if(!t.length)return;const r=e.target;if(r){const o=r.nodeType===1?r:r.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=L();if(e.target&&i.length)for(let o=0;o<i.length;o++){const s=i[o],l=s.query,a=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;a&&s.onSubtreeChange(a,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)s.matches&&s.matches(n.query)&&p(s,n);else if(s.matches&&s.matches(n.query)&&p(s,n),s.querySelectorAll){const c=s.querySelectorAll(n.query);for(let u=0;u<c.length;u++)p(c[u],n)}}n.onInit&&n.onInit(s)}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a],c=n.query;if(c){if(!l)s.matches&&s.matches(c)&&O(s,n);else if(s.matches&&s.matches(c)&&O(s,n),s.querySelectorAll){const u=s.querySelectorAll(c);for(let d=0;d<u.length;d++)O(u[d],n)}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{X(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let i=0;i<r.length;i++){const o=r[i];if(o.type==="childList")try{X(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function ke(e){S().push(e),e.onSubtreeChange&&e.query&&L().push(e),Y()}function Z(e,t,r,i,o={}){const s=o.extraAttributes||[],l=o.onAttributeChange||null,a=o.onSubtreeChange||null,n=o.onInit||null,c=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?ge(d):u,w=d?new Set(Object.keys(d)):null,g=o.persist||null;function b(D){const h=D||document.body;if(J(h,e,t,r),d&&I())for(const y in d){const Fe=d[y],N=Array.from(h.querySelectorAll("["+y+"]"));h.matches&&h.matches("["+y+"]")&&N.push(h);for(let q=0;q<N.length;q++){const $=N[q];v($)&&P(Fe,$.getAttribute(y),y,i,$)}}n&&n(h)}const C=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let h;for(;(h=D.exec(e))!==null;)C.push(h[1])}else C.push(e);ve({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:r,onInit:n,observed:C.concat(s),onAttributeChange:l,onAttrChange:c,effects:f,declared:w,persist:g}),_e();const Te=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,te=o.subtreeQuery||(Te?e:"["+e+"]"),ne={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:a,query:te};S().push(ne),a&&te&&L().push(ne),Y(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=ke,window.lnCore.withoutLifecycle=xe);function re(){ye()>0?me(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),b}function ee(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,r={},i=ee(t);if(!i)return r;const o=i.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const a=l.indexOf(":"),n=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function Se(e){if(!e)return null;const t=E();return e in t?t[e]:null}function Le(e,t){if(!e)return;const r=E();t==null?delete r[e]:r[e]=String(t);const o=Object.keys(r).map(function(s){const l=r[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");ee(location.hash)!==o&&(location.hash=o)}function Oe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function De(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ne(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 qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function $e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=Se,window.lnCore.hashSet=Le,window.lnCore.hashLinkClick=Oe,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Ne,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=$e);function Ie(){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=Ie),(function(){const e="data-ln-nav",t="lnNav";if(window[t]!==void 0)return;const r={"data-ln-nav":{effect:l,type:"string",fallback:"active",description:"CSS class name applied to active navigation links"},"data-ln-nav-exact":{prop:"exact",read:x,effect:l,type:"boolean",fallback:!1,description:"Match exact URL pathname instead of prefix matching"}},i=z(r);if(history._lnNavCallbacks=history._lnNavCallbacks||[],!history._lnNavPatched){const a=history.pushState;history.pushState=function(){a.apply(history,arguments);for(const c of history._lnNavCallbacks)c()};const n=history.replaceState;history.replaceState=function(){n.apply(history,arguments);for(const c of history._lnNavCallbacks)c()},history._lnNavPatched=!0}function o(a){return this.dom=a,Q(this,a,i),this.activeClass=a.getAttribute(e)||"active",this.updateHandler=()=>this.update(),window.addEventListener("popstate",this.updateHandler),history._lnNavCallbacks.push(this.updateHandler),this.observer=null,this.update(),this}o.prototype.update=function(){if(!this.activeClass||oe(this.dom,"ln-nav:before-update",{target:this.dom}).defaultPrevented)return;const n=Array.from(this.dom.querySelectorAll("a")),c=window.location.pathname,u=s(c),d=[];for(const f of n){const w=f.getAttribute("href");if(!w||w==="#"||w.startsWith("#")||w.startsWith("javascript:")||w.startsWith("mailto:")||w.startsWith("tel:")){f.classList.remove(this.activeClass),f.removeAttribute("aria-current");continue}if(f.hostname&&f.hostname!==window.location.hostname){f.classList.remove(this.activeClass),f.removeAttribute("aria-current");continue}const g=s(w),b=g===u,C=!this.exact&&g!=="/"&&u.startsWith(g+"/");b||C?(f.classList.add(this.activeClass),f.setAttribute("aria-current","page"),d.push(f)):(f.classList.remove(this.activeClass),f.removeAttribute("aria-current"))}T(this.dom,"ln-nav:update",{target:this.dom,activeLinks:d})},o.prototype.destroy=function(){if(!this.dom[t])return;this.observer&&this.observer.disconnect(),window.removeEventListener("popstate",this.updateHandler);const a=history._lnNavCallbacks.indexOf(this.updateHandler);a!==-1&&history._lnNavCallbacks.splice(a,1),delete this.dom[t]};function s(a){try{return new URL(a,window.location.href).pathname.replace(/\/$/,"")||"/"}catch{return a.replace(/\/$/,"")||"/"}}function l(a,n){const c=a[t];if(c){if(n===e){if(!a.hasAttribute(e)){c.destroy();return}const u=c.activeClass,d=a.getAttribute(e)||"active";if(u!==d){const f=a.querySelectorAll("a");for(const w of f)u&&w.classList.remove(u);c.activeClass=d}}c.update()}}Z(e,t,o,"ln-nav",{attributes:r,onSubtreeChange:function(a){a[t]&&a[t].update()}})})()})();