@livenetworks/ashlar 2.1.0 → 2.1.1

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 (55) 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-autoresize/ln-autoresize.js +1 -1
  6. package/components/ln-autosave/ln-autosave.js +1 -1
  7. package/components/ln-chart/ln-chart.js +1 -1
  8. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  9. package/components/ln-confirm/ln-confirm.js +1 -1
  10. package/components/ln-core/lifecycle.js +9 -0
  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-dropdown/ln-dropdown.js +1 -1
  17. package/components/ln-editor/ln-editor.js +1 -1
  18. package/components/ln-editor/src/ln-editor.js +45 -12
  19. package/components/ln-external-links/ln-external-links.js +1 -1
  20. package/components/ln-filter/ln-filter.js +1 -1
  21. package/components/ln-form/ln-form.js +1 -1
  22. package/components/ln-icon/ln-icon.js +1 -1
  23. package/components/ln-include/ln-include.js +1 -1
  24. package/components/ln-key/ln-key.js +1 -1
  25. package/components/ln-link/ln-link.js +1 -1
  26. package/components/ln-list/ln-list.js +1 -1
  27. package/components/ln-modal/ln-modal.js +1 -1
  28. package/components/ln-nav/ln-nav.js +1 -1
  29. package/components/ln-number/ln-number.js +1 -1
  30. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  31. package/components/ln-options/ln-options.js +1 -1
  32. package/components/ln-picklist/ln-picklist.js +1 -1
  33. package/components/ln-popover/ln-popover.js +1 -1
  34. package/components/ln-progress/ln-progress.js +1 -1
  35. package/components/ln-router/ln-router.js +1 -1
  36. package/components/ln-scroll/ln-scroll.js +1 -1
  37. package/components/ln-search/ln-search.js +1 -1
  38. package/components/ln-slug/ln-slug.js +1 -1
  39. package/components/ln-sort/ln-sort.js +1 -1
  40. package/components/ln-sortable/ln-sortable.js +1 -1
  41. package/components/ln-stat/ln-stat.js +1 -1
  42. package/components/ln-table/ln-table.js +1 -1
  43. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  44. package/components/ln-tabs/ln-tabs.js +1 -1
  45. package/components/ln-time/ln-time.js +1 -1
  46. package/components/ln-toast/ln-toast.js +1 -1
  47. package/components/ln-toggle/ln-toggle.js +1 -1
  48. package/components/ln-tooltip/ln-tooltip.js +1 -1
  49. package/components/ln-translations/ln-translations.js +1 -1
  50. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  51. package/components/ln-upload/ln-upload.js +1 -1
  52. package/components/ln-validate/ln-validate.js +1 -1
  53. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  54. package/package.json +1 -1
  55. package/web-types.json +1 -1
