@livenetworks/ashlar 2.0.8 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-connector/ln-api-connector.schema.json +105 -96
  5. package/components/ln-api-connector/src/ln-api-connector.js +1 -0
  6. package/components/ln-api-queue/ln-api-queue.js +1 -1
  7. package/components/ln-autoresize/ln-autoresize.js +1 -1
  8. package/components/ln-autosave/ln-autosave.js +1 -1
  9. package/components/ln-chart/ln-chart.js +1 -1
  10. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  11. package/components/ln-confirm/ln-confirm.js +1 -1
  12. package/components/ln-core/attrs.js +13 -0
  13. package/components/ln-core/form.js +10 -0
  14. package/components/ln-core/lifecycle.js +6 -1
  15. package/components/ln-core/ln-core.schema.json +110 -109
  16. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  17. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  18. package/components/ln-data-coordinator/src/ln-data-coordinator.js +7 -3
  19. package/components/ln-data-store/ln-data-store.js +1 -1
  20. package/components/ln-date/ln-date.js +1 -1
  21. package/components/ln-debug/ln-debug.js +1 -1
  22. package/components/ln-debug/src/generated-attributes.js +3 -0
  23. package/components/ln-dropdown/ln-dropdown.js +1 -1
  24. package/components/ln-editor/ln-editor.js +1 -1
  25. package/components/ln-external-links/ln-external-links.js +1 -1
  26. package/components/ln-fill/ln-fill.js +1 -1
  27. package/components/ln-filter/ln-filter.js +1 -1
  28. package/components/ln-filter/ln-filter.schema.json +161 -153
  29. package/components/ln-filter/src/ln-filter.js +77 -5
  30. package/components/ln-form/ln-form.js +1 -1
  31. package/components/ln-form/ln-form.schema.json +51 -45
  32. package/components/ln-form/src/ln-form.js +21 -0
  33. package/components/ln-http/ln-http.js +1 -1
  34. package/components/ln-include/ln-include.js +1 -1
  35. package/components/ln-key/ln-key.js +1 -1
  36. package/components/ln-link/ln-link.js +1 -1
  37. package/components/ln-list/ln-list.js +1 -1
  38. package/components/ln-modal/ln-modal.js +1 -1
  39. package/components/ln-nav/ln-nav.js +1 -1
  40. package/components/ln-number/ln-number.js +1 -1
  41. package/components/ln-number/src/ln-number.js +26 -0
  42. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  43. package/components/ln-options/ln-options.js +1 -1
  44. package/components/ln-options/ln-options.schema.json +47 -41
  45. package/components/ln-options/src/ln-options.js +4 -4
  46. package/components/ln-persist/ln-persist.js +1 -1
  47. package/components/ln-picklist/ln-picklist.js +1 -1
  48. package/components/ln-popover/ln-popover.js +1 -1
  49. package/components/ln-progress/ln-progress.js +1 -1
  50. package/components/ln-router/ln-router.js +1 -1
  51. package/components/ln-scroll/ln-scroll.js +1 -1
  52. package/components/ln-search/ln-search.js +1 -1
  53. package/components/ln-search/src/ln-search.js +17 -1
  54. package/components/ln-slug/ln-slug.js +1 -1
  55. package/components/ln-slug/src/ln-slug.js +25 -1
  56. package/components/ln-sort/ln-sort.js +1 -1
  57. package/components/ln-sortable/ln-sortable.js +1 -1
  58. package/components/ln-stat/ln-stat.js +1 -1
  59. package/components/ln-table/ln-table.js +1 -1
  60. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  61. package/components/ln-tabs/ln-tabs.js +1 -1
  62. package/components/ln-time/ln-time.js +1 -1
  63. package/components/ln-toast/ln-toast.js +1 -1
  64. package/components/ln-toggle/ln-toggle.js +1 -1
  65. package/components/ln-tooltip/ln-tooltip.js +1 -1
  66. package/components/ln-translations/ln-translations.js +1 -1
  67. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  68. package/components/ln-upload/ln-upload.js +1 -1
  69. package/components/ln-validate/ln-validate.js +1 -1
  70. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  71. package/ln-ashlar.html-data.json +13 -0
  72. package/package.json +2 -1
  73. package/web-types.json +22 -1
