@livenetworks/ashlar 2.1.11 → 2.1.12

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 (58) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-queue/ln-api-queue.js +1 -1
  5. package/components/ln-autosave/ln-autosave.js +1 -1
  6. package/components/ln-chart/ln-chart.js +1 -1
  7. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  8. package/components/ln-confirm/ln-confirm.js +1 -1
  9. package/components/ln-core/events.js +5 -2
  10. package/components/ln-core/lifecycle.js +25 -44
  11. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  12. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  13. package/components/ln-data-store/ln-data-store.js +1 -1
  14. package/components/ln-date/ln-date.js +1 -1
  15. package/components/ln-debug/ln-debug.js +1 -1
  16. package/components/ln-debug/ln-debug.schema.json +28 -28
  17. package/components/ln-debug/src/debug-verifier.js +24 -30
  18. package/components/ln-debug/src/ln-debug.js +3 -11
  19. package/components/ln-dropdown/ln-dropdown.js +1 -1
  20. package/components/ln-editor/ln-editor.js +1 -1
  21. package/components/ln-external-links/ln-external-links.js +1 -1
  22. package/components/ln-filter/ln-filter.js +1 -1
  23. package/components/ln-form/ln-form.js +1 -1
  24. package/components/ln-icon/ln-icon.js +1 -1
  25. package/components/ln-include/ln-include.js +1 -1
  26. package/components/ln-key/ln-key.js +1 -1
  27. package/components/ln-link/ln-link.js +1 -1
  28. package/components/ln-list/ln-list.js +1 -1
  29. package/components/ln-modal/ln-modal.js +1 -1
  30. package/components/ln-nav/ln-nav.js +1 -1
  31. package/components/ln-number/ln-number.js +1 -1
  32. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  33. package/components/ln-options/ln-options.js +1 -1
  34. package/components/ln-persist/ln-persist.js +1 -1
  35. package/components/ln-picklist/ln-picklist.js +1 -1
  36. package/components/ln-popover/ln-popover.js +1 -1
  37. package/components/ln-progress/ln-progress.js +1 -1
  38. package/components/ln-router/ln-router.js +1 -1
  39. package/components/ln-scroll/ln-scroll.js +1 -1
  40. package/components/ln-search/ln-search.js +1 -1
  41. package/components/ln-slug/ln-slug.js +1 -1
  42. package/components/ln-sort/ln-sort.js +1 -1
  43. package/components/ln-sortable/ln-sortable.js +1 -1
  44. package/components/ln-stat/ln-stat.js +1 -1
  45. package/components/ln-table/ln-table.js +1 -1
  46. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  47. package/components/ln-tabs/ln-tabs.js +1 -1
  48. package/components/ln-time/ln-time.js +1 -1
  49. package/components/ln-toast/ln-toast.js +1 -1
  50. package/components/ln-toggle/ln-toggle.js +1 -1
  51. package/components/ln-tooltip/ln-tooltip.js +1 -1
  52. package/components/ln-translations/ln-translations.js +1 -1
  53. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  54. package/components/ln-upload/ln-upload.js +1 -1
  55. package/components/ln-validate/ln-validate.js +1 -1
  56. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  57. package/package.json +1 -1
  58. package/web-types.json +1 -1
