@livenetworks/ashlar 2.1.9 → 2.1.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.
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-debug/src/generated-attributes.js +1 -0
- package/components/ln-table/README.md +21 -3
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table/ln-table.schema.json +8 -0
- package/components/ln-table/src/ln-table.js +72 -5
- package/ln-ashlar.html-data.json +5 -0
- package/package.json +1 -1
- package/theme/components/_ln-table.scss +9 -0
- package/web-types.json +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function S(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(!S(a))return}e.apply(console,t)}}function pe(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function he(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 h(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){h(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function be(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const n=!!(t&&t.typed),a=t&&t.exclude,l={},i=e.elements,r={};if(n)for(let d=0;d<i.length;d++){const o=i[d];o.name&&o.type==="checkbox"&&!o.disabled&&(r[o.name]=(r[o.name]||0)+1)}for(let d=0;d<i.length;d++){const o=i[d];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(a&&o.matches&&o.matches(a)))if(o.type==="checkbox")n&&r[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&l[o.name].push(o.options[s].value)}else if(n&&o.type==="hidden")l[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const s=Number(o.value);l[o.name]=o.value===""||isNaN(s)?null:s}else l[o.name]=o.value}return l}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ye(e,t){const n=e.elements,a=[],l={};for(let i=0;i<n.length;i++){const r=n[i];r.name&&r.type==="checkbox"&&(l[r.name]=(l[r.name]||0)+1)}for(let i=0;i<n.length;i++){const r=n[i];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const d=r.getAttribute("data-ln-fill-as")||r.name;if(!d||!(d in t))continue;const o=t[d];if(r.type==="checkbox"){if(Array.isArray(o))r.checked=o.indexOf(r.value)!==-1;else if(l[r.name]>1){const s=String(o).split(",").map(function(c){return c.trim()});r.checked=s.indexOf(r.value)!==-1}else r.checked=ge(o);a.push(r)}else if(r.type==="radio")r.checked=r.value===String(o),a.push(r);else if(r.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<r.options.length;s++)r.options[s].selected=o.indexOf(r.options[s].value)!==-1;a.push(r)}else r.value=o,r.tagName==="SELECT"&&o!=null&&r.setAttribute("data-ln-value",o),a.push(r)}return a}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ye,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=be);const B={};function Ce(e,t){B[e]=t}function Ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ce,window.lnCore.getDataMapper=Ae);function ve(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,h(function(){new MutationObserver(function(){he(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function Se(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];W[n]=t}function xe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Se,window.lnCore.getLocaleFallback=xe,window.lnCore.ensureLocaleObserver=ve);const x={};function ke(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 U(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let r=0;r<n.length;r++){const d=n[r],o=d.getAttribute("data-ln-field");t[o]!=null&&(d.textContent=t[o])}const a=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<a.length;r++){const d=a[r],o=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const d=l[r],o=d.getAttribute("data-ln-show");o in t&&d.classList.toggle("hidden",!t[o])}const i=e.querySelectorAll("[data-ln-class]");for(let r=0;r<i.length;r++){const d=i[r],o=d.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function _e(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const 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)U(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 V(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,d){return t[d]!==void 0?t[d]:""}))}const a=function(i,r){return t[r]!==void 0?t[r]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let i=0;i<l.length;i++){const r=l[i],d=r.attributes;for(let o=0;o<d.length;o++){const s=d[o];s.value.indexOf("{{")!==-1&&r.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return e}function De(e,t,n,a,l,i){const r={};for(let o=0;o<e.children.length;o++){const s=e.children[o],c=s.getAttribute("data-ln-render-key");c&&(r[c]=s)}const d=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],c=String(a(s));let u=r[c];if(u)l(u,s,o);else{const f=ke(n,i);if(!f||(V(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),l(u,s,o)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=U,window.lnCore.lnFill=_e,window.lnCore.renderList=De);function k(e,t,n){const a=e.getAttribute(t);return a===null?n:a}function H(e,t,n){const a=parseInt(e.getAttribute(t),10);return isNaN(a)?n:a}function z(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 G(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function Q(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const a=new Set(e||[]),l=function(i,r){const d=i.getAttribute(r);return d!==null&&a.has(d)?d:t};return _.set(n,l),l}function P(e,t,n){const a=parseFloat(e.getAttribute(t));return isNaN(a)?n:a}function J(e,t,n){const a=e.getAttribute(t);if(!a)return n;try{return JSON.parse(a)}catch{return n}}function K(e,t,n,a,l){if(!e||t===null)return!0;const i=a||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const d=o=>{l?console.warn(o,l):console.warn(o)};if(r==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const o=e.values||[];return o.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(d(`[${i}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(d(`[${i}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(o){return d(`[${i}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ee(e,t,n){for(const a in n){const[l,i,r]=n[a];Object.defineProperty(e,a,{get:function(){return l(t,i,r)},enumerable:!0,configurable:!0})}return e}function qe(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=Q(a.values,a.fallback);break;case"integer":l=H;break;case"float":l=P;break;case"boolean":l=z;break;case"list":l=G;break;case"json":l=J;break;case"string":default:l=k;break}l||(l=k),t[a.prop]=[l,n,a.fallback]}return t}function Ie(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 $e(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=Ee,window.lnCore.attrSpec=qe,window.lnCore.attrStr=k,window.lnCore.attrInt=H,window.lnCore.attrBool=z,window.lnCore.attrList=G,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=P,window.lnCore.attrJson=J);function b(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function X(e,t,n,a){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:n,ComponentFn:a};if(e.matches&&e.matches(i)&&b(e,r),e.querySelectorAll){const d=e.querySelectorAll(i);for(let o=0;o<d.length;o++)b(d[o],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ee(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function te(e){const t=ee(),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=$e(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 ne(e,t,n,a){for(let l=0;l<e.length;l++){const i=e[l];if(!t[i.attribute])continue;const r=i.effects&&i.effects[n];r?r(t,n,a):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,a)}}function Le(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,a=ee(),l=a.byAttr.get(t),i=j()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(t);if(!n&&!l&&!i)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(i&&S(r)){const d=a.byDeclaredAttr.get(t),o=r.getAttribute(t);for(let s=0;s<d.length;s++)K(d[s].spec,o,t,d[s].componentTag,r)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),n){const d=a.byReactive.get(t);d&&ne(d,r,t,e.oldValue),a.reactiveWildcard.length&&ne(a.reactiveWildcard,r,t,e.oldValue)}if(l)for(let d=0;d<l.length;d++){const o=l[d];if(o.handler){o.handler(r,t,e.oldValue);continue}o.onAttributeChange&&r[o.attribute]?o.onAttributeChange(r,t):(X(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r))}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,h(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Le(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 D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(a){console.error("["+t.attribute+"] destroy failed",e,a)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=D();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const a=E();if(e.target&&a.length)for(let l=0;l<a.length;l++){const i=a[l],r=i.query,d=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;d&&i.onSubtreeChange(d,e)}for(let l=0;l<e.addedNodes.length;l++){const i=e.addedNodes[l];if(i.nodeType===1){const r=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d];if(o.selector&&o.attribute&&o.ComponentFn){if(!r)i.matches&&i.matches(o.query)&&b(i,o);else if(i.matches&&i.matches(o.query)&&b(i,o),i.querySelectorAll){const s=i.querySelectorAll(o.query);for(let c=0;c<s.length;c++)b(s[c],o)}}o.onInit&&o.onInit(i)}}}for(let l=0;l<e.removedNodes.length;l++){const i=e.removedNodes[l];if(i.nodeType===1){if(document.contains(i))continue;const r=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d],s=o.query;if(s){if(!r)i.matches&&i.matches(s)&&q(i,o);else if(i.matches&&i.matches(s)&&q(i,o),i.querySelectorAll){const c=i.querySelectorAll(s);for(let u=0;u<c.length;u++)q(c[u],o)}}}}}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,h(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.type==="childList")try{oe(a)}catch(l){console.error("[ln-core] lifecycle handler failed",a.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let a=0;a<n.length;a++){const l=n[a];if(l.type==="childList")try{oe(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Te(e,t){te({observed:e,handler:t}),ae()}function Re(e){D().push(e),e.onSubtreeChange&&e.query&&E().push(e),re()}function le(e,t,n,a,l={}){const i=l.extraAttributes||[],r=l.onAttributeChange||null,d=l.onSubtreeChange||null,o=l.onInit||null,s=l.onAttrChange||null,c=l.effects||null,u=l.attributes||null,f=u?Ie(u):c,O=u?new Set(Object.keys(u)):null,ct=l.persist||null;function v(R){const w=R||document.body;if(X(w,e,t,n),u&&j())for(const y in u){const ft=u[y],F=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&F.push(w);for(let M=0;M<F.length;M++){const N=F[M];S(N)&&K(ft,N.getAttribute(y),y,a,N)}}o&&o(w)}const T=[];if(e.indexOf("[")!==-1){const R=/\[([\w-]+)/g;let w;for(;(w=R.exec(e))!==null;)T.push(w[1])}else T.push(e);te({selector:e,attribute:t,componentTag:a,attributes:u,ComponentFn:n,onInit:o,observed:T.concat(i),onAttributeChange:r,onAttrChange:s,effects:f,declared:O,persist:ct}),ae();const ut=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ue=l.subtreeQuery||(ut?e:"["+e+"]"),fe={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:d,query:ue};D().push(fe),d&&ue&&E().push(fe),re(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Re,window.lnCore.withoutLifecycle=Oe);function we(){Y()>0?Z(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",we):we(),v}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,n={},a=ie(t);if(!a)return n;const l=a.split("&");for(let i=0;i<l.length;i++){const r=l[i];if(!r)continue;const d=r.indexOf(":"),o=d>-1?r.slice(0,d):r,s=d>-1?r.slice(d+1):"";if(o)try{n[o]=decodeURIComponent(s)}catch{n[o]=s}}return n}function Fe(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=I();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(i){const r=n[i];return r===""?i:i+":"+encodeURIComponent(r)}).join("&");ie(location.hash)!==l&&(location.hash=l)}function Ne(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function je(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function We(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ue(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const 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=I,window.lnCore.hashGet=Fe,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Ne,window.lnCore.resolveHashNamespace=je,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=Ue,window.lnCore.hashFilterDecode=Ve);function He(e){return(e||"").replace(/^\?/,"")}function ze(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},a=He(t);if(!a)return n;const l=new URLSearchParams(a);for(const[i,r]of l.entries())n[i]=r;return n}function Ge(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const a=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",a)}function Pe(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ke(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const a=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:a}}}return null}function Xe(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ye(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=ze,window.lnCore.queryGet=Ge,window.lnCore.querySet=Qe,window.lnCore.resolveQueryParam=Pe,window.lnCore.querySortEncode=Je,window.lnCore.querySortDecode=Ke,window.lnCore.queryFilterEncode=Xe,window.lnCore.queryFilterDecode=Ye);function Ze(){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=Ze);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-query","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 et(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 tt(e,t=$){if(t.has(e))return null;let n=null,a=1/0;for(const i of t){const r=et(e,i);r<a&&(a=r,n=i)}const l=Math.max(3,Math.floor(e.length*.4));return a<=l?n:null}function de(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function nt(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 r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&o.name.endsWith("-for")){const s=(o.value||"").trim();if(!s){a.push({type:"id-empty",element:r,attribute:o.name,targetId:"",message:`[ln-debug] Empty ID reference in <${r.tagName.toLowerCase()} ${o.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+de(s))||a.push({type:"id-unresolved",element:r,attribute:o.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${r.tagName.toLowerCase()} ${o.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function at(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 r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&(o.name.endsWith("-source")||o.name.endsWith("-store"))&&o.name!=="data-ln-data-store"){const c=(o.value||"").trim();if(!c){a.push({type:"store-empty",element:r,attribute:o.name,storeName:"",message:`[ln-debug] Empty store reference in <${r.tagName.toLowerCase()} ${o.name}="">.`});continue}const u=de(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:r,attribute:o.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${r.tagName.toLowerCase()} ${o.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function ot(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 r=a[i],d=(r.getAttribute("data-ln-data-store")||"").trim();d&&(l.has(d)||l.set(d,[]),l.get(d).push(r))}for(const[i,r]of l.entries())r.length>1&&n.push({type:"store-duplicate",storeName:i,elements:r,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 rt(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 r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&!t.has(o.name)){const s=tt(o.name,t),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:r,attribute:o.name,suggestion:s,message:`[ln-debug] Unknown attribute "${o.name}" on <${r.tagName.toLowerCase()}>.${c}`})}}}return a}function A(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=t.validAttributes||$,a=nt(e),l=at(e),i=ot(e),r=rt(e,n),d=[...a,...l,...i,...r];if(!t.silent)for(let o=0;o<d.length;o++)console.warn(d[o].message);return{idIssues:a,storeIssues:l,uniquenessIssues:i,spellingIssues:r,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,n=null){if(!e)return;m&&(clearTimeout(m),m=null);function a(){m=setTimeout(()=>{m=null;const l=A(e);n&&n(l)},t)}Y()>0?Z(a):a()}function lt(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 it(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function se(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function dt(e,t,n,a){se(n)&<(e,t,n,a)}function L(){it(),pe(p.length>0?dt:null,p.length>0?se:null)}function ce(){L()}function st(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,h(function(){L(),Te(["data-ln-debug"],L)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};st();function a(i){return this.dom=i,g(i.ownerDocument||document),ce(),this}a.prototype.verify=function(i,r){return A(i||(this.dom?this.dom.ownerDocument||this.dom:document),r)},a.prototype.destroy=function(){delete this.dom[t],ce()};const l=le(e,t,a,"ln-debug",{attributes:n,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});l.verify=function(i,r){return A(i||document,r)},l.schedule=function(i,r,d){return g(i||document,r,d)}})(),C.scheduleVerification=g,C.verifyDOM=A,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
|
|
1
|
+
var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function S(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(!S(a))return}e.apply(console,t)}}function pe(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function he(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 h(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){h(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function be(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const n=!!(t&&t.typed),a=t&&t.exclude,l={},i=e.elements,r={};if(n)for(let d=0;d<i.length;d++){const o=i[d];o.name&&o.type==="checkbox"&&!o.disabled&&(r[o.name]=(r[o.name]||0)+1)}for(let d=0;d<i.length;d++){const o=i[d];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(a&&o.matches&&o.matches(a)))if(o.type==="checkbox")n&&r[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&l[o.name].push(o.options[s].value)}else if(n&&o.type==="hidden")l[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const s=Number(o.value);l[o.name]=o.value===""||isNaN(s)?null:s}else l[o.name]=o.value}return l}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ye(e,t){const n=e.elements,a=[],l={};for(let i=0;i<n.length;i++){const r=n[i];r.name&&r.type==="checkbox"&&(l[r.name]=(l[r.name]||0)+1)}for(let i=0;i<n.length;i++){const r=n[i];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const d=r.getAttribute("data-ln-fill-as")||r.name;if(!d||!(d in t))continue;const o=t[d];if(r.type==="checkbox"){if(Array.isArray(o))r.checked=o.indexOf(r.value)!==-1;else if(l[r.name]>1){const s=String(o).split(",").map(function(c){return c.trim()});r.checked=s.indexOf(r.value)!==-1}else r.checked=ge(o);a.push(r)}else if(r.type==="radio")r.checked=r.value===String(o),a.push(r);else if(r.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<r.options.length;s++)r.options[s].selected=o.indexOf(r.options[s].value)!==-1;a.push(r)}else r.value=o,r.tagName==="SELECT"&&o!=null&&r.setAttribute("data-ln-value",o),a.push(r)}return a}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ye,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=be);const B={};function Ce(e,t){B[e]=t}function Ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ce,window.lnCore.getDataMapper=Ae);function ve(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,h(function(){new MutationObserver(function(){he(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function Se(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];W[n]=t}function xe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Se,window.lnCore.getLocaleFallback=xe,window.lnCore.ensureLocaleObserver=ve);const x={};function ke(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 U(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let r=0;r<n.length;r++){const d=n[r],o=d.getAttribute("data-ln-field");t[o]!=null&&(d.textContent=t[o])}const a=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<a.length;r++){const d=a[r],o=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const d=l[r],o=d.getAttribute("data-ln-show");o in t&&d.classList.toggle("hidden",!t[o])}const i=e.querySelectorAll("[data-ln-class]");for(let r=0;r<i.length;r++){const d=i[r],o=d.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function _e(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const 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)U(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 V(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,d){return t[d]!==void 0?t[d]:""}))}const a=function(i,r){return t[r]!==void 0?t[r]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let i=0;i<l.length;i++){const r=l[i],d=r.attributes;for(let o=0;o<d.length;o++){const s=d[o];s.value.indexOf("{{")!==-1&&r.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return e}function De(e,t,n,a,l,i){const r={};for(let o=0;o<e.children.length;o++){const s=e.children[o],c=s.getAttribute("data-ln-render-key");c&&(r[c]=s)}const d=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],c=String(a(s));let u=r[c];if(u)l(u,s,o);else{const f=ke(n,i);if(!f||(V(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),l(u,s,o)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=U,window.lnCore.lnFill=_e,window.lnCore.renderList=De);function k(e,t,n){const a=e.getAttribute(t);return a===null?n:a}function H(e,t,n){const a=parseInt(e.getAttribute(t),10);return isNaN(a)?n:a}function z(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 G(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function Q(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const a=new Set(e||[]),l=function(i,r){const d=i.getAttribute(r);return d!==null&&a.has(d)?d:t};return _.set(n,l),l}function P(e,t,n){const a=parseFloat(e.getAttribute(t));return isNaN(a)?n:a}function J(e,t,n){const a=e.getAttribute(t);if(!a)return n;try{return JSON.parse(a)}catch{return n}}function K(e,t,n,a,l){if(!e||t===null)return!0;const i=a||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const d=o=>{l?console.warn(o,l):console.warn(o)};if(r==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const o=e.values||[];return o.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(d(`[${i}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(d(`[${i}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(o){return d(`[${i}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ee(e,t,n){for(const a in n){const[l,i,r]=n[a];Object.defineProperty(e,a,{get:function(){return l(t,i,r)},enumerable:!0,configurable:!0})}return e}function qe(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=Q(a.values,a.fallback);break;case"integer":l=H;break;case"float":l=P;break;case"boolean":l=z;break;case"list":l=G;break;case"json":l=J;break;case"string":default:l=k;break}l||(l=k),t[a.prop]=[l,n,a.fallback]}return t}function Ie(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 $e(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=Ee,window.lnCore.attrSpec=qe,window.lnCore.attrStr=k,window.lnCore.attrInt=H,window.lnCore.attrBool=z,window.lnCore.attrList=G,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=P,window.lnCore.attrJson=J);function b(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function X(e,t,n,a){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:n,ComponentFn:a};if(e.matches&&e.matches(i)&&b(e,r),e.querySelectorAll){const d=e.querySelectorAll(i);for(let o=0;o<d.length;o++)b(d[o],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ee(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function te(e){const t=ee(),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=$e(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 ne(e,t,n,a){for(let l=0;l<e.length;l++){const i=e[l];if(!t[i.attribute])continue;const r=i.effects&&i.effects[n];r?r(t,n,a):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,a)}}function Le(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,a=ee(),l=a.byAttr.get(t),i=j()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(t);if(!n&&!l&&!i)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(i&&S(r)){const d=a.byDeclaredAttr.get(t),o=r.getAttribute(t);for(let s=0;s<d.length;s++)K(d[s].spec,o,t,d[s].componentTag,r)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),n){const d=a.byReactive.get(t);d&&ne(d,r,t,e.oldValue),a.reactiveWildcard.length&&ne(a.reactiveWildcard,r,t,e.oldValue)}if(l)for(let d=0;d<l.length;d++){const o=l[d];if(o.handler){o.handler(r,t,e.oldValue);continue}o.onAttributeChange&&r[o.attribute]?o.onAttributeChange(r,t):(X(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r))}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,h(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Le(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 D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(a){console.error("["+t.attribute+"] destroy failed",e,a)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=D();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const a=E();if(e.target&&a.length)for(let l=0;l<a.length;l++){const i=a[l],r=i.query,d=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;d&&i.onSubtreeChange(d,e)}for(let l=0;l<e.addedNodes.length;l++){const i=e.addedNodes[l];if(i.nodeType===1){const r=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d];if(o.selector&&o.attribute&&o.ComponentFn){if(!r)i.matches&&i.matches(o.query)&&b(i,o);else if(i.matches&&i.matches(o.query)&&b(i,o),i.querySelectorAll){const s=i.querySelectorAll(o.query);for(let c=0;c<s.length;c++)b(s[c],o)}}o.onInit&&o.onInit(i)}}}for(let l=0;l<e.removedNodes.length;l++){const i=e.removedNodes[l];if(i.nodeType===1){if(document.contains(i))continue;const r=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d],s=o.query;if(s){if(!r)i.matches&&i.matches(s)&&q(i,o);else if(i.matches&&i.matches(s)&&q(i,o),i.querySelectorAll){const c=i.querySelectorAll(s);for(let u=0;u<c.length;u++)q(c[u],o)}}}}}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,h(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.type==="childList")try{oe(a)}catch(l){console.error("[ln-core] lifecycle handler failed",a.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let a=0;a<n.length;a++){const l=n[a];if(l.type==="childList")try{oe(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Te(e,t){te({observed:e,handler:t}),ae()}function Re(e){D().push(e),e.onSubtreeChange&&e.query&&E().push(e),re()}function le(e,t,n,a,l={}){const i=l.extraAttributes||[],r=l.onAttributeChange||null,d=l.onSubtreeChange||null,o=l.onInit||null,s=l.onAttrChange||null,c=l.effects||null,u=l.attributes||null,f=u?Ie(u):c,O=u?new Set(Object.keys(u)):null,ct=l.persist||null;function v(R){const w=R||document.body;if(X(w,e,t,n),u&&j())for(const y in u){const ft=u[y],F=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&F.push(w);for(let M=0;M<F.length;M++){const N=F[M];S(N)&&K(ft,N.getAttribute(y),y,a,N)}}o&&o(w)}const T=[];if(e.indexOf("[")!==-1){const R=/\[([\w-]+)/g;let w;for(;(w=R.exec(e))!==null;)T.push(w[1])}else T.push(e);te({selector:e,attribute:t,componentTag:a,attributes:u,ComponentFn:n,onInit:o,observed:T.concat(i),onAttributeChange:r,onAttrChange:s,effects:f,declared:O,persist:ct}),ae();const ut=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ue=l.subtreeQuery||(ut?e:"["+e+"]"),fe={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:d,query:ue};D().push(fe),d&&ue&&E().push(fe),re(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Re,window.lnCore.withoutLifecycle=Oe);function we(){Y()>0?Z(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",we):we(),v}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,n={},a=ie(t);if(!a)return n;const l=a.split("&");for(let i=0;i<l.length;i++){const r=l[i];if(!r)continue;const d=r.indexOf(":"),o=d>-1?r.slice(0,d):r,s=d>-1?r.slice(d+1):"";if(o)try{n[o]=decodeURIComponent(s)}catch{n[o]=s}}return n}function Fe(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=I();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(i){const r=n[i];return r===""?i:i+":"+encodeURIComponent(r)}).join("&");ie(location.hash)!==l&&(location.hash=l)}function Ne(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function je(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function We(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ue(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const 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=I,window.lnCore.hashGet=Fe,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Ne,window.lnCore.resolveHashNamespace=je,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=Ue,window.lnCore.hashFilterDecode=Ve);function He(e){return(e||"").replace(/^\?/,"")}function ze(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},a=He(t);if(!a)return n;const l=new URLSearchParams(a);for(const[i,r]of l.entries())n[i]=r;return n}function Ge(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const a=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",a)}function Pe(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ke(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const a=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:a}}}return null}function Xe(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ye(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=ze,window.lnCore.queryGet=Ge,window.lnCore.querySet=Qe,window.lnCore.resolveQueryParam=Pe,window.lnCore.querySortEncode=Je,window.lnCore.querySortDecode=Ke,window.lnCore.queryFilterEncode=Xe,window.lnCore.queryFilterDecode=Ye);function Ze(){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=Ze);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-query","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-loading","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 et(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 tt(e,t=$){if(t.has(e))return null;let n=null,a=1/0;for(const i of t){const r=et(e,i);r<a&&(a=r,n=i)}const l=Math.max(3,Math.floor(e.length*.4));return a<=l?n:null}function de(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function nt(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 r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&o.name.endsWith("-for")){const s=(o.value||"").trim();if(!s){a.push({type:"id-empty",element:r,attribute:o.name,targetId:"",message:`[ln-debug] Empty ID reference in <${r.tagName.toLowerCase()} ${o.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+de(s))||a.push({type:"id-unresolved",element:r,attribute:o.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${r.tagName.toLowerCase()} ${o.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function at(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 r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&(o.name.endsWith("-source")||o.name.endsWith("-store"))&&o.name!=="data-ln-data-store"){const c=(o.value||"").trim();if(!c){a.push({type:"store-empty",element:r,attribute:o.name,storeName:"",message:`[ln-debug] Empty store reference in <${r.tagName.toLowerCase()} ${o.name}="">.`});continue}const u=de(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:r,attribute:o.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${r.tagName.toLowerCase()} ${o.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function ot(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 r=a[i],d=(r.getAttribute("data-ln-data-store")||"").trim();d&&(l.has(d)||l.set(d,[]),l.get(d).push(r))}for(const[i,r]of l.entries())r.length>1&&n.push({type:"store-duplicate",storeName:i,elements:r,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 rt(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 r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&!t.has(o.name)){const s=tt(o.name,t),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:r,attribute:o.name,suggestion:s,message:`[ln-debug] Unknown attribute "${o.name}" on <${r.tagName.toLowerCase()}>.${c}`})}}}return a}function A(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=t.validAttributes||$,a=nt(e),l=at(e),i=ot(e),r=rt(e,n),d=[...a,...l,...i,...r];if(!t.silent)for(let o=0;o<d.length;o++)console.warn(d[o].message);return{idIssues:a,storeIssues:l,uniquenessIssues:i,spellingIssues:r,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,n=null){if(!e)return;m&&(clearTimeout(m),m=null);function a(){m=setTimeout(()=>{m=null;const l=A(e);n&&n(l)},t)}Y()>0?Z(a):a()}function lt(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 it(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function se(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function dt(e,t,n,a){se(n)&<(e,t,n,a)}function L(){it(),pe(p.length>0?dt:null,p.length>0?se:null)}function ce(){L()}function st(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,h(function(){L(),Te(["data-ln-debug"],L)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};st();function a(i){return this.dom=i,g(i.ownerDocument||document),ce(),this}a.prototype.verify=function(i,r){return A(i||(this.dom?this.dom.ownerDocument||this.dom:document),r)},a.prototype.destroy=function(){delete this.dom[t],ce()};const l=le(e,t,a,"ln-debug",{attributes:n,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});l.verify=function(i,r){return A(i||document,r)},l.schedule=function(i,r,d){return g(i||document,r,d)}})(),C.scheduleVerification=g,C.verifyDOM=A,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
|
|
@@ -72,6 +72,14 @@ External UI controls (`ln-search`, `ln-filter`, filter header buttons, clear but
|
|
|
72
72
|
<tbody data-ln-table-body></tbody>
|
|
73
73
|
</table>
|
|
74
74
|
|
|
75
|
+
<!-- Initial Loading State Template -->
|
|
76
|
+
<template data-ln-template="products-loading">
|
|
77
|
+
<article data-ln-empty-state="loading">
|
|
78
|
+
<svg class="ln-icon ln-ajax-spinner" aria-hidden="true"><use href="#ln-icon-loader-2"></use></svg>
|
|
79
|
+
<p>Loading products...</p>
|
|
80
|
+
</article>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
75
83
|
<!-- Row Template -->
|
|
76
84
|
<template data-ln-template="products-row">
|
|
77
85
|
<tr data-ln-table-row>
|
|
@@ -79,6 +87,14 @@ External UI controls (`ln-search`, `ln-filter`, filter header buttons, clear but
|
|
|
79
87
|
<td>{{ category }}</td>
|
|
80
88
|
</tr>
|
|
81
89
|
</template>
|
|
90
|
+
|
|
91
|
+
<footer>
|
|
92
|
+
<span>Showing <span data-ln-table-filtered>0</span> of <strong data-ln-table-total>0</strong> products</span>
|
|
93
|
+
<!-- Background Loading Indicator (hidden by default, displayed during re-fetching) -->
|
|
94
|
+
<div data-ln-table-loading class="table-loading hidden" aria-hidden="true">
|
|
95
|
+
<svg class="ln-icon ln-ajax-spinner"><use href="#ln-icon-loader-2"></use></svg>
|
|
96
|
+
</div>
|
|
97
|
+
</footer>
|
|
82
98
|
</section>
|
|
83
99
|
```
|
|
84
100
|
|
|
@@ -106,6 +122,7 @@ External UI controls (`ln-search`, `ln-filter`, filter header buttons, clear but
|
|
|
106
122
|
| `data-ln-table-row` | `<tr>` | Target row container in row templates. |
|
|
107
123
|
| `data-ln-table-row-select` | `<input>` | Selection checkbox in row templates. |
|
|
108
124
|
| `data-ln-table-row-action="name"`| `<button>` | Action button trigger in row templates. |
|
|
125
|
+
| `data-ln-table-loading` | Indicator / Template | Loading indicator element in footer (revealed during background re-fetch) or loading state template. |
|
|
109
126
|
|
|
110
127
|
---
|
|
111
128
|
|
|
@@ -234,14 +251,15 @@ Source: `components/ln-table/ln-table.js`. Sort is a separate, co-loaded compone
|
|
|
234
251
|
- The constructor branches once, at construction: `this.isDataDriven = dom.hasAttribute('data-ln-table-source')`.
|
|
235
252
|
- **SSR**: reads `<tbody>` rows once at bootstrap, caches them as static HTML strings in `_data`, and re-sorts/filters that in-memory cache on `ln-search:change`, `ln-sort:change`, and `ln-filter:change`.
|
|
236
253
|
- **Data-driven**: `isLoaded = false` until the first `ln-table:set-data`. If `<tbody>` already has rows (hybrid), they're parsed synchronously first — instant local sort/filter/search response before the authoritative dataset arrives. When the background sync lands, `_vStart`/`_vEnd` reset to `-1` and virtual scroll re-initializes against the full dataset.
|
|
237
|
-
- **Loading state**: `ln-table:set-loading {loading:true}`
|
|
254
|
+
- **Loading state**: In Data-Driven mode with no initial rows, `_showLoadingState()` immediately renders the loading state template and sets `aria-busy="true"`, preventing empty-state flash before data arrives. When `_initialLoaded = true`, subsequent `ln-table:set-loading {loading:true}` events preserve existing rows, toggle `.ln-table--loading`, and display the `[data-ln-table-loading]` footer indicator. `ln-table:set-data` clears loading state automatically.
|
|
238
255
|
|
|
239
256
|
### DOM mutations
|
|
240
257
|
|
|
241
258
|
| Phase | Mutation |
|
|
242
259
|
|---|---|
|
|
243
|
-
|
|
|
244
|
-
| `set-
|
|
260
|
+
| Initial load (data-driven) | Clones loading template into `<tbody>` with `colspan`, sets `aria-busy="true"` on wrapper |
|
|
261
|
+
| `set-loading` (subsequent) | `.ln-table--loading` on wrapper, toggles `[data-ln-table-loading]` in footer, sets `aria-busy` |
|
|
262
|
+
| `set-data` / sort / filter / search | `<tbody>` rows re-rendered (cloned templates in data-driven mode, cached HTML in SSR); footer counters (`data-ln-table-total` / `-filtered` / `-selected`) updated; `[data-ln-table-loading]` hidden |
|
|
245
263
|
| sort click | `data-ln-sort-state` on the `[data-ln-sort]` element, owned entirely by `ln-sort` — `ln-table` never touches it |
|
|
246
264
|
| filter change | `.ln-filter-active` toggled on the column's filter button |
|
|
247
265
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function G(){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 W(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 s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){r=t[s];break}if(!W(r))return}e.apply(console,t)}}function k(e,t,l){const r=l||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function ge(e,t,l){e._applyFilterAndSort(),e._vStart=-1,e._vEnd=-1,e._render(),e._updateFooter();const r={sort:e.currentSort,filters:e.currentFilters,search:e.currentSearch};r[l]=e.name,k(e.dom,t,r)}function H(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){H(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Q(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function me(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ye(e,t){const l=!!(t&&t.typed),r=t&&t.exclude,s={},h=e.elements,c={};if(l)for(let f=0;f<h.length;f++){const o=h[f];o.name&&o.type==="checkbox"&&!o.disabled&&(c[o.name]=(c[o.name]||0)+1)}for(let f=0;f<h.length;f++){const o=h[f];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")l&&c[o.name]===1?s[o.name]=o.checked:(s[o.name]||(s[o.name]=[]),o.checked&&s[o.name].push(o.value));else if(o.type==="radio")o.checked&&(s[o.name]=o.value);else if(o.type==="select-multiple"){s[o.name]=[];for(let w=0;w<o.options.length;w++)o.options[w].selected&&s[o.name].push(o.options[w].value)}else if(l&&o.type==="hidden")s[o.name]=o.value;else if(l&&(o.type==="number"||o.type==="range")){const w=Number(o.value);s[o.name]=o.value===""||isNaN(w)?null:w}else s[o.name]=o.value}return s}function Ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Se(e,t){const l=e.elements,r=[],s={};for(let h=0;h<l.length;h++){const c=l[h];c.name&&c.type==="checkbox"&&(s[c.name]=(s[c.name]||0)+1)}for(let h=0;h<l.length;h++){const c=l[h];if(c.type==="file"||c.type==="submit"||c.type==="button")continue;const f=c.getAttribute("data-ln-fill-as")||c.name;if(!f||!(f in t))continue;const o=t[f];if(c.type==="checkbox"){if(Array.isArray(o))c.checked=o.indexOf(c.value)!==-1;else if(s[c.name]>1){const w=String(o).split(",").map(function(m){return m.trim()});c.checked=w.indexOf(c.value)!==-1}else c.checked=Ce(o);r.push(c)}else if(c.type==="radio")c.checked=c.value===String(o),r.push(c);else if(c.type==="select-multiple"){if(Array.isArray(o))for(let w=0;w<c.options.length;w++)c.options[w].selected=o.indexOf(c.options[w].value)!==-1;r.push(c)}else c.value=o,c.tagName==="SELECT"&&o!=null&&c.setAttribute("data-ln-value",o),r.push(c)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Se,window.lnCore.serializeForm=ye,window.lnCore.resolveFormMethod=me);const K={};function ve(e,t){K[e]=t}function Ae(e){return K[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ve,window.lnCore.getDataMapper=Ae);function Ee(e){const t=e?e.closest("[lang]"):null,l=(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 l?l.trim():"en-US"}function De(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,H(function(){new MutationObserver(function(){k(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function xe(e,t){if(!e||typeof t!="object")return;const l=e.toLowerCase().split("-")[0];Y[l]=t}function ke(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=xe,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=De);const M={};function J(e,t){M[e]||(M[e]=document.querySelector('[data-ln-template="'+e+'"]'));const l=M[e];return l?l.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t,l){if(e){const r=e.querySelector('[data-ln-template="'+t+'"]');if(r)return r.content.cloneNode(!0)}return J(t,l)}function Z(e,t){if(!e||!t)return e;const l=e.querySelectorAll("[data-ln-field]");for(let c=0;c<l.length;c++){const f=l[c],o=f.getAttribute("data-ln-field");t[o]!=null&&(f.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let c=0;c<r.length;c++){const f=r[c],o=f.getAttribute("data-ln-attr").split(",");for(let w=0;w<o.length;w++){const m=o[w].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();t[E]!=null&&f.setAttribute(v,t[E])}}const s=e.querySelectorAll("[data-ln-show]");for(let c=0;c<s.length;c++){const f=s[c],o=f.getAttribute("data-ln-show");o in t&&f.classList.toggle("hidden",!t[o])}const h=e.querySelectorAll("[data-ln-class]");for(let c=0;c<h.length;c++){const f=h[c],o=f.getAttribute("data-ln-class").split(",");for(let w=0;w<o.length;w++){const m=o[w].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();E in t&&f.classList.toggle(v,!!t[E])}}return e}function Le(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 l=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<l.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",l[r],t??null),l[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)Z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let l=0;l<t.length;l++)t[l].textContent=""}})));function N(e,t){if(!e||!t)return e;const l=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;l.nextNode();){const h=l.currentNode;h.textContent.indexOf("{{")!==-1&&(h.textContent=h.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,f){return t[f]!==void 0?t[f]:""}))}const r=function(h,c){return t[c]!==void 0?t[c]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let h=0;h<s.length;h++){const c=s[h],f=c.attributes;for(let o=0;o<f.length;o++){const w=f[o];w.value.indexOf("{{")!==-1&&c.setAttribute(w.name,w.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Te(e,t,l,r,s,h){const c={};for(let o=0;o<e.children.length;o++){const w=e.children[o],m=w.getAttribute("data-ln-render-key");m&&(c[m]=w)}const f=document.createDocumentFragment();for(let o=0;o<t.length;o++){const w=t[o],m=String(r(w));let v=c[m];if(v)s(v,w,o);else{const E=J(l,h);if(!E||(N(E,w),v=E.firstElementChild,!v))continue;v.setAttribute("data-ln-render-key",m),s(v,w,o)}f.appendChild(v)}e.textContent="",e.appendChild(f)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=Z,window.lnCore.lnFill=Le,window.lnCore.renderList=Te);function F(e,t,l){const r=e.getAttribute(t);return r===null?l:r}function ee(e,t,l){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?l:r}function P(e,t,l=!1){const r=e.getAttribute(t);if(r===null)return!!l;const s=r.trim().toLowerCase();return!(s==="false"||s==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(l=>l.trim()).filter(Boolean)}const B=new Map;function ne(e,t){const l=(e?e.join("|"):"")+"::"+t;if(B.has(l))return B.get(l);const r=new Set(e||[]),s=function(h,c){const f=h.getAttribute(c);return f!==null&&r.has(f)?f:t};return B.set(l,s),s}function ie(e,t,l){const r=parseFloat(e.getAttribute(t));return isNaN(r)?l:r}function le(e,t,l){const r=e.getAttribute(t);if(!r)return l;try{return JSON.parse(r)}catch{return l}}function re(e,t,l,r,s){if(!e||t===null)return!0;const h=r||"ln-component",c=e.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||t===""&&e.fallback!==void 0)return!0;const f=o=>{s?console.warn(o,s):console.warn(o)};if(c==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(f(`[${h}] Invalid value "${t}" for boolean attribute "${l}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const o=e.values||[];return o.includes(t)?!0:(f(`[${h}] Invalid value "${t}" for attribute "${l}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(t))return f(`[${h}] Invalid integer "${t}" for attribute "${l}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(f(`[${h}] Value ${o} for attribute "${l}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(f(`[${h}] Value ${o} for attribute "${l}" is greater than max (${e.max}).`),!1):!0}if(c==="float")return isNaN(Number(t))?(f(`[${h}] Invalid float "${t}" for attribute "${l}". Fallback: ${e.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(t),!0}catch(o){return f(`[${h}] Invalid JSON for attribute "${l}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function oe(e,t,l){for(const r in l){const[s,h,c]=l[r];Object.defineProperty(e,r,{get:function(){return s(t,h,c)},enumerable:!0,configurable:!0})}return e}function se(e){const t={};for(const l in e){const r=e[l];if(!r||!r.prop)continue;let s=r.read;if(!s&&r.type)switch(r.type){case"enum":s=ne(r.values,r.fallback);break;case"integer":s=ee;break;case"float":s=ie;break;case"boolean":s=P;break;case"list":s=te;break;case"json":s=le;break;case"string":default:s=F;break}s||(s=F),t[r.prop]=[s,l,r.fallback]}return t}function qe(e){const t={};for(const l in e){const r=e[l];r&&r.effect&&(t[l]=r.effect)}return Object.keys(t).length?t:null}function Re(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const l in e.effects)t.add(l);if(e.onAttrChange&&e.declared)for(const l of e.declared)t.add(l);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=oe,window.lnCore.attrSpec=se,window.lnCore.attrStr=F,window.lnCore.attrInt=ee,window.lnCore.attrBool=P,window.lnCore.attrList=te,window.lnCore.attrEnum=ne,window.lnCore.attrFloat=ie,window.lnCore.attrJson=le);function O(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(l){console.error("["+t.attribute+"] init failed",e,l)}}}function ae(e,t,l,r){if(e.nodeType!==1)return;const h=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",c={selector:t,attribute:l,ComponentFn:r};if(e.matches&&e.matches(h)&&O(e,c),e.querySelectorAll){const f=e.querySelectorAll(h);for(let o=0;o<f.length;o++)O(f[o],c)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ie(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Fe(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 ce(){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 Oe(e){const t=ce(),l=e.observed||[];for(let r=0;r<l.length;r++){const s=l[r];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const s=t.byDeclaredAttr.get(r);s.some(h=>h.componentTag===e.componentTag)||s.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Re(e);if(r===null)t.reactiveWildcard.push(e);else for(const s of r)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function de(e,t,l,r){for(let s=0;s<e.length;s++){const h=e[s];if(!t[h.attribute])continue;const c=h.effects&&h.effects[l];c?c(t,l,r):h.onAttrChange&&(!h.declared||h.declared.has(l))&&h.onAttrChange(t,l,r)}}function He(e){const t=e.attributeName,l=t.indexOf("data-ln-")===0,r=ce(),s=r.byAttr.get(t),h=G()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!l&&!s&&!h)return;const c=e.target;if(e.oldValue!==c.getAttribute(t)){if(h&&W(c)){const f=r.byDeclaredAttr.get(t),o=c.getAttribute(t);for(let w=0;w<f.length;w++)re(f[w].spec,o,t,f[w].componentTag,c)}if(window.lnCore._debugSink&&(l||s)&&window.lnCore._debugSink("attr",t,c,{oldValue:e.oldValue,newValue:c.getAttribute(t)}),l){const f=r.byReactive.get(t);f&&de(f,c,t,e.oldValue),r.reactiveWildcard.length&&de(r.reactiveWildcard,c,t,e.oldValue)}if(s)for(let f=0;f<s.length;f++){const o=s[f];if(o.handler){o.handler(c,t,e.oldValue);continue}o.onAttributeChange&&c[o.attribute]?o.onAttributeChange(c,t):(ae(c,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(c))}}}function We(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,H(function(){new MutationObserver(function(t){for(let l=0;l<t.length;l++)try{He(t[l])}catch(r){console.error("[ln-core] mutation handler failed",t[l].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function z(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function j(e,t){if(!document.contains(e))if(t.attribute){const l=e[t.attribute];if(l&&typeof l.destroy=="function")try{l.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ue(e){const t=V();if(!t.length)return;const l=e.target;if(l){const s=l.nodeType===1?l:l.parentElement;if(s&&(s.isContentEditable||s.closest&&s.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=z();if(e.target&&r.length)for(let s=0;s<r.length;s++){const h=r[s],c=h.query,f=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;f&&h.onSubtreeChange(f,e)}for(let s=0;s<e.addedNodes.length;s++){const h=e.addedNodes[s];if(h.nodeType===1){const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<t.length;f++){const o=t[f];if(o.selector&&o.attribute&&o.ComponentFn){if(!c)h.matches&&h.matches(o.query)&&O(h,o);else if(h.matches&&h.matches(o.query)&&O(h,o),h.querySelectorAll){const w=h.querySelectorAll(o.query);for(let m=0;m<w.length;m++)O(w[m],o)}}o.onInit&&o.onInit(h)}}}for(let s=0;s<e.removedNodes.length;s++){const h=e.removedNodes[s];if(h.nodeType===1){if(document.contains(h))continue;const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<t.length;f++){const o=t[f],w=o.query;if(w){if(!c)h.matches&&h.matches(w)&&j(h,o);else if(h.matches&&h.matches(w)&&j(h,o),h.querySelectorAll){const m=h.querySelectorAll(w);for(let v=0;v<m.length;v++)j(m[v],o)}}}}}}function he(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,H(function(){const e=new MutationObserver(function(t){for(let l=0;l<t.length;l++){const r=t[l];if(r.type==="childList")try{ue(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const l=t.takeRecords();for(let r=0;r<l.length;r++){const s=l[r];if(s.type==="childList")try{ue(s)}catch(h){console.error("[ln-core] lifecycle handler failed",s.target,h)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ne(e){V().push(e),e.onSubtreeChange&&e.query&&z().push(e),he()}function fe(e,t,l,r,s={}){const h=s.extraAttributes||[],c=s.onAttributeChange||null,f=s.onSubtreeChange||null,o=s.onInit||null,w=s.onAttrChange||null,m=s.effects||null,v=s.attributes||null,E=v?qe(v):m,q=v?new Set(Object.keys(v)):null,R=s.persist||null;function I(b){const d=b||document.body;if(ae(d,e,t,l),v&&G())for(const p in v){const _=v[p],g=Array.from(d.querySelectorAll("["+p+"]"));d.matches&&d.matches("["+p+"]")&&g.push(d);for(let y=0;y<g.length;y++){const L=g[y];W(L)&&re(_,L.getAttribute(p),p,r,L)}}o&&o(d)}const A=[];if(e.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let d;for(;(d=b.exec(e))!==null;)A.push(d[1])}else A.push(e);Oe({selector:e,attribute:t,componentTag:r,attributes:v,ComponentFn:l,onInit:o,observed:A.concat(h),onAttributeChange:c,onAttrChange:w,effects:E,declared:q,persist:R}),We();const i=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,u=s.subtreeQuery||(i?e:"["+e+"]"),n={selector:e,attribute:t,ComponentFn:l,onInit:o,onSubtreeChange:f,query:u};V().push(n),f&&u&&z().push(n),he(),window[t]=I,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=fe,window.lnCore.observeLifecycle=Ne,window.lnCore.withoutLifecycle=Me);function a(){Ie()>0?Fe(function(){I(document.body)}):I(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a):a(),I}function Pe(e,t){let l=!1;return function(){l||(l=!0,queueMicrotask(function(){l=!1,e()}))}}function Be(e){e=e||{};let t=e.windowSize>0?e.windowSize:1e3,l=e.pageSize>0?e.pageSize:200,r=e.threshold!=null?e.threshold:25,s=e.fetchDebounce!=null?e.fetchDebounce:120;const h=typeof e.requestPage=="function"?e.requestPage:function(){},c=typeof e.onChange=="function"?e.onChange:function(){},f=new Map,o=new Map,w=new Set;let m=0,v=0,E=0,q={sort:null,filters:{},search:""},R=null,I=0,A=0,i=!1;function u(d){o.set(d,++I)}function n(){return!!(q&&(q.search||q.filters&&Object.keys(q.filters).length))}function a(){if(f.size<=t)return;const d=Array.from(f.keys()).sort(function(_,g){return(o.get(_)||0)-(o.get(g)||0)});let p=0;for(;f.size>t&&p<d.length;)f.delete(d[p]),o.delete(d[p]),p++}function b(d,p){w.add(d),h(q,d,p)}return{get:function(d){return f.get(d)},has:function(d){return f.has(d)},peek:function(){return f.size?f.values().next().value:void 0},get logicalTotal(){return m},get grandTotal(){return v},get queryGen(){return E},get size(){return f.size},ensure:function(d,p){clearTimeout(R),A=d;for(let D=d;D<p;D++)f.has(D)&&u(D);if(m<=0)return;const _=Math.max(0,d-r),g=Math.min(m,p+r),y=Math.floor(_/l),L=Math.floor(Math.max(0,g-1)/l);let T=-1;for(let D=y;D<=L;D++){const C=D*l,S=Math.min(l,m-C);let x=!1;const st=Math.max(C,_),at=Math.min(C+S,g);for(let $=st;$<at;$++)if(!f.has($)){x=!0;break}if(x&&!w.has(C)){T=C;break}}T!==-1&&(R=setTimeout(function(){b(T,l)},s))},ingest:function(d){if(d=d||{},d.queryGen!=null&&d.queryGen!==E)return!1;const p=d.offset||0,_=d.data||[];let g=0;for(let y=0;y<_.length;y++)_[y]!=null&&g++;if(g===0&&(d.provisional||d.filtered>0))return w.delete(p),!1;i&&(f.clear(),o.clear(),i=!1),d.provisional||(v=d.total!=null?d.total:v,m=d.filtered!=null?d.filtered:d.data?d.data.length:m);for(let y=0;y<_.length;y++)_[y]!=null&&(f.set(p+y,_[y]),u(p+y));return w.delete(p),a(),c(),!0},requestInitial:function(d){d&&(q=d),b(0,l)},invalidate:function(d){E++,w.clear(),clearTimeout(R),d&&(q=d),i=!0,b(0,l)},revalidate:function(){E++,w.clear(),clearTimeout(R),i=!0;const d=Math.max(0,Math.floor(A/l)*l);b(d,l)},release:function(d){w.delete(d)},destroy:function(){clearTimeout(R),f.clear(),o.clear(),w.clear()},configure:function(d){d=d||{};let p=!1;if(d.windowSize!=null&&d.windowSize>0&&d.windowSize!==t){const _=d.windowSize<t;t=d.windowSize,_&&a(),p=!0}d.pageSize!=null&&d.pageSize>0&&(l=d.pageSize),d.threshold!=null&&d.threshold>=0&&(r=d.threshold),d.fetchDebounce!=null&&d.fetchDebounce>=0&&(s=d.fetchDebounce),p&&c()},setGrandTotal:function(d){d==null||isNaN(d)||d<0||(v=d,n()||(m=d),c())}}}function be(e){return(e||"").replace(/^#/,"")}function U(e){const t=e===void 0?location.hash:e,l={},r=be(t);if(!r)return l;const s=r.split("&");for(let h=0;h<s.length;h++){const c=s[h];if(!c)continue;const f=c.indexOf(":"),o=f>-1?c.slice(0,f):c,w=f>-1?c.slice(f+1):"";if(o)try{l[o]=decodeURIComponent(w)}catch{l[o]=w}}return l}function Ve(e){if(!e)return null;const t=U();return e in t?t[e]:null}function ze(e,t){if(!e)return;const l=U();t==null?delete l[e]:l[e]=String(t);const s=Object.keys(l).map(function(h){const c=l[h];return c===""?h:h+":"+encodeURIComponent(c)}).join("&");be(location.hash)!==s&&(location.hash=s)}function je(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ue(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const l=e.getAttribute("data-ln-hash");if(l&&l.trim()!=="")return l.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 $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ge(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 Qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ke(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const l=e.slice(0,t),r=e.slice(t+1),s=r?r.split(",").map(function(h){try{return decodeURIComponent(h)}catch{return h}}).filter(Boolean):[];return{key:l,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=U,window.lnCore.hashGet=Ve,window.lnCore.hashSet=ze,window.lnCore.hashLinkClick=je,window.lnCore.resolveHashNamespace=Ue,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=Ge,window.lnCore.hashFilterEncode=Qe,window.lnCore.hashFilterDecode=Ke);function Ye(e){return(e||"").replace(/^\?/,"")}function Je(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,l={},r=Ye(t);if(!r)return l;const s=new URLSearchParams(r);for(const[h,c]of s.entries())l[h]=c;return l}function Xe(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ze(e,t){if(!e||typeof window>"u")return;const l=new URL(window.location.href);if(t==null||t===""?l.searchParams.delete(e):l.searchParams.set(e,String(t)),l.search===window.location.search)return;const r=l.pathname+l.search+l.hash;window.history.replaceState(window.history.state,"",r)}function et(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const l=e.getAttribute("data-ln-query");if(l&&l.trim()!=="")return l.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 tt(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function nt(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const l=t.sort_field||t.sort_by;if(l){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:l,direction:r}}}return null}function it(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function lt(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Je,window.lnCore.queryGet=Xe,window.lnCore.querySet=Ze,window.lnCore.resolveQueryParam=et,window.lnCore.querySortEncode=tt,window.lnCore.querySortDecode=nt,window.lnCore.queryFilterEncode=it,window.lnCore.queryFilterDecode=lt);function rt(){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=rt);function we(e,t,l,r,s=15){if(r<=0||l<=0)return{start:0,end:0,topPadding:0,bottomPadding:0};const h=Math.max(0,e||0),c=Math.max(0,t||0),f=Math.floor(h/l),o=Math.ceil(c/l),w=Math.max(0,f-s),m=Math.min(r,f+o+s),v=w*l,E=Math.max(0,(r-m)*l);return{start:w,end:m,topPadding:v,bottomPadding:E}}function ot(e,t){const l=Array.isArray(e)?e.length:0,r=t instanceof Set?t:new Set(t||[]);let s=0;if(Array.isArray(e))for(let f=0;f<e.length;f++)r.has(e[f])&&s++;else s=r.size;const h=l>0&&s===l,c=s>0&&s<l;return{totalCount:l,selectedCount:s,isAllSelected:h,isIndeterminate:c}}function pe(e,t,l){const r=new Set(e);return t==null||((l!==void 0?l:!r.has(t))?r.add(t):r.delete(t)),r}function _e(e,t,l){const r=new Set(e);if(!Array.isArray(t))return r;if(l)for(let s=0;s<t.length;s++)t[s]!=null&&r.add(t[s]);else for(let s=0;s<t.length;s++)r.delete(t[s]);return r}(function(){const e="data-ln-table",t="lnTable",l="data-ln-table-empty";if(window[t]!==void 0)return;function o(i,u){if(!i||!i.isDataDriven)return;const n=i.dom.hasAttribute("data-ln-table-window");if(n&&!i._windowed)i._enterWindowedMode(),i._kickWindowInitial();else if(!n&&i._windowed)i._exitWindowedMode();else if(n&&i._windowed){const a=parseInt(u,10);a>0&&i._cache.configure({windowSize:a})}}function w(i,u){if(!i||!i.isDataDriven||!i._windowed||!i._cache)return;const n=parseInt(u,10);n>0&&i._cache.configure({pageSize:n})}function m(i,u){if(!i||!i.isDataDriven||!i._windowed||!i._cache)return;const n=parseInt(u,10);n>=0&&i._cache.configure({threshold:n})}function v(i,u){if(!i||!i.isDataDriven||!i._windowed||!i._cache)return;const n=parseInt(u,10);n>=0&&i._cache.setGrandTotal(n)}const E={"data-ln-table":{prop:"name",type:"string",read:F,fallback:"",description:"Table instance name or identifier"},"data-ln-table-source":{prop:"source",type:"string",read:F,fallback:"",description:"Source store or coordinator addressing"},"data-ln-table-selectable":{prop:"_selectable",type:"boolean",read:P,description:"Enables row selection check controls"},"data-ln-table-window":{type:"integer",fallback:1e3,min:10,effect:o,description:"Virtual scrolling window size in rows"},"data-ln-table-window-page":{type:"integer",fallback:200,min:5,effect:w,description:"Virtual scrolling slice page size"},"data-ln-table-window-threshold":{type:"integer",fallback:50,min:0,effect:m,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-table-count":{type:"integer",min:0,effect:v,description:"Total record count override for virtual scrollbar calculation"},"data-ln-table-row":{type:"marker",description:"Table row template element"},"data-ln-table-row-id":{type:"string",description:"Record identifier on row element"},"data-ln-table-row-action":{type:"trigger",description:"Action trigger inside a table row"},"data-ln-table-row-select":{type:"trigger",description:"Row selection checkbox trigger"},"data-ln-table-col":{type:"string",description:"Column header identifier or field mapping"},"data-ln-table-col-select":{type:"trigger",description:"Header select-all checkbox trigger"},"data-ln-table-cell-attr":{type:"string",description:"Cell attribute template mapping"},"data-ln-table-empty":{type:"marker",description:"Container for table empty state"},"data-ln-table-select-all-label":{type:"string",description:"Accessibility label for select-all header trigger"}},q=se(E);typeof Intl<"u"&&new Intl.Collator(document.documentElement.lang||void 0,{sensitivity:"base"});function R(i,u){if(i==null||isNaN(i))return"";try{return new Intl.NumberFormat(Ee(u)).format(i)}catch{return String(i)}}function I(i){let u=i.parentElement;for(;u&&u!==document.body&&u!==document.documentElement;){const a=getComputedStyle(u).overflowY;if(a==="auto"||a==="scroll")return u;u=u.parentElement}return null}function A(i){this.dom=i,oe(this,i,q),this.table=i.querySelector("table"),this.tbody=i.querySelector("[data-ln-table-body]")||i.querySelector("tbody"),this.thead=i.querySelector("thead");const u=this.thead?this.thead.querySelector("tr:last-child"):null;this.ths=u?Array.from(u.querySelectorAll("th")):[],this._totalSpan=i.querySelector("[data-ln-table-total]"),this._filteredSpan=i.querySelector("[data-ln-table-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==i?this._filteredSpan.parentElement:null),this._selectedSpan=i.querySelector("[data-ln-table-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==i?this._selectedSpan.parentElement:null),this.isDataDriven=i.hasAttribute("data-ln-table-source"),this._data=[],this._filteredData=[],this._searchTerm="",this._sortCol=-1,this._sortDir=null,this._columnFilters={},this.selectedIds=new Set,this._virtual=!1,this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._scrollContainer=null,this._colgroup=null;const n=this;return this._onSetSearch=function(a){const b=(a.detail&&a.detail.query!=null?a.detail.query:a.detail&&a.detail.term!=null?a.detail.term:"").trim();n.isDataDriven?(n.currentSearch=b,k(i,"ln-table:search",{table:n.name,query:n.currentSearch}),n._requestData()):(n._searchTerm=b.toLowerCase(),n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),k(i,"ln-table:filter",{term:n._searchTerm,matched:n._filteredData.length,total:n._data.length}))},i.addEventListener("ln-table:set-search",this._onSetSearch),this._onSearchChange=function(a){a.preventDefault(),n._onSetSearch(a)},i.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){n.isDataDriven?(n.currentFilters={},n.currentSearch="",k(i,"ln-table:clear-filters",{table:n.name}),n._requestData()):(n._searchTerm="",n._columnFilters={},n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),k(i,"ln-table:filter",{term:"",matched:n._filteredData.length,total:n._data.length}))},i.addEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this._selectableActive=!1,this._selectable&&this._enableSelection(),this.isDataDriven?(this.isLoaded=!1,this.totalCount=0,this.visibleCount=0,this.currentSort=null,this.currentFilters={},this.currentSearch="",this._lastTotal=0,this._lastFiltered=0,this._hasInitialSeed=!1,this._windowed=!1,this._cache=null,this.isDataDriven&&i.hasAttribute("data-ln-table-window")&&this._enterWindowedMode(),this._onSetData=function(a){const b=a.detail||{},d=b.data||[],p=b.total!=null?b.total:d.length;if(!(n._hasInitialSeed&&!n.isLoaded&&d.length===0&&p===0)){if(n._windowed){n._cache.ingest(b)&&!b.provisional&&i.classList.remove("ln-table--loading");return}n._data=d,n._lastTotal=p,n._lastFiltered=b.filtered!=null?b.filtered:n._data.length,n.totalCount=n._lastTotal,n.visibleCount=n._lastFiltered,n.isLoaded=!0,n._hasInitialSeed=!1,i.classList.remove("ln-table--loading"),n._vStart=-1,n._vEnd=-1,n._applyFilterAndSort(),n._render(),n._updateFooter(),k(i,"ln-table:rendered",{table:n.name,total:n.totalCount,visible:n.visibleCount})}},i.addEventListener("ln-table:set-data",this._onSetData),this._onSetLoading=function(a){const b=a.detail&&a.detail.loading;i.classList.toggle("ln-table--loading",!!b),b&&(n.isLoaded=!1)},i.addEventListener("ln-table:set-loading",this._onSetLoading),this._onPageFailed=function(a){!n._windowed||!n._cache||n._cache.release(a.detail&&a.detail.offset)},i.addEventListener("ln-table:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!n._windowed||!n._cache||n._cache.revalidate()},i.addEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(a){if(!(!n._windowed||!n._cache)){if(a&&a.detail&&a.detail.query){const b=a.detail.query;b.search!==void 0&&(n.currentSearch=b.search),b.filters!==void 0&&(n.currentFilters=b.filters),b.sort!==void 0&&(n.currentSort=b.sort)}n._requestData()}},i.addEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this._onSort=function(a){!a.detail||a.detail.field==null||(a.preventDefault(),n.currentSort=a.detail.direction==="none"?null:{field:a.detail.field,direction:a.detail.direction},n._requestData())},i.addEventListener("ln-sort:change",this._onSort),this._windowed&&this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden"),this._onRowClick=function(a){if(a.target.closest("[data-ln-table-row-select]")||a.target.closest("[data-ln-table-row-action]")||a.target.closest("a")||a.target.closest("button")||a.ctrlKey||a.metaKey||a.button===1)return;const b=a.target.closest("[data-ln-table-row]");if(!b)return;const d=b.getAttribute("data-ln-table-row-id"),p=b._lnRecord||{};k(i,"ln-table:row-click",{table:n.name,id:d,record:p})},this.tbody&&this.tbody.addEventListener("click",this._onRowClick),this._onRowAction=function(a){const b=a.target.closest("[data-ln-table-row-action]");if(!b)return;const d=b.closest("[data-ln-table-row]");if(!d)return;const p=b.getAttribute("data-ln-table-row-action"),_=d.getAttribute("data-ln-table-row-id"),g=d._lnRecord||{};k(i,"ln-table:row-action",{table:n.name,id:_,action:p,record:g})},this.tbody&&this.tbody.addEventListener("click",this._onRowAction),this.tbody&&this.tbody.rows.length>0&&this._parseRows(),setTimeout(function(){!n.dom||!document.contains(n.dom)||(n._windowed?n._kickWindowInitial():k(i,"ln-table:request-data",{table:n.name,sort:n.currentSort,filters:n.currentFilters,search:n.currentSearch}))},0)):(this._emptyTbodyObserver=null,this.tbody&&this.tbody.rows.length>0?this._parseRows():this.tbody&&(this._emptyTbodyObserver=new MutationObserver(function(){n.tbody.rows.length>0&&(n._emptyTbodyObserver.disconnect(),n._emptyTbodyObserver=null,n._parseRows())}),this._emptyTbodyObserver.observe(this.tbody,{childList:!0})),this._onSort=function(a){if(!a.detail||a.detail.column==null)return;a.preventDefault();const b=a.detail.direction==="none"?null:a.detail.direction;n._sortCol=b===null?-1:a.detail.column,n._sortDir=b,n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),k(i,"ln-table:sorted",{column:a.detail.column,direction:a.detail.direction,matched:n._filteredData.length,total:n._data.length})},i.addEventListener("ln-sort:change",this._onSort),this._onFilterChange=function(a){if(a.preventDefault(),!a.detail)return;const b=a.detail.key,d=a.detail.values||[];if(b){if(d.length===0)delete n._columnFilters[b];else{const p=[];for(let _=0;_<d.length;_++)p.push(d[_].toLowerCase());n._columnFilters[b]=p}n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),k(i,"ln-table:filter",{term:n._searchTerm,matched:n._filteredData.length,total:n._data.length})}},i.addEventListener("ln-filter:change",this._onFilterChange)),this}A.prototype._parseRows=function(){const i=this.tbody.rows,u=this.ths;this._data=[],i.length>0&&(this._rowHeight=i[0].offsetHeight||40),this._lockColumnWidths();for(let n=0;n<i.length;n++){const a=i[n],b=[],d=[],p=[];for(let g=0;g<a.cells.length;g++){const y=a.cells[g],L=y.textContent.trim();b[g]=Q(y),d[g]=L.toLowerCase(),y.querySelector("[data-ln-table-row-action]")||p.push(L.toLowerCase())}let _=null;if(this.isDataDriven){_={};const g=a.getAttribute("data-ln-table-row-id");g!=null&&(_.id=g);for(let y=0;y<u.length;y++){const L=u[y].getAttribute("data-ln-table-col");if(L){const T=y;if(T<a.cells.length){const D=a.cells[T];_[L]=Q(D)}}}}this._data.push({values:b,rawTexts:d,html:a.outerHTML,searchText:p.join(" "),id:this.isDataDriven&&_?_.id:void 0,..._})}this._filteredData=this._data.slice(),this._data.length>0&&(this._hasInitialSeed=!0),this.isDataDriven&&(this._lastTotal=this._data.length,this._lastFiltered=this._data.length,this.totalCount=this._data.length,this.visibleCount=this._data.length,this._updateFooter()),this._render(),k(this.dom,"ln-table:ready",{total:this._data.length})},A.prototype._applyFilterAndSort=function(){this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length},A.prototype._lockColumnWidths=function(){if(!this.table||!this.thead||this._colgroup)return;const i=document.createElement("colgroup");this.ths.forEach(function(u){const n=document.createElement("col");n.style.width=u.offsetWidth+"px",i.appendChild(n)}),this.table.insertBefore(i,this.table.firstChild),this.table.style.tableLayout="fixed",this._colgroup=i},A.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const i=this._lastTotal,u=this.visibleCount;if(i===0){this._disableVirtualScroll(),this._showEmptyState();return}if(this._filteredData.length===0||u===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const i=this._filteredData.length;i===0&&(this._searchTerm||Object.keys(this._columnFilters).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):i>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},A.prototype._renderAll=function(){if(this.isDataDriven){const i=this._filteredData,u=document.createDocumentFragment();for(let n=0;n<i.length;n++){const a=this._buildRow(i[n]);if(!a)break;u.appendChild(a)}this.tbody.replaceChildren(u),this._selectable&&this._updateSelectAll()}else{const i=[],u=this._filteredData;for(let n=0;n<u.length;n++)i.push(u[n].html);this.tbody.innerHTML=i.join(""),this._selectable&&this._restoreSelection()}},A.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const i=this;if(!this._rowHeight)if(this.tbody&&this.tbody.rows.length>0)this._rowHeight=this.tbody.rows[0].offsetHeight||40;else{let n=null;if(this._windowed){const a=this._cache?this._cache.peek():null;n=a?this._buildRow(a):this._buildPlaceholderRow()}else this.isDataDriven&&this._data.length>0&&(n=this._buildRow(this._data[0]));n&&this.tbody&&(this.tbody.appendChild(n),this._rowHeight=n.offsetHeight||40,n.remove())}this.isDataDriven?this._scrollContainer=I(this.dom):this._scrollContainer=null;const u=this._scrollContainer||window;this._scrollHandler=function(){i._rafId||(i._rafId=requestAnimationFrame(function(){i._rafId=null,i._windowed?i._renderWindowed():i._renderVirtual()}))},u.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._scrollHandler,{passive:!0})},A.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),window.removeEventListener("resize",this._scrollHandler),this._scrollHandler=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},A.prototype._renderVirtual=function(){const i=this._filteredData,u=i.length,n=this._rowHeight;if(!n||!u)return;const a=this.thead?this.thead.offsetHeight:0,b=this._scrollContainer;let d,p;if(b){const C=this.table.getBoundingClientRect(),S=b.getBoundingClientRect(),x=C.top-S.top+b.scrollTop+a;d=b.scrollTop-x,p=b.clientHeight}else{const x=this.table.getBoundingClientRect().top+window.scrollY+a;d=window.scrollY-x,p=window.innerHeight}const _=we(d,p,n,u,15),g=_.start,y=_.end;if(g===this._vStart&&y===this._vEnd)return;this._vStart=g,this._vEnd=y;const L=this.ths.length||1,T=_.topPadding,D=_.bottomPadding;if(this.isDataDriven){const C=document.createDocumentFragment();if(T>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const x=document.createElement("td");x.setAttribute("colspan",L),x.style.height=T+"px",S.appendChild(x),C.appendChild(S)}for(let S=g;S<y;S++){const x=this._buildRow(i[S]);x&&C.appendChild(x)}if(D>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const x=document.createElement("td");x.setAttribute("colspan",L),x.style.height=D+"px",S.appendChild(x),C.appendChild(S)}this.tbody.replaceChildren(C),this._selectable&&this._updateSelectAll()}else{let C="";T>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+L+'" style="height:'+T+'px;padding:0;border:none"></td></tr>');for(let S=g;S<y;S++)C+=i[S].html;D>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+L+'" style="height:'+D+'px;padding:0;border:none"></td></tr>'),this.tbody.innerHTML=C,this._selectable&&this._restoreSelection()}},A.prototype._buildPlaceholderRow=function(){const i=document.createElement("tr");i.className="ln-table__placeholder",i.setAttribute("aria-hidden","true");const u=document.createElement("td");return u.setAttribute("colspan",this.ths.length||1),u.style.height=this._rowHeight+"px",i.appendChild(u),i},A.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const i=this._rowHeight;if(!i)return;const u=this._cache.logicalTotal,n=this.thead?this.thead.offsetHeight:0,a=this._scrollContainer;let b,d;if(a){const C=this.table.getBoundingClientRect(),S=a.getBoundingClientRect(),x=C.top-S.top+a.scrollTop+n;b=a.scrollTop-x,d=a.clientHeight}else{const x=this.table.getBoundingClientRect().top+window.scrollY+n;b=window.scrollY-x,d=window.innerHeight}const p=we(b,d,i,u,15),_=p.start,g=p.end;if(_===this._vStart&&g===this._vEnd)return;const y=this.ths.length||1,L=p.topPadding,T=p.bottomPadding,D=document.createDocumentFragment();if(L>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=L+"px",C.appendChild(S),D.appendChild(C)}for(let C=_;C<g;C++)if(this._cache.has(C)){const S=this._buildRow(this._cache.get(C));S&&D.appendChild(S)}else D.appendChild(this._buildPlaceholderRow());if(T>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=T+"px",C.appendChild(S),D.appendChild(C)}this.tbody.replaceChildren(D),this._vStart=_,this._vEnd=g,this._cache.ensure(_,g)},A.prototype._showEmptyState=function(){const i=this.ths.length||1;let u=null,n=null;if(this.isDataDriven){const a=this._lastTotal!=null?this._lastTotal:this._data.length,d=this.visibleCount===0&&a>0,p=d?this.name+"-empty-filtered":this.name+"-empty";if(n=X(this.dom,p,"ln-table"),!n){const _=this.dom.querySelector("template[data-ln-table-empty]");if(_){const g=d?"search":"initial",y=_.content.querySelector('[data-ln-table-empty-when="'+g+'"]')||_.content.firstElementChild;y&&(n=document.importNode(y,!0))}}if(n)if(n.tagName==="TR")u=n;else{const _=document.createElement("td");_.setAttribute("colspan",String(i)),_.appendChild(n);const g=document.createElement("tr");g.className="ln-table__empty",g.appendChild(_),u=g}}else{const a=this.dom.querySelector("template["+l+"]"),b=document.createElement("td");b.setAttribute("colspan",String(i)),a&&b.appendChild(document.importNode(a.content,!0));const d=document.createElement("tr");d.className="ln-table__empty",d.appendChild(b),u=d}u?this.tbody.replaceChildren(u):this.tbody.replaceChildren(),k(this.dom,"ln-table:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},A.prototype._fillRow=function(i,u){N(i,u);const n=i.querySelectorAll("[data-ln-table-cell-attr]");for(let a=0;a<n.length;a++){const b=n[a],d=b.getAttribute("data-ln-table-cell-attr").split(",");for(let p=0;p<d.length;p++){const _=d[p].trim().split(":");if(_.length!==2)continue;const g=_[0].trim(),y=_[1].trim();u[g]!=null&&b.setAttribute(y,u[g])}}},A.prototype._buildRow=function(i){let u=X(this.dom,this.name+"-row","ln-table");if(!u){const a=this.dom.querySelector("template[data-ln-table-row]");a&&(u=document.importNode(a.content,!0))}let n=u?u.querySelector("[data-ln-table-row]")||u.firstElementChild:null;if(n)this._fillRow(n,i);else if(i&&i.html){const a=document.createElement("tbody");a.innerHTML=i.html,n=a.firstElementChild}else{n=document.createElement("tr"),n.setAttribute("data-ln-table-row","");const a=this.ths;for(let b=0;b<a.length;b++){const d=a[b].hasAttribute("data-ln-table-col-select"),p=document.createElement("td");if(d){const _=document.createElement("input");_.type="checkbox",_.setAttribute("data-ln-table-row-select",""),_.setAttribute("aria-label","Select row"),p.appendChild(_)}else{const _=a[b].getAttribute("data-ln-table-col");_&&i[_]!=null&&(p.textContent=String(i[_]))}n.appendChild(p)}}if(n._lnRecord=i,i.id!=null&&n.setAttribute("data-ln-table-row-id",i.id),this._selectable&&i.id!=null&&this.selectedIds.has(String(i.id))){n.classList.add("ln-row-selected");const a=n.querySelector("[data-ln-table-row-select]");a&&(a.checked=!0)}return n},A.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-table--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}ge(this,"ln-table:request-data","table")},A.prototype._enterWindowedMode=function(){const i=this,u=this.dom,n=parseInt(u.getAttribute("data-ln-table-window"),10),a=parseInt(u.getAttribute("data-ln-table-window-page"),10),b=parseInt(u.getAttribute("data-ln-table-window-threshold"),10);this._onCacheChange=function(){!i._windowed||!i._cache||(i.totalCount=i._cache.grandTotal,i.visibleCount=i._cache.logicalTotal,i._lastTotal=i._cache.grandTotal,i.isLoaded=!0,i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),k(u,"ln-table:rendered",{table:i.name,total:i.totalCount,visible:i.visibleCount}))},this._renderBatch=Pe(this._onCacheChange),this._cache=Be({windowSize:n>0?n:1e3,pageSize:a>0?a:200,threshold:b>=0?b:25,fetchDebounce:120,requestPage:function(d,p,_){k(u,"ln-table:request-data",{table:i.name,sort:d.sort,filters:d.filters,search:d.search,offset:p,limit:_,queryGen:i._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},A.prototype._kickWindowInitial=function(){if(this._data.length>0){let i=parseInt(this.dom.getAttribute("data-ln-table-count"),10);if(isNaN(i)&&this._totalSpan){const n=this._totalSpan.textContent.replace(/[^\d]/g,"");n&&(i=parseInt(n,10))}const u=i>0?i:this._data.length;this._cache.ingest({data:this._data,offset:0,total:u,filtered:u})}else this.dom.classList.add("ln-table--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},A.prototype._exitWindowedMode=function(){this._disableVirtualScroll(),this._cache&&this._cache.destroy(),this._cache=null,this._windowed=!1,this._renderBatch=null,this._onCacheChange=null,this._selectAllCheckbox&&this._selectAllCheckbox.classList.remove("hidden"),this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-table--loading"),this._requestData()},A.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox||!this.tbody)return;const i=this.tbody.querySelectorAll("[data-ln-table-row]"),u=[];for(let a=0;a<i.length;a++){const b=i[a].getAttribute("data-ln-table-row-id");b!=null&&u.push(b)}const n=ot(u,this.selectedIds);this._selectAllCheckbox.checked=n.isAllSelected,this._selectAllCheckbox.indeterminate=n.isIndeterminate},A.prototype._restoreSelection=function(){if(!this.tbody)return;const i=this.tbody.querySelectorAll("[data-ln-table-row]");for(let u=0;u<i.length;u++){const n=i[u].getAttribute("data-ln-table-row-id"),a=n!=null&&this.selectedIds.has(n);i[u].classList.toggle("ln-row-selected",a);const b=i[u].querySelector("[data-ln-table-row-select]");b&&(b.checked=a)}this._updateSelectAll()},Object.defineProperty(A.prototype,"selectedCount",{get:function(){return this.selectedIds.size},set:function(){}}),A.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const i=this;if(this._onSelectionChange=function(u){const n=u.target.closest("[data-ln-table-row-select]");if(!n)return;const a=n.closest("[data-ln-table-row]");if(!a)return;const b=a.getAttribute("data-ln-table-row-id");b!=null&&(i.selectedIds=pe(i.selectedIds,b,n.checked),a.classList.toggle("ln-row-selected",n.checked),i.selectedCount=i.selectedIds.size,i._updateSelectAll(),i._updateFooter(),k(i.dom,"ln-table:select",{table:i.name,selectedIds:i.selectedIds,count:i.selectedCount}))},this.tbody&&this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector('[data-ln-table-col-select] input[type="checkbox"]')||this.dom.querySelector("[data-ln-table-col-select]"),this._selectAllCheckbox&&this._selectAllCheckbox.tagName==="TH"){const u=document.createElement("input");u.type="checkbox";const n=i.dom.querySelector('[data-ln-table-dict="select-all"]'),a=i.dom.getAttribute("data-ln-table-select-all-label")||(n?n.textContent.trim():null)||"Select all";u.setAttribute("aria-label",a),this._selectAllCheckbox.appendChild(u),this._selectAllCheckbox=u}if(this._selectAllCheckbox&&(this._onSelectAll=function(){const u=i._selectAllCheckbox.checked,n=i.tbody?i.tbody.querySelectorAll("[data-ln-table-row]"):[],a=[];for(let b=0;b<n.length;b++){const d=n[b].getAttribute("data-ln-table-row-id"),p=n[b].querySelector("[data-ln-table-row-select]");d!=null&&(a.push(d),n[b].classList.toggle("ln-row-selected",u),p&&(p.checked=u))}i.selectedIds=_e(i.selectedIds,a,u),i.selectedCount=i.selectedIds.size,k(i.dom,"ln-table:select-all",{table:i.name,selected:u}),k(i.dom,"ln-table:select",{table:i.name,selectedIds:i.selectedIds,count:i.selectedCount}),i._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll)),this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let n=0;n<u.length;n++){const a=u[n].querySelector("[data-ln-table-row-select]"),b=u[n].getAttribute("data-ln-table-row-id");a&&a.checked&&b!=null&&(i.selectedIds=pe(i.selectedIds,b,!0),u[n].classList.add("ln-row-selected"))}this.selectedCount=this.selectedIds.size,this.selectedCount>0&&this._updateSelectAll()}},A.prototype._disableSelection=function(){if(!this._selectableActive)return;this._selectableActive=!1,this.tbody&&this._onSelectionChange&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll);const i=this.dom.querySelector("[data-ln-table-col-select]");if(i){const u=i.querySelector('input[type="checkbox"]');u&&u.remove()}if(this._selectAllCheckbox=null,this.selectedIds=_e(this.selectedIds,Array.from(this.selectedIds),!1),this.selectedCount=0,this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let n=0;n<u.length;n++){u[n].classList.remove("ln-row-selected");const a=u[n].querySelector("[data-ln-table-row-select]");a&&(a.checked=!1)}}this._updateFooter()},A.prototype._updateFooter=function(){let i=0,u=0;this.isDataDriven?(i=this._lastTotal!=null?this._lastTotal:this._data.length,u=this.visibleCount):(i=this._data.length,u=this._filteredData.length);const n=u<i;if(this._totalSpan&&(this._totalSpan.textContent=R(i,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=n?R(u,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!n),this._selectedSpan){const a=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=a>0?R(a,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",a===0)}},A.prototype.destroy=function(){this.dom[t]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-table:set-search",this._onSetSearch),this.dom.removeEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this.dom.removeEventListener("ln-table:set-data",this._onSetData),this.dom.removeEventListener("ln-table:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-table:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onRowClick),this.tbody.removeEventListener("click",this._onRowAction)),this._cache&&this._cache.destroy()):(this._emptyTbodyObserver&&(this._emptyTbodyObserver.disconnect(),this._emptyTbodyObserver=null),this.dom.removeEventListener("ln-sort:change",this._onSort),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-filter:change",this._onFilterChange)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._colgroup&&(this._colgroup.remove(),this._colgroup=null),this.table&&(this.table.style.tableLayout=""),this._data=[],this._filteredData=[],delete this.dom[t])},fe(e,t,A,"ln-table",{attributes:E})})()})();
|
|
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 H(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 r=null;for(let a=1;a<e.length;a++)if(e[a]&&e[a].nodeType===1){r=e[a];break}if(!H(r))return}t.apply(console,e)}}function k(t,e,l){const r=l||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,r),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:r}))}function gt(t,e,l){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const r={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};r[l]=t.name,k(t.dom,e,r)}function N(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){N(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function K(t){return t.hasAttribute("value")?t.getAttribute("value"):t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.textContent.trim()}function mt(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function yt(t,e){const l=!!(e&&e.typed),r=e&&e.exclude,a={},h=t.elements,c={};if(l)for(let f=0;f<h.length;f++){const o=h[f];o.name&&o.type==="checkbox"&&!o.disabled&&(c[o.name]=(c[o.name]||0)+1)}for(let f=0;f<h.length;f++){const o=h[f];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")l&&c[o.name]===1?a[o.name]=o.checked:(a[o.name]||(a[o.name]=[]),o.checked&&a[o.name].push(o.value));else if(o.type==="radio")o.checked&&(a[o.name]=o.value);else if(o.type==="select-multiple"){a[o.name]=[];for(let p=0;p<o.options.length;p++)o.options[p].selected&&a[o.name].push(o.options[p].value)}else if(l&&o.type==="hidden")a[o.name]=o.value;else if(l&&(o.type==="number"||o.type==="range")){const p=Number(o.value);a[o.name]=o.value===""||isNaN(p)?null:p}else a[o.name]=o.value}return a}function Ct(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function St(t,e){const l=t.elements,r=[],a={};for(let h=0;h<l.length;h++){const c=l[h];c.name&&c.type==="checkbox"&&(a[c.name]=(a[c.name]||0)+1)}for(let h=0;h<l.length;h++){const c=l[h];if(c.type==="file"||c.type==="submit"||c.type==="button")continue;const f=c.getAttribute("data-ln-fill-as")||c.name;if(!f||!(f in e))continue;const o=e[f];if(c.type==="checkbox"){if(Array.isArray(o))c.checked=o.indexOf(c.value)!==-1;else if(a[c.name]>1){const p=String(o).split(",").map(function(m){return m.trim()});c.checked=p.indexOf(c.value)!==-1}else c.checked=Ct(o);r.push(c)}else if(c.type==="radio")c.checked=c.value===String(o),r.push(c);else if(c.type==="select-multiple"){if(Array.isArray(o))for(let p=0;p<c.options.length;p++)c.options[p].selected=o.indexOf(c.options[p].value)!==-1;r.push(c)}else c.value=o,c.tagName==="SELECT"&&o!=null&&c.setAttribute("data-ln-value",o),r.push(c)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=St,window.lnCore.serializeForm=yt,window.lnCore.resolveFormMethod=mt);const Y={};function vt(t,e){Y[t]=e}function At(t){return Y[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=vt,window.lnCore.getDataMapper=At);function Et(t){const e=t?t.closest("[lang]"):null,l=(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 l?l.trim():"en-US"}function Dt(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,N(function(){new MutationObserver(function(){k(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const J={};function Lt(t,e){if(!t||typeof e!="object")return;const l=t.toLowerCase().split("-")[0];J[l]=e}function kt(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return J[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Lt,window.lnCore.getLocaleFallback=kt,window.lnCore.ensureLocaleObserver=Dt);const W={};function X(t,e){W[t]||(W[t]=document.querySelector('[data-ln-template="'+t+'"]'));const l=W[t];return l?l.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function M(t,e,l){if(t){const r=t.querySelector('[data-ln-template="'+e+'"]');if(r)return r.content.cloneNode(!0)}return X(e,l)}function Z(t,e){if(!t||!e)return t;const l=t.querySelectorAll("[data-ln-field]");for(let c=0;c<l.length;c++){const f=l[c],o=f.getAttribute("data-ln-field");e[o]!=null&&(f.textContent=e[o])}const r=t.querySelectorAll("[data-ln-attr]");for(let c=0;c<r.length;c++){const f=r[c],o=f.getAttribute("data-ln-attr").split(",");for(let p=0;p<o.length;p++){const m=o[p].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();e[E]!=null&&f.setAttribute(v,e[E])}}const a=t.querySelectorAll("[data-ln-show]");for(let c=0;c<a.length;c++){const f=a[c],o=f.getAttribute("data-ln-show");o in e&&f.classList.toggle("hidden",!e[o])}const h=t.querySelectorAll("[data-ln-class]");for(let c=0;c<h.length;c++){const f=h[c],o=f.getAttribute("data-ln-class").split(",");for(let p=0;p<o.length;p++){const m=o[p].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();E in e&&f.classList.toggle(v,!!e[E])}}return t}function xt(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 l=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<l.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",l[r],e??null),l[r].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)Z(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let l=0;l<e.length;l++)e[l].textContent=""}})));function P(t,e){if(!t||!e)return t;const l=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;l.nextNode();){const h=l.currentNode;h.textContent.indexOf("{{")!==-1&&(h.textContent=h.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,f){return e[f]!==void 0?e[f]:""}))}const r=function(h,c){return e[c]!==void 0?e[c]:""},a=Array.from(t.querySelectorAll("*"));t.nodeType===1&&a.push(t);for(let h=0;h<a.length;h++){const c=a[h],f=c.attributes;for(let o=0;o<f.length;o++){const p=f[o];p.value.indexOf("{{")!==-1&&c.setAttribute(p.name,p.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return t}function Tt(t,e,l,r,a,h){const c={};for(let o=0;o<t.children.length;o++){const p=t.children[o],m=p.getAttribute("data-ln-render-key");m&&(c[m]=p)}const f=document.createDocumentFragment();for(let o=0;o<e.length;o++){const p=e[o],m=String(r(p));let v=c[m];if(v)a(v,p,o);else{const E=X(l,h);if(!E||(P(E,p),v=E.firstElementChild,!v))continue;v.setAttribute("data-ln-render-key",m),a(v,p,o)}f.appendChild(v)}t.textContent="",t.appendChild(f)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=Z,window.lnCore.lnFill=xt,window.lnCore.renderList=Tt);function F(t,e,l){const r=t.getAttribute(e);return r===null?l:r}function tt(t,e,l){const r=parseInt(t.getAttribute(e),10);return isNaN(r)?l:r}function B(t,e,l=!1){const r=t.getAttribute(e);if(r===null)return!!l;const a=r.trim().toLowerCase();return!(a==="false"||a==="0")}function et(t,e){return(t.getAttribute(e)||"").split(",").map(l=>l.trim()).filter(Boolean)}const V=new Map;function nt(t,e){const l=(t?t.join("|"):"")+"::"+e;if(V.has(l))return V.get(l);const r=new Set(t||[]),a=function(h,c){const f=h.getAttribute(c);return f!==null&&r.has(f)?f:e};return V.set(l,a),a}function it(t,e,l){const r=parseFloat(t.getAttribute(e));return isNaN(r)?l:r}function lt(t,e,l){const r=t.getAttribute(e);if(!r)return l;try{return JSON.parse(r)}catch{return l}}function rt(t,e,l,r,a){if(!t||e===null)return!0;const h=r||"ln-component",c=t.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||e===""&&t.fallback!==void 0)return!0;const f=o=>{a?console.warn(o,a):console.warn(o)};if(c==="boolean"){const o=e.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(f(`[${h}] Invalid value "${e}" for boolean attribute "${l}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const o=t.values||[];return o.includes(e)?!0:(f(`[${h}] Invalid value "${e}" for attribute "${l}". Allowed: ${o.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(e))return f(`[${h}] Invalid integer "${e}" for attribute "${l}". Fallback: ${t.fallback}.`),!1;const o=parseInt(e,10);return t.min!==void 0&&o<t.min?(f(`[${h}] Value ${o} for attribute "${l}" is less than min (${t.min}).`),!1):t.max!==void 0&&o>t.max?(f(`[${h}] Value ${o} for attribute "${l}" is greater than max (${t.max}).`),!1):!0}if(c==="float")return isNaN(Number(e))?(f(`[${h}] Invalid float "${e}" for attribute "${l}". Fallback: ${t.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(e),!0}catch(o){return f(`[${h}] Invalid JSON for attribute "${l}": ${o.message}. Fallback: ${t.fallback}.`),!1}return!0}function ot(t,e,l){for(const r in l){const[a,h,c]=l[r];Object.defineProperty(t,r,{get:function(){return a(e,h,c)},enumerable:!0,configurable:!0})}return t}function st(t){const e={};for(const l in t){const r=t[l];if(!r||!r.prop)continue;let a=r.read;if(!a&&r.type)switch(r.type){case"enum":a=nt(r.values,r.fallback);break;case"integer":a=tt;break;case"float":a=it;break;case"boolean":a=B;break;case"list":a=et;break;case"json":a=lt;break;case"string":default:a=F;break}a||(a=F),e[r.prop]=[a,l,r.fallback]}return e}function qt(t){const e={};for(const l in t){const r=t[l];r&&r.effect&&(e[l]=r.effect)}return Object.keys(e).length?e:null}function It(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const l in t.effects)e.add(l);if(t.onAttrChange&&t.declared)for(const l of t.declared)e.add(l);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ot,window.lnCore.attrSpec=st,window.lnCore.attrStr=F,window.lnCore.attrInt=tt,window.lnCore.attrBool=B,window.lnCore.attrList=et,window.lnCore.attrEnum=nt,window.lnCore.attrFloat=it,window.lnCore.attrJson=lt);function O(t,e){if(!t[e.attribute]){window.lnCore._persistSink&&t.hasAttribute&&t.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(t,e.selector);try{t[e.attribute]=new e.ComponentFn(t)}catch(l){console.error("["+e.attribute+"] init failed",t,l)}}}function at(t,e,l,r){if(t.nodeType!==1)return;const h=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",c={selector:e,attribute:l,ComponentFn:r};if(t.matches&&t.matches(h)&&O(t,c),t.querySelectorAll){const f=t.querySelectorAll(h);for(let o=0;o<f.length;o++)O(f[o],c)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Rt(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ft(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 ct(){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 Ot(t){const e=ct(),l=t.observed||[];for(let r=0;r<l.length;r++){const a=l[r];e.byAttr.has(a)||e.byAttr.set(a,[]),e.byAttr.get(a).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const r in t.attributes){e.byDeclaredAttr.has(r)||e.byDeclaredAttr.set(r,[]);const a=e.byDeclaredAttr.get(r);a.some(h=>h.componentTag===t.componentTag)||a.push({spec:t.attributes[r],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const r=It(t);if(r===null)e.reactiveWildcard.push(t);else for(const a of r)e.byReactive.has(a)||e.byReactive.set(a,[]),e.byReactive.get(a).push(t)}t.persist&&e.persist.push(t)}function dt(t,e,l,r){for(let a=0;a<t.length;a++){const h=t[a];if(!e[h.attribute])continue;const c=h.effects&&h.effects[l];c?c(e,l,r):h.onAttrChange&&(!h.declared||h.declared.has(l))&&h.onAttrChange(e,l,r)}}function Nt(t){const e=t.attributeName,l=e.indexOf("data-ln-")===0,r=ct(),a=r.byAttr.get(e),h=Q()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(e);if(!l&&!a&&!h)return;const c=t.target;if(t.oldValue!==c.getAttribute(e)){if(h&&H(c)){const f=r.byDeclaredAttr.get(e),o=c.getAttribute(e);for(let p=0;p<f.length;p++)rt(f[p].spec,o,e,f[p].componentTag,c)}if(window.lnCore._debugSink&&(l||a)&&window.lnCore._debugSink("attr",e,c,{oldValue:t.oldValue,newValue:c.getAttribute(e)}),l){const f=r.byReactive.get(e);f&&dt(f,c,e,t.oldValue),r.reactiveWildcard.length&&dt(r.reactiveWildcard,c,e,t.oldValue)}if(a)for(let f=0;f<a.length;f++){const o=a[f];if(o.handler){o.handler(c,e,t.oldValue);continue}o.onAttributeChange&&c[o.attribute]?o.onAttributeChange(c,e):(at(c,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(c))}}}function Ht(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,N(function(){new MutationObserver(function(e){for(let l=0;l<e.length;l++)try{Nt(e[l])}catch(r){console.error("[ln-core] mutation handler failed",e[l].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function z(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function j(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function U(t,e){if(!document.contains(t))if(e.attribute){const l=t[e.attribute];if(l&&typeof l.destroy=="function")try{l.destroy()}catch(r){console.error("["+e.attribute+"] destroy failed",t,r)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function ut(t){const e=z();if(!e.length)return;const l=t.target;if(l){const a=l.nodeType===1?l:l.parentElement;if(a&&(a.isContentEditable||a.closest&&a.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=j();if(t.target&&r.length)for(let a=0;a<r.length;a++){const h=r[a],c=h.query,f=t.target.nodeType===1?t.target.matches&&t.target.matches(c)?t.target:t.target.closest?t.target.closest(c):null:t.target.parentElement&&t.target.parentElement.closest?t.target.parentElement.closest(c):null;f&&h.onSubtreeChange(f,t)}for(let a=0;a<t.addedNodes.length;a++){const h=t.addedNodes[a];if(h.nodeType===1){const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<e.length;f++){const o=e[f];if(o.selector&&o.attribute&&o.ComponentFn){if(!c)h.matches&&h.matches(o.query)&&O(h,o);else if(h.matches&&h.matches(o.query)&&O(h,o),h.querySelectorAll){const p=h.querySelectorAll(o.query);for(let m=0;m<p.length;m++)O(p[m],o)}}o.onInit&&o.onInit(h)}}}for(let a=0;a<t.removedNodes.length;a++){const h=t.removedNodes[a];if(h.nodeType===1){if(document.contains(h))continue;const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<e.length;f++){const o=e[f],p=o.query;if(p){if(!c)h.matches&&h.matches(p)&&U(h,o);else if(h.matches&&h.matches(p)&&U(h,o),h.querySelectorAll){const m=h.querySelectorAll(p);for(let v=0;v<m.length;v++)U(m[v],o)}}}}}}function ht(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,N(function(){const t=new MutationObserver(function(e){for(let l=0;l<e.length;l++){const r=e[l];if(r.type==="childList")try{ut(r)}catch(a){console.error("[ln-core] lifecycle handler failed",r.target,a)}}});window.lnCore._lifecycleObserver=t,t.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Wt(t){if(typeof window>"u")return t();window.lnCore=window.lnCore||{};const e=window.lnCore._lifecycleObserver;if(!e)return t();const l=e.takeRecords();for(let r=0;r<l.length;r++){const a=l[r];if(a.type==="childList")try{ut(a)}catch(h){console.error("[ln-core] lifecycle handler failed",a.target,h)}}e.disconnect();try{return t()}finally{e.observe(document.body,{childList:!0,subtree:!0})}}function Mt(t){z().push(t),t.onSubtreeChange&&t.query&&j().push(t),ht()}function ft(t,e,l,r,a={}){const h=a.extraAttributes||[],c=a.onAttributeChange||null,f=a.onSubtreeChange||null,o=a.onInit||null,p=a.onAttrChange||null,m=a.effects||null,v=a.attributes||null,E=v?qt(v):m,q=v?new Set(Object.keys(v)):null,I=a.persist||null;function R(b){const d=b||document.body;if(at(d,t,e,l),v&&Q())for(const w in v){const _=v[w],g=Array.from(d.querySelectorAll("["+w+"]"));d.matches&&d.matches("["+w+"]")&&g.push(d);for(let y=0;y<g.length;y++){const x=g[y];H(x)&&rt(_,x.getAttribute(w),w,r,x)}}o&&o(d)}const A=[];if(t.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let d;for(;(d=b.exec(t))!==null;)A.push(d[1])}else A.push(t);Ot({selector:t,attribute:e,componentTag:r,attributes:v,ComponentFn:l,onInit:o,observed:A.concat(h),onAttributeChange:c,onAttrChange:p,effects:E,declared:q,persist:I}),Ht();const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,u=a.subtreeQuery||(i?t:"["+t+"]"),n={selector:t,attribute:e,ComponentFn:l,onInit:o,onSubtreeChange:f,query:u};z().push(n),f&&u&&j().push(n),ht(),window[e]=R,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ft,window.lnCore.observeLifecycle=Mt,window.lnCore.withoutLifecycle=Wt);function s(){Rt()>0?Ft(function(){R(document.body)}):R(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s):s(),R}function Pt(t,e){let l=!1;return function(){l||(l=!0,queueMicrotask(function(){l=!1,t()}))}}function Bt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,l=t.pageSize>0?t.pageSize:200,r=t.threshold!=null?t.threshold:25,a=t.fetchDebounce!=null?t.fetchDebounce:120;const h=typeof t.requestPage=="function"?t.requestPage:function(){},c=typeof t.onChange=="function"?t.onChange:function(){},f=new Map,o=new Map,p=new Set;let m=0,v=0,E=0,q={sort:null,filters:{},search:""},I=null,R=0,A=0,i=!1;function u(d){o.set(d,++R)}function n(){return!!(q&&(q.search||q.filters&&Object.keys(q.filters).length))}function s(){if(f.size<=e)return;const d=Array.from(f.keys()).sort(function(_,g){return(o.get(_)||0)-(o.get(g)||0)});let w=0;for(;f.size>e&&w<d.length;)f.delete(d[w]),o.delete(d[w]),w++}function b(d,w){p.add(d),h(q,d,w)}return{get:function(d){return f.get(d)},has:function(d){return f.has(d)},peek:function(){return f.size?f.values().next().value:void 0},get logicalTotal(){return m},get grandTotal(){return v},get queryGen(){return E},get size(){return f.size},ensure:function(d,w){clearTimeout(I),A=d;for(let D=d;D<w;D++)f.has(D)&&u(D);if(m<=0)return;const _=Math.max(0,d-r),g=Math.min(m,w+r),y=Math.floor(_/l),x=Math.floor(Math.max(0,g-1)/l);let T=-1;for(let D=y;D<=x;D++){const C=D*l,S=Math.min(l,m-C);let L=!1;const se=Math.max(C,_),ae=Math.min(C+S,g);for(let G=se;G<ae;G++)if(!f.has(G)){L=!0;break}if(L&&!p.has(C)){T=C;break}}T!==-1&&(I=setTimeout(function(){b(T,l)},a))},ingest:function(d){if(d=d||{},d.queryGen!=null&&d.queryGen!==E)return!1;const w=d.offset||0,_=d.data||[];let g=0;for(let y=0;y<_.length;y++)_[y]!=null&&g++;if(g===0&&(d.provisional||d.filtered>0))return p.delete(w),!1;i&&(f.clear(),o.clear(),i=!1),d.provisional||(v=d.total!=null?d.total:v,m=d.filtered!=null?d.filtered:d.data?d.data.length:m);for(let y=0;y<_.length;y++)_[y]!=null&&(f.set(w+y,_[y]),u(w+y));return p.delete(w),s(),c(),!0},requestInitial:function(d){d&&(q=d),b(0,l)},invalidate:function(d){E++,p.clear(),clearTimeout(I),d&&(q=d),i=!0,b(0,l)},revalidate:function(){E++,p.clear(),clearTimeout(I),i=!0;const d=Math.max(0,Math.floor(A/l)*l);b(d,l)},release:function(d){p.delete(d)},destroy:function(){clearTimeout(I),f.clear(),o.clear(),p.clear()},configure:function(d){d=d||{};let w=!1;if(d.windowSize!=null&&d.windowSize>0&&d.windowSize!==e){const _=d.windowSize<e;e=d.windowSize,_&&s(),w=!0}d.pageSize!=null&&d.pageSize>0&&(l=d.pageSize),d.threshold!=null&&d.threshold>=0&&(r=d.threshold),d.fetchDebounce!=null&&d.fetchDebounce>=0&&(a=d.fetchDebounce),w&&c()},setGrandTotal:function(d){d==null||isNaN(d)||d<0||(v=d,n()||(m=d),c())}}}function bt(t){return(t||"").replace(/^#/,"")}function $(t){const e=t===void 0?location.hash:t,l={},r=bt(e);if(!r)return l;const a=r.split("&");for(let h=0;h<a.length;h++){const c=a[h];if(!c)continue;const f=c.indexOf(":"),o=f>-1?c.slice(0,f):c,p=f>-1?c.slice(f+1):"";if(o)try{l[o]=decodeURIComponent(p)}catch{l[o]=p}}return l}function Vt(t){if(!t)return null;const e=$();return t in e?e[t]:null}function zt(t,e){if(!t)return;const l=$();e==null?delete l[t]:l[t]=String(e);const a=Object.keys(l).map(function(h){const c=l[h];return c===""?h:h+":"+encodeURIComponent(c)}).join("&");bt(location.hash)!==a&&(location.hash=a)}function jt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function Ut(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const l=t.getAttribute("data-ln-hash");if(l&&l.trim()!=="")return l.trim();const r=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return r?e?r+"-"+e:r:e||null}function $t(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Gt(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 Qt(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function Kt(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const l=t.slice(0,e),r=t.slice(e+1),a=r?r.split(",").map(function(h){try{return decodeURIComponent(h)}catch{return h}}).filter(Boolean):[];return{key:l,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=Vt,window.lnCore.hashSet=zt,window.lnCore.hashLinkClick=jt,window.lnCore.resolveHashNamespace=Ut,window.lnCore.hashSortEncode=$t,window.lnCore.hashSortDecode=Gt,window.lnCore.hashFilterEncode=Qt,window.lnCore.hashFilterDecode=Kt);function Yt(t){return(t||"").replace(/^\?/,"")}function Jt(t){const e=t===void 0?typeof window<"u"?window.location.search:"":t,l={},r=Yt(e);if(!r)return l;const a=new URLSearchParams(r);for(const[h,c]of a.entries())l[h]=c;return l}function Xt(t){if(!t||typeof window>"u")return null;const e=new URLSearchParams(window.location.search);return e.has(t)?e.get(t):null}function Zt(t,e){if(!t||typeof window>"u")return;const l=new URL(window.location.href);if(e==null||e===""?l.searchParams.delete(t):l.searchParams.set(t,String(e)),l.search===window.location.search)return;const r=l.pathname+l.search+l.hash;window.history.replaceState(window.history.state,"",r)}function te(t,e){if(!t||!t.hasAttribute("data-ln-query"))return null;const l=t.getAttribute("data-ln-query");if(l&&l.trim()!=="")return l.trim();const r=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return r?e?r+"_"+e:r:e||null}function ee(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function ne(t,e){if(t&&typeof t=="string"){if(t.endsWith(".asc"))return{fieldOrColumn:t.slice(0,-4),direction:"asc"};if(t.endsWith(".desc"))return{fieldOrColumn:t.slice(0,-5),direction:"desc"}}if(e&&typeof e=="object"){const l=e.sort_field||e.sort_by;if(l){const r=e.sort_dir&&String(e.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:l,direction:r}}}return null}function ie(t){return!Array.isArray(t)||t.length===0?null:t.map(encodeURIComponent).join(",")}function le(t){return!t||typeof t!="string"?[]:t.split(",").map(function(e){try{return decodeURIComponent(e.trim())}catch{return e.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Jt,window.lnCore.queryGet=Xt,window.lnCore.querySet=Zt,window.lnCore.resolveQueryParam=te,window.lnCore.querySortEncode=ee,window.lnCore.querySortDecode=ne,window.lnCore.queryFilterEncode=ie,window.lnCore.queryFilterDecode=le);function re(){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=re);function pt(t,e,l,r,a=15){if(r<=0||l<=0)return{start:0,end:0,topPadding:0,bottomPadding:0};const h=Math.max(0,t||0),c=Math.max(0,e||0),f=Math.floor(h/l),o=Math.ceil(c/l),p=Math.max(0,f-a),m=Math.min(r,f+o+a),v=p*l,E=Math.max(0,(r-m)*l);return{start:p,end:m,topPadding:v,bottomPadding:E}}function oe(t,e){const l=Array.isArray(t)?t.length:0,r=e instanceof Set?e:new Set(e||[]);let a=0;if(Array.isArray(t))for(let f=0;f<t.length;f++)r.has(t[f])&&a++;else a=r.size;const h=l>0&&a===l,c=a>0&&a<l;return{totalCount:l,selectedCount:a,isAllSelected:h,isIndeterminate:c}}function wt(t,e,l){const r=new Set(t);return e==null||((l!==void 0?l:!r.has(e))?r.add(e):r.delete(e)),r}function _t(t,e,l){const r=new Set(t);if(!Array.isArray(e))return r;if(l)for(let a=0;a<e.length;a++)e[a]!=null&&r.add(e[a]);else for(let a=0;a<e.length;a++)r.delete(e[a]);return r}(function(){const t="data-ln-table",e="lnTable",l="data-ln-table-empty";if(window[e]!==void 0)return;function o(i,u){if(!i||!i.isDataDriven)return;const n=i.dom.hasAttribute("data-ln-table-window");if(n&&!i._windowed)i._enterWindowedMode(),i._kickWindowInitial();else if(!n&&i._windowed)i._exitWindowedMode();else if(n&&i._windowed){const s=parseInt(u,10);s>0&&i._cache.configure({windowSize:s})}}function p(i,u){if(!i||!i.isDataDriven||!i._windowed||!i._cache)return;const n=parseInt(u,10);n>0&&i._cache.configure({pageSize:n})}function m(i,u){if(!i||!i.isDataDriven||!i._windowed||!i._cache)return;const n=parseInt(u,10);n>=0&&i._cache.configure({threshold:n})}function v(i,u){if(!i||!i.isDataDriven||!i._windowed||!i._cache)return;const n=parseInt(u,10);n>=0&&i._cache.setGrandTotal(n)}const E={"data-ln-table":{prop:"name",type:"string",read:F,fallback:"",description:"Table instance name or identifier"},"data-ln-table-source":{prop:"source",type:"string",read:F,fallback:"",description:"Source store or coordinator addressing"},"data-ln-table-selectable":{prop:"_selectable",type:"boolean",read:B,description:"Enables row selection check controls"},"data-ln-table-window":{type:"integer",fallback:1e3,min:10,effect:o,description:"Virtual scrolling window size in rows"},"data-ln-table-window-page":{type:"integer",fallback:200,min:5,effect:p,description:"Virtual scrolling slice page size"},"data-ln-table-window-threshold":{type:"integer",fallback:50,min:0,effect:m,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-table-count":{type:"integer",min:0,effect:v,description:"Total record count override for virtual scrollbar calculation"},"data-ln-table-row":{type:"marker",description:"Table row template element"},"data-ln-table-row-id":{type:"string",description:"Record identifier on row element"},"data-ln-table-row-action":{type:"trigger",description:"Action trigger inside a table row"},"data-ln-table-row-select":{type:"trigger",description:"Row selection checkbox trigger"},"data-ln-table-col":{type:"string",description:"Column header identifier or field mapping"},"data-ln-table-col-select":{type:"trigger",description:"Header select-all checkbox trigger"},"data-ln-table-cell-attr":{type:"string",description:"Cell attribute template mapping"},"data-ln-table-empty":{type:"marker",description:"Container for table empty state"},"data-ln-table-loading":{type:"marker",description:"Loading indicator element in footer or template"},"data-ln-table-select-all-label":{type:"string",description:"Accessibility label for select-all header trigger"}},q=st(E);typeof Intl<"u"&&new Intl.Collator(document.documentElement.lang||void 0,{sensitivity:"base"});function I(i,u){if(i==null||isNaN(i))return"";try{return new Intl.NumberFormat(Et(u)).format(i)}catch{return String(i)}}function R(i){let u=i.parentElement;for(;u&&u!==document.body&&u!==document.documentElement;){const s=getComputedStyle(u).overflowY;if(s==="auto"||s==="scroll")return u;u=u.parentElement}return null}function A(i){this.dom=i,ot(this,i,q),this.table=i.querySelector("table"),this.tbody=i.querySelector("[data-ln-table-body]")||i.querySelector("tbody"),this.thead=i.querySelector("thead");const u=this.thead?this.thead.querySelector("tr:last-child"):null;this.ths=u?Array.from(u.querySelectorAll("th")):[],this._totalSpan=i.querySelector("[data-ln-table-total]"),this._filteredSpan=i.querySelector("[data-ln-table-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==i?this._filteredSpan.parentElement:null),this._selectedSpan=i.querySelector("[data-ln-table-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==i?this._selectedSpan.parentElement:null),this._loadingIndicator=i.querySelector("[data-ln-table-loading]"),this._loadingIndicator&&this._loadingIndicator.classList.add("hidden"),this.isDataDriven=i.hasAttribute("data-ln-table-source"),this._data=[],this._filteredData=[],this._searchTerm="",this._sortCol=-1,this._sortDir=null,this._columnFilters={},this.selectedIds=new Set,this._virtual=!1,this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._scrollContainer=null,this._colgroup=null;const n=this;return this._onSetSearch=function(s){const b=(s.detail&&s.detail.query!=null?s.detail.query:s.detail&&s.detail.term!=null?s.detail.term:"").trim();n.isDataDriven?(n.currentSearch=b,k(i,"ln-table:search",{table:n.name,query:n.currentSearch}),n._requestData()):(n._searchTerm=b.toLowerCase(),n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),k(i,"ln-table:filter",{term:n._searchTerm,matched:n._filteredData.length,total:n._data.length}))},i.addEventListener("ln-table:set-search",this._onSetSearch),this._onSearchChange=function(s){s.preventDefault(),n._onSetSearch(s)},i.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){n.isDataDriven?(n.currentFilters={},n.currentSearch="",k(i,"ln-table:clear-filters",{table:n.name}),n._requestData()):(n._searchTerm="",n._columnFilters={},n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),k(i,"ln-table:filter",{term:"",matched:n._filteredData.length,total:n._data.length}))},i.addEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this._selectableActive=!1,this._selectable&&this._enableSelection(),this.isDataDriven?(this.isLoaded=!1,this._initialLoaded=!1,this.totalCount=0,this.visibleCount=0,this.currentSort=null,this.currentFilters={},this.currentSearch="",this._lastTotal=0,this._lastFiltered=0,this._hasInitialSeed=!1,this._windowed=!1,this._cache=null,this.isDataDriven&&i.hasAttribute("data-ln-table-window")&&this._enterWindowedMode(),this._onSetData=function(s){const b=s.detail||{},d=b.data||[],w=b.total!=null?b.total:d.length;if(!(n._hasInitialSeed&&!n.isLoaded&&d.length===0&&w===0)){if(n._windowed){n._cache.ingest(b)&&!b.provisional&&(i.classList.remove("ln-table--loading"),i.setAttribute("aria-busy","false"));return}n._data=d,n._lastTotal=w,n._lastFiltered=b.filtered!=null?b.filtered:n._data.length,n.totalCount=n._lastTotal,n.visibleCount=n._lastFiltered,n.isLoaded=!0,n._initialLoaded=!0,n._hasInitialSeed=!1,i.classList.remove("ln-table--loading"),i.setAttribute("aria-busy","false"),n._loadingIndicator&&n._loadingIndicator.classList.add("hidden"),n._vStart=-1,n._vEnd=-1,n._applyFilterAndSort(),n._render(),n._updateFooter(),k(i,"ln-table:rendered",{table:n.name,total:n.totalCount,visible:n.visibleCount})}},i.addEventListener("ln-table:set-data",this._onSetData),this._onSetLoading=function(s){const b=!!(s.detail&&s.detail.loading);i.classList.toggle("ln-table--loading",b),i.setAttribute("aria-busy",b?"true":"false"),b&&!n._initialLoaded&&(n.isLoaded=!1,n._showLoadingState()),n._loadingIndicator&&n._loadingIndicator.classList.toggle("hidden",!(b&&n._initialLoaded))},i.addEventListener("ln-table:set-loading",this._onSetLoading),this._onPageFailed=function(s){!n._windowed||!n._cache||n._cache.release(s.detail&&s.detail.offset)},i.addEventListener("ln-table:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!n._windowed||!n._cache||n._cache.revalidate()},i.addEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(s){if(!(!n._windowed||!n._cache)){if(s&&s.detail&&s.detail.query){const b=s.detail.query;b.search!==void 0&&(n.currentSearch=b.search),b.filters!==void 0&&(n.currentFilters=b.filters),b.sort!==void 0&&(n.currentSort=b.sort)}n._requestData()}},i.addEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this._onSort=function(s){!s.detail||s.detail.field==null||(s.preventDefault(),n.currentSort=s.detail.direction==="none"?null:{field:s.detail.field,direction:s.detail.direction},n._requestData())},i.addEventListener("ln-sort:change",this._onSort),this._windowed&&this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden"),this._onRowClick=function(s){if(s.target.closest("[data-ln-table-row-select]")||s.target.closest("[data-ln-table-row-action]")||s.target.closest("a")||s.target.closest("button")||s.ctrlKey||s.metaKey||s.button===1)return;const b=s.target.closest("[data-ln-table-row]");if(!b)return;const d=b.getAttribute("data-ln-table-row-id"),w=b._lnRecord||{};k(i,"ln-table:row-click",{table:n.name,id:d,record:w})},this.tbody&&this.tbody.addEventListener("click",this._onRowClick),this._onRowAction=function(s){const b=s.target.closest("[data-ln-table-row-action]");if(!b)return;const d=b.closest("[data-ln-table-row]");if(!d)return;const w=b.getAttribute("data-ln-table-row-action"),_=d.getAttribute("data-ln-table-row-id"),g=d._lnRecord||{};k(i,"ln-table:row-action",{table:n.name,id:_,action:w,record:g})},this.tbody&&this.tbody.addEventListener("click",this._onRowAction),this.tbody&&this.tbody.rows.length>0?this._parseRows():(this._showLoadingState(),i.setAttribute("aria-busy","true")),setTimeout(function(){!n.dom||!document.contains(n.dom)||(n._windowed?n._kickWindowInitial():k(i,"ln-table:request-data",{table:n.name,sort:n.currentSort,filters:n.currentFilters,search:n.currentSearch}))},0)):(this._emptyTbodyObserver=null,this.tbody&&this.tbody.rows.length>0?this._parseRows():this.tbody&&(this._emptyTbodyObserver=new MutationObserver(function(){n.tbody.rows.length>0&&(n._emptyTbodyObserver.disconnect(),n._emptyTbodyObserver=null,n._parseRows())}),this._emptyTbodyObserver.observe(this.tbody,{childList:!0})),this._onSort=function(s){if(!s.detail||s.detail.column==null)return;s.preventDefault();const b=s.detail.direction==="none"?null:s.detail.direction;n._sortCol=b===null?-1:s.detail.column,n._sortDir=b,n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),k(i,"ln-table:sorted",{column:s.detail.column,direction:s.detail.direction,matched:n._filteredData.length,total:n._data.length})},i.addEventListener("ln-sort:change",this._onSort),this._onFilterChange=function(s){if(s.preventDefault(),!s.detail)return;const b=s.detail.key,d=s.detail.values||[];if(b){if(d.length===0)delete n._columnFilters[b];else{const w=[];for(let _=0;_<d.length;_++)w.push(d[_].toLowerCase());n._columnFilters[b]=w}n._applyFilterAndSort(),n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),k(i,"ln-table:filter",{term:n._searchTerm,matched:n._filteredData.length,total:n._data.length})}},i.addEventListener("ln-filter:change",this._onFilterChange)),this}A.prototype._parseRows=function(){const i=this.tbody.rows,u=this.ths;this._data=[],i.length>0&&(this._rowHeight=i[0].offsetHeight||40),this._lockColumnWidths();for(let n=0;n<i.length;n++){const s=i[n],b=[],d=[],w=[];for(let g=0;g<s.cells.length;g++){const y=s.cells[g],x=y.textContent.trim();b[g]=K(y),d[g]=x.toLowerCase(),y.querySelector("[data-ln-table-row-action]")||w.push(x.toLowerCase())}let _=null;if(this.isDataDriven){_={};const g=s.getAttribute("data-ln-table-row-id");g!=null&&(_.id=g);for(let y=0;y<u.length;y++){const x=u[y].getAttribute("data-ln-table-col");if(x){const T=y;if(T<s.cells.length){const D=s.cells[T];_[x]=K(D)}}}}this._data.push({values:b,rawTexts:d,html:s.outerHTML,searchText:w.join(" "),id:this.isDataDriven&&_?_.id:void 0,..._})}this._filteredData=this._data.slice(),this._data.length>0&&(this._hasInitialSeed=!0),this.isDataDriven&&(this._lastTotal=this._data.length,this._lastFiltered=this._data.length,this.totalCount=this._data.length,this.visibleCount=this._data.length,this._updateFooter()),this._render(),k(this.dom,"ln-table:ready",{total:this._data.length})},A.prototype._applyFilterAndSort=function(){this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length},A.prototype._lockColumnWidths=function(){if(!this.table||!this.thead||this._colgroup)return;const i=document.createElement("colgroup");this.ths.forEach(function(u){const n=document.createElement("col");n.style.width=u.offsetWidth+"px",i.appendChild(n)}),this.table.insertBefore(i,this.table.firstChild),this.table.style.tableLayout="fixed",this._colgroup=i},A.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const i=this._lastTotal,u=this.visibleCount;if(i===0){if(this._disableVirtualScroll(),!this.isLoaded){this._showLoadingState();return}this._showEmptyState();return}if(this._filteredData.length===0||u===0){if(this._disableVirtualScroll(),!this.isLoaded){this._showLoadingState();return}this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const i=this._filteredData.length;i===0&&(this._searchTerm||Object.keys(this._columnFilters).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):i>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},A.prototype._renderAll=function(){if(this.isDataDriven){const i=this._filteredData,u=document.createDocumentFragment();for(let n=0;n<i.length;n++){const s=this._buildRow(i[n]);if(!s)break;u.appendChild(s)}this.tbody.replaceChildren(u),this._selectable&&this._updateSelectAll()}else{const i=[],u=this._filteredData;for(let n=0;n<u.length;n++)i.push(u[n].html);this.tbody.innerHTML=i.join(""),this._selectable&&this._restoreSelection()}},A.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const i=this;if(!this._rowHeight)if(this.tbody&&this.tbody.rows.length>0)this._rowHeight=this.tbody.rows[0].offsetHeight||40;else{let n=null;if(this._windowed){const s=this._cache?this._cache.peek():null;n=s?this._buildRow(s):this._buildPlaceholderRow()}else this.isDataDriven&&this._data.length>0&&(n=this._buildRow(this._data[0]));n&&this.tbody&&(this.tbody.appendChild(n),this._rowHeight=n.offsetHeight||40,n.remove())}this.isDataDriven?this._scrollContainer=R(this.dom):this._scrollContainer=null;const u=this._scrollContainer||window;this._scrollHandler=function(){i._rafId||(i._rafId=requestAnimationFrame(function(){i._rafId=null,i._windowed?i._renderWindowed():i._renderVirtual()}))},u.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._scrollHandler,{passive:!0})},A.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),window.removeEventListener("resize",this._scrollHandler),this._scrollHandler=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},A.prototype._renderVirtual=function(){const i=this._filteredData,u=i.length,n=this._rowHeight;if(!n||!u)return;const s=this.thead?this.thead.offsetHeight:0,b=this._scrollContainer;let d,w;if(b){const C=this.table.getBoundingClientRect(),S=b.getBoundingClientRect(),L=C.top-S.top+b.scrollTop+s;d=b.scrollTop-L,w=b.clientHeight}else{const L=this.table.getBoundingClientRect().top+window.scrollY+s;d=window.scrollY-L,w=window.innerHeight}const _=pt(d,w,n,u,15),g=_.start,y=_.end;if(g===this._vStart&&y===this._vEnd)return;this._vStart=g,this._vEnd=y;const x=this.ths.length||1,T=_.topPadding,D=_.bottomPadding;if(this.isDataDriven){const C=document.createDocumentFragment();if(T>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const L=document.createElement("td");L.setAttribute("colspan",x),L.style.height=T+"px",S.appendChild(L),C.appendChild(S)}for(let S=g;S<y;S++){const L=this._buildRow(i[S]);L&&C.appendChild(L)}if(D>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const L=document.createElement("td");L.setAttribute("colspan",x),L.style.height=D+"px",S.appendChild(L),C.appendChild(S)}this.tbody.replaceChildren(C),this._selectable&&this._updateSelectAll()}else{let C="";T>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+x+'" style="height:'+T+'px;padding:0;border:none"></td></tr>');for(let S=g;S<y;S++)C+=i[S].html;D>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+x+'" style="height:'+D+'px;padding:0;border:none"></td></tr>'),this.tbody.innerHTML=C,this._selectable&&this._restoreSelection()}},A.prototype._buildPlaceholderRow=function(){const i=document.createElement("tr");i.className="ln-table__placeholder",i.setAttribute("aria-hidden","true");const u=document.createElement("td");return u.setAttribute("colspan",this.ths.length||1),u.style.height=this._rowHeight+"px",i.appendChild(u),i},A.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const i=this._rowHeight;if(!i)return;const u=this._cache.logicalTotal,n=this.thead?this.thead.offsetHeight:0,s=this._scrollContainer;let b,d;if(s){const C=this.table.getBoundingClientRect(),S=s.getBoundingClientRect(),L=C.top-S.top+s.scrollTop+n;b=s.scrollTop-L,d=s.clientHeight}else{const L=this.table.getBoundingClientRect().top+window.scrollY+n;b=window.scrollY-L,d=window.innerHeight}const w=pt(b,d,i,u,15),_=w.start,g=w.end;if(_===this._vStart&&g===this._vEnd)return;const y=this.ths.length||1,x=w.topPadding,T=w.bottomPadding,D=document.createDocumentFragment();if(x>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=x+"px",C.appendChild(S),D.appendChild(C)}for(let C=_;C<g;C++)if(this._cache.has(C)){const S=this._buildRow(this._cache.get(C));S&&D.appendChild(S)}else D.appendChild(this._buildPlaceholderRow());if(T>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=T+"px",C.appendChild(S),D.appendChild(C)}this.tbody.replaceChildren(D),this._vStart=_,this._vEnd=g,this._cache.ensure(_,g)},A.prototype._showLoadingState=function(){const i=this.ths.length||1;let u=null,n=M(this.dom,this.name+"-loading","ln-table");if(!n){const s=this.dom.querySelector("template[data-ln-table-loading]");s&&(n=document.importNode(s.content,!0))}if(n)if(n.tagName==="TR")u=n;else{const s=document.createElement("td");s.setAttribute("colspan",String(i)),s.appendChild(n);const b=document.createElement("tr");b.className="table-empty ln-table__empty",b.appendChild(s),u=b}u?this.tbody.replaceChildren(u):this.tbody.replaceChildren()},A.prototype._showEmptyState=function(){const i=this.ths.length||1;let u=null,n=null;if(this.isDataDriven){const s=this._lastTotal!=null?this._lastTotal:this._data.length,d=this.visibleCount===0&&s>0,w=d?this.name+"-empty-filtered":this.name+"-empty";if(n=M(this.dom,w,"ln-table"),!n){const _=this.dom.querySelector("template[data-ln-table-empty]");if(_){const g=d?"search":"initial",y=_.content.querySelector('[data-ln-table-empty-when="'+g+'"]')||_.content.firstElementChild;y&&(n=document.importNode(y,!0))}}if(n)if(n.tagName==="TR")u=n;else{const _=document.createElement("td");_.setAttribute("colspan",String(i)),_.appendChild(n);const g=document.createElement("tr");g.className="ln-table__empty",g.appendChild(_),u=g}}else{const s=this.dom.querySelector("template["+l+"]"),b=document.createElement("td");b.setAttribute("colspan",String(i)),s&&b.appendChild(document.importNode(s.content,!0));const d=document.createElement("tr");d.className="ln-table__empty",d.appendChild(b),u=d}u?this.tbody.replaceChildren(u):this.tbody.replaceChildren(),k(this.dom,"ln-table:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},A.prototype._fillRow=function(i,u){P(i,u);const n=i.querySelectorAll("[data-ln-table-cell-attr]");for(let s=0;s<n.length;s++){const b=n[s],d=b.getAttribute("data-ln-table-cell-attr").split(",");for(let w=0;w<d.length;w++){const _=d[w].trim().split(":");if(_.length!==2)continue;const g=_[0].trim(),y=_[1].trim();u[g]!=null&&b.setAttribute(y,u[g])}}},A.prototype._buildRow=function(i){let u=M(this.dom,this.name+"-row","ln-table");if(!u){const s=this.dom.querySelector("template[data-ln-table-row]");s&&(u=document.importNode(s.content,!0))}let n=u?u.querySelector("[data-ln-table-row]")||u.firstElementChild:null;if(n)this._fillRow(n,i);else if(i&&i.html){const s=document.createElement("tbody");s.innerHTML=i.html,n=s.firstElementChild}else{n=document.createElement("tr"),n.setAttribute("data-ln-table-row","");const s=this.ths;for(let b=0;b<s.length;b++){const d=s[b].hasAttribute("data-ln-table-col-select"),w=document.createElement("td");if(d){const _=document.createElement("input");_.type="checkbox",_.setAttribute("data-ln-table-row-select",""),_.setAttribute("aria-label","Select row"),w.appendChild(_)}else{const _=s[b].getAttribute("data-ln-table-col");_&&i[_]!=null&&(w.textContent=String(i[_]))}n.appendChild(w)}}if(n._lnRecord=i,i.id!=null&&n.setAttribute("data-ln-table-row-id",i.id),this._selectable&&i.id!=null&&this.selectedIds.has(String(i.id))){n.classList.add("ln-row-selected");const s=n.querySelector("[data-ln-table-row-select]");s&&(s.checked=!0)}return n},A.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-table--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}gt(this,"ln-table:request-data","table")},A.prototype._enterWindowedMode=function(){const i=this,u=this.dom,n=parseInt(u.getAttribute("data-ln-table-window"),10),s=parseInt(u.getAttribute("data-ln-table-window-page"),10),b=parseInt(u.getAttribute("data-ln-table-window-threshold"),10);this._onCacheChange=function(){!i._windowed||!i._cache||(i.totalCount=i._cache.grandTotal,i.visibleCount=i._cache.logicalTotal,i._lastTotal=i._cache.grandTotal,i.isLoaded=!0,i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),k(u,"ln-table:rendered",{table:i.name,total:i.totalCount,visible:i.visibleCount}))},this._renderBatch=Pt(this._onCacheChange),this._cache=Bt({windowSize:n>0?n:1e3,pageSize:s>0?s:200,threshold:b>=0?b:25,fetchDebounce:120,requestPage:function(d,w,_){k(u,"ln-table:request-data",{table:i.name,sort:d.sort,filters:d.filters,search:d.search,offset:w,limit:_,queryGen:i._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},A.prototype._kickWindowInitial=function(){if(this._data.length>0){let i=parseInt(this.dom.getAttribute("data-ln-table-count"),10);if(isNaN(i)&&this._totalSpan){const n=this._totalSpan.textContent.replace(/[^\d]/g,"");n&&(i=parseInt(n,10))}const u=i>0?i:this._data.length;this._cache.ingest({data:this._data,offset:0,total:u,filtered:u})}else this.dom.classList.add("ln-table--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},A.prototype._exitWindowedMode=function(){this._disableVirtualScroll(),this._cache&&this._cache.destroy(),this._cache=null,this._windowed=!1,this._renderBatch=null,this._onCacheChange=null,this._selectAllCheckbox&&this._selectAllCheckbox.classList.remove("hidden"),this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-table--loading"),this._requestData()},A.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox||!this.tbody)return;const i=this.tbody.querySelectorAll("[data-ln-table-row]"),u=[];for(let s=0;s<i.length;s++){const b=i[s].getAttribute("data-ln-table-row-id");b!=null&&u.push(b)}const n=oe(u,this.selectedIds);this._selectAllCheckbox.checked=n.isAllSelected,this._selectAllCheckbox.indeterminate=n.isIndeterminate},A.prototype._restoreSelection=function(){if(!this.tbody)return;const i=this.tbody.querySelectorAll("[data-ln-table-row]");for(let u=0;u<i.length;u++){const n=i[u].getAttribute("data-ln-table-row-id"),s=n!=null&&this.selectedIds.has(n);i[u].classList.toggle("ln-row-selected",s);const b=i[u].querySelector("[data-ln-table-row-select]");b&&(b.checked=s)}this._updateSelectAll()},Object.defineProperty(A.prototype,"selectedCount",{get:function(){return this.selectedIds.size},set:function(){}}),A.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const i=this;if(this._onSelectionChange=function(u){const n=u.target.closest("[data-ln-table-row-select]");if(!n)return;const s=n.closest("[data-ln-table-row]");if(!s)return;const b=s.getAttribute("data-ln-table-row-id");b!=null&&(i.selectedIds=wt(i.selectedIds,b,n.checked),s.classList.toggle("ln-row-selected",n.checked),i.selectedCount=i.selectedIds.size,i._updateSelectAll(),i._updateFooter(),k(i.dom,"ln-table:select",{table:i.name,selectedIds:i.selectedIds,count:i.selectedCount}))},this.tbody&&this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector('[data-ln-table-col-select] input[type="checkbox"]')||this.dom.querySelector("[data-ln-table-col-select]"),this._selectAllCheckbox&&this._selectAllCheckbox.tagName==="TH"){const u=document.createElement("input");u.type="checkbox";const n=i.dom.querySelector('[data-ln-table-dict="select-all"]'),s=i.dom.getAttribute("data-ln-table-select-all-label")||(n?n.textContent.trim():null)||"Select all";u.setAttribute("aria-label",s),this._selectAllCheckbox.appendChild(u),this._selectAllCheckbox=u}if(this._selectAllCheckbox&&(this._onSelectAll=function(){const u=i._selectAllCheckbox.checked,n=i.tbody?i.tbody.querySelectorAll("[data-ln-table-row]"):[],s=[];for(let b=0;b<n.length;b++){const d=n[b].getAttribute("data-ln-table-row-id"),w=n[b].querySelector("[data-ln-table-row-select]");d!=null&&(s.push(d),n[b].classList.toggle("ln-row-selected",u),w&&(w.checked=u))}i.selectedIds=_t(i.selectedIds,s,u),i.selectedCount=i.selectedIds.size,k(i.dom,"ln-table:select-all",{table:i.name,selected:u}),k(i.dom,"ln-table:select",{table:i.name,selectedIds:i.selectedIds,count:i.selectedCount}),i._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll)),this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let n=0;n<u.length;n++){const s=u[n].querySelector("[data-ln-table-row-select]"),b=u[n].getAttribute("data-ln-table-row-id");s&&s.checked&&b!=null&&(i.selectedIds=wt(i.selectedIds,b,!0),u[n].classList.add("ln-row-selected"))}this.selectedCount=this.selectedIds.size,this.selectedCount>0&&this._updateSelectAll()}},A.prototype._disableSelection=function(){if(!this._selectableActive)return;this._selectableActive=!1,this.tbody&&this._onSelectionChange&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll);const i=this.dom.querySelector("[data-ln-table-col-select]");if(i){const u=i.querySelector('input[type="checkbox"]');u&&u.remove()}if(this._selectAllCheckbox=null,this.selectedIds=_t(this.selectedIds,Array.from(this.selectedIds),!1),this.selectedCount=0,this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let n=0;n<u.length;n++){u[n].classList.remove("ln-row-selected");const s=u[n].querySelector("[data-ln-table-row-select]");s&&(s.checked=!1)}}this._updateFooter()},A.prototype._updateFooter=function(){let i=0,u=0;this.isDataDriven?(i=this._lastTotal!=null?this._lastTotal:this._data.length,u=this.visibleCount):(i=this._data.length,u=this._filteredData.length);const n=u<i;if(this._totalSpan&&(this._totalSpan.textContent=I(i,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=n?I(u,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!n),this._selectedSpan){const s=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=s>0?I(s,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",s===0)}},A.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-table:set-search",this._onSetSearch),this.dom.removeEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this.dom.removeEventListener("ln-table:set-data",this._onSetData),this.dom.removeEventListener("ln-table:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-table:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onRowClick),this.tbody.removeEventListener("click",this._onRowAction)),this._cache&&this._cache.destroy()):(this._emptyTbodyObserver&&(this._emptyTbodyObserver.disconnect(),this._emptyTbodyObserver=null),this.dom.removeEventListener("ln-sort:change",this._onSort),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-filter:change",this._onFilterChange)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._colgroup&&(this._colgroup.remove(),this._colgroup=null),this.table&&(this.table.style.tableLayout=""),this._loadingIndicator=null,this._data=[],this._filteredData=[],delete this.dom[e])},ft(t,e,A,"ln-table",{attributes:E})})()})();
|
|
@@ -104,6 +104,14 @@
|
|
|
104
104
|
"src/ln-table.js"
|
|
105
105
|
]
|
|
106
106
|
},
|
|
107
|
+
"data-ln-table-loading": {
|
|
108
|
+
"direction": "author",
|
|
109
|
+
"sources": [
|
|
110
|
+
"src/ln-table.js"
|
|
111
|
+
],
|
|
112
|
+
"type": "marker",
|
|
113
|
+
"description": "Loading indicator element in footer or template"
|
|
114
|
+
},
|
|
107
115
|
"data-ln-table-row": {
|
|
108
116
|
"direction": "both",
|
|
109
117
|
"sources": [
|
|
@@ -63,6 +63,7 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
63
63
|
'data-ln-table-col-select': { type: 'trigger', description: 'Header select-all checkbox trigger' },
|
|
64
64
|
'data-ln-table-cell-attr': { type: 'string', description: 'Cell attribute template mapping' },
|
|
65
65
|
'data-ln-table-empty': { type: 'marker', description: 'Container for table empty state' },
|
|
66
|
+
'data-ln-table-loading': { type: 'marker', description: 'Loading indicator element in footer or template' },
|
|
66
67
|
'data-ln-table-select-all-label': { type: 'string', description: 'Accessibility label for select-all header trigger' }
|
|
67
68
|
};
|
|
68
69
|
|
|
@@ -119,6 +120,10 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
119
120
|
? this._selectedSpan.parentElement
|
|
120
121
|
: null;
|
|
121
122
|
}
|
|
123
|
+
this._loadingIndicator = dom.querySelector('[data-ln-table-loading]');
|
|
124
|
+
if (this._loadingIndicator) {
|
|
125
|
+
this._loadingIndicator.classList.add('hidden');
|
|
126
|
+
}
|
|
122
127
|
|
|
123
128
|
this.isDataDriven = dom.hasAttribute('data-ln-table-source');
|
|
124
129
|
|
|
@@ -206,6 +211,7 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
206
211
|
|
|
207
212
|
if (this.isDataDriven) {
|
|
208
213
|
this.isLoaded = false;
|
|
214
|
+
this._initialLoaded = false;
|
|
209
215
|
this.totalCount = 0;
|
|
210
216
|
this.visibleCount = 0;
|
|
211
217
|
this.currentSort = null;
|
|
@@ -237,7 +243,10 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
237
243
|
// one means the source has not resolved the new query yet; a
|
|
238
244
|
// provisional one is the store's own answer, rendered while the
|
|
239
245
|
// server query is still out.
|
|
240
|
-
if (self._cache.ingest(detail) && !detail.provisional)
|
|
246
|
+
if (self._cache.ingest(detail) && !detail.provisional) {
|
|
247
|
+
dom.classList.remove('ln-table--loading');
|
|
248
|
+
dom.setAttribute('aria-busy', 'false');
|
|
249
|
+
}
|
|
241
250
|
return;
|
|
242
251
|
}
|
|
243
252
|
|
|
@@ -248,9 +257,14 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
248
257
|
self.totalCount = self._lastTotal;
|
|
249
258
|
self.visibleCount = self._lastFiltered;
|
|
250
259
|
self.isLoaded = true;
|
|
260
|
+
self._initialLoaded = true;
|
|
251
261
|
self._hasInitialSeed = false;
|
|
252
262
|
|
|
253
263
|
dom.classList.remove('ln-table--loading');
|
|
264
|
+
dom.setAttribute('aria-busy', 'false');
|
|
265
|
+
if (self._loadingIndicator) {
|
|
266
|
+
self._loadingIndicator.classList.add('hidden');
|
|
267
|
+
}
|
|
254
268
|
|
|
255
269
|
self._vStart = -1;
|
|
256
270
|
self._vEnd = -1;
|
|
@@ -268,10 +282,15 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
268
282
|
dom.addEventListener('ln-table:set-data', this._onSetData);
|
|
269
283
|
|
|
270
284
|
this._onSetLoading = function (e) {
|
|
271
|
-
const loading = e.detail && e.detail.loading;
|
|
272
|
-
dom.classList.toggle('ln-table--loading',
|
|
273
|
-
|
|
285
|
+
const loading = !!(e.detail && e.detail.loading);
|
|
286
|
+
dom.classList.toggle('ln-table--loading', loading);
|
|
287
|
+
dom.setAttribute('aria-busy', loading ? 'true' : 'false');
|
|
288
|
+
if (loading && !self._initialLoaded) {
|
|
274
289
|
self.isLoaded = false;
|
|
290
|
+
self._showLoadingState();
|
|
291
|
+
}
|
|
292
|
+
if (self._loadingIndicator) {
|
|
293
|
+
self._loadingIndicator.classList.toggle('hidden', !(loading && self._initialLoaded));
|
|
275
294
|
}
|
|
276
295
|
};
|
|
277
296
|
dom.addEventListener('ln-table:set-loading', this._onSetLoading);
|
|
@@ -360,9 +379,12 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
360
379
|
|
|
361
380
|
|
|
362
381
|
|
|
363
|
-
// Local hydration of initial SSR rows
|
|
382
|
+
// Local hydration of initial SSR rows or initial loading state
|
|
364
383
|
if (this.tbody && this.tbody.rows.length > 0) {
|
|
365
384
|
this._parseRows();
|
|
385
|
+
} else {
|
|
386
|
+
this._showLoadingState();
|
|
387
|
+
dom.setAttribute('aria-busy', 'true');
|
|
366
388
|
}
|
|
367
389
|
|
|
368
390
|
// Initial request-data deferred so coordinators have attached listeners
|
|
@@ -561,12 +583,20 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
561
583
|
|
|
562
584
|
if (total === 0) {
|
|
563
585
|
this._disableVirtualScroll();
|
|
586
|
+
if (!this.isLoaded) {
|
|
587
|
+
this._showLoadingState();
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
564
590
|
this._showEmptyState();
|
|
565
591
|
return;
|
|
566
592
|
}
|
|
567
593
|
|
|
568
594
|
if (this._filteredData.length === 0 || filtered === 0) {
|
|
569
595
|
this._disableVirtualScroll();
|
|
596
|
+
if (!this.isLoaded) {
|
|
597
|
+
this._showLoadingState();
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
570
600
|
this._showEmptyState();
|
|
571
601
|
return;
|
|
572
602
|
}
|
|
@@ -871,6 +901,42 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
871
901
|
this._cache.ensure(startRow, endRow);
|
|
872
902
|
};
|
|
873
903
|
|
|
904
|
+
// ─── Loading state ──────────────────────────────────────────
|
|
905
|
+
|
|
906
|
+
_component.prototype._showLoadingState = function () {
|
|
907
|
+
const colSpan = this.ths.length || 1;
|
|
908
|
+
let loadingEl = null;
|
|
909
|
+
|
|
910
|
+
let clone = cloneTemplateScoped(this.dom, this.name + '-loading', 'ln-table');
|
|
911
|
+
|
|
912
|
+
if (!clone) {
|
|
913
|
+
const genericTpl = this.dom.querySelector('template[data-ln-table-loading]');
|
|
914
|
+
if (genericTpl) {
|
|
915
|
+
clone = document.importNode(genericTpl.content, true);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
if (clone) {
|
|
920
|
+
if (clone.tagName === 'TR') {
|
|
921
|
+
loadingEl = clone;
|
|
922
|
+
} else {
|
|
923
|
+
const td = document.createElement('td');
|
|
924
|
+
td.setAttribute('colspan', String(colSpan));
|
|
925
|
+
td.appendChild(clone);
|
|
926
|
+
const tr = document.createElement('tr');
|
|
927
|
+
tr.className = 'table-empty ln-table__empty';
|
|
928
|
+
tr.appendChild(td);
|
|
929
|
+
loadingEl = tr;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
if (loadingEl) {
|
|
934
|
+
this.tbody.replaceChildren(loadingEl);
|
|
935
|
+
} else {
|
|
936
|
+
this.tbody.replaceChildren();
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
|
|
874
940
|
// ─── Empty state ───────────────────────────────────────────
|
|
875
941
|
|
|
876
942
|
_component.prototype._showEmptyState = function () {
|
|
@@ -1365,6 +1431,7 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
1365
1431
|
this._colgroup = null;
|
|
1366
1432
|
}
|
|
1367
1433
|
if (this.table) this.table.style.tableLayout = '';
|
|
1434
|
+
this._loadingIndicator = null;
|
|
1368
1435
|
this._data = [];
|
|
1369
1436
|
this._filteredData = [];
|
|
1370
1437
|
delete this.dom[DOM_ATTRIBUTE];
|
package/ln-ashlar.html-data.json
CHANGED
|
@@ -1366,6 +1366,11 @@
|
|
|
1366
1366
|
"name": "data-ln-table-filtered",
|
|
1367
1367
|
"description": "data-ln-table-filtered attribute"
|
|
1368
1368
|
},
|
|
1369
|
+
{
|
|
1370
|
+
"name": "data-ln-table-loading",
|
|
1371
|
+
"description": "Loading indicator element in footer or template",
|
|
1372
|
+
"valueSet": "v"
|
|
1373
|
+
},
|
|
1369
1374
|
{
|
|
1370
1375
|
"name": "data-ln-table-row",
|
|
1371
1376
|
"description": "Table row template element",
|
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@livenetworks/ashlar",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.10",
|
|
5
5
|
"framework": "html",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -1781,6 +1781,13 @@
|
|
|
1781
1781
|
"type": "string"
|
|
1782
1782
|
}
|
|
1783
1783
|
},
|
|
1784
|
+
{
|
|
1785
|
+
"name": "data-ln-table-loading",
|
|
1786
|
+
"description": "Loading indicator element in footer or template",
|
|
1787
|
+
"value": {
|
|
1788
|
+
"type": "boolean"
|
|
1789
|
+
}
|
|
1790
|
+
},
|
|
1784
1791
|
{
|
|
1785
1792
|
"name": "data-ln-table-row",
|
|
1786
1793
|
"description": "Table row template element",
|