@@ -1 +1 @@
1
- (function(){"use strict";function ce(){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 ne(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 n=e.closest("[data-ln-debug]");return!(!n||typeof document<"u"&&n===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(...n){if(typeof n[0]=="string"&&(n[0].startsWith("[ln-")||n[0].startsWith("[lnCore"))){let i=null;for(let a=1;a<n.length;a++)if(n[a]&&n[a].nodeType===1){i=n[a];break}if(!ne(i))return}e.apply(console,n)}}function A(e,n,o){const i=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",n,e,i),e.dispatchEvent(new CustomEvent(n,{bubbles:!0,detail:i}))}function Q(e,n){if(!document.body){document.addEventListener("DOMContentLoaded",function(){Q(e,n)}),console.warn("["+n+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const ue={};function Le(e,n){ue[e]=n}function ze(e){return ue[e]||{ingress:n=>n,egress:n=>n}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Le,window.lnCore.getDataMapper=ze);function Re(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,Q(function(){new MutationObserver(function(){A(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const de={};function Oe(e,n){if(!e||typeof n!="object")return;const o=e.toLowerCase().split("-")[0];de[o]=n}function Me(e){if(!e)return null;const n=e.toLowerCase().split("-")[0];return de[n]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Oe,window.lnCore.getLocaleFallback=Me,window.lnCore.ensureLocaleObserver=Re);const re={};function Be(e,n){re[e]||(re[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=re[e];return o?o.content.cloneNode(!0):(console.warn("["+(n||"ln-core")+'] Template "'+e+'" not found'),null)}function fe(e,n){if(!e||!n)return e;const o=e.querySelectorAll("[data-ln-field]");for(let c=0;c<o.length;c++){const f=o[c],h=f.getAttribute("data-ln-field");n[h]!=null&&(f.textContent=n[h])}const i=e.querySelectorAll("[data-ln-attr]");for(let c=0;c<i.length;c++){const f=i[c],h=f.getAttribute("data-ln-attr").split(",");for(let p=0;p<h.length;p++){const b=h[p].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();n[x]!=null&&f.setAttribute(_,n[x])}}const a=e.querySelectorAll("[data-ln-show]");for(let c=0;c<a.length;c++){const f=a[c],h=f.getAttribute("data-ln-show");h in n&&f.classList.toggle("hidden",!n[h])}const s=e.querySelectorAll("[data-ln-class]");for(let c=0;c<s.length;c++){const f=s[c],h=f.getAttribute("data-ln-class").split(",");for(let p=0;p<h.length;p++){const b=h[p].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();x in n&&f.classList.toggle(_,!!n[x])}}return e}function Pe(e,n){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,n??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:n??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<o.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[i],n??null),o[i].dispatchEvent(new CustomEvent("ln-fill",{detail:n??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)fe(e.target,e.detail);else{const n=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++)n[o].textContent=""}})));function he(e,n){if(!e||!n)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,f){return n[f]!==void 0?n[f]:""}))}const i=function(s,c){return n[c]!==void 0?n[c]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let s=0;s<a.length;s++){const c=a[s],f=c.attributes;for(let h=0;h<f.length;h++){const p=f[h];p.value.indexOf("{{")!==-1&&c.setAttribute(p.name,p.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function je(e,n,o,i,a,s){const c={};for(let h=0;h<e.children.length;h++){const p=e.children[h],b=p.getAttribute("data-ln-render-key");b&&(c[b]=p)}const f=document.createDocumentFragment();for(let h=0;h<n.length;h++){const p=n[h],b=String(i(p));let _=c[b];if(_)a(_,p,h);else{const x=Be(o,s);if(!x||(he(x,p),_=x.firstElementChild,!_))continue;_.setAttribute("data-ln-render-key",b),a(_,p,h)}f.appendChild(_)}e.textContent="",e.appendChild(f)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=he,window.lnCore.fill=fe,window.lnCore.lnFill=Pe,window.lnCore.renderList=je);function we(e,n,o){const i=e.getAttribute(n);return i===null?o:i}function oe(e,n,o){const i=parseInt(e.getAttribute(n),10);return isNaN(i)?o:i}function ye(e,n,o=!1){const i=e.getAttribute(n);if(i===null)return!!o;const a=i.trim().toLowerCase();return!(a==="false"||a==="0")}function pe(e,n){return(e.getAttribute(n)||"").split(",").map(o=>o.trim()).filter(Boolean)}const ie=new Map;function Fe(e,n){const o=(e?e.join("|"):"")+"::"+n;if(ie.has(o))return ie.get(o);const i=new Set(e||[]),a=function(s,c){const f=s.getAttribute(c);return f!==null&&i.has(f)?f:n};return ie.set(o,a),a}function $e(e,n,o){const i=parseFloat(e.getAttribute(n));return isNaN(i)?o:i}function Ke(e,n,o){const i=e.getAttribute(n);if(!i)return o;try{return JSON.parse(i)}catch{return o}}function ge(e,n,o,i,a){if(!e||n===null)return!0;const s=i||"ln-component",c=e.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||n===""&&e.fallback!==void 0)return!0;const f=h=>{a?console.warn(h,a):console.warn(h)};if(c==="boolean"){const h=n.trim().toLowerCase();return h!==""&&h!=="true"&&h!=="false"&&h!=="1"&&h!=="0"?(f(`[${s}] Invalid value "${n}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const h=e.values||[];return h.includes(n)?!0:(f(`[${s}] Invalid value "${n}" for attribute "${o}". Allowed: ${h.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(n))return f(`[${s}] Invalid integer "${n}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const h=parseInt(n,10);return e.min!==void 0&&h<e.min?(f(`[${s}] Value ${h} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&h>e.max?(f(`[${s}] Value ${h} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(c==="float")return isNaN(Number(n))?(f(`[${s}] Invalid float "${n}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(n),!0}catch(h){return f(`[${s}] Invalid JSON for attribute "${o}": ${h.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ue(e,n,o){for(const i in o){const[a,s,c]=o[i];Object.defineProperty(e,i,{get:function(){return a(n,s,c)},enumerable:!0,configurable:!0})}return e}function Ve(e){const n={};for(const o in e){const i=e[o];if(!i||!i.prop)continue;let a=i.read;if(!a&&i.type)switch(i.type){case"enum":a=Fe(i.values,i.fallback);break;case"integer":a=oe;break;case"float":a=$e;break;case"boolean":a=ye;break;case"list":a=pe;break;case"json":a=Ke;break;case"string":default:a=we;break}a||(a=we),n[i.prop]=[a,o,i.fallback]}return n}function Ge(e){const n={};for(const o in e){const i=e[o];i&&i.effect&&(n[o]=i.effect)}return Object.keys(n).length?n:null}function He(e){if(e.onAttrChange&&!e.declared)return null;const n=new Set;if(e.effects)for(const o in e.effects)n.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)n.add(o);return n}function ae(e,n,o,i){if(e.nodeType!==1)return;const s=n.indexOf("[")!==-1||n.indexOf(".")!==-1||n.indexOf("#")!==-1?n:"["+n+"]",c=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&c.push(e);for(const f of c)if(!f[o]){window.lnCore._persistSink&&f.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(f,n);try{f[o]=new i(f)}catch(h){console.error("["+o+"] init failed",f,h)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function We(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Qe(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 me(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Je(e){const n=me(),o=e.observed||[];for(let i=0;i<o.length;i++){const a=o[i];n.byAttr.has(a)||n.byAttr.set(a,[]),n.byAttr.get(a).push(e)}if(n.byDeclaredAttr=n.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){n.byDeclaredAttr.has(i)||n.byDeclaredAttr.set(i,[]);const a=n.byDeclaredAttr.get(i);a.some(s=>s.componentTag===e.componentTag)||a.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){n.reactive.push(e);const i=He(e);if(i===null)n.reactiveWildcard.push(e);else for(const a of i)n.byReactive.has(a)||n.byReactive.set(a,[]),n.byReactive.get(a).push(e)}e.persist&&n.persist.push(e)}function be(e,n,o,i){for(let a=0;a<e.length;a++){const s=e[a];if(!n[s.attribute])continue;const c=s.effects&&s.effects[o];c?c(n,o,i):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(n,o,i)}}function Ze(e){const n=e.target,o=e.attributeName;if(e.oldValue===n.getAttribute(o))return;const i=me(),a=i.byAttr.get(o);if(ce()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(o)&&ne(n)){const s=i.byDeclaredAttr.get(o),c=n.getAttribute(o);for(let f=0;f<s.length;f++)ge(s[f].spec,c,o,s[f].componentTag,n)}if(window.lnCore._debugSink&&(o.indexOf("data-ln-")===0||a)&&window.lnCore._debugSink("attr",o,n,{oldValue:e.oldValue,newValue:n.getAttribute(o)}),o.indexOf("data-ln-")===0){const s=i.byReactive.get(o);s&&be(s,n,o,e.oldValue),i.reactiveWildcard.length&&be(i.reactiveWildcard,n,o,e.oldValue)}if(a)for(let s=0;s<a.length;s++){const c=a[s];if(c.handler){c.handler(n,o,e.oldValue);continue}c.onAttributeChange&&n[c.attribute]?c.onAttributeChange(n,o):(ae(n,c.selector,c.attribute,c.ComponentFn),c.onInit&&c.onInit(n))}}function Xe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,Q(function(){new MutationObserver(function(n){for(let o=0;o<n.length;o++)try{Ze(n[o])}catch(i){console.error("[ln-core] mutation handler failed",n[o].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _e(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Ye(e){const n=_e();if(n.length){if(e.target)for(let o=0;o<n.length;o++){const i=n[o];if(i.onSubtreeChange){const a=i.query,s=e.target.nodeType===1?e.target.matches(a)?e.target:e.target.closest(a):e.target.parentElement?e.target.parentElement.closest(a):null;s&&i.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const i=e.addedNodes[o];if(i.nodeType===1)for(let a=0;a<n.length;a++){const s=n[a];ae(i,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(i)}}for(let o=0;o<e.removedNodes.length;o++){const i=e.removedNodes[o];if(i.nodeType===1)for(let a=0;a<n.length;a++){const s=n[a],c=s.query,f=Array.from(i.querySelectorAll(c));i.matches&&i.matches(c)&&f.push(i);for(let h=0;h<f.length;h++){const p=f[h];if(!document.contains(p)){const b=p[s.attribute];if(b&&typeof b.destroy=="function")try{b.destroy()}catch(_){console.error("["+s.attribute+"] destroy failed",p,_)}delete p[s.attribute]}}}}}}function et(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,Q(function(){new MutationObserver(function(n){for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{Ye(i)}catch(a){console.error("[ln-core] lifecycle handler failed",i.target,a)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function tt(e,n,o,i,a={}){const s=a.extraAttributes||[],c=a.onAttributeChange||null,f=a.onSubtreeChange||null,h=a.onInit||null,p=a.onAttrChange||null,b=a.effects||null,_=a.attributes||null,x=_?Ge(_):b,P=_?new Set(Object.keys(_)):null,j=a.persist||null;function g(k){const I=k||document.body;if(ae(I,e,n,o),_&&ce())for(const F in _){const J=_[F],G=Array.from(I.querySelectorAll("["+F+"]"));I.matches&&I.matches("["+F+"]")&&G.push(I);for(let K=0;K<G.length;K++){const B=G[K];ne(B)&&ge(J,B.getAttribute(F),F,i,B)}}h&&h(I)}const S=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let I;for(;(I=k.exec(e))!==null;)S.push(I[1])}else S.push(e);Je({selector:e,attribute:n,componentTag:i,attributes:_,ComponentFn:o,onInit:h,observed:S.concat(s),onAttributeChange:c,onAttrChange:p,effects:x,declared:P,persist:j}),Xe();const q=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";_e().push({selector:e,attribute:n,ComponentFn:o,onInit:h,onSubtreeChange:f,query:q}),et(),window[n]=g;function v(){We()>0?Qe(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",v):v(),g}function nt(e){let n=!1;for(let o=0;o<e.length;o++){const i=e[o];if(!(i===""||i==null)&&(n=!0,!Number.isFinite(Number(i))))return"string"}return n?"number":"string"}function rt(e,n,o,i){if(o==="number"){const c=parseFloat(e),f=parseFloat(n);return(isNaN(c)?0:c)-(isNaN(f)?0:f)}const a=e!=null?String(e):"",s=n!=null?String(n):"";return i?i.compare(a,s):a<s?-1:a>s?1:0}function Ce(e){return(e||"").replace(/^#/,"")}function se(e){const n=e===void 0?location.hash:e,o={},i=Ce(n);if(!i)return o;const a=i.split("&");for(let s=0;s<a.length;s++){const c=a[s];if(!c)continue;const f=c.indexOf(":"),h=f>-1?c.slice(0,f):c,p=f>-1?c.slice(f+1):"";if(h)try{o[h]=decodeURIComponent(p)}catch{o[h]=p}}return o}function ot(e){if(!e)return null;const n=se();return e in n?n[e]:null}function it(e,n){if(!e)return;const o=se();n==null?delete o[e]:o[e]=String(n);const a=Object.keys(o).map(function(s){const c=o[s];return c===""?s:s+":"+encodeURIComponent(c)}).join("&");Ce(location.hash)!==a&&(location.hash=a)}function at(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function st(e,n){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?n?i+"-"+n:i:n||null}function lt(e,n){return!n||n==="none"||e===null||e===void 0?null:String(e)+"."+n}function ct(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 ut(e,n){return!e||!Array.isArray(n)||n.length===0?null:e+":"+n.map(encodeURIComponent).join(",")}function dt(e){if(!e||typeof e!="string")return null;const n=e.indexOf(":");if(n===-1)return null;const o=e.slice(0,n),i=e.slice(n+1),a=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=se,window.lnCore.hashGet=ot,window.lnCore.hashSet=it,window.lnCore.hashLinkClick=at,window.lnCore.resolveHashNamespace=st,window.lnCore.hashSortEncode=lt,window.lnCore.hashSortDecode=ct,window.lnCore.hashFilterEncode=ut,window.lnCore.hashFilterDecode=dt);let V=null;const ft="ln-ashlar:storage-salt:v1",Se=32768;function Ae(e){let n="";const o=e.byteLength;for(let i=0;i<o;i+=Se)n+=String.fromCharCode.apply(null,e.subarray(i,Math.min(i+Se,o)));return btoa(n)}function ve(e){const n=atob(e),o=n.length,i=new Uint8Array(o);for(let a=0;a<o;a++)i[a]=n.charCodeAt(a);return i}function xe(e,n){let o=V,i={};return typeof CryptoKey<"u"&&e instanceof CryptoKey?o=e:e&&typeof e=="object"&&(i=e,typeof CryptoKey<"u"&&i.key instanceof CryptoKey&&(o=i.key)),{key:o,options:i}}async function ht(e,n={}){if(!e)throw new Error("[ln-crypto] Key derivation failed: Secret string is required");const o=n.method||"pbkdf2",i=new TextEncoder;if(o==="sha256"){const h=await crypto.subtle.digest("SHA-256",i.encode(e));return crypto.subtle.importKey("raw",h,{name:"AES-GCM"},!1,["encrypt","decrypt"])}const a=n.salt||ft,s=typeof a=="string"?i.encode(a):a,c=n.iterations||1e5,f=await crypto.subtle.importKey("raw",i.encode(e),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:s,iterations:c,hash:"SHA-256"},f,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function ke(e,n={}){if(!e){V=null;return}try{const o=n.method||"sha256";V=await ht(e,{...n,method:o})}catch(o){throw console.error("[ln-core/crypto] Key derivation failed:",o),V=null,o}}function M(){return V}async function wt(e,n,o){const{key:i}=xe(n);if(e==null)return e;if(!i)throw new Error("[ln-crypto] Encryption failed: No active cryptographic key provided");try{const a=new TextEncoder,s=crypto.getRandomValues(new Uint8Array(12)),c=typeof e=="string"?e:JSON.stringify(e),f=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,a.encode(c));return{v:1,alg:"AES-GCM",encrypted:!0,iv:Ae(s),data:Ae(new Uint8Array(f))}}catch(a){throw console.error("[ln-core/crypto] Encryption failed:",a),new Error("[ln-crypto] Encryption failed: "+(a&&a.message?a.message:String(a)))}}async function yt(e,n,o){const{key:i,options:a}=xe(n),s=a.silent===!0;if(!e||!e.encrypted)return e;if(!i){if(s)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: No active cryptographic key provided")}if(!e.iv||!e.data){if(s)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: Malformed envelope (missing iv or data)")}try{const c=new TextDecoder,f=ve(e.iv),h=ve(e.data),p=await crypto.subtle.decrypt({name:"AES-GCM",iv:f},i,h),b=c.decode(p);try{return JSON.parse(b)}catch{return b}}catch(c){if(s)return{...e,decryptionError:!0};throw console.error("[ln-core/crypto] Decryption failed. Key may be incorrect or payload tampered:",c),new Error("[ln-crypto] Decryption failed. Key may be incorrect or payload tampered: "+(c&&c.message?c.message:String(c)))}}function pt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=pt);function gt(e){return String(e||"").trim().toLowerCase()}function mt(e){const n=gt(e);return n?n.split(/\s+/).filter(Boolean):[]}function bt(e,n){if(!n||n.length===0)return!0;if(!e)return!1;const o=String(e).toLowerCase();for(let i=0;i<n.length;i++)if(o.indexOf(n[i])===-1)return!1;return!0}function _t(e,n){if(!n||n.length===0)return!0;if(e==null)return!1;const o=String(e).trim().toLowerCase();for(let i=0;i<n.length;i++)if(String(n[i]).trim().toLowerCase()===o)return!0;return!1}function Ct(e={}){let n=e.windowSize>0?e.windowSize:1e3,o=e.pageSize>0?e.pageSize:200,i=e.fetchDebounce!=null?e.fetchDebounce:120;const a=typeof e.requestPage=="function"?e.requestPage:()=>{},s=new Map,c=new Set;let f=0,h=0,p=0,b=!1,_=null;function x(g,S){s.delete(g),s.set(g,S)}function P(){if(s.size<=n)return[];const g=[];for(;s.size>n;){const D=s.keys().next().value;g.push(s.get(D)),s.delete(D)}const S=new Set(s.values());return g.filter(D=>!S.has(D))}function j(g,S){c.add(g),clearTimeout(_),_=setTimeout(()=>a(g,o,S),i)}return{get logicalTotal(){return f},set logicalTotal(g){f=g},get grandTotal(){return h},set grandTotal(g){h=g},get queryGen(){return p},set queryGen(g){p=g},get size(){return s.size},get hasLoaded(){return b},getId:g=>{if(!s.has(g))return;const S=s.get(g);return x(g,S),S},ensure:(g,S,D)=>{if(!b&&!c.has(0))return j(0,D);if(f<=0)return;const q=Math.max(0,g),v=Math.min(f,S);for(let k=q;k<v;k++)if(!s.has(k)){const I=Math.floor(k/o)*o;if(!c.has(I))return j(I,D)}},ingest:(g,S,D,q,v)=>{if(v!=null&&v!==p)return[];b=!0,D!=null&&(h=D),q!=null&&(f=q);for(let k=0;k<S.length;k++)x(g+k,S[k]);return c.delete(g),P()},reset:function(){p++,this.clear()},clear:()=>{b=!1,s.clear(),c.clear(),clearTimeout(_)},configure:(g={})=>{let S=[];return g.windowSize>0&&g.windowSize!==n&&(n=g.windowSize,S=P()),g.pageSize>0&&(o=g.pageSize),g.fetchDebounce>=0&&(i=g.fetchDebounce),S}}}function St(e,n,o){if(!Array.isArray(e)||!n||!n.field)return e;const{field:i,direction:a}=n,s=a==="desc",c=e.map(h=>h?h[i]:void 0),f=nt(c);return[...e].sort((h,p)=>{const b=h?h[i]:void 0,_=p?p[i]:void 0,x=rt(b,_,f,o);return s?-x:x})}function Ie(e,n){if(!Array.isArray(e)||!n||typeof n!="object")return e;const o=Object.keys(n).filter(i=>Array.isArray(n[i])&&n[i].length>0);return o.length?e.filter(i=>i?o.every(a=>_t(i[a],n[a])):!1):e}function At(e,n,o){if(!Array.isArray(e)||!n||!o||!o.length)return e;const i=mt(n);return i.length?e.filter(a=>a?i.every(s=>o.some(c=>{const f=a[c];return f!=null&&bt(String(f),[s])})):!1):e}function vt(e,n,o){if(!Array.isArray(e)||!e.length)return 0;if(o==="count")return e.length;const i=e.map(s=>s&&s[n]!=null?parseFloat(s[n]):NaN).filter(s=>Number.isFinite(s)),a=i.reduce((s,c)=>s+c,0);return o==="sum"?a:o==="avg"&&i.length?a/i.length:0}function xt(e,n={},o=[],i){if(!Array.isArray(e))return{records:[],total:0,filtered:0};const a=e.length;let s=e;n.filters&&(s=Ie(s,n.filters)),n.search&&(s=At(s,n.search,o));const c=s.length;if(n.sort&&(s=St(s,n.sort,i)),n.offset||n.limit){const f=n.offset||0,h=n.limit||s.length;s=s.slice(f,f+h)}return{records:s,total:a,filtered:c}}function kt(e,n){return!Array.isArray(e)||!n||typeof n!="object"?e:e.map(o=>{if(!o)return null;const i={...o};for(const[a,s]of Object.entries(n))if(typeof s=="function")try{i[a]=s(o)}catch{i[a]=void 0}return i})}function It(e,n,o,i="_meta"){if(!Array.isArray(e)||!e.includes(i))return!0;for(const a of Object.keys(n||{})){if(!e.includes(a))return!0;const s=n[a]&&n[a].indexes||[],c=o&&o[a]||[];if(s.some(f=>!c.includes(f)))return!0}return!1}function Et(e){return{ok:!1,error:e&&e.message?e.message:String(e)}}(function(){const e="data-ln-data-store",n="lnDataStore";if(window[n]!==void 0)return;function o(t,r,l){const u=t.getAttribute(r);if(u==="never"||u==="-1")return-1;const d=parseInt(u,10);return isNaN(d)?l:d}const i={"data-ln-data-store":{type:"marker",effect:Ne,description:"Identifies the element as a data-store definition container"},"data-ln-data-store-indexes":{type:"list",effect:Ne,description:"Comma-separated index field names for the IndexedDB store"},"data-ln-data-store-stale":{prop:"_staleThreshold",type:"integer",read:o,fallback:300,description:"Cache staleness threshold in seconds, or -1/never"},"data-ln-data-store-search-fields":{prop:"_searchFields",type:"list",read:pe,description:"Record fields to index for client-side search"},"data-ln-data-store-no-local-query":{prop:"noLocalQuery",type:"boolean",read:ye,description:"Bypasses local IndexedDB query resolution, forcing remote fetching"},"data-ln-data-store-window":{prop:"_windowSize",type:"integer",read:oe,fallback:1e3,min:10,effect:Wt,description:"Virtual scrolling cache window size in records"},"data-ln-data-store-window-page":{prop:"_windowPageSize",type:"integer",read:oe,fallback:200,min:5,effect:Qt,description:"Virtual scrolling slice page size"},"data-ln-data-store-frozen":{type:"marker",description:"Applied at runtime to indicate store schema is locked in IndexedDB"}},a=Ve(i),s="ln_app_cache",c="_meta",f="1.0";let h=null,p=null;const b={};function _(t){t&&t.name==="QuotaExceededError"&&A(document,"ln-data-store:quota-exceeded",{error:t})}function x(){const t={};for(const r of document.querySelectorAll(`[${e}]`)){const l=r.id;if(l){const u=r.getAttribute("data-ln-data-store-indexes")||"";t[l]={indexes:u.split(",").map(d=>d.trim()).filter(Boolean)}}}return t}function P(){return p||(p=new Promise(t=>{if(typeof indexedDB>"u")return console.warn("[ln-data-store] IndexedDB is not available in this environment"),t(null);const r=x(),l=Object.keys(r),u=indexedDB.open(s);u.onerror=()=>{console.warn("[ln-data-store] IndexedDB open failed"),t(null)},u.onsuccess=d=>{const w=d.target.result,y=Array.from(w.objectStoreNames),m=l.filter(N=>y.includes(N));let C={};if(m.length>0){const N=w.transaction(m,"readonly");for(const L of m)C[L]=Array.from(N.objectStore(L).indexNames)}if(!It(y,r,C,c))return j(w),h=w,t(w);const $=w.version;w.close();const O=indexedDB.open(s,$+1);let z=!1,R=null;O.onblocked=()=>{console.warn("[ln-data-store] Database upgrade blocked — waiting for other tabs to close connection"),A(document,"ln-data-store:blocked",{db:s}),R||(R=setTimeout(()=>{z||(console.warn("[ln-data-store] Database upgrade timed out while blocked"),z=!0,p=null,t(null))},5e3))},O.onerror=()=>{z||(R&&clearTimeout(R),z=!0,p=null,console.warn("[ln-data-store] Database upgrade failed"),t(null))},O.onupgradeneeded=N=>{const L=N.target.result,Jt=N.target.transaction;L.objectStoreNames.contains(c)||L.createObjectStore(c,{keyPath:"key"});for(const W of l)if(L.objectStoreNames.contains(W)){const te=Jt.objectStore(W);for(const U of r[W].indexes)te.indexNames.contains(U)||te.createIndex(U,U,{unique:!1})}else{const te=L.createObjectStore(W,{keyPath:"id"});for(const U of r[W].indexes)te.createIndex(U,U,{unique:!1})}},O.onsuccess=N=>{if(z){N.target.result&&N.target.result.close();return}R&&clearTimeout(R),z=!0;const L=N.target.result;j(L),h=L,t(L)}}}),p)}function j(t){t.onversionchange=()=>{t.close(),h=null,p=null}}function g(){return h?Promise.resolve(h):(p=null,P())}async function S(t){if(!M()||!t)return t;const r={...t},l=r.id,u=await wt(r);return!u||!u.encrypted?t:{...u,id:l}}async function D(t){return!t||!t.encrypted||!M()?t:yt(t,{silent:!0})}const q=(t,r)=>g().then(l=>l?l.transaction(t,r).objectStore(t):null);function v(t){return new Promise((r,l)=>{t.onsuccess=()=>r(t.result),t.onerror=()=>{_(t.error),l(t.error)}})}const k=t=>q(t,"readonly").then(r=>r?v(r.getAll()):[]).then(r=>M()?Promise.all(r.map(l=>D(l))):r),I=(t,r)=>q(t,"readonly").then(l=>l?v(l.get(r)).then(u=>u!==void 0?u:typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r))?v(l.get(Number(r))):typeof r=="number"?v(l.get(String(r))):null):null).then(l=>l?D(l):null),F=(t,r)=>g().then(l=>{if(!l)return[];const d=l.transaction(t,"readonly").objectStore(t),w=r.map(y=>v(d.get(y)).then(m=>m!==void 0?m:typeof y=="string"&&y.trim()!==""&&!isNaN(Number(y))?v(d.get(Number(y))):typeof y=="number"?v(d.get(String(y))):null));return Promise.all(w).then(y=>M()?Promise.all(y.map(m=>m?D(m):null)):y)}),J=(t,r)=>(M()?S(r):Promise.resolve(r)).then(u=>q(t,"readwrite").then(d=>d?v(d.put(u)):null)),G=(t,r)=>q(t,"readwrite").then(l=>l?v(l.delete(r)).then(()=>{if(typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r)))return v(l.delete(Number(r)));if(typeof r=="number")return v(l.delete(String(r)))}):null),K=t=>q(t,"readwrite").then(r=>r?v(r.clear()):null),B=t=>q(t,"readonly").then(r=>r?v(r.count()):0),qt=t=>q(c,"readonly").then(r=>r?v(r.get(t)):null),Z=(t,r)=>q(c,"readwrite").then(l=>{if(l)return r.key=t,v(l.put(r))});function T(t){return this.dom=t,this._name=t.id,this._name||console.warn("[ln-data-store] missing id — the store cannot be addressed",t),Ue(this,t,a),this._handlers=null,this.isLoaded=!1,this.canServe=!1,this.isInitialized=!1,this.initializationError=null,this.hasCache=!1,this.isSyncing=!1,this.lastSyncedAt=null,this.query={filters:{},search:"",sort:null},t.hasAttribute("data-ln-data-store-window")?this._windowIndex=Ct({windowSize:this._windowSize,pageSize:this._windowPageSize,requestPage:(r,l,u)=>{A(this.dom,"ln-data-store:request-page",{store:this._name,offset:r,limit:l,query:u,queryGen:this._windowIndex.queryGen})}}):this._windowIndex=null,this.windowed=this._windowIndex!==null,this.totalCount=0,this.presenters=null,this._mutationChain=Promise.resolve(),b[this._name]=this,Dt(this),this.ready=Ot(this),this}function Dt(t){t._handlers={create:r=>X(t,"create",r.detail,()=>Tt(t,r.detail)),update:r=>X(t,"update",r.detail,()=>Nt(t,r.detail)),delete:r=>X(t,"delete",r.detail,()=>Lt(t,r.detail)),"bulk-delete":r=>X(t,"bulk-delete",r.detail,()=>zt(t,r.detail)),"sync-failed":r=>{t.isSyncing=!1,A(t.dom,"ln-data-store:sync-error",{store:t._name,error:r.detail&&r.detail.error,status:r.detail&&r.detail.status})}};for(const[r,l]of Object.entries(t._handlers))t.dom.addEventListener(`ln-data-store:request-${r}`,l);t._queryHandlers={"ln-search:change":r=>{r.preventDefault();const l=r.detail&&r.detail.term!=null?r.detail.term:"";l!==t.query.search&&(t.query.search=l,le(t))},"ln-filter:change":r=>{r.preventDefault();const l=r.detail&&r.detail.key;if(!l)return;const u=(r.detail.values||[]).slice(),d=t.query.filters[l];(d?d.length===u.length&&d.every((y,m)=>y===u[m]):!u.length)||(u.length?t.query.filters[l]=u:delete t.query.filters[l],le(t))},"ln-sort:change":r=>{r.preventDefault();const l=r.detail&&r.detail.field,u=r.detail&&r.detail.direction,d=u&&u!=="none"?{field:l,direction:u}:null,w=t.query.sort;!w&&!d||w&&d&&w.field===d.field&&w.direction===d.direction||(t.query.sort=d,le(t))}};for(const[r,l]of Object.entries(t._queryHandlers))t.dom.addEventListener(r,l)}function X(t,r,l,u){const d=l&&l.requestId;return t._mutationChain=t._mutationChain.then(()=>t.ready).then(()=>{if(t.initializationError)throw t.initializationError;return u()}).catch(w=>Rt(t,r,d,w)),t._mutationChain}function Y(t,r=0){return B(t._name).then(l=>{if(t._windowIndex||t.windowed){const u=t.totalCount!=null?t.totalCount:l;t.totalCount=Math.max(0,u+r)}else t.totalCount=l;return t.hasCache=!0,t.isLoaded=!0,t.canServe=!0,Z(t._name,{schema_version:f,last_synced_at:t.lastSyncedAt,has_cache:!0,record_count:t.totalCount})})}function Tt(t,{tempId:r,data:l={},requestId:u}={}){const d={...l,id:r};return J(t._name,d).then(()=>Y(t,1)).then(()=>{A(t.dom,"ln-data-store:created",{store:t._name,record:d,tempId:r,requestId:u})})}function Nt(t,{id:r,data:l={},requestId:u}={}){return I(t._name,r).then(d=>{if(!d)throw new Error(`Record not found: ${r}`);const w=d.id,y={...d,...l,id:w},m=l.id,C=m!==void 0&&m!==w;return(C?Mt(t._name,w,{...y,id:m}):J(t._name,y)).then(()=>Y(t,0)).then(()=>{A(t.dom,"ln-data-store:updated",{store:t._name,record:C?{...y,id:m}:y,previous:d,requestId:u})})})}function Lt(t,{id:r,requestId:l}={}){return I(t._name,r).then(u=>{if(!u){A(t.dom,"ln-data-store:deleted",{store:t._name,id:r,requestId:l,missing:!0});return}const d=u.id;return G(t._name,d).then(()=>Y(t,-1)).then(()=>{A(t.dom,"ln-data-store:deleted",{store:t._name,id:d,requestId:l})})})}function zt(t,{ids:r=[],requestId:l}={}){return r.length?Promise.all(r.map(u=>I(t._name,u))).then(u=>{const d=u.filter(Boolean).map(w=>w.id);return ee(t._name,d).then(()=>Y(t,-d.length)).then(()=>{A(t.dom,"ln-data-store:deleted",{store:t._name,ids:d,requestId:l})})}):(A(t.dom,"ln-data-store:deleted",{store:t._name,ids:[],requestId:l}),Promise.resolve())}function Rt(t,r,l,u){console.error("[ln-data-store] "+r+" failed:",u),A(t.dom,"ln-data-store:mutation-error",{store:t._name,action:r,requestId:l,error:u})}function Ot(t){return P().then(r=>{if(!r)throw new Error("IndexedDB is unavailable");return qt(t._name)}).then(r=>{if(t.initializationError=null,r&&r.schema_version===f)t.lastSyncedAt=r.last_synced_at||null,t.totalCount=r.record_count||0,t.hasCache=r.has_cache===!0||t.totalCount>0,t.hasCache&&(t.isLoaded=!0,t.canServe=!0,A(t.dom,"ln-data-store:ready",{store:t._name,count:t.totalCount,source:"cache"})),t.isInitialized=!0,A(t.dom,"ln-data-store:initialized",{store:t._name,hasCache:t.hasCache,lastSyncedAt:t.lastSyncedAt,count:t.totalCount});else{if(r&&r.schema_version!==f)return K(t._name).then(()=>Z(t._name,{schema_version:f,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{t.isInitialized=!0,t.hasCache=!1,A(t.dom,"ln-data-store:initialized",{store:t._name,hasCache:!1,lastSyncedAt:null,count:0})});t.isInitialized=!0,t.hasCache=!1,A(t.dom,"ln-data-store:initialized",{store:t._name,hasCache:!1,lastSyncedAt:null,count:0})}}).catch(r=>(t.isInitialized=!0,t.isLoaded=!1,t.canServe=!1,t.hasCache=!1,t.isSyncing=!1,t.initializationError=r,A(t.dom,"ln-data-store:initialization-error",{store:t._name,error:r}),{ok:!1,error:r}))}function Ee(t){t.isSyncing=!0,A(t.dom,"ln-data-store:request-remote-sync",{since:t.lastSyncedAt})}function qe(t,r){return g().then(l=>l?(M()?Promise.all(r.map(d=>S(d))):Promise.resolve(r)).then(d=>new Promise((w,y)=>{const m=l.transaction(t,"readwrite"),C=m.objectStore(t);d.forEach(E=>C.put(E)),m.oncomplete=()=>w(),m.onerror=()=>{_(m.error),y(m.error)}})):void 0)}function ee(t,r){return g().then(l=>{if(l)return new Promise((u,d)=>{const w=l.transaction(t,"readwrite"),y=w.objectStore(t);r.forEach(m=>{y.delete(m),typeof m=="string"&&m.trim()!==""&&!isNaN(Number(m))?y.delete(Number(m)):typeof m=="number"&&y.delete(String(m))}),w.oncomplete=()=>u(),w.onerror=()=>d(w.error)})})}function Mt(t,r,l){return(M()?S(l):Promise.resolve(l)).then(d=>g().then(w=>{if(w)return new Promise((y,m)=>{const C=w.transaction(t,"readwrite"),E=C.objectStore(t);E.put(d),E.delete(r),C.oncomplete=()=>y(),C.onerror=()=>{_(C.error),m(C.error)}})}))}const Bt=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function Pt(t){return t?Object.keys(t).filter(r=>Array.isArray(t[r])&&t[r].length>0):[]}function jt(t,r,l){return r.every(u=>l[u].map(String).includes(String(t[u])))}function Ft(t){return String(t||"").toLowerCase().split(/\s+/).filter(Boolean)}function $t(t,r,l){return r.every(u=>l.some(d=>{const w=t[d];return w!=null&&String(w).toLowerCase().includes(u)}))}function Kt(t,r,l){return vt(t,r,l)}function H(t,r){return kt(r,t.presenters&&t.presenters.computed)}function Ut(t){return!t.sort&&!M()}function Vt(t,r,l){const u=Pt(r.filters),d=r.search?Ft(r.search):[],w=t._searchFields,y=d.length>0&&w&&w.length>0;return q(t._name,"readonly").then(m=>m?new Promise((C,E)=>{const $=[],O=m.openCursor();O.onsuccess=()=>{const z=O.result;if(!z||$.length>=l){C($);return}const R=z.value;(!u.length||jt(R,u,r.filters))&&(!y||$t(R,d,w))&&$.push(R),z.continue()},O.onerror=()=>E(O.error)}):[])}function De(t,r,l){return xt(r,l,t._searchFields,Bt)}function Te(t,r,l){const u=[];for(let w=r;w<r+l;w++){const y=t._windowIndex.getId(w);u.push(y)}const d=Array.from(new Set(u.filter(w=>w!==void 0)));return F(t._name,d).then(w=>{const y=new Map;for(let C=0;C<w.length;C++){const E=w[C];E&&y.set(String(E.id),E)}const m=[];for(let C=0;C<u.length;C++){const E=u[C];if(E===void 0)m.push(null);else{const $=y.get(String(E));m.push($||null)}}return{data:H(t,m),total:t._windowIndex.grandTotal,filtered:t._windowIndex.logicalTotal,offset:r,queryGen:t._windowIndex.queryGen}})}T.prototype.getAll=function(t={}){const r=this;if(r._windowIndex){const l=t.offset||0,u=t.limit||200;if(r._windowIndex.ensure(l,l+u,t),!r._windowIndex.hasLoaded&&!r.noLocalQuery){const d=l+u,w=y=>y.length?{data:H(r,y),offset:l,queryGen:r._windowIndex.queryGen,provisional:!0}:Te(r,l,u);return Ut(t)?Vt(r,t,d).then(y=>w(y.slice(l,d))):k(r._name).then(y=>w(De(r,y,t).records))}return Te(r,l,u)}return k(r._name).then(l=>{const u=De(r,l,t);return{data:H(r,u.records),total:u.total,filtered:u.filtered}})},T.prototype.getById=function(t){return I(this._name,t).then(r=>r?H(this,[r])[0]:null)},T.prototype.count=function(t){return t&&Object.keys(t).length>0?k(this._name).then(l=>Ie(l,t).length):this.windowed&&this.totalCount!=null?Promise.resolve(this.totalCount):B(this._name)},T.prototype.aggregate=function(t,r){return k(this._name).then(l=>Kt(l,t,r))},T.prototype.setPresenters=function(t){this.presenters=t},T.prototype.applySync=function(t,r,l,u){u=u||{};const d=this;if(d._windowIndex&&u.queryGen!=null&&u.queryGen!==d._windowIndex.queryGen)return Promise.resolve({ok:!0,stale:!0});let w=g().then(y=>{if(!y)throw new Error("IndexedDB unavailable")});return t.length>0&&(w=w.then(()=>qe(d._name,t))),r.length>0&&(w=w.then(()=>ee(d._name,r))),w.then(()=>{if(d._windowIndex&&(u.offset!=null||u.total!=null)){const y=u.offset!=null?u.offset:0,m=t.map(E=>E.id),C=d._windowIndex.ingest(y,m,u.total,u.filtered,u.queryGen);if(C&&C.length)return ee(d._name,C)}}).then(()=>B(d._name)).then(y=>(d.totalCount=u.total!==void 0?u.total:y,d.hasCache=!0,Z(d._name,{schema_version:f,last_synced_at:l,has_cache:!0,record_count:d.totalCount}))).then(()=>{const y=!d.isLoaded;return d.isLoaded=!0,d.canServe=!0,d.isSyncing=!1,d.lastSyncedAt=l,y?(A(d.dom,"ln-data-store:loaded",{store:d._name,count:d.totalCount,meta:u}),A(d.dom,"ln-data-store:ready",{store:d._name,count:d.totalCount,source:"server",meta:u})):A(d.dom,"ln-data-store:synced",{store:d._name,added:t.length,deleted:r.length,changed:!0,meta:u}),{ok:!0}}).catch(y=>{d.isSyncing=!1;const m=y&&y.message?y.message:String(y);return console.error("[ln-data-store] applySync failed:",y),A(d.dom,"ln-data-store:sync-error",{store:d._name,error:m}),Et(y)})},T.prototype.applyQuery=function(t,r){r=r||{};const l=this;let u=Promise.resolve();return t.length>0&&(u=u.then(()=>qe(l._name,t))),u.then(()=>B(l._name)).then(d=>(l.totalCount=r.total!==void 0?r.total:d,t.length>0&&(l.canServe=!0),H(l,t))).catch(d=>(console.error("[ln-data-store] applyQuery failed:",d),[]))},T.prototype.forceSync=function(){this.isSyncing||Ee(this)},T.prototype.fullReload=function(){const t=this;return K(t._name).then(()=>Z(t._name,{schema_version:f,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{t.isLoaded=!1,t.hasCache=!1,t.lastSyncedAt=null,t.totalCount=0,Ee(t)})},T.prototype.destroy=function(){if(this._windowIndex&&(this._windowIndex.clear(),this._windowIndex=null,this.windowed=!1),this._handlers){for(const[t,r]of Object.entries(this._handlers))this.dom.removeEventListener(`ln-data-store:request-${t}`,r);this._handlers=null}if(this._queryHandlers){for(const[t,r]of Object.entries(this._queryHandlers))this.dom.removeEventListener(t,r);this._queryHandlers=null}delete b[this._name],delete this.dom[n]};function Gt(){return g().then(t=>{if(!t)return;const r=Array.from(t.objectStoreNames);return new Promise((l,u)=>{const d=t.transaction(r,"readwrite");r.forEach(w=>d.objectStore(w).clear()),d.oncomplete=()=>l(),d.onerror=()=>u(d.error)})}).then(()=>{Object.values(b).forEach(t=>{t.isLoaded=!1,t.canServe=!1,t.isInitialized=!1,t.initializationError=null,t.hasCache=!1,t.isSyncing=!1,t.lastSyncedAt=null,t.totalCount=0})})}function le(t){t._windowIndex&&t._windowIndex.reset(),A(t.dom,"ln-data-store:query-changed",{store:t._name,query:{filters:Object.assign({},t.query.filters),search:t.query.search,sort:t.query.sort?Object.assign({},t.query.sort):null}})}const Ht="data-ln-data-store-frozen";function Ne(t,r){t.setAttribute(Ht,r)}function Wt(t){const r=t[n];if(!r._windowIndex)return;const l=r._windowIndex.configure({windowSize:r._windowSize});l.length&&ee(r._name,l).catch(u=>{console.error("[ln-data-store] window shrink eviction failed:",u)})}function Qt(t){const r=t[n];r._windowIndex&&r._windowIndex.configure({pageSize:r._windowPageSize})}tt(e,n,T,"ln-data-store",{attributes:i}),window[n].clearAll=Gt,window[n].init=window[n],window[n].setStorageKey=ke,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.setStorageKey=ke)})()})();
1
+ (function(){"use strict";function fe(){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 re(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 a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){i=t[a];break}if(!re(i))return}e.apply(console,t)}}function v(e,t,o){const i=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function Q(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){Q(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 Fe(e,t){const o=!!(t&&t.typed),i=t&&t.exclude,a={},s=e.elements,l={};if(o)for(let d=0;d<s.length;d++){const c=s[d];c.name&&c.type==="checkbox"&&!c.disabled&&(l[c.name]=(l[c.name]||0)+1)}for(let d=0;d<s.length;d++){const c=s[d];if(!(!c.name||c.disabled||c.type==="file"||c.type==="submit"||c.type==="button")&&!(i&&c.matches&&c.matches(i)))if(c.type==="checkbox")o&&l[c.name]===1?a[c.name]=c.checked:(a[c.name]||(a[c.name]=[]),c.checked&&a[c.name].push(c.value));else if(c.type==="radio")c.checked&&(a[c.name]=c.value);else if(c.type==="select-multiple"){a[c.name]=[];for(let w=0;w<c.options.length;w++)c.options[w].selected&&a[c.name].push(c.options[w].value)}else if(o&&c.type==="hidden")a[c.name]=c.value;else if(o&&(c.type==="number"||c.type==="range")){const w=Number(c.value);a[c.name]=c.value===""||isNaN(w)?null:w}else a[c.name]=c.value}return a}function je(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function $e(e,t){const o=e.elements,i=[],a={};for(let s=0;s<o.length;s++){const l=o[s];l.name&&l.type==="checkbox"&&(a[l.name]=(a[l.name]||0)+1)}for(let s=0;s<o.length;s++){const l=o[s];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 c=t[d];if(l.type==="checkbox"){if(Array.isArray(c))l.checked=c.indexOf(l.value)!==-1;else if(a[l.name]>1){const w=String(c).split(",").map(function(b){return b.trim()});l.checked=w.indexOf(l.value)!==-1}else l.checked=je(c);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(c),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(c))for(let w=0;w<l.options.length;w++)l.options[w].selected=c.indexOf(l.options[w].value)!==-1;i.push(l)}else l.value=c,l.tagName==="SELECT"&&c!=null&&l.setAttribute("data-ln-value",c),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=$e,window.lnCore.serializeForm=Fe,window.lnCore.resolveFormMethod=Pe);const he={};function Ke(e,t){he[e]=t}function Ue(e){return he[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ke,window.lnCore.getDataMapper=Ue);function Ve(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,Q(function(){new MutationObserver(function(){v(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const we={};function Ge(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];we[o]=t}function He(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return we[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ge,window.lnCore.getLocaleFallback=He,window.lnCore.ensureLocaleObserver=Ve);const oe={};function We(e,t){oe[e]||(oe[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=oe[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function ye(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let l=0;l<o.length;l++){const d=o[l],c=d.getAttribute("data-ln-field");t[c]!=null&&(d.textContent=t[c])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const d=i[l],c=d.getAttribute("data-ln-attr").split(",");for(let w=0;w<c.length;w++){const b=c[w].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();t[x]!=null&&d.setAttribute(_,t[x])}}const a=e.querySelectorAll("[data-ln-show]");for(let l=0;l<a.length;l++){const d=a[l],c=d.getAttribute("data-ln-show");c in t&&d.classList.toggle("hidden",!t[c])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const d=s[l],c=d.getAttribute("data-ln-class").split(",");for(let w=0;w<c.length;w++){const b=c[w].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();x in t&&d.classList.toggle(_,!!t[x])}}return e}function Qe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<o.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[i],t??null),o[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)ye(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function pe(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,d){return t[d]!==void 0?t[d]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let s=0;s<a.length;s++){const l=a[s],d=l.attributes;for(let c=0;c<d.length;c++){const w=d[c];w.value.indexOf("{{")!==-1&&l.setAttribute(w.name,w.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Je(e,t,o,i,a,s){const l={};for(let c=0;c<e.children.length;c++){const w=e.children[c],b=w.getAttribute("data-ln-render-key");b&&(l[b]=w)}const d=document.createDocumentFragment();for(let c=0;c<t.length;c++){const w=t[c],b=String(i(w));let _=l[b];if(_)a(_,w,c);else{const x=We(o,s);if(!x||(pe(x,w),_=x.firstElementChild,!_))continue;_.setAttribute("data-ln-render-key",b),a(_,w,c)}d.appendChild(_)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=pe,window.lnCore.fill=ye,window.lnCore.lnFill=Qe,window.lnCore.renderList=Je);function ie(e,t,o){const i=e.getAttribute(t);return i===null?o:i}function J(e,t,o){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?o:i}function ae(e,t,o=!1){const i=e.getAttribute(t);if(i===null)return!!o;const a=i.trim().toLowerCase();return!(a==="false"||a==="0")}function se(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const le=new Map;function me(e,t){const o=(e?e.join("|"):"")+"::"+t;if(le.has(o))return le.get(o);const i=new Set(e||[]),a=function(s,l){const d=s.getAttribute(l);return d!==null&&i.has(d)?d:t};return le.set(o,a),a}function ge(e,t,o){const i=parseFloat(e.getAttribute(t));return isNaN(i)?o:i}function be(e,t,o){const i=e.getAttribute(t);if(!i)return o;try{return JSON.parse(i)}catch{return o}}function _e(e,t,o,i,a){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 d=c=>{a?console.warn(c,a):console.warn(c)};if(l==="boolean"){const c=t.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(d(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const c=e.values||[];return c.includes(t)?!0:(d(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${c.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return d(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const c=parseInt(t,10);return e.min!==void 0&&c<e.min?(d(`[${s}] Value ${c} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&c>e.max?(d(`[${s}] Value ${c} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(d(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(c){return d(`[${s}] Invalid JSON for attribute "${o}": ${c.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ce(e,t,o){for(const i in o){const[a,s,l]=o[i];Object.defineProperty(e,i,{get:function(){return a(t,s,l)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const o in e){const i=e[o];if(!i||!i.prop)continue;let a=i.read;if(!a&&i.type)switch(i.type){case"enum":a=me(i.values,i.fallback);break;case"integer":a=J;break;case"float":a=ge;break;case"boolean":a=ae;break;case"list":a=se;break;case"json":a=be;break;case"string":default:a=ie;break}a||(a=ie),t[i.prop]=[a,o,i.fallback]}return t}function Ze(e){const t={};for(const o in e){const i=e[o];i&&i.effect&&(t[o]=i.effect)}return Object.keys(t).length?t:null}function Xe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ce,window.lnCore.attrSpec=Se,window.lnCore.attrStr=ie,window.lnCore.attrInt=J,window.lnCore.attrBool=ae,window.lnCore.attrList=se,window.lnCore.attrEnum=me,window.lnCore.attrFloat=ge,window.lnCore.attrJson=be);function ce(e,t,o,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&l.push(e);for(const d of l)if(!d[o]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[o]=new i(d)}catch(c){console.error("["+o+"] init failed",d,c)}}}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 et(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 ve(){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 tt(e){const t=ve(),o=e.observed||[];for(let i=0;i<o.length;i++){const a=o[i];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).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 a=t.byDeclaredAttr.get(i);a.some(s=>s.componentTag===e.componentTag)||a.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Xe(e);if(i===null)t.reactiveWildcard.push(e);else for(const a of i)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function Ae(e,t,o,i){for(let a=0;a<e.length;a++){const s=e[a];if(!t[s.attribute])continue;const l=s.effects&&s.effects[o];l?l(t,o,i):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,i)}}function nt(e){const t=e.target,o=e.attributeName;if(e.oldValue===t.getAttribute(o))return;const i=ve(),a=i.byAttr.get(o);if(fe()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(o)&&re(t)){const s=i.byDeclaredAttr.get(o),l=t.getAttribute(o);for(let d=0;d<s.length;d++)_e(s[d].spec,l,o,s[d].componentTag,t)}if(window.lnCore._debugSink&&(o.indexOf("data-ln-")===0||a)&&window.lnCore._debugSink("attr",o,t,{oldValue:e.oldValue,newValue:t.getAttribute(o)}),o.indexOf("data-ln-")===0){const s=i.byReactive.get(o);s&&Ae(s,t,o,e.oldValue),i.reactiveWildcard.length&&Ae(i.reactiveWildcard,t,o,e.oldValue)}if(a)for(let s=0;s<a.length;s++){const l=a[s];if(l.handler){l.handler(t,o,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,o):(ce(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function rt(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,Q(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{nt(t[o])}catch(i){console.error("[ln-core] mutation handler failed",t[o].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function xe(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ot(e){const t=xe();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const i=t[o];if(i.onSubtreeChange){const a=i.query,s=e.target.nodeType===1?e.target.matches(a)?e.target:e.target.closest(a):e.target.parentElement?e.target.parentElement.closest(a):null;s&&i.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const i=e.addedNodes[o];if(i.nodeType===1)for(let a=0;a<t.length;a++){const s=t[a];ce(i,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(i)}}for(let o=0;o<e.removedNodes.length;o++){const i=e.removedNodes[o];if(i.nodeType===1)for(let a=0;a<t.length;a++){const s=t[a],l=s.query,d=Array.from(i.querySelectorAll(l));i.matches&&i.matches(l)&&d.push(i);for(let c=0;c<d.length;c++){const w=d[c];if(!document.contains(w)){const b=w[s.attribute];if(b&&typeof b.destroy=="function")try{b.destroy()}catch(_){console.error("["+s.attribute+"] destroy failed",w,_)}delete w[s.attribute]}}}}}}function it(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,Q(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const i=t[o];if(i.type==="childList")try{ot(i)}catch(a){console.error("[ln-core] lifecycle handler failed",i.target,a)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ke(e,t,o,i,a={}){const s=a.extraAttributes||[],l=a.onAttributeChange||null,d=a.onSubtreeChange||null,c=a.onInit||null,w=a.onAttrChange||null,b=a.effects||null,_=a.attributes||null,x=_?Ze(_):b,P=_?new Set(Object.keys(_)):null,F=a.persist||null;function m(k){const I=k||document.body;if(ce(I,e,t,o),_&&fe())for(const j in _){const Z=_[j],G=Array.from(I.querySelectorAll("["+j+"]"));I.matches&&I.matches("["+j+"]")&&G.push(I);for(let K=0;K<G.length;K++){const B=G[K];re(B)&&_e(Z,B.getAttribute(j),j,i,B)}}c&&c(I)}const S=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let I;for(;(I=k.exec(e))!==null;)S.push(I[1])}else S.push(e);tt({selector:e,attribute:t,componentTag:i,attributes:_,ComponentFn:o,onInit:c,observed:S.concat(s),onAttributeChange:l,onAttrChange:w,effects:x,declared:P,persist:F}),rt();const q=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,N=a.subtreeQuery||(q?e:"["+e+"]");xe().push({selector:e,attribute:t,ComponentFn:o,onInit:c,onSubtreeChange:d,query:N}),it(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ke);function A(){Ye()>0?et(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",A):A(),m}function at(e){let t=!1;for(let o=0;o<e.length;o++){const i=e[o];if(!(i===""||i==null)&&(t=!0,!Number.isFinite(Number(i))))return"string"}return t?"number":"string"}function st(e,t,o,i){if(o==="number"){const l=parseFloat(e),d=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(d)?0:d)}const a=e!=null?String(e):"",s=t!=null?String(t):"";return i?i.compare(a,s):a<s?-1:a>s?1:0}function Ie(e){return(e||"").replace(/^#/,"")}function ue(e){const t=e===void 0?location.hash:e,o={},i=Ie(t);if(!i)return o;const a=i.split("&");for(let s=0;s<a.length;s++){const l=a[s];if(!l)continue;const d=l.indexOf(":"),c=d>-1?l.slice(0,d):l,w=d>-1?l.slice(d+1):"";if(c)try{o[c]=decodeURIComponent(w)}catch{o[c]=w}}return o}function lt(e){if(!e)return null;const t=ue();return e in t?t[e]:null}function ct(e,t){if(!e)return;const o=ue();t==null?delete o[e]:o[e]=String(t);const a=Object.keys(o).map(function(s){const l=o[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Ie(location.hash)!==a&&(location.hash=a)}function ut(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function dt(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function ft(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ht(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 wt(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function yt(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),i=e.slice(t+1),a=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=ue,window.lnCore.hashGet=lt,window.lnCore.hashSet=ct,window.lnCore.hashLinkClick=ut,window.lnCore.resolveHashNamespace=dt,window.lnCore.hashSortEncode=ft,window.lnCore.hashSortDecode=ht,window.lnCore.hashFilterEncode=wt,window.lnCore.hashFilterDecode=yt);let V=null;const pt="ln-ashlar:storage-salt:v1",Ee=32768;function qe(e){let t="";const o=e.byteLength;for(let i=0;i<o;i+=Ee)t+=String.fromCharCode.apply(null,e.subarray(i,Math.min(i+Ee,o)));return btoa(t)}function Ne(e){const t=atob(e),o=t.length,i=new Uint8Array(o);for(let a=0;a<o;a++)i[a]=t.charCodeAt(a);return i}function Le(e,t){let o=V,i={};return typeof CryptoKey<"u"&&e instanceof CryptoKey?o=e:e&&typeof e=="object"&&(i=e,typeof CryptoKey<"u"&&i.key instanceof CryptoKey&&(o=i.key)),{key:o,options:i}}async function mt(e,t={}){if(!e)throw new Error("[ln-crypto] Key derivation failed: Secret string is required");const o=t.method||"pbkdf2",i=new TextEncoder;if(o==="sha256"){const c=await crypto.subtle.digest("SHA-256",i.encode(e));return crypto.subtle.importKey("raw",c,{name:"AES-GCM"},!1,["encrypt","decrypt"])}const a=t.salt||pt,s=typeof a=="string"?i.encode(a):a,l=t.iterations||1e5,d=await crypto.subtle.importKey("raw",i.encode(e),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:s,iterations:l,hash:"SHA-256"},d,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Te(e,t={}){if(!e){V=null;return}try{const o=t.method||"sha256";V=await mt(e,{...t,method:o})}catch(o){throw console.error("[ln-core/crypto] Key derivation failed:",o),V=null,o}}function M(){return V}async function gt(e,t,o){const{key:i}=Le(t);if(e==null)return e;if(!i)throw new Error("[ln-crypto] Encryption failed: No active cryptographic key provided");try{const a=new TextEncoder,s=crypto.getRandomValues(new Uint8Array(12)),l=typeof e=="string"?e:JSON.stringify(e),d=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,a.encode(l));return{v:1,alg:"AES-GCM",encrypted:!0,iv:qe(s),data:qe(new Uint8Array(d))}}catch(a){throw console.error("[ln-core/crypto] Encryption failed:",a),new Error("[ln-crypto] Encryption failed: "+(a&&a.message?a.message:String(a)))}}async function bt(e,t,o){const{key:i,options:a}=Le(t),s=a.silent===!0;if(!e||!e.encrypted)return e;if(!i){if(s)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: No active cryptographic key provided")}if(!e.iv||!e.data){if(s)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: Malformed envelope (missing iv or data)")}try{const l=new TextDecoder,d=Ne(e.iv),c=Ne(e.data),w=await crypto.subtle.decrypt({name:"AES-GCM",iv:d},i,c),b=l.decode(w);try{return JSON.parse(b)}catch{return b}}catch(l){if(s)return{...e,decryptionError:!0};throw console.error("[ln-core/crypto] Decryption failed. Key may be incorrect or payload tampered:",l),new Error("[ln-crypto] Decryption failed. Key may be incorrect or payload tampered: "+(l&&l.message?l.message:String(l)))}}function _t(){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=_t);function Ct(e){return String(e||"").trim().toLowerCase()}function St(e){const t=Ct(e);return t?t.split(/\s+/).filter(Boolean):[]}function vt(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const o=String(e).toLowerCase();for(let i=0;i<t.length;i++)if(o.indexOf(t[i])===-1)return!1;return!0}function At(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const o=String(e).trim().toLowerCase();for(let i=0;i<t.length;i++)if(String(t[i]).trim().toLowerCase()===o)return!0;return!1}function xt(e={}){let t=e.windowSize>0?e.windowSize:1e3,o=e.pageSize>0?e.pageSize:200,i=e.fetchDebounce!=null?e.fetchDebounce:120;const a=typeof e.requestPage=="function"?e.requestPage:()=>{},s=new Map,l=new Set;let d=0,c=0,w=0,b=!1,_=null;function x(m,S){s.delete(m),s.set(m,S)}function P(){if(s.size<=t)return[];const m=[];for(;s.size>t;){const q=s.keys().next().value;m.push(s.get(q)),s.delete(q)}const S=new Set(s.values());return m.filter(q=>!S.has(q))}function F(m,S){l.add(m),clearTimeout(_),_=setTimeout(()=>a(m,o,S),i)}return{get logicalTotal(){return d},set logicalTotal(m){d=m},get grandTotal(){return c},set grandTotal(m){c=m},get queryGen(){return w},set queryGen(m){w=m},get size(){return s.size},get hasLoaded(){return b},getId:m=>{if(!s.has(m))return;const S=s.get(m);return x(m,S),S},ensure:(m,S,q)=>{if(!b&&!l.has(0))return F(0,q);if(d<=0)return;const N=Math.max(0,m),A=Math.min(d,S);for(let k=N;k<A;k++)if(!s.has(k)){const I=Math.floor(k/o)*o;if(!l.has(I))return F(I,q)}},ingest:(m,S,q,N,A)=>{if(A!=null&&A!==w)return[];b=!0,q!=null&&(c=q),N!=null&&(d=N);for(let k=0;k<S.length;k++)x(m+k,S[k]);return l.delete(m),P()},reset:function(){w++,this.clear()},clear:()=>{b=!1,s.clear(),l.clear(),clearTimeout(_)},configure:(m={})=>{let S=[];return m.windowSize>0&&m.windowSize!==t&&(t=m.windowSize,S=P()),m.pageSize>0&&(o=m.pageSize),m.fetchDebounce>=0&&(i=m.fetchDebounce),S}}}function kt(e,t,o){if(!Array.isArray(e)||!t||!t.field)return e;const{field:i,direction:a}=t,s=a==="desc",l=e.map(c=>c?c[i]:void 0),d=at(l);return[...e].sort((c,w)=>{const b=c?c[i]:void 0,_=w?w[i]:void 0,x=st(b,_,d,o);return s?-x:x})}function De(e,t){if(!Array.isArray(e)||!t||typeof t!="object")return e;const o=Object.keys(t).filter(i=>Array.isArray(t[i])&&t[i].length>0);return o.length?e.filter(i=>i?o.every(a=>At(i[a],t[a])):!1):e}function It(e,t,o){if(!Array.isArray(e)||!t||!o||!o.length)return e;const i=St(t);return i.length?e.filter(a=>a?i.every(s=>o.some(l=>{const d=a[l];return d!=null&&vt(String(d),[s])})):!1):e}function Et(e,t,o){if(!Array.isArray(e)||!e.length)return 0;if(o==="count")return e.length;const i=e.map(s=>s&&s[t]!=null?parseFloat(s[t]):NaN).filter(s=>Number.isFinite(s)),a=i.reduce((s,l)=>s+l,0);return o==="sum"?a:o==="avg"&&i.length?a/i.length:0}function qt(e,t={},o=[],i){if(!Array.isArray(e))return{records:[],total:0,filtered:0};const a=e.length;let s=e;t.filters&&(s=De(s,t.filters)),t.search&&(s=It(s,t.search,o));const l=s.length;if(t.sort&&(s=kt(s,t.sort,i)),t.offset||t.limit){const d=t.offset||0,c=t.limit||s.length;s=s.slice(d,d+c)}return{records:s,total:a,filtered:l}}function Nt(e,t){return!Array.isArray(e)||!t||typeof t!="object"?e:e.map(o=>{if(!o)return null;const i={...o};for(const[a,s]of Object.entries(t))if(typeof s=="function")try{i[a]=s(o)}catch{i[a]=void 0}return i})}function Lt(e,t,o,i="_meta"){if(!Array.isArray(e)||!e.includes(i))return!0;for(const a of Object.keys(t||{})){if(!e.includes(a))return!0;const s=t[a]&&t[a].indexes||[],l=o&&o[a]||[];if(s.some(d=>!l.includes(d)))return!0}return!1}function Tt(e){return{ok:!1,error:e&&e.message?e.message:String(e)}}(function(){const e="data-ln-data-store",t="lnDataStore";if(window[t]!==void 0)return;function o(n,r,u){const f=n.getAttribute(r);if(f==="never"||f==="-1")return-1;const h=parseInt(f,10);return isNaN(h)?u:h}const i={"data-ln-data-store":{type:"marker",effect:Be,description:"Identifies the element as a data-store definition container"},"data-ln-data-store-indexes":{type:"list",effect:Be,description:"Comma-separated index field names for the IndexedDB store"},"data-ln-data-store-stale":{prop:"_staleThreshold",type:"integer",read:o,fallback:300,description:"Cache staleness threshold in seconds, or -1/never"},"data-ln-data-store-search-fields":{prop:"_searchFields",type:"list",read:se,description:"Record fields to index for client-side search"},"data-ln-data-store-no-local-query":{prop:"noLocalQuery",type:"boolean",read:ae,description:"Bypasses local IndexedDB query resolution, forcing remote fetching"},"data-ln-data-store-window":{prop:"_windowSize",type:"integer",read:J,fallback:1e3,min:10,effect:Xt,description:"Virtual scrolling cache window size in records"},"data-ln-data-store-window-page":{prop:"_windowPageSize",type:"integer",read:J,fallback:200,min:5,effect:Yt,description:"Virtual scrolling slice page size"},"data-ln-data-store-frozen":{type:"marker",description:"Applied at runtime to indicate store schema is locked in IndexedDB"}},a=Se(i),s="ln_app_cache",l="_meta",d="1.0";let c=null,w=null;const b={};function _(n){n&&n.name==="QuotaExceededError"&&v(document,"ln-data-store:quota-exceeded",{error:n})}function x(){const n={};for(const r of document.querySelectorAll(`[${e}]`)){const u=r.id;if(u){const f=r.getAttribute("data-ln-data-store-indexes")||"";n[u]={indexes:f.split(",").map(h=>h.trim()).filter(Boolean)}}}return n}function P(){return w||(w=new Promise(n=>{if(typeof indexedDB>"u")return console.warn("[ln-data-store] IndexedDB is not available in this environment"),n(null);const r=x(),u=Object.keys(r),f=indexedDB.open(s);f.onerror=()=>{console.warn("[ln-data-store] IndexedDB open failed"),n(null)},f.onsuccess=h=>{const y=h.target.result,p=Array.from(y.objectStoreNames),g=u.filter(T=>p.includes(T));let C={};if(g.length>0){const T=y.transaction(g,"readonly");for(const D of g)C[D]=Array.from(T.objectStore(D).indexNames)}if(!Lt(p,r,C,l))return F(y),c=y,n(y);const $=y.version;y.close();const R=indexedDB.open(s,$+1);let z=!1,O=null;R.onblocked=()=>{console.warn("[ln-data-store] Database upgrade blocked — waiting for other tabs to close connection"),v(document,"ln-data-store:blocked",{db:s}),O||(O=setTimeout(()=>{z||(console.warn("[ln-data-store] Database upgrade timed out while blocked"),z=!0,w=null,n(null))},5e3))},R.onerror=()=>{z||(O&&clearTimeout(O),z=!0,w=null,console.warn("[ln-data-store] Database upgrade failed"),n(null))},R.onupgradeneeded=T=>{const D=T.target.result,en=T.target.transaction;D.objectStoreNames.contains(l)||D.createObjectStore(l,{keyPath:"key"});for(const W of u)if(D.objectStoreNames.contains(W)){const ne=en.objectStore(W);for(const U of r[W].indexes)ne.indexNames.contains(U)||ne.createIndex(U,U,{unique:!1})}else{const ne=D.createObjectStore(W,{keyPath:"id"});for(const U of r[W].indexes)ne.createIndex(U,U,{unique:!1})}},R.onsuccess=T=>{if(z){T.target.result&&T.target.result.close();return}O&&clearTimeout(O),z=!0;const D=T.target.result;F(D),c=D,n(D)}}}),w)}function F(n){n.onversionchange=()=>{n.close(),c=null,w=null}}function m(){return c?Promise.resolve(c):(w=null,P())}async function S(n){if(!M()||!n)return n;const r={...n},u=r.id,f=await gt(r);return!f||!f.encrypted?n:{...f,id:u}}async function q(n){return!n||!n.encrypted||!M()?n:bt(n,{silent:!0})}const N=(n,r)=>m().then(u=>u?u.transaction(n,r).objectStore(n):null);function A(n){return new Promise((r,u)=>{n.onsuccess=()=>r(n.result),n.onerror=()=>{_(n.error),u(n.error)}})}const k=n=>N(n,"readonly").then(r=>r?A(r.getAll()):[]).then(r=>M()?Promise.all(r.map(u=>q(u))):r),I=(n,r)=>N(n,"readonly").then(u=>u?A(u.get(r)).then(f=>f!==void 0?f:typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r))?A(u.get(Number(r))):typeof r=="number"?A(u.get(String(r))):null):null).then(u=>u?q(u):null),j=(n,r)=>m().then(u=>{if(!u)return[];const h=u.transaction(n,"readonly").objectStore(n),y=r.map(p=>A(h.get(p)).then(g=>g!==void 0?g:typeof p=="string"&&p.trim()!==""&&!isNaN(Number(p))?A(h.get(Number(p))):typeof p=="number"?A(h.get(String(p))):null));return Promise.all(y).then(p=>M()?Promise.all(p.map(g=>g?q(g):null)):p)}),Z=(n,r)=>(M()?S(r):Promise.resolve(r)).then(f=>N(n,"readwrite").then(h=>h?A(h.put(f)):null)),G=(n,r)=>N(n,"readwrite").then(u=>u?A(u.delete(r)).then(()=>{if(typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r)))return A(u.delete(Number(r)));if(typeof r=="number")return A(u.delete(String(r)))}):null),K=n=>N(n,"readwrite").then(r=>r?A(r.clear()):null),B=n=>N(n,"readonly").then(r=>r?A(r.count()):0),Dt=n=>N(l,"readonly").then(r=>r?A(r.get(n)):null),X=(n,r)=>N(l,"readwrite").then(u=>{if(u)return r.key=n,A(u.put(r))});function L(n){return this.dom=n,this._name=n.id,this._name||console.warn("[ln-data-store] missing id — the store cannot be addressed",n),Ce(this,n,a),this._handlers=null,this.isLoaded=!1,this.canServe=!1,this.isInitialized=!1,this.initializationError=null,this.hasCache=!1,this.isSyncing=!1,this.lastSyncedAt=null,this.query={filters:{},search:"",sort:null},n.hasAttribute("data-ln-data-store-window")?this._windowIndex=xt({windowSize:this._windowSize,pageSize:this._windowPageSize,requestPage:(r,u,f)=>{v(this.dom,"ln-data-store:request-page",{store:this._name,offset:r,limit:u,query:f,queryGen:this._windowIndex.queryGen})}}):this._windowIndex=null,this.windowed=this._windowIndex!==null,this.totalCount=0,this.presenters=null,this._mutationChain=Promise.resolve(),b[this._name]=this,zt(this),this.ready=Ft(this),this}function zt(n){n._handlers={create:r=>Y(n,"create",r.detail,()=>Ot(n,r.detail)),update:r=>Y(n,"update",r.detail,()=>Rt(n,r.detail)),delete:r=>Y(n,"delete",r.detail,()=>Mt(n,r.detail)),"bulk-delete":r=>Y(n,"bulk-delete",r.detail,()=>Bt(n,r.detail)),"sync-failed":r=>{n.isSyncing=!1,v(n.dom,"ln-data-store:sync-error",{store:n._name,error:r.detail&&r.detail.error,status:r.detail&&r.detail.status})}};for(const[r,u]of Object.entries(n._handlers))n.dom.addEventListener(`ln-data-store:request-${r}`,u);n._queryHandlers={"ln-search:change":r=>{r.preventDefault();const u=r.detail&&r.detail.term!=null?r.detail.term:"";u!==n.query.search&&(n.query.search=u,de(n))},"ln-filter:change":r=>{r.preventDefault();const u=r.detail&&r.detail.key;if(!u)return;const f=(r.detail.values||[]).slice(),h=n.query.filters[u];(h?h.length===f.length&&h.every((p,g)=>p===f[g]):!f.length)||(f.length?n.query.filters[u]=f:delete n.query.filters[u],de(n))},"ln-sort:change":r=>{r.preventDefault();const u=r.detail&&r.detail.field,f=r.detail&&r.detail.direction,h=f&&f!=="none"?{field:u,direction:f}:null,y=n.query.sort;!y&&!h||y&&h&&y.field===h.field&&y.direction===h.direction||(n.query.sort=h,de(n))}};for(const[r,u]of Object.entries(n._queryHandlers))n.dom.addEventListener(r,u)}function Y(n,r,u,f){const h=u&&u.requestId;return n._mutationChain=n._mutationChain.then(()=>n.ready).then(()=>{if(n.initializationError)throw n.initializationError;return f()}).catch(y=>Pt(n,r,h,y)),n._mutationChain}function ee(n,r=0){return B(n._name).then(u=>{if(n._windowIndex||n.windowed){const f=n.totalCount!=null?n.totalCount:u;n.totalCount=Math.max(0,f+r)}else n.totalCount=u;return n.hasCache=!0,n.isLoaded=!0,n.canServe=!0,X(n._name,{schema_version:d,last_synced_at:n.lastSyncedAt,has_cache:!0,record_count:n.totalCount})})}function Ot(n,{tempId:r,data:u={},requestId:f}={}){const h={...u,id:r};return Z(n._name,h).then(()=>ee(n,1)).then(()=>{v(n.dom,"ln-data-store:created",{store:n._name,record:h,tempId:r,requestId:f})})}function Rt(n,{id:r,data:u={},requestId:f}={}){return I(n._name,r).then(h=>{if(!h)throw new Error(`Record not found: ${r}`);const y=h.id,p={...h,...u,id:y},g=u.id,C=g!==void 0&&g!==y;return(C?jt(n._name,y,{...p,id:g}):Z(n._name,p)).then(()=>ee(n,0)).then(()=>{v(n.dom,"ln-data-store:updated",{store:n._name,record:C?{...p,id:g}:p,previous:h,requestId:f})})})}function Mt(n,{id:r,requestId:u}={}){return I(n._name,r).then(f=>{if(!f){v(n.dom,"ln-data-store:deleted",{store:n._name,id:r,requestId:u,missing:!0});return}const h=f.id;return G(n._name,h).then(()=>ee(n,-1)).then(()=>{v(n.dom,"ln-data-store:deleted",{store:n._name,id:h,requestId:u})})})}function Bt(n,{ids:r=[],requestId:u}={}){return r.length?Promise.all(r.map(f=>I(n._name,f))).then(f=>{const h=f.filter(Boolean).map(y=>y.id);return te(n._name,h).then(()=>ee(n,-h.length)).then(()=>{v(n.dom,"ln-data-store:deleted",{store:n._name,ids:h,requestId:u})})}):(v(n.dom,"ln-data-store:deleted",{store:n._name,ids:[],requestId:u}),Promise.resolve())}function Pt(n,r,u,f){console.error("[ln-data-store] "+r+" failed:",f),v(n.dom,"ln-data-store:mutation-error",{store:n._name,action:r,requestId:u,error:f})}function Ft(n){return P().then(r=>{if(!r)throw new Error("IndexedDB is unavailable");return Dt(n._name)}).then(r=>{if(n.initializationError=null,r&&r.schema_version===d)n.lastSyncedAt=r.last_synced_at||null,n.totalCount=r.record_count||0,n.hasCache=r.has_cache===!0||n.totalCount>0,n.hasCache&&(n.isLoaded=!0,n.canServe=!0,v(n.dom,"ln-data-store:ready",{store:n._name,count:n.totalCount,source:"cache"})),n.isInitialized=!0,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:n.hasCache,lastSyncedAt:n.lastSyncedAt,count:n.totalCount});else{if(r&&r.schema_version!==d)return K(n._name).then(()=>X(n._name,{schema_version:d,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{n.isInitialized=!0,n.hasCache=!1,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:!1,lastSyncedAt:null,count:0})});n.isInitialized=!0,n.hasCache=!1,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:!1,lastSyncedAt:null,count:0})}}).catch(r=>(n.isInitialized=!0,n.isLoaded=!1,n.canServe=!1,n.hasCache=!1,n.isSyncing=!1,n.initializationError=r,v(n.dom,"ln-data-store:initialization-error",{store:n._name,error:r}),{ok:!1,error:r}))}function ze(n){n.isSyncing=!0,v(n.dom,"ln-data-store:request-remote-sync",{since:n.lastSyncedAt})}function Oe(n,r){return m().then(u=>u?(M()?Promise.all(r.map(h=>S(h))):Promise.resolve(r)).then(h=>new Promise((y,p)=>{const g=u.transaction(n,"readwrite"),C=g.objectStore(n);h.forEach(E=>C.put(E)),g.oncomplete=()=>y(),g.onerror=()=>{_(g.error),p(g.error)}})):void 0)}function te(n,r){return m().then(u=>{if(u)return new Promise((f,h)=>{const y=u.transaction(n,"readwrite"),p=y.objectStore(n);r.forEach(g=>{p.delete(g),typeof g=="string"&&g.trim()!==""&&!isNaN(Number(g))?p.delete(Number(g)):typeof g=="number"&&p.delete(String(g))}),y.oncomplete=()=>f(),y.onerror=()=>h(y.error)})})}function jt(n,r,u){return(M()?S(u):Promise.resolve(u)).then(h=>m().then(y=>{if(y)return new Promise((p,g)=>{const C=y.transaction(n,"readwrite"),E=C.objectStore(n);E.put(h),E.delete(r),C.oncomplete=()=>p(),C.onerror=()=>{_(C.error),g(C.error)}})}))}const $t=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function Kt(n){return n?Object.keys(n).filter(r=>Array.isArray(n[r])&&n[r].length>0):[]}function Ut(n,r,u){return r.every(f=>u[f].map(String).includes(String(n[f])))}function Vt(n){return String(n||"").toLowerCase().split(/\s+/).filter(Boolean)}function Gt(n,r,u){return r.every(f=>u.some(h=>{const y=n[h];return y!=null&&String(y).toLowerCase().includes(f)}))}function Ht(n,r,u){return Et(n,r,u)}function H(n,r){return Nt(r,n.presenters&&n.presenters.computed)}function Wt(n){return!n.sort&&!M()}function Qt(n,r,u){const f=Kt(r.filters),h=r.search?Vt(r.search):[],y=n._searchFields,p=h.length>0&&y&&y.length>0;return N(n._name,"readonly").then(g=>g?new Promise((C,E)=>{const $=[],R=g.openCursor();R.onsuccess=()=>{const z=R.result;if(!z||$.length>=u){C($);return}const O=z.value;(!f.length||Ut(O,f,r.filters))&&(!p||Gt(O,h,y))&&$.push(O),z.continue()},R.onerror=()=>E(R.error)}):[])}function Re(n,r,u){return qt(r,u,n._searchFields,$t)}function Me(n,r,u){const f=[];for(let y=r;y<r+u;y++){const p=n._windowIndex.getId(y);f.push(p)}const h=Array.from(new Set(f.filter(y=>y!==void 0)));return j(n._name,h).then(y=>{const p=new Map;for(let C=0;C<y.length;C++){const E=y[C];E&&p.set(String(E.id),E)}const g=[];for(let C=0;C<f.length;C++){const E=f[C];if(E===void 0)g.push(null);else{const $=p.get(String(E));g.push($||null)}}return{data:H(n,g),total:n._windowIndex.grandTotal,filtered:n._windowIndex.logicalTotal,offset:r,queryGen:n._windowIndex.queryGen}})}L.prototype.getAll=function(n={}){const r=this;if(r._windowIndex){const u=n.offset||0,f=n.limit||200;if(r._windowIndex.ensure(u,u+f,n),!r._windowIndex.hasLoaded&&!r.noLocalQuery){const h=u+f,y=p=>p.length?{data:H(r,p),offset:u,queryGen:r._windowIndex.queryGen,provisional:!0}:Me(r,u,f);return Wt(n)?Qt(r,n,h).then(p=>y(p.slice(u,h))):k(r._name).then(p=>y(Re(r,p,n).records))}return Me(r,u,f)}return k(r._name).then(u=>{const f=Re(r,u,n);return{data:H(r,f.records),total:f.total,filtered:f.filtered}})},L.prototype.getById=function(n){return I(this._name,n).then(r=>r?H(this,[r])[0]:null)},L.prototype.count=function(n){return n&&Object.keys(n).length>0?k(this._name).then(u=>De(u,n).length):this.windowed&&this.totalCount!=null?Promise.resolve(this.totalCount):B(this._name)},L.prototype.aggregate=function(n,r){return k(this._name).then(u=>Ht(u,n,r))},L.prototype.setPresenters=function(n){this.presenters=n},L.prototype.applySync=function(n,r,u,f){f=f||{};const h=this;if(h._windowIndex&&f.queryGen!=null&&f.queryGen!==h._windowIndex.queryGen)return Promise.resolve({ok:!0,stale:!0});let y=m().then(p=>{if(!p)throw new Error("IndexedDB unavailable")});return n.length>0&&(y=y.then(()=>Oe(h._name,n))),r.length>0&&(y=y.then(()=>te(h._name,r))),y.then(()=>{if(h._windowIndex&&(f.offset!=null||f.total!=null)){const p=f.offset!=null?f.offset:0,g=n.map(E=>E.id),C=h._windowIndex.ingest(p,g,f.total,f.filtered,f.queryGen);if(C&&C.length)return te(h._name,C)}}).then(()=>B(h._name)).then(p=>(h.totalCount=f.total!==void 0?f.total:p,h.hasCache=!0,X(h._name,{schema_version:d,last_synced_at:u,has_cache:!0,record_count:h.totalCount}))).then(()=>{const p=!h.isLoaded;return h.isLoaded=!0,h.canServe=!0,h.isSyncing=!1,h.lastSyncedAt=u,p?(v(h.dom,"ln-data-store:loaded",{store:h._name,count:h.totalCount,meta:f}),v(h.dom,"ln-data-store:ready",{store:h._name,count:h.totalCount,source:"server",meta:f})):v(h.dom,"ln-data-store:synced",{store:h._name,added:n.length,deleted:r.length,changed:!0,meta:f}),{ok:!0}}).catch(p=>{h.isSyncing=!1;const g=p&&p.message?p.message:String(p);return console.error("[ln-data-store] applySync failed:",p),v(h.dom,"ln-data-store:sync-error",{store:h._name,error:g}),Tt(p)})},L.prototype.applyQuery=function(n,r){r=r||{};const u=this;let f=Promise.resolve();return n.length>0&&(f=f.then(()=>Oe(u._name,n))),f.then(()=>B(u._name)).then(h=>(u.totalCount=r.total!==void 0?r.total:h,n.length>0&&(u.canServe=!0),H(u,n))).catch(h=>(console.error("[ln-data-store] applyQuery failed:",h),[]))},L.prototype.forceSync=function(){this.isSyncing||ze(this)},L.prototype.fullReload=function(){const n=this;return K(n._name).then(()=>X(n._name,{schema_version:d,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{n.isLoaded=!1,n.hasCache=!1,n.lastSyncedAt=null,n.totalCount=0,ze(n)})},L.prototype.destroy=function(){if(this._windowIndex&&(this._windowIndex.clear(),this._windowIndex=null,this.windowed=!1),this._handlers){for(const[n,r]of Object.entries(this._handlers))this.dom.removeEventListener(`ln-data-store:request-${n}`,r);this._handlers=null}if(this._queryHandlers){for(const[n,r]of Object.entries(this._queryHandlers))this.dom.removeEventListener(n,r);this._queryHandlers=null}delete b[this._name],delete this.dom[t]};function Jt(){return m().then(n=>{if(!n)return;const r=Array.from(n.objectStoreNames);return new Promise((u,f)=>{const h=n.transaction(r,"readwrite");r.forEach(y=>h.objectStore(y).clear()),h.oncomplete=()=>u(),h.onerror=()=>f(h.error)})}).then(()=>{Object.values(b).forEach(n=>{n.isLoaded=!1,n.canServe=!1,n.isInitialized=!1,n.initializationError=null,n.hasCache=!1,n.isSyncing=!1,n.lastSyncedAt=null,n.totalCount=0})})}function de(n){n._windowIndex&&n._windowIndex.reset(),v(n.dom,"ln-data-store:query-changed",{store:n._name,query:{filters:Object.assign({},n.query.filters),search:n.query.search,sort:n.query.sort?Object.assign({},n.query.sort):null}})}const Zt="data-ln-data-store-frozen";function Be(n,r){n.setAttribute(Zt,r)}function Xt(n){const r=n[t];if(!r._windowIndex)return;const u=r._windowIndex.configure({windowSize:r._windowSize});u.length&&te(r._name,u).catch(f=>{console.error("[ln-data-store] window shrink eviction failed:",f)})}function Yt(n){const r=n[t];r._windowIndex&&r._windowIndex.configure({pageSize:r._windowPageSize})}ke(e,t,L,"ln-data-store",{attributes:i}),window[t].clearAll=Jt,window[t].init=window[t],window[t].setStorageKey=Te,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.setStorageKey=Te)})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function q(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function N(t){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return t?window.lnCore._debugIsContained(t):window.lnCore._debugSink!==null;if(t&&t.closest){const e=t.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const t=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let i=null;for(let o=1;o<e.length;o++)if(e[o]&&e[o].nodeType===1){i=e[o];break}if(!N(i))return}t.apply(console,e)}}function P(t,e,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,i),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:i}))}function M(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){M(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function Z(t,e,{get:n,set:i}){Object.defineProperty(t,"value",{get:function(){return n?n.call(this):e.get.call(this)},set:function(o){i?i.call(this,o,l=>e.set.call(this,l)):e.set.call(this,o)},configurable:!0})}const j={};function tt(t,e){j[t]=e}function et(t){return j[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=tt,window.lnCore.getDataMapper=et);function L(t){const e=t?t.closest("[lang]"):null,n=(e?e.getAttribute("lang")||e.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function H(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,M(function(){new MutationObserver(function(){P(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function U(t,e){if(!t||typeof e!="object")return;const n=t.toLowerCase().split("-")[0];W[n]=e}function k(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return W[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=U,window.lnCore.getLocaleFallback=k,window.lnCore.ensureLocaleObserver=H);const F={};function nt(t,e){F[t]||(F[t]=document.querySelector('[data-ln-template="'+t+'"]'));const n=F[t];return n?n.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function K(t,e){if(!t||!e)return t;const n=t.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const u=n[s],c=u.getAttribute("data-ln-field");e[c]!=null&&(u.textContent=e[c])}const i=t.querySelectorAll("[data-ln-attr]");for(let s=0;s<i.length;s++){const u=i[s],c=u.getAttribute("data-ln-attr").split(",");for(let r=0;r<c.length;r++){const a=c[r].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),h=a[1].trim();e[h]!=null&&u.setAttribute(d,e[h])}}const o=t.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const u=o[s],c=u.getAttribute("data-ln-show");c in e&&u.classList.toggle("hidden",!e[c])}const l=t.querySelectorAll("[data-ln-class]");for(let s=0;s<l.length;s++){const u=l[s],c=u.getAttribute("data-ln-class").split(",");for(let r=0;r<c.length;r++){const a=c[r].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),h=a[1].trim();h in e&&u.classList.toggle(d,!!e[h])}}return t}function rt(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",t,e??null),t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const n=t.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],e??null),n[i].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)K(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let n=0;n<e.length;n++)e[n].textContent=""}})));function Y(t,e){if(!t||!e)return t;const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const l=n.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,u){return e[u]!==void 0?e[u]:""}))}const i=function(l,s){return e[s]!==void 0?e[s]:""},o=Array.from(t.querySelectorAll("*"));t.nodeType===1&&o.push(t);for(let l=0;l<o.length;l++){const s=o[l],u=s.attributes;for(let c=0;c<u.length;c++){const r=u[c];r.value.indexOf("{{")!==-1&&s.setAttribute(r.name,r.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return t}function it(t,e,n,i,o,l){const s={};for(let c=0;c<t.children.length;c++){const r=t.children[c],a=r.getAttribute("data-ln-render-key");a&&(s[a]=r)}const u=document.createDocumentFragment();for(let c=0;c<e.length;c++){const r=e[c],a=String(i(r));let d=s[a];if(d)o(d,r,c);else{const h=nt(n,l);if(!h||(Y(h,r),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",a),o(d,r,c)}u.appendChild(d)}t.textContent="",t.appendChild(u)}function ot(t,e){const n={},i=t.querySelectorAll("["+e+"]");for(let o=0;o<i.length;o++)n[i[o].getAttribute(e)]=i[o].textContent,i[o].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Y,window.lnCore.fill=K,window.lnCore.lnFill=rt,window.lnCore.renderList=it);function Q(t,e,n,i,o){if(!t||e===null)return!0;const l=i||"ln-component",s=t.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||e===""&&t.fallback!==void 0)return!0;const u=c=>{o?console.warn(c,o):console.warn(c)};if(s==="boolean"){const c=e.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(u(`[${l}] Invalid value "${e}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const c=t.values||[];return c.includes(e)?!0:(u(`[${l}] Invalid value "${e}" for attribute "${n}". Allowed: ${c.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(e))return u(`[${l}] Invalid integer "${e}" for attribute "${n}". Fallback: ${t.fallback}.`),!1;const c=parseInt(e,10);return t.min!==void 0&&c<t.min?(u(`[${l}] Value ${c} for attribute "${n}" is less than min (${t.min}).`),!1):t.max!==void 0&&c>t.max?(u(`[${l}] Value ${c} for attribute "${n}" is greater than max (${t.max}).`),!1):!0}if(s==="float")return isNaN(Number(e))?(u(`[${l}] Invalid float "${e}" for attribute "${n}". Fallback: ${t.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(e),!0}catch(c){return u(`[${l}] Invalid JSON for attribute "${n}": ${c.message}. Fallback: ${t.fallback}.`),!1}return!0}function lt(t){const e={};for(const n in t){const i=t[n];i&&i.effect&&(e[n]=i.effect)}return Object.keys(e).length?e:null}function st(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const n in t.effects)e.add(n);if(t.onAttrChange&&t.declared)for(const n of t.declared)e.add(n);return e}function R(t,e,n,i){if(t.nodeType!==1)return;const l=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",s=Array.from(t.querySelectorAll(l));t.matches&&t.matches(l)&&s.push(t);for(const u of s)if(!u[n]){window.lnCore._persistSink&&u.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(u,e);try{u[n]=new i(u)}catch(c){console.error("["+n+"] init failed",u,c)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function at(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ct(t){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(t):setTimeout(t,0)):t()}function G(){window.lnCore=window.lnCore||{};const t=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return t.byReactive=t.byReactive||new Map,t.reactiveWildcard=t.reactiveWildcard||[],t}function ut(t){const e=G(),n=t.observed||[];for(let i=0;i<n.length;i++){const o=n[i];e.byAttr.has(o)||e.byAttr.set(o,[]),e.byAttr.get(o).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const i in t.attributes){e.byDeclaredAttr.has(i)||e.byDeclaredAttr.set(i,[]);const o=e.byDeclaredAttr.get(i);o.some(l=>l.componentTag===t.componentTag)||o.push({spec:t.attributes[i],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const i=st(t);if(i===null)e.reactiveWildcard.push(t);else for(const o of i)e.byReactive.has(o)||e.byReactive.set(o,[]),e.byReactive.get(o).push(t)}t.persist&&e.persist.push(t)}function J(t,e,n,i){for(let o=0;o<t.length;o++){const l=t[o];if(!e[l.attribute])continue;const s=l.effects&&l.effects[n];s?s(e,n,i):l.onAttrChange&&(!l.declared||l.declared.has(n))&&l.onAttrChange(e,n,i)}}function dt(t){const e=t.target,n=t.attributeName;if(t.oldValue===e.getAttribute(n))return;const i=G(),o=i.byAttr.get(n);if(q()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(n)&&N(e)){const l=i.byDeclaredAttr.get(n),s=e.getAttribute(n);for(let u=0;u<l.length;u++)Q(l[u].spec,s,n,l[u].componentTag,e)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,e,{oldValue:t.oldValue,newValue:e.getAttribute(n)}),n.indexOf("data-ln-")===0){const l=i.byReactive.get(n);l&&J(l,e,n,t.oldValue),i.reactiveWildcard.length&&J(i.reactiveWildcard,e,n,t.oldValue)}if(o)for(let l=0;l<o.length;l++){const s=o[l];if(s.handler){s.handler(e,n,t.oldValue);continue}s.onAttributeChange&&e[s.attribute]?s.onAttributeChange(e,n):(R(e,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(e))}}function ft(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,M(function(){new MutationObserver(function(e){for(let n=0;n<e.length;n++)try{dt(e[n])}catch(i){console.error("[ln-core] mutation handler failed",e[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function X(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ht(t){const e=X();if(e.length){if(t.target)for(let n=0;n<e.length;n++){const i=e[n];if(i.onSubtreeChange){const o=i.query,l=t.target.nodeType===1?t.target.matches(o)?t.target:t.target.closest(o):t.target.parentElement?t.target.parentElement.closest(o):null;l&&i.onSubtreeChange(l,t)}}for(let n=0;n<t.addedNodes.length;n++){const i=t.addedNodes[n];if(i.nodeType===1)for(let o=0;o<e.length;o++){const l=e[o];R(i,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(i)}}for(let n=0;n<t.removedNodes.length;n++){const i=t.removedNodes[n];if(i.nodeType===1)for(let o=0;o<e.length;o++){const l=e[o],s=l.query,u=Array.from(i.querySelectorAll(s));i.matches&&i.matches(s)&&u.push(i);for(let c=0;c<u.length;c++){const r=u[c];if(!document.contains(r)){const a=r[l.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(d){console.error("["+l.attribute+"] destroy failed",r,d)}delete r[l.attribute]}}}}}}function mt(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,M(function(){new MutationObserver(function(e){for(let n=0;n<e.length;n++){const i=e[n];if(i.type==="childList")try{ht(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function gt(t,e,n,i,o={}){const l=o.extraAttributes||[],s=o.onAttributeChange||null,u=o.onSubtreeChange||null,c=o.onInit||null,r=o.onAttrChange||null,a=o.effects||null,d=o.attributes||null,h=d?lt(d):a,b=d?new Set(Object.keys(d)):null,p=o.persist||null;function w(m){const g=m||document.body;if(R(g,t,e,n),d&&q())for(const y in d){const A=d[y],v=Array.from(g.querySelectorAll("["+y+"]"));g.matches&&g.matches("["+y+"]")&&v.push(g);for(let O=0;O<v.length;O++){const E=v[O];N(E)&&Q(A,E.getAttribute(y),y,i,E)}}c&&c(g)}const C=[];if(t.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let g;for(;(g=m.exec(t))!==null;)C.push(g[1])}else C.push(t);ut({selector:t,attribute:e,componentTag:i,attributes:d,ComponentFn:n,onInit:c,observed:C.concat(l),onAttributeChange:s,onAttrChange:r,effects:h,declared:b,persist:p}),ft();const D=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]";X().push({selector:t,attribute:e,ComponentFn:n,onInit:c,onSubtreeChange:u,query:D}),mt(),window[e]=w;function f(){at()>0?ct(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),w}function z(t){return(t||"").replace(/^#/,"")}function $(t){const e=t===void 0?location.hash:t,n={},i=z(e);if(!i)return n;const o=i.split("&");for(let l=0;l<o.length;l++){const s=o[l];if(!s)continue;const u=s.indexOf(":"),c=u>-1?s.slice(0,u):s,r=u>-1?s.slice(u+1):"";if(c)try{n[c]=decodeURIComponent(r)}catch{n[c]=r}}return n}function pt(t){if(!t)return null;const e=$();return t in e?e[t]:null}function wt(t,e){if(!t)return;const n=$();e==null?delete n[t]:n[t]=String(e);const o=Object.keys(n).map(function(l){const s=n[l];return s===""?l:l+":"+encodeURIComponent(s)}).join("&");z(location.hash)!==o&&(location.hash=o)}function bt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function yt(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const n=t.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const i=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return i?e?i+"-"+e:i:e||null}function Ct(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function _t(t){return!t||typeof t!="string"?null:t.endsWith(".asc")?{fieldOrColumn:t.slice(0,-4),direction:"asc"}:t.endsWith(".desc")?{fieldOrColumn:t.slice(0,-5),direction:"desc"}:null}function At(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function vt(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const n=t.slice(0,e),i=t.slice(e+1),o=i?i.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=pt,window.lnCore.hashSet=wt,window.lnCore.hashLinkClick=bt,window.lnCore.resolveHashNamespace=yt,window.lnCore.hashSortEncode=Ct,window.lnCore.hashSortDecode=_t,window.lnCore.hashFilterEncode=At,window.lnCore.hashFilterDecode=vt);function xt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=xt);function _(t){if(t==null||t==="")return null;if(t instanceof Date)return isNaN(t.getTime())?null:t;const e=Number(t);if(!isNaN(e)&&e>0){const n=e<1e11?e*1e3:e,i=new Date(n);return isNaN(i.getTime())?null:i}if(typeof t=="string"){const n=t.trim();if(!n)return null;const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i){const l=+i[1],s=+i[2],u=+i[3],c=new Date(l,s-1,u);return c.getFullYear()!==l||c.getMonth()!==s-1||c.getDate()!==u?null:c}const o=new Date(n);return isNaN(o.getTime())?null:o}return null}function S(t){if(!t||!(t instanceof Date)||isNaN(t.getTime()))return"";const e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return e+"-"+n+"-"+i}const B=/^(short|medium|long)(\s+datetime)?$/,St={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 Et(t){return!t||t===""?{dateStyle:"medium"}:String(t).trim().match(B)?St[t.trim()]:null}function T(t){if(!t||typeof t!="string")return null;const e=t.trim();if(e.length<6)return null;let n,i;if(e.indexOf(".")!==-1)n=".",i=e.split(".");else if(e.indexOf("/")!==-1)n="/",i=e.split("/");else if(e.indexOf("-")!==-1)n="-",i=e.split("-");else return null;if(i.length!==3)return null;const o=[];for(let r=0;r<3;r++){const a=parseInt(i[r],10);if(isNaN(a))return null;o.push(a)}let l,s,u;n==="."?(l=o[0],s=o[1],u=o[2]):n==="/"?(s=o[0],l=o[1],u=o[2]):i[0].length===4?(u=o[0],s=o[1],l=o[2]):(l=o[0],s=o[1],u=o[2]),u<100&&(u+=u<50?2e3:1900);const c=new Date(u,s-1,l);return c.getFullYear()!==u||c.getMonth()!==s-1||c.getDate()!==l?null:c}function V(t,e,n,i){if(!t||!(t instanceof Date)||isNaN(t.getTime())||!e||typeof e!="string")return"";const o=t.getDate(),l=t.getMonth(),s=t.getFullYear(),u=t.getHours(),c=t.getMinutes();let r,a;const d=(n||"").toLowerCase().split("-")[0];let h=!1;try{const w=new Intl.DateTimeFormat(n,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];h=!!(i&&w!==d)}catch{h=!!i}if(h&&i&&i.monthsLong)r=i.monthsLong[l];else try{r=new Intl.DateTimeFormat(n,{month:"long"}).format(t)}catch{r=String(l+1)}if(h&&i&&i.monthsShort)a=i.monthsShort[l];else try{a=new Intl.DateTimeFormat(n,{month:"short"}).format(t)}catch{a=String(l+1)}const b={yyyy:String(s),yy:String(s).slice(-2),MMMM:r,MMM:a,MM:String(l+1).padStart(2,"0"),M:String(l+1),dd:String(o).padStart(2,"0"),d:String(o),HH:String(u).padStart(2,"0"),mm:String(c).padStart(2,"0")};return e.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(p){return b[p]!==void 0?b[p]:p})}function I(t,e,n,i){if(!t||!(t instanceof Date)||isNaN(t.getTime()))return"";const o=Et(e);if(o)try{const l=new Intl.DateTimeFormat(n,o),s=(n||"").toLowerCase().split("-")[0],u=l.resolvedOptions().locale.toLowerCase().split("-")[0];return i&&u!==s?V(t,"dd.MM.yyyy",n,i):l.format(t)}catch{return V(t,"dd.MM.yyyy",n,i)}return V(t,e||"dd.MM.yyyy",n,i)}(function(){const t="data-ln-date",e="lnDate";if(window[e]!==void 0)return;function n(r){const a=r[e];if(a){if(a.isTextElement)a._initTextElement();else if(a.value){const d=_(a.value);d&&a._displayFormatted(d)}}}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 l(r,a,d){P(r.dom,"ln-date:change",{value:a,formatted:r.dom.value,date:d}),r.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function s(r,a,d,h){r._setHiddenRaw(a),o.set.call(r._picker,a),r._lastISO=a,h!==void 0?(r._isFormatting=!0,r.dom.value=h,r._isFormatting=!1):d&&r._displayFormatted(d),l(r,a,d)}function u(r){r._setHiddenRaw(""),o.set.call(r._picker,""),r._isFormatting=!0,r.dom.value="",r._isFormatting=!1,r._lastISO="",l(r,"",null)}function c(r){if(r[e])return r[e];r[e]=this,this.dom=r;const a=this;if(this._onLocaleChange=function(){if(a.isTextElement)a._formatTextContent();else if(a.value){const f=_(a.value);f&&a._displayFormatted(f)}},H(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),r.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=r.value,h=r.name,b=r.closest(".form-element, form")||r.parentNode;if(b){const f=b.querySelectorAll("[data-ln-date-dict]");for(let m=0;m<f.length;m++){const g=f[m].getAttribute("data-ln-date-dict");if(g){const y=ot(f[m],"data-ln-date-dict-key");y["months-long"]&&(y.monthsLong=y["months-long"].split(",").map(A=>A.trim())),y["months-short"]&&(y.monthsShort=y["months-short"].split(",").map(A=>A.trim())),U(g,y)}}}const p=document.createElement("span");p.setAttribute("data-ln-date-field",""),r.parentNode.insertBefore(p,r),p.appendChild(r),this._wrapper=p;const w=document.createElement("input");w.type="hidden",w.name=h,r.removeAttribute("name"),r.hasAttribute("data-ln-fill-as")&&w.setAttribute("data-ln-fill-as",r.getAttribute("data-ln-fill-as")),r.insertAdjacentElement("afterend",w),this._hidden=w;const C=document.createElement("input");C.type="date",C.tabIndex=-1,C.setAttribute("tabindex","-1"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-label",r.getAttribute("data-ln-date-label")||"Date picker"),C.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",w.insertAdjacentElement("afterend",C),this._picker=C,r.type="text";const x=document.createElement("button");x.type="button",x.setAttribute("aria-label",r.getAttribute("data-ln-date-label")||"Open date picker"),x.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',C.insertAdjacentElement("afterend",x),this._btn=x,this._lastISO="",Object.defineProperty(w,"value",{get:function(){return o.get.call(w)},set:function(f){if(o.set.call(w,f),f&&f!==""){const m=_(f);m&&s(a,f,m)}else f===""&&u(a)}}),Z(r,o,{get:function(){return o.get.call(r)},set:function(f,m){if(a._isFormatting){m(f);return}if(!f||f===""){m(""),u(a);return}const g=_(f)||T(f);if(g){const y=S(g),A=r.getAttribute(t)||"",v=L(r),O=k(v),E=I(g,A,v,O);m(E),s(a,y,g,E)}else m(String(f)),u(a)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&s(a,f,m)}else u(a)},C.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=a.dom.value.trim();if(f===""){a._lastISO!==""&&u(a);return}if(a._lastISO){const g=_(a._lastISO);if(g){const y=a.dom.getAttribute(t)||"",A=L(a.dom),v=k(A);if(f===I(g,y,A,v))return}}const m=T(f);if(m){const g=S(m);s(a,g,m)}else if(a._lastISO){const g=_(a._lastISO);g&&a._displayFormatted(g)}else a.dom.value=""},r.addEventListener("blur",this._onBlur),this._onBtnClick=function(){a._openPicker()},x.addEventListener("click",this._onBtnClick);const D=r.form;if(D&&(this._form=D,this._onFormReset=function(){setTimeout(function(){const f=a.dom.value;if(f){const m=_(f)||T(f);if(m){const g=S(m);s(a,g,m);return}}u(a)},0)},D.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&s(a,d,f)}return this}c.prototype._initTextElement=function(){const r=this.dom,a=r.getAttribute("data-ln-value"),d=r.getAttribute("data-ln-date"),h=r.getAttribute("datetime");let b=null;r.tagName==="TIME"&&h!==null&&h!==""?b=h:a!==null&&a!==""?b=a:h!==null&&h!==""?b=h:d!==null&&d!==""&&d!=="true"&&!B.test(d)?b=d:b=r.textContent.trim();const p=_(b)||T(b);if(p&&!isNaN(p.getTime())){const w=S(p);this._rawValue=w,r.tagName!=="TIME"&&!r.hasAttribute("data-ln-value")&&r.setAttribute("data-ln-value",w),this._formatTextContent()}else this._rawValue=null},c.prototype._formatTextContent=function(){if(this._rawValue){const r=_(this._rawValue);if(r){let d=this.dom.getAttribute("data-ln-date-format");if(!d){const p=this.dom.getAttribute("data-ln-date");p&&B.test(p)&&(d=p)}const h=L(this.dom),b=k(h);this.dom.textContent=I(r,d||"medium",h,b)}}},c.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},c.prototype._setHiddenRaw=function(r){o.set.call(this._hidden,r)},c.prototype._displayFormatted=function(r){const a=this.dom.getAttribute(t)||"",d=L(this.dom),h=k(d);this._isFormatting=!0,this.dom.value=I(r,a,d,h),this._isFormatting=!1},Object.defineProperty(c.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":o.get.call(this._hidden)},set:function(r){if(this.isTextElement){if(!r||r===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(r)||T(r);if(!d)return;const h=S(d);this._rawValue=h,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",h):this.dom.setAttribute("data-ln-value",h),this._formatTextContent();return}if(!r||r===""){u(this);return}const a=_(r);a&&s(this,r,a)}}),Object.defineProperty(c.prototype,"date",{get:function(){const r=this.value;return r?_(r):null},set:function(r){if(!r||!(r instanceof Date)||isNaN(r.getTime())){this.value="";return}this.value=S(r)}}),Object.defineProperty(c.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),c.prototype.destroy=function(){if(!this.dom[e])return;if(this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[e];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 r=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",r&&(this.dom.value=r),delete this.dom[e]},gt(t,e,c,"ln-date",{attributes:i,extraAttributes:["datetime","lang"],onAttributeChange:n})})()})();
1
+ (function(){"use strict";function P(){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 I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!I(r))return}e.apply(console,t)}}function H(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function M(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){M(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,s={};if(n)for(let c=0;c<a.length;c++){const l=a[c];l.name&&l.type==="checkbox"&&!l.disabled&&(s[l.name]=(s[l.name]||0)+1)}for(let c=0;c<a.length;c++){const l=a[c];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(r&&l.matches&&l.matches(r)))if(l.type==="checkbox")n&&s[l.name]===1?o[l.name]=l.checked:(o[l.name]||(o[l.name]=[]),l.checked&&o[l.name].push(l.value));else if(l.type==="radio")l.checked&&(o[l.name]=l.value);else if(l.type==="select-multiple"){o[l.name]=[];for(let i=0;i<l.options.length;i++)l.options[i].selected&&o[l.name].push(l.options[i].value)}else if(n&&l.type==="hidden")o[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const i=Number(l.value);o[l.name]=l.value===""||isNaN(i)?null:i}else o[l.name]=l.value}return o}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const n=e.elements,r=[],o={};for(let a=0;a<n.length;a++){const s=n[a];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let a=0;a<n.length;a++){const s=n[a];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const c=s.getAttribute("data-ln-fill-as")||s.name;if(!c||!(c in t))continue;const l=t[c];if(s.type==="checkbox"){if(Array.isArray(l))s.checked=l.indexOf(s.value)!==-1;else if(o[s.name]>1){const i=String(l).split(",").map(function(u){return u.trim()});s.checked=i.indexOf(s.value)!==-1}else s.checked=ue(l);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(l),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(l))for(let i=0;i<s.options.length;i++)s.options[i].selected=l.indexOf(s.options[i].value)!==-1;r.push(s)}else s.value=l,s.tagName==="SELECT"&&l!=null&&s.setAttribute("data-ln-value",l),r.push(s)}return r}function fe(e,t,{get:n,set:r}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(o){r?r.call(this,o,a=>t.set.call(this,a)):t.set.call(this,o)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=ae);const W={};function he(e,t){W[e]=t}function me(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=he,window.lnCore.getDataMapper=me);function L(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 U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,M(function(){new MutationObserver(function(){H(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const K={};function Q(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];K[n]=t}function E(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return K[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Q,window.lnCore.getLocaleFallback=E,window.lnCore.ensureLocaleObserver=U);const F={};function pe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const c=n[s],l=c.getAttribute("data-ln-field");t[l]!=null&&(c.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const c=r[s],l=c.getAttribute("data-ln-attr").split(",");for(let i=0;i<l.length;i++){const u=l[i].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();t[h]!=null&&c.setAttribute(d,t[h])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const c=o[s],l=c.getAttribute("data-ln-show");l in t&&c.classList.toggle("hidden",!t[l])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const c=a[s],l=c.getAttribute("data-ln-class").split(",");for(let i=0;i<l.length;i++){const u=l[i].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();h in t&&c.classList.toggle(d,!!t[h])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function J(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,c){return t[c]!==void 0?t[c]:""}))}const r=function(a,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const s=o[a],c=s.attributes;for(let l=0;l<c.length;l++){const i=c[l];i.value.indexOf("{{")!==-1&&s.setAttribute(i.name,i.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ge(e,t,n,r,o,a){const s={};for(let l=0;l<e.children.length;l++){const i=e.children[l],u=i.getAttribute("data-ln-render-key");u&&(s[u]=i)}const c=document.createDocumentFragment();for(let l=0;l<t.length;l++){const i=t[l],u=String(r(i));let d=s[u];if(d)o(d,i,l);else{const h=pe(n,a);if(!h||(J(h,i),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,i,l)}c.appendChild(d)}e.textContent="",e.appendChild(c)}function be(e,t){const n={},r=e.querySelectorAll("["+t+"]");for(let o=0;o<r.length;o++)n[r[o].getAttribute(t)]=r[o].textContent,r[o].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=J,window.lnCore.fill=Y,window.lnCore.lnFill=we,window.lnCore.renderList=ge);function R(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function z(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function G(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const B=new Map;function Z(e,t){const n=(e?e.join("|"):"")+"::"+t;if(B.has(n))return B.get(n);const r=new Set(e||[]),o=function(a,s){const c=a.getAttribute(s);return c!==null&&r.has(c)?c:t};return B.set(n,o),o}function ee(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function te(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function ne(e,t,n,r,o){if(!e||t===null)return!0;const a=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const c=l=>{o?console.warn(l,o):console.warn(l)};if(s==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(c(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const l=e.values||[];return l.includes(t)?!0:(c(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return c(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(c(`[${a}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(c(`[${a}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(c(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(l){return c(`[${a}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function ye(e,t,n){for(const r in n){const[o,a,s]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,a,s)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Z(r.values,r.fallback);break;case"integer":o=z;break;case"float":o=ee;break;case"boolean":o=G;break;case"list":o=X;break;case"json":o=te;break;case"string":default:o=R;break}o||(o=R),t[r.prop]=[o,n,r.fallback]}return t}function _e(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ye,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=R,window.lnCore.attrInt=z,window.lnCore.attrBool=G,window.lnCore.attrList=X,window.lnCore.attrEnum=Z,window.lnCore.attrFloat=ee,window.lnCore.attrJson=te);function $(e,t,n,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(a));e.matches&&e.matches(a)&&s.push(e);for(const c of s)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new r(c)}catch(l){console.error("["+n+"] init failed",c,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function xe(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 re(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Se(e){const t=re(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ve(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,n,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,r):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,r)}}function ke(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=re(),o=r.byAttr.get(n);if(P()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&I(t)){const a=r.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let c=0;c<a.length;c++)ne(a[c].spec,s,n,a[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const a=r.byReactive.get(n);a&&oe(a,t,n,e.oldValue),r.reactiveWildcard.length&&oe(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const s=o[a];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):($(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,M(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ie(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Oe(e){const t=ie();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,a=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;a&&r.onSubtreeChange(a,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const a=t[o];$(r,a.selector,a.attribute,a.ComponentFn),a.onInit&&a.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const a=t[o],s=a.query,c=Array.from(r.querySelectorAll(s));r.matches&&r.matches(s)&&c.push(r);for(let l=0;l<c.length;l++){const i=c[l];if(!document.contains(i)){const u=i[a.attribute];if(u&&typeof u.destroy=="function")try{u.destroy()}catch(d){console.error("["+a.attribute+"] destroy failed",i,d)}delete i[a.attribute]}}}}}}function Te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,M(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Oe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function le(e,t,n,r,o={}){const a=o.extraAttributes||[],s=o.onAttributeChange||null,c=o.onSubtreeChange||null,l=o.onInit||null,i=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,h=d?_e(d):u,b=d?new Set(Object.keys(d)):null,w=o.persist||null;function g(m){const p=m||document.body;if($(p,e,t,n),d&&P())for(const y in d){const v=d[y],x=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&x.push(p);for(let D=0;D<x.length;D++){const k=x[D];I(k)&&ne(v,k.getAttribute(y),y,r,k)}}l&&l(p)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let p;for(;(p=m.exec(e))!==null;)C.push(p[1])}else C.push(e);Se({selector:e,attribute:t,componentTag:r,attributes:d,ComponentFn:n,onInit:l,observed:C.concat(a),onAttributeChange:s,onAttrChange:i,effects:h,declared:b,persist:w}),Ee();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=o.subtreeQuery||(A?e:"["+e+"]");ie().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:c,query:T}),Te(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le);function f(){Ae()>0?xe(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function se(e){return(e||"").replace(/^#/,"")}function V(e){const t=e===void 0?location.hash:e,n={},r=se(t);if(!r)return n;const o=r.split("&");for(let a=0;a<o.length;a++){const s=o[a];if(!s)continue;const c=s.indexOf(":"),l=c>-1?s.slice(0,c):s,i=c>-1?s.slice(c+1):"";if(l)try{n[l]=decodeURIComponent(i)}catch{n[l]=i}}return n}function De(e){if(!e)return null;const t=V();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=V();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");se(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Be(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=V,window.lnCore.hashGet=De,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Ne,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=Re,window.lnCore.hashFilterDecode=Be);function $e(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=$e);function _(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,r=new Date(n);return isNaN(r.getTime())?null:r}if(typeof e=="string"){const n=e.trim();if(!n)return null;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(r){const a=+r[1],s=+r[2],c=+r[3],l=new Date(a,s-1,c);return l.getFullYear()!==a||l.getMonth()!==s-1||l.getDate()!==c?null:l}const o=new Date(n);return isNaN(o.getTime())?null:o}return null}function S(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return t+"-"+n+"-"+r}const j=/^(short|medium|long)(\s+datetime)?$/,Ve={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 je(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(j)?Ve[e.trim()]:null}function O(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let n,r;if(t.indexOf(".")!==-1)n=".",r=t.split(".");else if(t.indexOf("/")!==-1)n="/",r=t.split("/");else if(t.indexOf("-")!==-1)n="-",r=t.split("-");else return null;if(r.length!==3)return null;const o=[];for(let i=0;i<3;i++){const u=parseInt(r[i],10);if(isNaN(u))return null;o.push(u)}let a,s,c;n==="."?(a=o[0],s=o[1],c=o[2]):n==="/"?(s=o[0],a=o[1],c=o[2]):r[0].length===4?(c=o[0],s=o[1],a=o[2]):(a=o[0],s=o[1],c=o[2]),c<100&&(c+=c<50?2e3:1900);const l=new Date(c,s-1,a);return l.getFullYear()!==c||l.getMonth()!==s-1||l.getDate()!==a?null:l}function q(e,t,n,r){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const o=e.getDate(),a=e.getMonth(),s=e.getFullYear(),c=e.getHours(),l=e.getMinutes();let i,u;const d=(n||"").toLowerCase().split("-")[0];let h=!1;try{const g=new Intl.DateTimeFormat(n,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];h=!!(r&&g!==d)}catch{h=!!r}if(h&&r&&r.monthsLong)i=r.monthsLong[a];else try{i=new Intl.DateTimeFormat(n,{month:"long"}).format(e)}catch{i=String(a+1)}if(h&&r&&r.monthsShort)u=r.monthsShort[a];else try{u=new Intl.DateTimeFormat(n,{month:"short"}).format(e)}catch{u=String(a+1)}const b={yyyy:String(s),yy:String(s).slice(-2),MMMM:i,MMM:u,MM:String(a+1).padStart(2,"0"),M:String(a+1),dd:String(o).padStart(2,"0"),d:String(o),HH:String(c).padStart(2,"0"),mm:String(l).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(w){return b[w]!==void 0?b[w]:w})}function N(e,t,n,r){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const o=je(t);if(o)try{const a=new Intl.DateTimeFormat(n,o),s=(n||"").toLowerCase().split("-")[0],c=a.resolvedOptions().locale.toLowerCase().split("-")[0];return r&&c!==s?q(e,"dd.MM.yyyy",n,r):a.format(e)}catch{return q(e,"dd.MM.yyyy",n,r)}return q(e,t||"dd.MM.yyyy",n,r)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function n(i){const u=i[t];if(u){if(u.isTextElement)u._initTextElement();else if(u.value){const d=_(u.value);d&&u._displayFormatted(d)}}}const r={"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 a(i,u,d){H(i.dom,"ln-date:change",{value:u,formatted:i.dom.value,date:d}),i.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function s(i,u,d,h){i._setHiddenRaw(u),o.set.call(i._picker,u),i._lastISO=u,h!==void 0?(i._isFormatting=!0,i.dom.value=h,i._isFormatting=!1):d&&i._displayFormatted(d),a(i,u,d)}function c(i){i._setHiddenRaw(""),o.set.call(i._picker,""),i._isFormatting=!0,i.dom.value="",i._isFormatting=!1,i._lastISO="",a(i,"",null)}function l(i){if(i[t])return i[t];i[t]=this,this.dom=i;const u=this;if(this._onLocaleChange=function(){if(u.isTextElement)u._formatTextContent();else if(u.value){const f=_(u.value);f&&u._displayFormatted(f)}},U(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),i.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=i.value,h=i.name,b=i.closest(".form-element, form")||i.parentNode;if(b){const f=b.querySelectorAll("[data-ln-date-dict]");for(let m=0;m<f.length;m++){const p=f[m].getAttribute("data-ln-date-dict");if(p){const y=be(f[m],"data-ln-date-dict-key");y["months-long"]&&(y.monthsLong=y["months-long"].split(",").map(v=>v.trim())),y["months-short"]&&(y.monthsShort=y["months-short"].split(",").map(v=>v.trim())),Q(p,y)}}}const w=document.createElement("span");w.setAttribute("data-ln-date-field",""),i.parentNode.insertBefore(w,i),w.appendChild(i),this._wrapper=w;const g=document.createElement("input");g.type="hidden",g.name=h,i.removeAttribute("name"),i.hasAttribute("data-ln-fill-as")&&g.setAttribute("data-ln-fill-as",i.getAttribute("data-ln-fill-as")),i.insertAdjacentElement("afterend",g),this._hidden=g;const C=document.createElement("input");C.type="date",C.tabIndex=-1,C.setAttribute("tabindex","-1"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-label",i.getAttribute("data-ln-date-label")||"Date picker"),C.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",g.insertAdjacentElement("afterend",C),this._picker=C,i.type="text";const A=document.createElement("button");A.type="button",A.setAttribute("aria-label",i.getAttribute("data-ln-date-label")||"Open date picker"),A.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',C.insertAdjacentElement("afterend",A),this._btn=A,this._lastISO="",Object.defineProperty(g,"value",{get:function(){return o.get.call(g)},set:function(f){if(o.set.call(g,f),f&&f!==""){const m=_(f);m&&s(u,f,m)}else f===""&&c(u)}}),fe(i,o,{get:function(){return o.get.call(i)},set:function(f,m){if(u._isFormatting){m(f);return}if(!f||f===""){m(""),c(u);return}const p=_(f)||O(f);if(p){const y=S(p),v=i.getAttribute(e)||"",x=L(i),D=E(x),k=N(p,v,x,D);m(k),s(u,y,p,k)}else m(String(f)),c(u)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&s(u,f,m)}else c(u)},C.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=u.dom.value.trim();if(f===""){u._lastISO!==""&&c(u);return}if(u._lastISO){const p=_(u._lastISO);if(p){const y=u.dom.getAttribute(e)||"",v=L(u.dom),x=E(v);if(f===N(p,y,v,x))return}}const m=O(f);if(m){const p=S(m);s(u,p,m)}else if(u._lastISO){const p=_(u._lastISO);p&&u._displayFormatted(p)}else u.dom.value=""},i.addEventListener("blur",this._onBlur),this._onBtnClick=function(){u._openPicker()},A.addEventListener("click",this._onBtnClick);const T=i.form;if(T&&(this._form=T,this._onFormReset=function(){setTimeout(function(){const f=u.dom.value;if(f){const m=_(f)||O(f);if(m){const p=S(m);s(u,p,m);return}}c(u)},0)},T.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&s(u,d,f)}return this}l.prototype._initTextElement=function(){const i=this.dom,u=i.getAttribute("data-ln-value"),d=i.getAttribute("data-ln-date"),h=i.getAttribute("datetime");let b=null;i.tagName==="TIME"&&h!==null&&h!==""?b=h:u!==null&&u!==""?b=u:h!==null&&h!==""?b=h:d!==null&&d!==""&&d!=="true"&&!j.test(d)?b=d:b=i.textContent.trim();const w=_(b)||O(b);if(w&&!isNaN(w.getTime())){const g=S(w);this._rawValue=g,i.tagName!=="TIME"&&!i.hasAttribute("data-ln-value")&&i.setAttribute("data-ln-value",g),this._formatTextContent()}else this._rawValue=null},l.prototype._formatTextContent=function(){if(this._rawValue){const i=_(this._rawValue);if(i){let d=this.dom.getAttribute("data-ln-date-format");if(!d){const w=this.dom.getAttribute("data-ln-date");w&&j.test(w)&&(d=w)}const h=L(this.dom),b=E(h);this.dom.textContent=N(i,d||"medium",h,b)}}},l.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},l.prototype._setHiddenRaw=function(i){o.set.call(this._hidden,i)},l.prototype._displayFormatted=function(i){const u=this.dom.getAttribute(e)||"",d=L(this.dom),h=E(d);this._isFormatting=!0,this.dom.value=N(i,u,d,h),this._isFormatting=!1},Object.defineProperty(l.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":o.get.call(this._hidden)},set:function(i){if(this.isTextElement){if(!i||i===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(i)||O(i);if(!d)return;const h=S(d);this._rawValue=h,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",h):this.dom.setAttribute("data-ln-value",h),this._formatTextContent();return}if(!i||i===""){c(this);return}const u=_(i);u&&s(this,i,u)}}),Object.defineProperty(l.prototype,"date",{get:function(){const i=this.value;return i?_(i):null},set:function(i){if(!i||!(i instanceof Date)||isNaN(i.getTime())){this.value="";return}this.value=S(i)}}),Object.defineProperty(l.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),l.prototype.destroy=function(){if(!this.dom[t])return;if(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 i=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",i&&(this.dom.value=i),delete this.dom[t]},le(e,t,l,"ln-date",{attributes:r,extraAttributes:["datetime","lang"],onAttributeChange:n})})()})();
@@ -1 +1 @@
1
- var LnAshlarComponent=(function(y){"use strict";function L(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function A(t){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return t?window.lnCore._debugIsContained(t):window.lnCore._debugSink!==null;if(t&&t.closest){const e=t.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const t=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let a=null;for(let r=1;r<e.length;r++)if(e[r]&&e[r].nodeType===1){a=e[r];break}if(!A(a))return}t.apply(console,e)}}function Y(t,e){window.lnCore=window.lnCore||{},window.lnCore._debugSink=t,window.lnCore._debugIsContained=e||null}function Z(t,e,n){const a=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,a),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:a}))}function p(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}const M={};function tt(t,e){M[t]=e}function et(t){return M[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=tt,window.lnCore.getDataMapper=et);function nt(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){Z(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function at(t,e){if(!t||typeof e!="object")return;const n=t.toLowerCase().split("-")[0];R[n]=e}function ot(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return R[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=at,window.lnCore.getLocaleFallback=ot,window.lnCore.ensureLocaleObserver=nt);const x={};function lt(t,e){x[t]||(x[t]=document.querySelector('[data-ln-template="'+t+'"]'));const n=x[t];return n?n.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function W(t,e){if(!t||!e)return t;const n=t.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const d=n[l],i=d.getAttribute("data-ln-field");e[i]!=null&&(d.textContent=e[i])}const a=t.querySelectorAll("[data-ln-attr]");for(let l=0;l<a.length;l++){const d=a[l],i=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<i.length;s++){const c=i[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();e[f]!=null&&d.setAttribute(u,e[f])}}const r=t.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const d=r[l],i=d.getAttribute("data-ln-show");i in e&&d.classList.toggle("hidden",!e[i])}const o=t.querySelectorAll("[data-ln-class]");for(let l=0;l<o.length;l++){const d=o[l],i=d.getAttribute("data-ln-class").split(",");for(let s=0;s<i.length;s++){const c=i[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in e&&d.classList.toggle(u,!!e[f])}}return t}function rt(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",t,e??null),t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const n=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let a=0;a<n.length;a++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[a],e??null),n[a].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)W(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let n=0;n<e.length;n++)e[n].textContent=""}})));function j(t,e){if(!t||!e)return t;const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const o=n.currentNode;o.textContent.indexOf("{{")!==-1&&(o.textContent=o.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,d){return e[d]!==void 0?e[d]:""}))}const a=function(o,l){return e[l]!==void 0?e[l]:""},r=Array.from(t.querySelectorAll("*"));t.nodeType===1&&r.push(t);for(let o=0;o<r.length;o++){const l=r[o],d=l.attributes;for(let i=0;i<d.length;i++){const s=d[i];s.value.indexOf("{{")!==-1&&l.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return t}function it(t,e,n,a,r,o){const l={};for(let i=0;i<t.children.length;i++){const s=t.children[i],c=s.getAttribute("data-ln-render-key");c&&(l[c]=s)}const d=document.createDocumentFragment();for(let i=0;i<e.length;i++){const s=e[i],c=String(a(s));let u=l[c];if(u)r(u,s,i);else{const f=lt(n,o);if(!f||(j(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),r(u,s,i)}d.appendChild(u)}t.textContent="",t.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=W,window.lnCore.lnFill=rt,window.lnCore.renderList=it);function B(t,e,n,a,r){if(!t||e===null)return!0;const o=a||"ln-component",l=t.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||e===""&&t.fallback!==void 0)return!0;const d=i=>{r?console.warn(i,r):console.warn(i)};if(l==="boolean"){const i=e.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(d(`[${o}] Invalid value "${e}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const i=t.values||[];return i.includes(e)?!0:(d(`[${o}] Invalid value "${e}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(e))return d(`[${o}] Invalid integer "${e}" for attribute "${n}". Fallback: ${t.fallback}.`),!1;const i=parseInt(e,10);return t.min!==void 0&&i<t.min?(d(`[${o}] Value ${i} for attribute "${n}" is less than min (${t.min}).`),!1):t.max!==void 0&&i>t.max?(d(`[${o}] Value ${i} for attribute "${n}" is greater than max (${t.max}).`),!1):!0}if(l==="float")return isNaN(Number(e))?(d(`[${o}] Invalid float "${e}" for attribute "${n}". Fallback: ${t.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(e),!0}catch(i){return d(`[${o}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${t.fallback}.`),!1}return!0}function dt(t){const e={};for(const n in t){const a=t[n];a&&a.effect&&(e[n]=a.effect)}return Object.keys(e).length?e:null}function st(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const n in t.effects)e.add(n);if(t.onAttrChange&&t.declared)for(const n of t.declared)e.add(n);return e}function S(t,e,n,a){if(t.nodeType!==1)return;const o=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",l=Array.from(t.querySelectorAll(o));t.matches&&t.matches(o)&&l.push(t);for(const d of l)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,e);try{d[n]=new a(d)}catch(i){console.error("["+n+"] init failed",d,i)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function N(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function F(t){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(t):setTimeout(t,0)):t()}function V(){window.lnCore=window.lnCore||{};const t=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return t.byReactive=t.byReactive||new Map,t.reactiveWildcard=t.reactiveWildcard||[],t}function U(t){const e=V(),n=t.observed||[];for(let a=0;a<n.length;a++){const r=n[a];e.byAttr.has(r)||e.byAttr.set(r,[]),e.byAttr.get(r).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const a in t.attributes){e.byDeclaredAttr.has(a)||e.byDeclaredAttr.set(a,[]);const r=e.byDeclaredAttr.get(a);r.some(o=>o.componentTag===t.componentTag)||r.push({spec:t.attributes[a],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const a=st(t);if(a===null)e.reactiveWildcard.push(t);else for(const r of a)e.byReactive.has(r)||e.byReactive.set(r,[]),e.byReactive.get(r).push(t)}t.persist&&e.persist.push(t)}function H(t,e,n,a){for(let r=0;r<t.length;r++){const o=t[r];if(!e[o.attribute])continue;const l=o.effects&&o.effects[n];l?l(e,n,a):o.onAttrChange&&(!o.declared||o.declared.has(n))&&o.onAttrChange(e,n,a)}}function ct(t){const e=t.target,n=t.attributeName;if(t.oldValue===e.getAttribute(n))return;const a=V(),r=a.byAttr.get(n);if(L()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(n)&&A(e)){const o=a.byDeclaredAttr.get(n),l=e.getAttribute(n);for(let d=0;d<o.length;d++)B(o[d].spec,l,n,o[d].componentTag,e)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||r)&&window.lnCore._debugSink("attr",n,e,{oldValue:t.oldValue,newValue:e.getAttribute(n)}),n.indexOf("data-ln-")===0){const o=a.byReactive.get(n);o&&H(o,e,n,t.oldValue),a.reactiveWildcard.length&&H(a.reactiveWildcard,e,n,t.oldValue)}if(r)for(let o=0;o<r.length;o++){const l=r[o];if(l.handler){l.handler(e,n,t.oldValue);continue}l.onAttributeChange&&e[l.attribute]?l.onAttributeChange(e,n):(S(e,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(e))}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(e){for(let n=0;n<e.length;n++)try{ct(e[n])}catch(a){console.error("[ln-core] mutation handler failed",e[n].target,a)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function G(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ut(t){const e=G();if(e.length){if(t.target)for(let n=0;n<e.length;n++){const a=e[n];if(a.onSubtreeChange){const r=a.query,o=t.target.nodeType===1?t.target.matches(r)?t.target:t.target.closest(r):t.target.parentElement?t.target.parentElement.closest(r):null;o&&a.onSubtreeChange(o,t)}}for(let n=0;n<t.addedNodes.length;n++){const a=t.addedNodes[n];if(a.nodeType===1)for(let r=0;r<e.length;r++){const o=e[r];S(a,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(a)}}for(let n=0;n<t.removedNodes.length;n++){const a=t.removedNodes[n];if(a.nodeType===1)for(let r=0;r<e.length;r++){const o=e[r],l=o.query,d=Array.from(a.querySelectorAll(l));a.matches&&a.matches(l)&&d.push(a);for(let i=0;i<d.length;i++){const s=d[i];if(!document.contains(s)){const c=s[o.attribute];if(c&&typeof c.destroy=="function")try{c.destroy()}catch(u){console.error("["+o.attribute+"] destroy failed",s,u)}delete s[o.attribute]}}}}}}function ft(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(e){for(let n=0;n<e.length;n++){const a=e[n];if(a.type==="childList")try{ut(a)}catch(r){console.error("[ln-core] lifecycle handler failed",a.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function wt(t,e){U({observed:t,handler:e}),z()}function bt(t,e,n,a,r={}){const o=r.extraAttributes||[],l=r.onAttributeChange||null,d=r.onSubtreeChange||null,i=r.onInit||null,s=r.onAttrChange||null,c=r.effects||null,u=r.attributes||null,f=u?dt(u):c,$=u?new Set(Object.keys(u)):null,Lt=r.persist||null;function v(E){const w=E||document.body;if(S(w,t,e,n),u&&L())for(const g in u){const Rt=u[g],O=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&O.push(w);for(let T=0;T<O.length;T++){const q=O[T];A(q)&&B(Rt,q.getAttribute(g),g,a,q)}}i&&i(w)}const I=[];if(t.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let w;for(;(w=E.exec(t))!==null;)I.push(w[1])}else I.push(t);U({selector:t,attribute:e,componentTag:a,attributes:u,ComponentFn:n,onInit:i,observed:I.concat(o),onAttributeChange:l,onAttrChange:s,effects:f,declared:$,persist:Lt}),z();const Mt=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]";G().push({selector:t,attribute:e,ComponentFn:n,onInit:i,onSubtreeChange:d,query:Mt}),ft(),window[e]=v;function X(){N()>0?F(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),v}function Q(t){return(t||"").replace(/^#/,"")}function _(t){const e=t===void 0?location.hash:t,n={},a=Q(e);if(!a)return n;const r=a.split("&");for(let o=0;o<r.length;o++){const l=r[o];if(!l)continue;const d=l.indexOf(":"),i=d>-1?l.slice(0,d):l,s=d>-1?l.slice(d+1):"";if(i)try{n[i]=decodeURIComponent(s)}catch{n[i]=s}}return n}function pt(t){if(!t)return null;const e=_();return t in e?e[t]:null}function ht(t,e){if(!t)return;const n=_();e==null?delete n[t]:n[t]=String(e);const r=Object.keys(n).map(function(o){const l=n[o];return l===""?o:o+":"+encodeURIComponent(l)}).join("&");Q(location.hash)!==r&&(location.hash=r)}function mt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function gt(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const n=t.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const a=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return a?e?a+"-"+e:a:e||null}function yt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Ct(t){return!t||typeof t!="string"?null:t.endsWith(".asc")?{fieldOrColumn:t.slice(0,-4),direction:"asc"}:t.endsWith(".desc")?{fieldOrColumn:t.slice(0,-5),direction:"desc"}:null}function vt(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function At(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const n=t.slice(0,e),a=t.slice(e+1),r=a?a.split(",").map(function(o){try{return decodeURIComponent(o)}catch{return o}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=_,window.lnCore.hashGet=pt,window.lnCore.hashSet=ht,window.lnCore.hashLinkClick=mt,window.lnCore.resolveHashNamespace=gt,window.lnCore.hashSortEncode=yt,window.lnCore.hashSortDecode=Ct,window.lnCore.hashFilterEncode=vt,window.lnCore.hashFilterDecode=At);function xt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=xt);const k=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-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-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-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 St(t,e){if(t===e)return 0;if(!t.length)return e.length;if(!e.length)return t.length;const n=[];for(let a=0;a<=e.length;a++)n[a]=[a];for(let a=0;a<=t.length;a++)n[0][a]=a;for(let a=1;a<=e.length;a++)for(let r=1;r<=t.length;r++)e.charAt(a-1)===t.charAt(r-1)?n[a][r]=n[a-1][r-1]:n[a][r]=Math.min(n[a-1][r-1]+1,n[a][r-1]+1,n[a-1][r]+1);return n[e.length][t.length]}function _t(t,e=k){if(e.has(t))return null;let n=null,a=1/0;for(const o of e){const l=St(t,o);l<a&&(a=l,n=o)}const r=Math.max(3,Math.floor(t.length*.4));return a<=r?n:null}function K(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function kt(t=document){const e=t.ownerDocument||t,n=t.nodeType===9?t.body||t.documentElement:t;if(!n)return[];const a=[],r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length;o++){const l=r[o];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const i=l.attributes[d];if(i.name.startsWith("data-ln-")&&i.name.endsWith("-for")){const s=(i.value||"").trim();if(!s){a.push({type:"id-empty",element:l,attribute:i.name,targetId:"",message:`[ln-debug] Empty ID reference in <${l.tagName.toLowerCase()} ${i.name}="">.`});continue}e.getElementById(s)||e.querySelector("#"+K(s))||a.push({type:"id-unresolved",element:l,attribute:i.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${l.tagName.toLowerCase()} ${i.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function Dt(t=document){const e=t.ownerDocument||t,n=t.nodeType===9?t.body||t.documentElement:t;if(!n)return[];const a=[],r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length;o++){const l=r[o];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const i=l.attributes[d];if(i.name.startsWith("data-ln-")&&(i.name.endsWith("-source")||i.name.endsWith("-store"))&&i.name!=="data-ln-data-store"){const c=(i.value||"").trim();if(!c){a.push({type:"store-empty",element:l,attribute:i.name,storeName:"",message:`[ln-debug] Empty store reference in <${l.tagName.toLowerCase()} ${i.name}="">.`});continue}const u=K(c),f=e.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),$=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!$&&a.push({type:"store-unresolved",element:l,attribute:i.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${l.tagName.toLowerCase()} ${i.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function $t(t=document){t.ownerDocument;const e=t.nodeType===9?t.body||t.documentElement:t;if(!e)return[];const n=[],a=Array.from(e.querySelectorAll("[data-ln-data-store]"));e.hasAttribute&&e.hasAttribute("data-ln-data-store")&&a.unshift(e);const r=new Map;for(let o=0;o<a.length;o++){const l=a[o],d=(l.getAttribute("data-ln-data-store")||"").trim();d&&(r.has(d)||r.set(d,[]),r.get(d).push(l))}for(const[o,l]of r.entries())l.length>1&&n.push({type:"store-duplicate",storeName:o,elements:l,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${o}". Store names must be unique across the document.`});return n}function It(t=document,e=k){const n=t.nodeType===9?t.body||t.documentElement:t;if(!n)return[];const a=[],r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length;o++){const l=r[o];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const i=l.attributes[d];if(i.name.startsWith("data-ln-")&&!e.has(i.name)){const s=_t(i.name,e),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:l,attribute:i.name,suggestion:s,message:`[ln-debug] Unknown attribute "${i.name}" on <${l.tagName.toLowerCase()}>.${c}`})}}}return a}function C(t=typeof document<"u"?document:null,e={}){if(!t)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=e.validAttributes||k,a=kt(t),r=Dt(t),o=$t(t),l=It(t,n),d=[...a,...r,...o,...l];if(!e.silent)for(let i=0;i<d.length;i++)console.warn(d[i].message);return{idIssues:a,storeIssues:r,uniquenessIssues:o,spellingIssues:l,total:d.length}}let h=null;function m(t=typeof document<"u"?document:null,e=50,n=null){if(!t)return;h&&(clearTimeout(h),h=null);function a(){h=setTimeout(()=>{h=null;const r=C(t);n&&n(r)},e)}N()>0?F(a):a()}function Et(t,e,n,a){t==="event"?(console.groupCollapsed("[ln-debug] event",e),console.log("target",n),console.log("detail",a),console.groupEnd()):t==="attr"&&(console.groupCollapsed("[ln-debug] attr",e),console.log("target",n),console.log("old → new",a.oldValue,"→",a.newValue),console.groupEnd())}let b=[];function Ot(){b=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&b.push(document.body)}function J(t){if(t===window||t===document)return b.indexOf(document.body)!==-1;for(let e=0;e<b.length;e++)if(b[e].contains(t))return!0;return!1}function Tt(t,e,n,a){J(n)&&Et(t,e,n,a)}function D(){Ot(),Y(b.length>0?Tt:null,b.length>0?J:null)}function P(){D()}function qt(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,p(function(){D(),wt(["data-ln-debug"],D)},"ln-debug")))}return(function(){const t="data-ln-debug",e="lnDebug";if(typeof window<"u"&&window[e]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};qt();function a(o){return this.dom=o,m(o.ownerDocument||document),P(),this}a.prototype.verify=function(o,l){return C(o||(this.dom?this.dom.ownerDocument||this.dom:document),l)},a.prototype.destroy=function(){delete this.dom[e],P()};const r=bt(t,e,a,"ln-debug",{attributes:n,onInit:function(o){typeof document<"u"&&m(o&&o.ownerDocument?o.ownerDocument:document)},onSubtreeChange:function(o){typeof document<"u"&&m(o&&o.ownerDocument?o.ownerDocument:document)}});r.verify=function(o,l){return C(o||document,l)},r.schedule=function(o,l,d){return m(o||document,l,d)}})(),y.scheduleVerification=m,y.verifyDOM=C,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y})({});
1
+ var LnAshlarComponent=(function(y){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function A(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let a=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){a=t[l];break}if(!A(a))return}e.apply(console,t)}}function ie(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function de(e,t,n){const a=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,a),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:a}))}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 se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),a=t&&t.exclude,l={},i=e.elements,o={};if(n)for(let d=0;d<i.length;d++){const r=i[d];r.name&&r.type==="checkbox"&&!r.disabled&&(o[r.name]=(o[r.name]||0)+1)}for(let d=0;d<i.length;d++){const r=i[d];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(a&&r.matches&&r.matches(a)))if(r.type==="checkbox")n&&o[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let s=0;s<r.options.length;s++)r.options[s].selected&&l[r.name].push(r.options[s].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const s=Number(r.value);l[r.name]=r.value===""||isNaN(s)?null:s}else l[r.name]=r.value}return l}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function fe(e,t){const n=e.elements,a=[],l={};for(let i=0;i<n.length;i++){const o=n[i];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let i=0;i<n.length;i++){const o=n[i];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const d=o.getAttribute("data-ln-fill-as")||o.name;if(!d||!(d in t))continue;const r=t[d];if(o.type==="checkbox"){if(Array.isArray(r))o.checked=r.indexOf(o.value)!==-1;else if(l[o.name]>1){const s=String(r).split(",").map(function(c){return c.trim()});o.checked=s.indexOf(o.value)!==-1}else o.checked=ue(r);a.push(o)}else if(o.type==="radio")o.checked=o.value===String(r),a.push(o);else if(o.type==="select-multiple"){if(Array.isArray(r))for(let s=0;s<o.options.length;s++)o.options[s].selected=r.indexOf(o.options[s].value)!==-1;a.push(o)}else o.value=r,o.tagName==="SELECT"&&r!=null&&o.setAttribute("data-ln-value",r),a.push(o)}return a}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=fe,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=se);const F={};function we(e,t){F[e]=t}function pe(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=pe);function be(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){de(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function he(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];j[n]=t}function me(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=he,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=be);const x={};function ge(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=x[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const d=n[o],r=d.getAttribute("data-ln-field");t[r]!=null&&(d.textContent=t[r])}const a=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<a.length;o++){const d=a[o],r=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<r.length;s++){const c=r[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 l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const d=l[o],r=d.getAttribute("data-ln-show");r in t&&d.classList.toggle("hidden",!t[r])}const i=e.querySelectorAll("[data-ln-class]");for(let o=0;o<i.length;o++){const d=i[o],r=d.getAttribute("data-ln-class").split(",");for(let s=0;s<r.length;s++){const c=r[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 ye(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 a=0;a<n.length;a++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[a],t??null),n[a].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function B(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,d){return t[d]!==void 0?t[d]:""}))}const a=function(i,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let i=0;i<l.length;i++){const o=l[i],d=o.attributes;for(let r=0;r<d.length;r++){const s=d[r];s.value.indexOf("{{")!==-1&&o.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return e}function Ce(e,t,n,a,l,i){const o={};for(let r=0;r<e.children.length;r++){const s=e.children[r],c=s.getAttribute("data-ln-render-key");c&&(o[c]=s)}const d=document.createDocumentFragment();for(let r=0;r<t.length;r++){const s=t[r],c=String(a(s));let u=o[c];if(u)l(u,s,r);else{const f=ge(n,i);if(!f||(B(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),l(u,s,r)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=B,window.lnCore.fill=R,window.lnCore.lnFill=ye,window.lnCore.renderList=Ce);function S(e,t,n){const a=e.getAttribute(t);return a===null?n:a}function W(e,t,n){const a=parseInt(e.getAttribute(t),10);return isNaN(a)?n:a}function U(e,t,n=!1){const a=e.getAttribute(t);if(a===null)return!!n;const l=a.trim().toLowerCase();return!(l==="false"||l==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const k=new Map;function H(e,t){const n=(e?e.join("|"):"")+"::"+t;if(k.has(n))return k.get(n);const a=new Set(e||[]),l=function(i,o){const d=i.getAttribute(o);return d!==null&&a.has(d)?d:t};return k.set(n,l),l}function z(e,t,n){const a=parseFloat(e.getAttribute(t));return isNaN(a)?n:a}function G(e,t,n){const a=e.getAttribute(t);if(!a)return n;try{return JSON.parse(a)}catch{return n}}function Q(e,t,n,a,l){if(!e||t===null)return!0;const i=a||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const d=r=>{l?console.warn(r,l):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(d(`[${i}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(d(`[${i}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return d(`[${i}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,n){for(const a in n){const[l,i,o]=n[a];Object.defineProperty(e,a,{get:function(){return l(t,i,o)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const n in e){const a=e[n];if(!a||!a.prop)continue;let l=a.read;if(!l&&a.type)switch(a.type){case"enum":l=H(a.values,a.fallback);break;case"integer":l=W;break;case"float":l=z;break;case"boolean":l=U;break;case"list":l=V;break;case"json":l=G;break;case"string":default:l=S;break}l||(l=S),t[a.prop]=[l,n,a.fallback]}return t}function xe(e){const t={};for(const n in e){const a=e[n];a&&a.effect&&(t[n]=a.effect)}return Object.keys(t).length?t:null}function Se(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=ve,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=S,window.lnCore.attrInt=W,window.lnCore.attrBool=U,window.lnCore.attrList=V,window.lnCore.attrEnum=H,window.lnCore.attrFloat=z,window.lnCore.attrJson=G);function _(e,t,n,a){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&o.push(e);for(const d of o)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new a(d)}catch(r){console.error("["+n+"] init failed",d,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function J(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function K(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function P(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function X(e){const t=P(),n=e.observed||[];for(let a=0;a<n.length;a++){const l=n[a];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 a in e.attributes){t.byDeclaredAttr.has(a)||t.byDeclaredAttr.set(a,[]);const l=t.byDeclaredAttr.get(a);l.some(i=>i.componentTag===e.componentTag)||l.push({spec:e.attributes[a],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const a=Se(e);if(a===null)t.reactiveWildcard.push(e);else for(const l of a)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,n,a){for(let l=0;l<e.length;l++){const i=e[l];if(!t[i.attribute])continue;const o=i.effects&&i.effects[n];o?o(t,n,a):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,a)}}function ke(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const a=P(),l=a.byAttr.get(n);if(N()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(n)&&A(t)){const i=a.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let d=0;d<i.length;d++)Q(i[d].spec,o,n,i[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=a.byReactive.get(n);i&&Y(i,t,n,e.oldValue),a.reactiveWildcard.length&&Y(a.reactiveWildcard,t,n,e.oldValue)}if(l)for(let i=0;i<l.length;i++){const o=l[i];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(_(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(a){console.error("[ln-core] mutation handler failed",t[n].target,a)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ee(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function _e(e){const t=ee();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const a=t[n];if(a.onSubtreeChange){const l=a.query,i=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;i&&a.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const a=e.addedNodes[n];if(a.nodeType===1)for(let l=0;l<t.length;l++){const i=t[l];_(a,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(a)}}for(let n=0;n<e.removedNodes.length;n++){const a=e.removedNodes[n];if(a.nodeType===1)for(let l=0;l<t.length;l++){const i=t[l],o=i.query,d=Array.from(a.querySelectorAll(o));a.matches&&a.matches(o)&&d.push(a);for(let r=0;r<d.length;r++){const s=d[r];if(!document.contains(s)){const c=s[i.attribute];if(c&&typeof c.destroy=="function")try{c.destroy()}catch(u){console.error("["+i.attribute+"] destroy failed",s,u)}delete s[i.attribute]}}}}}}function De(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.type==="childList")try{_e(a)}catch(l){console.error("[ln-core] lifecycle handler failed",a.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function $e(e,t){X({observed:e,handler:t}),Z()}function te(e,t,n,a,l={}){const i=l.extraAttributes||[],o=l.onAttributeChange||null,d=l.onSubtreeChange||null,r=l.onInit||null,s=l.onAttrChange||null,c=l.effects||null,u=l.attributes||null,f=u?xe(u):c,O=u?new Set(Object.keys(u)):null,Je=l.persist||null;function v(L){const w=L||document.body;if(_(w,e,t,n),u&&N())for(const g in u){const Xe=u[g],T=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&T.push(w);for(let q=0;q<T.length;q++){const M=T[q];A(M)&&Q(Xe,M.getAttribute(g),g,a,M)}}r&&r(w)}const E=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let w;for(;(w=L.exec(e))!==null;)E.push(w[1])}else E.push(e);X({selector:e,attribute:t,componentTag:a,attributes:u,ComponentFn:n,onInit:r,observed:E.concat(i),onAttributeChange:o,onAttrChange:s,effects:f,declared:O,persist:Je}),Z();const Ke=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Pe=l.subtreeQuery||(Ke?e:"["+e+"]");ee().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:d,query:Pe}),De(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=te);function re(){J()>0?K(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),v}function ne(e){return(e||"").replace(/^#/,"")}function D(e){const t=e===void 0?location.hash:e,n={},a=ne(t);if(!a)return n;const l=a.split("&");for(let i=0;i<l.length;i++){const o=l[i];if(!o)continue;const d=o.indexOf(":"),r=d>-1?o.slice(0,d):o,s=d>-1?o.slice(d+1):"";if(r)try{n[r]=decodeURIComponent(s)}catch{n[r]=s}}return n}function Ie(e){if(!e)return null;const t=D();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const n=D();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(i){const o=n[i];return o===""?i:i+":"+encodeURIComponent(o)}).join("&");ne(location.hash)!==l&&(location.hash=l)}function Ee(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 n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const a=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return a?t?a+"-"+t:a:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ne(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),a=e.slice(t+1),l=a?a.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=D,window.lnCore.hashGet=Ie,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=Ne);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);const $=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 je(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const n=[];for(let a=0;a<=t.length;a++)n[a]=[a];for(let a=0;a<=e.length;a++)n[0][a]=a;for(let a=1;a<=t.length;a++)for(let l=1;l<=e.length;l++)t.charAt(a-1)===e.charAt(l-1)?n[a][l]=n[a-1][l-1]:n[a][l]=Math.min(n[a-1][l-1]+1,n[a][l-1]+1,n[a-1][l]+1);return n[t.length][e.length]}function Re(e,t=$){if(t.has(e))return null;let n=null,a=1/0;for(const i of t){const o=je(e,i);o<a&&(a=o,n=i)}const l=Math.max(3,Math.floor(e.length*.4));return a<=l?n:null}function ae(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Be(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&r.name.endsWith("-for")){const s=(r.value||"").trim();if(!s){a.push({type:"id-empty",element:o,attribute:r.name,targetId:"",message:`[ln-debug] Empty ID reference in <${o.tagName.toLowerCase()} ${r.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+ae(s))||a.push({type:"id-unresolved",element:o,attribute:r.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${o.tagName.toLowerCase()} ${r.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function We(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&(r.name.endsWith("-source")||r.name.endsWith("-store"))&&r.name!=="data-ln-data-store"){const c=(r.value||"").trim();if(!c){a.push({type:"store-empty",element:o,attribute:r.name,storeName:"",message:`[ln-debug] Empty store reference in <${o.tagName.toLowerCase()} ${r.name}="">.`});continue}const u=ae(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),O=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!O&&a.push({type:"store-unresolved",element:o,attribute:r.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${o.tagName.toLowerCase()} ${r.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function Ue(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const n=[],a=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&a.unshift(t);const l=new Map;for(let i=0;i<a.length;i++){const o=a[i],d=(o.getAttribute("data-ln-data-store")||"").trim();d&&(l.has(d)||l.set(d,[]),l.get(d).push(o))}for(const[i,o]of l.entries())o.length>1&&n.push({type:"store-duplicate",storeName:i,elements:o,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return n}function Ve(e=document,t=$){const n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&!t.has(r.name)){const s=Re(r.name,t),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:o,attribute:r.name,suggestion:s,message:`[ln-debug] Unknown attribute "${r.name}" on <${o.tagName.toLowerCase()}>.${c}`})}}}return a}function C(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=t.validAttributes||$,a=Be(e),l=We(e),i=Ue(e),o=Ve(e,n),d=[...a,...l,...i,...o];if(!t.silent)for(let r=0;r<d.length;r++)console.warn(d[r].message);return{idIssues:a,storeIssues:l,uniquenessIssues:i,spellingIssues:o,total:d.length}}let h=null;function m(e=typeof document<"u"?document:null,t=50,n=null){if(!e)return;h&&(clearTimeout(h),h=null);function a(){h=setTimeout(()=>{h=null;const l=C(e);n&&n(l)},t)}J()>0?K(a):a()}function He(e,t,n,a){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",n),console.log("detail",a),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",n),console.log("old → new",a.oldValue,"→",a.newValue),console.groupEnd())}let p=[];function ze(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function oe(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 Ge(e,t,n,a){oe(n)&&He(e,t,n,a)}function I(){ze(),ie(p.length>0?Ge:null,p.length>0?oe:null)}function le(){I()}function Qe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){I(),$e(["data-ln-debug"],I)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};Qe();function a(i){return this.dom=i,m(i.ownerDocument||document),le(),this}a.prototype.verify=function(i,o){return C(i||(this.dom?this.dom.ownerDocument||this.dom:document),o)},a.prototype.destroy=function(){delete this.dom[t],le()};const l=te(e,t,a,"ln-debug",{attributes:n,onInit:function(i){typeof document<"u"&&m(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&m(i&&i.ownerDocument?i.ownerDocument:document)}});l.verify=function(i,o){return C(i||document,o)},l.schedule=function(i,o,d){return m(i||document,o,d)}})(),y.scheduleVerification=m,y.verifyDOM=C,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y})({});
@@ -5,6 +5,7 @@ export const VALID_ATTRIBUTES = new Set([
5
5
  'data-ln-api-base-url',
6
6
  'data-ln-api-connector',
7
7
  'data-ln-api-connector-query-debounce',
8
+ 'data-ln-api-endpoint',
8
9
  'data-ln-api-headers',
9
10
  'data-ln-api-param-limit',
10
11
  'data-ln-api-param-offset',
@@ -104,6 +105,7 @@ export const VALID_ATTRIBUTES = new Set([
104
105
  'data-ln-filter-options',
105
106
  'data-ln-filter-reset',
106
107
  'data-ln-filter-search',
108
+ 'data-ln-filter-target',
107
109
  'data-ln-filter-value',
108
110
  'data-ln-filter-values',
109
111
  'data-ln-form',
@@ -111,6 +113,7 @@ export const VALID_ATTRIBUTES = new Set([
111
113
  'data-ln-form-action-method',
112
114
  'data-ln-hash',
113
115
  'data-ln-include',
116
+ 'data-ln-initial-value',
114
117
  'data-ln-item',
115
118
  'data-ln-item-action',
116
119
  'data-ln-item-id',