@@ -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 A(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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!A(n))return}e.apply(console,t)}}function C(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function Y(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(l),l}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(o)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")&&!(n&&r.matches&&r.matches(n)))if(r.type==="checkbox")o&&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(o&&r.type==="hidden")l[r.name]=r.value;else if(o&&(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 te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const o=e.elements,n=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const 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(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=te(r);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),n.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;n.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const T={};function oe(e,t){T[e]=t}function re(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function le(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];R[o]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const v={};function ce(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=v[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}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 u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].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)$(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(i,c){return t[c]!==void 0?t[c]:""}))}const n=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,n))}}return e}function ue(e,t,o,n,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(n(a));let d=i[u];if(d)l(d,a,r);else{const f=ce(o,s);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,a,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ue);function k(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function N(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function B(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const x=new Map;function W(e,t){const o=(e?e.join("|"):"")+"::"+t;if(x.has(o))return x.get(o);const n=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&n.has(c)?c:t};return x.set(o,l),l}function U(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function V(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function H(e,t,o,n,l){if(!e||t===null)return!0;const s=n||"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 "${o}". 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 "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,o){for(const n in o){const[l,s,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function fe(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=W(n.values,n.fallback);break;case"integer":l=N;break;case"float":l=U;break;case"boolean":l=B;break;case"list":l=j;break;case"json":l=V;break;case"string":default:l=k;break}l||(l=k),t[n.prop]=[l,o,n.fallback]}return t}function he(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.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 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=de,window.lnCore.attrSpec=fe,window.lnCore.attrStr=k,window.lnCore.attrInt=N,window.lnCore.attrBool=B,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Q(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&g(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)g(c[r],i)}}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 pe(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 ge(e){const t=J(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=we(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)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,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function me(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=J(),l=n.byAttr.get(t),s=q()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)H(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=n.byReactive.get(t);c&&K(c,i,t,e.oldValue),n.reactiveWildcard.length&&K(n.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):(Q(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{me(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=_();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,s=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;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&g(n,i);else if(n.matches&&n.matches(i.query)&&g(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let r=0;r<c.length;r++)g(c[r],i)}}i.onInit&&i.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&S(n,i);else if(n.matches&&n.matches(c)&&S(n,i),n.querySelectorAll){const r=n.querySelectorAll(c);for(let a=0;a<r.length;a++)S(r[a],i)}}}}}}}function P(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{ye(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){_().push(e),P()}function z(e,t,o,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,a=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,f=d?he(d):u,h=d?new Set(Object.keys(d)):null,w=l.persist||null;function p(O){const b=O||document.body;if(Q(b,e,t,o),d&&q())for(const m in d){const qe=d[m],F=Array.from(b.querySelectorAll("["+m+"]"));b.matches&&b.matches("["+m+"]")&&F.push(b);for(let D=0;D<F.length;D++){const I=F[D];A(I)&&H(qe,I.getAttribute(m),m,n,I)}}r&&r(b)}const L=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let b;for(;(b=O.exec(e))!==null;)L.push(b[1])}else L.push(e);ge({selector:e,attribute:t,componentTag:n,attributes:d,ComponentFn:o,onInit:r,observed:L.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:h,persist:w}),Ce();const De=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ie=l.subtreeQuery||(De?e:"["+e+"]");_().push({selector:e,attribute:t,ComponentFn:o,onInit:r,onSubtreeChange:c,query:Ie}),P(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ae);function X(){be()>0?pe(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),p}function G(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,o={},n=G(t);if(!n)return o;const l=n.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{o[r]=decodeURIComponent(a)}catch{o[r]=a}}return o}function ve(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ke(e,t){if(!e)return;const o=E();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");G(location.hash)!==l&&(location.hash=l)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function _e(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 n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(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 Le(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 o=e.slice(0,t),n=e.slice(t+1),l=n?n.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=E,window.lnCore.hashGet=ve,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=Oe);function Fe(){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=Fe),(function(){const e="data-ln-picklist",t="lnPicklist",o="data-ln-picklist-list",n="data-ln-picklist-max";if(window[t]!==void 0)return;const l={"data-ln-picklist":{type:"enum",values:["enabled","disabled"],fallback:"enabled",effect:c,description:"Controls enabled/disabled state of the dual-list picklist"},"data-ln-picklist-max":{type:"integer",fallback:1/0,min:1,effect:r,description:"Maximum selectable items in the selected list"},"data-ln-picklist-list":{type:"enum",values:["available","selected"],description:"Role marker for available or selected picklist columns"}};function s(a){if(this.dom=a,this.isEnabled=a.getAttribute(e)!=="disabled",this.max=i(a),this.available=a.querySelector("["+o+'="available"]'),this.selected=a.querySelector("["+o+'="selected"]'),!this.available||!this.selected)return console.warn("[ln-picklist] requires both ["+o+'="available"] and ['+o+'="selected"]',a),this;this._onChange=this._onChange.bind(this),a.addEventListener("change",this._onChange),this._initial=[];for(const u of[this.available,this.selected])for(const d of u.children)this._initial.push(d);return this.sync(),this._form=a.closest("form"),this._form&&(this._onFormReset=this._onFormReset.bind(this),this._form.addEventListener("reset",this._onFormReset)),this}s.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._onChange&&this.dom.removeEventListener("change",this._onChange),this._form&&this._form.removeEventListener("reset",this._onFormReset),delete this.dom[t])},s.prototype.enable=function(){this.dom.setAttribute(e,"")},s.prototype.disable=function(){this.dom.setAttribute(e,"disabled")},s.prototype.sync=function(){if(!this.available||!this.selected)return;const a=Array.from(this.available.children).concat(Array.from(this.selected.children));for(let d=0;d<a.length;d++)this._initial.includes(a[d])||this._initial.push(a[d]);let u=0;for(let d=0;d<this._initial.length;d++){const f=this._initial[d];if(!f.isConnected)continue;const h=f.querySelector('input[type="checkbox"]');if(!h)continue;let w;h.checked?this.max===null||u<this.max?(w=this.selected,u++):(h.checked=!1,w=this.available):w=this.available,w.appendChild(f)}},s.prototype._onFormReset=function(a){const u=this;setTimeout(function(){u._destroyed||a.defaultPrevented||u.sync()},0)},s.prototype._onChange=function(a){const u=a.target.closest('input[type="checkbox"]');if(!u)return;const d=u.closest("li");if(!d)return;const f=d.parentElement;if(f!==this.available&&f!==this.selected)return;if(!this.isEnabled){u.checked=!u.checked;return}const h=u.checked?this.selected:this.available;if(f===h)return;if(h===this.selected&&this.max!==null&&this.selected.children.length>=this.max){u.checked=!u.checked,C(this.dom,"ln-picklist:max-reached",{max:this.max,item:d,checkbox:u,count:this.selected.children.length});return}const w={item:d,from:f,to:h,checkbox:u};if(Y(this.dom,"ln-picklist:before-move",w).defaultPrevented){u.checked=!u.checked;return}const p=document.activeElement===u;h.appendChild(d),p&&u.focus(),C(this.dom,"ln-picklist:move",w)};function i(a){const u=a.getAttribute(n);if(u===null||u==="")return null;const d=parseInt(u,10);return isNaN(d)||d<0?null:d}function c(a){const u=a[t];if(!u)return;const d=a.getAttribute(e)!=="disabled";d!==u.isEnabled&&(u.isEnabled=d,C(a,d?"ln-picklist:enabled":"ln-picklist:disabled",{target:a}))}function r(a){const u=a[t];u&&(u.max=i(a))}z(e,t,s,"ln-picklist",{attributes:l})})()})();
1
+ (function(){"use strict";function T(){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 A(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!A(i))return}e.apply(console,t)}}function C(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 Y(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(o),o}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,o={},c=e.elements,l={};if(n)for(let s=0;s<c.length;s++){const r=c[s];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let s=0;s<c.length;s++){const r=c[s];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&l[r.name]===1?o[r.name]=r.checked:(o[r.name]||(o[r.name]=[]),r.checked&&o[r.name].push(r.value));else if(r.type==="radio")r.checked&&(o[r.name]=r.value);else if(r.type==="select-multiple"){o[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&o[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")o[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);o[r.name]=r.value===""||isNaN(a)?null:a}else o[r.name]=r.value}return o}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const n=e.elements,i=[],o={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const r=t[s];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(o[l.name]>1){const a=String(r).split(",").map(function(u){return u.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=te(r);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<l.options.length;a++)l.options[a].selected=r.indexOf(l.options[a].value)!==-1;i.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const q={};function oe(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function le(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];R[n]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const v={};function ce(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const s=n[l],r=s.getAttribute("data-ln-field");t[r]!=null&&(s.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const s=i[l],r=s.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&s.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],r=s.getAttribute("data-ln-show");r in t&&s.classList.toggle("hidden",!t[r])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const s=c[l],r=s.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&s.classList.toggle(d,!!t[f])}}return e}function ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let 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)$(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 M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const i=function(c,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const l=o[c],s=l.attributes;for(let r=0;r<s.length;r++){const a=s[r];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ue(e,t,n,i,o,c){const l={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(l[u]=a)}const s=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(i(a));let d=l[u];if(d)o(d,a,r);else{const f=ce(n,c);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,a,r)}s.appendChild(d)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ue);function k(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function N(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function B(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const x=new Map;function W(e,t){const n=(e?e.join("|"):"")+"::"+t;if(x.has(n))return x.get(n);const i=new Set(e||[]),o=function(c,l){const s=c.getAttribute(l);return s!==null&&i.has(s)?s:t};return x.set(n,o),o}function U(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function V(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function H(e,t,n,i,o){if(!e||t===null)return!0;const c=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=r=>{o?console.warn(r,o):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(s(`[${c}] 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:(s(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(s(`[${c}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(s(`[${c}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return s(`[${c}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,n){for(const i in n){const[o,c,l]=n[i];Object.defineProperty(e,i,{get:function(){return o(t,c,l)},enumerable:!0,configurable:!0})}return e}function fe(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=W(i.values,i.fallback);break;case"integer":o=N;break;case"float":o=U;break;case"boolean":o=B;break;case"list":o=j;break;case"json":o=V;break;case"string":default:o=k;break}o||(o=k),t[i.prop]=[o,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 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=k,window.lnCore.attrInt=N,window.lnCore.attrBool=B,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);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 Q(e,t,n,i){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(c)&&g(e,l),e.querySelectorAll){const s=e.querySelectorAll(c);for(let r=0;r<s.length;r++)g(s[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function pe(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 ge(e){const t=J(),n=e.observed||[];for(let i=0;i<n.length;i++){const o=n[i];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=we(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function K(e,t,n,i){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,i):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,i)}}function me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=J(),o=i.byAttr.get(t),c=T()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!o&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&A(l)){const s=i.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let a=0;a<s.length;a++)H(s[a].spec,r,t,s[a].componentTag,l)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const s=i.byReactive.get(t);s&&K(s,l,t,e.oldValue),i.reactiveWildcard.length&&K(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const r=o[s];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(Q(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{me(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 S(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 ye(e){const t=_();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}if(e.target)for(let i=0;i<t.length;i++){const o=t[i];if(o.onSubtreeChange&&o.query){const c=o.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;l&&o.onSubtreeChange(l,e)}}for(let i=0;i<e.addedNodes.length;i++){const o=e.addedNodes[i];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)o.matches&&o.matches(s.query)&&g(o,s);else if(o.matches&&o.matches(s.query)&&g(o,s),o.querySelectorAll){const r=o.querySelectorAll(s.query);for(let a=0;a<r.length;a++)g(r[a],s)}}s.onInit&&s.onInit(o)}}}for(let i=0;i<e.removedNodes.length;i++){const o=e.removedNodes[i];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l],r=s.query;if(r){if(!c)o.matches&&o.matches(r)&&S(o,s);else if(o.matches&&o.matches(r)&&S(o,s),o.querySelectorAll){const a=o.querySelectorAll(r);for(let u=0;u<a.length;u++)S(a[u],s)}}}}}}function P(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{ye(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){_().push(e),P()}function z(e,t,n,i,o={}){const c=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,r=o.onInit||null,a=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?he(d):u,h=d?new Set(Object.keys(d)):null,w=o.persist||null;function p(O){const b=O||document.body;if(Q(b,e,t,n),d&&T())for(const m in d){const Te=d[m],F=Array.from(b.querySelectorAll("["+m+"]"));b.matches&&b.matches("["+m+"]")&&F.push(b);for(let D=0;D<F.length;D++){const I=F[D];A(I)&&H(Te,I.getAttribute(m),m,i,I)}}r&&r(b)}const L=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let b;for(;(b=O.exec(e))!==null;)L.push(b[1])}else L.push(e);ge({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:n,onInit:r,observed:L.concat(c),onAttributeChange:l,onAttrChange:a,effects:f,declared:h,persist:w}),Ce();const De=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ie=o.subtreeQuery||(De?e:"["+e+"]");_().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:s,query:Ie}),P(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ae);function X(){be()>0?pe(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),p}function G(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},i=G(t);if(!i)return n;const o=i.split("&");for(let c=0;c<o.length;c++){const l=o[c];if(!l)continue;const s=l.indexOf(":"),r=s>-1?l.slice(0,s):l,a=s>-1?l.slice(s+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function ve(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ke(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");G(location.hash)!==o&&(location.hash=o)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function _e(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 Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(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 Le(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),i=e.slice(t+1),o=i?i.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=ve,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=Oe);function Fe(){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=Fe),(function(){const e="data-ln-picklist",t="lnPicklist",n="data-ln-picklist-list",i="data-ln-picklist-max";if(window[t]!==void 0)return;const o={"data-ln-picklist":{type:"enum",values:["enabled","disabled"],fallback:"enabled",effect:s,description:"Controls enabled/disabled state of the dual-list picklist"},"data-ln-picklist-max":{type:"integer",fallback:1/0,min:1,effect:r,description:"Maximum selectable items in the selected list"},"data-ln-picklist-list":{type:"enum",values:["available","selected"],description:"Role marker for available or selected picklist columns"}};function c(a){if(this.dom=a,this.isEnabled=a.getAttribute(e)!=="disabled",this.max=l(a),this.available=a.querySelector("["+n+'="available"]'),this.selected=a.querySelector("["+n+'="selected"]'),!this.available||!this.selected)return console.warn("[ln-picklist] requires both ["+n+'="available"] and ['+n+'="selected"]',a),this;this._onChange=this._onChange.bind(this),a.addEventListener("change",this._onChange),this._initial=[];for(const u of[this.available,this.selected])for(const d of u.children)this._initial.push(d);return this.sync(),this._form=a.closest("form"),this._form&&(this._onFormReset=this._onFormReset.bind(this),this._form.addEventListener("reset",this._onFormReset)),this}c.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._onChange&&this.dom.removeEventListener("change",this._onChange),this._form&&this._form.removeEventListener("reset",this._onFormReset),delete this.dom[t])},c.prototype.enable=function(){this.dom.setAttribute(e,"")},c.prototype.disable=function(){this.dom.setAttribute(e,"disabled")},c.prototype.sync=function(){if(!this.available||!this.selected)return;const a=Array.from(this.available.children).concat(Array.from(this.selected.children));for(let d=0;d<a.length;d++)this._initial.includes(a[d])||this._initial.push(a[d]);let u=0;for(let d=0;d<this._initial.length;d++){const f=this._initial[d];if(!f.isConnected)continue;const h=f.querySelector('input[type="checkbox"]');if(!h)continue;let w;h.checked?this.max===null||u<this.max?(w=this.selected,u++):(h.checked=!1,w=this.available):w=this.available,w.appendChild(f)}},c.prototype._onFormReset=function(a){const u=this;setTimeout(function(){u._destroyed||a.defaultPrevented||u.sync()},0)},c.prototype._onChange=function(a){const u=a.target.closest('input[type="checkbox"]');if(!u)return;const d=u.closest("li");if(!d)return;const f=d.parentElement;if(f!==this.available&&f!==this.selected)return;if(!this.isEnabled){u.checked=!u.checked;return}const h=u.checked?this.selected:this.available;if(f===h)return;if(h===this.selected&&this.max!==null&&this.selected.children.length>=this.max){u.checked=!u.checked,C(this.dom,"ln-picklist:max-reached",{max:this.max,item:d,checkbox:u,count:this.selected.children.length});return}const w={item:d,from:f,to:h,checkbox:u};if(Y(this.dom,"ln-picklist:before-move",w).defaultPrevented){u.checked=!u.checked;return}const p=document.activeElement===u;h.appendChild(d),p&&u.focus(),C(this.dom,"ln-picklist:move",w)};function l(a){const u=a.getAttribute(i);if(u===null||u==="")return null;const d=parseInt(u,10);return isNaN(d)||d<0?null:d}function s(a){const u=a[t];if(!u)return;const d=a.getAttribute(e)!=="disabled";d!==u.isEnabled&&(u.isEnabled=d,C(a,d?"ln-picklist:enabled":"ln-picklist:disabled",{target:a}))}function r(a){const u=a[t];u&&(u.max=l(a))}z(e,t,c,"ln-picklist",{attributes:o})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){n=t[s];break}if(!x(n))return}e.apply(console,t)}}function S(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function B(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(s),s}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ie(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),n=t&&t.exclude,s={},l=e.elements,r={};if(o)for(let c=0;c<l.length;c++){const i=l[c];i.name&&i.type==="checkbox"&&!i.disabled&&(r[i.name]=(r[i.name]||0)+1)}for(let c=0;c<l.length;c++){const i=l[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(n&&i.matches&&i.matches(n)))if(i.type==="checkbox")o&&r[i.name]===1?s[i.name]=i.checked:(s[i.name]||(s[i.name]=[]),i.checked&&s[i.name].push(i.value));else if(i.type==="radio")i.checked&&(s[i.name]=i.value);else if(i.type==="select-multiple"){s[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&s[i.name].push(i.options[u].value)}else if(o&&i.type==="hidden")s[i.name]=i.value;else if(o&&(i.type==="number"||i.type==="range")){const u=Number(i.value);s[i.name]=i.value===""||isNaN(u)?null:u}else s[i.name]=i.value}return s}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const o=e.elements,n=[],s={};for(let l=0;l<o.length;l++){const r=o[l];r.name&&r.type==="checkbox"&&(s[r.name]=(s[r.name]||0)+1)}for(let l=0;l<o.length;l++){const r=o[l];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const i=t[c];if(r.type==="checkbox"){if(Array.isArray(i))r.checked=i.indexOf(r.value)!==-1;else if(s[r.name]>1){const u=String(i).split(",").map(function(w){return w.trim()});r.checked=u.indexOf(r.value)!==-1}else r.checked=se(i);n.push(r)}else if(r.type==="radio")r.checked=r.value===String(i),n.push(r);else if(r.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<r.options.length;u++)r.options[u].selected=i.indexOf(r.options[u].value)!==-1;n.push(r)}else r.value=i,r.tagName==="SELECT"&&i!=null&&r.setAttribute("data-ln-value",i),n.push(r)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ie);const M={};function ce(e,t){M[e]=t}function ue(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function de(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];j[o]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ae);const E={};function pe(e,t){E[e]||(E[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=E[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(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],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const n=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<n.length;r++){const c=n[r],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const w=i[u].trim().split(":");if(w.length!==2)continue;const f=w[0].trim(),a=w[1].trim();t[a]!=null&&c.setAttribute(f,t[a])}}const s=e.querySelectorAll("[data-ln-show]");for(let r=0;r<s.length;r++){const c=s[r],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const l=e.querySelectorAll("[data-ln-class]");for(let r=0;r<l.length;r++){const c=l[r],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const w=i[u].trim().split(":");if(w.length!==2)continue;const f=w[0].trim(),a=w[1].trim();a in t&&c.classList.toggle(f,!!t[a])}}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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].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)W(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 P(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const n=function(l,r){return t[r]!==void 0?t[r]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let l=0;l<s.length;l++){const r=s[l],c=r.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&r.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ge(e,t,o,n,s,l){const r={};for(let i=0;i<e.children.length;i++){const u=e.children[i],w=u.getAttribute("data-ln-render-key");w&&(r[w]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],w=String(n(u));let f=r[w];if(f)s(f,u,i);else{const a=pe(o,l);if(!a||(P(a,u),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",w),s(f,u,i)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=W,window.lnCore.lnFill=he,window.lnCore.renderList=ge);function O(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function H(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function V(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const s=n.trim().toLowerCase();return!(s==="false"||s==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function K(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const n=new Set(e||[]),s=function(l,r){const c=l.getAttribute(r);return c!==null&&n.has(c)?c:t};return L.set(o,s),s}function Q(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function z(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function J(e,t,o,n,s){if(!e||t===null)return!0;const l=n||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=i=>{s?console.warn(i,s):console.warn(i)};if(r==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${l}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${l}] Value ${i} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${l}] Value ${i} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${l}] Invalid JSON for attribute "${o}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,o){for(const n in o){const[s,l,r]=o[n];Object.defineProperty(e,n,{get:function(){return s(t,l,r)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let s=n.read;if(!s&&n.type)switch(n.type){case"enum":s=K(n.values,n.fallback);break;case"integer":s=H;break;case"float":s=Q;break;case"boolean":s=V;break;case"list":s=U;break;case"json":s=z;break;case"string":default:s=O;break}s||(s=O),t[n.prop]=[s,o,n.fallback]}return t}function me(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.effect)}return Object.keys(t).length?t:null}function ye(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=we,window.lnCore.attrSpec=be,window.lnCore.attrStr=O,window.lnCore.attrInt=H,window.lnCore.attrBool=V,window.lnCore.attrList=U,window.lnCore.attrEnum=K,window.lnCore.attrFloat=Q,window.lnCore.attrJson=z);function _(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 G(e,t,o,n){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(l)&&_(e,r),e.querySelectorAll){const c=e.querySelectorAll(l);for(let i=0;i<c.length;i++)_(c[i],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(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 X(){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 Ae(e){const t=X(),o=e.observed||[];for(let n=0;n<o.length;n++){const s=o[n];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const s=t.byDeclaredAttr.get(n);s.some(l=>l.componentTag===e.componentTag)||s.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=ye(e);if(n===null)t.reactiveWildcard.push(e);else for(const s of n)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,o,n){for(let s=0;s<e.length;s++){const l=e[s];if(!t[l.attribute])continue;const r=l.effects&&l.effects[o];r?r(t,o,n):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,n)}}function _e(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=X(),s=n.byAttr.get(t),l=N()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!s&&!l)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(l&&x(r)){const c=n.byDeclaredAttr.get(t),i=r.getAttribute(t);for(let u=0;u<c.length;u++)J(c[u].spec,i,t,c[u].componentTag,r)}if(window.lnCore._debugSink&&(o||s)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=n.byReactive.get(t);c&&Y(c,r,t,e.oldValue),n.reactiveWildcard.length&&Y(n.reactiveWildcard,r,t,e.oldValue)}if(s)for(let c=0;c<s.length;c++){const i=s[c];if(i.handler){i.handler(r,t,e.oldValue);continue}i.onAttributeChange&&r[i.attribute]?i.onAttributeChange(r,t):(G(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{_e(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).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 q(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const s=n.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;l&&n.onSubtreeChange(l,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const s=!!(n.firstElementChild||n.children&&n.children.length);for(let l=0;l<t.length;l++){const r=t[l];if(r.selector&&r.attribute&&r.ComponentFn){if(!s)n.matches&&n.matches(r.query)&&_(n,r);else if(n.matches&&n.matches(r.query)&&_(n,r),n.querySelectorAll){const c=n.querySelectorAll(r.query);for(let i=0;i<c.length;i++)_(c[i],r)}}r.onInit&&r.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const s=!!(n.firstElementChild||n.children&&n.children.length);for(let l=0;l<t.length;l++){const r=t[l],c=r.query;if(c){if(!s)n.matches&&n.matches(c)&&q(n,r);else if(n.matches&&n.matches(c)&&q(n,r),n.querySelectorAll){const i=n.querySelectorAll(c);for(let u=0;u<i.length;u++)q(i[u],r)}}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{xe(n)}catch(s){console.error("[ln-core] lifecycle handler failed",n.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){T().push(e),Z()}function D(e,t,o,n,s={}){const l=s.extraAttributes||[],r=s.onAttributeChange||null,c=s.onSubtreeChange||null,i=s.onInit||null,u=s.onAttrChange||null,w=s.effects||null,f=s.attributes||null,a=f?me(f):w,p=f?new Set(Object.keys(f)):null,h=s.persist||null;function b(m){const y=m||document.body;if(G(y,e,t,o),f&&N())for(const A in f){const $e=f[A],F=Array.from(y.querySelectorAll("["+A+"]"));y.matches&&y.matches("["+A+"]")&&F.push(y);for(let R=0;R<F.length;R++){const $=F[R];x($)&&J($e,$.getAttribute(A),A,n,$)}}i&&i(y)}const d=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let y;for(;(y=m.exec(e))!==null;)d.push(y[1])}else d.push(e);Ae({selector:e,attribute:t,componentTag:n,attributes:f,ComponentFn:o,onInit:i,observed:d.concat(l),onAttributeChange:r,onAttrChange:u,effects:a,declared:p,persist:h}),ke();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=s.subtreeQuery||(C?e:"["+e+"]");T().push({selector:e,attribute:t,ComponentFn:o,onInit:i,onSubtreeChange:c,query:v}),Z(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=D,window.lnCore.observeLifecycle=Se);function g(){Ce()>0?ve(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),b}function ee(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,o={},n=ee(t);if(!n)return o;const s=n.split("&");for(let l=0;l<s.length;l++){const r=s[l];if(!r)continue;const c=r.indexOf(":"),i=c>-1?r.slice(0,c):r,u=c>-1?r.slice(c+1):"";if(i)try{o[i]=decodeURIComponent(u)}catch{o[i]=u}}return o}function Ee(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const o=I();t==null?delete o[e]:o[e]=String(t);const s=Object.keys(o).map(function(l){const r=o[l];return r===""?l:l+":"+encodeURIComponent(r)}).join("&");ee(location.hash)!==s&&(location.hash=s)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Te(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 n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),s=n?n.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Ee,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Te,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=Fe);function te(e,t,o,n){const s=n,l=window.innerWidth,r=window.innerHeight,c=t.width,i=t.height,u=(o||"bottom").split("-"),w=u[0],f=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},p=a[w]||a.bottom;function h(g){return g==="top"||g==="bottom"?f==="start"?e.left:f==="end"?e.right-c:e.left+(e.width-c)/2:f==="start"?e.top:f==="end"?e.bottom-i:e.top+(e.height-i)/2}function b(g){let m,y,A=!0;return g==="top"?(m=e.top-s-i,y=h(g),m<0&&(A=!1)):g==="bottom"?(m=e.bottom+s,y=h(g),m+i>r&&(A=!1)):g==="left"?(m=h(g),y=e.left-s-c,y<0&&(A=!1)):(m=h(g),y=e.right+s,y+c>l&&(A=!1)),{top:m,left:y,side:g,fits:A}}let d=null;for(let g=0;g<p.length;g++){const m=b(p[g]);if(m.fits){d=m;break}}d||(d=b(p[0]));let C=d.top,v=d.left;return c>=l?v=0:(v<0&&(v=0),v+c>l&&(v=l-c)),i>=r?C=0:(C<0&&(C=0),C+i>r&&(C=r-i)),{top:C,left:v,placement:d.side}}function ne(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,n=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const l=e.offsetWidth,r=e.offsetHeight;return t.visibility=o,t.display=n,t.position=s,{width:l,height:r}}function Re(){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=Re),(function(){const e="data-ln-popover",t="lnPopover",o="data-ln-popover-for",n="data-ln-popover-position";if(window[t]!==void 0)return;const s={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-position":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"}},l=[];let r=null;function c(){r||(r=function(a){if(a.key!=="Escape"||l.length===0)return;l[l.length-1].close()},document.addEventListener("keydown",r))}function i(){l.length>0||r&&(document.removeEventListener("keydown",r),r=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const p=this;return this._onRequestOpen=function(h){const b=h.detail&&h.detail.trigger?h.detail.trigger:null;p.open(b)},this._onRequestClose=function(){p.close()},this._onRequestToggle=function(h){const b=h.detail&&h.detail.trigger?h.detail.trigger:null;p.toggle(b)},this._onNativeToggle=function(h){h.newState==="closed"&&p.isOpen&&(p._applyClose(),p.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const p=ne(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),v=this.dom.getAttribute(n)||"bottom",g=te(C,p,v,8);this.dom.style.top=g.top+"px",this.dom.style.left=g.left+"px",this.dom.setAttribute("data-ln-popover-placement",g.placement),this.trigger.setAttribute("aria-expanded","true")}const h=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(h,oe);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._boundReposition=function(){if(!d.trigger)return;const C=d.trigger.getBoundingClientRect(),v=ne(d.dom),g=d.dom.getAttribute(n)||"bottom",m=te(C,v,g,8);d.dom.style.top=m.top+"px",d.dom.style.left=m.left+"px",d.dom.setAttribute("data-ln-popover-placement",m.placement)},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),l.push(this),c(),S(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=l.indexOf(this);a!==-1&&l.splice(a,1),i(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,S(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function w(a){this.dom=a;const p=a.getAttribute(o);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",p),this._onClick=function(h){if(h.ctrlKey||h.metaKey||h.button===1)return;h.preventDefault();const b=document.getElementById(p);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}w.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function f(a){const p=a[t];if(!p)return;const b=a.getAttribute(e)==="open";if(b!==p.isOpen)if(b){if(B(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:p.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}p._applyOpen(p.trigger)}else{if(B(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:p.trigger}).defaultPrevented){a.setAttribute(e,"open");return}p._applyClose()}}D(e,t,u,"ln-popover",{attributes:s}),D(o,t+"Trigger",w,"ln-popover-trigger")})()})();
1
+ (function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!x(r))return}e.apply(console,t)}}function E(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function B(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const i=!!(t&&t.typed),r=t&&t.exclude,o={},c=e.elements,s={};if(i)for(let l=0;l<c.length;l++){const n=c[l];n.name&&n.type==="checkbox"&&!n.disabled&&(s[n.name]=(s[n.name]||0)+1)}for(let l=0;l<c.length;l++){const n=c[l];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")i&&s[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&o[n.name].push(n.options[u].value)}else if(i&&n.type==="hidden")o[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const u=Number(n.value);o[n.name]=n.value===""||isNaN(u)?null:u}else o[n.name]=n.value}return o}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const i=e.elements,r=[],o={};for(let c=0;c<i.length;c++){const s=i[c];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let c=0;c<i.length;c++){const s=i[c];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const l=s.getAttribute("data-ln-fill-as")||s.name;if(!l||!(l in t))continue;const n=t[l];if(s.type==="checkbox"){if(Array.isArray(n))s.checked=n.indexOf(s.value)!==-1;else if(o[s.name]>1){const u=String(n).split(",").map(function(f){return f.trim()});s.checked=u.indexOf(s.value)!==-1}else s.checked=se(n);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(n),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<s.options.length;u++)s.options[u].selected=n.indexOf(s.options[u].value)!==-1;r.push(s)}else s.value=n,s.tagName==="SELECT"&&n!=null&&s.setAttribute("data-ln-value",n),r.push(s)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ie);const M={};function ce(e,t){M[e]=t}function ue(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){E(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function de(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];j[i]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ae);const S={};function pe(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=S[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let s=0;s<i.length;s++){const l=i[s],n=l.getAttribute("data-ln-field");t[n]!=null&&(l.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const l=r[s],n=l.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const p=f[0].trim(),a=f[1].trim();t[a]!=null&&l.setAttribute(p,t[a])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const l=o[s],n=l.getAttribute("data-ln-show");n in t&&l.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let s=0;s<c.length;s++){const l=c[s],n=l.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const p=f[0].trim(),a=f[1].trim();a in t&&l.classList.toggle(p,!!t[a])}}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 i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<i.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[r],t??null),i[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function P(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const c=i.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,l){return t[l]!==void 0?t[l]:""}))}const r=function(c,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const s=o[c],l=s.attributes;for(let n=0;n<l.length;n++){const u=l[n];u.value.indexOf("{{")!==-1&&s.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ge(e,t,i,r,o,c){const s={};for(let n=0;n<e.children.length;n++){const u=e.children[n],f=u.getAttribute("data-ln-render-key");f&&(s[f]=u)}const l=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],f=String(r(u));let p=s[f];if(p)o(p,u,n);else{const a=pe(i,c);if(!a||(P(a,u),p=a.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",f),o(p,u,n)}l.appendChild(p)}e.textContent="",e.appendChild(l)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=W,window.lnCore.lnFill=he,window.lnCore.renderList=ge);function O(e,t,i){const r=e.getAttribute(t);return r===null?i:r}function H(e,t,i){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?i:r}function V(e,t,i=!1){const r=e.getAttribute(t);if(r===null)return!!i;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const L=new Map;function K(e,t){const i=(e?e.join("|"):"")+"::"+t;if(L.has(i))return L.get(i);const r=new Set(e||[]),o=function(c,s){const l=c.getAttribute(s);return l!==null&&r.has(l)?l:t};return L.set(i,o),o}function Q(e,t,i){const r=parseFloat(e.getAttribute(t));return isNaN(r)?i:r}function z(e,t,i){const r=e.getAttribute(t);if(!r)return i;try{return JSON.parse(r)}catch{return i}}function J(e,t,i,r,o){if(!e||t===null)return!0;const c=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const l=n=>{o?console.warn(n,o):console.warn(n)};if(s==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(l(`[${c}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const n=e.values||[];return n.includes(t)?!0:(l(`[${c}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return l(`[${c}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(l(`[${c}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(l(`[${c}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(l(`[${c}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(n){return l(`[${c}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,i){for(const r in i){const[o,c,s]=i[r];Object.defineProperty(e,r,{get:function(){return o(t,c,s)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const i in e){const r=e[i];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=K(r.values,r.fallback);break;case"integer":o=H;break;case"float":o=Q;break;case"boolean":o=V;break;case"list":o=U;break;case"json":o=z;break;case"string":default:o=O;break}o||(o=O),t[r.prop]=[o,i,r.fallback]}return t}function me(e){const t={};for(const i in e){const r=e[i];r&&r.effect&&(t[i]=r.effect)}return Object.keys(t).length?t:null}function ye(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=we,window.lnCore.attrSpec=be,window.lnCore.attrStr=O,window.lnCore.attrInt=H,window.lnCore.attrBool=V,window.lnCore.attrList=U,window.lnCore.attrEnum=K,window.lnCore.attrFloat=Q,window.lnCore.attrJson=z);function _(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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function G(e,t,i,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:i,ComponentFn:r};if(e.matches&&e.matches(c)&&_(e,s),e.querySelectorAll){const l=e.querySelectorAll(c);for(let n=0;n<l.length;n++)_(l[n],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(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 X(){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 Ae(e){const t=X(),i=e.observed||[];for(let r=0;r<i.length;r++){const o=i[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ye(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,i,r){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const s=c.effects&&c.effects[i];s?s(t,i,r):c.onAttrChange&&(!c.declared||c.declared.has(i))&&c.onAttrChange(t,i,r)}}function _e(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,r=X(),o=r.byAttr.get(t),c=N()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!i&&!o&&!c)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(c&&x(s)){const l=r.byDeclaredAttr.get(t),n=s.getAttribute(t);for(let u=0;u<l.length;u++)J(l[u].spec,n,t,l[u].componentTag,s)}if(window.lnCore._debugSink&&(i||o)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),i){const l=r.byReactive.get(t);l&&Y(l,s,t,e.oldValue),r.reactiveWildcard.length&&Y(r.reactiveWildcard,s,t,e.oldValue)}if(o)for(let l=0;l<o.length;l++){const n=o[l];if(n.handler){n.handler(s,t,e.oldValue);continue}n.onAttributeChange&&s[n.attribute]?n.onAttributeChange(s,t):(G(s,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(s))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{_e(t[i])}catch(r){console.error("[ln-core] mutation handler failed",t[i].target,r)}}).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 q(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(!t.length)return;const i=e.target;if(i){const r=i.nodeType===1?i:i.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const o=t[r];if(o.onSubtreeChange&&o.query){const c=o.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;s&&o.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let s=0;s<t.length;s++){const l=t[s];if(l.selector&&l.attribute&&l.ComponentFn){if(!c)o.matches&&o.matches(l.query)&&_(o,l);else if(o.matches&&o.matches(l.query)&&_(o,l),o.querySelectorAll){const n=o.querySelectorAll(l.query);for(let u=0;u<n.length;u++)_(n[u],l)}}l.onInit&&l.onInit(o)}}}for(let r=0;r<e.removedNodes.length;r++){const o=e.removedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let s=0;s<t.length;s++){const l=t[s],n=l.query;if(n){if(!c)o.matches&&o.matches(n)&&q(o,l);else if(o.matches&&o.matches(n)&&q(o,l),o.querySelectorAll){const u=o.querySelectorAll(n);for(let f=0;f<u.length;f++)q(u[f],l)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.type==="childList")try{xe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){T().push(e),Z()}function D(e,t,i,r,o={}){const c=o.extraAttributes||[],s=o.onAttributeChange||null,l=o.onSubtreeChange||null,n=o.onInit||null,u=o.onAttrChange||null,f=o.effects||null,p=o.attributes||null,a=p?me(p):f,h=p?new Set(Object.keys(p)):null,g=o.persist||null;function b(m){const y=m||document.body;if(G(y,e,t,i),p&&N())for(const A in p){const $e=p[A],F=Array.from(y.querySelectorAll("["+A+"]"));y.matches&&y.matches("["+A+"]")&&F.push(y);for(let R=0;R<F.length;R++){const $=F[R];x($)&&J($e,$.getAttribute(A),A,r,$)}}n&&n(y)}const d=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let y;for(;(y=m.exec(e))!==null;)d.push(y[1])}else d.push(e);Ae({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:i,onInit:n,observed:d.concat(c),onAttributeChange:s,onAttrChange:u,effects:a,declared:h,persist:g}),ke();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=o.subtreeQuery||(C?e:"["+e+"]");T().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:l,query:v}),Z(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=D,window.lnCore.observeLifecycle=Ee);function w(){Ce()>0?ve(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),b}function ee(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,i={},r=ee(t);if(!r)return i;const o=r.split("&");for(let c=0;c<o.length;c++){const s=o[c];if(!s)continue;const l=s.indexOf(":"),n=l>-1?s.slice(0,l):s,u=l>-1?s.slice(l+1):"";if(n)try{i[n]=decodeURIComponent(u)}catch{i[n]=u}}return i}function Se(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const i=I();t==null?delete i[e]:i[e]=String(t);const o=Object.keys(i).map(function(c){const s=i[c];return s===""?c:c+":"+encodeURIComponent(s)}).join("&");ee(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Te(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:i,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Se,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Te,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=Fe);function te(e,t,i,r){const o=r,c=window.innerWidth,s=window.innerHeight,l=t.width,n=t.height,u=(i||"bottom").split("-"),f=u[0],p=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},h=a[f]||a.bottom;function g(w){return w==="top"||w==="bottom"?p==="start"?e.left:p==="end"?e.right-l:e.left+(e.width-l)/2:p==="start"?e.top:p==="end"?e.bottom-n:e.top+(e.height-n)/2}function b(w){let m,y,A=!0;return w==="top"?(m=e.top-o-n,y=g(w),m<0&&(A=!1)):w==="bottom"?(m=e.bottom+o,y=g(w),m+n>s&&(A=!1)):w==="left"?(m=g(w),y=e.left-o-l,y<0&&(A=!1)):(m=g(w),y=e.right+o,y+l>c&&(A=!1)),{top:m,left:y,side:w,fits:A}}let d=null;for(let w=0;w<h.length;w++){const m=b(h[w]);if(m.fits){d=m;break}}d||(d=b(h[0]));let C=d.top,v=d.left;return l>=c?v=0:(v<0&&(v=0),v+l>c&&(v=c-l)),n>=s?C=0:(C<0&&(C=0),C+n>s&&(C=s-n)),{top:C,left:v,placement:d.side}}function ne(e){if(!e)return{width:0,height:0};const t=e.style,i=t.visibility,r=t.display,o=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const c=e.offsetWidth,s=e.offsetHeight;return t.visibility=i,t.display=r,t.position=o,{width:c,height:s}}function Re(){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=Re),(function(){const e="data-ln-popover",t="lnPopover",i="data-ln-popover-for",r="data-ln-popover-position";if(window[t]!==void 0)return;const o={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:p,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-position":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"}},c=[];let s=null;function l(){s||(s=function(a){if(a.key!=="Escape"||c.length===0)return;c[c.length-1].close()},document.addEventListener("keydown",s))}function n(){c.length>0||s&&(document.removeEventListener("keydown",s),s=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const h=this;return this._onRequestOpen=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.open(b)},this._onRequestClose=function(){h.close()},this._onRequestToggle=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.toggle(b)},this._onNativeToggle=function(g){g.newState==="closed"&&h.isOpen&&(h._applyClose(),h.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const h=ne(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),v=this.dom.getAttribute(r)||"bottom",w=te(C,h,v,8);this.dom.style.top=w.top+"px",this.dom.style.left=w.left+"px",this.dom.setAttribute("data-ln-popover-placement",w.placement),this.trigger.setAttribute("aria-expanded","true")}const g=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(g,oe);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._boundReposition=function(){if(!d.trigger)return;const C=d.trigger.getBoundingClientRect(),v=ne(d.dom),w=d.dom.getAttribute(r)||"bottom",m=te(C,v,w,8);d.dom.style.top=m.top+"px",d.dom.style.left=m.left+"px",d.dom.setAttribute("data-ln-popover-placement",m.placement)},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),c.push(this),l(),E(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=c.indexOf(this);a!==-1&&c.splice(a,1),n(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,E(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function f(a){this.dom=a;const h=a.getAttribute(i);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",h),this._onClick=function(g){if(g.ctrlKey||g.metaKey||g.button===1)return;g.preventDefault();const b=document.getElementById(h);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}f.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function p(a){const h=a[t];if(!h)return;const b=a.getAttribute(e)==="open";if(b!==h.isOpen)if(b){if(B(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}h._applyOpen(h.trigger)}else{if(B(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"open");return}h._applyClose()}}D(e,t,u,"ln-popover",{attributes:o}),D(i,t+"Trigger",f,"ln-popover-trigger")})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function D(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function m(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!m(n))return}e.apply(console,t)}}function F(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}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 Y(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Z(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let a=0;a<s.length;a++){const r=s[a];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let a=0;a<s.length;a++){const r=s[a];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(n&&r.matches&&r.matches(n)))if(r.type==="checkbox")o&&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 c=0;c<r.options.length;c++)r.options[c].selected&&l[r.name].push(r.options[c].value)}else if(o&&r.type==="hidden")l[r.name]=r.value;else if(o&&(r.type==="number"||r.type==="range")){const c=Number(r.value);l[r.name]=r.value===""||isNaN(c)?null:c}else l[r.name]=r.value}return l}function ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function te(e,t){const o=e.elements,n=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const r=t[a];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const c=String(r).split(",").map(function(d){return d.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=ee(r);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let c=0;c<i.options.length;c++)i.options[c].selected=r.indexOf(i.options[c].value)!==-1;n.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=te,window.lnCore.serializeForm=Z,window.lnCore.resolveFormMethod=Y);const q={};function ne(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ne,window.lnCore.getDataMapper=re);function oe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){F(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const I={};function ie(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];I[o]=t}function le(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return I[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ie,window.lnCore.getLocaleFallback=le,window.lnCore.ensureLocaleObserver=oe);const C={};function se(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 $(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const a=o[i],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const a=n[i],r=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<r.length;c++){const d=r[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&a.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const a=l[i],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],r=a.getAttribute("data-ln-class").split(",");for(let c=0;c<r.length;c++){const d=r[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&a.classList.toggle(u,!!t[f])}}return e}function ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].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)$(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 N(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const n=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],a=i.attributes;for(let r=0;r<a.length;r++){const c=a[r];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ce(e,t,o,n,l,s){const i={};for(let r=0;r<e.children.length;r++){const c=e.children[r],d=c.getAttribute("data-ln-render-key");d&&(i[d]=c)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const c=t[r],d=String(n(c));let u=i[d];if(u)l(u,c,r);else{const f=se(o,s);if(!f||(N(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),l(u,c,r)}a.appendChild(u)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ce);function y(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function T(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function M(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const A=new Map;function B(e,t){const o=(e?e.join("|"):"")+"::"+t;if(A.has(o))return A.get(o);const n=new Set(e||[]),l=function(s,i){const a=s.getAttribute(i);return a!==null&&n.has(a)?a:t};return A.set(o,l),l}function j(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function V(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function W(e,t,o,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=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"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${s}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${s}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${s}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ue(e,t,o){for(const n in o){const[l,s,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=B(n.values,n.fallback);break;case"integer":l=T;break;case"float":l=j;break;case"boolean":l=M;break;case"list":l=R;break;case"json":l=V;break;case"string":default:l=y;break}l||(l=y),t[n.prop]=[l,o,n.fallback]}return t}function fe(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.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 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=ue,window.lnCore.attrSpec=de,window.lnCore.attrStr=y,window.lnCore.attrInt=T,window.lnCore.attrBool=M,window.lnCore.attrList=R,window.lnCore.attrEnum=B,window.lnCore.attrFloat=j,window.lnCore.attrJson=V);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 U(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&h(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let r=0;r<a.length;r++)h(a[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function he(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(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 H(){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 P(e){const t=H(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=we(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,o,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function pe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=H(),l=n.byAttr.get(t),s=D()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&m(i)){const a=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let c=0;c<a.length;c++)W(a[c].spec,r,t,a[c].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const a=n.byReactive.get(t);a&&Q(a,i,t,e.oldValue),n.reactiveWildcard.length&&Q(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const r=l[a];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(U(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function J(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{pe(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).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 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(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=v();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,s=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;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&h(n,i);else if(n.matches&&n.matches(i.query)&&h(n,i),n.querySelectorAll){const a=n.querySelectorAll(i.query);for(let r=0;r<a.length;r++)h(a[r],i)}}i.onInit&&i.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],a=i.query;if(a){if(!l)n.matches&&n.matches(a)&&x(n,i);else if(n.matches&&n.matches(a)&&x(n,i),n.querySelectorAll){const r=n.querySelectorAll(a);for(let c=0;c<r.length;c++)x(r[c],i)}}}}}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{ge(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function me(e,t){P({observed:e,handler:t}),J()}function Ce(e){v().push(e),K()}function z(e,t,o,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,a=l.onSubtreeChange||null,r=l.onInit||null,c=l.onAttrChange||null,d=l.effects||null,u=l.attributes||null,f=u?fe(u):d,Fe=u?new Set(Object.keys(u)):null,qe=l.persist||null;function g(k){const w=k||document.body;if(U(w,e,t,o),u&&D())for(const b in u){const Ne=u[b],O=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&O.push(w);for(let E=0;E<O.length;E++){const L=O[E];m(L)&&W(Ne,L.getAttribute(b),b,n,L)}}r&&r(w)}const _=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)_.push(w[1])}else _.push(e);P({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:o,onInit:r,observed:_.concat(s),onAttributeChange:i,onAttrChange:c,effects:f,declared:Fe,persist:qe}),J();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,$e=l.subtreeQuery||(Ie?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:o,onInit:r,onSubtreeChange:a,query:$e}),K(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ce);function X(){he()>0?be(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),g}function G(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,o={},n=G(t);if(!n)return o;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const a=i.indexOf(":"),r=a>-1?i.slice(0,a):i,c=a>-1?i.slice(a+1):"";if(r)try{o[r]=decodeURIComponent(c)}catch{o[r]=c}}return o}function ye(e){if(!e)return null;const t=S();return e in t?t[e]:null}function Ae(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 i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");G(location.hash)!==l&&(location.hash=l)}function ve(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 o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),l=n?n.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=ye,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=ve,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Oe);function Ee(){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=Ee);function Le(e,t=100,o=0){const n=parseFloat(String(e))||0,l=parseFloat(String(t))||100,s=parseFloat(String(o))||0,i=Math.max(s,Math.min(n,l)),a=l-s;let r=0;return a>0&&(r=(i-s)/a*100),r=Math.max(0,Math.min(100,r)),{value:n,min:s,max:l,clampedValue:i,percentage:r}}function De(e,t,o=100){if(t!=null&&t!==""){const n=parseFloat(String(t));if(!isNaN(n)&&n>0)return n}if(e!=null&&e!==""){const n=parseFloat(String(e));if(!isNaN(n)&&n>0)return n}return o}(function(){const e="[data-ln-progress]",t="lnProgress";if(window[t]!==void 0)return;function o(i){const a=i[t];a&&s.call(a)}const n={"data-ln-progress":{type:"float",fallback:0,min:0,effect:o,description:"Current progress value"},"data-ln-progress-max":{type:"float",fallback:100,min:0,effect:o,description:"Maximum progress scale value"}};function l(i){return this.dom=i,this._parentObserver=null,s.call(this),this}l.prototype.destroy=function(){this.dom[t]&&(this._parentObserver&&this._parentObserver.disconnect(),delete this.dom[t])};function s(){const i=this.dom.getAttribute("data-ln-progress"),a=this.dom.parentElement,r=a?a.getAttribute("data-ln-progress-max"):null,c=this.dom.getAttribute("data-ln-progress-max"),d=De(c,r,100),u=Le(i,d);this.dom.style.width=u.percentage+"%",this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(u.min)),this.dom.setAttribute("aria-valuemax",String(u.max)),this.dom.setAttribute("aria-valuenow",String(u.clampedValue)),F(this.dom,"ln-progress:change",{target:this.dom,value:u.value,max:u.max,percentage:u.percentage})}z(e,t,l,"ln-progress",{attributes:n}),me(["data-ln-progress-max"],function(i){const a=i.querySelectorAll?i.querySelectorAll(e):[];for(let r=0;r<a.length;r++){const c=a[r][t];c&&s.call(c)}})})()})();
1
+ (function(){"use strict";function D(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function m(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!m(r))return}e.apply(console,t)}}function F(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}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 Y(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Z(e,t){const i=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,l={};if(i)for(let s=0;s<a.length;s++){const n=a[s];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let s=0;s<a.length;s++){const n=a[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")i&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&o[n.name].push(n.options[c].value)}else if(i&&n.type==="hidden")o[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const c=Number(n.value);o[n.name]=n.value===""||isNaN(c)?null:c}else o[n.name]=n.value}return o}function ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function te(e,t){const i=e.elements,r=[],o={};for(let a=0;a<i.length;a++){const l=i[a];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let a=0;a<i.length;a++){const l=i[a];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const n=t[s];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=ee(n);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<l.options.length;c++)l.options[c].selected=n.indexOf(l.options[c].value)!==-1;r.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=te,window.lnCore.serializeForm=Z,window.lnCore.resolveFormMethod=Y);const q={};function ne(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ne,window.lnCore.getDataMapper=re);function oe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){F(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const I={};function ie(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];I[i]=t}function le(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return I[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ie,window.lnCore.getLocaleFallback=le,window.lnCore.ensureLocaleObserver=oe);const C={};function se(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=C[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let l=0;l<i.length;l++){const s=i[l],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const s=r[l],n=s.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&s.setAttribute(u,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const a=e.querySelectorAll("[data-ln-class]");for(let l=0;l<a.length;l++){const s=a[l],n=s.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&s.classList.toggle(u,!!t[f])}}return e}function ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<i.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[r],t??null),i[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function N(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const a=i.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const r=function(a,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const l=o[a],s=l.attributes;for(let n=0;n<s.length;n++){const c=s[n];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ce(e,t,i,r,o,a){const l={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(r(c));let u=l[d];if(u)o(u,c,n);else{const f=se(i,a);if(!f||(N(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),o(u,c,n)}s.appendChild(u)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ce);function y(e,t,i){const r=e.getAttribute(t);return r===null?i:r}function T(e,t,i){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?i:r}function M(e,t,i=!1){const r=e.getAttribute(t);if(r===null)return!!i;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const A=new Map;function B(e,t){const i=(e?e.join("|"):"")+"::"+t;if(A.has(i))return A.get(i);const r=new Set(e||[]),o=function(a,l){const s=a.getAttribute(l);return s!==null&&r.has(s)?s:t};return A.set(i,o),o}function j(e,t,i){const r=parseFloat(e.getAttribute(t));return isNaN(r)?i:r}function V(e,t,i){const r=e.getAttribute(t);if(!r)return i;try{return JSON.parse(r)}catch{return i}}function W(e,t,i,r,o){if(!e||t===null)return!0;const a=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(s(`[${a}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(s(`[${a}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(s(`[${a}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(s(`[${a}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return s(`[${a}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ue(e,t,i){for(const r in i){const[o,a,l]=i[r];Object.defineProperty(e,r,{get:function(){return o(t,a,l)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const i in e){const r=e[i];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=B(r.values,r.fallback);break;case"integer":o=T;break;case"float":o=j;break;case"boolean":o=M;break;case"list":o=R;break;case"json":o=V;break;case"string":default:o=y;break}o||(o=y),t[r.prop]=[o,i,r.fallback]}return t}function fe(e){const t={};for(const i in e){const r=e[i];r&&r.effect&&(t[i]=r.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 i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ue,window.lnCore.attrSpec=de,window.lnCore.attrStr=y,window.lnCore.attrInt=T,window.lnCore.attrBool=M,window.lnCore.attrList=R,window.lnCore.attrEnum=B,window.lnCore.attrFloat=j,window.lnCore.attrJson=V);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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function U(e,t,i,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:i,ComponentFn:r};if(e.matches&&e.matches(a)&&h(e,l),e.querySelectorAll){const s=e.querySelectorAll(a);for(let n=0;n<s.length;n++)h(s[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function he(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(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 H(){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 P(e){const t=H(),i=e.observed||[];for(let r=0;r<i.length;r++){const o=i[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=we(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,i,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const l=a.effects&&a.effects[i];l?l(t,i,r):a.onAttrChange&&(!a.declared||a.declared.has(i))&&a.onAttrChange(t,i,r)}}function pe(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,r=H(),o=r.byAttr.get(t),a=D()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!i&&!o&&!a)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(a&&m(l)){const s=r.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let c=0;c<s.length;c++)W(s[c].spec,n,t,s[c].componentTag,l)}if(window.lnCore._debugSink&&(i||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),i){const s=r.byReactive.get(t);s&&Q(s,l,t,e.oldValue),r.reactiveWildcard.length&&Q(r.reactiveWildcard,l,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const n=o[s];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(U(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function J(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{pe(t[i])}catch(r){console.error("[ln-core] mutation handler failed",t[i].target,r)}}).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 x(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=v();if(!t.length)return;const i=e.target;if(i){const r=i.nodeType===1?i:i.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const o=t[r];if(o.onSubtreeChange&&o.query){const a=o.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;l&&o.onSubtreeChange(l,e)}}for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];if(o.nodeType===1){const a=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!a)o.matches&&o.matches(s.query)&&h(o,s);else if(o.matches&&o.matches(s.query)&&h(o,s),o.querySelectorAll){const n=o.querySelectorAll(s.query);for(let c=0;c<n.length;c++)h(n[c],s)}}s.onInit&&s.onInit(o)}}}for(let r=0;r<e.removedNodes.length;r++){const o=e.removedNodes[r];if(o.nodeType===1){const a=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l],n=s.query;if(n){if(!a)o.matches&&o.matches(n)&&x(o,s);else if(o.matches&&o.matches(n)&&x(o,s),o.querySelectorAll){const c=o.querySelectorAll(n);for(let d=0;d<c.length;d++)x(c[d],s)}}}}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.type==="childList")try{ge(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function me(e,t){P({observed:e,handler:t}),J()}function Ce(e){v().push(e),K()}function z(e,t,i,r,o={}){const a=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,n=o.onInit||null,c=o.onAttrChange||null,d=o.effects||null,u=o.attributes||null,f=u?fe(u):d,Fe=u?new Set(Object.keys(u)):null,qe=o.persist||null;function g(k){const w=k||document.body;if(U(w,e,t,i),u&&D())for(const b in u){const Ne=u[b],O=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&O.push(w);for(let E=0;E<O.length;E++){const L=O[E];m(L)&&W(Ne,L.getAttribute(b),b,r,L)}}n&&n(w)}const _=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)_.push(w[1])}else _.push(e);P({selector:e,attribute:t,componentTag:r,attributes:u,ComponentFn:i,onInit:n,observed:_.concat(a),onAttributeChange:l,onAttrChange:c,effects:f,declared:Fe,persist:qe}),J();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,$e=o.subtreeQuery||(Ie?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:s,query:$e}),K(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ce);function X(){he()>0?be(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),g}function G(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,i={},r=G(t);if(!r)return i;const o=r.split("&");for(let a=0;a<o.length;a++){const l=o[a];if(!l)continue;const s=l.indexOf(":"),n=s>-1?l.slice(0,s):l,c=s>-1?l.slice(s+1):"";if(n)try{i[n]=decodeURIComponent(c)}catch{i[n]=c}}return i}function ye(e){if(!e)return null;const t=S();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const i=S();t==null?delete i[e]:i[e]=String(t);const o=Object.keys(i).map(function(a){const l=i[a];return l===""?a:a+":"+encodeURIComponent(l)}).join("&");G(location.hash)!==o&&(location.hash=o)}function ve(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 i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:i,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=ye,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=ve,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Oe);function Ee(){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=Ee);function Le(e,t=100,i=0){const r=parseFloat(String(e))||0,o=parseFloat(String(t))||100,a=parseFloat(String(i))||0,l=Math.max(a,Math.min(r,o)),s=o-a;let n=0;return s>0&&(n=(l-a)/s*100),n=Math.max(0,Math.min(100,n)),{value:r,min:a,max:o,clampedValue:l,percentage:n}}function De(e,t,i=100){if(t!=null&&t!==""){const r=parseFloat(String(t));if(!isNaN(r)&&r>0)return r}if(e!=null&&e!==""){const r=parseFloat(String(e));if(!isNaN(r)&&r>0)return r}return i}(function(){const e="[data-ln-progress]",t="lnProgress";if(window[t]!==void 0)return;function i(l){const s=l[t];s&&a.call(s)}const r={"data-ln-progress":{type:"float",fallback:0,min:0,effect:i,description:"Current progress value"},"data-ln-progress-max":{type:"float",fallback:100,min:0,effect:i,description:"Maximum progress scale value"}};function o(l){return this.dom=l,this._parentObserver=null,a.call(this),this}o.prototype.destroy=function(){this.dom[t]&&(this._parentObserver&&this._parentObserver.disconnect(),delete this.dom[t])};function a(){const l=this.dom.getAttribute("data-ln-progress"),s=this.dom.parentElement,n=s?s.getAttribute("data-ln-progress-max"):null,c=this.dom.getAttribute("data-ln-progress-max"),d=De(c,n,100),u=Le(l,d);this.dom.style.width=u.percentage+"%",this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(u.min)),this.dom.setAttribute("aria-valuemax",String(u.max)),this.dom.setAttribute("aria-valuenow",String(u.clampedValue)),F(this.dom,"ln-progress:change",{target:this.dom,value:u.value,max:u.max,percentage:u.percentage})}z(e,t,o,"ln-progress",{attributes:r}),me(["data-ln-progress-max"],function(l){const s=l.querySelectorAll?l.querySelectorAll(e):[];for(let n=0;n<s.length;n++){const c=s[n][t];c&&a.call(c)}})})()})();
@@ -1 +1 @@
1
- var LnAshlarComponent=(function(x){"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 r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!E(r))return}e.apply(console,t)}}function O(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function qe(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function De(e,t){if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||!t)return!1;const n=t.getAttribute("href");return!(!n||t.getAttribute("target")==="_blank"||t.hasAttribute("download")||n.startsWith("mailto:")||n.startsWith("tel:")||n==="#"||n.startsWith("#")||t.hostname&&t.hostname!==window.location.hostname)}function Le(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),r=t&&t.exclude,o={},s=e.elements,l={};if(n)for(let a=0;a<s.length;a++){const i=s[a];i.name&&i.type==="checkbox"&&!i.disabled&&(l[i.name]=(l[i.name]||0)+1)}for(let a=0;a<s.length;a++){const i=s[a];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(r&&i.matches&&i.matches(r)))if(i.type==="checkbox")n&&l[i.name]===1?o[i.name]=i.checked:(o[i.name]||(o[i.name]=[]),i.checked&&o[i.name].push(i.value));else if(i.type==="radio")i.checked&&(o[i.name]=i.value);else if(i.type==="select-multiple"){o[i.name]=[];for(let c=0;c<i.options.length;c++)i.options[c].selected&&o[i.name].push(i.options[c].value)}else if(n&&i.type==="hidden")o[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const c=Number(i.value);o[i.name]=i.value===""||isNaN(c)?null:c}else o[i.name]=i.value}return o}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 Me(e,t){const n=e.elements,r=[],o={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const i=t[a];if(l.type==="checkbox"){if(Array.isArray(i))l.checked=i.indexOf(l.value)!==-1;else if(o[l.name]>1){const c=String(i).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=Ie(i);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(i),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(i))for(let c=0;c<l.options.length;c++)l.options[c].selected=i.indexOf(l.options[c].value)!==-1;r.push(l)}else l.value=i,l.tagName==="SELECT"&&i!=null&&l.setAttribute("data-ln-value",i),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Me,window.lnCore.serializeForm=Re,window.lnCore.resolveFormMethod=Le);const z={};function $e(e,t){z[e]=t}function Te(e){return z[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=$e,window.lnCore.getDataMapper=Te);function Fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const J={};function Ne(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];J[n]=t}function Be(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return J[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ne,window.lnCore.getLocaleFallback=Be,window.lnCore.ensureLocaleObserver=Fe);const q={};function We(e,t){q[e]||(q[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=q[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function G(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],i=a.getAttribute("data-ln-field");t[i]!=null&&(a.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const a=r[l],i=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<i.length;c++){const d=i[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();t[p]!=null&&a.setAttribute(f,t[p])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const a=o[l],i=a.getAttribute("data-ln-show");i in t&&a.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],i=a.getAttribute("data-ln-class").split(",");for(let c=0;c<i.length;c++){const d=i[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();p in t&&a.classList.toggle(f,!!t[p])}}return e}function je(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)G(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 X(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const r=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],a=l.attributes;for(let i=0;i<a.length;i++){const c=a[i];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ke(e,t,n,r,o,s){const l={};for(let i=0;i<e.children.length;i++){const c=e.children[i],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const a=document.createDocumentFragment();for(let i=0;i<t.length;i++){const c=t[i],d=String(r(c));let f=l[d];if(f)o(f,c,i);else{const p=We(n,s);if(!p||(X(p,c),f=p.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),o(f,c,i)}a.appendChild(f)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=G,window.lnCore.lnFill=je,window.lnCore.renderList=Ke);function D(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function Y(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function Z(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const L=new Map;function te(e,t){const n=(e?e.join("|"):"")+"::"+t;if(L.has(n))return L.get(n);const r=new Set(e||[]),o=function(s,l){const a=s.getAttribute(l);return a!==null&&r.has(a)?a:t};return L.set(n,o),o}function ne(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function re(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function oe(e,t,n,r,o){if(!e||t===null)return!0;const s=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=i=>{o?console.warn(i,o):console.warn(i)};if(l==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const i=e.values||[];return i.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(a(`[${s}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(a(`[${s}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(i){return a(`[${s}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function Pe(e,t,n){for(const r in n){const[o,s,l]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function He(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=te(r.values,r.fallback);break;case"integer":o=Y;break;case"float":o=ne;break;case"boolean":o=Z;break;case"list":o=ee;break;case"json":o=re;break;case"string":default:o=D;break}o||(o=D),t[r.prop]=[o,n,r.fallback]}return t}function Ue(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Ve(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=Pe,window.lnCore.attrSpec=He,window.lnCore.attrStr=D,window.lnCore.attrInt=Y,window.lnCore.attrBool=Z,window.lnCore.attrList=ee,window.lnCore.attrEnum=te,window.lnCore.attrFloat=ne,window.lnCore.attrJson=re);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 ie(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&C(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let i=0;i<a.length;i++)C(a[i],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Qe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ze(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 le(){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 Je(e){const t=le(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ve(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function se(e,t,n,r){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Ge(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=le(),o=r.byAttr.get(t),s=Q()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&E(l)){const a=r.byDeclaredAttr.get(t),i=l.getAttribute(t);for(let c=0;c<a.length;c++)oe(a[c].spec,i,t,a[c].componentTag,l)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const a=r.byReactive.get(t);a&&se(a,l,t,e.oldValue),r.reactiveWildcard.length&&se(r.reactiveWildcard,l,t,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const i=o[a];if(i.handler){i.handler(l,t,e.oldValue);continue}i.onAttributeChange&&l[i.attribute]?i.onAttributeChange(l,t):(ie(l,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(l))}}}function Xe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ge(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function R(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function I(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Ye(e){const t=R();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange&&r.query){const o=r.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;s&&r.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1){const o=!!(r.firstElementChild||r.children&&r.children.length);for(let s=0;s<t.length;s++){const l=t[s];if(l.selector&&l.attribute&&l.ComponentFn){if(!o)r.matches&&r.matches(l.query)&&C(r,l);else if(r.matches&&r.matches(l.query)&&C(r,l),r.querySelectorAll){const a=r.querySelectorAll(l.query);for(let i=0;i<a.length;i++)C(a[i],l)}}l.onInit&&l.onInit(r)}}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1){const o=!!(r.firstElementChild||r.children&&r.children.length);for(let s=0;s<t.length;s++){const l=t[s],a=l.query;if(a){if(!o)r.matches&&r.matches(a)&&I(r,l);else if(r.matches&&r.matches(a)&&I(r,l),r.querySelectorAll){const i=r.querySelectorAll(a);for(let c=0;c<i.length;c++)I(i[c],l)}}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Ye(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ze(e){R().push(e),ae()}function ce(e,t,n,r,o={}){const s=o.extraAttributes||[],l=o.onAttributeChange||null,a=o.onSubtreeChange||null,i=o.onInit||null,c=o.onAttrChange||null,d=o.effects||null,f=o.attributes||null,p=f?Ue(f):d,k=f?new Set(Object.keys(f)):null,u=o.persist||null;function h(P){const b=P||document.body;if(ie(b,e,t,n),f&&Q())for(const v in f){const gt=f[v],H=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&H.push(b);for(let U=0;U<H.length;U++){const V=H[U];E(V)&&oe(gt,V.getAttribute(v),v,r,V)}}i&&i(b)}const w=[];if(e.indexOf("[")!==-1){const P=/\[([\w-]+)/g;let b;for(;(b=P.exec(e))!==null;)w.push(b[1])}else w.push(e);Je({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:i,observed:w.concat(s),onAttributeChange:l,onAttrChange:c,effects:p,declared:k,persist:u}),Xe();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,pt=o.subtreeQuery||(m?e:"["+e+"]");R().push({selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:a,query:pt}),ae(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Ze);function Oe(){Qe()>0?ze(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Oe):Oe(),h}function ue(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=ue(t);if(!r)return n;const o=r.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const a=l.indexOf(":"),i=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(i)try{n[i]=decodeURIComponent(c)}catch{n[i]=c}}return n}function et(e){if(!e)return null;const t=M();return e in t?t[e]:null}function tt(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");ue(location.hash)!==o&&(location.hash=o)}function nt(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function rt(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ot(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function it(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 lt(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function st(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=et,window.lnCore.hashSet=tt,window.lnCore.hashLinkClick=nt,window.lnCore.resolveHashNamespace=rt,window.lnCore.hashSortEncode=ot,window.lnCore.hashSortDecode=it,window.lnCore.hashFilterEncode=lt,window.lnCore.hashFilterDecode=st);function at(){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=at);function ct(e,{isHydration:t=!1,hasPrimaryRegion:n=!1,primaryMatch:r=null}={}){const o=n?!r:!e.some(c=>c.match),s=[],l=[];for(const c of e)if(!(!c.targetEl&&!c.isPending)){if(!c.match){const d=t&&c.hasHydrate&&c.hasChildren;!c.hasKeep&&c.hasChildren&&!d&&c.targetEl&&s.push(c);continue}c.hasKeep&&c.mountedTemplate===c.match.route.templateNode||l.push(Object.assign({},c,{skipMount:t&&c.hasHydrate&&c.hasChildren}))}l.sort((c,d)=>c.regionKey==="__primary__"?-1:d.regionKey==="__primary__"?1:0);const i=l.find(c=>c.regionKey==="__primary__")||l[0]||null;return{notFound:o,clears:s,swaps:l,owner:i}}function _(e){if(!e||typeof e!="string")return"";let t=e.trim().replace(/\/+$/,"");return!t||t==="/"?"":t.startsWith("/")?t:"/"+t}function ut(e,t){const n=_(t);if(!n)return e&&e.replace(/\/+$/,"")||"/";const r=(e||"/").replace(/\/+$/,"")||"/";return r===n?"/":r.startsWith(n+"/")?r.slice(n.length).replace(/\/+$/,"")||"/":r}function de(e,t){const n=_(t);if(!n)return e||"/";const r=e||"/",o=r.indexOf("#"),s=o!==-1?r.slice(0,o):r,l=o!==-1?r.slice(o):"",a=s.indexOf("?"),i=a!==-1?s.slice(0,a):s,c=a!==-1?s.slice(a):"";let d;if(i===n)d=n+"/";else if(i.startsWith(n+"/"))d=i;else{const f=i.startsWith("/")?i:"/"+i;d=f==="/"?n+"/":n+f}return d+c+l}function $(){if(typeof document>"u")return"";const e=document.querySelector("[data-ln-outlet]")||document.querySelector("[data-ln-router-base]");if(e&&e.hasAttribute("data-ln-router-base"))return _(e.getAttribute("data-ln-router-base"));const t=document.querySelector("base[href]");if(t)try{const n=new URL(t.getAttribute("href"),window.location.origin);return _(n.pathname)}catch{return _(t.getAttribute("href"))}return""}const T={navigate:function(e){A(e,{historyAction:"push"})},replace:function(e){A(e,{historyAction:"replace"})},base:function(){return $()},toUrl:function(e){return de(e,$())},current:function(){return S===null?null:{path:S,fullPath:pe,base:ge,params:be,query:me,route:ye,regions:he}}},F="data-ln-route",fe="lnRoute";typeof window<"u"&&(window.lnRouter=T);function N(e){xe(e),ke(e),g.size>0&&Se()}const dt={"data-ln-route":{effect:N,type:"string",description:"URL path pattern matched by this route template"},"data-ln-route-target":{effect:N,type:"string",description:"Target outlet element selector where route content is rendered"},"data-ln-route-title":{effect:N,type:"string",description:"Document title template set when route is activated"},"data-ln-route-keep":{type:"boolean",fallback:!1,description:"Preserve mounted DOM nodes in memory instead of rebuilding"},"data-ln-router-base":{type:"string",description:'Base URL prefix for subdirectory routing (e.g. "/spa")'},"data-ln-router-hydrate":{type:"boolean",fallback:!1,description:"Hydrate existing DOM content on initial router boot"}},g=new Map,B=new WeakMap;let he=new Map,we=!1,S=null,pe=null,ge="",be={},me={},ye=null,W=!1;function Ce(e,t,n){W?queueMicrotask(function(){O(e,t,n)}):O(e,t,n)}function j(e){try{const a=new URL(e,window.location.origin);e=a.pathname+a.search+a.hash}catch{}let[t]=e.split("#"),[n,r]=t.split("?");const o={};if(r){const a=new URLSearchParams(r);for(const[i,c]of a.entries())o[i]=c}const s=$();return{path:ut(n,s),query:o,base:s}}function _e(e,t){if(e.pattern==="*")return 1;if(t.pattern==="*")return-1;const n=e.segments,r=t.segments,o=Math.max(n.length,r.length);for(let s=0;s<o;s++){const l=n[s],a=r[s];if(l===void 0)return 1;if(a===void 0)return-1;if(l==="*")return 1;if(a==="*")return-1;const i=l.startsWith(":"),c=a.startsWith(":");if(i&&!c)return 1;if(!i&&c)return-1}return 0}function Ae(e,t){const n=e.split("/").filter(Boolean);for(const r of t){if(r.pattern==="*")return{route:r,params:{wildcard:e}};const o=r.segments,s={};let l=!0;if(!(n.length>o.length&&o[o.length-1]!=="*")){for(let a=0;a<o.length;a++){const i=o[a],c=n[a];if(i==="*"){s.wildcard=n.slice(a).join("/");break}if(c===void 0){l=!1;break}if(i.startsWith(":"))s[i.slice(1)]=decodeURIComponent(c);else if(i!==c){l=!1;break}}if(l&&(o.indexOf("*")!==-1||n.length<=o.length))return{route:r,params:s}}}return null}function K(e,t={}){const n=t.warn!==!1;if(e!=="__primary__"){const o=document.getElementById(e);return!o&&n&&console.warn(`[ln-router] Explicit target element #${e} not found in DOM`),o}const r=document.querySelector("[data-ln-outlet]")||document.querySelector("main");return!r&&n&&console.warn("[ln-router] Default outlet (element with [data-ln-outlet] or <main>) not found in DOM"),r}function ve(e){if(!e)return;const t=Array.from(e.querySelectorAll("*")),n=[e].concat(t);for(const o of n)for(const s of Object.keys(o))if(s.startsWith("ln")&&o[s]&&typeof o[s].destroy=="function")try{o[s].destroy()}catch(l){console.error(`[ln-router] Error destroying component ${s} on element:`,o,l)}const r=document.querySelectorAll('[data-ln-popover="open"]');for(const o of r){const s=o.lnPopover;if(s&&s.trigger&&e.contains(s.trigger))try{s.destroy()}catch(l){console.error("[ln-router] Error destroying open popover:",l)}}}function A(e,t={}){const{path:n,query:r,base:o}=j(e),s=de(e,o),l=new Map;for(const[u,h]of g)l.set(u,Ae(n,h.sorted));const a=l.get("__primary__")||null,i=K("__primary__",{warn:!!a}),c=g.has("__primary__"),d=[];for(const[u,h]of l){const w=u==="__primary__"?i:K(u,{warn:!1}),m=!w&&!!(a&&a.route&&a.route.templateNode&&a.route.templateNode.content&&a.route.templateNode.content.querySelector("#"+CSS.escape(u)));!w&&!m&&h&&console.warn(`[ln-router] Explicit target element #${u} not found in DOM`),d.push({regionKey:u,match:h,targetEl:w,isPending:m,hasKeep:!!w&&w.hasAttribute("data-ln-route-keep"),hasHydrate:!!w&&w.hasAttribute("data-ln-router-hydrate"),hasChildren:!!w&&w.children.length>0,mountedTemplate:w&&B.get(w)||null})}const f=ct(d,{isHydration:!!t.isHydration,hasPrimaryRegion:c,primaryMatch:a});if(f.notFound){Ce(document.body,"ln-router:not-found",{path:n});return}if(qe(i||document.body,"ln-router:before-navigate",{from:S,to:s,path:n,params:a?a.params:{},query:r}).defaultPrevented)return;t.historyAction==="push"?window.history.pushState(null,"",s):t.historyAction==="replace"&&window.history.replaceState(null,"",s);const k=function(){for(const u of f.clears)ve(u.targetEl),u.targetEl.replaceChildren(),B.delete(u.targetEl);for(const u of f.swaps){if((u.isPending||!u.targetEl||!document.contains(u.targetEl))&&(u.targetEl=u.regionKey==="__primary__"?i:document.getElementById(u.regionKey)),!u.targetEl){console.warn(`[ln-router] Target element #${u.regionKey} could not be resolved`);continue}if(u.skipMount||(ve(u.targetEl),u.targetEl.replaceChildren(u.match.route.templateNode.content.cloneNode(!0))),B.set(u.targetEl,u.match.route.templateNode),f.owner&&u.regionKey===f.owner.regionKey){if(u.match.route.title){let h=u.match.route.title;if(u.match.params)for(const[w,m]of Object.entries(u.match.params))h=h.replace(new RegExp("\\{\\{\\s*"+w+"\\s*\\}\\}","g"),m);document.title=h}if(!t.isHydration){u.targetEl.hasAttribute("tabindex")||u.targetEl.setAttribute("tabindex","-1");const h=u.targetEl.querySelector("h1, h2, h3, h4, h5, h6");h?(h.setAttribute("tabindex","-1"),h.focus()):u.targetEl.focus(),u.regionKey==="__primary__"&&u.targetEl.scrollIntoView({block:"start",behavior:"instant"})}}Ce(u.targetEl,"ln-router:navigated",{path:n,fullPath:s,base:o,params:u.match.params,query:r,route:u.match.route,target:u.targetEl,region:u.regionKey})}S=n,pe=s,ge=o,me=r,ye=a?a.route:null,be=a?a.params:{},he=new Map(Array.from(l.entries()).map(([u,h])=>[u,h?{route:h.route,params:h.params}:null]))};document.startViewTransition&&!t.isHydration?document.startViewTransition(k):k()}function ft(e){const t=e.target.closest("a");if(!t||!De(e,t))return;const n=t.getAttribute("href"),{path:r}=j(n);for(const o of g.values())if(Ae(r,o.sorted)){e.preventDefault(),A(n,{historyAction:"push"});return}}function ht(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const s=n[o];if(e[s]!==t[s])return!1}return!0}function wt(){const e=window.location.pathname+window.location.search,t=T.current();if(t&&t.path!=null){const n=j(e);if(t.path===n.path&&ht(t.query,n.query))return}A(e,{historyAction:"skip"})}function Se(){we||(we=!0,y(function(){document.addEventListener("click",ft),window.addEventListener("popstate",wt),W=!0;const e=window.location.pathname+window.location.search+window.location.hash;A(e,{historyAction:"replace",isHydration:!0}),W=!1},"ln-router"))}function ke(e){const t=e.getAttribute(F);if(!t)return;const n=e.getAttribute("data-ln-route-target")||null;if(n==="__primary__"){console.warn(`[ln-router] "__primary__" is a reserved region key and cannot be used as data-ln-route-target. Route "${t}" rejected.`);return}const r=n||"__primary__";g.has(r)||g.set(r,{routes:new Map,sorted:[]});const o=g.get(r);if(o.routes.has(t)){console.warn(`[ln-router] Duplicate route pattern registered: "${t}" in region "${r}"`);return}const s=e.getAttribute("data-ln-route-title"),l=t.split("/").filter(Boolean),a={pattern:t,segments:l,target:n,title:s,templateNode:e},i=K(r);i&&i.contains(e)&&console.warn(`[ln-router] Route template with pattern "${t}" is declared inside its own outlet element:`,e),o.routes.set(t,a),o.sorted=Array.from(o.routes.values()).sort(_e)}function xe(e){const t=e.getAttribute(F);if(!t)return;const r=e.getAttribute("data-ln-route-target")||null||"__primary__",o=g.get(r);o&&(o.routes.delete(t),o.sorted=Array.from(o.routes.values()).sort(_e),o.routes.size===0&&g.delete(r))}function Ee(e){return this.dom=e,ke(e),this}return Ee.prototype.destroy=function(){xe(this.dom),delete this.dom[fe]},ce(F,fe,Ee,"ln-router",{attributes:dt,onInit:function(){g.size>0&&Se()}}),x.router=T,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x})({});
1
+ var LnAshlarComponent=(function(x){"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 r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){o=t[r];break}if(!E(o))return}e.apply(console,t)}}function O(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 qe(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(r),r}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function De(e,t){if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||!t)return!1;const n=t.getAttribute("href");return!(!n||t.getAttribute("target")==="_blank"||t.hasAttribute("download")||n.startsWith("mailto:")||n.startsWith("tel:")||n==="#"||n.startsWith("#")||t.hostname&&t.hostname!==window.location.hostname)}function Le(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),o=t&&t.exclude,r={},a=e.elements,l={};if(n)for(let s=0;s<a.length;s++){const i=a[s];i.name&&i.type==="checkbox"&&!i.disabled&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<a.length;s++){const i=a[s];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(o&&i.matches&&i.matches(o)))if(i.type==="checkbox")n&&l[i.name]===1?r[i.name]=i.checked:(r[i.name]||(r[i.name]=[]),i.checked&&r[i.name].push(i.value));else if(i.type==="radio")i.checked&&(r[i.name]=i.value);else if(i.type==="select-multiple"){r[i.name]=[];for(let c=0;c<i.options.length;c++)i.options[c].selected&&r[i.name].push(i.options[c].value)}else if(n&&i.type==="hidden")r[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const c=Number(i.value);r[i.name]=i.value===""||isNaN(c)?null:c}else r[i.name]=i.value}return r}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 Me(e,t){const n=e.elements,o=[],r={};for(let a=0;a<n.length;a++){const l=n[a];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let a=0;a<n.length;a++){const l=n[a];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const i=t[s];if(l.type==="checkbox"){if(Array.isArray(i))l.checked=i.indexOf(l.value)!==-1;else if(r[l.name]>1){const c=String(i).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=Ie(i);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(i),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(i))for(let c=0;c<l.options.length;c++)l.options[c].selected=i.indexOf(l.options[c].value)!==-1;o.push(l)}else l.value=i,l.tagName==="SELECT"&&i!=null&&l.setAttribute("data-ln-value",i),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Me,window.lnCore.serializeForm=Re,window.lnCore.resolveFormMethod=Le);const z={};function $e(e,t){z[e]=t}function Te(e){return z[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=$e,window.lnCore.getDataMapper=Te);function Fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const J={};function Ne(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];J[n]=t}function Be(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return J[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ne,window.lnCore.getLocaleFallback=Be,window.lnCore.ensureLocaleObserver=Fe);const q={};function We(e,t){q[e]||(q[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=q[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function G(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const s=n[l],i=s.getAttribute("data-ln-field");t[i]!=null&&(s.textContent=t[i])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const s=o[l],i=s.getAttribute("data-ln-attr").split(",");for(let c=0;c<i.length;c++){const d=i[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();t[p]!=null&&s.setAttribute(f,t[p])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const s=r[l],i=s.getAttribute("data-ln-show");i in t&&s.classList.toggle("hidden",!t[i])}const a=e.querySelectorAll("[data-ln-class]");for(let l=0;l<a.length;l++){const s=a[l],i=s.getAttribute("data-ln-class").split(",");for(let c=0;c<i.length;c++){const d=i[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();p in t&&s.classList.toggle(f,!!t[p])}}return e}function je(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)G(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 X(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const o=function(a,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let a=0;a<r.length;a++){const l=r[a],s=l.attributes;for(let i=0;i<s.length;i++){const c=s[i];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ke(e,t,n,o,r,a){const l={};for(let i=0;i<e.children.length;i++){const c=e.children[i],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const s=document.createDocumentFragment();for(let i=0;i<t.length;i++){const c=t[i],d=String(o(c));let f=l[d];if(f)r(f,c,i);else{const p=We(n,a);if(!p||(X(p,c),f=p.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),r(f,c,i)}s.appendChild(f)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=G,window.lnCore.lnFill=je,window.lnCore.renderList=Ke);function D(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function Y(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function Z(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const r=o.trim().toLowerCase();return!(r==="false"||r==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const L=new Map;function te(e,t){const n=(e?e.join("|"):"")+"::"+t;if(L.has(n))return L.get(n);const o=new Set(e||[]),r=function(a,l){const s=a.getAttribute(l);return s!==null&&o.has(s)?s:t};return L.set(n,r),r}function ne(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function re(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function oe(e,t,n,o,r){if(!e||t===null)return!0;const a=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=i=>{r?console.warn(i,r):console.warn(i)};if(l==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(s(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const i=e.values||[];return i.includes(t)?!0:(s(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(s(`[${a}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(s(`[${a}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(i){return s(`[${a}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function Pe(e,t,n){for(const o in n){const[r,a,l]=n[o];Object.defineProperty(e,o,{get:function(){return r(t,a,l)},enumerable:!0,configurable:!0})}return e}function He(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let r=o.read;if(!r&&o.type)switch(o.type){case"enum":r=te(o.values,o.fallback);break;case"integer":r=Y;break;case"float":r=ne;break;case"boolean":r=Z;break;case"list":r=ee;break;case"json":r=re;break;case"string":default:r=D;break}r||(r=D),t[o.prop]=[r,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 Ve(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=Pe,window.lnCore.attrSpec=He,window.lnCore.attrStr=D,window.lnCore.attrInt=Y,window.lnCore.attrBool=Z,window.lnCore.attrList=ee,window.lnCore.attrEnum=te,window.lnCore.attrFloat=ne,window.lnCore.attrJson=re);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 ie(e,t,n,o){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(a)&&C(e,l),e.querySelectorAll){const s=e.querySelectorAll(a);for(let i=0;i<s.length;i++)C(s[i],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Qe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ze(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 le(){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 Je(e){const t=le(),n=e.observed||[];for(let o=0;o<n.length;o++){const r=n[o];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const r=t.byDeclaredAttr.get(o);r.some(a=>a.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Ve(e);if(o===null)t.reactiveWildcard.push(e);else for(const r of o)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function se(e,t,n,o){for(let r=0;r<e.length;r++){const a=e[r];if(!t[a.attribute])continue;const l=a.effects&&a.effects[n];l?l(t,n,o):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,o)}}function Ge(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=le(),r=o.byAttr.get(t),a=Q()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!r&&!a)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(a&&E(l)){const s=o.byDeclaredAttr.get(t),i=l.getAttribute(t);for(let c=0;c<s.length;c++)oe(s[c].spec,i,t,s[c].componentTag,l)}if(window.lnCore._debugSink&&(n||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const s=o.byReactive.get(t);s&&se(s,l,t,e.oldValue),o.reactiveWildcard.length&&se(o.reactiveWildcard,l,t,e.oldValue)}if(r)for(let s=0;s<r.length;s++){const i=r[s];if(i.handler){i.handler(l,t,e.oldValue);continue}i.onAttributeChange&&l[i.attribute]?i.onAttributeChange(l,t):(ie(l,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(l))}}}function Xe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{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 R(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function I(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=R();if(!t.length)return;const n=e.target;if(n){const o=n.nodeType===1?n:n.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let o=0;o<t.length;o++){const r=t[o];if(r.onSubtreeChange&&r.query){const a=r.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;l&&r.onSubtreeChange(l,e)}}for(let o=0;o<e.addedNodes.length;o++){const r=e.addedNodes[o];if(r.nodeType===1){const a=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!a)r.matches&&r.matches(s.query)&&C(r,s);else if(r.matches&&r.matches(s.query)&&C(r,s),r.querySelectorAll){const i=r.querySelectorAll(s.query);for(let c=0;c<i.length;c++)C(i[c],s)}}s.onInit&&s.onInit(r)}}}for(let o=0;o<e.removedNodes.length;o++){const r=e.removedNodes[o];if(r.nodeType===1){const a=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const s=t[l],i=s.query;if(i){if(!a)r.matches&&r.matches(i)&&I(r,s);else if(r.matches&&r.matches(i)&&I(r,s),r.querySelectorAll){const c=r.querySelectorAll(i);for(let d=0;d<c.length;d++)I(c[d],s)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{Ye(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ze(e){R().push(e),ae()}function ce(e,t,n,o,r={}){const a=r.extraAttributes||[],l=r.onAttributeChange||null,s=r.onSubtreeChange||null,i=r.onInit||null,c=r.onAttrChange||null,d=r.effects||null,f=r.attributes||null,p=f?Ue(f):d,k=f?new Set(Object.keys(f)):null,u=r.persist||null;function h(P){const b=P||document.body;if(ie(b,e,t,n),f&&Q())for(const v in f){const gt=f[v],H=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&H.push(b);for(let U=0;U<H.length;U++){const V=H[U];E(V)&&oe(gt,V.getAttribute(v),v,o,V)}}i&&i(b)}const w=[];if(e.indexOf("[")!==-1){const P=/\[([\w-]+)/g;let b;for(;(b=P.exec(e))!==null;)w.push(b[1])}else w.push(e);Je({selector:e,attribute:t,componentTag:o,attributes:f,ComponentFn:n,onInit:i,observed:w.concat(a),onAttributeChange:l,onAttrChange:c,effects:p,declared:k,persist:u}),Xe();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,pt=r.subtreeQuery||(m?e:"["+e+"]");R().push({selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:s,query:pt}),ae(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Ze);function Oe(){Qe()>0?ze(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Oe):Oe(),h}function ue(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},o=ue(t);if(!o)return n;const r=o.split("&");for(let a=0;a<r.length;a++){const l=r[a];if(!l)continue;const s=l.indexOf(":"),i=s>-1?l.slice(0,s):l,c=s>-1?l.slice(s+1):"";if(i)try{n[i]=decodeURIComponent(c)}catch{n[i]=c}}return n}function et(e){if(!e)return null;const t=M();return e in t?t[e]:null}function tt(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(a){const l=n[a];return l===""?a:a+":"+encodeURIComponent(l)}).join("&");ue(location.hash)!==r&&(location.hash=r)}function nt(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function rt(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 ot(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function it(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 lt(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function st(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),r=o?o.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=et,window.lnCore.hashSet=tt,window.lnCore.hashLinkClick=nt,window.lnCore.resolveHashNamespace=rt,window.lnCore.hashSortEncode=ot,window.lnCore.hashSortDecode=it,window.lnCore.hashFilterEncode=lt,window.lnCore.hashFilterDecode=st);function at(){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=at);function ct(e,{isHydration:t=!1,hasPrimaryRegion:n=!1,primaryMatch:o=null}={}){const r=n?!o:!e.some(c=>c.match),a=[],l=[];for(const c of e)if(!(!c.targetEl&&!c.isPending)){if(!c.match){const d=t&&c.hasHydrate&&c.hasChildren;!c.hasKeep&&c.hasChildren&&!d&&c.targetEl&&a.push(c);continue}c.hasKeep&&c.mountedTemplate===c.match.route.templateNode||l.push(Object.assign({},c,{skipMount:t&&c.hasHydrate&&c.hasChildren}))}l.sort((c,d)=>c.regionKey==="__primary__"?-1:d.regionKey==="__primary__"?1:0);const i=l.find(c=>c.regionKey==="__primary__")||l[0]||null;return{notFound:r,clears:a,swaps:l,owner:i}}function _(e){if(!e||typeof e!="string")return"";let t=e.trim().replace(/\/+$/,"");return!t||t==="/"?"":t.startsWith("/")?t:"/"+t}function ut(e,t){const n=_(t);if(!n)return e&&e.replace(/\/+$/,"")||"/";const o=(e||"/").replace(/\/+$/,"")||"/";return o===n?"/":o.startsWith(n+"/")?o.slice(n.length).replace(/\/+$/,"")||"/":o}function de(e,t){const n=_(t);if(!n)return e||"/";const o=e||"/",r=o.indexOf("#"),a=r!==-1?o.slice(0,r):o,l=r!==-1?o.slice(r):"",s=a.indexOf("?"),i=s!==-1?a.slice(0,s):a,c=s!==-1?a.slice(s):"";let d;if(i===n)d=n+"/";else if(i.startsWith(n+"/"))d=i;else{const f=i.startsWith("/")?i:"/"+i;d=f==="/"?n+"/":n+f}return d+c+l}function $(){if(typeof document>"u")return"";const e=document.querySelector("[data-ln-outlet]")||document.querySelector("[data-ln-router-base]");if(e&&e.hasAttribute("data-ln-router-base"))return _(e.getAttribute("data-ln-router-base"));const t=document.querySelector("base[href]");if(t)try{const n=new URL(t.getAttribute("href"),window.location.origin);return _(n.pathname)}catch{return _(t.getAttribute("href"))}return""}const T={navigate:function(e){A(e,{historyAction:"push"})},replace:function(e){A(e,{historyAction:"replace"})},base:function(){return $()},toUrl:function(e){return de(e,$())},current:function(){return S===null?null:{path:S,fullPath:pe,base:ge,params:be,query:me,route:ye,regions:he}}},F="data-ln-route",fe="lnRoute";typeof window<"u"&&(window.lnRouter=T);function N(e){xe(e),ke(e),g.size>0&&Se()}const dt={"data-ln-route":{effect:N,type:"string",description:"URL path pattern matched by this route template"},"data-ln-route-target":{effect:N,type:"string",description:"Target outlet element selector where route content is rendered"},"data-ln-route-title":{effect:N,type:"string",description:"Document title template set when route is activated"},"data-ln-route-keep":{type:"boolean",fallback:!1,description:"Preserve mounted DOM nodes in memory instead of rebuilding"},"data-ln-router-base":{type:"string",description:'Base URL prefix for subdirectory routing (e.g. "/spa")'},"data-ln-router-hydrate":{type:"boolean",fallback:!1,description:"Hydrate existing DOM content on initial router boot"}},g=new Map,B=new WeakMap;let he=new Map,we=!1,S=null,pe=null,ge="",be={},me={},ye=null,W=!1;function Ce(e,t,n){W?queueMicrotask(function(){O(e,t,n)}):O(e,t,n)}function j(e){try{const s=new URL(e,window.location.origin);e=s.pathname+s.search+s.hash}catch{}let[t]=e.split("#"),[n,o]=t.split("?");const r={};if(o){const s=new URLSearchParams(o);for(const[i,c]of s.entries())r[i]=c}const a=$();return{path:ut(n,a),query:r,base:a}}function _e(e,t){if(e.pattern==="*")return 1;if(t.pattern==="*")return-1;const n=e.segments,o=t.segments,r=Math.max(n.length,o.length);for(let a=0;a<r;a++){const l=n[a],s=o[a];if(l===void 0)return 1;if(s===void 0)return-1;if(l==="*")return 1;if(s==="*")return-1;const i=l.startsWith(":"),c=s.startsWith(":");if(i&&!c)return 1;if(!i&&c)return-1}return 0}function Ae(e,t){const n=e.split("/").filter(Boolean);for(const o of t){if(o.pattern==="*")return{route:o,params:{wildcard:e}};const r=o.segments,a={};let l=!0;if(!(n.length>r.length&&r[r.length-1]!=="*")){for(let s=0;s<r.length;s++){const i=r[s],c=n[s];if(i==="*"){a.wildcard=n.slice(s).join("/");break}if(c===void 0){l=!1;break}if(i.startsWith(":"))a[i.slice(1)]=decodeURIComponent(c);else if(i!==c){l=!1;break}}if(l&&(r.indexOf("*")!==-1||n.length<=r.length))return{route:o,params:a}}}return null}function K(e,t={}){const n=t.warn!==!1;if(e!=="__primary__"){const r=document.getElementById(e);return!r&&n&&console.warn(`[ln-router] Explicit target element #${e} not found in DOM`),r}const o=document.querySelector("[data-ln-outlet]")||document.querySelector("main");return!o&&n&&console.warn("[ln-router] Default outlet (element with [data-ln-outlet] or <main>) not found in DOM"),o}function ve(e){if(!e)return;const t=Array.from(e.querySelectorAll("*")),n=[e].concat(t);for(const r of n)for(const a of Object.keys(r))if(a.startsWith("ln")&&r[a]&&typeof r[a].destroy=="function")try{r[a].destroy()}catch(l){console.error(`[ln-router] Error destroying component ${a} on element:`,r,l)}const o=document.querySelectorAll('[data-ln-popover="open"]');for(const r of o){const a=r.lnPopover;if(a&&a.trigger&&e.contains(a.trigger))try{a.destroy()}catch(l){console.error("[ln-router] Error destroying open popover:",l)}}}function A(e,t={}){const{path:n,query:o,base:r}=j(e),a=de(e,r),l=new Map;for(const[u,h]of g)l.set(u,Ae(n,h.sorted));const s=l.get("__primary__")||null,i=K("__primary__",{warn:!!s}),c=g.has("__primary__"),d=[];for(const[u,h]of l){const w=u==="__primary__"?i:K(u,{warn:!1}),m=!w&&!!(s&&s.route&&s.route.templateNode&&s.route.templateNode.content&&s.route.templateNode.content.querySelector("#"+CSS.escape(u)));!w&&!m&&h&&console.warn(`[ln-router] Explicit target element #${u} not found in DOM`),d.push({regionKey:u,match:h,targetEl:w,isPending:m,hasKeep:!!w&&w.hasAttribute("data-ln-route-keep"),hasHydrate:!!w&&w.hasAttribute("data-ln-router-hydrate"),hasChildren:!!w&&w.children.length>0,mountedTemplate:w&&B.get(w)||null})}const f=ct(d,{isHydration:!!t.isHydration,hasPrimaryRegion:c,primaryMatch:s});if(f.notFound){Ce(document.body,"ln-router:not-found",{path:n});return}if(qe(i||document.body,"ln-router:before-navigate",{from:S,to:a,path:n,params:s?s.params:{},query:o}).defaultPrevented)return;t.historyAction==="push"?window.history.pushState(null,"",a):t.historyAction==="replace"&&window.history.replaceState(null,"",a);const k=function(){for(const u of f.clears)ve(u.targetEl),u.targetEl.replaceChildren(),B.delete(u.targetEl);for(const u of f.swaps){if((u.isPending||!u.targetEl||!document.contains(u.targetEl))&&(u.targetEl=u.regionKey==="__primary__"?i:document.getElementById(u.regionKey)),!u.targetEl){console.warn(`[ln-router] Target element #${u.regionKey} could not be resolved`);continue}if(u.skipMount||(ve(u.targetEl),u.targetEl.replaceChildren(u.match.route.templateNode.content.cloneNode(!0))),B.set(u.targetEl,u.match.route.templateNode),f.owner&&u.regionKey===f.owner.regionKey){if(u.match.route.title){let h=u.match.route.title;if(u.match.params)for(const[w,m]of Object.entries(u.match.params))h=h.replace(new RegExp("\\{\\{\\s*"+w+"\\s*\\}\\}","g"),m);document.title=h}if(!t.isHydration){u.targetEl.hasAttribute("tabindex")||u.targetEl.setAttribute("tabindex","-1");const h=u.targetEl.querySelector("h1, h2, h3, h4, h5, h6");h?(h.setAttribute("tabindex","-1"),h.focus()):u.targetEl.focus(),u.regionKey==="__primary__"&&u.targetEl.scrollIntoView({block:"start",behavior:"instant"})}}Ce(u.targetEl,"ln-router:navigated",{path:n,fullPath:a,base:r,params:u.match.params,query:o,route:u.match.route,target:u.targetEl,region:u.regionKey})}S=n,pe=a,ge=r,me=o,ye=s?s.route:null,be=s?s.params:{},he=new Map(Array.from(l.entries()).map(([u,h])=>[u,h?{route:h.route,params:h.params}:null]))};document.startViewTransition&&!t.isHydration?document.startViewTransition(k):k()}function ft(e){const t=e.target.closest("a");if(!t||!De(e,t))return;const n=t.getAttribute("href"),{path:o}=j(n);for(const r of g.values())if(Ae(o,r.sorted)){e.preventDefault(),A(n,{historyAction:"push"});return}}function ht(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let r=0;r<n.length;r++){const a=n[r];if(e[a]!==t[a])return!1}return!0}function wt(){const e=window.location.pathname+window.location.search,t=T.current();if(t&&t.path!=null){const n=j(e);if(t.path===n.path&&ht(t.query,n.query))return}A(e,{historyAction:"skip"})}function Se(){we||(we=!0,y(function(){document.addEventListener("click",ft),window.addEventListener("popstate",wt),W=!0;const e=window.location.pathname+window.location.search+window.location.hash;A(e,{historyAction:"replace",isHydration:!0}),W=!1},"ln-router"))}function ke(e){const t=e.getAttribute(F);if(!t)return;const n=e.getAttribute("data-ln-route-target")||null;if(n==="__primary__"){console.warn(`[ln-router] "__primary__" is a reserved region key and cannot be used as data-ln-route-target. Route "${t}" rejected.`);return}const o=n||"__primary__";g.has(o)||g.set(o,{routes:new Map,sorted:[]});const r=g.get(o);if(r.routes.has(t)){console.warn(`[ln-router] Duplicate route pattern registered: "${t}" in region "${o}"`);return}const a=e.getAttribute("data-ln-route-title"),l=t.split("/").filter(Boolean),s={pattern:t,segments:l,target:n,title:a,templateNode:e},i=K(o);i&&i.contains(e)&&console.warn(`[ln-router] Route template with pattern "${t}" is declared inside its own outlet element:`,e),r.routes.set(t,s),r.sorted=Array.from(r.routes.values()).sort(_e)}function xe(e){const t=e.getAttribute(F);if(!t)return;const o=e.getAttribute("data-ln-route-target")||null||"__primary__",r=g.get(o);r&&(r.routes.delete(t),r.sorted=Array.from(r.routes.values()).sort(_e),r.routes.size===0&&g.delete(o))}function Ee(e){return this.dom=e,ke(e),this}return Ee.prototype.destroy=function(){xe(this.dom),delete this.dom[fe]},ce(F,fe,Ee,"ln-router",{attributes:dt,onInit:function(){g.size>0&&Se()}}),x.router=T,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x})({});