@livenetworks/ashlar 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/README.md +7 -1
  4. package/components/ln-api-connector/ln-api-connector.js +1 -1
  5. package/components/ln-api-connector/src/ln-api-connector.js +6 -2
  6. package/components/ln-api-queue/ln-api-queue.js +1 -1
  7. package/components/ln-autosave/ln-autosave.js +1 -1
  8. package/components/ln-chart/ln-chart.js +1 -1
  9. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  10. package/components/ln-confirm/ln-confirm.js +1 -1
  11. package/components/ln-core/helpers.js +1 -1
  12. package/components/ln-core/index.js +1 -1
  13. package/components/ln-core/lifecycle.js +41 -0
  14. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  15. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  16. package/components/ln-data-store/ln-data-store.js +1 -1
  17. package/components/ln-date/ln-date.js +1 -1
  18. package/components/ln-debug/ln-debug.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.js +1 -1
  20. package/components/ln-editor/ln-editor.js +1 -1
  21. package/components/ln-external-links/ln-external-links.js +1 -1
  22. package/components/ln-filter/ln-filter.js +1 -1
  23. package/components/ln-form/ln-form.js +1 -1
  24. package/components/ln-icon/ln-icon.js +1 -1
  25. package/components/ln-include/ln-include.js +1 -1
  26. package/components/ln-key/ln-key.js +1 -1
  27. package/components/ln-link/ln-link.js +1 -1
  28. package/components/ln-list/ln-list.js +1 -1
  29. package/components/ln-modal/ln-modal.js +1 -1
  30. package/components/ln-nav/ln-nav.js +1 -1
  31. package/components/ln-number/ln-number.js +1 -1
  32. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  33. package/components/ln-options/ln-options.js +1 -1
  34. package/components/ln-picklist/ln-picklist.js +1 -1
  35. package/components/ln-popover/ln-popover.js +1 -1
  36. package/components/ln-progress/ln-progress.js +1 -1
  37. package/components/ln-router/ln-router.js +1 -1
  38. package/components/ln-scroll/ln-scroll.js +1 -1
  39. package/components/ln-search/ln-search.js +1 -1
  40. package/components/ln-slug/ln-slug.js +1 -1
  41. package/components/ln-sort/ln-sort.js +1 -1
  42. package/components/ln-sort/src/ln-sort.js +13 -11
  43. package/components/ln-sortable/ln-sortable.js +1 -1
  44. package/components/ln-stat/ln-stat.js +1 -1
  45. package/components/ln-table/ln-table.js +1 -1
  46. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  47. package/components/ln-tabs/ln-tabs.js +1 -1
  48. package/components/ln-time/ln-time.js +1 -1
  49. package/components/ln-toast/ln-toast.js +1 -1
  50. package/components/ln-toggle/ln-toggle.js +1 -1
  51. package/components/ln-tooltip/ln-tooltip.js +1 -1
  52. package/components/ln-translations/ln-translations.js +1 -1
  53. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  54. package/components/ln-upload/ln-upload.js +1 -1
  55. package/components/ln-validate/ln-validate.js +1 -1
  56. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  57. package/package.json +1 -1
  58. package/web-types.json +2337 -2337