@@ -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(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!j(o))return}e.apply(console,t)}}function F(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function Te(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function O(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){O(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function Re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Fe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let d=0;d<r.options.length;d++)r.options[d].selected&&i[r.name].push(r.options[d].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const d=Number(r.value);i[r.name]=r.value===""||isNaN(d)?null:d}else i[r.name]=r.value}return i}function Oe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function De(e,t){const n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const d=String(r).split(",").map(function(b){return b.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=Oe(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let d=0;d<l.options.length;d++)l.options[d].selected=r.indexOf(l.options[d].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=De,window.lnCore.serializeForm=Fe,window.lnCore.resolveFormMethod=Re);const ee={};function Ne(e,t){ee[e]=t}function Be(e){return ee[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ne,window.lnCore.getDataMapper=Be);function Me(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,O(function(){new MutationObserver(function(){F(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const te={};function $e(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];te[n]=t}function je(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return te[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=$e,window.lnCore.getLocaleFallback=je,window.lnCore.ensureLocaleObserver=Me);const P={};function Pe(e,t){P[e]||(P[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=P[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function ne(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-attr").split(",");for(let d=0;d<r.length;d++){const b=r[d].trim().split(":");if(b.length!==2)continue;const m=b[0].trim(),k=b[1].trim();t[k]!=null&&c.setAttribute(m,t[k])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let d=0;d<r.length;d++){const b=r[d].trim().split(":");if(b.length!==2)continue;const m=b[0].trim(),k=b[1].trim();k in t&&c.classList.toggle(m,!!t[k])}}return e}function He(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)ne(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 re(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],c=l.attributes;for(let r=0;r<c.length;r++){const d=c[r];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ve(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const d=e.children[r],b=d.getAttribute("data-ln-render-key");b&&(l[b]=d)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const d=t[r],b=String(o(d));let m=l[b];if(m)i(m,d,r);else{const k=Pe(n,s);if(!k||(re(k,d),m=k.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",b),i(m,d,r)}c.appendChild(m)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=re,window.lnCore.fill=ne,window.lnCore.lnFill=He,window.lnCore.renderList=Ve);function D(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function oe(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function ie(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function le(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const H=new Map;function se(e,t){const n=(e?e.join("|"):"")+"::"+t;if(H.has(n))return H.get(n);const o=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&o.has(c)?c:t};return H.set(n,i),i}function ce(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ae(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ue(e,t,n,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function fe(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=se(o.values,o.fallback);break;case"integer":i=oe;break;case"float":i=ce;break;case"boolean":i=ie;break;case"list":i=le;break;case"json":i=ae;break;case"string":default:i=D;break}i||(i=D),t[o.prop]=[i,n,o.fallback]}return t}function Ue(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function We(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=de,window.lnCore.attrSpec=fe,window.lnCore.attrStr=D,window.lnCore.attrInt=oe,window.lnCore.attrBool=ie,window.lnCore.attrList=le,window.lnCore.attrEnum=se,window.lnCore.attrFloat=ce,window.lnCore.attrJson=ae);function L(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function he(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&L(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)L(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ke(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function I(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function we(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Qe(e){const t=we(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=We(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ye(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ge(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=we(),i=o.byAttr.get(t),s=X()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&j(l)){const c=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let d=0;d<c.length;d++)ue(c[d].spec,r,t,c[d].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&ye(c,l,t,e.oldValue),o.reactiveWildcard.length&&ye(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const r=i[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(he(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,O(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ge(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function U(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function W(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=V();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=U();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)s.matches&&s.matches(r.query)&&L(s,r);else if(s.matches&&s.matches(r.query)&&L(s,r),s.querySelectorAll){const d=s.querySelectorAll(r.query);for(let b=0;b<d.length;b++)L(d[b],r)}}r.onInit&&r.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],d=r.query;if(d){if(!l)s.matches&&s.matches(d)&&W(s,r);else if(s.matches&&s.matches(d)&&W(s,r),s.querySelectorAll){const b=s.querySelectorAll(d);for(let m=0;m<b.length;m++)W(b[m],r)}}}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,O(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ge(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ze(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{ge(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ye(e){V().push(e),e.onSubtreeChange&&e.query&&U().push(e),pe()}function be(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,r=i.onInit||null,d=i.onAttrChange||null,b=i.effects||null,m=i.attributes||null,k=m?Ue(m):b,Y=m?new Set(Object.keys(m)):null,T=i.persist||null;function v(q){const a=q||document.body;if(he(a,e,t,n),m&&X())for(const f in m){const u=m[f],h=Array.from(a.querySelectorAll("["+f+"]"));a.matches&&a.matches("["+f+"]")&&h.push(a);for(let y=0;y<h.length;y++){const w=h[y];j(w)&&ue(u,w.getAttribute(f),f,o,w)}}r&&r(a)}const x=[];if(e.indexOf("[")!==-1){const q=/\[([\w-]+)/g;let a;for(;(a=q.exec(e))!==null;)x.push(a[1])}else x.push(e);Qe({selector:e,attribute:t,componentTag:o,attributes:m,ComponentFn:n,onInit:r,observed:x.concat(s),onAttributeChange:l,onAttrChange:d,effects:k,declared:Y,persist:T}),Je();const S=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,E=i.subtreeQuery||(S?e:"["+e+"]"),B={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:E};V().push(B),c&&E&&U().push(B),pe(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ye,window.lnCore.withoutLifecycle=ze);function M(){Ke()>0?I(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",M):M(),v}function me(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function Ce(e){return(e||"").replace(/^#/,"")}function K(e){const t=e===void 0?location.hash:e,n={},o=Ce(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,d=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(d)}catch{n[r]=d}}return n}function Q(e){if(!e)return null;const t=K();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=K();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Ce(location.hash)!==i&&(location.hash=i)}function Xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function N(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ze(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function et(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function _e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function G(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=K,window.lnCore.hashGet=Q,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=Xe,window.lnCore.resolveHashNamespace=N,window.lnCore.hashSortEncode=Ze,window.lnCore.hashSortDecode=et,window.lnCore.hashFilterEncode=_e,window.lnCore.hashFilterDecode=G);function tt(e){return(e||"").replace(/^\?/,"")}function nt(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=tt(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function J(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function ve(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function ke(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function rt(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ot(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Se(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function z(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=nt,window.lnCore.queryGet=J,window.lnCore.querySet=ve,window.lnCore.resolveQueryParam=ke,window.lnCore.querySortEncode=rt,window.lnCore.querySortDecode=ot,window.lnCore.queryFilterEncode=Se,window.lnCore.queryFilterDecode=z);function it(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=it);function Ee(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let o=0;o<t.length;o++)if(String(t[o]).trim().toLowerCase()===n)return!0;return!1}function lt(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function st(e,t,n){if(!t||typeof t!="object")return!0;const o=Object.keys(t);if(o.length===0)return!0;for(let i=0;i<o.length;i++){const s=t[o[i]];let l="";if(s.col!==null&&s.col!==void 0?l=e[s.col]||"":s.attr&&n&&typeof n.getAttribute=="function"&&(l=n.getAttribute(s.attr)||""),!Ee(l,s.values))return!1}return!0}function qe(e,t,n,o){if(o!=null&&!isNaN(o))return parseInt(o,10);if(t&&typeof t.getAttribute=="function"){const i=t.getAttribute("data-ln-filter-col");if(i!==null&&!isNaN(parseInt(i,10)))return parseInt(i,10);if(typeof t.closest=="function"){const s=t.closest("th");if(s&&typeof s.cellIndex=="number")return s.cellIndex;const l=t.closest("[data-ln-popover], [id]");if(l&&l.id){const c=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(c&&typeof c.querySelector=="function"){const r=c.querySelector('[data-ln-popover-for="'+l.id+'"]');if(r&&typeof r.closest=="function"){const d=r.closest("th");if(d&&typeof d.cellIndex=="number")return d.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const i=e.querySelectorAll("thead th, tr:first-child th"),s=String(n).trim().toLowerCase();for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-table-filter-col")||c.getAttribute("data-ln-filter-col")||c.getAttribute("data-ln-filter-key")||c.getAttribute("data-ln-table-col")||c.getAttribute("data-ln-col")||c.getAttribute("data-ln-field");if(r&&r.trim().toLowerCase()===s)return typeof c.cellIndex=="number"?c.cellIndex:l}if(t){const l=t.closest?t.closest("[data-ln-popover], [id]"):null,c=l&&l.id||t.id||null;if(c)for(let r=0;r<i.length;r++){const d=i[r];if(typeof d.querySelector=="function"&&d.querySelector('[data-ln-popover-for="'+c+'"]'))return typeof d.cellIndex=="number"?d.cellIndex:r}}for(let l=0;l<i.length;l++){const c=i[l],d=Array.from(c.childNodes||[]).filter(m=>m.nodeType===3),b=(d.length>0?d.map(m=>m.textContent.trim()).join(" "):c.textContent||"").trim().toLowerCase();if(b&&b===s)return typeof c.cellIndex=="number"?c.cellIndex:l}}return null}function ct(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let o=0;o<e.length;o++){const i=e[o];!t&&i.key&&(t=i.key),i.checked&&!i.isReset&&i.value&&n.push(i.value)}return{key:t,values:n}}function at(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function xe(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",o="data-ln-filter-value",i="data-ln-filter-hide",s="data-ln-filter-reset",l="data-ln-filter-col",c="data-ln-hash",r="data-ln-query",d="data-ln-filter-values",b="data-ln-filter-target",m=new WeakMap;if(window[t]!==void 0)return;const k={"data-ln-filter":{prop:"targetId",type:"string",read:D,fallback:null,effect:q,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:q,description:"URL hash routing key for filter state persistence"},"data-ln-query":{type:"string",effect:q,description:"URL query parameter name for filter state synchronization"},"data-ln-filter-values":{type:"string",effect:q,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-filter-target":{type:"marker",description:"Marker on target container or table observed by ln-filter"}},Y=fe(k);function T(a){if(!a.hasAttribute(r))return null;const f=a.getAttribute(r);if(f&&f.trim()!=="")return f.trim();const u=a.getAttribute(l);if(u&&isNaN(parseInt(u,10)))return u.trim();const h=a.querySelector("["+n+"]");if(h){const y=h.getAttribute(n);if(y&&y.trim()!=="")return y.trim()}return ke(a,"filter")}function v(a){return a.hasAttribute(s)||!a.getAttribute(o)}function x(a){const f=a.dom.querySelectorAll("["+n+"]"),u=[];for(let y=0;y<f.length;y++){const w=f[y];u.push({key:w.getAttribute(n),value:w.getAttribute(o)||"",checked:w.checked,isReset:v(w)})}const h=ct(u);return{key:h.key,values:h.values,targetId:a.targetId}}function S(a,f,u){const h=a.querySelectorAll("["+n+"]"),y=Array.isArray(u)&&u.length>0;for(let w=0;w<h.length;w++){const g=h[w];v(g)?g.checked=!y:y&&g.getAttribute(n)===f&&u.indexOf(g.getAttribute(o))!==-1?g.checked=!0:g.checked=!1}}function E(a){this.dom=a,de(this,a,Y);const f=a.getAttribute(l);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=N(a,"filter"),this.hashEnabled=!!this.nsKey,this.queryParam=T(a),this.queryEnabled=!!this.queryParam;const u=this,h=me(function(){u._render()});this._queueRender=h;const y=me(function(){u._destroyed||u._applyDomFilter()});this._queueDomFilter=y;function w(){if(!u.targetId)return;const p=document.getElementById(u.targetId);p&&!p.hasAttribute(b)&&p.setAttribute(b,u.targetId)}this._ensureTargetMarked=w,w(),I(function(){u._destroyed||w()}),this._attachHandlers(),this._onHashChange=function(){if(u._destroyed||!u.hashEnabled)return;const p=Q(u.nsKey),C=G(p);C&&C.key&&C.values.length>0?S(u.dom,C.key,C.values):S(u.dom,null,[]),u._render()},this._onPopState=function(){if(u._destroyed||!u.queryEnabled)return;const p=J(u.queryParam),C=z(p),_=u.dom.querySelector("["+n+"]"),A=_?_.getAttribute(n):u.queryParam;S(u.dom,A,C),u._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let g=!1;if(this.hashEnabled){const p=Q(this.nsKey),C=G(p);C&&C.key&&C.values.length>0&&(S(a,C.key,C.values),I(function(){u._destroyed||u._render()}),g=!0)}else if(this.queryEnabled){const p=J(this.queryParam),C=z(p);if(C.length>0){const _=a.querySelector("["+n+"]"),A=_?_.getAttribute(n):u.queryParam;S(a,A,C),I(function(){u._destroyed||u._render()}),g=!0}}if(!g){const p=xe(a.getAttribute(d));if(p.length>0){const C=a.querySelector("["+n+"]"),_=C?C.getAttribute(n):null;_&&(S(a,_,p),I(function(){u._destroyed||u._render()}),g=!0)}}if(!g){const p=a.querySelectorAll("["+n+"]");for(let C=0;C<p.length;C++)if(p[C].checked&&!v(p[C])){I(function(){u._destroyed||u._render()});break}}return this}E.prototype._attachHandlers=function(){const a=this;this._onDomChange=function(f){const u=f.target;if(!u||!u.hasAttribute||!u.hasAttribute(n))return;const h=Array.from(a.dom.querySelectorAll("["+n+"]"));if(v(u)){for(let y=0;y<h.length;y++)v(h[y])||(h[y].checked=!1);u.checked=!0,a._queueRender();return}if(u.checked){for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!1);let y=!1;for(let w=0;w<h.length;w++)if(v(h[w])){y=!0;break}if(y){let w=!0;for(let g=0;g<h.length;g++)if(!v(h[g])&&!h[g].checked){w=!1;break}if(w)for(let g=0;g<h.length;g++)v(h[g])?h[g].checked=!0:h[g].checked=!1}}else{let y=!1;for(let w=0;w<h.length;w++)if(!v(h[w])&&h[w].checked){y=!0;break}if(!y)for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!0)}a._queueRender()},this.dom.addEventListener("change",this._onDomChange)},E.prototype._render=function(){const a=this,f=x(this),u=this._lastSnapshot;if(!(!u||u.key!==f.key||lt(u.values,f.values)))return;f.key===null||f.values.length;const y=document.getElementById(a.targetId),w={key:f.key,values:f.values.slice(),targetId:a.targetId};F(a.dom,"ln-filter:change",w);let g=!1;y&&y!==a.dom&&Te(y,"ln-filter:change",w).defaultPrevented&&(g=!0);const p=u&&u.values.length>0,C=f.values.length===0;if(p&&C){const A={targetId:a.targetId};F(a.dom,"ln-filter:reset",A),y&&y!==a.dom&&F(y,"ln-filter:reset",A)}this._lastSnapshot={key:f.key,values:f.values.slice()};const _=at(f.values);if(_?this.dom.setAttribute(d,_):this.dom.removeAttribute(d),this.hashEnabled){const A=_e(f.key,f.values);Ae(this.nsKey,A)}else if(this.queryEnabled){const A=Se(f.values),R=this.queryParam||f.key;R&&ve(R,A)}g||a._applyDomFilter(y)},E.prototype._applyDomFilter=function(a){const f=a||document.getElementById(this.targetId);if(!f)return;const u=x(this),h=u.key===null||u.values.length===0,y=f.tagName==="TABLE"?f:f.querySelector?f.querySelector("table"):null;if(y)this._filterTableRows(u,y);else{const w=f.children;for(let g=0;g<w.length;g++){const p=w[g],C=h?null:p.getAttribute("data-"+u.key),_=!h&&C!==null&&!Ee(C,u.values),A=p.hasAttribute(i);_&&!A?p.setAttribute(i,"true"):!_&&A&&p.removeAttribute(i)}}};function B(a){if(!a)return"";const f=a.querySelector?a.querySelector("[data-ln-value]"):null;return Z(f||a)}function M(a){return!!(!a||typeof a!="object"||a.tagName==="TEMPLATE"||typeof a.hasAttribute=="function"&&(a.hasAttribute("data-ln-sort-exclude")||a.hasAttribute("hidden"))||a.classList&&a.classList.contains("hidden")||a.style&&a.style.display==="none"||typeof a.matches=="function"&&a.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof a.querySelector=="function"&&a.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}E.prototype._filterTableRows=function(a,f){if(!f){const p=document.getElementById(this.targetId);if(!p||(f=p.tagName==="TABLE"?p:p.querySelector?p.querySelector("table"):null,!f))return}const u=qe(f,this.dom,a.key,this.colIndex),h=a.key||this.dom.getAttribute("data-ln-filter-key")||(u!==null?"col"+u:"attr-filter"),y=a.values;m.has(f)||m.set(f,{});const w=m.get(f);h&&y.length>0?w[h]={col:u,values:y.slice(),attr:"data-"+h}:h&&delete w[h];const g=f.tBodies;for(let p=0;p<g.length;p++){const C=g[p].rows;for(let _=0;_<C.length;_++){const A=C[_];if(M(A))continue;const R={};for(let $=0;$<A.cells.length;$++)R[$]=B(A.cells[$]);const Ie=!st(R,w,A),Le=A.hasAttribute(i);Ie&&!Le?A.setAttribute(i,"true"):!Ie&&Le&&A.removeAttribute(i)}}},E.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const a=document.getElementById(this.targetId);if(a){const f=a.tagName==="TABLE"?a:a.querySelector?a.querySelector("table"):null;if(f&&m.has(f)){const u=m.get(f),h=qe(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),y=this.dom.getAttribute("data-ln-filter-key")||(h!==null?"col"+h:this.colIndex!==null?"col"+this.colIndex:null);y&&u[y]&&(delete u[y],this._filterTableRows({key:null,values:[]},f)),Object.keys(u).length===0&&m.delete(f)}this.targetId&&document.querySelectorAll("["+e+'="'+this.targetId+'"]').length<=1&&a.removeAttribute(b)}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t]};function q(a,f){const u=a[t];if(!(!u||u._destroyed))if(f===c)u.hashEnabled&&u._onHashChange&&window.removeEventListener("hashchange",u._onHashChange),u.nsKey=N(a,"filter"),u.hashEnabled=!!u.nsKey,u.hashEnabled&&window.addEventListener("hashchange",u._onHashChange);else if(f===r)u.queryEnabled&&u._onPopState&&window.removeEventListener("popstate",u._onPopState),u.queryParam=T(a),u.queryEnabled=!!u.queryParam,u.queryEnabled&&window.addEventListener("popstate",u._onPopState);else if(f===d){const h=xe(a.getAttribute(d)),y=a.querySelector("["+n+"]"),w=y?y.getAttribute(n):null;w&&(S(a,w,h),u._render())}else f===e&&(u.targetId=a.getAttribute(e)||null,u._ensureTargetMarked(),u._render())}be(e,t,E,"ln-filter",{attributes:k,subtreeQuery:"["+e+"], ["+b+"]",onSubtreeChange:function(a,f){if(f.addedNodes.length===0&&f.removedNodes.length===0)return;let u=null,h=null;if(a.hasAttribute(b)?(h=a,u=a.getAttribute(b)||a.id):a.hasAttribute(e)&&(u=a.getAttribute(e),h=u?document.getElementById(u):null),!u||!h)return;const y=document.querySelectorAll("["+e+'="'+u+'"]');for(let w=0;w<y.length;w++){const g=y[w][t];g&&!g._destroyed&&x(g).values.length>0&&g._queueDomFilter()}},persist:{attr:d,hashActive:function(a){return!!N(a,"filter")||!!T(a)}}})})()})();
1
+ (function(){"use strict";function Y(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function j(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!j(o))return}e.apply(console,t)}}function R(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function Te(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function F(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){F(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function X(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function Re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Fe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let u=0;u<s.length;u++){const r=s[u];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let u=0;u<s.length;u++){const r=s[u];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let d=0;d<r.options.length;d++)r.options[d].selected&&i[r.name].push(r.options[d].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const d=Number(r.value);i[r.name]=r.value===""||isNaN(d)?null:d}else i[r.name]=r.value}return i}function Oe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function De(e,t){const n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const u=l.getAttribute("data-ln-fill-as")||l.name;if(!u||!(u in t))continue;const r=t[u];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const d=String(r).split(",").map(function(m){return m.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=Oe(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let d=0;d<l.options.length;d++)l.options[d].selected=r.indexOf(l.options[d].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=De,window.lnCore.serializeForm=Fe,window.lnCore.resolveFormMethod=Re);const Z={};function Ne(e,t){Z[e]=t}function Be(e){return Z[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ne,window.lnCore.getDataMapper=Be);function Me(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,F(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const ee={};function $e(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];ee[n]=t}function je(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return ee[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=$e,window.lnCore.getLocaleFallback=je,window.lnCore.ensureLocaleObserver=Me);const P={};function Pe(e,t){P[e]||(P[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=P[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function te(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const u=n[l],r=u.getAttribute("data-ln-field");t[r]!=null&&(u.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const u=o[l],r=u.getAttribute("data-ln-attr").split(",");for(let d=0;d<r.length;d++){const m=r[d].trim().split(":");if(m.length!==2)continue;const y=m[0].trim(),k=m[1].trim();t[k]!=null&&u.setAttribute(y,t[k])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const u=i[l],r=u.getAttribute("data-ln-show");r in t&&u.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const u=s[l],r=u.getAttribute("data-ln-class").split(",");for(let d=0;d<r.length;d++){const m=r[d].trim().split(":");if(m.length!==2)continue;const y=m[0].trim(),k=m[1].trim();k in t&&u.classList.toggle(y,!!t[k])}}return e}function He(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)te(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function ne(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,u){return t[u]!==void 0?t[u]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],u=l.attributes;for(let r=0;r<u.length;r++){const d=u[r];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ve(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const d=e.children[r],m=d.getAttribute("data-ln-render-key");m&&(l[m]=d)}const u=document.createDocumentFragment();for(let r=0;r<t.length;r++){const d=t[r],m=String(o(d));let y=l[m];if(y)i(y,d,r);else{const k=Pe(n,s);if(!k||(ne(k,d),y=k.firstElementChild,!y))continue;y.setAttribute("data-ln-render-key",m),i(y,d,r)}u.appendChild(y)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=ne,window.lnCore.fill=te,window.lnCore.lnFill=He,window.lnCore.renderList=Ve);function O(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function re(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function oe(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function ie(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const H=new Map;function le(e,t){const n=(e?e.join("|"):"")+"::"+t;if(H.has(n))return H.get(n);const o=new Set(e||[]),i=function(s,l){const u=s.getAttribute(l);return u!==null&&o.has(u)?u:t};return H.set(n,i),i}function se(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ue(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ce(e,t,n,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const u=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(u(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(u(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return u(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(u(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(u(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(u(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return u(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ae(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=le(o.values,o.fallback);break;case"integer":i=re;break;case"float":i=se;break;case"boolean":i=oe;break;case"list":i=ie;break;case"json":i=ue;break;case"string":default:i=O;break}i||(i=O),t[o.prop]=[i,n,o.fallback]}return t}function Ue(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function We(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ae,window.lnCore.attrSpec=de,window.lnCore.attrStr=O,window.lnCore.attrInt=re,window.lnCore.attrBool=oe,window.lnCore.attrList=ie,window.lnCore.attrEnum=le,window.lnCore.attrFloat=se,window.lnCore.attrJson=ue);function D(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function fe(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&D(e,l),e.querySelectorAll){const u=e.querySelectorAll(s);for(let r=0;r<u.length;r++)D(u[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ke(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function I(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function he(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Qe(e){const t=he(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=We(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function we(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ge(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=he(),i=o.byAttr.get(t),s=Y()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&j(l)){const u=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let d=0;d<u.length;d++)ce(u[d].spec,r,t,u[d].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const u=o.byReactive.get(t);u&&we(u,l,t,e.oldValue),o.reactiveWildcard.length&&we(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let u=0;u<i.length;u++){const r=i[u];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(fe(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,F(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ge(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function U(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function ge(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=V();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=U();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;u&&s.onSubtreeChange(u,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType!==1)continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let u=0;u<t.length;u++){const r=t[u],d=r.query;if(d&&(s.matches&&s.matches(d)&&(r.ComponentFn&&D(s,r),r.onInit&&r.onInit(s)),l&&s.querySelectorAll)){const m=s.querySelectorAll(d);for(let y=0;y<m.length;y++)r.ComponentFn&&D(m[y],r),r.onInit&&r.onInit(m[y])}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType!==1||document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let u=0;u<t.length;u++){const r=t[u],d=r.query;if(d&&(s.matches&&s.matches(d)&&ge(s,r),l&&s.querySelectorAll)){const m=s.querySelectorAll(d);for(let y=0;y<m.length;y++)ge(m[y],r)}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,F(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ye(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ze(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{ye(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ye(e){V().push(e),e.onSubtreeChange&&e.query&&U().push(e),pe()}function be(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,u=i.onSubtreeChange||null,r=i.onInit||null,d=i.onAttrChange||null,m=i.effects||null,y=i.attributes||null,k=y?Ue(y):m,z=y?new Set(Object.keys(y)):null,L=i.persist||null;function v(x){const c=x||document.body;if(fe(c,e,t,n),y&&Y())for(const f in y){const a=y[f],h=Array.from(c.querySelectorAll("["+f+"]"));c.matches&&c.matches("["+f+"]")&&h.push(c);for(let g=0;g<h.length;g++){const w=h[g];j(w)&&ce(a,w.getAttribute(f),f,o,w)}}r&&r(c)}const q=[];if(e.indexOf("[")!==-1){const x=/\[([\w-]+)/g;let c;for(;(c=x.exec(e))!==null;)q.push(c[1])}else q.push(e);Qe({selector:e,attribute:t,componentTag:o,attributes:y,ComponentFn:n,onInit:r,observed:q.concat(s),onAttributeChange:l,onAttrChange:d,effects:k,declared:z,persist:L}),Je();const S=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,E=i.subtreeQuery||(S?e:"["+e+"]"),B={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:u,query:E};V().push(B),u&&E&&U().push(B),pe(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ye,window.lnCore.withoutLifecycle=ze);function M(){Ke()>0?I(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",M):M(),v}function me(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function Ce(e){return(e||"").replace(/^#/,"")}function W(e){const t=e===void 0?location.hash:e,n={},o=Ce(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const u=l.indexOf(":"),r=u>-1?l.slice(0,u):l,d=u>-1?l.slice(u+1):"";if(r)try{n[r]=decodeURIComponent(d)}catch{n[r]=d}}return n}function K(e){if(!e)return null;const t=W();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=W();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Ce(location.hash)!==i&&(location.hash=i)}function Xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function N(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ze(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function et(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function _e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Q(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=W,window.lnCore.hashGet=K,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=Xe,window.lnCore.resolveHashNamespace=N,window.lnCore.hashSortEncode=Ze,window.lnCore.hashSortDecode=et,window.lnCore.hashFilterEncode=_e,window.lnCore.hashFilterDecode=Q);function tt(e){return(e||"").replace(/^\?/,"")}function nt(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=tt(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function G(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function ve(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function ke(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function rt(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ot(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Se(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function J(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=nt,window.lnCore.queryGet=G,window.lnCore.querySet=ve,window.lnCore.resolveQueryParam=ke,window.lnCore.querySortEncode=rt,window.lnCore.querySortDecode=ot,window.lnCore.queryFilterEncode=Se,window.lnCore.queryFilterDecode=J);function it(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=it);function Ee(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let o=0;o<t.length;o++)if(String(t[o]).trim().toLowerCase()===n)return!0;return!1}function lt(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function st(e,t,n){if(!t||typeof t!="object")return!0;const o=Object.keys(t);if(o.length===0)return!0;for(let i=0;i<o.length;i++){const s=t[o[i]];let l="";if(s.col!==null&&s.col!==void 0?l=e[s.col]||"":s.attr&&n&&typeof n.getAttribute=="function"&&(l=n.getAttribute(s.attr)||""),!Ee(l,s.values))return!1}return!0}function xe(e,t,n,o){if(o!=null&&!isNaN(o))return parseInt(o,10);if(t&&typeof t.getAttribute=="function"){const i=t.getAttribute("data-ln-filter-col");if(i!==null&&!isNaN(parseInt(i,10)))return parseInt(i,10);if(typeof t.closest=="function"){const s=t.closest("th");if(s&&typeof s.cellIndex=="number")return s.cellIndex;const l=t.closest("[data-ln-popover], [id]");if(l&&l.id){const u=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(u&&typeof u.querySelector=="function"){const r=u.querySelector('[data-ln-popover-for="'+l.id+'"]');if(r&&typeof r.closest=="function"){const d=r.closest("th");if(d&&typeof d.cellIndex=="number")return d.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const i=e.querySelectorAll("thead th, tr:first-child th"),s=String(n).trim().toLowerCase();for(let l=0;l<i.length;l++){const u=i[l],r=u.getAttribute("data-ln-table-filter-col")||u.getAttribute("data-ln-filter-col")||u.getAttribute("data-ln-filter-key")||u.getAttribute("data-ln-table-col")||u.getAttribute("data-ln-col")||u.getAttribute("data-ln-field");if(r&&r.trim().toLowerCase()===s)return typeof u.cellIndex=="number"?u.cellIndex:l}if(t){const l=t.closest?t.closest("[data-ln-popover], [id]"):null,u=l&&l.id||t.id||null;if(u)for(let r=0;r<i.length;r++){const d=i[r];if(typeof d.querySelector=="function"&&d.querySelector('[data-ln-popover-for="'+u+'"]'))return typeof d.cellIndex=="number"?d.cellIndex:r}}for(let l=0;l<i.length;l++){const u=i[l],d=Array.from(u.childNodes||[]).filter(y=>y.nodeType===3),m=(d.length>0?d.map(y=>y.textContent.trim()).join(" "):u.textContent||"").trim().toLowerCase();if(m&&m===s)return typeof u.cellIndex=="number"?u.cellIndex:l}}return null}function ut(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let o=0;o<e.length;o++){const i=e[o];!t&&i.key&&(t=i.key),i.checked&&!i.isReset&&i.value&&n.push(i.value)}return{key:t,values:n}}function ct(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function qe(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",o="data-ln-filter-value",i="data-ln-filter-hide",s="data-ln-filter-reset",l="data-ln-filter-col",u="data-ln-hash",r="data-ln-query",d="data-ln-filter-values",m="data-ln-filter-target",y=new WeakMap;if(window[t]!==void 0)return;const k={"data-ln-filter":{prop:"targetId",type:"string",read:O,fallback:null,effect:x,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:x,description:"URL hash routing key for filter state persistence"},"data-ln-query":{type:"string",effect:x,description:"URL query parameter name for filter state synchronization"},"data-ln-filter-values":{type:"string",effect:x,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-filter-target":{type:"marker",description:"Marker on target container or table observed by ln-filter"}},z=de(k);function L(c){if(!c.hasAttribute(r))return null;const f=c.getAttribute(r);if(f&&f.trim()!=="")return f.trim();const a=c.getAttribute(l);if(a&&isNaN(parseInt(a,10)))return a.trim();const h=c.querySelector("["+n+"]");if(h){const g=h.getAttribute(n);if(g&&g.trim()!=="")return g.trim()}return ke(c,"filter")}function v(c){return c.hasAttribute(s)||!c.getAttribute(o)}function q(c){const f=c.dom.querySelectorAll("["+n+"]"),a=[];for(let g=0;g<f.length;g++){const w=f[g];a.push({key:w.getAttribute(n),value:w.getAttribute(o)||"",checked:w.checked,isReset:v(w)})}const h=ut(a);return{key:h.key,values:h.values,targetId:c.targetId}}function S(c,f,a){const h=c.querySelectorAll("["+n+"]"),g=Array.isArray(a)&&a.length>0;for(let w=0;w<h.length;w++){const p=h[w];v(p)?p.checked=!g:g&&p.getAttribute(n)===f&&a.indexOf(p.getAttribute(o))!==-1?p.checked=!0:p.checked=!1}}function E(c){this.dom=c,ae(this,c,z);const f=c.getAttribute(l);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=N(c,"filter"),this.hashEnabled=!!this.nsKey,this.queryParam=L(c),this.queryEnabled=!!this.queryParam;const a=this,h=me(function(){a._render()});this._queueRender=h;const g=me(function(){a._destroyed||a._applyDomFilter()});this._queueDomFilter=g;function w(){if(!a.targetId)return;const b=document.getElementById(a.targetId);b&&!b.hasAttribute(m)&&b.setAttribute(m,a.targetId)}this._ensureTargetMarked=w,w(),I(function(){a._destroyed||w()}),this._attachHandlers(),this._onHashChange=function(){if(a._destroyed||!a.hashEnabled)return;const b=K(a.nsKey),C=Q(b);C&&C.key&&C.values.length>0?S(a.dom,C.key,C.values):S(a.dom,null,[]),a._render()},this._onPopState=function(){if(a._destroyed||!a.queryEnabled)return;const b=G(a.queryParam),C=J(b),_=a.dom.querySelector("["+n+"]"),A=_?_.getAttribute(n):a.queryParam;S(a.dom,A,C),a._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let p=!1;if(this.hashEnabled){const b=K(this.nsKey),C=Q(b);C&&C.key&&C.values.length>0&&(S(c,C.key,C.values),I(function(){a._destroyed||a._render()}),p=!0)}else if(this.queryEnabled){const b=G(this.queryParam),C=J(b);if(C.length>0){const _=c.querySelector("["+n+"]"),A=_?_.getAttribute(n):a.queryParam;S(c,A,C),I(function(){a._destroyed||a._render()}),p=!0}}if(!p){const b=qe(c.getAttribute(d));if(b.length>0){const C=c.querySelector("["+n+"]"),_=C?C.getAttribute(n):null;_&&(S(c,_,b),I(function(){a._destroyed||a._render()}),p=!0)}}if(!p){const b=c.querySelectorAll("["+n+"]");for(let C=0;C<b.length;C++)if(b[C].checked&&!v(b[C])){I(function(){a._destroyed||a._render()});break}}return this}E.prototype._attachHandlers=function(){const c=this;this._onDomChange=function(f){const a=f.target;if(!a||!a.hasAttribute||!a.hasAttribute(n))return;const h=Array.from(c.dom.querySelectorAll("["+n+"]"));if(v(a)){for(let g=0;g<h.length;g++)v(h[g])||(h[g].checked=!1);a.checked=!0,c._queueRender();return}if(a.checked){for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!1);let g=!1;for(let w=0;w<h.length;w++)if(v(h[w])){g=!0;break}if(g){let w=!0;for(let p=0;p<h.length;p++)if(!v(h[p])&&!h[p].checked){w=!1;break}if(w)for(let p=0;p<h.length;p++)v(h[p])?h[p].checked=!0:h[p].checked=!1}}else{let g=!1;for(let w=0;w<h.length;w++)if(!v(h[w])&&h[w].checked){g=!0;break}if(!g)for(let w=0;w<h.length;w++)v(h[w])&&(h[w].checked=!0)}c._queueRender()},this.dom.addEventListener("change",this._onDomChange)},E.prototype._render=function(){const c=this,f=q(this),a=this._lastSnapshot;if(!(!a||a.key!==f.key||lt(a.values,f.values)))return;f.key===null||f.values.length;const g=document.getElementById(c.targetId),w={key:f.key,values:f.values.slice(),targetId:c.targetId};R(c.dom,"ln-filter:change",w);let p=!1;g&&g!==c.dom&&Te(g,"ln-filter:change",w).defaultPrevented&&(p=!0);const b=a&&a.values.length>0,C=f.values.length===0;if(b&&C){const A={targetId:c.targetId};R(c.dom,"ln-filter:reset",A),g&&g!==c.dom&&R(g,"ln-filter:reset",A)}this._lastSnapshot={key:f.key,values:f.values.slice()};const _=ct(f.values);if(_?this.dom.setAttribute(d,_):this.dom.removeAttribute(d),this.hashEnabled){const A=_e(f.key,f.values);Ae(this.nsKey,A)}else if(this.queryEnabled){const A=Se(f.values),T=this.queryParam||f.key;T&&ve(T,A)}p||c._applyDomFilter(g)},E.prototype._applyDomFilter=function(c){const f=c||document.getElementById(this.targetId);if(!f)return;const a=q(this),h=a.key===null||a.values.length===0,g=f.tagName==="TABLE"?f:f.querySelector?f.querySelector("table"):null;if(g)this._filterTableRows(a,g);else{const w=f.children;for(let p=0;p<w.length;p++){const b=w[p],C=h?null:b.getAttribute("data-"+a.key),_=!h&&C!==null&&!Ee(C,a.values),A=b.hasAttribute(i);_&&!A?b.setAttribute(i,"true"):!_&&A&&b.removeAttribute(i)}}};function B(c){if(!c)return"";const f=c.querySelector?c.querySelector("[data-ln-value]"):null;return X(f||c)}function M(c){return!!(!c||typeof c!="object"||c.tagName==="TEMPLATE"||typeof c.hasAttribute=="function"&&(c.hasAttribute("data-ln-sort-exclude")||c.hasAttribute("hidden"))||c.classList&&c.classList.contains("hidden")||c.style&&c.style.display==="none"||typeof c.matches=="function"&&c.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof c.querySelector=="function"&&c.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}E.prototype._filterTableRows=function(c,f){if(!f){const b=document.getElementById(this.targetId);if(!b||(f=b.tagName==="TABLE"?b:b.querySelector?b.querySelector("table"):null,!f))return}const a=xe(f,this.dom,c.key,this.colIndex),h=c.key||this.dom.getAttribute("data-ln-filter-key")||(a!==null?"col"+a:"attr-filter"),g=c.values;y.has(f)||y.set(f,{});const w=y.get(f);h&&g.length>0?w[h]={col:a,values:g.slice(),attr:"data-"+h}:h&&delete w[h];const p=f.tBodies;for(let b=0;b<p.length;b++){const C=p[b].rows;for(let _=0;_<C.length;_++){const A=C[_];if(M(A))continue;const T={};for(let $=0;$<A.cells.length;$++)T[$]=B(A.cells[$]);const Ie=!st(T,w,A),Le=A.hasAttribute(i);Ie&&!Le?A.setAttribute(i,"true"):!Ie&&Le&&A.removeAttribute(i)}}},E.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const c=document.getElementById(this.targetId);if(c){const f=c.tagName==="TABLE"?c:c.querySelector?c.querySelector("table"):null;if(f&&y.has(f)){const a=y.get(f),h=xe(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),g=this.dom.getAttribute("data-ln-filter-key")||(h!==null?"col"+h:this.colIndex!==null?"col"+this.colIndex:null);g&&a[g]&&(delete a[g],this._filterTableRows({key:null,values:[]},f)),Object.keys(a).length===0&&y.delete(f)}this.targetId&&document.querySelectorAll("["+e+'="'+this.targetId+'"]').length<=1&&c.removeAttribute(m)}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t]};function x(c,f){const a=c[t];if(!(!a||a._destroyed))if(f===u)a.hashEnabled&&a._onHashChange&&window.removeEventListener("hashchange",a._onHashChange),a.nsKey=N(c,"filter"),a.hashEnabled=!!a.nsKey,a.hashEnabled&&window.addEventListener("hashchange",a._onHashChange);else if(f===r)a.queryEnabled&&a._onPopState&&window.removeEventListener("popstate",a._onPopState),a.queryParam=L(c),a.queryEnabled=!!a.queryParam,a.queryEnabled&&window.addEventListener("popstate",a._onPopState);else if(f===d){const h=qe(c.getAttribute(d)),g=c.querySelector("["+n+"]"),w=g?g.getAttribute(n):null;w&&(S(c,w,h),a._render())}else f===e&&(a.targetId=c.getAttribute(e)||null,a._ensureTargetMarked(),a._render())}be(e,t,E,"ln-filter",{attributes:k,subtreeQuery:"["+e+"], ["+m+"]",onSubtreeChange:function(c,f){if(f.addedNodes.length===0&&f.removedNodes.length===0)return;let a=null,h=null;if(c.hasAttribute(m)?(h=c,a=c.getAttribute(m)||c.id):c.hasAttribute(e)&&(a=c.getAttribute(e),h=a?document.getElementById(a):null),!a||!h)return;const g=document.querySelectorAll("["+e+'="'+a+'"]');for(let w=0;w<g.length;w++){const p=g[w][t];p&&!p._destroyed&&q(p).values.length>0&&p._queueDomFilter()}},persist:{attr:d,hashActive:function(c){return!!N(c,"filter")||!!L(c)}}})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!y(i))return}e.apply(console,t)}}function ne(e,t,o){const i=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const o=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,r={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")o&&r[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")l[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function T(e,t){const o=e.elements,i=[],l={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(l[r.name]=(l[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const n=t[c];if(r.type==="checkbox"){if(Array.isArray(n))r.checked=n.indexOf(r.value)!==-1;else if(l[r.name]>1){const u=String(n).split(",").map(function(d){return d.trim()});r.checked=u.indexOf(r.value)!==-1}else r.checked=ie(n);i.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),i.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<r.options.length;u++)r.options[u].selected=n.indexOf(r.options[u].value)!==-1;i.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),i.push(r)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=T,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const D={};function le(e,t){D[e]=t}function se(e){return D[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){ne(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function ue(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];F[o]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ce);const C={};function ae(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=C[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[r],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<i.length;r++){const c=i[r],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(a,!!t[f])}}return e}function fe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<o.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[i],t??null),o[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)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function M(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const 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],c=r.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&r.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function we(e,t,o,i,l,s){const r={};for(let n=0;n<e.children.length;n++){const u=e.children[n],d=u.getAttribute("data-ln-render-key");d&&(r[d]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],d=String(i(u));let a=r[d];if(a)l(a,u,n);else{const f=ae(o,s);if(!f||(M(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,n)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=R,window.lnCore.lnFill=fe,window.lnCore.renderList=we);function g(e,t,o){const i=e.getAttribute(t);return i===null?o:i}function $(e,t,o){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?o:i}function N(e,t,o=!1){const i=e.getAttribute(t);if(i===null)return!!o;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const A=new Map;function U(e,t){const o=(e?e.join("|"):"")+"::"+t;if(A.has(o))return A.get(o);const i=new Set(e||[]),l=function(s,r){const c=s.getAttribute(r);return c!==null&&i.has(c)?c:t};return A.set(o,l),l}function j(e,t,o){const i=parseFloat(e.getAttribute(t));return isNaN(i)?o:i}function W(e,t,o){const i=e.getAttribute(t);if(!i)return o;try{return JSON.parse(i)}catch{return o}}function H(e,t,o,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 c=n=>{l?console.warn(n,l):console.warn(n)};if(r==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function P(e,t,o){for(const i in o){const[l,s,r]=o[i];Object.defineProperty(e,i,{get:function(){return l(t,s,r)},enumerable:!0,configurable:!0})}return e}function V(e){const t={};for(const o in e){const i=e[o];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=U(i.values,i.fallback);break;case"integer":l=$;break;case"float":l=j;break;case"boolean":l=N;break;case"list":l=B;break;case"json":l=W;break;case"string":default:l=g;break}l||(l=g),t[i.prop]=[l,o,i.fallback]}return t}function he(e){const t={};for(const o in e){const i=e[o];i&&i.effect&&(t[o]=i.effect)}return Object.keys(t).length?t:null}function pe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=P,window.lnCore.attrSpec=V,window.lnCore.attrStr=g,window.lnCore.attrInt=$,window.lnCore.attrBool=N,window.lnCore.attrList=B,window.lnCore.attrEnum=U,window.lnCore.attrFloat=j,window.lnCore.attrJson=W);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Q(e,t,o,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:i};if(e.matches&&e.matches(s)&&h(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function 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 me(e){const t=J(),o=e.observed||[];for(let i=0;i<o.length;i++){const l=o[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=pe(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 K(e,t,o,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,i):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,i)}}function ye(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,i=J(),l=i.byAttr.get(t),s=I()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&y(r)){const c=i.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let u=0;u<c.length;u++)H(c[u].spec,n,t,c[u].componentTag,r)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=i.byReactive.get(t);c&&K(c,r,t,e.oldValue),i.reactiveWildcard.length&&K(i.reactiveWildcard,r,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(Q(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{ye(t[o])}catch(i){console.error("[ln-core] mutation handler failed",t[o].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function v(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function x(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function G(e){const t=_();if(!t.length)return;const o=e.target;if(o){const l=o.nodeType===1?o:o.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=v();if(e.target&&i.length)for(let l=0;l<i.length;l++){const s=i[l],r=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!r)s.matches&&s.matches(n.query)&&h(s,n);else if(s.matches&&s.matches(n.query)&&h(s,n),s.querySelectorAll){const u=s.querySelectorAll(n.query);for(let d=0;d<u.length;d++)h(u[d],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){if(document.contains(s))continue;const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!r)s.matches&&s.matches(u)&&x(s,n);else if(s.matches&&s.matches(u)&&x(s,n),s.querySelectorAll){const d=s.querySelectorAll(u);for(let a=0;a<d.length;a++)x(d[a],n)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){const e=new MutationObserver(function(t){for(let o=0;o<t.length;o++){const i=t[o];if(i.type==="childList")try{G(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const o=t.takeRecords();for(let i=0;i<o.length;i++){const l=o[i];if(l.type==="childList")try{G(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function _e(e){_().push(e),e.onSubtreeChange&&e.query&&v().push(e),z()}function X(e,t,o,i,l={}){const s=l.extraAttributes||[],r=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?he(a):d,je=a?new Set(Object.keys(a)):null,We=l.persist||null;function m(E){const w=E||document.body;if(Q(w,e,t,o),a&&I())for(const p in a){const Pe=a[p],L=Array.from(w.querySelectorAll("["+p+"]"));w.matches&&w.matches("["+p+"]")&&L.push(w);for(let O=0;O<L.length;O++){const q=L[O];y(q)&&H(Pe,q.getAttribute(p),p,i,q)}}n&&n(w)}const k=[];if(e.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let w;for(;(w=E.exec(e))!==null;)k.push(w[1])}else k.push(e);me({selector:e,attribute:t,componentTag:i,attributes:a,ComponentFn:o,onInit:n,observed:k.concat(s),onAttributeChange:r,onAttrChange:u,effects:f,declared:je,persist:We}),Ce();const He=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Z=l.subtreeQuery||(He?e:"["+e+"]"),ee={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:Z};_().push(ee),c&&Z&&v().push(ee),z(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X,window.lnCore.observeLifecycle=_e,window.lnCore.withoutLifecycle=Ae);function te(){be()>0?ge(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",te):te(),m}function Y(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,o={},i=Y(t);if(!i)return o;const l=i.split("&");for(let s=0;s<l.length;s++){const r=l[s];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,u=c>-1?r.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function ve(e){if(!e)return null;const t=S();return e in t?t[e]:null}function xe(e,t){if(!e)return;const o=S();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const r=o[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 ke(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const 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 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 Oe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=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:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=ve,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=Se,window.lnCore.resolveHashNamespace=ke,window.lnCore.hashSortEncode=Ee,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=qe);function Ie(e){return(e||"").replace(/^\?/,"")}function Te(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,o={},i=Ie(t);if(!i)return o;const l=new URLSearchParams(i);for(const[s,r]of l.entries())o[s]=r;return o}function De(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Fe(e,t){if(!e||typeof window>"u")return;const o=new URL(window.location.href);if(t==null||t===""?o.searchParams.delete(e):o.searchParams.set(e,String(t)),o.search===window.location.search)return;const i=o.pathname+o.search+o.hash;window.history.replaceState(window.history.state,"",i)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const o=e.getAttribute("data-ln-query");if(o&&o.trim()!=="")return o.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 Me(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function $e(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const o=t.sort_field||t.sort_by;if(o){const i=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:o,direction:i}}}return null}function Ne(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Be(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Te,window.lnCore.queryGet=De,window.lnCore.querySet=Fe,window.lnCore.resolveQueryParam=Re,window.lnCore.querySortEncode=Me,window.lnCore.querySortDecode=$e,window.lnCore.queryFilterEncode=Ne,window.lnCore.queryFilterDecode=Be);function Ue(){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=Ue),(function(){const e="data-ln-form",t="lnForm";if(window[t]!==void 0)return;const o={"data-ln-form":{type:"marker",description:"Identifies the form element as an enhanced ln-form"},"data-ln-form-action-edit":{prop:"_actionEdit",type:"string",read:g,fallback:"",description:"URL template or endpoint used when editing an existing record"},"data-ln-form-action-method":{prop:"_actionMethod",type:"enum",values:["PUT","POST","PATCH"],fallback:"PUT",description:"HTTP method used when submitting edit action"}},i=V(o);function l(s){this.dom=s,P(this,s,i),this._baseAction=s.getAttribute("action")||"";const r=this;function c(){const u=r.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let d=0;d<u.length;d++)u[d].hasAttribute("data-ln-initial-value")||u[d].setAttribute("data-ln-initial-value",u[d].getAttribute("value")||"")}function n(){const u=r.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let d=0;d<u.length;d++)u[d].value=u[d].getAttribute("data-ln-initial-value")||""}return c(),this._onLnFill=function(u){u.target===r.dom&&(u.detail?(c(),r.fill(u.detail),r._applyActionMode(u.detail)):(r.dom.reset(),n()))},this._onReset=function(){r._applyActionMode(null),n()},s.addEventListener("ln-fill",this._onLnFill),s.addEventListener("reset",this._onReset),this}l.prototype.fill=function(s){const r=T(this.dom,s);for(let c=0;c<r.length;c++){const n=r[c],u=n.tagName==="SELECT"||n.type==="checkbox"||n.type==="radio";n.dispatchEvent(new Event(u?"change":"input",{bubbles:!0}))}},l.prototype.reset=function(){this.dom.reset(),this._applyActionMode(null);const s=this.dom.elements;for(let r=0;r<s.length;r++){const c=s[r],n=c.tagName==="SELECT"||c.type==="checkbox"||c.type==="radio";c.dispatchEvent(new Event(n?"change":"input",{bubbles:!0}))}},l.prototype._ensureMethodInput=function(){let s=this.dom.querySelector('input[name="_method"]');return s||(s=document.createElement("input"),s.type="hidden",s.name="_method",s.value="",this.dom.appendChild(s)),s},l.prototype._applyActionMode=function(s){if(!this.dom.hasAttribute("data-ln-form-action-edit"))return;const r=s&&s.id!=null&&s.id!==""?s.id:null,c=this._ensureMethodInput();if(r!==null){const n=this._actionEdit;n?this.dom.setAttribute("action",n.replace(":id",encodeURIComponent(r))):this.dom.setAttribute("action",this._baseAction.replace(/\/$/,"")+"/"+encodeURIComponent(r)),c.value=this._actionMethod||"PUT"}else this.dom.setAttribute("action",this._baseAction),c.value=""},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-fill",this._onLnFill),this.dom.removeEventListener("reset",this._onReset),delete this.dom[t])},X(e,t,l,"ln-form",{attributes:o})})()})();
1
+ (function(){"use strict";function q(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function 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 i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!y(i))return}e.apply(console,t)}}function ne(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 p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,r={};if(n)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(r[o.name]=(r[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];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 u=0;u<o.options.length;u++)o.options[u].selected&&l[o.name].push(o.options[u].value)}else if(n&&o.type==="hidden")l[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const u=Number(o.value);l[o.name]=o.value===""||isNaN(u)?null:u}else l[o.name]=o.value}return l}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function I(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 c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const o=t[c];if(r.type==="checkbox"){if(Array.isArray(o))r.checked=o.indexOf(r.value)!==-1;else if(l[r.name]>1){const u=String(o).split(",").map(function(d){return d.trim()});r.checked=u.indexOf(r.value)!==-1}else r.checked=ie(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 u=0;u<r.options.length;u++)r.options[u].selected=o.indexOf(r.options[u].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=I,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const T={};function le(e,t){T[e]=t}function se(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){ne(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const D={};function ue(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];D[n]=t}function de(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=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ce);const C={};function ae(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 F(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],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<i.length;r++){const c=i[r],o=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const d=o[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const c=l[r],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],o=c.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const d=o[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(a,!!t[f])}}return e}function fe(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)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(r,c){return t[c]!==void 0?t[c]:""}))}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],c=r.attributes;for(let o=0;o<c.length;o++){const u=c[o];u.value.indexOf("{{")!==-1&&r.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function we(e,t,n,i,l,s){const r={};for(let o=0;o<e.children.length;o++){const u=e.children[o],d=u.getAttribute("data-ln-render-key");d&&(r[d]=u)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],d=String(i(u));let a=r[d];if(a)l(a,u,o);else{const f=ae(n,s);if(!f||(R(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,o)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=R,window.lnCore.fill=F,window.lnCore.lnFill=fe,window.lnCore.renderList=we);function b(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function M(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function $(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 N(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const A=new Map;function B(e,t){const n=(e?e.join("|"):"")+"::"+t;if(A.has(n))return A.get(n);const i=new Set(e||[]),l=function(s,r){const c=s.getAttribute(r);return c!==null&&i.has(c)?c:t};return A.set(n,l),l}function U(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function j(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function W(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 c=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"?(c(`[${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:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.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 o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} 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(o){return c(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function H(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 P(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=B(i.values,i.fallback);break;case"integer":l=M;break;case"float":l=U;break;case"boolean":l=$;break;case"list":l=N;break;case"json":l=j;break;case"string":default:l=b;break}l||(l=b),t[i.prop]=[l,n,i.fallback]}return t}function he(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.effect)}return Object.keys(t).length?t:null}function pe(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=H,window.lnCore.attrSpec=P,window.lnCore.attrStr=b,window.lnCore.attrInt=M,window.lnCore.attrBool=$,window.lnCore.attrList=N,window.lnCore.attrEnum=B,window.lnCore.attrFloat=U,window.lnCore.attrJson=j);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function V(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&g(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)g(c[o],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function 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 Q(){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 me(e){const t=Q(),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=pe(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 J(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 ye(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=Q(),l=i.byAttr.get(t),s=q()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&y(r)){const c=i.byDeclaredAttr.get(t),o=r.getAttribute(t);for(let u=0;u<c.length;u++)W(c[u].spec,o,t,c[u].componentTag,r)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),n){const c=i.byReactive.get(t);c&&J(c,r,t,e.oldValue),i.reactiveWildcard.length&&J(i.reactiveWildcard,r,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(r,t,e.oldValue);continue}o.onAttributeChange&&r[o.attribute]?o.onAttributeChange(r,t):(V(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ye(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 _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function v(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function K(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function G(e){const t=_();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=v();if(e.target&&i.length)for(let l=0;l<i.length;l++){const s=i[l],r=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType!==1)continue;const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],u=o.query;if(u&&(s.matches&&s.matches(u)&&(o.ComponentFn&&g(s,o),o.onInit&&o.onInit(s)),r&&s.querySelectorAll)){const d=s.querySelectorAll(u);for(let a=0;a<d.length;a++)o.ComponentFn&&g(d[a],o),o.onInit&&o.onInit(d[a])}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType!==1||document.contains(s))continue;const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],u=o.query;if(u&&(s.matches&&s.matches(u)&&K(s,o),r&&s.querySelectorAll)){const d=s.querySelectorAll(u);for(let a=0;a<d.length;a++)K(d[a],o)}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{G(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let i=0;i<n.length;i++){const l=n[i];if(l.type==="childList")try{G(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function _e(e){_().push(e),e.onSubtreeChange&&e.query&&v().push(e),z()}function X(e,t,n,i,l={}){const s=l.extraAttributes||[],r=l.onAttributeChange||null,c=l.onSubtreeChange||null,o=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?he(a):d,je=a?new Set(Object.keys(a)):null,We=l.persist||null;function m(k){const w=k||document.body;if(V(w,e,t,n),a&&q())for(const h in a){const Pe=a[h],E=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&E.push(w);for(let L=0;L<E.length;L++){const O=E[L];y(O)&&W(Pe,O.getAttribute(h),h,i,O)}}o&&o(w)}const S=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)S.push(w[1])}else S.push(e);me({selector:e,attribute:t,componentTag:i,attributes:a,ComponentFn:n,onInit:o,observed:S.concat(s),onAttributeChange:r,onAttrChange:u,effects:f,declared:je,persist:We}),Ce();const He=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Z=l.subtreeQuery||(He?e:"["+e+"]"),ee={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:c,query:Z};_().push(ee),c&&Z&&v().push(ee),z(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X,window.lnCore.observeLifecycle=_e,window.lnCore.withoutLifecycle=Ae);function te(){be()>0?ge(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",te):te(),m}function Y(e){return(e||"").replace(/^#/,"")}function x(e){const t=e===void 0?location.hash:e,n={},i=Y(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 c=r.indexOf(":"),o=c>-1?r.slice(0,c):r,u=c>-1?r.slice(c+1):"";if(o)try{n[o]=decodeURIComponent(u)}catch{n[o]=u}}return n}function ve(e){if(!e)return null;const t=x();return e in t?t[e]:null}function xe(e,t){if(!e)return;const n=x();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 ke(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 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 Oe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),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=x,window.lnCore.hashGet=ve,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=Se,window.lnCore.resolveHashNamespace=ke,window.lnCore.hashSortEncode=Ee,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=qe);function Ie(e){return(e||"").replace(/^\?/,"")}function Te(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},i=Ie(t);if(!i)return n;const l=new URLSearchParams(i);for(const[s,r]of l.entries())n[s]=r;return n}function De(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Fe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const i=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",i)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Me(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function $e(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const i=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:i}}}return null}function Ne(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Be(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Te,window.lnCore.queryGet=De,window.lnCore.querySet=Fe,window.lnCore.resolveQueryParam=Re,window.lnCore.querySortEncode=Me,window.lnCore.querySortDecode=$e,window.lnCore.queryFilterEncode=Ne,window.lnCore.queryFilterDecode=Be);function Ue(){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=Ue),(function(){const e="data-ln-form",t="lnForm";if(window[t]!==void 0)return;const n={"data-ln-form":{type:"marker",description:"Identifies the form element as an enhanced ln-form"},"data-ln-form-action-edit":{prop:"_actionEdit",type:"string",read:b,fallback:"",description:"URL template or endpoint used when editing an existing record"},"data-ln-form-action-method":{prop:"_actionMethod",type:"enum",values:["PUT","POST","PATCH"],fallback:"PUT",description:"HTTP method used when submitting edit action"}},i=P(n);function l(s){this.dom=s,H(this,s,i),this._baseAction=s.getAttribute("action")||"";const r=this;function c(){const u=r.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let d=0;d<u.length;d++)u[d].hasAttribute("data-ln-initial-value")||u[d].setAttribute("data-ln-initial-value",u[d].getAttribute("value")||"")}function o(){const u=r.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let d=0;d<u.length;d++)u[d].value=u[d].getAttribute("data-ln-initial-value")||""}return c(),this._onLnFill=function(u){u.target===r.dom&&(u.detail?(c(),r.fill(u.detail),r._applyActionMode(u.detail)):(r.dom.reset(),o()))},this._onReset=function(){r._applyActionMode(null),o()},s.addEventListener("ln-fill",this._onLnFill),s.addEventListener("reset",this._onReset),this}l.prototype.fill=function(s){const r=I(this.dom,s);for(let c=0;c<r.length;c++){const o=r[c],u=o.tagName==="SELECT"||o.type==="checkbox"||o.type==="radio";o.dispatchEvent(new Event(u?"change":"input",{bubbles:!0}))}},l.prototype.reset=function(){this.dom.reset(),this._applyActionMode(null);const s=this.dom.elements;for(let r=0;r<s.length;r++){const c=s[r],o=c.tagName==="SELECT"||c.type==="checkbox"||c.type==="radio";c.dispatchEvent(new Event(o?"change":"input",{bubbles:!0}))}},l.prototype._ensureMethodInput=function(){let s=this.dom.querySelector('input[name="_method"]');return s||(s=document.createElement("input"),s.type="hidden",s.name="_method",s.value="",this.dom.appendChild(s)),s},l.prototype._applyActionMode=function(s){if(!this.dom.hasAttribute("data-ln-form-action-edit"))return;const r=s&&s.id!=null&&s.id!==""?s.id:null,c=this._ensureMethodInput();if(r!==null){const o=this._actionEdit;o?this.dom.setAttribute("action",o.replace(":id",encodeURIComponent(r))):this.dom.setAttribute("action",this._baseAction.replace(/\/$/,"")+"/"+encodeURIComponent(r)),c.value=this._actionMethod||"PUT"}else this.dom.setAttribute("action",this._baseAction),c.value=""},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-fill",this._onLnFill),this.dom.removeEventListener("reset",this._onReset),delete this.dom[t])},X(e,t,l,"ln-form",{attributes:n})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function Q(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!E(o))return}e.apply(console,t)}}function X(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){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 z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Y(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&l[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);l[r.name]=r.value===""||isNaN(a)?null:a}else l[r.name]=r.value}return l}function Z(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ee(e,t){const n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(r).split(",").map(function(d){return d.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=Z(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<i.options.length;a++)i.options[a].selected=r.indexOf(i.options[a].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ee,window.lnCore.serializeForm=Y,window.lnCore.resolveFormMethod=z);const O={};function te(e,t){O[e]=t}function ne(e){return O[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=te,window.lnCore.getDataMapper=ne);function re(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){X(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const L={};function oe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];L[n]=t}function ie(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return L[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=oe,window.lnCore.getLocaleFallback=ie,window.lnCore.ensureLocaleObserver=re);const A={};function le(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function D(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const w=d[0].trim(),p=d[1].trim();t[p]!=null&&c.setAttribute(w,t[p])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const w=d[0].trim(),p=d[1].trim();p in t&&c.classList.toggle(w,!!t[p])}}return e}function se(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)D(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 s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ce(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],d=a.getAttribute("data-ln-render-key");d&&(i[d]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],d=String(o(a));let w=i[d];if(w)l(w,a,r);else{const p=le(n,s);if(!p||(I(p,a),w=p.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",d),l(w,a,r)}c.appendChild(w)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=I,window.lnCore.fill=D,window.lnCore.lnFill=se,window.lnCore.renderList=ce);function S(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function q(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function N(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 F(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function R(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return _.set(n,l),l}function $(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function M(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ae(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ue(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=R(o.values,o.fallback);break;case"integer":l=q;break;case"float":l=$;break;case"boolean":l=N;break;case"list":l=F;break;case"json":l=M;break;case"string":default:l=S;break}l||(l=S),t[o.prop]=[l,n,o.fallback]}return t}function fe(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=ue,window.lnCore.attrSpec=de,window.lnCore.attrStr=S,window.lnCore.attrInt=q,window.lnCore.attrBool=N,window.lnCore.attrList=F,window.lnCore.attrEnum=R,window.lnCore.attrFloat=$,window.lnCore.attrJson=M);function C(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function we(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&C(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)C(c[r],i)}}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 he(e){const t=B(),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=fe(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 T(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function pe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=B(),l=o.byAttr.get(t),s=Q()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&E(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)ae(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&T(c,i,t,e.oldValue),o.reactiveWildcard.length&&T(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(we(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function be(){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{pe(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 j(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function U(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function x(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=j();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=U();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[l],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!i)s.matches&&s.matches(r.query)&&C(s,r);else if(s.matches&&s.matches(r.query)&&C(s,r),s.querySelectorAll){const a=s.querySelectorAll(r.query);for(let d=0;d<a.length;d++)C(a[d],r)}}r.onInit&&r.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){if(document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a){if(!i)s.matches&&s.matches(a)&&x(s,r);else if(s.matches&&s.matches(a)&&x(s,r),s.querySelectorAll){const d=s.querySelectorAll(a);for(let w=0;w<d.length;w++)x(d[w],r)}}}}}}function me(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ge(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ce(e,t){he({observed:e,handler:t}),be()}function ye(e){j().push(e),e.onSubtreeChange&&e.query&&U().push(e),me()}function W(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,n={},o=W(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function Ae(e){if(!e)return null;const t=v();return e in t?t[e]:null}function Se(e,t){if(!e)return;const n=v();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");W(location.hash)!==l&&(location.hash=l)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(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 ve(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 Ee(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),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=v,window.lnCore.hashGet=Ae,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=ve,window.lnCore.hashSortDecode=ke,window.lnCore.hashFilterEncode=Ee,window.lnCore.hashFilterDecode=Oe);function Le(e){return(e||"").replace(/^\?/,"")}function De(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Le(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function Ie(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Fe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Re(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function $e(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Me(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=De,window.lnCore.queryGet=Ie,window.lnCore.querySet=qe,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Fe,window.lnCore.querySortDecode=Re,window.lnCore.queryFilterEncode=$e,window.lnCore.queryFilterDecode=Me);function Be(){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=Be),(function(){const e="ln-icon-sprite",t="#ln-icon-",n="#ln-icon-custom-",o=new Set,l=new Set;let s=null;const i=(window.LN_ICON_CDN||"https://cdn.jsdelivr.net/npm/@tabler/icons@3.31.0/icons/outline").replace(/\/$/,""),c=(window.LN_ICON_CUSTOM_CDN||"").replace(/\/$/,""),r="lni:",a="lni:v",d="1";function w(){try{if(localStorage.getItem(a)!==d){for(let u=localStorage.length-1;u>=0;u--){const h=localStorage.key(u);h&&h.indexOf(r)===0&&localStorage.removeItem(h)}localStorage.setItem(a,d)}}catch{}}w();function p(){return s||(s=document.getElementById(e),s||(s=document.createElementNS("http://www.w3.org/2000/svg","svg"),s.id=e,s.setAttribute("hidden",""),s.setAttribute("aria-hidden","true"),s.appendChild(document.createElementNS("http://www.w3.org/2000/svg","defs")),document.body.insertBefore(s,document.body.firstChild))),s}function Te(u){return u.indexOf(n)===0?c+"/"+u.slice(n.length)+".svg":i+"/"+u.slice(t.length)+".svg"}function V(u,h){const b=h.match(/viewBox="([^"]+)"/),f=b?b[1]:"0 0 24 24",g=h.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i),je=g?g[1].trim():"",K=h.match(/<svg([^>]*)>/i),Ue=K?K[1]:"",y=document.createElementNS("http://www.w3.org/2000/svg","symbol");y.id=u,y.setAttribute("viewBox",f),["fill","stroke","stroke-width","stroke-linecap","stroke-linejoin"].forEach(function(J){const G=Ue.match(new RegExp(J+'="([^"]*)"'));G&&y.setAttribute(J,G[1])}),y.innerHTML=je,p().querySelector("defs").appendChild(y)}function k(u){if(o.has(u)||l.has(u))return;if(u.indexOf(n)===0&&!c){console.warn("[ln-icon] Custom icon requested but no CUSTOM_CDN configured:",u);return}const h=u.slice(1);try{const f=localStorage.getItem(r+h);if(f){V(h,f),o.add(u);return}}catch{}l.add(u);const b=Te(u);fetch(b).then(function(f){if(!f.ok)throw new Error(f.status);return f.text()}).then(function(f){V(h,f),o.add(u),l.delete(u);try{localStorage.setItem(r+h,f)}catch{}}).catch(function(f){console.error("[ln-icon] Fetch failed for:",h,f),l.delete(u)})}function H(u){const h='use[href^="'+t+'"], use[href^="'+n+'"]',b=u.querySelectorAll?u.querySelectorAll(h):[];if(u.matches&&u.matches(h)){const f=u.getAttribute("href");f&&k(f)}Array.prototype.forEach.call(b,function(f){const g=f.getAttribute("href");g&&k(g)})}function P(){H(document),m(function(){ye({onInit:function(u){H(u)}}),Ce(["href"],function(u){if((u.tagName?u.tagName.toLowerCase():"")==="use"){const b=u.getAttribute("href");b&&(b.indexOf(t)===0||b.indexOf(n)===0)&&k(b)}})},"ln-icon")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",P):P()})()})();
1
+ (function(){"use strict";function Q(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function 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 X(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){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 z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Y(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&l[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);l[r.name]=r.value===""||isNaN(a)?null:a}else l[r.name]=r.value}return l}function Z(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ee(e,t){const n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(r).split(",").map(function(d){return d.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=Z(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<i.options.length;a++)i.options[a].selected=r.indexOf(i.options[a].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ee,window.lnCore.serializeForm=Y,window.lnCore.resolveFormMethod=z);const E={};function te(e,t){E[e]=t}function ne(e){return E[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=te,window.lnCore.getDataMapper=ne);function re(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){X(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const O={};function oe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];O[n]=t}function ie(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return O[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=oe,window.lnCore.getLocaleFallback=ie,window.lnCore.ensureLocaleObserver=re);const A={};function le(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function I(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();t[p]!=null&&c.setAttribute(f,t[p])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();p in t&&c.classList.toggle(f,!!t[p])}}return e}function se(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)I(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 L(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(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ce(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],d=a.getAttribute("data-ln-render-key");d&&(i[d]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],d=String(o(a));let f=i[d];if(f)l(f,a,r);else{const p=le(n,s);if(!p||(L(p,a),f=p.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),l(f,a,r)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=L,window.lnCore.fill=I,window.lnCore.lnFill=se,window.lnCore.renderList=ce);function S(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function D(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function N(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 q(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function F(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return _.set(n,l),l}function R(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function $(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ae(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ue(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=F(o.values,o.fallback);break;case"integer":l=D;break;case"float":l=R;break;case"boolean":l=N;break;case"list":l=q;break;case"json":l=$;break;case"string":default:l=S;break}l||(l=S),t[o.prop]=[l,n,o.fallback]}return t}function fe(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=ue,window.lnCore.attrSpec=de,window.lnCore.attrStr=S,window.lnCore.attrInt=D,window.lnCore.attrBool=N,window.lnCore.attrList=q,window.lnCore.attrEnum=F,window.lnCore.attrFloat=R,window.lnCore.attrJson=$);function y(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function we(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&y(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)y(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function M(){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=M(),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=fe(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 B(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function pe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=M(),l=o.byAttr.get(t),s=Q()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&k(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)ae(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&B(c,i,t,e.oldValue),o.reactiveWildcard.length&&B(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(we(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function be(){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{pe(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 T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function j(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function U(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=T();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=j();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[l],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType!==1)continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&(r.ComponentFn&&y(s,r),r.onInit&&r.onInit(s)),i&&s.querySelectorAll)){const d=s.querySelectorAll(a);for(let f=0;f<d.length;f++)r.ComponentFn&&y(d[f],r),r.onInit&&r.onInit(d[f])}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType!==1||document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&U(s,r),i&&s.querySelectorAll)){const d=s.querySelectorAll(a);for(let f=0;f<d.length;f++)U(d[f],r)}}}}function me(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ge(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ce(e,t){he({observed:e,handler:t}),be()}function ye(e){T().push(e),e.onSubtreeChange&&e.query&&j().push(e),me()}function W(e){return(e||"").replace(/^#/,"")}function x(e){const t=e===void 0?location.hash:e,n={},o=W(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function Ae(e){if(!e)return null;const t=x();return e in t?t[e]:null}function Se(e,t){if(!e)return;const n=x();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");W(location.hash)!==l&&(location.hash=l)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(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 ve(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 Ee(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),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=x,window.lnCore.hashGet=Ae,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=ve,window.lnCore.hashSortDecode=ke,window.lnCore.hashFilterEncode=Ee,window.lnCore.hashFilterDecode=Oe);function Ie(e){return(e||"").replace(/^\?/,"")}function Le(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Ie(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function De(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ne(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Fe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Re(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function $e(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Me(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Le,window.lnCore.queryGet=De,window.lnCore.querySet=Ne,window.lnCore.resolveQueryParam=qe,window.lnCore.querySortEncode=Fe,window.lnCore.querySortDecode=Re,window.lnCore.queryFilterEncode=$e,window.lnCore.queryFilterDecode=Me);function Be(){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=Be),(function(){const e="ln-icon-sprite",t="#ln-icon-",n="#ln-icon-custom-",o=new Set,l=new Set;let s=null;const i=(window.LN_ICON_CDN||"https://cdn.jsdelivr.net/npm/@tabler/icons@3.31.0/icons/outline").replace(/\/$/,""),c=(window.LN_ICON_CUSTOM_CDN||"").replace(/\/$/,""),r="lni:",a="lni:v",d="1";function f(){try{if(localStorage.getItem(a)!==d){for(let u=localStorage.length-1;u>=0;u--){const h=localStorage.key(u);h&&h.indexOf(r)===0&&localStorage.removeItem(h)}localStorage.setItem(a,d)}}catch{}}f();function p(){return s||(s=document.getElementById(e),s||(s=document.createElementNS("http://www.w3.org/2000/svg","svg"),s.id=e,s.setAttribute("hidden",""),s.setAttribute("aria-hidden","true"),s.appendChild(document.createElementNS("http://www.w3.org/2000/svg","defs")),document.body.insertBefore(s,document.body.firstChild))),s}function Te(u){return u.indexOf(n)===0?c+"/"+u.slice(n.length)+".svg":i+"/"+u.slice(t.length)+".svg"}function V(u,h){const b=h.match(/viewBox="([^"]+)"/),w=b?b[1]:"0 0 24 24",g=h.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i),je=g?g[1].trim():"",K=h.match(/<svg([^>]*)>/i),Ue=K?K[1]:"",C=document.createElementNS("http://www.w3.org/2000/svg","symbol");C.id=u,C.setAttribute("viewBox",w),["fill","stroke","stroke-width","stroke-linecap","stroke-linejoin"].forEach(function(J){const G=Ue.match(new RegExp(J+'="([^"]*)"'));G&&C.setAttribute(J,G[1])}),C.innerHTML=je,p().querySelector("defs").appendChild(C)}function v(u){if(o.has(u)||l.has(u))return;if(u.indexOf(n)===0&&!c){console.warn("[ln-icon] Custom icon requested but no CUSTOM_CDN configured:",u);return}const h=u.slice(1);try{const w=localStorage.getItem(r+h);if(w){V(h,w),o.add(u);return}}catch{}l.add(u);const b=Te(u);fetch(b).then(function(w){if(!w.ok)throw new Error(w.status);return w.text()}).then(function(w){V(h,w),o.add(u),l.delete(u);try{localStorage.setItem(r+h,w)}catch{}}).catch(function(w){console.error("[ln-icon] Fetch failed for:",h,w),l.delete(u)})}function H(u){const h='use[href^="'+t+'"], use[href^="'+n+'"]',b=u.querySelectorAll?u.querySelectorAll(h):[];if(u.matches&&u.matches(h)){const w=u.getAttribute("href");w&&v(w)}Array.prototype.forEach.call(b,function(w){const g=w.getAttribute("href");g&&v(g)})}function P(){H(document),m(function(){ye({onInit:function(u){H(u)}}),Ce(["href"],function(u){if((u.tagName?u.tagName.toLowerCase():"")==="use"){const b=u.getAttribute("href");b&&(b.indexOf(t)===0||b.indexOf(n)===0)&&v(b)}})},"ln-icon")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",P):P()})()})();