@livenetworks/ashlar 2.0.8 → 2.0.10

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