@@ -1 +1 @@
1
- (function(){"use strict";function K(){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 R(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(!R(i))return}e.apply(console,t)}}function Q(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 N(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){N(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function me(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function pe(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,o={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(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 u=0;u<r.options.length;u++)r.options[u].selected&&o[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")o[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);o[r.name]=r.value===""||isNaN(u)?null:u}else o[r.name]=r.value}return o}function we(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ge(e,t){const n=e.elements,i=[],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 c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(o[l.name]>1){const u=String(r).split(",").map(function(p){return p.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=we(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 u=0;u<l.options.length;u++)l.options[u].selected=r.indexOf(l.options[u].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}function be(e,t,{get:n,set:i}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(o){i?i.call(this,o,s=>t.set.call(this,s)):t.set.call(this,o)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ge,window.lnCore.serializeForm=pe,window.lnCore.resolveFormMethod=me);const Y={};function ye(e,t){Y[e]=t}function Ce(e){return Y[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=Ce);function F(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,N(function(){new MutationObserver(function(){Q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const z={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];z[n]=t}function T(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return z[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=T,window.lnCore.ensureLocaleObserver=J);const B={};function _e(e,t){B[e]||(B[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=B[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const p=r[u].trim().split(":");if(p.length!==2)continue;const m=p[0].trim(),a=p[1].trim();t[a]!=null&&c.setAttribute(m,t[a])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const p=r[u].trim().split(":");if(p.length!==2)continue;const m=p[0].trim(),a=p[1].trim();a in t&&c.classList.toggle(m,!!t[a])}}return e}function ve(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)X(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Z(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],c=l.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Ae(e,t,n,i,o,s){const l={};for(let r=0;r<e.children.length;r++){const u=e.children[r],p=u.getAttribute("data-ln-render-key");p&&(l[p]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],p=String(i(u));let m=l[p];if(m)o(m,u,r);else{const a=_e(n,s);if(!a||(Z(a,u),m=a.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",p),o(m,u,r)}c.appendChild(m)}e.textContent="",e.appendChild(c)}function xe(e,t){const n={},i=e.querySelectorAll("["+t+"]");for(let o=0;o<i.length;o++)n[i[o].getAttribute(t)]=i[o].textContent,i[o].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Z,window.lnCore.fill=X,window.lnCore.lnFill=ve,window.lnCore.renderList=Ae);function q(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function ee(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function te(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 ne(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function re(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const i=new Set(e||[]),o=function(s,l){const c=s.getAttribute(l);return c!==null&&i.has(c)?c:t};return $.set(n,o),o}function oe(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function ie(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function le(e,t,n,i,o){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=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"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function Se(e,t,n){for(const i in n){const[o,s,l]=n[i];Object.defineProperty(e,i,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function ke(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=re(i.values,i.fallback);break;case"integer":o=ee;break;case"float":o=oe;break;case"boolean":o=te;break;case"list":o=ne;break;case"json":o=ie;break;case"string":default:o=q;break}o||(o=q),t[i.prop]=[o,n,i.fallback]}return t}function Ee(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 De(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Se,window.lnCore.attrSpec=ke,window.lnCore.attrStr=q,window.lnCore.attrInt=ee,window.lnCore.attrBool=te,window.lnCore.attrList=ne,window.lnCore.attrEnum=re,window.lnCore.attrFloat=oe,window.lnCore.attrJson=ie);function L(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function se(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&L(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)L(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Oe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Te(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 ae(){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 Le(e){const t=ae(),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(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=De(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 ce(e,t,n,i){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,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function Me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=ae(),o=i.byAttr.get(t),s=K()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&R(l)){const c=i.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let u=0;u<c.length;u++)le(c[u].spec,r,t,c[u].componentTag,l)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=i.byReactive.get(t);c&&ce(c,l,t,e.oldValue),i.reactiveWildcard.length&&ce(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const r=o[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(se(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,N(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 V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function j(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function P(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 Fe(e){const t=V();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}const i=j();if(e.target&&i.length)for(let o=0;o<i.length;o++){const s=i[o],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)s.matches&&s.matches(r.query)&&L(s,r);else if(s.matches&&s.matches(r.query)&&L(s,r),s.querySelectorAll){const u=s.querySelectorAll(r.query);for(let p=0;p<u.length;p++)L(u[p],r)}}r.onInit&&r.onInit(s)}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],u=r.query;if(u){if(!l)s.matches&&s.matches(u)&&P(s,r);else if(s.matches&&s.matches(u)&&P(s,r),s.querySelectorAll){const p=s.querySelectorAll(u);for(let m=0;m<p.length;m++)P(p[m],r)}}}}}}function ue(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,N(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{Fe(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ie(e){V().push(e),e.onSubtreeChange&&e.query&&j().push(e),ue()}function de(e,t,n,i,o={}){const s=o.extraAttributes||[],l=o.onAttributeChange||null,c=o.onSubtreeChange||null,r=o.onInit||null,u=o.onAttrChange||null,p=o.effects||null,m=o.attributes||null,a=m?Ee(m):p,d=m?new Set(Object.keys(m)):null,h=o.persist||null;function g(D){const f=D||document.body;if(se(f,e,t,n),m&&K())for(const w in m){const b=m[w],_=Array.from(f.querySelectorAll("["+w+"]"));f.matches&&f.matches("["+w+"]")&&_.push(f);for(let S=0;S<_.length;S++){const E=_[S];R(E)&&le(b,E.getAttribute(w),w,i,E)}}r&&r(f)}const y=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let f;for(;(f=D.exec(e))!==null;)y.push(f[1])}else y.push(e);Le({selector:e,attribute:t,componentTag:i,attributes:m,ComponentFn:n,onInit:r,observed:y.concat(s),onAttributeChange:l,onAttrChange:u,effects:a,declared:d,persist:h}),Ne();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=o.subtreeQuery||(A?e:"["+e+"]"),x={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:C};V().push(x),c&&C&&j().push(x),ue(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=de,window.lnCore.observeLifecycle=Ie);function k(){Oe()>0?Te(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k):k(),g}function fe(e){return(e||"").replace(/^#/,"")}function H(e){const t=e===void 0?location.hash:e,n={},i=fe(t);if(!i)return n;const o=i.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,u=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function Re(e){if(!e)return null;const t=H();return e in t?t[e]:null}function Be(e,t){if(!e)return;const n=H();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("&");fe(location.hash)!==o&&(location.hash=o)}function qe(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 Ve(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Pe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function He(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(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=H,window.lnCore.hashGet=Re,window.lnCore.hashSet=Be,window.lnCore.hashLinkClick=qe,window.lnCore.resolveHashNamespace=$e,window.lnCore.hashSortEncode=Ve,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=Pe,window.lnCore.hashFilterDecode=He);function We(){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=We);function v(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const n=t<1e11?t*1e3:t,i=new Date(n);return isNaN(i.getTime())?null:i}if(typeof e=="string"){const n=e.trim();if(!n)return null;const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i){const s=+i[1],l=+i[2],c=+i[3],r=new Date(s,l-1,c);return r.getFullYear()!==s||r.getMonth()!==l-1||r.getDate()!==c?null:r}const o=new Date(n);return isNaN(o.getTime())?null:o}return null}function O(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return t+"-"+n+"-"+i}const W=/^(short|medium|long)(\s+datetime)?$/,Ue={short:{dateStyle:"short"},medium:{dateStyle:"medium"},long:{dateStyle:"long"},"short datetime":{dateStyle:"short",timeStyle:"short"},"medium datetime":{dateStyle:"medium",timeStyle:"short"},"long datetime":{dateStyle:"long",timeStyle:"short"}};function Ke(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(W)?Ue[e.trim()]:null}function M(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let n,i;if(t.indexOf(".")!==-1)n=".",i=t.split(".");else if(t.indexOf("/")!==-1)n="/",i=t.split("/");else if(t.indexOf("-")!==-1)n="-",i=t.split("-");else return null;if(i.length!==3)return null;const o=[];for(let u=0;u<3;u++){const p=parseInt(i[u],10);if(isNaN(p))return null;o.push(p)}let s,l,c;n==="."?(s=o[0],l=o[1],c=o[2]):n==="/"?(l=o[0],s=o[1],c=o[2]):i[0].length===4?(c=o[0],l=o[1],s=o[2]):(s=o[0],l=o[1],c=o[2]),c<100&&(c+=c<50?2e3:1900);const r=new Date(c,l-1,s);return r.getFullYear()!==c||r.getMonth()!==l-1||r.getDate()!==s?null:r}function U(e,t,n,i){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const o=e.getDate(),s=e.getMonth(),l=e.getFullYear(),c=e.getHours(),r=e.getMinutes();let u,p;const m=(n||"").toLowerCase().split("-")[0];let a=!1;try{const g=new Intl.DateTimeFormat(n,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];a=!!(i&&g!==m)}catch{a=!!i}if(a&&i&&i.monthsLong)u=i.monthsLong[s];else try{u=new Intl.DateTimeFormat(n,{month:"long"}).format(e)}catch{u=String(s+1)}if(a&&i&&i.monthsShort)p=i.monthsShort[s];else try{p=new Intl.DateTimeFormat(n,{month:"short"}).format(e)}catch{p=String(s+1)}const d={yyyy:String(l),yy:String(l).slice(-2),MMMM:u,MMM:p,MM:String(s+1).padStart(2,"0"),M:String(s+1),dd:String(o).padStart(2,"0"),d:String(o),HH:String(c).padStart(2,"0"),mm:String(r).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(h){return d[h]!==void 0?d[h]:h})}function I(e,t,n,i){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const o=Ke(t);if(o)try{const s=new Intl.DateTimeFormat(n,o),l=(n||"").toLowerCase().split("-")[0],c=s.resolvedOptions().locale.toLowerCase().split("-")[0];return i&&c!==l?U(e,"dd.MM.yyyy",n,i):s.format(e)}catch{return U(e,"dd.MM.yyyy",n,i)}return U(e,t||"dd.MM.yyyy",n,i)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function n(a){const d=a[t];if(d){if(d.isTextElement)d._initTextElement();else if(d.value){const h=v(d.value);h&&d._displayFormatted(h)}}}const i={"data-ln-date":{type:"enum",values:["short","medium","long","full","iso"],fallback:"medium",effect:n,description:"Date display style preset or activator"},"data-ln-date-format":{type:"string",effect:n,description:"Custom Intl.DateTimeFormat pattern or options"},"data-ln-date-locale":{type:"string",effect:n,description:"BCP 47 language tag override for date formatting"},"data-ln-value":{type:"string",effect:n,description:"Raw ISO date string or timestamp for non-time elements (td, span)"},"data-ln-date-dict":{type:"marker",description:"Container for date translation dictionary"},"data-ln-date-dict-key":{type:"string",description:"Dictionary key for relative time or custom date formatting"},"data-ln-date-field":{type:"string",description:"Field name mapping for date record binding"},"data-ln-date-label":{type:"string",description:"Accessible label text for the date input"}},o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function s(a,d,h){Q(a.dom,"ln-date:change",{value:d,formatted:a.dom.value,date:h}),a.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function l(a,d,h,g){a._setHiddenRaw(d),o.set.call(a._picker,d),a._lastISO=d,g!==void 0?(a._isFormatting=!0,a.dom.value=g,a._isFormatting=!1):h&&a._displayFormatted(h),s(a,d,h)}function c(a){a._setHiddenRaw(""),o.set.call(a._picker,""),a._isFormatting=!0,a.dom.value="",a._isFormatting=!1,a._lastISO="",s(a,"",null)}const r=new Set;let u=!1;function p(){J(),!u&&(u=!0,document.addEventListener("ln-core:locale-change",function(){r.forEach(function(a){if(a.isTextElement)a._formatTextContent();else if(a.value){const d=v(a.value);d&&a._displayFormatted(d)}})}))}function m(a){if(a[t])return a[t];a[t]=this,this.dom=a;const d=this;if(r.add(this),p(),a.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const h=a.value,g=a.name,y=a.closest(".form-element, form")||a.parentNode;if(y){const f=y.querySelectorAll("[data-ln-date-dict]");for(let w=0;w<f.length;w++){const b=f[w].getAttribute("data-ln-date-dict");if(b){const _=xe(f[w],"data-ln-date-dict-key");_["months-long"]&&(_.monthsLong=_["months-long"].split(",").map(S=>S.trim())),_["months-short"]&&(_.monthsShort=_["months-short"].split(",").map(S=>S.trim())),G(b,_)}}}const A=document.createElement("span");A.setAttribute("data-ln-date-field",""),a.parentNode.insertBefore(A,a),A.appendChild(a),this._wrapper=A;const C=document.createElement("input");C.type="hidden",C.name=g,a.removeAttribute("name"),a.hasAttribute("data-ln-fill-as")&&C.setAttribute("data-ln-fill-as",a.getAttribute("data-ln-fill-as")),a.insertAdjacentElement("afterend",C),this._hidden=C;const x=document.createElement("input");x.type="date",x.tabIndex=-1,x.setAttribute("tabindex","-1"),x.setAttribute("aria-hidden","true"),x.setAttribute("aria-label",a.getAttribute("data-ln-date-label")||"Date picker"),x.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",C.insertAdjacentElement("afterend",x),this._picker=x,a.type="text";const k=document.createElement("button");k.type="button",k.setAttribute("aria-label",a.getAttribute("data-ln-date-label")||"Open date picker"),k.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',x.insertAdjacentElement("afterend",k),this._btn=k,this._lastISO="",Object.defineProperty(C,"value",{get:function(){return o.get.call(C)},set:function(f){if(o.set.call(C,f),f&&f!==""){const w=v(f);w&&l(d,f,w)}else f===""&&c(d)}}),be(a,o,{get:function(){return o.get.call(a)},set:function(f,w){if(d._isFormatting){w(f);return}if(!f||f===""){w(""),c(d);return}const b=v(f)||M(f);if(b){const _=O(b),S=a.getAttribute(e)||"",E=F(a),Qe=T(E),he=I(b,S,E,Qe);w(he),l(d,_,b,he)}else w(String(f)),c(d)}}),this._onPickerChange=function(){const f=x.value;if(f){const w=v(f);w&&l(d,f,w)}else c(d)},x.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=d.dom.value.trim();if(f===""){d._lastISO!==""&&c(d);return}if(d._lastISO){const b=v(d._lastISO);if(b){const _=d.dom.getAttribute(e)||"",S=F(d.dom),E=T(S);if(f===I(b,_,S,E))return}}const w=M(f);if(w){const b=O(w);l(d,b,w)}else if(d._lastISO){const b=v(d._lastISO);b&&d._displayFormatted(b)}else d.dom.value=""},a.addEventListener("blur",this._onBlur),this._onBtnClick=function(){d._openPicker()},k.addEventListener("click",this._onBtnClick);const D=a.form;if(D&&(this._form=D,this._onFormReset=function(){setTimeout(function(){const f=d.dom.value;if(f){const w=v(f)||M(f);if(w){const b=O(w);l(d,b,w);return}}c(d)},0)},D.addEventListener("reset",this._onFormReset)),h&&h!==""){const f=v(h);f&&l(d,h,f)}return this}m.prototype._initTextElement=function(){const a=this.dom,d=a.getAttribute("data-ln-value"),h=a.getAttribute("data-ln-date"),g=a.getAttribute("datetime");let y=null;a.tagName==="TIME"&&g!==null&&g!==""?y=g:d!==null&&d!==""?y=d:g!==null&&g!==""?y=g:h!==null&&h!==""&&h!=="true"&&!W.test(h)?y=h:y=a.textContent.trim();const A=v(y)||M(y);if(A&&!isNaN(A.getTime())){const C=O(A);this._rawValue=C,a.tagName!=="TIME"&&!a.hasAttribute("data-ln-value")&&a.setAttribute("data-ln-value",C),this._formatTextContent()}else this._rawValue=null},m.prototype._formatTextContent=function(){if(this._rawValue){const a=v(this._rawValue);if(a){let h=this.dom.getAttribute("data-ln-date-format");if(!h){const A=this.dom.getAttribute("data-ln-date");A&&W.test(A)&&(h=A)}const g=F(this.dom),y=T(g);this.dom.textContent=I(a,h||"medium",g,y)}}},m.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},m.prototype._setHiddenRaw=function(a){o.set.call(this._hidden,a)},m.prototype._displayFormatted=function(a){const d=this.dom.getAttribute(e)||"",h=F(this.dom),g=T(h);this._isFormatting=!0,this.dom.value=I(a,d,h,g),this._isFormatting=!1},Object.defineProperty(m.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":o.get.call(this._hidden)},set:function(a){if(this.isTextElement){if(!a||a===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const h=v(a)||M(a);if(!h)return;const g=O(h);this._rawValue=g,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",g):this.dom.setAttribute("data-ln-value",g),this._formatTextContent();return}if(!a||a===""){c(this);return}const d=v(a);d&&l(this,a,d)}}),Object.defineProperty(m.prototype,"date",{get:function(){const a=this.value;return a?v(a):null},set:function(a){if(!a||!(a instanceof Date)||isNaN(a.getTime())){this.value="";return}this.value=O(a)}}),Object.defineProperty(m.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),m.prototype.destroy=function(){if(!this.dom[t])return;if(r.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[t];return}this._form&&this._onFormReset&&this._form.removeEventListener("reset",this._onFormReset),this._picker.removeEventListener("change",this._onPickerChange),this.dom.removeEventListener("blur",this._onBlur),this._btn.removeEventListener("click",this._onBtnClick);const a=this.value;this._hidden.remove(),this._picker.remove(),this._btn.remove(),this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.insertBefore(this.dom,this._wrapper),this._wrapper.remove()),delete this.dom.value,this.dom.name=this._hidden.name,this.dom.type="date",a&&(this.dom.value=a),delete this.dom[t]},de(e,t,m,"ln-date",{attributes:i,extraAttributes:["datetime","lang"],onAttributeChange:n})})()})();
1
+ (function(){"use strict";function K(){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 R(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(!R(o))return}e.apply(console,t)}}function Q(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function N(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){N(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function pe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function we(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,r={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const i=s[c];i.name&&i.type==="checkbox"&&!i.disabled&&(l[i.name]=(l[i.name]||0)+1)}for(let c=0;c<s.length;c++){const i=s[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(o&&i.matches&&i.matches(o)))if(i.type==="checkbox")n&&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 u=0;u<i.options.length;u++)i.options[u].selected&&r[i.name].push(i.options[u].value)}else if(n&&i.type==="hidden")r[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const u=Number(i.value);r[i.name]=i.value===""||isNaN(u)?null:u}else r[i.name]=i.value}return r}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function be(e,t){const n=e.elements,o=[],r={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const i=t[c];if(l.type==="checkbox"){if(Array.isArray(i))l.checked=i.indexOf(l.value)!==-1;else if(r[l.name]>1){const u=String(i).split(",").map(function(p){return p.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=ge(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 u=0;u<l.options.length;u++)l.options[u].selected=i.indexOf(l.options[u].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}function ye(e,t,{get:n,set:o}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(r){o?o.call(this,r,s=>t.set.call(this,s)):t.set.call(this,r)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=be,window.lnCore.serializeForm=we,window.lnCore.resolveFormMethod=pe);const Y={};function Ce(e,t){Y[e]=t}function _e(e){return Y[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ce,window.lnCore.getDataMapper=_e);function F(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,N(function(){new MutationObserver(function(){Q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const z={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];z[n]=t}function L(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return z[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=L,window.lnCore.ensureLocaleObserver=J);const B={};function ve(e,t){B[e]||(B[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=B[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const c=o[l],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const p=i[u].trim().split(":");if(p.length!==2)continue;const m=p[0].trim(),a=p[1].trim();t[a]!=null&&c.setAttribute(m,t[a])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const c=r[l],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const p=i[u].trim().split(":");if(p.length!==2)continue;const m=p[0].trim(),a=p[1].trim();a in t&&c.classList.toggle(m,!!t[a])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)X(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Z(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const l=r[s],c=l.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function xe(e,t,n,o,r,s){const l={};for(let i=0;i<e.children.length;i++){const u=e.children[i],p=u.getAttribute("data-ln-render-key");p&&(l[p]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],p=String(o(u));let m=l[p];if(m)r(m,u,i);else{const a=ve(n,s);if(!a||(Z(a,u),m=a.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",p),r(m,u,i)}c.appendChild(m)}e.textContent="",e.appendChild(c)}function Se(e,t){const n={},o=e.querySelectorAll("["+t+"]");for(let r=0;r<o.length;r++)n[o[r].getAttribute(t)]=o[r].textContent,o[r].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Z,window.lnCore.fill=X,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function q(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function ee(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function te(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 ne(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function re(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const o=new Set(e||[]),r=function(s,l){const c=s.getAttribute(l);return c!==null&&o.has(c)?c:t};return $.set(n,r),r}function oe(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ie(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function le(e,t,n,o,r){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=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"?(c(`[${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:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${s}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${s}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${s}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function ke(e,t,n){for(const o in n){const[r,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return r(t,s,l)},enumerable:!0,configurable:!0})}return e}function Ee(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=re(o.values,o.fallback);break;case"integer":r=ee;break;case"float":r=oe;break;case"boolean":r=te;break;case"list":r=ne;break;case"json":r=ie;break;case"string":default:r=q;break}r||(r=q),t[o.prop]=[r,n,o.fallback]}return t}function De(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 Oe(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=ke,window.lnCore.attrSpec=Ee,window.lnCore.attrStr=q,window.lnCore.attrInt=ee,window.lnCore.attrBool=te,window.lnCore.attrList=ne,window.lnCore.attrEnum=re,window.lnCore.attrFloat=oe,window.lnCore.attrJson=ie);function T(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 se(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&T(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let i=0;i<c.length;i++)T(c[i],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Te(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 ae(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Me(e){const t=ae(),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(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Oe(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 ce(e,t,n,o){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ne(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=ae(),r=o.byAttr.get(t),s=K()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!r&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&R(l)){const c=o.byDeclaredAttr.get(t),i=l.getAttribute(t);for(let u=0;u<c.length;u++)le(c[u].spec,i,t,c[u].componentTag,l)}if(window.lnCore._debugSink&&(n||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&ce(c,l,t,e.oldValue),o.reactiveWildcard.length&&ce(o.reactiveWildcard,l,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const i=r[c];if(i.handler){i.handler(l,t,e.oldValue);continue}i.onAttributeChange&&l[i.attribute]?i.onAttributeChange(l,t):(se(l,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(l))}}}function Fe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,N(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ne(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function j(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function P(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 ue(e){const t=V();if(!t.length)return;const n=e.target;if(n){const r=n.nodeType===1?n:n.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=j();if(e.target&&o.length)for(let r=0;r<o.length;r++){const s=o[r],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const i=t[c];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)s.matches&&s.matches(i.query)&&T(s,i);else if(s.matches&&s.matches(i.query)&&T(s,i),s.querySelectorAll){const u=s.querySelectorAll(i.query);for(let p=0;p<u.length;p++)T(u[p],i)}}i.onInit&&i.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const i=t[c],u=i.query;if(u){if(!l)s.matches&&s.matches(u)&&P(s,i);else if(s.matches&&s.matches(u)&&P(s,i),s.querySelectorAll){const p=s.querySelectorAll(u);for(let m=0;m<p.length;m++)P(p[m],i)}}}}}}function de(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,N(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ue(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ie(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const r=n[o];if(r.type==="childList")try{ue(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Re(e){V().push(e),e.onSubtreeChange&&e.query&&j().push(e),de()}function fe(e,t,n,o,r={}){const s=r.extraAttributes||[],l=r.onAttributeChange||null,c=r.onSubtreeChange||null,i=r.onInit||null,u=r.onAttrChange||null,p=r.effects||null,m=r.attributes||null,a=m?De(m):p,d=m?new Set(Object.keys(m)):null,h=r.persist||null;function g(D){const f=D||document.body;if(se(f,e,t,n),m&&K())for(const w in m){const b=m[w],_=Array.from(f.querySelectorAll("["+w+"]"));f.matches&&f.matches("["+w+"]")&&_.push(f);for(let S=0;S<_.length;S++){const E=_[S];R(E)&&le(b,E.getAttribute(w),w,o,E)}}i&&i(f)}const y=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let f;for(;(f=D.exec(e))!==null;)y.push(f[1])}else y.push(e);Me({selector:e,attribute:t,componentTag:o,attributes:m,ComponentFn:n,onInit:i,observed:y.concat(s),onAttributeChange:l,onAttrChange:u,effects:a,declared:d,persist:h}),Fe();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=r.subtreeQuery||(A?e:"["+e+"]"),x={selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:c,query:C};V().push(x),c&&C&&j().push(x),de(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=fe,window.lnCore.observeLifecycle=Re,window.lnCore.withoutLifecycle=Ie);function k(){Le()>0?Te(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k):k(),g}function he(e){return(e||"").replace(/^#/,"")}function H(e){const t=e===void 0?location.hash:e,n={},o=he(t);if(!o)return n;const r=o.split("&");for(let s=0;s<r.length;s++){const l=r[s];if(!l)continue;const c=l.indexOf(":"),i=c>-1?l.slice(0,c):l,u=c>-1?l.slice(c+1):"";if(i)try{n[i]=decodeURIComponent(u)}catch{n[i]=u}}return n}function Be(e){if(!e)return null;const t=H();return e in t?t[e]:null}function qe(e,t){if(!e)return;const n=H();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");he(location.hash)!==r&&(location.hash=r)}function $e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ve(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 je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Pe(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 He(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function We(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(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=H,window.lnCore.hashGet=Be,window.lnCore.hashSet=qe,window.lnCore.hashLinkClick=$e,window.lnCore.resolveHashNamespace=Ve,window.lnCore.hashSortEncode=je,window.lnCore.hashSortDecode=Pe,window.lnCore.hashFilterEncode=He,window.lnCore.hashFilterDecode=We);function Ue(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ue);function v(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const n=t<1e11?t*1e3:t,o=new Date(n);return isNaN(o.getTime())?null:o}if(typeof e=="string"){const n=e.trim();if(!n)return null;const o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(o){const s=+o[1],l=+o[2],c=+o[3],i=new Date(s,l-1,c);return i.getFullYear()!==s||i.getMonth()!==l-1||i.getDate()!==c?null:i}const r=new Date(n);return isNaN(r.getTime())?null:r}return null}function O(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t+"-"+n+"-"+o}const W=/^(short|medium|long)(\s+datetime)?$/,Ke={short:{dateStyle:"short"},medium:{dateStyle:"medium"},long:{dateStyle:"long"},"short datetime":{dateStyle:"short",timeStyle:"short"},"medium datetime":{dateStyle:"medium",timeStyle:"short"},"long datetime":{dateStyle:"long",timeStyle:"short"}};function Qe(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(W)?Ke[e.trim()]:null}function M(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let n,o;if(t.indexOf(".")!==-1)n=".",o=t.split(".");else if(t.indexOf("/")!==-1)n="/",o=t.split("/");else if(t.indexOf("-")!==-1)n="-",o=t.split("-");else return null;if(o.length!==3)return null;const r=[];for(let u=0;u<3;u++){const p=parseInt(o[u],10);if(isNaN(p))return null;r.push(p)}let s,l,c;n==="."?(s=r[0],l=r[1],c=r[2]):n==="/"?(l=r[0],s=r[1],c=r[2]):o[0].length===4?(c=r[0],l=r[1],s=r[2]):(s=r[0],l=r[1],c=r[2]),c<100&&(c+=c<50?2e3:1900);const i=new Date(c,l-1,s);return i.getFullYear()!==c||i.getMonth()!==l-1||i.getDate()!==s?null:i}function U(e,t,n,o){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const r=e.getDate(),s=e.getMonth(),l=e.getFullYear(),c=e.getHours(),i=e.getMinutes();let u,p;const m=(n||"").toLowerCase().split("-")[0];let a=!1;try{const g=new Intl.DateTimeFormat(n,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];a=!!(o&&g!==m)}catch{a=!!o}if(a&&o&&o.monthsLong)u=o.monthsLong[s];else try{u=new Intl.DateTimeFormat(n,{month:"long"}).format(e)}catch{u=String(s+1)}if(a&&o&&o.monthsShort)p=o.monthsShort[s];else try{p=new Intl.DateTimeFormat(n,{month:"short"}).format(e)}catch{p=String(s+1)}const d={yyyy:String(l),yy:String(l).slice(-2),MMMM:u,MMM:p,MM:String(s+1).padStart(2,"0"),M:String(s+1),dd:String(r).padStart(2,"0"),d:String(r),HH:String(c).padStart(2,"0"),mm:String(i).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(h){return d[h]!==void 0?d[h]:h})}function I(e,t,n,o){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const r=Qe(t);if(r)try{const s=new Intl.DateTimeFormat(n,r),l=(n||"").toLowerCase().split("-")[0],c=s.resolvedOptions().locale.toLowerCase().split("-")[0];return o&&c!==l?U(e,"dd.MM.yyyy",n,o):s.format(e)}catch{return U(e,"dd.MM.yyyy",n,o)}return U(e,t||"dd.MM.yyyy",n,o)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function n(a){const d=a[t];if(d){if(d.isTextElement)d._initTextElement();else if(d.value){const h=v(d.value);h&&d._displayFormatted(h)}}}const o={"data-ln-date":{type:"enum",values:["short","medium","long","full","iso"],fallback:"medium",effect:n,description:"Date display style preset or activator"},"data-ln-date-format":{type:"string",effect:n,description:"Custom Intl.DateTimeFormat pattern or options"},"data-ln-date-locale":{type:"string",effect:n,description:"BCP 47 language tag override for date formatting"},"data-ln-value":{type:"string",effect:n,description:"Raw ISO date string or timestamp for non-time elements (td, span)"},"data-ln-date-dict":{type:"marker",description:"Container for date translation dictionary"},"data-ln-date-dict-key":{type:"string",description:"Dictionary key for relative time or custom date formatting"},"data-ln-date-field":{type:"string",description:"Field name mapping for date record binding"},"data-ln-date-label":{type:"string",description:"Accessible label text for the date input"}},r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function s(a,d,h){Q(a.dom,"ln-date:change",{value:d,formatted:a.dom.value,date:h}),a.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function l(a,d,h,g){a._setHiddenRaw(d),r.set.call(a._picker,d),a._lastISO=d,g!==void 0?(a._isFormatting=!0,a.dom.value=g,a._isFormatting=!1):h&&a._displayFormatted(h),s(a,d,h)}function c(a){a._setHiddenRaw(""),r.set.call(a._picker,""),a._isFormatting=!0,a.dom.value="",a._isFormatting=!1,a._lastISO="",s(a,"",null)}const i=new Set;let u=!1;function p(){J(),!u&&(u=!0,document.addEventListener("ln-core:locale-change",function(){i.forEach(function(a){if(a.isTextElement)a._formatTextContent();else if(a.value){const d=v(a.value);d&&a._displayFormatted(d)}})}))}function m(a){if(a[t])return a[t];a[t]=this,this.dom=a;const d=this;if(i.add(this),p(),a.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const h=a.value,g=a.name,y=a.closest(".form-element, form")||a.parentNode;if(y){const f=y.querySelectorAll("[data-ln-date-dict]");for(let w=0;w<f.length;w++){const b=f[w].getAttribute("data-ln-date-dict");if(b){const _=Se(f[w],"data-ln-date-dict-key");_["months-long"]&&(_.monthsLong=_["months-long"].split(",").map(S=>S.trim())),_["months-short"]&&(_.monthsShort=_["months-short"].split(",").map(S=>S.trim())),G(b,_)}}}const A=document.createElement("span");A.setAttribute("data-ln-date-field",""),a.parentNode.insertBefore(A,a),A.appendChild(a),this._wrapper=A;const C=document.createElement("input");C.type="hidden",C.name=g,a.removeAttribute("name"),a.hasAttribute("data-ln-fill-as")&&C.setAttribute("data-ln-fill-as",a.getAttribute("data-ln-fill-as")),a.insertAdjacentElement("afterend",C),this._hidden=C;const x=document.createElement("input");x.type="date",x.tabIndex=-1,x.setAttribute("tabindex","-1"),x.setAttribute("aria-hidden","true"),x.setAttribute("aria-label",a.getAttribute("data-ln-date-label")||"Date picker"),x.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",C.insertAdjacentElement("afterend",x),this._picker=x,a.type="text";const k=document.createElement("button");k.type="button",k.setAttribute("aria-label",a.getAttribute("data-ln-date-label")||"Open date picker"),k.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',x.insertAdjacentElement("afterend",k),this._btn=k,this._lastISO="",Object.defineProperty(C,"value",{get:function(){return r.get.call(C)},set:function(f){if(r.set.call(C,f),f&&f!==""){const w=v(f);w&&l(d,f,w)}else f===""&&c(d)}}),ye(a,r,{get:function(){return r.get.call(a)},set:function(f,w){if(d._isFormatting){w(f);return}if(!f||f===""){w(""),c(d);return}const b=v(f)||M(f);if(b){const _=O(b),S=a.getAttribute(e)||"",E=F(a),Ye=L(E),me=I(b,S,E,Ye);w(me),l(d,_,b,me)}else w(String(f)),c(d)}}),this._onPickerChange=function(){const f=x.value;if(f){const w=v(f);w&&l(d,f,w)}else c(d)},x.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=d.dom.value.trim();if(f===""){d._lastISO!==""&&c(d);return}if(d._lastISO){const b=v(d._lastISO);if(b){const _=d.dom.getAttribute(e)||"",S=F(d.dom),E=L(S);if(f===I(b,_,S,E))return}}const w=M(f);if(w){const b=O(w);l(d,b,w)}else if(d._lastISO){const b=v(d._lastISO);b&&d._displayFormatted(b)}else d.dom.value=""},a.addEventListener("blur",this._onBlur),this._onBtnClick=function(){d._openPicker()},k.addEventListener("click",this._onBtnClick);const D=a.form;if(D&&(this._form=D,this._onFormReset=function(){setTimeout(function(){const f=d.dom.value;if(f){const w=v(f)||M(f);if(w){const b=O(w);l(d,b,w);return}}c(d)},0)},D.addEventListener("reset",this._onFormReset)),h&&h!==""){const f=v(h);f&&l(d,h,f)}return this}m.prototype._initTextElement=function(){const a=this.dom,d=a.getAttribute("data-ln-value"),h=a.getAttribute("data-ln-date"),g=a.getAttribute("datetime");let y=null;a.tagName==="TIME"&&g!==null&&g!==""?y=g:d!==null&&d!==""?y=d:g!==null&&g!==""?y=g:h!==null&&h!==""&&h!=="true"&&!W.test(h)?y=h:y=a.textContent.trim();const A=v(y)||M(y);if(A&&!isNaN(A.getTime())){const C=O(A);this._rawValue=C,a.tagName!=="TIME"&&!a.hasAttribute("data-ln-value")&&a.setAttribute("data-ln-value",C),this._formatTextContent()}else this._rawValue=null},m.prototype._formatTextContent=function(){if(this._rawValue){const a=v(this._rawValue);if(a){let h=this.dom.getAttribute("data-ln-date-format");if(!h){const A=this.dom.getAttribute("data-ln-date");A&&W.test(A)&&(h=A)}const g=F(this.dom),y=L(g);this.dom.textContent=I(a,h||"medium",g,y)}}},m.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},m.prototype._setHiddenRaw=function(a){r.set.call(this._hidden,a)},m.prototype._displayFormatted=function(a){const d=this.dom.getAttribute(e)||"",h=F(this.dom),g=L(h);this._isFormatting=!0,this.dom.value=I(a,d,h,g),this._isFormatting=!1},Object.defineProperty(m.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":r.get.call(this._hidden)},set:function(a){if(this.isTextElement){if(!a||a===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const h=v(a)||M(a);if(!h)return;const g=O(h);this._rawValue=g,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",g):this.dom.setAttribute("data-ln-value",g),this._formatTextContent();return}if(!a||a===""){c(this);return}const d=v(a);d&&l(this,a,d)}}),Object.defineProperty(m.prototype,"date",{get:function(){const a=this.value;return a?v(a):null},set:function(a){if(!a||!(a instanceof Date)||isNaN(a.getTime())){this.value="";return}this.value=O(a)}}),Object.defineProperty(m.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),m.prototype.destroy=function(){if(!this.dom[t])return;if(i.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[t];return}this._form&&this._onFormReset&&this._form.removeEventListener("reset",this._onFormReset),this._picker.removeEventListener("change",this._onPickerChange),this.dom.removeEventListener("blur",this._onBlur),this._btn.removeEventListener("click",this._onBtnClick);const a=this.value;this._hidden.remove(),this._picker.remove(),this._btn.remove(),this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.insertBefore(this.dom,this._wrapper),this._wrapper.remove()),delete this.dom.value,this.dom.name=this._hidden.name,this.dom.type="date",a&&(this.dom.value=a),delete this.dom[t]},fe(e,t,m,"ln-date",{attributes:o,extraAttributes:["datetime","lang"],onAttributeChange:n})})()})();
@@ -1 +1 @@
1
- var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){o=t[r];break}if(!x(o))return}e.apply(console,t)}}function we(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function pe(e,t,a){const o=a||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function be(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function he(e,t){const a=!!(t&&t.typed),o=t&&t.exclude,r={},i=e.elements,l={};if(a)for(let d=0;d<i.length;d++){const n=i[d];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let d=0;d<i.length;d++){const n=i[d];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")a&&l[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let s=0;s<n.options.length;s++)n.options[s].selected&&r[n.name].push(n.options[s].value)}else if(a&&n.type==="hidden")r[n.name]=n.value;else if(a&&(n.type==="number"||n.type==="range")){const s=Number(n.value);r[n.name]=n.value===""||isNaN(s)?null:s}else r[n.name]=n.value}return r}function me(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ge(e,t){const a=e.elements,o=[],r={};for(let i=0;i<a.length;i++){const l=a[i];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let i=0;i<a.length;i++){const l=a[i];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const d=l.getAttribute("data-ln-fill-as")||l.name;if(!d||!(d in t))continue;const n=t[d];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(r[l.name]>1){const s=String(n).split(",").map(function(c){return c.trim()});l.checked=s.indexOf(l.value)!==-1}else l.checked=me(n);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let s=0;s<l.options.length;s++)l.options[s].selected=n.indexOf(l.options[s].value)!==-1;o.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ge,window.lnCore.serializeForm=he,window.lnCore.resolveFormMethod=be);const B={};function ye(e,t){B[e]=t}function Ce(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=Ce);function ve(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){pe(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function Ae(e,t){if(!e||typeof t!="object")return;const a=e.toLowerCase().split("-")[0];W[a]=t}function xe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ae,window.lnCore.getLocaleFallback=xe,window.lnCore.ensureLocaleObserver=ve);const S={};function Se(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const a=S[e];return a?a.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function U(e,t){if(!e||!t)return e;const a=e.querySelectorAll("[data-ln-field]");for(let l=0;l<a.length;l++){const d=a[l],n=d.getAttribute("data-ln-field");t[n]!=null&&(d.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const d=o[l],n=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<n.length;s++){const c=n[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const d=r[l],n=d.getAttribute("data-ln-show");n in t&&d.classList.toggle("hidden",!t[n])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const d=i[l],n=d.getAttribute("data-ln-class").split(",");for(let s=0;s<n.length;s++){const c=n[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function ke(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 a=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<a.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",a[o],t??null),a[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)U(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let a=0;a<t.length;a++)t[a].textContent=""}})));function V(e,t){if(!e||!t)return e;const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;a.nextNode();){const i=a.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,d){return t[d]!==void 0?t[d]:""}))}const o=function(i,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const l=r[i],d=l.attributes;for(let n=0;n<d.length;n++){const s=d[n];s.value.indexOf("{{")!==-1&&l.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function _e(e,t,a,o,r,i){const l={};for(let n=0;n<e.children.length;n++){const s=e.children[n],c=s.getAttribute("data-ln-render-key");c&&(l[c]=s)}const d=document.createDocumentFragment();for(let n=0;n<t.length;n++){const s=t[n],c=String(o(s));let u=l[c];if(u)r(u,s,n);else{const f=Se(a,i);if(!f||(V(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),r(u,s,n)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=U,window.lnCore.lnFill=ke,window.lnCore.renderList=_e);function k(e,t,a){const o=e.getAttribute(t);return o===null?a:o}function H(e,t,a){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?a:o}function z(e,t,a=!1){const o=e.getAttribute(t);if(o===null)return!!a;const r=o.trim().toLowerCase();return!(r==="false"||r==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(a=>a.trim()).filter(Boolean)}const _=new Map;function Q(e,t){const a=(e?e.join("|"):"")+"::"+t;if(_.has(a))return _.get(a);const o=new Set(e||[]),r=function(i,l){const d=i.getAttribute(l);return d!==null&&o.has(d)?d:t};return _.set(a,r),r}function J(e,t,a){const o=parseFloat(e.getAttribute(t));return isNaN(o)?a:o}function K(e,t,a){const o=e.getAttribute(t);if(!o)return a;try{return JSON.parse(o)}catch{return a}}function P(e,t,a,o,r){if(!e||t===null)return!0;const i=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const d=n=>{r?console.warn(n,r):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${a}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${a}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(d(`[${i}] Value ${n} for attribute "${a}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(d(`[${i}] Value ${n} for attribute "${a}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return d(`[${i}] Invalid JSON for attribute "${a}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function De(e,t,a){for(const o in a){const[r,i,l]=a[o];Object.defineProperty(e,o,{get:function(){return r(t,i,l)},enumerable:!0,configurable:!0})}return e}function Ee(e){const t={};for(const a in e){const o=e[a];if(!o||!o.prop)continue;let r=o.read;if(!r&&o.type)switch(o.type){case"enum":r=Q(o.values,o.fallback);break;case"integer":r=H;break;case"float":r=J;break;case"boolean":r=z;break;case"list":r=G;break;case"json":r=K;break;case"string":default:r=k;break}r||(r=k),t[o.prop]=[r,a,o.fallback]}return t}function $e(e){const t={};for(const a in e){const o=e[a];o&&o.effect&&(t[a]=o.effect)}return Object.keys(t).length?t:null}function Ie(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const a in e.effects)t.add(a);if(e.onAttrChange&&e.declared)for(const a of e.declared)t.add(a);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=De,window.lnCore.attrSpec=Ee,window.lnCore.attrStr=k,window.lnCore.attrInt=H,window.lnCore.attrBool=z,window.lnCore.attrList=G,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);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(a){console.error("["+t.attribute+"] init failed",e,a)}}}function X(e,t,a,o){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:a,ComponentFn:o};if(e.matches&&e.matches(i)&&h(e,l),e.querySelectorAll){const d=e.querySelectorAll(i);for(let n=0;n<d.length;n++)h(d[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(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 ee(){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 te(e){const t=ee(),a=e.observed||[];for(let o=0;o<a.length;o++){const r=a[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(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Ie(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 ne(e,t,a,o){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const l=i.effects&&i.effects[a];l?l(t,a,o):i.onAttrChange&&(!i.declared||i.declared.has(a))&&i.onAttrChange(t,a,o)}}function Oe(e){const t=e.attributeName,a=t.indexOf("data-ln-")===0,o=ee(),r=o.byAttr.get(t),i=j()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!a&&!r&&!i)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(i&&x(l)){const d=o.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let s=0;s<d.length;s++)P(d[s].spec,n,t,d[s].componentTag,l)}if(window.lnCore._debugSink&&(a||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),a){const d=o.byReactive.get(t);d&&ne(d,l,t,e.oldValue),o.reactiveWildcard.length&&ne(o.reactiveWildcard,l,t,e.oldValue)}if(r)for(let d=0;d<r.length;d++){const n=r[d];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(X(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++)try{Oe(t[a])}catch(o){console.error("[ln-core] mutation handler failed",t[a].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function $(e,t){if(!document.contains(e))if(t.attribute){const a=e[t.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function qe(e){const t=D();if(!t.length)return;const a=e.target;if(a){const r=a.nodeType===1?a:a.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=E();if(e.target&&o.length)for(let r=0;r<o.length;r++){const i=o[r],l=i.query,d=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;d&&i.onSubtreeChange(d,e)}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const l=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const n=t[d];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)i.matches&&i.matches(n.query)&&h(i,n);else if(i.matches&&i.matches(n.query)&&h(i,n),i.querySelectorAll){const s=i.querySelectorAll(n.query);for(let c=0;c<s.length;c++)h(s[c],n)}}n.onInit&&n.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){const l=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const n=t[d],s=n.query;if(s){if(!l)i.matches&&i.matches(s)&&$(i,n);else if(i.matches&&i.matches(s)&&$(i,n),i.querySelectorAll){const c=i.querySelectorAll(s);for(let u=0;u<c.length;u++)$(c[u],n)}}}}}}function oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++){const o=t[a];if(o.type==="childList")try{qe(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Le(e,t){te({observed:e,handler:t}),ae()}function Te(e){D().push(e),e.onSubtreeChange&&e.query&&E().push(e),oe()}function le(e,t,a,o,r={}){const i=r.extraAttributes||[],l=r.onAttributeChange||null,d=r.onSubtreeChange||null,n=r.onInit||null,s=r.onAttrChange||null,c=r.effects||null,u=r.attributes||null,f=u?$e(u):c,L=u?new Set(Object.keys(u)):null,et=r.persist||null;function A(M){const w=M||document.body;if(X(w,e,t,a),u&&j())for(const y in u){const nt=u[y],N=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&N.push(w);for(let F=0;F<N.length;F++){const R=N[F];x(R)&&P(nt,R.getAttribute(y),y,o,R)}}n&&n(w)}const T=[];if(e.indexOf("[")!==-1){const M=/\[([\w-]+)/g;let w;for(;(w=M.exec(e))!==null;)T.push(w[1])}else T.push(e);te({selector:e,attribute:t,componentTag:o,attributes:u,ComponentFn:a,onInit:n,observed:T.concat(i),onAttributeChange:l,onAttrChange:s,effects:f,declared:L,persist:et}),ae();const tt=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ce=r.subtreeQuery||(tt?e:"["+e+"]"),ue={selector:e,attribute:t,ComponentFn:a,onInit:n,onSubtreeChange:d,query:ce};D().push(ue),d&&ce&&E().push(ue),oe(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Te);function fe(){Y()>0?Z(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",fe):fe(),A}function re(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,a={},o=re(t);if(!o)return a;const r=o.split("&");for(let i=0;i<r.length;i++){const l=r[i];if(!l)continue;const d=l.indexOf(":"),n=d>-1?l.slice(0,d):l,s=d>-1?l.slice(d+1):"";if(n)try{a[n]=decodeURIComponent(s)}catch{a[n]=s}}return a}function Me(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Ne(e,t){if(!e)return;const a=I();t==null?delete a[e]:a[e]=String(t);const r=Object.keys(a).map(function(i){const l=a[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");re(location.hash)!==r&&(location.hash=r)}function Fe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const a=e.getAttribute("data-ln-hash");if(a&&a.trim()!=="")return a.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 je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(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 We(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ue(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const a=e.slice(0,t),o=e.slice(t+1),r=o?o.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:a,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Me,window.lnCore.hashSet=Ne,window.lnCore.hashLinkClick=Fe,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=je,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ue);function Ve(){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=Ve);const O=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function He(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const a=[];for(let o=0;o<=t.length;o++)a[o]=[o];for(let o=0;o<=e.length;o++)a[0][o]=o;for(let o=1;o<=t.length;o++)for(let r=1;r<=e.length;r++)t.charAt(o-1)===e.charAt(r-1)?a[o][r]=a[o-1][r-1]:a[o][r]=Math.min(a[o-1][r-1]+1,a[o][r-1]+1,a[o-1][r]+1);return a[t.length][e.length]}function ze(e,t=O){if(t.has(e))return null;let a=null,o=1/0;for(const i of t){const l=He(e,i);l<o&&(o=l,a=i)}const r=Math.max(3,Math.floor(e.length*.4));return o<=r?a:null}function ie(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Ge(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const o=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const n=l.attributes[d];if(n.name.startsWith("data-ln-")&&n.name.endsWith("-for")){const s=(n.value||"").trim();if(!s){o.push({type:"id-empty",element:l,attribute:n.name,targetId:"",message:`[ln-debug] Empty ID reference in <${l.tagName.toLowerCase()} ${n.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+ie(s))||o.push({type:"id-unresolved",element:l,attribute:n.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${l.tagName.toLowerCase()} ${n.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return o}function Qe(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const o=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const n=l.attributes[d];if(n.name.startsWith("data-ln-")&&(n.name.endsWith("-source")||n.name.endsWith("-store"))&&n.name!=="data-ln-data-store"){const c=(n.value||"").trim();if(!c){o.push({type:"store-empty",element:l,attribute:n.name,storeName:"",message:`[ln-debug] Empty store reference in <${l.tagName.toLowerCase()} ${n.name}="">.`});continue}const u=ie(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),L=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!L&&o.push({type:"store-unresolved",element:l,attribute:n.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${l.tagName.toLowerCase()} ${n.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return o}function Je(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const a=[],o=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&o.unshift(t);const r=new Map;for(let i=0;i<o.length;i++){const l=o[i],d=(l.getAttribute("data-ln-data-store")||"").trim();d&&(r.has(d)||r.set(d,[]),r.get(d).push(l))}for(const[i,l]of r.entries())l.length>1&&a.push({type:"store-duplicate",storeName:i,elements:l,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return a}function Ke(e=document,t=O){const a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const o=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const n=l.attributes[d];if(n.name.startsWith("data-ln-")&&!t.has(n.name)){const s=ze(n.name,t),c=s?` Did you mean "${s}"?`:"";o.push({type:"attribute-unknown",element:l,attribute:n.name,suggestion:s,message:`[ln-debug] Unknown attribute "${n.name}" on <${l.tagName.toLowerCase()}>.${c}`})}}}return o}function v(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const a=t.validAttributes||O,o=Ge(e),r=Qe(e),i=Je(e),l=Ke(e,a),d=[...o,...r,...i,...l];if(!t.silent)for(let n=0;n<d.length;n++)console.warn(d[n].message);return{idIssues:o,storeIssues:r,uniquenessIssues:i,spellingIssues:l,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,a=null){if(!e)return;m&&(clearTimeout(m),m=null);function o(){m=setTimeout(()=>{m=null;const r=v(e);a&&a(r)},t)}Y()>0?Z(o):o()}function Pe(e,t,a,o){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",a),console.log("detail",o),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",a),console.log("old → new",o.oldValue,"→",o.newValue),console.groupEnd())}let p=[];function Xe(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function de(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ye(e,t,a,o){de(a)&&Pe(e,t,a,o)}function q(){Xe(),we(p.length>0?Ye:null,p.length>0?de:null)}function se(){q()}function Ze(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){q(),Le(["data-ln-debug"],q)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const a={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};Ze();function o(i){return this.dom=i,g(i.ownerDocument||document),se(),this}o.prototype.verify=function(i,l){return v(i||(this.dom?this.dom.ownerDocument||this.dom:document),l)},o.prototype.destroy=function(){delete this.dom[t],se()};const r=le(e,t,o,"ln-debug",{attributes:a,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});r.verify=function(i,l){return v(i||document,l)},r.schedule=function(i,l,d){return g(i||document,l,d)}})(),C.scheduleVerification=g,C.verifyDOM=v,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
1
+ var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){n=t[r];break}if(!x(n))return}e.apply(console,t)}}function pe(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function be(e,t,a){const n=a||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const a=!!(t&&t.typed),n=t&&t.exclude,r={},i=e.elements,l={};if(a)for(let d=0;d<i.length;d++){const o=i[d];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let d=0;d<i.length;d++){const o=i[d];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")a&&l[o.name]===1?r[o.name]=o.checked:(r[o.name]||(r[o.name]=[]),o.checked&&r[o.name].push(o.value));else if(o.type==="radio")o.checked&&(r[o.name]=o.value);else if(o.type==="select-multiple"){r[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&r[o.name].push(o.options[s].value)}else if(a&&o.type==="hidden")r[o.name]=o.value;else if(a&&(o.type==="number"||o.type==="range")){const s=Number(o.value);r[o.name]=o.value===""||isNaN(s)?null:s}else r[o.name]=o.value}return r}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ye(e,t){const a=e.elements,n=[],r={};for(let i=0;i<a.length;i++){const l=a[i];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let i=0;i<a.length;i++){const l=a[i];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const d=l.getAttribute("data-ln-fill-as")||l.name;if(!d||!(d in t))continue;const o=t[d];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(r[l.name]>1){const s=String(o).split(",").map(function(c){return c.trim()});l.checked=s.indexOf(l.value)!==-1}else l.checked=ge(o);n.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),n.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<l.options.length;s++)l.options[s].selected=o.indexOf(l.options[s].value)!==-1;n.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),n.push(l)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ye,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=he);const B={};function Ce(e,t){B[e]=t}function ve(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ce,window.lnCore.getDataMapper=ve);function Ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){be(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function xe(e,t){if(!e||typeof t!="object")return;const a=e.toLowerCase().split("-")[0];W[a]=t}function Se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=xe,window.lnCore.getLocaleFallback=Se,window.lnCore.ensureLocaleObserver=Ae);const S={};function ke(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const a=S[e];return a?a.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function U(e,t){if(!e||!t)return e;const a=e.querySelectorAll("[data-ln-field]");for(let l=0;l<a.length;l++){const d=a[l],o=d.getAttribute("data-ln-field");t[o]!=null&&(d.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<n.length;l++){const d=n[l],o=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const d=r[l],o=d.getAttribute("data-ln-show");o in t&&d.classList.toggle("hidden",!t[o])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const d=i[l],o=d.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function _e(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 a=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<a.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",a[n],t??null),a[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)U(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let a=0;a<t.length;a++)t[a].textContent=""}})));function V(e,t){if(!e||!t)return e;const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;a.nextNode();){const i=a.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,d){return t[d]!==void 0?t[d]:""}))}const n=function(i,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const l=r[i],d=l.attributes;for(let o=0;o<d.length;o++){const s=d[o];s.value.indexOf("{{")!==-1&&l.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function De(e,t,a,n,r,i){const l={};for(let o=0;o<e.children.length;o++){const s=e.children[o],c=s.getAttribute("data-ln-render-key");c&&(l[c]=s)}const d=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],c=String(n(s));let u=l[c];if(u)r(u,s,o);else{const f=ke(a,i);if(!f||(V(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),r(u,s,o)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=U,window.lnCore.lnFill=_e,window.lnCore.renderList=De);function k(e,t,a){const n=e.getAttribute(t);return n===null?a:n}function H(e,t,a){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?a:n}function z(e,t,a=!1){const n=e.getAttribute(t);if(n===null)return!!a;const r=n.trim().toLowerCase();return!(r==="false"||r==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(a=>a.trim()).filter(Boolean)}const _=new Map;function Q(e,t){const a=(e?e.join("|"):"")+"::"+t;if(_.has(a))return _.get(a);const n=new Set(e||[]),r=function(i,l){const d=i.getAttribute(l);return d!==null&&n.has(d)?d:t};return _.set(a,r),r}function J(e,t,a){const n=parseFloat(e.getAttribute(t));return isNaN(n)?a:n}function K(e,t,a){const n=e.getAttribute(t);if(!n)return a;try{return JSON.parse(n)}catch{return a}}function P(e,t,a,n,r){if(!e||t===null)return!0;const i=n||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const d=o=>{r?console.warn(o,r):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${a}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${a}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(d(`[${i}] Value ${o} for attribute "${a}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(d(`[${i}] Value ${o} for attribute "${a}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return d(`[${i}] Invalid JSON for attribute "${a}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ee(e,t,a){for(const n in a){const[r,i,l]=a[n];Object.defineProperty(e,n,{get:function(){return r(t,i,l)},enumerable:!0,configurable:!0})}return e}function $e(e){const t={};for(const a in e){const n=e[a];if(!n||!n.prop)continue;let r=n.read;if(!r&&n.type)switch(n.type){case"enum":r=Q(n.values,n.fallback);break;case"integer":r=H;break;case"float":r=J;break;case"boolean":r=z;break;case"list":r=G;break;case"json":r=K;break;case"string":default:r=k;break}r||(r=k),t[n.prop]=[r,a,n.fallback]}return t}function Ie(e){const t={};for(const a in e){const n=e[a];n&&n.effect&&(t[a]=n.effect)}return Object.keys(t).length?t:null}function Oe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const a in e.effects)t.add(a);if(e.onAttrChange&&e.declared)for(const a of e.declared)t.add(a);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ee,window.lnCore.attrSpec=$e,window.lnCore.attrStr=k,window.lnCore.attrInt=H,window.lnCore.attrBool=z,window.lnCore.attrList=G,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);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(a){console.error("["+t.attribute+"] init failed",e,a)}}}function X(e,t,a,n){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:a,ComponentFn:n};if(e.matches&&e.matches(i)&&h(e,l),e.querySelectorAll){const d=e.querySelectorAll(i);for(let o=0;o<d.length;o++)h(d[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(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 ee(){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 te(e){const t=ee(),a=e.observed||[];for(let n=0;n<a.length;n++){const r=a[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const r=t.byDeclaredAttr.get(n);r.some(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=Oe(e);if(n===null)t.reactiveWildcard.push(e);else for(const r of n)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ne(e,t,a,n){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const l=i.effects&&i.effects[a];l?l(t,a,n):i.onAttrChange&&(!i.declared||i.declared.has(a))&&i.onAttrChange(t,a,n)}}function Le(e){const t=e.attributeName,a=t.indexOf("data-ln-")===0,n=ee(),r=n.byAttr.get(t),i=j()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!a&&!r&&!i)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(i&&x(l)){const d=n.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let s=0;s<d.length;s++)P(d[s].spec,o,t,d[s].componentTag,l)}if(window.lnCore._debugSink&&(a||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),a){const d=n.byReactive.get(t);d&&ne(d,l,t,e.oldValue),n.reactiveWildcard.length&&ne(n.reactiveWildcard,l,t,e.oldValue)}if(r)for(let d=0;d<r.length;d++){const o=r[d];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(X(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++)try{Le(t[a])}catch(n){console.error("[ln-core] mutation handler failed",t[a].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function $(e,t){if(!document.contains(e))if(t.attribute){const a=e[t.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=D();if(!t.length)return;const a=e.target;if(a){const r=a.nodeType===1?a:a.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const n=E();if(e.target&&n.length)for(let r=0;r<n.length;r++){const i=n[r],l=i.query,d=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;d&&i.onSubtreeChange(d,e)}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const l=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)i.matches&&i.matches(o.query)&&h(i,o);else if(i.matches&&i.matches(o.query)&&h(i,o),i.querySelectorAll){const s=i.querySelectorAll(o.query);for(let c=0;c<s.length;c++)h(s[c],o)}}o.onInit&&o.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){if(document.contains(i))continue;const l=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d],s=o.query;if(s){if(!l)i.matches&&i.matches(s)&&$(i,o);else if(i.matches&&i.matches(s)&&$(i,o),i.querySelectorAll){const c=i.querySelectorAll(s);for(let u=0;u<c.length;u++)$(c[u],o)}}}}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){const e=new MutationObserver(function(t){for(let a=0;a<t.length;a++){const n=t[a];if(n.type==="childList")try{oe(n)}catch(r){console.error("[ln-core] lifecycle handler failed",n.target,r)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function qe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const a=t.takeRecords();for(let n=0;n<a.length;n++){const r=a[n];if(r.type==="childList")try{oe(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Te(e,t){te({observed:e,handler:t}),ae()}function Me(e){D().push(e),e.onSubtreeChange&&e.query&&E().push(e),le()}function re(e,t,a,n,r={}){const i=r.extraAttributes||[],l=r.onAttributeChange||null,d=r.onSubtreeChange||null,o=r.onInit||null,s=r.onAttrChange||null,c=r.effects||null,u=r.attributes||null,f=u?Ie(u):c,q=u?new Set(Object.keys(u)):null,tt=r.persist||null;function A(M){const w=M||document.body;if(X(w,e,t,a),u&&j())for(const y in u){const at=u[y],N=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&N.push(w);for(let F=0;F<N.length;F++){const R=N[F];x(R)&&P(at,R.getAttribute(y),y,n,R)}}o&&o(w)}const T=[];if(e.indexOf("[")!==-1){const M=/\[([\w-]+)/g;let w;for(;(w=M.exec(e))!==null;)T.push(w[1])}else T.push(e);te({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:a,onInit:o,observed:T.concat(i),onAttributeChange:l,onAttrChange:s,effects:f,declared:q,persist:tt}),ae();const nt=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ue=r.subtreeQuery||(nt?e:"["+e+"]"),fe={selector:e,attribute:t,ComponentFn:a,onInit:o,onSubtreeChange:d,query:ue};D().push(fe),d&&ue&&E().push(fe),le(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=re,window.lnCore.observeLifecycle=Me,window.lnCore.withoutLifecycle=qe);function we(){Y()>0?Z(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",we):we(),A}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,a={},n=ie(t);if(!n)return a;const r=n.split("&");for(let i=0;i<r.length;i++){const l=r[i];if(!l)continue;const d=l.indexOf(":"),o=d>-1?l.slice(0,d):l,s=d>-1?l.slice(d+1):"";if(o)try{a[o]=decodeURIComponent(s)}catch{a[o]=s}}return a}function Ne(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const a=I();t==null?delete a[e]:a[e]=String(t);const r=Object.keys(a).map(function(i){const l=a[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");ie(location.hash)!==r&&(location.hash=r)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function je(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const a=e.getAttribute("data-ln-hash");if(a&&a.trim()!=="")return a.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 Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function We(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 Ue(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const a=e.slice(0,t),n=e.slice(t+1),r=n?n.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:a,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Ne,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=je,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=Ue,window.lnCore.hashFilterDecode=Ve);function He(){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=He);const O=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function ze(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const a=[];for(let n=0;n<=t.length;n++)a[n]=[n];for(let n=0;n<=e.length;n++)a[0][n]=n;for(let n=1;n<=t.length;n++)for(let r=1;r<=e.length;r++)t.charAt(n-1)===e.charAt(r-1)?a[n][r]=a[n-1][r-1]:a[n][r]=Math.min(a[n-1][r-1]+1,a[n][r-1]+1,a[n-1][r]+1);return a[t.length][e.length]}function Ge(e,t=O){if(t.has(e))return null;let a=null,n=1/0;for(const i of t){const l=ze(e,i);l<n&&(n=l,a=i)}const r=Math.max(3,Math.floor(e.length*.4));return n<=r?a:null}function de(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Qe(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const o=l.attributes[d];if(o.name.startsWith("data-ln-")&&o.name.endsWith("-for")){const s=(o.value||"").trim();if(!s){n.push({type:"id-empty",element:l,attribute:o.name,targetId:"",message:`[ln-debug] Empty ID reference in <${l.tagName.toLowerCase()} ${o.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+de(s))||n.push({type:"id-unresolved",element:l,attribute:o.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${l.tagName.toLowerCase()} ${o.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return n}function Je(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const o=l.attributes[d];if(o.name.startsWith("data-ln-")&&(o.name.endsWith("-source")||o.name.endsWith("-store"))&&o.name!=="data-ln-data-store"){const c=(o.value||"").trim();if(!c){n.push({type:"store-empty",element:l,attribute:o.name,storeName:"",message:`[ln-debug] Empty store reference in <${l.tagName.toLowerCase()} ${o.name}="">.`});continue}const u=de(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),q=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!q&&n.push({type:"store-unresolved",element:l,attribute:o.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${l.tagName.toLowerCase()} ${o.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return n}function Ke(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const a=[],n=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&n.unshift(t);const r=new Map;for(let i=0;i<n.length;i++){const l=n[i],d=(l.getAttribute("data-ln-data-store")||"").trim();d&&(r.has(d)||r.set(d,[]),r.get(d).push(l))}for(const[i,l]of r.entries())l.length>1&&a.push({type:"store-duplicate",storeName:i,elements:l,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return a}function Pe(e=document,t=O){const a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const o=l.attributes[d];if(o.name.startsWith("data-ln-")&&!t.has(o.name)){const s=Ge(o.name,t),c=s?` Did you mean "${s}"?`:"";n.push({type:"attribute-unknown",element:l,attribute:o.name,suggestion:s,message:`[ln-debug] Unknown attribute "${o.name}" on <${l.tagName.toLowerCase()}>.${c}`})}}}return n}function v(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const a=t.validAttributes||O,n=Qe(e),r=Je(e),i=Ke(e),l=Pe(e,a),d=[...n,...r,...i,...l];if(!t.silent)for(let o=0;o<d.length;o++)console.warn(d[o].message);return{idIssues:n,storeIssues:r,uniquenessIssues:i,spellingIssues:l,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,a=null){if(!e)return;m&&(clearTimeout(m),m=null);function n(){m=setTimeout(()=>{m=null;const r=v(e);a&&a(r)},t)}Y()>0?Z(n):n()}function Xe(e,t,a,n){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",a),console.log("detail",n),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",a),console.log("old → new",n.oldValue,"→",n.newValue),console.groupEnd())}let p=[];function Ye(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function se(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ze(e,t,a,n){se(a)&&Xe(e,t,a,n)}function L(){Ye(),pe(p.length>0?Ze:null,p.length>0?se:null)}function ce(){L()}function et(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){L(),Te(["data-ln-debug"],L)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const a={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};et();function n(i){return this.dom=i,g(i.ownerDocument||document),ce(),this}n.prototype.verify=function(i,l){return v(i||(this.dom?this.dom.ownerDocument||this.dom:document),l)},n.prototype.destroy=function(){delete this.dom[t],ce()};const r=re(e,t,n,"ln-debug",{attributes:a,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});r.verify=function(i,l){return v(i||document,l)},r.schedule=function(i,l,d){return g(i||document,l,d)}})(),C.scheduleVerification=g,C.verifyDOM=v,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
@@ -1 +1 @@
1
- (function(){"use strict";function $(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 s=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){s=t[l];break}if(!x(s))return}e.apply(console,t)}}function S(e,t,r){const s=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail: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 ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const r=!!(t&&t.typed),s=t&&t.exclude,l={},c=e.elements,o={};if(r)for(let i=0;i<c.length;i++){const n=c[i];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let i=0;i<c.length;i++){const n=c[i];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const r=e.elements,s=[],l={};for(let c=0;c<r.length;c++){const o=r[c];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let c=0;c<r.length;c++){const o=r[c];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const i=o.getAttribute("data-ln-fill-as")||o.name;if(!i||!(i in t))continue;const n=t[i];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(n).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=le(n);s.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),s.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<o.options.length;u++)o.options[u].selected=n.indexOf(o.options[u].value)!==-1;s.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),s.push(o)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=se,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ie);const N={};function ce(e,t){N[e]=t}function ue(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,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 ae(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];j[r]=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=ae,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=de);const L={};function ge(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=L[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const i=r[o],n=i.getAttribute("data-ln-field");t[n]!=null&&(i.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<s.length;o++){const i=s[o],n=i.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&i.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const i=l[o],n=i.getAttribute("data-ln-show");n in t&&i.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let o=0;o<c.length;o++){const i=c[o],n=i.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&i.classList.toggle(a,!!t[f])}}return e}function pe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<r.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[s],t??null),r[s].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)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function W(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const s=function(c,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let c=0;c<l.length;c++){const o=l[c],i=o.attributes;for(let n=0;n<i.length;n++){const u=i[n];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function he(e,t,r,s,l,c){const o={};for(let n=0;n<e.children.length;n++){const u=e.children[n],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const i=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],d=String(s(u));let a=o[d];if(a)l(a,u,n);else{const f=ge(r,c);if(!f||(W(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,n)}i.appendChild(a)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=z,window.lnCore.lnFill=pe,window.lnCore.renderList=he);function R(e,t,r){const s=e.getAttribute(t);return s===null?r:s}function P(e,t,r){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?r:s}function U(e,t,r=!1){const s=e.getAttribute(t);if(s===null)return!!r;const l=s.trim().toLowerCase();return!(l==="false"||l==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function V(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const s=new Set(e||[]),l=function(c,o){const i=c.getAttribute(o);return i!==null&&s.has(i)?i:t};return O.set(r,l),l}function K(e,t,r){const s=parseFloat(e.getAttribute(t));return isNaN(s)?r:s}function Q(e,t,r){const s=e.getAttribute(t);if(!s)return r;try{return JSON.parse(s)}catch{return r}}function J(e,t,r,s,l){if(!e||t===null)return!0;const c=s||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(i(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(i(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(i(`[${c}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(i(`[${c}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return i(`[${c}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function G(e,t,r){for(const s in r){const[l,c,o]=r[s];Object.defineProperty(e,s,{get:function(){return l(t,c,o)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const r in e){const s=e[r];if(!s||!s.prop)continue;let l=s.read;if(!l&&s.type)switch(s.type){case"enum":l=V(s.values,s.fallback);break;case"integer":l=P;break;case"float":l=K;break;case"boolean":l=U;break;case"list":l=H;break;case"json":l=Q;break;case"string":default:l=R;break}l||(l=R),t[s.prop]=[l,r,s.fallback]}return t}function we(e){const t={};for(const r in e){const s=e[r];s&&s.effect&&(t[r]=s.effect)}return Object.keys(t).length?t:null}function be(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=G,window.lnCore.attrSpec=X,window.lnCore.attrStr=R,window.lnCore.attrInt=P,window.lnCore.attrBool=U,window.lnCore.attrList=H,window.lnCore.attrEnum=V,window.lnCore.attrFloat=K,window.lnCore.attrJson=Q);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Y(e,t,r,s){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:s};if(e.matches&&e.matches(c)&&v(e,o),e.querySelectorAll){const i=e.querySelectorAll(c);for(let n=0;n<i.length;n++)v(i[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function me(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ce(e){const t=Z(),r=e.observed||[];for(let s=0;s<r.length;s++){const l=r[s];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 s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const l=t.byDeclaredAttr.get(s);l.some(c=>c.componentTag===e.componentTag)||l.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=be(e);if(s===null)t.reactiveWildcard.push(e);else for(const l of s)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,r,s){for(let l=0;l<e.length;l++){const c=e[l];if(!t[c.attribute])continue;const o=c.effects&&c.effects[r];o?o(t,r,s):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,s)}}function _e(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,s=Z(),l=s.byAttr.get(t),c=$()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!r&&!l&&!c)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(c&&x(o)){const i=s.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let u=0;u<i.length;u++)J(i[u].spec,n,t,i[u].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const i=s.byReactive.get(t);i&&ee(i,o,t,e.oldValue),s.reactiveWildcard.length&&ee(s.reactiveWildcard,o,t,e.oldValue)}if(l)for(let i=0;i<l.length;i++){const n=l[i];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(Y(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{_e(t[r])}catch(s){console.error("[ln-core] mutation handler failed",t[r].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Ae(e){const t=D();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const s=T();if(e.target&&s.length)for(let l=0;l<s.length;l++){const c=s[l],o=c.query,i=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;i&&c.onSubtreeChange(i,e)}for(let l=0;l<e.addedNodes.length;l++){const c=e.addedNodes[l];if(c.nodeType===1){const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i];if(n.selector&&n.attribute&&n.ComponentFn){if(!o)c.matches&&c.matches(n.query)&&v(c,n);else if(c.matches&&c.matches(n.query)&&v(c,n),c.querySelectorAll){const u=c.querySelectorAll(n.query);for(let d=0;d<u.length;d++)v(u[d],n)}}n.onInit&&n.onInit(c)}}}for(let l=0;l<e.removedNodes.length;l++){const c=e.removedNodes[l];if(c.nodeType===1){const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i],u=n.query;if(u){if(!o)c.matches&&c.matches(u)&&q(c,n);else if(c.matches&&c.matches(u)&&q(c,n),c.querySelectorAll){const d=c.querySelectorAll(u);for(let a=0;a<d.length;a++)q(d[a],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const s=t[r];if(s.type==="childList")try{Ae(s)}catch(l){console.error("[ln-core] lifecycle handler failed",s.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){D().push(e),e.onSubtreeChange&&e.query&&T().push(e),te()}function ne(e,t,r,s,l={}){const c=l.extraAttributes||[],o=l.onAttributeChange||null,i=l.onSubtreeChange||null,n=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?we(a):d,A=a?new Set(Object.keys(a)):null,_=l.persist||null;function C(w){const p=w||document.body;if(Y(p,e,t,r),a&&$())for(const E in a){const Fe=a[E],B=Array.from(p.querySelectorAll("["+E+"]"));p.matches&&p.matches("["+E+"]")&&B.push(p);for(let F=0;F<B.length;F++){const M=B[F];x(M)&&J(Fe,M.getAttribute(E),E,s,M)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)b.push(p[1])}else b.push(e);Ce({selector:e,attribute:t,componentTag:s,attributes:a,ComponentFn:r,onInit:n,observed:b.concat(c),onAttributeChange:o,onAttrChange:u,effects:f,declared:A,persist:_}),ve();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,m=l.subtreeQuery||(y?e:"["+e+"]"),g={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:i,query:m};D().push(g),i&&m&&T().push(g),te(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ne,window.lnCore.observeLifecycle=Ee);function h(){me()>0?ye(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),C}function oe(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,r={},s=oe(t);if(!s)return r;const l=s.split("&");for(let c=0;c<l.length;c++){const o=l[c];if(!o)continue;const i=o.indexOf(":"),n=i>-1?o.slice(0,i):o,u=i>-1?o.slice(i+1):"";if(n)try{r[n]=decodeURIComponent(u)}catch{r[n]=u}}return r}function ke(e){if(!e)return null;const t=I();return e in t?t[e]:null}function xe(e,t){if(!e)return;const r=I();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(c){const o=r[c];return o===""?c:c+":"+encodeURIComponent(o)}).join("&");oe(location.hash)!==l&&(location.hash=l)}function Se(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function Re(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Te(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),s=e.slice(t+1),l=s?s.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=ke,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=Se,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Re,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Te);function qe(e,t,r,s){const l=typeof s=="number"?s:4,c=window.innerWidth,o=window.innerHeight,i=t.width,n=t.height,u=r.split("-"),d=u[0],a=u[1]==="start"||u[1]==="end"?u[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[d]||f.bottom;function _(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-i:e.left+(e.width-i)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(g){let h,w,p=!0;return g==="top"?(h=e.top-l-n,w=_(g),h<0&&(p=!1)):g==="bottom"?(h=e.bottom+l,w=_(g),h+n>o&&(p=!1)):g==="left"?(h=_(g),w=e.left-l-i,w<0&&(p=!1)):(h=_(g),w=e.right+l,w+i>c&&(p=!1)),{top:h,left:w,side:g,fits:p}}let b=null;for(let g=0;g<A.length;g++){const h=C(A[g]);if(h.fits){b=h;break}}b||(b=C(A[0]));let y=b.top,m=b.left;return i>=c?m=0:(m<0&&(m=0),m+i>c&&(m=c-i)),n>=o?y=0:(y<0&&(y=0),y+n>o&&(y=o-n)),{top:y,left:m,placement:b.side}}function Ie(e){if(!e)return{width:0,height:0};const t=e.style,r=t.visibility,s=t.display,l=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const c=e.offsetWidth,o=e.offsetHeight;return t.visibility=r,t.display=s,t.position=l,{width:c,height:o}}function Be(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Be),(function(){const e="data-ln-dropdown",t="lnDropdown",r="bottom-end";if(window[t]!==void 0)return;const s={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"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:r,description:"Preferred positioning anchor"},"data-ln-dropdown-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"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},l=X(s);function c(o){this.dom=o,G(this,o,l),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const i=this;return this._onRequestOpen=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(i.toggleEl){const n=i.toggleEl.getAttribute("data-ln-toggle");i.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const u=i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){u&&(n.preventDefault(),n.stopPropagation(),i.toggleEl.setAttribute("data-ln-toggle","close"),i.triggerBtn&&i.triggerBtn.focus());return}if(n.key==="Tab"){u&&(i.triggerBtn&&i.triggerBtn.focus(),i.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=i._getMenuItems();if(d.length===0)return;if(!u&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),i.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=i._getMenuItems();f.length>0&&i._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!u)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;i._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;i._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),i._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),i._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","true"),typeof i.toggleEl.showPopover=="function"&&i.toggleEl.showPopover(),i._initMenuAria(),i._reposition(),i._addOutsideClickListener(),i._addScrollRepositionListener(),i._addResizeCloseListener(),S(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","false"),i._removeOutsideClickListener(),i._removeScrollRepositionListener(),i._removeResizeCloseListener(),i.toggleEl.style.top="",i.toggleEl.style.left="",i.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof i.toggleEl.hidePopover=="function"&&i.toggleEl.matches(":popover-open")&&i.toggleEl.hidePopover(),S(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}c.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const i=this._getMenuItems();for(let n=0;n<i.length;n++)i[n].setAttribute("role","menuitem"),i[n].setAttribute("tabindex",n===0?"0":"-1")},c.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},c.prototype._focusItem=function(o,i){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===i?"0":"-1");o[i]&&o[i].focus()},c.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl||!document.contains(this.toggleEl))return;const o=this.triggerBtn.getBoundingClientRect(),i=Ie(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,u=this.position||r,d=qe(o,i,u,n),a=d.top+"px",f=d.left+"px";this.toggleEl.style.top!==a&&(this.toggleEl.style.top=a),this.toggleEl.style.left!==f&&(this.toggleEl.style.left=f),this.toggleEl.getAttribute("data-ln-dropdown-placement")!==d.placement&&this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},c.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(i){o.dom.contains(i.target)||o.toggleEl&&o.toggleEl.contains(i.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},c.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},c.prototype._addScrollRepositionListener=function(){const o=this;this._scrollRepositionRaf=null,this._boundScrollReposition=function(){o._scrollRepositionRaf||(o._scrollRepositionRaf=requestAnimationFrame(function(){o._scrollRepositionRaf=null,o._reposition()}))},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},c.prototype._removeScrollRepositionListener=function(){this._scrollRepositionRaf&&(cancelAnimationFrame(this._scrollRepositionRaf),this._scrollRepositionRaf=null),this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},c.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},c.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},c.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},ne(e,t,c,"ln-dropdown",{attributes:s})})()})();
1
+ (function(){"use strict";function $(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 s=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){s=t[l];break}if(!x(s))return}e.apply(console,t)}}function S(e,t,r){const s=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail: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 re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const r=!!(t&&t.typed),s=t&&t.exclude,l={},c=e.elements,o={};if(r)for(let i=0;i<c.length;i++){const n=c[i];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let i=0;i<c.length;i++){const n=c[i];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const r=e.elements,s=[],l={};for(let c=0;c<r.length;c++){const o=r[c];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let c=0;c<r.length;c++){const o=r[c];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const i=o.getAttribute("data-ln-fill-as")||o.name;if(!i||!(i in t))continue;const n=t[i];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(n).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=se(n);s.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),s.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<o.options.length;u++)o.options[u].selected=n.indexOf(o.options[u].value)!==-1;s.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),s.push(o)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=re);const N={};function ue(e,t){N[e]=t}function de(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=de);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 fe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];j[r]=t}function ge(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=fe,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=ae);const L={};function pe(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=L[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const i=r[o],n=i.getAttribute("data-ln-field");t[n]!=null&&(i.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<s.length;o++){const i=s[o],n=i.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&i.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const i=l[o],n=i.getAttribute("data-ln-show");n in t&&i.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let o=0;o<c.length;o++){const i=c[o],n=i.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&i.classList.toggle(a,!!t[f])}}return e}function he(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<r.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[s],t??null),r[s].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)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function W(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const s=function(c,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let c=0;c<l.length;c++){const o=l[c],i=o.attributes;for(let n=0;n<i.length;n++){const u=i[n];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function we(e,t,r,s,l,c){const o={};for(let n=0;n<e.children.length;n++){const u=e.children[n],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const i=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],d=String(s(u));let a=o[d];if(a)l(a,u,n);else{const f=pe(r,c);if(!f||(W(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,n)}i.appendChild(a)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=z,window.lnCore.lnFill=he,window.lnCore.renderList=we);function R(e,t,r){const s=e.getAttribute(t);return s===null?r:s}function P(e,t,r){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?r:s}function U(e,t,r=!1){const s=e.getAttribute(t);if(s===null)return!!r;const l=s.trim().toLowerCase();return!(l==="false"||l==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function V(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const s=new Set(e||[]),l=function(c,o){const i=c.getAttribute(o);return i!==null&&s.has(i)?i:t};return O.set(r,l),l}function K(e,t,r){const s=parseFloat(e.getAttribute(t));return isNaN(s)?r:s}function Q(e,t,r){const s=e.getAttribute(t);if(!s)return r;try{return JSON.parse(s)}catch{return r}}function J(e,t,r,s,l){if(!e||t===null)return!0;const c=s||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(i(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(i(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(i(`[${c}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(i(`[${c}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return i(`[${c}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function G(e,t,r){for(const s in r){const[l,c,o]=r[s];Object.defineProperty(e,s,{get:function(){return l(t,c,o)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const r in e){const s=e[r];if(!s||!s.prop)continue;let l=s.read;if(!l&&s.type)switch(s.type){case"enum":l=V(s.values,s.fallback);break;case"integer":l=P;break;case"float":l=K;break;case"boolean":l=U;break;case"list":l=H;break;case"json":l=Q;break;case"string":default:l=R;break}l||(l=R),t[s.prop]=[l,r,s.fallback]}return t}function be(e){const t={};for(const r in e){const s=e[r];s&&s.effect&&(t[r]=s.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=G,window.lnCore.attrSpec=X,window.lnCore.attrStr=R,window.lnCore.attrInt=P,window.lnCore.attrBool=U,window.lnCore.attrList=H,window.lnCore.attrEnum=V,window.lnCore.attrFloat=K,window.lnCore.attrJson=Q);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Y(e,t,r,s){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:s};if(e.matches&&e.matches(c)&&v(e,o),e.querySelectorAll){const i=e.querySelectorAll(c);for(let n=0;n<i.length;n++)v(i[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function _e(e){const t=Z(),r=e.observed||[];for(let s=0;s<r.length;s++){const l=r[s];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 s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const l=t.byDeclaredAttr.get(s);l.some(c=>c.componentTag===e.componentTag)||l.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=me(e);if(s===null)t.reactiveWildcard.push(e);else for(const l of s)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,r,s){for(let l=0;l<e.length;l++){const c=e[l];if(!t[c.attribute])continue;const o=c.effects&&c.effects[r];o?o(t,r,s):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,s)}}function ve(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,s=Z(),l=s.byAttr.get(t),c=$()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!r&&!l&&!c)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(c&&x(o)){const i=s.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let u=0;u<i.length;u++)J(i[u].spec,n,t,i[u].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const i=s.byReactive.get(t);i&&ee(i,o,t,e.oldValue),s.reactiveWildcard.length&&ee(s.reactiveWildcard,o,t,e.oldValue)}if(l)for(let i=0;i<l.length;i++){const n=l[i];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(Y(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ve(t[r])}catch(s){console.error("[ln-core] mutation handler failed",t[r].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function te(e){const t=D();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const s=T();if(e.target&&s.length)for(let l=0;l<s.length;l++){const c=s[l],o=c.query,i=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;i&&c.onSubtreeChange(i,e)}for(let l=0;l<e.addedNodes.length;l++){const c=e.addedNodes[l];if(c.nodeType===1){const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i];if(n.selector&&n.attribute&&n.ComponentFn){if(!o)c.matches&&c.matches(n.query)&&v(c,n);else if(c.matches&&c.matches(n.query)&&v(c,n),c.querySelectorAll){const u=c.querySelectorAll(n.query);for(let d=0;d<u.length;d++)v(u[d],n)}}n.onInit&&n.onInit(c)}}}for(let l=0;l<e.removedNodes.length;l++){const c=e.removedNodes[l];if(c.nodeType===1){if(document.contains(c))continue;const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i],u=n.query;if(u){if(!o)c.matches&&c.matches(u)&&q(c,n);else if(c.matches&&c.matches(u)&&q(c,n),c.querySelectorAll){const d=c.querySelectorAll(u);for(let a=0;a<d.length;a++)q(d[a],n)}}}}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const s=t[r];if(s.type==="childList")try{te(s)}catch(l){console.error("[ln-core] lifecycle handler failed",s.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let s=0;s<r.length;s++){const l=r[s];if(l.type==="childList")try{te(l)}catch(c){console.error("[ln-core] lifecycle handler failed",l.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function ke(e){D().push(e),e.onSubtreeChange&&e.query&&T().push(e),ne()}function oe(e,t,r,s,l={}){const c=l.extraAttributes||[],o=l.onAttributeChange||null,i=l.onSubtreeChange||null,n=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?be(a):d,A=a?new Set(Object.keys(a)):null,_=l.persist||null;function C(w){const p=w||document.body;if(Y(p,e,t,r),a&&$())for(const E in a){const Me=a[E],B=Array.from(p.querySelectorAll("["+E+"]"));p.matches&&p.matches("["+E+"]")&&B.push(p);for(let F=0;F<B.length;F++){const M=B[F];x(M)&&J(Me,M.getAttribute(E),E,s,M)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)b.push(p[1])}else b.push(e);_e({selector:e,attribute:t,componentTag:s,attributes:a,ComponentFn:r,onInit:n,observed:b.concat(c),onAttributeChange:o,onAttrChange:u,effects:f,declared:A,persist:_}),Ae();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,m=l.subtreeQuery||(y?e:"["+e+"]"),g={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:i,query:m};D().push(g),i&&m&&T().push(g),ne(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=ke,window.lnCore.withoutLifecycle=Ee);function h(){ye()>0?Ce(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),C}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,r={},s=ie(t);if(!s)return r;const l=s.split("&");for(let c=0;c<l.length;c++){const o=l[c];if(!o)continue;const i=o.indexOf(":"),n=i>-1?o.slice(0,i):o,u=i>-1?o.slice(i+1):"";if(n)try{r[n]=decodeURIComponent(u)}catch{r[n]=u}}return r}function xe(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=I();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(c){const o=r[c];return o===""?c:c+":"+encodeURIComponent(o)}).join("&");ie(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Te(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),s=e.slice(t+1),l=s?s.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Te,window.lnCore.hashFilterDecode=qe);function Ie(e,t,r,s){const l=typeof s=="number"?s:4,c=window.innerWidth,o=window.innerHeight,i=t.width,n=t.height,u=r.split("-"),d=u[0],a=u[1]==="start"||u[1]==="end"?u[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[d]||f.bottom;function _(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-i:e.left+(e.width-i)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(g){let h,w,p=!0;return g==="top"?(h=e.top-l-n,w=_(g),h<0&&(p=!1)):g==="bottom"?(h=e.bottom+l,w=_(g),h+n>o&&(p=!1)):g==="left"?(h=_(g),w=e.left-l-i,w<0&&(p=!1)):(h=_(g),w=e.right+l,w+i>c&&(p=!1)),{top:h,left:w,side:g,fits:p}}let b=null;for(let g=0;g<A.length;g++){const h=C(A[g]);if(h.fits){b=h;break}}b||(b=C(A[0]));let y=b.top,m=b.left;return i>=c?m=0:(m<0&&(m=0),m+i>c&&(m=c-i)),n>=o?y=0:(y<0&&(y=0),y+n>o&&(y=o-n)),{top:y,left:m,placement:b.side}}function Be(e){if(!e)return{width:0,height:0};const t=e.style,r=t.visibility,s=t.display,l=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const c=e.offsetWidth,o=e.offsetHeight;return t.visibility=r,t.display=s,t.position=l,{width:c,height:o}}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-dropdown",t="lnDropdown",r="bottom-end";if(window[t]!==void 0)return;const s={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"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:r,description:"Preferred positioning anchor"},"data-ln-dropdown-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"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},l=X(s);function c(o){this.dom=o,G(this,o,l),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const i=this;return this._onRequestOpen=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(i.toggleEl){const n=i.toggleEl.getAttribute("data-ln-toggle");i.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const u=i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){u&&(n.preventDefault(),n.stopPropagation(),i.toggleEl.setAttribute("data-ln-toggle","close"),i.triggerBtn&&i.triggerBtn.focus());return}if(n.key==="Tab"){u&&(i.triggerBtn&&i.triggerBtn.focus(),i.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=i._getMenuItems();if(d.length===0)return;if(!u&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),i.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=i._getMenuItems();f.length>0&&i._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!u)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;i._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;i._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),i._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),i._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","true"),typeof i.toggleEl.showPopover=="function"&&i.toggleEl.showPopover(),i._initMenuAria(),i._reposition(),i._addOutsideClickListener(),i._addScrollRepositionListener(),i._addResizeCloseListener(),S(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","false"),i._removeOutsideClickListener(),i._removeScrollRepositionListener(),i._removeResizeCloseListener(),i.toggleEl.style.top="",i.toggleEl.style.left="",i.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof i.toggleEl.hidePopover=="function"&&i.toggleEl.matches(":popover-open")&&i.toggleEl.hidePopover(),S(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}c.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const i=this._getMenuItems();for(let n=0;n<i.length;n++)i[n].setAttribute("role","menuitem"),i[n].setAttribute("tabindex",n===0?"0":"-1")},c.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},c.prototype._focusItem=function(o,i){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===i?"0":"-1");o[i]&&o[i].focus()},c.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl||!document.contains(this.toggleEl))return;const o=this.triggerBtn.getBoundingClientRect(),i=Be(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,u=this.position||r,d=Ie(o,i,u,n),a=d.top+"px",f=d.left+"px";this.toggleEl.style.top!==a&&(this.toggleEl.style.top=a),this.toggleEl.style.left!==f&&(this.toggleEl.style.left=f),this.toggleEl.getAttribute("data-ln-dropdown-placement")!==d.placement&&this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},c.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(i){o.dom.contains(i.target)||o.toggleEl&&o.toggleEl.contains(i.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},c.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},c.prototype._addScrollRepositionListener=function(){const o=this;this._scrollRepositionRaf=null,this._boundScrollReposition=function(){o._scrollRepositionRaf||(o._scrollRepositionRaf=requestAnimationFrame(function(){o._scrollRepositionRaf=null,o._reposition()}))},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},c.prototype._removeScrollRepositionListener=function(){this._scrollRepositionRaf&&(cancelAnimationFrame(this._scrollRepositionRaf),this._scrollRepositionRaf=null),this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},c.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},c.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},c.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},oe(e,t,c,"ln-dropdown",{attributes:s})})()})();