@livenetworks/ashlar 2.1.0 → 2.1.2
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-accordion/ln-accordion.js +1 -1
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-autoresize/ln-autoresize.js +1 -1
- package/components/ln-autoresize/src/ln-autoresize.js +3 -1
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-core/lifecycle.js +33 -12
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-date/src/ln-date.js +22 -13
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
- package/components/ln-dropdown/src/ln-dropdown.js +18 -5
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-editor/src/ln-editor.js +45 -12
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/ln-filter.schema.json +1 -1
- package/components/ln-filter/src/ln-filter.js +11 -10
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-form/src/ln-form.js +11 -0
- package/components/ln-icon/ln-icon.js +1 -1
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-list/src/ln-list.js +14 -5
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-number/src/ln-number.js +22 -12
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-popover/ln-popover.schema.json +82 -82
- package/components/ln-popover/src/ln-popover.js +22 -5
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-search/ln-search.schema.json +103 -103
- package/components/ln-search/src/ln-search.js +9 -5
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-sortable/src/ln-sortable.js +52 -7
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-tabs/src/ln-tabs.js +12 -8
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-time/src/ln-time.js +17 -7
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-validate/src/ln-validate.js +21 -7
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function W(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function R(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!R(r))return}e.apply(console,t)}}function V(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function ue(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(l),l}function S(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function fe(e){if(!e)return!1;if(typeof e.closest=="function")return!!e.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');const t=String(e.tagName||"").toLowerCase();return t==="input"||t==="textarea"||t==="select"||!!e.isContentEditable}function de(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function we(e,t){return!e||!document.contains(e)||de(e)||t&&typeof e[t]!="function"?!1:ae(e)}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function pe(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let c=0;c<s.length;c++){const i=s[c];i.name&&i.type==="checkbox"&&!i.disabled&&(o[i.name]=(o[i.name]||0)+1)}for(let c=0;c<s.length;c++){const i=s[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(r&&i.matches&&i.matches(r)))if(i.type==="checkbox")n&&o[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&l[i.name].push(i.options[u].value)}else if(n&&i.type==="hidden")l[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const u=Number(i.value);l[i.name]=i.value===""||isNaN(u)?null:u}else l[i.name]=i.value}return l}function be(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ge(e,t){const n=e.elements,r=[],l={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const i=t[c];if(o.type==="checkbox"){if(Array.isArray(i))o.checked=i.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(i).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=be(i);r.push(o)}else if(o.type==="radio")o.checked=o.value===String(i),r.push(o);else if(o.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<o.options.length;u++)o.options[u].selected=i.indexOf(o.options[u].value)!==-1;r.push(o)}else o.value=i,o.tagName==="SELECT"&&i!=null&&o.setAttribute("data-ln-value",i),r.push(o)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ge,window.lnCore.serializeForm=pe,window.lnCore.resolveFormMethod=he);const H={};function ye(e,t){H[e]=t}function me(e){return H[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=me);function Ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){V(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function Ae(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];P[n]=t}function ke(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return P[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ae,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=Ce);const F={};function xe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const c=n[o],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<r.length;o++){const c=r[o],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const d=i[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();t[h]!=null&&c.setAttribute(f,t[h])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const d=i[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();h in t&&c.classList.toggle(f,!!t[h])}}return e}function Se(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)z(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 Q(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function _e(e,t,n,r,l,s){const o={};for(let i=0;i<e.children.length;i++){const u=e.children[i],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],d=String(r(u));let f=o[d];if(f)l(f,u,i);else{const h=xe(n,s);if(!h||(Q(h,u),f=h.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),l(f,u,i)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=z,window.lnCore.lnFill=Se,window.lnCore.renderList=_e);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function J(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function G(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const M=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(M.has(n))return M.get(n);const r=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&r.has(c)?c:t};return M.set(n,l),l}function Z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ee(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function te(e,t,n,r,l){if(!e||t===null)return!0;const s=r||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=i=>{l?console.warn(i,l):console.warn(i)};if(o==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${s}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${s}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${s}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,n){for(const r in n){const[l,s,o]=n[r];Object.defineProperty(e,r,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function Ee(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=Y(r.values,r.fallback);break;case"integer":l=J;break;case"float":l=Z;break;case"boolean":l=G;break;case"list":l=X;break;case"json":l=ee;break;case"string":default:l=q;break}l||(l=q),t[r.prop]=[l,n,r.fallback]}return t}function Te(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Oe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ve,window.lnCore.attrSpec=Ee,window.lnCore.attrStr=q,window.lnCore.attrInt=J,window.lnCore.attrBool=G,window.lnCore.attrList=X,window.lnCore.attrEnum=Y,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function k(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 ne(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&k(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let i=0;i<c.length;i++)k(c[i],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function De(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function re(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ie(e){const t=re(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Oe(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,n,r){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Re(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=re(),l=r.byAttr.get(t),s=W()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&R(o)){const c=r.byDeclaredAttr.get(t),i=o.getAttribute(t);for(let u=0;u<c.length;u++)te(c[u].spec,i,t,c[u].componentTag,o)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&oe(c,o,t,e.oldValue),r.reactiveWildcard.length&&oe(r.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const i=l[c];if(i.handler){i.handler(o,t,e.oldValue);continue}i.onAttributeChange&&o[i.attribute]?i.onAttributeChange(o,t):(ne(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o))}}}function Fe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Re(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function B(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function qe(e){const t=$();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange&&r.query){const l=r.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&r.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1){const l=!!(r.firstElementChild||r.children&&r.children.length);for(let s=0;s<t.length;s++){const o=t[s];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)r.matches&&r.matches(o.query)&&k(r,o);else if(r.matches&&r.matches(o.query)&&k(r,o),r.querySelectorAll){const c=r.querySelectorAll(o.query);for(let i=0;i<c.length;i++)k(c[i],o)}}o.onInit&&o.onInit(r)}}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1){const l=!!(r.firstElementChild||r.children&&r.children.length);for(let s=0;s<t.length;s++){const o=t[s],c=o.query;if(c){if(!l)r.matches&&r.matches(c)&&B(r,o);else if(r.matches&&r.matches(c)&&B(r,o),r.querySelectorAll){const i=r.querySelectorAll(c);for(let u=0;u<i.length;u++)B(i[u],o)}}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{qe(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){$().push(e),ie()}function N(e,t,n,r,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,i=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,f=l.attributes||null,h=f?Te(f):d,_=f?new Set(Object.keys(f)):null,v=l.persist||null;function g(m){const b=m||document.body;if(ne(b,e,t,n),f&&W())for(const p in f){const T=f[p],C=Array.from(b.querySelectorAll("["+p+"]"));b.matches&&b.matches("["+p+"]")&&C.push(b);for(let A=0;A<C.length;A++){const O=C[A];R(O)&&te(T,O.getAttribute(p),p,r,O)}}i&&i(b)}const y=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let b;for(;(b=m.exec(e))!==null;)y.push(b[1])}else y.push(e);Ie({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:i,observed:y.concat(s),onAttributeChange:o,onAttrChange:u,effects:h,declared:_,persist:v}),Fe();const E=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,a=l.subtreeQuery||(E?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:c,query:a}),ie(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=N,window.lnCore.observeLifecycle=Me);function w(){Le()>0?De(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),g}function le(e){return(e||"").replace(/^#/,"")}function U(e){const t=e===void 0?location.hash:e,n={},r=le(t);if(!r)return n;const l=r.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),i=c>-1?o.slice(0,c):o,u=c>-1?o.slice(c+1):"";if(i)try{n[i]=decodeURIComponent(u)}catch{n[i]=u}}return n}function $e(e){if(!e)return null;const t=U();return e in t?t[e]:null}function Be(e,t){if(!e)return;const n=U();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");le(location.hash)!==l&&(location.hash=l)}function Ne(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 n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function We(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),r=e.slice(t+1),l=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=U,window.lnCore.hashGet=$e,window.lnCore.hashSet=Be,window.lnCore.hashLinkClick=Ne,window.lnCore.resolveHashNamespace=Ue,window.lnCore.hashSortEncode=Ke,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ve);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);const x=["Ctrl","Alt","Shift","Meta"],Pe={alt:"Alt",control:"Ctrl",ctrl:"Ctrl",meta:"Meta",command:"Meta",cmd:"Meta",option:"Alt",shift:"Shift",esc:"Escape",escape:"Escape",space:"Space",spacebar:"Space",enter:"Enter",return:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",del:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",up:"ArrowUp",arrowdown:"ArrowDown",down:"ArrowDown",arrowleft:"ArrowLeft",left:"ArrowLeft",arrowright:"ArrowRight",right:"ArrowRight"};function se(e){if(e===" ")return"Space";const t=String(e||"").trim();if(!t)return"";const n=Pe[t.toLowerCase()];return n||(t.length===1||/^f\d{1,2}$/i.test(t)?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1))}function ce(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return"";const n=t.split("+"),r=new Set;let l="";for(let o=0;o<n.length;o++){const c=se(n[o]);if(!c)return"";if(x.indexOf(c)!==-1){r.add(c);continue}if(l)return"";l=c}if(!l)return"";const s=[];for(let o=0;o<x.length;o++)r.has(x[o])&&s.push(x[o]);return s.push(l),s.join("+")}function ze(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return[];const n=t.split(/[\s,]+/),r=[];for(let l=0;l<n.length;l++){const s=ce(n[l]);s&&r.indexOf(s)===-1&&r.push(s)}return r}function Qe(e,t){const n=String(t||"").trim();if(!n||/[\s,]/.test(n))return"";const r=String(e||"").replace(/\s*\+\s*/g,"+").trim();return/[\s,]/.test(r)?"":ce(r?r+"+"+n:n)}function Je(e){if(!e)return"";const t=se(e.key);if(!t||x.indexOf(t)!==-1)return"";const n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&n.push("Meta"),n.push(t),n.join("+")}function Ge(e){if(!e||!e.tagName)return null;const t=String(e.tagName).toLowerCase();if(t==="button"||t==="a"&&e.hasAttribute&&e.hasAttribute("href"))return"click";if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return"focus";if(e.hasAttribute&&e.hasAttribute("contenteditable")){const n=e.getAttribute("contenteditable");if(n===""||String(n).toLowerCase()!=="false")return"focus"}return null}function Xe(e,t,n,r){if(!e||!t||n!=="click"||e.target!==t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return!1;const l=String(t.tagName||"").toLowerCase();return l==="button"?r==="Enter"||r==="Space":l==="a"&&t.hasAttribute&&t.hasAttribute("href")&&r==="Enter"}(function(){const e="data-ln-key",t="lnKey",n="data-ln-key-target",r="data-ln-key-allow-input",l="data-ln-key-modifier",s="data-ln-key-for",o="lnKeyFor";if(window[t]!==void 0)return;function c(a){const w=a[t];if(w){if(!a.hasAttribute(e)){w.destroy();return}w.sync()}}function i(a){const w=a[o];w&&!a.hasAttribute(s)&&w.destroy()}const u={"data-ln-key":{type:"string",effect:c,description:"Keyboard shortcut combination (e.g. meta+k, ctrl+s)"},"data-ln-key-target":{type:"string",effect:c,description:"Target element selector or ID to receive synthetic click or focus"},"data-ln-key-allow-input":{type:"boolean",effect:c,description:"Permits shortcut execution even when focused inside an editable input"}},d={"data-ln-key-for":{type:"string",effect:i,description:"Target element ID that this shortcut badge is displayed for"},"data-ln-key-modifier":{type:"string",description:"Platform modifier text representation override"}},f=new Set;let h=null;function _(){h||(h=function(a){if(a.defaultPrevented||a.isComposing||a.repeat)return;const w=Je(a);if(!w)return;const m=fe(a.target),b=document.querySelectorAll("["+e+"], ["+s+"]");let p=null,T=!1,C=!1;for(let K=0;K<b.length;K++){const j=b[K],L=j[t]||j[o];if(!L||!L.matches(w)||m&&!L.allowsInput())continue;const D=L.resolveTarget(),I=Ge(D);if(!(!I||!we(D,I))){if(Xe(a,D,I,w)){C=!0;continue}p?T=!0:p={host:j,target:D,action:I}}}if(C||!p)return;T&&console.warn('[ln-key] Duplicate active shortcut "'+w+'"; first DOM match wins.');const A={source:p.host,target:p.target,action:p.action,key:w,event:a};ue(p.host,"ln-key:before-trigger",A).defaultPrevented||(a.preventDefault(),p.target[p.action](),V(p.host,"ln-key:trigger",A))},document.addEventListener("keydown",h))}function v(){f.size>0||!h||(document.removeEventListener("keydown",h),h=null)}function g(a){return this.dom=a,this.shortcuts=[],f.add(this),this.sync(),_(),this}g.prototype.sync=function(){this.shortcuts=ze(this.dom.getAttribute(e))},g.prototype.matches=function(a){return this.shortcuts.indexOf(a)!==-1},g.prototype.allowsInput=function(){return this.dom.hasAttribute(r)},g.prototype.resolveTarget=function(){const a=this.dom.getAttribute(n);return a?E(a,n):this.dom},g.prototype.destroy=function(){this.dom[t]&&(f.delete(this),delete this.dom[t],v())};function y(a){return this.dom=a,f.add(this),_(),this}y.prototype._modifierContext=function(){return this.dom.closest("["+l+"]")},y.prototype.shortcut=function(){const a=this._modifierContext(),w=a?a.getAttribute(l):"";return Qe(w,this.dom.textContent)},y.prototype.matches=function(a){return this.shortcut()===a},y.prototype.allowsInput=function(){if(this.dom.hasAttribute(r))return!0;const a=this._modifierContext();return!!(a&&a.hasAttribute(r))},y.prototype.resolveTarget=function(){return E(this.dom.getAttribute(s),s)},y.prototype.destroy=function(){this.dom[o]&&(f.delete(this),delete this.dom[o],v())};function E(a,w){if(!a)return null;try{const m=document.querySelector(a);return m||console.warn("[ln-key] Target not found for "+w+' selector "'+a+'".'),m}catch{return console.warn("[ln-key] Invalid "+w+' selector "'+a+'".'),null}}N(e,t,g,"ln-key",{attributes:u}),N(s,o,y,"ln-key-for",{attributes:d})})()})();
|
|
1
|
+
(function(){"use strict";function V(){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 F(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!F(o))return}e.apply(console,t)}}function H(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function ae(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function _(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){_(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function fe(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function de(e){if(!e)return!1;if(typeof e.closest=="function")return!!e.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');const t=String(e.tagName||"").toLowerCase();return t==="input"||t==="textarea"||t==="select"||!!e.isContentEditable}function we(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function he(e,t){return!e||!document.contains(e)||we(e)||t&&typeof e[t]!="function"?!1:fe(e)}function pe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function be(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},l=e.elements,s={};if(n)for(let c=0;c<l.length;c++){const r=l[c];r.name&&r.type==="checkbox"&&!r.disabled&&(s[r.name]=(s[r.name]||0)+1)}for(let c=0;c<l.length;c++){const r=l[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&s[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&i[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);i[r.name]=r.value===""||isNaN(u)?null:u}else i[r.name]=r.value}return i}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,o=[],i={};for(let l=0;l<n.length;l++){const s=n[l];s.name&&s.type==="checkbox"&&(i[s.name]=(i[s.name]||0)+1)}for(let l=0;l<n.length;l++){const s=n[l];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const c=s.getAttribute("data-ln-fill-as")||s.name;if(!c||!(c in t))continue;const r=t[c];if(s.type==="checkbox"){if(Array.isArray(r))s.checked=r.indexOf(s.value)!==-1;else if(i[s.name]>1){const u=String(r).split(",").map(function(d){return d.trim()});s.checked=u.indexOf(s.value)!==-1}else s.checked=ge(r);o.push(s)}else if(s.type==="radio")s.checked=s.value===String(r),o.push(s);else if(s.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<s.options.length;u++)s.options[u].selected=r.indexOf(s.options[u].value)!==-1;o.push(s)}else s.value=r,s.tagName==="SELECT"&&r!=null&&s.setAttribute("data-ln-value",r),o.push(s)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ye,window.lnCore.serializeForm=be,window.lnCore.resolveFormMethod=pe);const P={};function me(e,t){P[e]=t}function Ce(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=Ce);function Ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,_(function(){new MutationObserver(function(){H(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const z={};function ke(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];z[n]=t}function xe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return z[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ke,window.lnCore.getLocaleFallback=xe,window.lnCore.ensureLocaleObserver=Ae);const q={};function Se(e,t){q[e]||(q[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=q[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Q(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const c=n[s],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const c=o[s],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const d=r[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();t[p]!=null&&c.setAttribute(f,t[p])}}const i=e.querySelectorAll("[data-ln-show]");for(let s=0;s<i.length;s++){const c=i[s],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const l=e.querySelectorAll("[data-ln-class]");for(let s=0;s<l.length;s++){const c=l[s],r=c.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const d=r[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();p in t&&c.classList.toggle(f,!!t[p])}}return e}function _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 o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function J(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const l=n.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,c){return t[c]!==void 0?t[c]:""}))}const o=function(l,s){return t[s]!==void 0?t[s]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let l=0;l<i.length;l++){const s=i[l],c=s.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&s.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ve(e,t,n,o,i,l){const s={};for(let r=0;r<e.children.length;r++){const u=e.children[r],d=u.getAttribute("data-ln-render-key");d&&(s[d]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],d=String(o(u));let f=s[d];if(f)i(f,u,r);else{const p=Se(n,l);if(!p||(J(p,u),f=p.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),i(f,u,r)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=J,window.lnCore.fill=Q,window.lnCore.lnFill=_e,window.lnCore.renderList=ve);function M(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function G(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function X(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function Y(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function Z(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const o=new Set(e||[]),i=function(l,s){const c=l.getAttribute(s);return c!==null&&o.has(c)?c:t};return $.set(n,i),i}function ee(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function te(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ne(e,t,n,o,i){if(!e||t===null)return!0;const l=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const c=r=>{i?console.warn(r,i):console.warn(r)};if(s==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${l}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${l}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${l}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${l}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${l}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ee(e,t,n){for(const o in n){const[i,l,s]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,l,s)},enumerable:!0,configurable:!0})}return e}function Te(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=Z(o.values,o.fallback);break;case"integer":i=G;break;case"float":i=ee;break;case"boolean":i=X;break;case"list":i=Y;break;case"json":i=te;break;case"string":default:i=M;break}i||(i=M),t[o.prop]=[i,n,o.fallback]}return t}function Oe(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function Le(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=Te,window.lnCore.attrStr=M,window.lnCore.attrInt=G,window.lnCore.attrBool=X,window.lnCore.attrList=Y,window.lnCore.attrEnum=Z,window.lnCore.attrFloat=ee,window.lnCore.attrJson=te);function x(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 re(e,t,n,o){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(l)&&x(e,s),e.querySelectorAll){const c=e.querySelectorAll(l);for(let r=0;r<c.length;r++)x(c[r],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function De(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ie(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 oe(){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 Re(e){const t=oe(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(l=>l.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Le(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ie(e,t,n,o){for(let i=0;i<e.length;i++){const l=e[i];if(!t[l.attribute])continue;const s=l.effects&&l.effects[n];s?s(t,n,o):l.onAttrChange&&(!l.declared||l.declared.has(n))&&l.onAttrChange(t,n,o)}}function Fe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=oe(),i=o.byAttr.get(t),l=V()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!l)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(l&&F(s)){const c=o.byDeclaredAttr.get(t),r=s.getAttribute(t);for(let u=0;u<c.length;u++)ne(c[u].spec,r,t,c[u].componentTag,s)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&ie(c,s,t,e.oldValue),o.reactiveWildcard.length&&ie(o.reactiveWildcard,s,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const r=i[c];if(r.handler){r.handler(s,t,e.oldValue);continue}r.onAttributeChange&&s[r.attribute]?r.onAttributeChange(s,t):(re(s,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(s))}}}function qe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,_(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Fe(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function N(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function U(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Me(e){const t=B();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=N();if(e.target&&o.length)for(let i=0;i<o.length;i++){const l=o[i],s=l.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;c&&l.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const l=e.addedNodes[i];if(l.nodeType===1){const s=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!s)l.matches&&l.matches(r.query)&&x(l,r);else if(l.matches&&l.matches(r.query)&&x(l,r),l.querySelectorAll){const u=l.querySelectorAll(r.query);for(let d=0;d<u.length;d++)x(u[d],r)}}r.onInit&&r.onInit(l)}}}for(let i=0;i<e.removedNodes.length;i++){const l=e.removedNodes[i];if(l.nodeType===1){const s=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const r=t[c],u=r.query;if(u){if(!s)l.matches&&l.matches(u)&&U(l,r);else if(l.matches&&l.matches(u)&&U(l,r),l.querySelectorAll){const d=l.querySelectorAll(u);for(let f=0;f<d.length;f++)U(d[f],r)}}}}}}function se(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,_(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{Me(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function $e(e){B().push(e),e.onSubtreeChange&&e.query&&N().push(e),se()}function K(e,t,n,o,i={}){const l=i.extraAttributes||[],s=i.onAttributeChange||null,c=i.onSubtreeChange||null,r=i.onInit||null,u=i.onAttrChange||null,d=i.effects||null,f=i.attributes||null,p=f?Oe(f):d,v=f?new Set(Object.keys(f)):null,E=i.persist||null;function b(A){const h=A||document.body;if(re(h,e,t,n),f&&V())for(const m in f){const O=f[m],k=Array.from(h.querySelectorAll("["+m+"]"));h.matches&&h.matches("["+m+"]")&&k.push(h);for(let L=0;L<k.length;L++){const C=k[L];F(C)&&ne(O,C.getAttribute(m),m,o,C)}}r&&r(h)}const g=[];if(e.indexOf("[")!==-1){const A=/\[([\w-]+)/g;let h;for(;(h=A.exec(e))!==null;)g.push(h[1])}else g.push(e);Re({selector:e,attribute:t,componentTag:o,attributes:f,ComponentFn:n,onInit:r,observed:g.concat(l),onAttributeChange:s,onAttrChange:u,effects:p,declared:v,persist:E}),qe();const T=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,a=i.subtreeQuery||(T?e:"["+e+"]"),w={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:a};B().push(w),c&&a&&N().push(w),se(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=K,window.lnCore.observeLifecycle=$e);function y(){De()>0?Ie(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",y):y(),b}function le(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,n={},o=le(t);if(!o)return n;const i=o.split("&");for(let l=0;l<i.length;l++){const s=i[l];if(!s)continue;const c=s.indexOf(":"),r=c>-1?s.slice(0,c):s,u=c>-1?s.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function Be(e){if(!e)return null;const t=j();return e in t?t[e]:null}function Ne(e,t){if(!e)return;const n=j();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(l){const s=n[l];return s===""?l:l+":"+encodeURIComponent(s)}).join("&");le(location.hash)!==i&&(location.hash=i)}function Ue(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ke(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function 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 Ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function He(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=Be,window.lnCore.hashSet=Ne,window.lnCore.hashLinkClick=Ue,window.lnCore.resolveHashNamespace=Ke,window.lnCore.hashSortEncode=je,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=Ve,window.lnCore.hashFilterDecode=He);function Pe(){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=Pe);const S=["Ctrl","Alt","Shift","Meta"],ze={alt:"Alt",control:"Ctrl",ctrl:"Ctrl",meta:"Meta",command:"Meta",cmd:"Meta",option:"Alt",shift:"Shift",esc:"Escape",escape:"Escape",space:"Space",spacebar:"Space",enter:"Enter",return:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",del:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",up:"ArrowUp",arrowdown:"ArrowDown",down:"ArrowDown",arrowleft:"ArrowLeft",left:"ArrowLeft",arrowright:"ArrowRight",right:"ArrowRight"};function ce(e){if(e===" ")return"Space";const t=String(e||"").trim();if(!t)return"";const n=ze[t.toLowerCase()];return n||(t.length===1||/^f\d{1,2}$/i.test(t)?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1))}function ue(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return"";const n=t.split("+"),o=new Set;let i="";for(let s=0;s<n.length;s++){const c=ce(n[s]);if(!c)return"";if(S.indexOf(c)!==-1){o.add(c);continue}if(i)return"";i=c}if(!i)return"";const l=[];for(let s=0;s<S.length;s++)o.has(S[s])&&l.push(S[s]);return l.push(i),l.join("+")}function Qe(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return[];const n=t.split(/[\s,]+/),o=[];for(let i=0;i<n.length;i++){const l=ue(n[i]);l&&o.indexOf(l)===-1&&o.push(l)}return o}function Je(e,t){const n=String(t||"").trim();if(!n||/[\s,]/.test(n))return"";const o=String(e||"").replace(/\s*\+\s*/g,"+").trim();return/[\s,]/.test(o)?"":ue(o?o+"+"+n:n)}function Ge(e){if(!e)return"";const t=ce(e.key);if(!t||S.indexOf(t)!==-1)return"";const n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&n.push("Meta"),n.push(t),n.join("+")}function Xe(e){if(!e||!e.tagName)return null;const t=String(e.tagName).toLowerCase();if(t==="button"||t==="a"&&e.hasAttribute&&e.hasAttribute("href"))return"click";if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return"focus";if(e.hasAttribute&&e.hasAttribute("contenteditable")){const n=e.getAttribute("contenteditable");if(n===""||String(n).toLowerCase()!=="false")return"focus"}return null}function Ye(e,t,n,o){if(!e||!t||n!=="click"||e.target!==t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return!1;const i=String(t.tagName||"").toLowerCase();return i==="button"?o==="Enter"||o==="Space":i==="a"&&t.hasAttribute&&t.hasAttribute("href")&&o==="Enter"}(function(){const e="data-ln-key",t="lnKey",n="data-ln-key-target",o="data-ln-key-allow-input",i="data-ln-key-modifier",l="data-ln-key-for",s="lnKeyFor";if(window[t]!==void 0)return;function c(a){const w=a[t];if(w){if(!a.hasAttribute(e)){w.destroy();return}w.sync()}}function r(a){const w=a[s];w&&!a.hasAttribute(l)&&w.destroy()}const u={"data-ln-key":{type:"string",effect:c,description:"Keyboard shortcut combination (e.g. meta+k, ctrl+s)"},"data-ln-key-target":{type:"string",effect:c,description:"Target element selector or ID to receive synthetic click or focus"},"data-ln-key-allow-input":{type:"boolean",effect:c,description:"Permits shortcut execution even when focused inside an editable input"}},d={"data-ln-key-for":{type:"string",effect:r,description:"Target element ID that this shortcut badge is displayed for"},"data-ln-key-modifier":{type:"string",description:"Platform modifier text representation override"}},f=new Set;let p=null;function v(){p||(p=function(a){if(a.defaultPrevented||a.isComposing||a.repeat)return;const w=Ge(a);if(!w)return;const y=de(a.target),A=document.querySelectorAll("["+e+"], ["+l+"]");let h=null,m=!1,O=!1;for(let C=0;C<A.length;C++){const W=A[C],D=W[t]||W[s];if(!D||!D.matches(w)||y&&!D.allowsInput())continue;const I=D.resolveTarget(),R=Xe(I);if(!(!R||!he(I,R))){if(Ye(a,I,R,w)){O=!0;continue}h?m=!0:h={host:W,target:I,action:R}}}if(O||!h)return;m&&console.warn('[ln-key] Duplicate active shortcut "'+w+'"; first DOM match wins.');const k={source:h.host,target:h.target,action:h.action,key:w,event:a};ae(h.host,"ln-key:before-trigger",k).defaultPrevented||(a.preventDefault(),h.target[h.action](),H(h.host,"ln-key:trigger",k))},document.addEventListener("keydown",p))}function E(){f.size>0||!p||(document.removeEventListener("keydown",p),p=null)}function b(a){return this.dom=a,this.shortcuts=[],f.add(this),this.sync(),v(),this}b.prototype.sync=function(){this.shortcuts=Qe(this.dom.getAttribute(e))},b.prototype.matches=function(a){return this.shortcuts.indexOf(a)!==-1},b.prototype.allowsInput=function(){return this.dom.hasAttribute(o)},b.prototype.resolveTarget=function(){const a=this.dom.getAttribute(n);return a?T(a,n):this.dom},b.prototype.destroy=function(){this.dom[t]&&(f.delete(this),delete this.dom[t],E())};function g(a){return this.dom=a,f.add(this),v(),this}g.prototype._modifierContext=function(){return this.dom.closest("["+i+"]")},g.prototype.shortcut=function(){const a=this._modifierContext(),w=a?a.getAttribute(i):"";return Je(w,this.dom.textContent)},g.prototype.matches=function(a){return this.shortcut()===a},g.prototype.allowsInput=function(){if(this.dom.hasAttribute(o))return!0;const a=this._modifierContext();return!!(a&&a.hasAttribute(o))},g.prototype.resolveTarget=function(){return T(this.dom.getAttribute(l),l)},g.prototype.destroy=function(){this.dom[s]&&(f.delete(this),delete this.dom[s],E())};function T(a,w){if(!a)return null;try{const y=document.querySelector(a);return y||console.warn("[ln-key] Target not found for "+w+' selector "'+a+'".'),y}catch{return console.warn("[ln-key] Invalid "+w+' selector "'+a+'".'),null}}K(e,t,b,"ln-key",{attributes:u}),K(l,s,g,"ln-key-for",{attributes:d})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function K(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function L(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!L(n))return}e.apply(console,t)}}function H(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function J(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(l),l}function g(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){g(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function P(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(r)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&i[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 a=0;a<o.options.length;a++)o.options[a].selected&&l[o.name].push(o.options[a].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const a=Number(o.value);l[o.name]=o.value===""||isNaN(a)?null:a}else l[o.name]=o.value}return l}function G(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Q(e,t){const r=e.elements,n=[],l={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const o=t[c];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(o).split(",").map(function(f){return f.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=G(o);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<i.options.length;a++)i.options[a].selected=o.indexOf(i.options[a].value)!==-1;n.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Q,window.lnCore.serializeForm=P,window.lnCore.resolveFormMethod=z);const E={};function Y(e,t){E[e]=t}function X(e){return E[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Y,window.lnCore.getDataMapper=X);function Z(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,g(function(){new MutationObserver(function(){H(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const O={};function ee(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];O[r]=t}function te(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return O[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ee,window.lnCore.getLocaleFallback=te,window.lnCore.ensureLocaleObserver=Z);const y={};function ne(e,t){y[e]||(y[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=y[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function q(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const c=r[i],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],o=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const f=o[a].trim().split(":");if(f.length!==2)continue;const h=f[0].trim(),p=f[1].trim();t[p]!=null&&c.setAttribute(h,t[p])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],o=c.getAttribute("data-ln-class").split(",");for(let a=0;a<o.length;a++){const f=o[a].trim().split(":");if(f.length!==2)continue;const h=f[0].trim(),p=f[1].trim();p in t&&c.classList.toggle(h,!!t[p])}}return e}function re(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function D(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const n=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let o=0;o<c.length;o++){const a=c[o];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function oe(e,t,r,n,l,s){const i={};for(let o=0;o<e.children.length;o++){const a=e.children[o],f=a.getAttribute("data-ln-render-key");f&&(i[f]=a)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],f=String(n(a));let h=i[f];if(h)l(h,a,o);else{const p=ne(r,s);if(!p||(D(p,a),h=p.firstElementChild,!h))continue;h.setAttribute("data-ln-render-key",f),l(h,a,o)}c.appendChild(h)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=D,window.lnCore.fill=q,window.lnCore.lnFill=re,window.lnCore.renderList=oe);function C(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function T(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function I(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function F(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const A=new Map;function $(e,t){const r=(e?e.join("|"):"")+"::"+t;if(A.has(r))return A.get(r);const n=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&n.has(c)?c:t};return A.set(r,l),l}function N(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function R(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function ie(e,t,r,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function le(e,t,r){for(const n in r){const[l,s,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function se(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=$(n.values,n.fallback);break;case"integer":l=T;break;case"float":l=N;break;case"boolean":l=I;break;case"list":l=F;break;case"json":l=R;break;case"string":default:l=C;break}l||(l=C),t[n.prop]=[l,r,n.fallback]}return t}function ce(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=le,window.lnCore.attrSpec=se,window.lnCore.attrStr=C,window.lnCore.attrInt=T,window.lnCore.attrBool=I,window.lnCore.attrList=F,window.lnCore.attrEnum=$,window.lnCore.attrFloat=N,window.lnCore.attrJson=R);function m(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function ue(e,t,r,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(s)&&m(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)m(c[o],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function B(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ae(e){const t=B(),r=e.observed||[];for(let n=0;n<r.length;n++){const l=r[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=ce(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function M(e,t,r,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,n):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,n)}}function de(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=B(),l=n.byAttr.get(t),s=K()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&L(i)){const c=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let a=0;a<c.length;a++)ie(c[a].spec,o,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=n.byReactive.get(t);c&&M(c,i,t,e.oldValue),n.reactiveWildcard.length&&M(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(ue(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}function fe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,g(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{de(t[r])}catch(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function j(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function k(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function we(e){const t=j();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&m(n,i);else if(n.matches&&n.matches(i.query)&&m(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let o=0;o<c.length;o++)m(c[o],i)}}i.onInit&&i.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&k(n,i);else if(n.matches&&n.matches(c)&&k(n,i),n.querySelectorAll){const o=n.querySelectorAll(c);for(let a=0;a<o.length;a++)k(o[a],i)}}}}}}}function he(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,g(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{we(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function be(e,t){ae({observed:e,handler:t}),fe()}function pe(e){j().push(e),he()}function W(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,r={},n=W(t);if(!n)return r;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),o=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(o)try{r[o]=decodeURIComponent(a)}catch{r[o]=a}}return r}function ge(e){if(!e)return null;const t=v();return e in t?t[e]:null}function me(e,t){if(!e)return;const r=v();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");W(location.hash)!==l&&(location.hash=l)}function ye(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ke(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function _e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=ge,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=ye,window.lnCore.resolveHashNamespace=Ce,window.lnCore.hashSortEncode=Ae,window.lnCore.hashSortDecode=ke,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=_e);function Se(){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=Se),(function(){const e="data-ln-link",t="lnLink";if(window[t]!==void 0)return;let r=null;function n(){r=document.createElement("div"),r.className="ln-link-status",document.body.appendChild(r)}function l(u){r&&(r.textContent=u,r.classList.add("ln-link-status--visible"))}function s(){r&&r.classList.remove("ln-link-status--visible")}function i(u,d){if(d.target.closest("a, button, input, select, textarea"))return;const w=u.querySelector("a");if(!w)return;const b=w.getAttribute("href");if(!b)return;if(d.ctrlKey||d.metaKey||d.button===1){window.open(b,"_blank","noopener,noreferrer");return}J(u,"ln-link:navigate",{target:u,href:b,link:w}).defaultPrevented||w.click()}function c(u){const d=u.querySelector("a");if(!d)return;const w=d.getAttribute("href");w&&l(w)}function o(){s()}function a(u){u[t+"Row"]||!u.querySelector("a")||(u[t+"Row"]=!0,u._lnLinkClick=function(w){i(u,w)},u._lnLinkEnter=function(){c(u)},u.addEventListener("click",u._lnLinkClick),u.addEventListener("mouseenter",u._lnLinkEnter),u.addEventListener("mouseleave",o))}function f(u){u[t+"Row"]&&(u._lnLinkClick&&u.removeEventListener("click",u._lnLinkClick),u._lnLinkEnter&&u.removeEventListener("mouseenter",u._lnLinkEnter),u.removeEventListener("mouseleave",o),delete u._lnLinkClick,delete u._lnLinkEnter,delete u[t+"Row"])}function h(u){if(!u[t+"Init"])return;const d=u.tagName;if(d==="TABLE"||d==="TBODY"){const w=d==="TABLE"&&u.querySelector("tbody")||u;for(const b of w.querySelectorAll("tr"))f(b)}else f(u);delete u[t+"Init"]}function p(u){if(u[t+"Init"])return;u[t+"Init"]=!0;const d=u.tagName;if(d==="TABLE"||d==="TBODY"){const w=d==="TABLE"&&u.querySelector("tbody")||u;for(const b of w.querySelectorAll("tr"))a(b)}else a(u)}function _(u){u.hasAttribute&&u.hasAttribute(e)&&p(u);const d=u.querySelectorAll?u.querySelectorAll("["+e+"]"):[];for(const w of d)p(w)}function xe(){g(function(){pe({query:"["+e+"]",onInit:function(u){_(u)},onSubtreeChange:function(u,d){for(let w=0;w<d.addedNodes.length;w++){const b=d.addedNodes[w];if(b.nodeType===1){if(b.tagName==="TR")a(b);else if(b.querySelectorAll){const S=b.querySelectorAll("tr");for(let x=0;x<S.length;x++)a(S[x])}}}}}),be([e],function(u){u.hasAttribute&&u.hasAttribute(e)?_(u):h(u)})},"ln-link")}function V(u){_(u)}window[t]={init:V,destroy:h};function U(){n(),xe(),V(document.body)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",U):U()})()})();
|
|
1
|
+
(function(){"use strict";function H(){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 L(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!L(i))return}e.apply(console,t)}}function J(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function z(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(l),l}function g(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){g(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function P(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function G(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,o={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&l[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);l[n.name]=n.value===""||isNaN(a)?null:a}else l[n.name]=n.value}return l}function Q(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Y(e,t){const r=e.elements,i=[],l={};for(let s=0;s<r.length;s++){const o=r[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<r.length;s++){const o=r[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const n=t[c];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const a=String(n).split(",").map(function(d){return d.trim()});o.checked=a.indexOf(o.value)!==-1}else o.checked=Q(n);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<o.options.length;a++)o.options[a].selected=n.indexOf(o.options[a].value)!==-1;i.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Y,window.lnCore.serializeForm=G,window.lnCore.resolveFormMethod=P);const E={};function X(e,t){E[e]=t}function Z(e){return E[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=X,window.lnCore.getDataMapper=Z);function ee(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,g(function(){new MutationObserver(function(){J(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const O={};function te(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];O[r]=t}function ne(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return O[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=te,window.lnCore.getLocaleFallback=ne,window.lnCore.ensureLocaleObserver=ee);const C={};function re(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=C[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function q(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const c=r[o],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const c=i[o],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const b=d[0].trim(),p=d[1].trim();t[p]!=null&&c.setAttribute(b,t[p])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const b=d[0].trim(),p=d[1].trim();p in t&&c.classList.toggle(b,!!t[p])}}return e}function oe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function D(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&o.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ie(e,t,r,i,l,s){const o={};for(let n=0;n<e.children.length;n++){const a=e.children[n],d=a.getAttribute("data-ln-render-key");d&&(o[d]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],d=String(i(a));let b=o[d];if(b)l(b,a,n);else{const p=re(r,s);if(!p||(D(p,a),b=p.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",d),l(b,a,n)}c.appendChild(b)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=D,window.lnCore.fill=q,window.lnCore.lnFill=oe,window.lnCore.renderList=ie);function m(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function T(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function I(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const A=new Map;function F(e,t){const r=(e?e.join("|"):"")+"::"+t;if(A.has(r))return A.get(r);const i=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&i.has(c)?c:t};return A.set(r,l),l}function $(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function N(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function le(e,t,r,i,l){if(!e||t===null)return!0;const s=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function se(e,t,r){for(const i in r){const[l,s,o]=r[i];Object.defineProperty(e,i,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function ce(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=F(i.values,i.fallback);break;case"integer":l=T;break;case"float":l=$;break;case"boolean":l=I;break;case"list":l=R;break;case"json":l=N;break;case"string":default:l=m;break}l||(l=m),t[i.prop]=[l,r,i.fallback]}return t}function ue(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=se,window.lnCore.attrSpec=ce,window.lnCore.attrStr=m,window.lnCore.attrInt=T,window.lnCore.attrBool=I,window.lnCore.attrList=R,window.lnCore.attrEnum=F,window.lnCore.attrFloat=$,window.lnCore.attrJson=N);function y(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function ae(e,t,r,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(s)&&y(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)y(c[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function B(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function de(e){const t=B(),r=e.observed||[];for(let i=0;i<r.length;i++){const l=r[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ue(e);if(i===null)t.reactiveWildcard.push(e);else for(const l of i)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function M(e,t,r,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[r];o?o(t,r,i):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,i)}}function fe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=B(),l=i.byAttr.get(t),s=H()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&L(o)){const c=i.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let a=0;a<c.length;a++)le(c[a].spec,n,t,c[a].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const c=i.byReactive.get(t);c&&M(c,o,t,e.oldValue),i.reactiveWildcard.length&&M(i.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(ae(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,g(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{fe(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function j(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function W(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function k(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function be(e){const t=j();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=W();if(e.target&&i.length)for(let l=0;l<i.length;l++){const s=i[l],o=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!o)s.matches&&s.matches(n.query)&&y(s,n);else if(s.matches&&s.matches(n.query)&&y(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let d=0;d<a.length;d++)y(a[d],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!o)s.matches&&s.matches(a)&&k(s,n);else if(s.matches&&s.matches(a)&&k(s,n),s.querySelectorAll){const d=s.querySelectorAll(a);for(let b=0;b<d.length;b++)k(d[b],n)}}}}}}function he(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,g(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{be(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e,t){de({observed:e,handler:t}),we()}function ge(e){j().push(e),e.onSubtreeChange&&e.query&&W().push(e),he()}function V(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,r={},i=V(t);if(!i)return r;const l=i.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),n=c>-1?o.slice(0,c):o,a=c>-1?o.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function ye(e){if(!e)return null;const t=v();return e in t?t[e]:null}function Ce(e,t){if(!e)return;const r=v();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const o=r[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");V(location.hash)!==l&&(location.hash=l)}function me(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ae(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ve(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function _e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=ye,window.lnCore.hashSet=Ce,window.lnCore.hashLinkClick=me,window.lnCore.resolveHashNamespace=Ae,window.lnCore.hashSortEncode=ke,window.lnCore.hashSortDecode=ve,window.lnCore.hashFilterEncode=_e,window.lnCore.hashFilterDecode=Se);function xe(){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=xe),(function(){const e="data-ln-link",t="lnLink";if(window[t]!==void 0)return;let r=null;function i(){r=document.createElement("div"),r.className="ln-link-status",document.body.appendChild(r)}function l(u){r&&(r.textContent=u,r.classList.add("ln-link-status--visible"))}function s(){r&&r.classList.remove("ln-link-status--visible")}function o(u,f){if(f.target.closest("a, button, input, select, textarea"))return;const w=u.querySelector("a");if(!w)return;const h=w.getAttribute("href");if(!h)return;if(f.ctrlKey||f.metaKey||f.button===1){window.open(h,"_blank","noopener,noreferrer");return}z(u,"ln-link:navigate",{target:u,href:h,link:w}).defaultPrevented||w.click()}function c(u){const f=u.querySelector("a");if(!f)return;const w=f.getAttribute("href");w&&l(w)}function n(){s()}function a(u){u[t+"Row"]||!u.querySelector("a")||(u[t+"Row"]=!0,u._lnLinkClick=function(w){o(u,w)},u._lnLinkEnter=function(){c(u)},u.addEventListener("click",u._lnLinkClick),u.addEventListener("mouseenter",u._lnLinkEnter),u.addEventListener("mouseleave",n))}function d(u){u[t+"Row"]&&(u._lnLinkClick&&u.removeEventListener("click",u._lnLinkClick),u._lnLinkEnter&&u.removeEventListener("mouseenter",u._lnLinkEnter),u.removeEventListener("mouseleave",n),delete u._lnLinkClick,delete u._lnLinkEnter,delete u[t+"Row"])}function b(u){if(!u[t+"Init"])return;const f=u.tagName;if(f==="TABLE"||f==="TBODY"){const w=f==="TABLE"&&u.querySelector("tbody")||u;for(const h of w.querySelectorAll("tr"))d(h)}else d(u);delete u[t+"Init"]}function p(u){if(u[t+"Init"])return;u[t+"Init"]=!0;const f=u.tagName;if(f==="TABLE"||f==="TBODY"){const w=f==="TABLE"&&u.querySelector("tbody")||u;for(const h of w.querySelectorAll("tr"))a(h)}else a(u)}function _(u){u.hasAttribute&&u.hasAttribute(e)&&p(u);const f=u.querySelectorAll?u.querySelectorAll("["+e+"]"):[];for(const w of f)p(w)}function Le(){g(function(){ge({query:"["+e+"]",onInit:function(u){_(u)},onSubtreeChange:function(u,f){for(let w=0;w<f.addedNodes.length;w++){const h=f.addedNodes[w];if(h.nodeType===1){if(h.tagName==="TR")a(h);else if(h.querySelectorAll){const S=h.querySelectorAll("tr");for(let x=0;x<S.length;x++)a(S[x])}}}}}),pe([e],function(u){u.hasAttribute&&u.hasAttribute(e)?_(u):b(u)})},"ln-link")}function U(u){_(u)}window[t]={init:U,destroy:b};function K(){i(),Le(),U(document.body)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",K):K()})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function et(){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 G(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 s=null;for(let d=1;d<e.length;d++)if(e[d]&&e[d].nodeType===1){s=e[d];break}if(!G(s))return}t.apply(console,e)}}function D(t,e,r){const s=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,s),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function vt(t,e,r){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const s={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};s[r]=t.name,D(t.dom,e,s)}function $(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){$(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function nt(t){return t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.tagName==="DATA"&&t.hasAttribute("value")?t.getAttribute("value"):t.textContent.trim()}function St(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function At(t,e){const r=!!(e&&e.typed),s=e&&e.exclude,d={},h=t.elements,a={};if(r)for(let u=0;u<h.length;u++){const o=h[u];o.name&&o.type==="checkbox"&&!o.disabled&&(a[o.name]=(a[o.name]||0)+1)}for(let u=0;u<h.length;u++){const o=h[u];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(s&&o.matches&&o.matches(s)))if(o.type==="checkbox")r&&a[o.name]===1?d[o.name]=o.checked:(d[o.name]||(d[o.name]=[]),o.checked&&d[o.name].push(o.value));else if(o.type==="radio")o.checked&&(d[o.name]=o.value);else if(o.type==="select-multiple"){d[o.name]=[];for(let _=0;_<o.options.length;_++)o.options[_].selected&&d[o.name].push(o.options[_].value)}else if(r&&o.type==="hidden")d[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const _=Number(o.value);d[o.name]=o.value===""||isNaN(_)?null:_}else d[o.name]=o.value}return d}function Et(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function Dt(t,e){const r=t.elements,s=[],d={};for(let h=0;h<r.length;h++){const a=r[h];a.name&&a.type==="checkbox"&&(d[a.name]=(d[a.name]||0)+1)}for(let h=0;h<r.length;h++){const a=r[h];if(a.type==="file"||a.type==="submit"||a.type==="button")continue;const u=a.getAttribute("data-ln-fill-as")||a.name;if(!u||!(u in e))continue;const o=e[u];if(a.type==="checkbox"){if(Array.isArray(o))a.checked=o.indexOf(a.value)!==-1;else if(d[a.name]>1){const _=String(o).split(",").map(function(b){return b.trim()});a.checked=_.indexOf(a.value)!==-1}else a.checked=Et(o);s.push(a)}else if(a.type==="radio")a.checked=a.value===String(o),s.push(a);else if(a.type==="select-multiple"){if(Array.isArray(o))for(let _=0;_<a.options.length;_++)a.options[_].selected=o.indexOf(a.options[_].value)!==-1;s.push(a)}else a.value=o,a.tagName==="SELECT"&&o!=null&&a.setAttribute("data-ln-value",o),s.push(a)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Dt,window.lnCore.serializeForm=At,window.lnCore.resolveFormMethod=St);const it={};function kt(t,e){it[t]=e}function Lt(t){return it[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=kt,window.lnCore.getDataMapper=Lt);function lt(t){const e=t?t.closest("[lang]"):null,r=(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 r?r.trim():"en-US"}function xt(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,$(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const rt={};function Tt(t,e){if(!t||typeof e!="object")return;const r=t.toLowerCase().split("-")[0];rt[r]=e}function Ft(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return rt[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Tt,window.lnCore.getLocaleFallback=Ft,window.lnCore.ensureLocaleObserver=xt);const P={};function st(t,e){P[t]||(P[t]=document.querySelector('[data-ln-template="'+t+'"]'));const r=P[t];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function ot(t,e,r){if(t){const s=t.querySelector('[data-ln-template="'+e+'"]');if(s)return s.content.cloneNode(!0)}return st(e,r)}function K(t,e){if(!t||!e)return t;const r=t.querySelectorAll("[data-ln-field]");for(let a=0;a<r.length;a++){const u=r[a],o=u.getAttribute("data-ln-field");e[o]!=null&&(u.textContent=e[o])}const s=t.querySelectorAll("[data-ln-attr]");for(let a=0;a<s.length;a++){const u=s[a],o=u.getAttribute("data-ln-attr").split(",");for(let _=0;_<o.length;_++){const b=o[_].trim().split(":");if(b.length!==2)continue;const C=b[0].trim(),k=b[1].trim();e[k]!=null&&u.setAttribute(C,e[k])}}const d=t.querySelectorAll("[data-ln-show]");for(let a=0;a<d.length;a++){const u=d[a],o=u.getAttribute("data-ln-show");o in e&&u.classList.toggle("hidden",!e[o])}const h=t.querySelectorAll("[data-ln-class]");for(let a=0;a<h.length;a++){const u=h[a],o=u.getAttribute("data-ln-class").split(",");for(let _=0;_<o.length;_++){const b=o[_].trim().split(":");if(b.length!==2)continue;const C=b[0].trim(),k=b[1].trim();k in e&&u.classList.toggle(C,!!e[k])}}return t}function It(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 r=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<r.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[s],e??null),r[s].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)K(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function Q(t,e){if(!t||!e)return t;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const h=r.currentNode;h.textContent.indexOf("{{")!==-1&&(h.textContent=h.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(a,u){return e[u]!==void 0?e[u]:""}))}const s=function(h,a){return e[a]!==void 0?e[a]:""},d=Array.from(t.querySelectorAll("*"));t.nodeType===1&&d.push(t);for(let h=0;h<d.length;h++){const a=d[h],u=a.attributes;for(let o=0;o<u.length;o++){const _=u[o];_.value.indexOf("{{")!==-1&&a.setAttribute(_.name,_.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return t}function qt(t,e,r,s,d,h){const a={};for(let o=0;o<t.children.length;o++){const _=t.children[o],b=_.getAttribute("data-ln-render-key");b&&(a[b]=_)}const u=document.createDocumentFragment();for(let o=0;o<e.length;o++){const _=e[o],b=String(s(_));let C=a[b];if(C)d(C,_,o);else{const k=st(r,h);if(!k||(Q(k,_),C=k.firstElementChild,!C))continue;C.setAttribute("data-ln-render-key",b),d(C,_,o)}u.appendChild(C)}t.textContent="",t.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=K,window.lnCore.lnFill=It,window.lnCore.renderList=qt);function V(t,e,r){const s=t.getAttribute(e);return s===null?r:s}function at(t,e,r){const s=parseInt(t.getAttribute(e),10);return isNaN(s)?r:s}function Y(t,e,r=!1){const s=t.getAttribute(e);if(s===null)return!!r;const d=s.trim().toLowerCase();return!(d==="false"||d==="0")}function ct(t,e){return(t.getAttribute(e)||"").split(",").map(r=>r.trim()).filter(Boolean)}const J=new Map;function dt(t,e){const r=(t?t.join("|"):"")+"::"+e;if(J.has(r))return J.get(r);const s=new Set(t||[]),d=function(h,a){const u=h.getAttribute(a);return u!==null&&s.has(u)?u:e};return J.set(r,d),d}function ut(t,e,r){const s=parseFloat(t.getAttribute(e));return isNaN(s)?r:s}function ht(t,e,r){const s=t.getAttribute(e);if(!s)return r;try{return JSON.parse(s)}catch{return r}}function ft(t,e,r,s,d){if(!t||e===null)return!0;const h=s||"ln-component",a=t.type;if(a==="trigger"||a==="marker"||a==="string"||a==="list"||!a||e===""&&t.fallback!==void 0)return!0;const u=o=>{d?console.warn(o,d):console.warn(o)};if(a==="boolean"){const o=e.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(u(`[${h}] Invalid value "${e}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(a==="enum"){const o=t.values||[];return o.includes(e)?!0:(u(`[${h}] Invalid value "${e}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(a==="integer"){if(!/^-?\d+$/.test(e))return u(`[${h}] Invalid integer "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1;const o=parseInt(e,10);return t.min!==void 0&&o<t.min?(u(`[${h}] Value ${o} for attribute "${r}" is less than min (${t.min}).`),!1):t.max!==void 0&&o>t.max?(u(`[${h}] Value ${o} for attribute "${r}" is greater than max (${t.max}).`),!1):!0}if(a==="float")return isNaN(Number(e))?(u(`[${h}] Invalid float "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1):!0;if(a==="json")try{return JSON.parse(e),!0}catch(o){return u(`[${h}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${t.fallback}.`),!1}return!0}function _t(t,e,r){for(const s in r){const[d,h,a]=r[s];Object.defineProperty(t,s,{get:function(){return d(e,h,a)},enumerable:!0,configurable:!0})}return t}function pt(t){const e={};for(const r in t){const s=t[r];if(!s||!s.prop)continue;let d=s.read;if(!d&&s.type)switch(s.type){case"enum":d=dt(s.values,s.fallback);break;case"integer":d=at;break;case"float":d=ut;break;case"boolean":d=Y;break;case"list":d=ct;break;case"json":d=ht;break;case"string":default:d=V;break}d||(d=V),e[s.prop]=[d,r,s.fallback]}return e}function Ot(t){const e={};for(const r in t){const s=t[r];s&&s.effect&&(e[r]=s.effect)}return Object.keys(e).length?e:null}function Rt(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const r in t.effects)e.add(r);if(t.onAttrChange&&t.declared)for(const r of t.declared)e.add(r);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=_t,window.lnCore.attrSpec=pt,window.lnCore.attrStr=V,window.lnCore.attrInt=at,window.lnCore.attrBool=Y,window.lnCore.attrList=ct,window.lnCore.attrEnum=dt,window.lnCore.attrFloat=ut,window.lnCore.attrJson=ht);function z(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(r){console.error("["+e.attribute+"] init failed",t,r)}}}function gt(t,e,r,s){if(t.nodeType!==1)return;const h=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",a={selector:e,attribute:r,ComponentFn:s};if(t.matches&&t.matches(h)&&z(t,a),t.querySelectorAll){const u=t.querySelectorAll(h);for(let o=0;o<u.length;o++)z(u[o],a)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Mt(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ht(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 mt(){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 Nt(t){const e=mt(),r=t.observed||[];for(let s=0;s<r.length;s++){const d=r[s];e.byAttr.has(d)||e.byAttr.set(d,[]),e.byAttr.get(d).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const s in t.attributes){e.byDeclaredAttr.has(s)||e.byDeclaredAttr.set(s,[]);const d=e.byDeclaredAttr.get(s);d.some(h=>h.componentTag===t.componentTag)||d.push({spec:t.attributes[s],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const s=Rt(t);if(s===null)e.reactiveWildcard.push(t);else for(const d of s)e.byReactive.has(d)||e.byReactive.set(d,[]),e.byReactive.get(d).push(t)}t.persist&&e.persist.push(t)}function wt(t,e,r,s){for(let d=0;d<t.length;d++){const h=t[d];if(!e[h.attribute])continue;const a=h.effects&&h.effects[r];a?a(e,r,s):h.onAttrChange&&(!h.declared||h.declared.has(r))&&h.onAttrChange(e,r,s)}}function Wt(t){const e=t.attributeName,r=e.indexOf("data-ln-")===0,s=mt(),d=s.byAttr.get(e),h=et()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(e);if(!r&&!d&&!h)return;const a=t.target;if(t.oldValue!==a.getAttribute(e)){if(h&&G(a)){const u=s.byDeclaredAttr.get(e),o=a.getAttribute(e);for(let _=0;_<u.length;_++)ft(u[_].spec,o,e,u[_].componentTag,a)}if(window.lnCore._debugSink&&(r||d)&&window.lnCore._debugSink("attr",e,a,{oldValue:t.oldValue,newValue:a.getAttribute(e)}),r){const u=s.byReactive.get(e);u&&wt(u,a,e,t.oldValue),s.reactiveWildcard.length&&wt(s.reactiveWildcard,a,e,t.oldValue)}if(d)for(let u=0;u<d.length;u++){const o=d[u];if(o.handler){o.handler(a,e,t.oldValue);continue}o.onAttributeChange&&a[o.attribute]?o.onAttributeChange(a,e):(gt(a,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(a))}}}function Bt(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++)try{Wt(e[r])}catch(s){console.error("[ln-core] mutation handler failed",e[r].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function X(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Z(t,e){if(!document.contains(t))if(e.attribute){const r=t[e.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(s){console.error("["+e.attribute+"] destroy failed",t,s)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function Ut(t){const e=X();if(e.length){if(t.target)for(let r=0;r<e.length;r++){const s=e[r];if(s.onSubtreeChange&&s.query){const d=s.query,h=t.target.nodeType===1?t.target.matches&&t.target.matches(d)?t.target:t.target.closest?t.target.closest(d):null:t.target.parentElement&&t.target.parentElement.closest?t.target.parentElement.closest(d):null;h&&s.onSubtreeChange(h,t)}}for(let r=0;r<t.addedNodes.length;r++){const s=t.addedNodes[r];if(s.nodeType===1){const d=!!(s.firstElementChild||s.children&&s.children.length);for(let h=0;h<e.length;h++){const a=e[h];if(a.selector&&a.attribute&&a.ComponentFn){if(!d)s.matches&&s.matches(a.query)&&z(s,a);else if(s.matches&&s.matches(a.query)&&z(s,a),s.querySelectorAll){const u=s.querySelectorAll(a.query);for(let o=0;o<u.length;o++)z(u[o],a)}}a.onInit&&a.onInit(s)}}}for(let r=0;r<t.removedNodes.length;r++){const s=t.removedNodes[r];if(s.nodeType===1){const d=!!(s.firstElementChild||s.children&&s.children.length);for(let h=0;h<e.length;h++){const a=e[h],u=a.query;if(u){if(!d)s.matches&&s.matches(u)&&Z(s,a);else if(s.matches&&s.matches(u)&&Z(s,a),s.querySelectorAll){const o=s.querySelectorAll(u);for(let _=0;_<o.length;_++)Z(o[_],a)}}}}}}}function bt(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++){const s=e[r];if(s.type==="childList")try{Ut(s)}catch(d){console.error("[ln-core] lifecycle handler failed",s.target,d)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Vt(t){X().push(t),bt()}function yt(t,e,r,s,d={}){const h=d.extraAttributes||[],a=d.onAttributeChange||null,u=d.onSubtreeChange||null,o=d.onInit||null,_=d.onAttrChange||null,b=d.effects||null,C=d.attributes||null,k=C?Ot(C):b,I=C?new Set(Object.keys(C)):null,q=d.persist||null;function H(n){const i=n||document.body;if(gt(i,t,e,r),C&&et())for(const l in C){const c=C[l],f=Array.from(i.querySelectorAll("["+l+"]"));i.matches&&i.matches("["+l+"]")&&f.push(i);for(let p=0;p<f.length;p++){const g=f[p];G(g)&&ft(c,g.getAttribute(l),l,s,g)}}o&&o(i)}const T=[];if(t.indexOf("[")!==-1){const n=/\[([\w-]+)/g;let i;for(;(i=n.exec(t))!==null;)T.push(i[1])}else T.push(t);Nt({selector:t,attribute:e,componentTag:s,attributes:C,ComponentFn:r,onInit:o,observed:T.concat(h),onAttributeChange:a,onAttrChange:_,effects:k,declared:I,persist:q}),Bt();const F=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,N=d.subtreeQuery||(F?t:"["+t+"]");X().push({selector:t,attribute:e,ComponentFn:r,onInit:o,onSubtreeChange:u,query:N}),bt(),window[e]=H,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=yt,window.lnCore.observeLifecycle=Vt);function y(){Mt()>0?Ht(function(){H(document.body)}):H(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",y):y(),H}function zt(t){let e=!1;for(let r=0;r<t.length;r++){const s=t[r];if(!(s===""||s==null)&&(e=!0,!Number.isFinite(Number(s))))return"string"}return e?"number":"string"}function $t(t,e,r,s){if(r==="number"){const a=parseFloat(t),u=parseFloat(e);return(isNaN(a)?0:a)-(isNaN(u)?0:u)}const d=t!=null?String(t):"",h=e!=null?String(e):"";return s?s.compare(d,h):d<h?-1:d>h?1:0}function jt(t,e){let r=!1;return function(){r||(r=!0,queueMicrotask(function(){r=!1,t()}))}}function Gt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,r=t.pageSize>0?t.pageSize:200,s=t.threshold!=null?t.threshold:25,d=t.fetchDebounce!=null?t.fetchDebounce:120;const h=typeof t.requestPage=="function"?t.requestPage:function(){},a=typeof t.onChange=="function"?t.onChange:function(){},u=new Map,o=new Map,_=new Set;let b=0,C=0,k=0,I={sort:null,filters:{},search:""},q=null,H=0,T=0,F=!1;function N(l){o.set(l,++H)}function y(){return!!(I&&(I.search||I.filters&&Object.keys(I.filters).length))}function n(){if(u.size<=e)return;const l=Array.from(u.keys()).sort(function(f,p){return(o.get(f)||0)-(o.get(p)||0)});let c=0;for(;u.size>e&&c<l.length;)u.delete(l[c]),o.delete(l[c]),c++}function i(l,c){_.add(l),h(I,l,c)}return{get:function(l){return u.get(l)},has:function(l){return u.has(l)},peek:function(){return u.size?u.values().next().value:void 0},get logicalTotal(){return b},get grandTotal(){return C},get queryGen(){return k},get size(){return u.size},ensure:function(l,c){clearTimeout(q),T=l;for(let m=l;m<c;m++)u.has(m)&&N(m);if(b<=0)return;const f=Math.max(0,l-s),p=Math.min(b,c+s),g=Math.floor(f/r),S=Math.floor(Math.max(0,p-1)/r);let E=-1;for(let m=g;m<=S;m++){const w=m*r,L=Math.min(r,b-w);let W=!1;const B=Math.max(w,f),R=Math.min(w+L,p);for(let O=B;O<R;O++)if(!u.has(O)){W=!0;break}if(W&&!_.has(w)){E=w;break}}E!==-1&&(q=setTimeout(function(){i(E,r)},d))},ingest:function(l){if(l=l||{},l.queryGen!=null&&l.queryGen!==k)return!1;const c=l.offset||0,f=l.data||[];let p=0;for(let g=0;g<f.length;g++)f[g]!=null&&p++;if(p===0&&(l.provisional||l.filtered>0))return _.delete(c),!1;F&&(u.clear(),o.clear(),F=!1),l.provisional||(C=l.total!=null?l.total:C,b=l.filtered!=null?l.filtered:l.data?l.data.length:b);for(let g=0;g<f.length;g++)f[g]!=null&&(u.set(c+g,f[g]),N(c+g));return _.delete(c),n(),a(),!0},requestInitial:function(l){l&&(I=l),i(0,r)},invalidate:function(l){k++,_.clear(),clearTimeout(q),l&&(I=l),F=!0,i(0,r)},revalidate:function(){k++,_.clear(),clearTimeout(q),F=!0;const l=Math.max(0,Math.floor(T/r)*r);i(l,r)},release:function(l){_.delete(l)},destroy:function(){clearTimeout(q),u.clear(),o.clear(),_.clear()},configure:function(l){l=l||{};let c=!1;if(l.windowSize!=null&&l.windowSize>0&&l.windowSize!==e){const f=l.windowSize<e;e=l.windowSize,f&&n(),c=!0}l.pageSize!=null&&l.pageSize>0&&(r=l.pageSize),l.threshold!=null&&l.threshold>=0&&(s=l.threshold),l.fetchDebounce!=null&&l.fetchDebounce>=0&&(d=l.fetchDebounce),c&&a()},setGrandTotal:function(l){l==null||isNaN(l)||l<0||(C=l,y()||(b=l),a())}}}function Ct(t){return(t||"").replace(/^#/,"")}function tt(t){const e=t===void 0?location.hash:t,r={},s=Ct(e);if(!s)return r;const d=s.split("&");for(let h=0;h<d.length;h++){const a=d[h];if(!a)continue;const u=a.indexOf(":"),o=u>-1?a.slice(0,u):a,_=u>-1?a.slice(u+1):"";if(o)try{r[o]=decodeURIComponent(_)}catch{r[o]=_}}return r}function Pt(t){if(!t)return null;const e=tt();return t in e?e[t]:null}function Kt(t,e){if(!t)return;const r=tt();e==null?delete r[t]:r[t]=String(e);const d=Object.keys(r).map(function(h){const a=r[h];return a===""?h:h+":"+encodeURIComponent(a)}).join("&");Ct(location.hash)!==d&&(location.hash=d)}function Qt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function Yt(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const r=t.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const s=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return s?e?s+"-"+e:s:e||null}function Jt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Xt(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 Zt(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function te(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const r=t.slice(0,e),s=t.slice(e+1),d=s?s.split(",").map(function(h){try{return decodeURIComponent(h)}catch{return h}}).filter(Boolean):[];return{key:r,values:d}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=tt,window.lnCore.hashGet=Pt,window.lnCore.hashSet=Kt,window.lnCore.hashLinkClick=Qt,window.lnCore.resolveHashNamespace=Yt,window.lnCore.hashSortEncode=Jt,window.lnCore.hashSortDecode=Xt,window.lnCore.hashFilterEncode=Zt,window.lnCore.hashFilterDecode=te);function ee(){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=ee),(function(){const t="data-ln-list",e="lnList",r="data-ln-list-empty";if(window[e]!==void 0)return;function o(n,i){if(!n||!n.isDataDriven)return;const l=n.dom.hasAttribute("data-ln-list-window");if(l&&!n._windowed)n._enterWindowedMode(),n._kickWindowInitial();else if(!l&&n._windowed)n._exitWindowedMode();else if(l&&n._windowed){const c=parseInt(i,10);c>0&&n._cache.configure({windowSize:c})}}function _(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>0&&n._cache.configure({pageSize:l})}function b(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.configure({threshold:l})}function C(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.setGrandTotal(l)}const k={"data-ln-list":{prop:"name",type:"string",read:V,fallback:"",description:"List instance name or identifier"},"data-ln-list-source":{prop:"source",type:"string",read:V,fallback:"",description:"Source store or coordinator addressing"},"data-ln-list-selectable":{prop:"_selectable",type:"boolean",read:Y,description:"Enables item selection controls"},"data-ln-list-window":{type:"integer",fallback:1e3,min:10,effect:o,description:"Virtual scrolling window size in items"},"data-ln-list-window-page":{type:"integer",fallback:200,min:5,effect:_,description:"Virtual scrolling slice page size"},"data-ln-list-window-threshold":{type:"integer",fallback:50,min:0,effect:b,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-list-count":{type:"integer",min:0,effect:C,description:"Total item count override for virtual scrollbar calculation"},"data-ln-list-empty":{type:"marker",description:"Container for list empty state"},"data-ln-list-field":{type:"string",description:"Field name mapping for list item binding"}},I=pt(k);function q(n,i){if(n==null||isNaN(n))return"";try{return new Intl.NumberFormat(lt(i)).format(n)}catch{return String(n)}}function H(n){let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const c=getComputedStyle(i).overflowY;if(c==="auto"||c==="scroll")return i;i=i.parentElement}return null}function T(n){const i=n._scrollContainer||H(n.dom);return{container:i,top:i?i.scrollTop:window.scrollY}}function F(n){n.container?n.container.scrollTop=n.top:window.scrollTo(window.scrollX,n.top)}function N(n){if(!n)return 0;const i=getComputedStyle(n),l=parseFloat(i.marginTop)||0,c=parseFloat(i.marginBottom)||0;return n.offsetHeight+l+c}function y(n){this.dom=n,_t(this,n,I),this.tbody=n.querySelector("[data-ln-list-body]")||n,this.isDataDriven=n.hasAttribute("data-ln-list-source"),this._totalSpan=n.querySelector("[data-ln-list-total]"),this._filteredSpan=n.querySelector("[data-ln-list-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==n?this._filteredSpan.parentElement:null),this._selectedSpan=n.querySelector("[data-ln-list-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==n?this._selectedSpan.parentElement:null),this._data=[],this._filteredData=[],this.selectedIds=new Set,this._searchTerm="",this._filters={},this._sortField=null,this._sortDir=null,this._virtual=!1,this._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._resizeHandler=null,this._scrollContainer=null,this.isUl=this.tbody.tagName==="UL"||this.tbody.tagName==="OL";const i=this;return this._onSetSearch=function(l){const c=(l.detail&&l.detail.query!=null?l.detail.query:l.detail&&l.detail.term!=null?l.detail.term:"").trim();i.isDataDriven?(i.currentSearch=c,D(n,"ln-list:search",{list:i.name,query:i.currentSearch}),i._requestData()):(i._searchTerm=c.toLowerCase(),i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list:set-search",this._onSetSearch),this._onSearchChange=function(l){l.preventDefault(),i._onSetSearch(l)},n.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){i.isDataDriven?(i.currentFilters={},i.currentSearch="",D(n,"ln-list:clear-filters",{list:i.name}),i._requestData()):(i._searchTerm="",i._filters={},i._sortField=null,i._sortDir=null,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:"",matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list: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,n.hasAttribute("data-ln-list-window")&&this._enterWindowedMode(),this._onSetData=function(l){const c=l.detail||{},f=c.data||[],p=c.total!=null?c.total:f.length;if(!(i._hasInitialSeed&&!i.isLoaded&&f.length===0&&p===0)){if(i._windowed){i._cache.ingest(c)&&!c.provisional&&n.classList.remove("ln-list--loading");return}i._data=f,i._lastTotal=p,i._lastFiltered=c.filtered!=null?c.filtered:i._data.length,i.totalCount=i._lastTotal,i.visibleCount=i._lastFiltered,i.isLoaded=!0,i._hasInitialSeed=!1,n.classList.remove("ln-list--loading"),i._vStart=-1,i._vEnd=-1,i._applyFilterAndSort(),i._render(),i._updateFooter(),D(n,"ln-list:rendered",{list:i.name,total:i.totalCount,visible:i.visibleCount})}},n.addEventListener("ln-list:set-data",this._onSetData),this._onSetLoading=function(l){const c=l.detail&&l.detail.loading;n.classList.toggle("ln-list--loading",!!c),c&&(i.isLoaded=!1)},n.addEventListener("ln-list:set-loading",this._onSetLoading),this._onPageFailed=function(l){!i._windowed||!i._cache||i._cache.release(l.detail&&l.detail.offset)},n.addEventListener("ln-list:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!i._windowed||!i._cache||i._cache.revalidate()},n.addEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(){!i._windowed||!i._cache||i._requestData()},n.addEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this._onSort=function(l){!l.detail||l.detail.field==null||(l.preventDefault(),i.currentSort=l.detail.direction==="none"?null:{field:l.detail.field,direction:l.detail.direction},i._requestData())},n.addEventListener("ln-sort:change",this._onSort),this._onItemClick=function(l){if(l.target.closest("[data-ln-item-select]")||l.target.closest("[data-ln-item-action]")||l.target.closest("a")||l.target.closest("button")||l.ctrlKey||l.metaKey||l.button===1)return;const c=l.target.closest("[data-ln-item]");if(!c)return;const f=c.getAttribute("data-ln-item-id"),p=c._lnRecord||{};D(n,"ln-list:item-click",{list:i.name,id:f,record:p})},this.tbody&&this.tbody.addEventListener("click",this._onItemClick),this._onItemAction=function(l){const c=l.target.closest("[data-ln-item-action]");if(!c)return;const f=c.closest("[data-ln-item]");if(!f)return;const p=c.getAttribute("data-ln-item-action"),g=f.getAttribute("data-ln-item-id"),S=f._lnRecord||{};D(n,"ln-list:item-action",{list:i.name,id:g,action:p,record:S})},this.tbody&&this.tbody.addEventListener("click",this._onItemAction),this.tbody&&this.tbody.children.length>0&&this._parseChildren(),this._windowed?this._kickWindowInitial():D(n,"ln-list:request-data",{list:this.name,sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})):(this._emptyObserver=null,this.tbody&&this.tbody.children.length>0?this._parseChildren():this.tbody&&(this._emptyObserver=new MutationObserver(function(){i.tbody.children.length>0&&(i._emptyObserver.disconnect(),i._emptyObserver=null,i._parseChildren())}),this._emptyObserver.observe(this.tbody,{childList:!0})),this._onFilterChange=function(l){if(l.preventDefault(),!l.detail)return;const c=l.detail.key,f=l.detail.values||[];if(c){if(f.length===0)delete i._filters[c];else{const p=[];for(let g=0;g<f.length;g++)p.push(f[g].toLowerCase());i._filters[c]=p}i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length})}},n.addEventListener("ln-filter:change",this._onFilterChange),this._onSort=function(l){if(!l.detail||l.detail.field==null)return;l.preventDefault();const c=l.detail.direction==="none"?null:l.detail.direction;i._sortField=c===null?null:l.detail.field,i._sortDir=c,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:sorted",{field:i._sortField,direction:l.detail&&l.detail.direction,matched:i._filteredData.length,total:i._data.length})},n.addEventListener("ln-sort:change",this._onSort)),this}y.prototype._parseChildren=function(){const n=Array.from(this.tbody.children).filter(i=>!i.classList.contains("ln-list__spacer"));this._data=[],n.length>0&&(this._itemHeight=N(n[0])||50);for(let i=0;i<n.length;i++){const l=n[i],c=l.getAttribute("data-ln-item-id")||l.getAttribute("id"),f=l.textContent.trim().toLowerCase();let p=null;if(this.isDataDriven){p={},c!=null&&(p.id=c);const E=l.querySelectorAll("[data-ln-list-field]");for(let m=0;m<E.length;m++){const w=E[m],L=w.getAttribute("data-ln-list-field");L&&(p[L]=nt(w))}}const g={},S=l.querySelectorAll("[data-ln-list-field], [data-ln-field]");for(let E=0;E<S.length;E++){const m=S[E],w=m.getAttribute("data-ln-list-field")||m.getAttribute("data-ln-field");w&&(g[w]=nt(m))}for(let E=0;E<l.attributes.length;E++){const m=l.attributes[E];if(m.name.startsWith("data-")&&!m.name.startsWith("data-ln-")){const w=m.name.slice(5);w&&(g[w]=m.value)}}this._data.push({html:l.outerHTML,id:c,searchText:f,fields:g,...p||{}})}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(),D(this.dom,"ln-list:ready",{total:this._data.length})},y.prototype._applyFilterAndSort=function(){if(this.isDataDriven)this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length;else{const n=this._searchTerm,i=n?n.split(/\s+/).filter(Boolean):[],l=this._filters||{},c=Object.keys(l).length>0;if(i.length===0&&!c?this._filteredData=this._data.slice():this._filteredData=this._data.filter(function(f){if(i.length>0&&!i.every(function(g){return f.searchText&&f.searchText.indexOf(g)!==-1}))return!1;if(c)for(const p in l){const g=l[p];if(g&&g.length>0){const S=f.fields&&f.fields[p]!==void 0?f.fields[p]:f[p]!==void 0?f[p]:null,E=S!=null?String(S).toLowerCase():"";if(g.indexOf(E)===-1)return!1}}return!0}),this._sortField&&this._sortDir){const f=this._sortField,p=this._sortDir==="desc"?-1:1,g=typeof Intl<"u"?new Intl.Collator(lt(this.dom),{sensitivity:"base"}):null,S=this._filteredData.map(function(m){return m.fields&&m.fields[f]!==void 0?m.fields[f]:m[f]}),E=zt(S);this._filteredData.sort(function(m,w){const L=m.fields&&m.fields[f]!==void 0?m.fields[f]:m[f],W=w.fields&&w.fields[f]!==void 0?w.fields[f]:w[f];return $t(L,W,E,g)*p})}}},y.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const n=this._lastTotal,i=this.visibleCount;if(n===0||this._filteredData.length===0||i===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const n=this._filteredData.length;n===0&&(this._searchTerm||Object.keys(this._filters||{}).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):n>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},y.prototype._renderAll=function(){if(this.isDataDriven){const n=this._filteredData,i=document.createDocumentFragment();for(let c=0;c<n.length;c++){const f=this._buildItem(n[c]);f&&i.appendChild(f)}const l=T(this);this.tbody.replaceChildren(i),F(l),this._selectable&&this._updateSelectAll()}else{const n=[],i=this._filteredData;for(let c=0;c<i.length;c++)n.push(i[c].html);const l=T(this);this.tbody.innerHTML=n.join(""),F(l),this._selectable&&this._restoreSelection()}},y.prototype._readGridLayout=function(){const n=getComputedStyle(this.tbody),i=n.gridTemplateColumns;let l=1;if(i&&i!=="none"){const f=i.trim().split(/\s+/).filter(Boolean);f.length>0&&(l=f.length)}const c=parseFloat(n.rowGap);return{columns:l,rowGap:isNaN(c)?0:c}},y.prototype._measureItemHeight=function(){if(this._windowed){const n=this._cache.peek(),i=n?this._buildItem(n):this._buildPlaceholderItem();i&&(this.tbody.textContent="",this.tbody.appendChild(i),this._itemHeight=N(i)||50,this.tbody.textContent="")}else if(this.isDataDriven){if(this._data.length>0){const n=this._buildItem(this._data[0]);n&&(this.tbody.textContent="",this.tbody.appendChild(n),this._itemHeight=N(n)||50,this.tbody.textContent="")}}else{const n=this.tbody.children;n.length>0&&(this._itemHeight=N(n[0])||50)}},y.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const n=this;this._itemHeight||this._measureItemHeight(),this._scrollContainer=H(this.dom);const i=this._scrollContainer||window;this._scrollHandler=function(){n._rafId||(n._rafId=requestAnimationFrame(function(){n._rafId=null,n._windowed?n._renderWindowed():n._renderVirtual()}))},this._resizeHandler=function(){n._itemHeight=0,n._measureItemHeight(),n._vStart=-1,n._vEnd=-1,n._windowed?n._renderWindowed():n._renderVirtual()},i.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._resizeHandler,{passive:!0})},y.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},y.prototype._renderVirtual=function(){const n=this._filteredData,i=n.length,l=this._itemHeight;if(!l||!i)return;const c=this._scrollContainer;let f,p;if(c){const x=this.tbody.getBoundingClientRect(),A=c.getBoundingClientRect(),v=c===this.tbody?0:x.top-A.top+c.scrollTop;f=c.scrollTop-v,p=c.clientHeight}else{const A=this.tbody.getBoundingClientRect().top+window.scrollY;f=window.scrollY-A,p=window.innerHeight}const g=this._readGridLayout(),S=g.columns,E=g.rowGap,m=l+E,w=Math.ceil(i/S);let L=Math.max(0,Math.floor(f/m)-15);L=Math.min(L,w);const W=Math.ceil(p/m)+30,B=Math.min(L+W,w),R=Math.min(L*S,i),O=Math.min(B*S,i);if(R===this._vStart&&O===this._vEnd)return;this._vStart=R,this._vEnd=O;const U=L*m,M=(w-B)*m;if(this.isDataDriven){const x=document.createDocumentFragment();if(U>0){const v=document.createElement(this.isUl?"li":"div");v.className="ln-list__spacer",v.setAttribute("aria-hidden","true"),v.style.height=U+"px",x.appendChild(v)}for(let v=R;v<O;v++){const j=this._buildItem(n[v]);j&&x.appendChild(j)}if(M>0){const v=document.createElement(this.isUl?"li":"div");v.className="ln-list__spacer",v.setAttribute("aria-hidden","true"),v.style.height=M+"px",x.appendChild(v)}const A=T(this);this.tbody.replaceChildren(x),F(A),this._selectable&&this._updateSelectAll()}else{let x="";U>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${U}px"></${this.isUl?"li":"div"}>`);for(let v=R;v<O;v++)x+=n[v].html;M>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${M}px"></${this.isUl?"li":"div"}>`);const A=T(this);this.tbody.innerHTML=x,F(A),this._selectable&&this._restoreSelection()}},y.prototype._buildPlaceholderItem=function(){const n=document.createElement(this.isUl?"li":"div");return n.className="ln-list__placeholder",n.setAttribute("aria-hidden","true"),n.style.height=this._itemHeight+"px",n},y.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const n=this._itemHeight;if(!n)return;const i=this._scrollContainer;let l,c;if(i){const A=this.tbody.getBoundingClientRect(),v=i.getBoundingClientRect(),j=i===this.tbody?0:A.top-v.top+i.scrollTop;l=i.scrollTop-j,c=i.clientHeight}else{const v=this.tbody.getBoundingClientRect().top+window.scrollY;l=window.scrollY-v,c=window.innerHeight}const f=this._readGridLayout(),p=f.columns,g=f.rowGap,S=n+g,E=this._cache.logicalTotal,m=Math.ceil(E/p);let w=Math.max(0,Math.floor(l/S)-15);w=Math.min(w,m);const L=Math.ceil(c/S)+30,W=Math.min(w+L,m),B=Math.min(w*p,E),R=Math.min(W*p,E),O=w*S,U=(m-W)*S,M=document.createDocumentFragment();if(O>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=O+"px",M.appendChild(A)}for(let A=B;A<R;A++)if(this._cache.has(A)){const v=this._buildItem(this._cache.get(A));v&&M.appendChild(v)}else M.appendChild(this._buildPlaceholderItem());if(U>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=U+"px",M.appendChild(A)}const x=T(this);this.tbody.replaceChildren(M),F(x),this._vStart=B,this._vEnd=R,this._cache.ensure(B,R)},y.prototype._showEmptyState=function(){let n=null;if(this.isDataDriven){const i=this._lastTotal!=null?this._lastTotal:this._data.length,c=this.visibleCount===0&&i>0,f=c?this.name+"-empty-filtered":this.name+"-empty";if(n=ot(this.dom,f,"ln-list"),!n){const p=this.dom.querySelector("template[data-ln-empty], template[data-ln-list-empty]");if(p){const g=c?"search":"initial",S=p.content.querySelector(`[data-ln-empty-when="${g}"]`)||p.content.firstElementChild;S&&(n=document.importNode(S,!0))}}}else{const i=this.dom.querySelector(`template[${r}]`);if(i){const l=i.content.firstElementChild;l&&(n=document.importNode(l,!0))}}if(n)if(n.tagName==="LI"||n.tagName==="TR")this.tbody.replaceChildren(n);else{const i=document.createElement(this.isUl?"li":"div");i.appendChild(n),this.tbody.replaceChildren(i)}else this.tbody.replaceChildren();D(this.dom,"ln-list:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},y.prototype._buildItem=function(n){let i=ot(this.dom,this.name+"-row","ln-list");if(!i){const c=this.dom.querySelector("template[data-ln-item]");c&&(i=document.importNode(c.content,!0))}let l=i?i.querySelector("[data-ln-item]")||i.firstElementChild:null;if(l)Q(l,n),K(l,n);else if(n&&n.html){const c=document.createElement(this.isUl?"ul":"div");c.innerHTML=n.html,l=c.firstElementChild}else if(l=document.createElement(this.isUl?"li":"div"),l.setAttribute("data-ln-item",""),n&&typeof n=="object"){for(const c in n)if(c!=="html"&&n[c]!=null){const f=document.createElement("span");f.setAttribute("data-ln-field",c),f.textContent=String(n[c]),l.appendChild(f)}}if(l._lnRecord=n,n&&n.id!=null&&(l.setAttribute("data-ln-item-id",n.id),this._selectable&&this.selectedIds.has(String(n.id)))){l.classList.add("ln-item-selected");const c=l.querySelector("[data-ln-item-select]");c&&(c.checked=!0)}return l},y.prototype._restoreSelection=function(){if(!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-item]");for(let i=0;i<n.length;i++){const l=n[i].getAttribute("data-ln-item-id"),c=l!=null&&this.selectedIds.has(String(l));n[i].classList.toggle("ln-item-selected",c);const f=n[i].querySelector("[data-ln-item-select]");f&&(f.checked=c)}this._updateSelectAll()},y.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const n=this;this._onSelectionChange=function(i){const l=i.target.closest("[data-ln-item-select]");if(!l)return;const c=l.closest("[data-ln-item]");if(!c)return;const f=c.getAttribute("data-ln-item-id");f!=null&&(l.checked?(n.selectedIds.add(String(f)),c.classList.add("ln-item-selected")):(n.selectedIds.delete(String(f)),c.classList.remove("ln-item-selected")),n._updateSelectAll(),n._updateFooter(),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}))},this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector("[data-ln-list-select-all]"),this._selectAllCheckbox&&(this._onSelectAll=function(){const i=n._selectAllCheckbox.checked,l=n.tbody.querySelectorAll("[data-ln-item]");for(let c=0;c<l.length;c++){const f=l[c],p=f.getAttribute("data-ln-item-id"),g=f.querySelector("[data-ln-item-select]");p!=null&&(i?(n.selectedIds.add(String(p)),f.classList.add("ln-item-selected")):(n.selectedIds.delete(String(p)),f.classList.remove("ln-item-selected")),g&&(g.checked=i))}D(n.dom,"ln-list:select-all",{list:n.name,selected:i}),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}),n._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll))},y.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox)return;const n=this.tbody.querySelectorAll("[data-ln-item]");let i=n.length>0;for(let l=0;l<n.length;l++){const c=n[l].getAttribute("data-ln-item-id");if(c!=null&&!this.selectedIds.has(String(c))){i=!1;break}}this._selectAllCheckbox.checked=i},y.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-list--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}vt(this,"ln-list:request-data","list")},y.prototype._enterWindowedMode=function(){const n=this,i=this.dom,l=parseInt(i.getAttribute("data-ln-list-window"),10),c=parseInt(i.getAttribute("data-ln-list-window-page"),10),f=parseInt(i.getAttribute("data-ln-list-window-threshold"),10);this._onCacheChange=function(){!n._windowed||!n._cache||(n.totalCount=n._cache.grandTotal,n.visibleCount=n._cache.logicalTotal,n._lastTotal=n._cache.grandTotal,n.isLoaded=!0,n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),D(i,"ln-list:rendered",{list:n.name,total:n.totalCount,visible:n.visibleCount}))},this._renderBatch=jt(this._onCacheChange),this._cache=Gt({windowSize:l>0?l:1e3,pageSize:c>0?c:200,threshold:f>=0?f:25,fetchDebounce:120,requestPage:function(p,g,S){D(i,"ln-list:request-data",{list:n.name,sort:p.sort,filters:p.filters,search:p.search,offset:g,limit:S,queryGen:n._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},y.prototype._kickWindowInitial=function(){if(this._data.length>0){const n=parseInt(this.dom.getAttribute("data-ln-list-count"),10),i=n>0?n:this._data.length;this._cache.ingest({data:this._data,offset:0,total:i,filtered:i})}else this.dom.classList.add("ln-list--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},y.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._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-list--loading"),this._requestData()},y.prototype._updateFooter=function(){let n=0,i=0;this.isDataDriven?(n=this._lastTotal!=null?this._lastTotal:this._data.length,i=this.visibleCount):(n=this._data.length,i=this._filteredData.length);const l=i<n;if(this._totalSpan&&(this._totalSpan.textContent=q(n,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=l?q(i,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!l),this._selectedSpan){const c=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=c>0?q(c,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",c===0)}},y.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-list:set-search",this._onSetSearch),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-list:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this._cache&&this._cache.destroy(),this.dom.removeEventListener("ln-list:set-data",this._onSetData),this.dom.removeEventListener("ln-list:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-list:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onItemClick),this.tbody.removeEventListener("click",this._onItemAction))):(this._emptyObserver&&(this._emptyObserver.disconnect(),this._emptyObserver=null),this._onFilterChange&&this.dom.removeEventListener("ln-filter:change",this._onFilterChange),this._onSort&&this.dom.removeEventListener("ln-sort:change",this._onSort)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._data=[],this._filteredData=[],delete this.dom[e])},yt(t,e,y,"ln-list",{attributes:k})})()})();
|
|
1
|
+
(function(){"use strict";function nt(){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 G(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 o=null;for(let d=1;d<e.length;d++)if(e[d]&&e[d].nodeType===1){o=e[d];break}if(!G(o))return}t.apply(console,e)}}function D(t,e,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,o),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))}function St(t,e,r){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const o={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};o[r]=t.name,D(t.dom,e,o)}function $(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){$(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function it(t){return t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.tagName==="DATA"&&t.hasAttribute("value")?t.getAttribute("value"):t.textContent.trim()}function At(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function Et(t,e){const r=!!(e&&e.typed),o=e&&e.exclude,d={},u=t.elements,c={};if(r)for(let h=0;h<u.length;h++){const s=u[h];s.name&&s.type==="checkbox"&&!s.disabled&&(c[s.name]=(c[s.name]||0)+1)}for(let h=0;h<u.length;h++){const s=u[h];if(!(!s.name||s.disabled||s.type==="file"||s.type==="submit"||s.type==="button")&&!(o&&s.matches&&s.matches(o)))if(s.type==="checkbox")r&&c[s.name]===1?d[s.name]=s.checked:(d[s.name]||(d[s.name]=[]),s.checked&&d[s.name].push(s.value));else if(s.type==="radio")s.checked&&(d[s.name]=s.value);else if(s.type==="select-multiple"){d[s.name]=[];for(let _=0;_<s.options.length;_++)s.options[_].selected&&d[s.name].push(s.options[_].value)}else if(r&&s.type==="hidden")d[s.name]=s.value;else if(r&&(s.type==="number"||s.type==="range")){const _=Number(s.value);d[s.name]=s.value===""||isNaN(_)?null:_}else d[s.name]=s.value}return d}function Dt(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function kt(t,e){const r=t.elements,o=[],d={};for(let u=0;u<r.length;u++){const c=r[u];c.name&&c.type==="checkbox"&&(d[c.name]=(d[c.name]||0)+1)}for(let u=0;u<r.length;u++){const c=r[u];if(c.type==="file"||c.type==="submit"||c.type==="button")continue;const h=c.getAttribute("data-ln-fill-as")||c.name;if(!h||!(h in e))continue;const s=e[h];if(c.type==="checkbox"){if(Array.isArray(s))c.checked=s.indexOf(c.value)!==-1;else if(d[c.name]>1){const _=String(s).split(",").map(function(w){return w.trim()});c.checked=_.indexOf(c.value)!==-1}else c.checked=Dt(s);o.push(c)}else if(c.type==="radio")c.checked=c.value===String(s),o.push(c);else if(c.type==="select-multiple"){if(Array.isArray(s))for(let _=0;_<c.options.length;_++)c.options[_].selected=s.indexOf(c.options[_].value)!==-1;o.push(c)}else c.value=s,c.tagName==="SELECT"&&s!=null&&c.setAttribute("data-ln-value",s),o.push(c)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=kt,window.lnCore.serializeForm=Et,window.lnCore.resolveFormMethod=At);const lt={};function Lt(t,e){lt[t]=e}function xt(t){return lt[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Lt,window.lnCore.getDataMapper=xt);function rt(t){const e=t?t.closest("[lang]"):null,r=(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 r?r.trim():"en-US"}function It(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,$(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const st={};function Tt(t,e){if(!t||typeof e!="object")return;const r=t.toLowerCase().split("-")[0];st[r]=e}function Ft(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return st[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Tt,window.lnCore.getLocaleFallback=Ft,window.lnCore.ensureLocaleObserver=It);const P={};function ot(t,e){P[t]||(P[t]=document.querySelector('[data-ln-template="'+t+'"]'));const r=P[t];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function at(t,e,r){if(t){const o=t.querySelector('[data-ln-template="'+e+'"]');if(o)return o.content.cloneNode(!0)}return ot(e,r)}function K(t,e){if(!t||!e)return t;const r=t.querySelectorAll("[data-ln-field]");for(let c=0;c<r.length;c++){const h=r[c],s=h.getAttribute("data-ln-field");e[s]!=null&&(h.textContent=e[s])}const o=t.querySelectorAll("[data-ln-attr]");for(let c=0;c<o.length;c++){const h=o[c],s=h.getAttribute("data-ln-attr").split(",");for(let _=0;_<s.length;_++){const w=s[_].trim().split(":");if(w.length!==2)continue;const b=w[0].trim(),k=w[1].trim();e[k]!=null&&h.setAttribute(b,e[k])}}const d=t.querySelectorAll("[data-ln-show]");for(let c=0;c<d.length;c++){const h=d[c],s=h.getAttribute("data-ln-show");s in e&&h.classList.toggle("hidden",!e[s])}const u=t.querySelectorAll("[data-ln-class]");for(let c=0;c<u.length;c++){const h=u[c],s=h.getAttribute("data-ln-class").split(",");for(let _=0;_<s.length;_++){const w=s[_].trim().split(":");if(w.length!==2)continue;const b=w[0].trim(),k=w[1].trim();k in e&&h.classList.toggle(b,!!e[k])}}return t}function qt(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 r=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],e??null),r[o].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)K(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function Q(t,e){if(!t||!e)return t;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,h){return e[h]!==void 0?e[h]:""}))}const o=function(u,c){return e[c]!==void 0?e[c]:""},d=Array.from(t.querySelectorAll("*"));t.nodeType===1&&d.push(t);for(let u=0;u<d.length;u++){const c=d[u],h=c.attributes;for(let s=0;s<h.length;s++){const _=h[s];_.value.indexOf("{{")!==-1&&c.setAttribute(_.name,_.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return t}function Rt(t,e,r,o,d,u){const c={};for(let s=0;s<t.children.length;s++){const _=t.children[s],w=_.getAttribute("data-ln-render-key");w&&(c[w]=_)}const h=document.createDocumentFragment();for(let s=0;s<e.length;s++){const _=e[s],w=String(o(_));let b=c[w];if(b)d(b,_,s);else{const k=ot(r,u);if(!k||(Q(k,_),b=k.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",w),d(b,_,s)}h.appendChild(b)}t.textContent="",t.appendChild(h)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=K,window.lnCore.lnFill=qt,window.lnCore.renderList=Rt);function U(t,e,r){const o=t.getAttribute(e);return o===null?r:o}function ct(t,e,r){const o=parseInt(t.getAttribute(e),10);return isNaN(o)?r:o}function Y(t,e,r=!1){const o=t.getAttribute(e);if(o===null)return!!r;const d=o.trim().toLowerCase();return!(d==="false"||d==="0")}function dt(t,e){return(t.getAttribute(e)||"").split(",").map(r=>r.trim()).filter(Boolean)}const J=new Map;function ut(t,e){const r=(t?t.join("|"):"")+"::"+e;if(J.has(r))return J.get(r);const o=new Set(t||[]),d=function(u,c){const h=u.getAttribute(c);return h!==null&&o.has(h)?h:e};return J.set(r,d),d}function ht(t,e,r){const o=parseFloat(t.getAttribute(e));return isNaN(o)?r:o}function ft(t,e,r){const o=t.getAttribute(e);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function _t(t,e,r,o,d){if(!t||e===null)return!0;const u=o||"ln-component",c=t.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||e===""&&t.fallback!==void 0)return!0;const h=s=>{d?console.warn(s,d):console.warn(s)};if(c==="boolean"){const s=e.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(h(`[${u}] Invalid value "${e}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const s=t.values||[];return s.includes(e)?!0:(h(`[${u}] Invalid value "${e}" for attribute "${r}". Allowed: ${s.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(e))return h(`[${u}] Invalid integer "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1;const s=parseInt(e,10);return t.min!==void 0&&s<t.min?(h(`[${u}] Value ${s} for attribute "${r}" is less than min (${t.min}).`),!1):t.max!==void 0&&s>t.max?(h(`[${u}] Value ${s} for attribute "${r}" is greater than max (${t.max}).`),!1):!0}if(c==="float")return isNaN(Number(e))?(h(`[${u}] Invalid float "${e}" for attribute "${r}". Fallback: ${t.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(e),!0}catch(s){return h(`[${u}] Invalid JSON for attribute "${r}": ${s.message}. Fallback: ${t.fallback}.`),!1}return!0}function pt(t,e,r){for(const o in r){const[d,u,c]=r[o];Object.defineProperty(t,o,{get:function(){return d(e,u,c)},enumerable:!0,configurable:!0})}return t}function gt(t){const e={};for(const r in t){const o=t[r];if(!o||!o.prop)continue;let d=o.read;if(!d&&o.type)switch(o.type){case"enum":d=ut(o.values,o.fallback);break;case"integer":d=ct;break;case"float":d=ht;break;case"boolean":d=Y;break;case"list":d=dt;break;case"json":d=ft;break;case"string":default:d=U;break}d||(d=U),e[o.prop]=[d,r,o.fallback]}return e}function Ot(t){const e={};for(const r in t){const o=t[r];o&&o.effect&&(e[r]=o.effect)}return Object.keys(e).length?e:null}function Mt(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const r in t.effects)e.add(r);if(t.onAttrChange&&t.declared)for(const r of t.declared)e.add(r);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pt,window.lnCore.attrSpec=gt,window.lnCore.attrStr=U,window.lnCore.attrInt=ct,window.lnCore.attrBool=Y,window.lnCore.attrList=dt,window.lnCore.attrEnum=ut,window.lnCore.attrFloat=ht,window.lnCore.attrJson=ft);function V(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(r){console.error("["+e.attribute+"] init failed",t,r)}}}function mt(t,e,r,o){if(t.nodeType!==1)return;const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",c={selector:e,attribute:r,ComponentFn:o};if(t.matches&&t.matches(u)&&V(t,c),t.querySelectorAll){const h=t.querySelectorAll(u);for(let s=0;s<h.length;s++)V(h[s],c)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ht(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Nt(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 wt(){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 Wt(t){const e=wt(),r=t.observed||[];for(let o=0;o<r.length;o++){const d=r[o];e.byAttr.has(d)||e.byAttr.set(d,[]),e.byAttr.get(d).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const o in t.attributes){e.byDeclaredAttr.has(o)||e.byDeclaredAttr.set(o,[]);const d=e.byDeclaredAttr.get(o);d.some(u=>u.componentTag===t.componentTag)||d.push({spec:t.attributes[o],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const o=Mt(t);if(o===null)e.reactiveWildcard.push(t);else for(const d of o)e.byReactive.has(d)||e.byReactive.set(d,[]),e.byReactive.get(d).push(t)}t.persist&&e.persist.push(t)}function bt(t,e,r,o){for(let d=0;d<t.length;d++){const u=t[d];if(!e[u.attribute])continue;const c=u.effects&&u.effects[r];c?c(e,r,o):u.onAttrChange&&(!u.declared||u.declared.has(r))&&u.onAttrChange(e,r,o)}}function zt(t){const e=t.attributeName,r=e.indexOf("data-ln-")===0,o=wt(),d=o.byAttr.get(e),u=nt()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(e);if(!r&&!d&&!u)return;const c=t.target;if(t.oldValue!==c.getAttribute(e)){if(u&&G(c)){const h=o.byDeclaredAttr.get(e),s=c.getAttribute(e);for(let _=0;_<h.length;_++)_t(h[_].spec,s,e,h[_].componentTag,c)}if(window.lnCore._debugSink&&(r||d)&&window.lnCore._debugSink("attr",e,c,{oldValue:t.oldValue,newValue:c.getAttribute(e)}),r){const h=o.byReactive.get(e);h&&bt(h,c,e,t.oldValue),o.reactiveWildcard.length&&bt(o.reactiveWildcard,c,e,t.oldValue)}if(d)for(let h=0;h<d.length;h++){const s=d[h];if(s.handler){s.handler(c,e,t.oldValue);continue}s.onAttributeChange&&c[s.attribute]?s.onAttributeChange(c,e):(mt(c,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(c))}}}function Bt(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++)try{zt(e[r])}catch(o){console.error("[ln-core] mutation handler failed",e[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function X(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Z(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function tt(t,e){if(!document.contains(t))if(e.attribute){const r=t[e.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+e.attribute+"] destroy failed",t,o)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function Ut(t){const e=X();if(!e.length)return;const r=t.target;if(r){const d=r.nodeType===1?r:r.parentElement;if(d&&(d.isContentEditable||d.closest&&d.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=Z();if(t.target&&o.length)for(let d=0;d<o.length;d++){const u=o[d],c=u.query,h=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;h&&u.onSubtreeChange(h,t)}for(let d=0;d<t.addedNodes.length;d++){const u=t.addedNodes[d];if(u.nodeType===1){const c=!!(u.firstElementChild||u.children&&u.children.length);for(let h=0;h<e.length;h++){const s=e[h];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)u.matches&&u.matches(s.query)&&V(u,s);else if(u.matches&&u.matches(s.query)&&V(u,s),u.querySelectorAll){const _=u.querySelectorAll(s.query);for(let w=0;w<_.length;w++)V(_[w],s)}}s.onInit&&s.onInit(u)}}}for(let d=0;d<t.removedNodes.length;d++){const u=t.removedNodes[d];if(u.nodeType===1){const c=!!(u.firstElementChild||u.children&&u.children.length);for(let h=0;h<e.length;h++){const s=e[h],_=s.query;if(_){if(!c)u.matches&&u.matches(_)&&tt(u,s);else if(u.matches&&u.matches(_)&&tt(u,s),u.querySelectorAll){const w=u.querySelectorAll(_);for(let b=0;b<w.length;b++)tt(w[b],s)}}}}}}function yt(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,$(function(){new MutationObserver(function(e){for(let r=0;r<e.length;r++){const o=e[r];if(o.type==="childList")try{Ut(o)}catch(d){console.error("[ln-core] lifecycle handler failed",o.target,d)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Vt(t){X().push(t),t.onSubtreeChange&&t.query&&Z().push(t),yt()}function Ct(t,e,r,o,d={}){const u=d.extraAttributes||[],c=d.onAttributeChange||null,h=d.onSubtreeChange||null,s=d.onInit||null,_=d.onAttrChange||null,w=d.effects||null,b=d.attributes||null,k=b?Ot(b):w,F=b?new Set(Object.keys(b)):null,q=d.persist||null;function N(i){const l=i||document.body;if(mt(l,t,e,r),b&&nt())for(const a in b){const f=b[a],p=Array.from(l.querySelectorAll("["+a+"]"));l.matches&&l.matches("["+a+"]")&&p.push(l);for(let g=0;g<p.length;g++){const y=p[g];G(y)&&_t(f,y.getAttribute(a),a,o,y)}}s&&s(l)}const I=[];if(t.indexOf("[")!==-1){const i=/\[([\w-]+)/g;let l;for(;(l=i.exec(t))!==null;)I.push(l[1])}else I.push(t);Wt({selector:t,attribute:e,componentTag:o,attributes:b,ComponentFn:r,onInit:s,observed:I.concat(u),onAttributeChange:c,onAttrChange:_,effects:k,declared:F,persist:q}),Bt();const T=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,O=d.subtreeQuery||(T?t:"["+t+"]"),v={selector:t,attribute:e,ComponentFn:r,onInit:s,onSubtreeChange:h,query:O};X().push(v),h&&O&&Z().push(v),yt(),window[e]=N,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Ct,window.lnCore.observeLifecycle=Vt);function n(){Ht()>0?Nt(function(){N(document.body)}):N(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n):n(),N}function $t(t){let e=!1;for(let r=0;r<t.length;r++){const o=t[r];if(!(o===""||o==null)&&(e=!0,!Number.isFinite(Number(o))))return"string"}return e?"number":"string"}function jt(t,e,r,o){if(r==="number"){const c=parseFloat(t),h=parseFloat(e);return(isNaN(c)?0:c)-(isNaN(h)?0:h)}const d=t!=null?String(t):"",u=e!=null?String(e):"";return o?o.compare(d,u):d<u?-1:d>u?1:0}function Gt(t,e){let r=!1;return function(){r||(r=!0,queueMicrotask(function(){r=!1,t()}))}}function Pt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,r=t.pageSize>0?t.pageSize:200,o=t.threshold!=null?t.threshold:25,d=t.fetchDebounce!=null?t.fetchDebounce:120;const u=typeof t.requestPage=="function"?t.requestPage:function(){},c=typeof t.onChange=="function"?t.onChange:function(){},h=new Map,s=new Map,_=new Set;let w=0,b=0,k=0,F={sort:null,filters:{},search:""},q=null,N=0,I=0,T=!1;function O(l){s.set(l,++N)}function v(){return!!(F&&(F.search||F.filters&&Object.keys(F.filters).length))}function n(){if(h.size<=e)return;const l=Array.from(h.keys()).sort(function(f,p){return(s.get(f)||0)-(s.get(p)||0)});let a=0;for(;h.size>e&&a<l.length;)h.delete(l[a]),s.delete(l[a]),a++}function i(l,a){_.add(l),u(F,l,a)}return{get:function(l){return h.get(l)},has:function(l){return h.has(l)},peek:function(){return h.size?h.values().next().value:void 0},get logicalTotal(){return w},get grandTotal(){return b},get queryGen(){return k},get size(){return h.size},ensure:function(l,a){clearTimeout(q),I=l;for(let m=l;m<a;m++)h.has(m)&&O(m);if(w<=0)return;const f=Math.max(0,l-o),p=Math.min(w,a+o),g=Math.floor(f/r),y=Math.floor(Math.max(0,p-1)/r);let E=-1;for(let m=g;m<=y;m++){const C=m*r,L=Math.min(r,w-C);let W=!1;const z=Math.max(C,f),M=Math.min(C+L,p);for(let R=z;R<M;R++)if(!h.has(R)){W=!0;break}if(W&&!_.has(C)){E=C;break}}E!==-1&&(q=setTimeout(function(){i(E,r)},d))},ingest:function(l){if(l=l||{},l.queryGen!=null&&l.queryGen!==k)return!1;const a=l.offset||0,f=l.data||[];let p=0;for(let g=0;g<f.length;g++)f[g]!=null&&p++;if(p===0&&(l.provisional||l.filtered>0))return _.delete(a),!1;T&&(h.clear(),s.clear(),T=!1),l.provisional||(b=l.total!=null?l.total:b,w=l.filtered!=null?l.filtered:l.data?l.data.length:w);for(let g=0;g<f.length;g++)f[g]!=null&&(h.set(a+g,f[g]),O(a+g));return _.delete(a),n(),c(),!0},requestInitial:function(l){l&&(F=l),i(0,r)},invalidate:function(l){k++,_.clear(),clearTimeout(q),l&&(F=l),T=!0,i(0,r)},revalidate:function(){k++,_.clear(),clearTimeout(q),T=!0;const l=Math.max(0,Math.floor(I/r)*r);i(l,r)},release:function(l){_.delete(l)},destroy:function(){clearTimeout(q),h.clear(),s.clear(),_.clear()},configure:function(l){l=l||{};let a=!1;if(l.windowSize!=null&&l.windowSize>0&&l.windowSize!==e){const f=l.windowSize<e;e=l.windowSize,f&&n(),a=!0}l.pageSize!=null&&l.pageSize>0&&(r=l.pageSize),l.threshold!=null&&l.threshold>=0&&(o=l.threshold),l.fetchDebounce!=null&&l.fetchDebounce>=0&&(d=l.fetchDebounce),a&&c()},setGrandTotal:function(l){l==null||isNaN(l)||l<0||(b=l,v()||(w=l),c())}}}function vt(t){return(t||"").replace(/^#/,"")}function et(t){const e=t===void 0?location.hash:t,r={},o=vt(e);if(!o)return r;const d=o.split("&");for(let u=0;u<d.length;u++){const c=d[u];if(!c)continue;const h=c.indexOf(":"),s=h>-1?c.slice(0,h):c,_=h>-1?c.slice(h+1):"";if(s)try{r[s]=decodeURIComponent(_)}catch{r[s]=_}}return r}function Kt(t){if(!t)return null;const e=et();return t in e?e[t]:null}function Qt(t,e){if(!t)return;const r=et();e==null?delete r[t]:r[t]=String(e);const d=Object.keys(r).map(function(u){const c=r[u];return c===""?u:u+":"+encodeURIComponent(c)}).join("&");vt(location.hash)!==d&&(location.hash=d)}function Yt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function Jt(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const r=t.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const o=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return o?e?o+"-"+e:o:e||null}function Xt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Zt(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 te(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function ee(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const r=t.slice(0,e),o=t.slice(e+1),d=o?o.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:d}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=et,window.lnCore.hashGet=Kt,window.lnCore.hashSet=Qt,window.lnCore.hashLinkClick=Yt,window.lnCore.resolveHashNamespace=Jt,window.lnCore.hashSortEncode=Xt,window.lnCore.hashSortDecode=Zt,window.lnCore.hashFilterEncode=te,window.lnCore.hashFilterDecode=ee);function ne(){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=ne),(function(){const t="data-ln-list",e="lnList",r="data-ln-list-empty";if(window[e]!==void 0)return;function s(n,i){if(!n||!n.isDataDriven)return;const l=n.dom.hasAttribute("data-ln-list-window");if(l&&!n._windowed)n._enterWindowedMode(),n._kickWindowInitial();else if(!l&&n._windowed)n._exitWindowedMode();else if(l&&n._windowed){const a=parseInt(i,10);a>0&&n._cache.configure({windowSize:a})}}function _(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>0&&n._cache.configure({pageSize:l})}function w(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.configure({threshold:l})}function b(n,i){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const l=parseInt(i,10);l>=0&&n._cache.setGrandTotal(l)}const k={"data-ln-list":{prop:"name",type:"string",read:U,fallback:"",description:"List instance name or identifier"},"data-ln-list-source":{prop:"source",type:"string",read:U,fallback:"",description:"Source store or coordinator addressing"},"data-ln-list-selectable":{prop:"_selectable",type:"boolean",read:Y,description:"Enables item selection controls"},"data-ln-list-window":{type:"integer",fallback:1e3,min:10,effect:s,description:"Virtual scrolling window size in items"},"data-ln-list-window-page":{type:"integer",fallback:200,min:5,effect:_,description:"Virtual scrolling slice page size"},"data-ln-list-window-threshold":{type:"integer",fallback:50,min:0,effect:w,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-list-count":{type:"integer",min:0,effect:b,description:"Total item count override for virtual scrollbar calculation"},"data-ln-list-empty":{type:"marker",description:"Container for list empty state"},"data-ln-list-field":{type:"string",description:"Field name mapping for list item binding"}},F=gt(k);function q(n,i){if(n==null||isNaN(n))return"";try{return new Intl.NumberFormat(rt(i)).format(n)}catch{return String(n)}}function N(n){let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const a=getComputedStyle(i).overflowY;if(a==="auto"||a==="scroll")return i;i=i.parentElement}return null}function I(n){const i=n._scrollContainer||N(n.dom);return{container:i,top:i?i.scrollTop:window.scrollY}}function T(n){n.container?n.container.scrollTop=n.top:window.scrollTo(window.scrollX,n.top)}function O(n){if(!n)return 0;const i=getComputedStyle(n),l=parseFloat(i.marginTop)||0,a=parseFloat(i.marginBottom)||0;return n.offsetHeight+l+a}function v(n){this.dom=n,pt(this,n,F),this.tbody=n.querySelector("[data-ln-list-body]")||n,this.isDataDriven=n.hasAttribute("data-ln-list-source"),this._totalSpan=n.querySelector("[data-ln-list-total]"),this._filteredSpan=n.querySelector("[data-ln-list-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==n?this._filteredSpan.parentElement:null),this._selectedSpan=n.querySelector("[data-ln-list-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==n?this._selectedSpan.parentElement:null),this._data=[],this._filteredData=[],this.selectedIds=new Set,this._searchTerm="",this._filters={},this._sortField=null,this._sortDir=null,this._virtual=!1,this._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._resizeHandler=null,this._scrollContainer=null,this.isUl=this.tbody.tagName==="UL"||this.tbody.tagName==="OL";const i=this;return this._onSetSearch=function(l){const a=(l.detail&&l.detail.query!=null?l.detail.query:l.detail&&l.detail.term!=null?l.detail.term:"").trim();i.isDataDriven?(i.currentSearch=a,D(n,"ln-list:search",{list:i.name,query:i.currentSearch}),i._requestData()):(i._searchTerm=a.toLowerCase(),i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list:set-search",this._onSetSearch),this._onSearchChange=function(l){l.preventDefault(),i._onSetSearch(l)},n.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){i.isDataDriven?(i.currentFilters={},i.currentSearch="",D(n,"ln-list:clear-filters",{list:i.name}),i._requestData()):(i._searchTerm="",i._filters={},i._sortField=null,i._sortDir=null,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:"",matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-list: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,n.hasAttribute("data-ln-list-window")&&this._enterWindowedMode(),this._onSetData=function(l){const a=l.detail||{},f=a.data||[],p=a.total!=null?a.total:f.length;if(!(i._hasInitialSeed&&!i.isLoaded&&f.length===0&&p===0)){if(i._windowed){i._cache.ingest(a)&&!a.provisional&&n.classList.remove("ln-list--loading");return}i._data=f,i._lastTotal=p,i._lastFiltered=a.filtered!=null?a.filtered:i._data.length,i.totalCount=i._lastTotal,i.visibleCount=i._lastFiltered,i.isLoaded=!0,i._hasInitialSeed=!1,n.classList.remove("ln-list--loading"),i._vStart=-1,i._vEnd=-1,i._applyFilterAndSort(),i._render(),i._updateFooter(),D(n,"ln-list:rendered",{list:i.name,total:i.totalCount,visible:i.visibleCount})}},n.addEventListener("ln-list:set-data",this._onSetData),this._onSetLoading=function(l){const a=l.detail&&l.detail.loading;n.classList.toggle("ln-list--loading",!!a),a&&(i.isLoaded=!1)},n.addEventListener("ln-list:set-loading",this._onSetLoading),this._onPageFailed=function(l){!i._windowed||!i._cache||i._cache.release(l.detail&&l.detail.offset)},n.addEventListener("ln-list:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!i._windowed||!i._cache||i._cache.revalidate()},n.addEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(){!i._windowed||!i._cache||i._requestData()},n.addEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this._onSort=function(l){!l.detail||l.detail.field==null||(l.preventDefault(),i.currentSort=l.detail.direction==="none"?null:{field:l.detail.field,direction:l.detail.direction},i._requestData())},n.addEventListener("ln-sort:change",this._onSort),this._onItemClick=function(l){if(l.target.closest("[data-ln-item-select]")||l.target.closest("[data-ln-item-action]")||l.target.closest("a")||l.target.closest("button")||l.ctrlKey||l.metaKey||l.button===1)return;const a=l.target.closest("[data-ln-item]");if(!a)return;const f=a.getAttribute("data-ln-item-id"),p=a._lnRecord||{};D(n,"ln-list:item-click",{list:i.name,id:f,record:p})},this.tbody&&this.tbody.addEventListener("click",this._onItemClick),this._onItemAction=function(l){const a=l.target.closest("[data-ln-item-action]");if(!a)return;const f=a.closest("[data-ln-item]");if(!f)return;const p=a.getAttribute("data-ln-item-action"),g=f.getAttribute("data-ln-item-id"),y=f._lnRecord||{};D(n,"ln-list:item-action",{list:i.name,id:g,action:p,record:y})},this.tbody&&this.tbody.addEventListener("click",this._onItemAction),this.tbody&&this.tbody.children.length>0&&this._parseChildren(),this._windowed?this._kickWindowInitial():D(n,"ln-list:request-data",{list:this.name,sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})):(this._emptyObserver=null,this.tbody&&this.tbody.children.length>0?this._parseChildren():this.tbody&&(this._emptyObserver=new MutationObserver(function(){i.tbody.children.length>0&&(i._emptyObserver.disconnect(),i._emptyObserver=null,i._parseChildren())}),this._emptyObserver.observe(this.tbody,{childList:!0})),this._onFilterChange=function(l){if(l.preventDefault(),!l.detail)return;const a=l.detail.key,f=l.detail.values||[];if(a){if(f.length===0)delete i._filters[a];else{const p=[];for(let g=0;g<f.length;g++)p.push(f[g].toLowerCase());i._filters[a]=p}i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length})}},n.addEventListener("ln-filter:change",this._onFilterChange),this._onSort=function(l){if(!l.detail||l.detail.field==null)return;l.preventDefault();const a=l.detail.direction==="none"?null:l.detail.direction;i._sortField=a===null?null:l.detail.field,i._sortDir=a,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-list:sorted",{field:i._sortField,direction:l.detail&&l.detail.direction,matched:i._filteredData.length,total:i._data.length})},n.addEventListener("ln-sort:change",this._onSort)),this}v.prototype._parseChildren=function(){const n=Array.from(this.tbody.children).filter(i=>!i.classList.contains("ln-list__spacer"));this._data=[],n.length>0&&(this._itemHeight=O(n[0])||50);for(let i=0;i<n.length;i++){const l=n[i],a=l.getAttribute("data-ln-item-id")||l.getAttribute("id"),f=l.textContent.trim().toLowerCase();let p=null;if(this.isDataDriven){p={},a!=null&&(p.id=a);const E=l.querySelectorAll("[data-ln-list-field]");for(let m=0;m<E.length;m++){const C=E[m],L=C.getAttribute("data-ln-list-field");L&&(p[L]=it(C))}}const g={},y=l.querySelectorAll("[data-ln-list-field], [data-ln-field]");for(let E=0;E<y.length;E++){const m=y[E],C=m.getAttribute("data-ln-list-field")||m.getAttribute("data-ln-field");C&&(g[C]=it(m))}for(let E=0;E<l.attributes.length;E++){const m=l.attributes[E];if(m.name.startsWith("data-")&&!m.name.startsWith("data-ln-")){const C=m.name.slice(5);C&&(g[C]=m.value)}}this._data.push({html:l.outerHTML,id:a,searchText:f,fields:g,...p||{}})}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(),D(this.dom,"ln-list:ready",{total:this._data.length})},v.prototype._applyFilterAndSort=function(){if(this.isDataDriven)this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length;else{const n=this._searchTerm,i=n?n.split(/\s+/).filter(Boolean):[],l=this._filters||{},a=Object.keys(l).length>0;if(i.length===0&&!a?this._filteredData=this._data.slice():this._filteredData=this._data.filter(function(f){if(i.length>0&&!i.every(function(g){return f.searchText&&f.searchText.indexOf(g)!==-1}))return!1;if(a)for(const p in l){const g=l[p];if(g&&g.length>0){const y=f.fields&&f.fields[p]!==void 0?f.fields[p]:f[p]!==void 0?f[p]:null,E=y!=null?String(y).toLowerCase():"";if(g.indexOf(E)===-1)return!1}}return!0}),this._sortField&&this._sortDir){const f=this._sortField,p=this._sortDir==="desc"?-1:1,g=typeof Intl<"u"?new Intl.Collator(rt(this.dom),{sensitivity:"base"}):null,y=this._filteredData.map(function(m){return m.fields&&m.fields[f]!==void 0?m.fields[f]:m[f]}),E=$t(y);this._filteredData.sort(function(m,C){const L=m.fields&&m.fields[f]!==void 0?m.fields[f]:m[f],W=C.fields&&C.fields[f]!==void 0?C.fields[f]:C[f];return jt(L,W,E,g)*p})}}},v.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const n=this._lastTotal,i=this.visibleCount;if(n===0||this._filteredData.length===0||i===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const n=this._filteredData.length;n===0&&(this._searchTerm||Object.keys(this._filters||{}).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):n>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},v.prototype._renderAll=function(){if(this.isDataDriven){const n=this._filteredData,i=document.createDocumentFragment();for(let a=0;a<n.length;a++){const f=this._buildItem(n[a]);f&&i.appendChild(f)}const l=I(this);this.tbody.replaceChildren(i),T(l),this._selectable&&this._updateSelectAll()}else{const n=[],i=this._filteredData;for(let a=0;a<i.length;a++)n.push(i[a].html);const l=I(this);this.tbody.innerHTML=n.join(""),T(l),this._selectable&&this._restoreSelection()}},v.prototype._readGridLayout=function(){const n=getComputedStyle(this.tbody),i=n.gridTemplateColumns;let l=1;if(i&&i!=="none"){const f=i.trim().split(/\s+/).filter(Boolean);f.length>0&&(l=f.length)}const a=parseFloat(n.rowGap);return{columns:l,rowGap:isNaN(a)?0:a}},v.prototype._measureItemHeight=function(){if(this._windowed){const n=this._cache.peek(),i=n?this._buildItem(n):this._buildPlaceholderItem();i&&(this.tbody.textContent="",this.tbody.appendChild(i),this._itemHeight=O(i)||50,this.tbody.textContent="")}else if(this.isDataDriven){if(this._data.length>0){const n=this._buildItem(this._data[0]);n&&(this.tbody.textContent="",this.tbody.appendChild(n),this._itemHeight=O(n)||50,this.tbody.textContent="")}}else{const n=this.tbody.children;n.length>0&&(this._itemHeight=O(n[0])||50)}},v.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const n=this;this._itemHeight||this._measureItemHeight(),this._scrollContainer=N(this.dom);const i=this._scrollContainer||window;this._scrollHandler=function(){n._rafId||(n._rafId=requestAnimationFrame(function(){n._rafId=null,n._windowed?n._renderWindowed():n._renderVirtual()}))},this._resizeRafId=null,this._resizeHandler=function(){n._resizeRafId||(n._resizeRafId=requestAnimationFrame(function(){n._resizeRafId=null,n._itemHeight=0,n._measureItemHeight(),n._vStart=-1,n._vEnd=-1,n._windowed?n._renderWindowed():n._renderVirtual()}))},i.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._resizeHandler,{passive:!0})},v.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._resizeRafId&&(cancelAnimationFrame(this._resizeRafId),this._resizeRafId=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},v.prototype._renderVirtual=function(){const n=this._filteredData,i=n.length,l=this._itemHeight;if(!l||!i)return;const a=this._scrollContainer;let f,p;if(a){const x=this.tbody.getBoundingClientRect(),A=a.getBoundingClientRect(),S=a===this.tbody?0:x.top-A.top+a.scrollTop;f=a.scrollTop-S,p=a.clientHeight}else{const A=this.tbody.getBoundingClientRect().top+window.scrollY;f=window.scrollY-A,p=window.innerHeight}const g=this._readGridLayout(),y=g.columns,E=g.rowGap,m=l+E,C=Math.ceil(i/y);let L=Math.max(0,Math.floor(f/m)-15);L=Math.min(L,C);const W=Math.ceil(p/m)+30,z=Math.min(L+W,C),M=Math.min(L*y,i),R=Math.min(z*y,i);if(M===this._vStart&&R===this._vEnd)return;this._vStart=M,this._vEnd=R;const B=L*m,H=(C-z)*m;if(this.isDataDriven){const x=document.createDocumentFragment();if(B>0){const S=document.createElement(this.isUl?"li":"div");S.className="ln-list__spacer",S.setAttribute("aria-hidden","true"),S.style.height=B+"px",x.appendChild(S)}for(let S=M;S<R;S++){const j=this._buildItem(n[S]);j&&x.appendChild(j)}if(H>0){const S=document.createElement(this.isUl?"li":"div");S.className="ln-list__spacer",S.setAttribute("aria-hidden","true"),S.style.height=H+"px",x.appendChild(S)}const A=I(this);this.tbody.replaceChildren(x),T(A),this._selectable&&this._updateSelectAll()}else{let x="";B>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${B}px"></${this.isUl?"li":"div"}>`);for(let S=M;S<R;S++)x+=n[S].html;H>0&&(x+=`<${this.isUl?"li":"div"} class="ln-list__spacer" aria-hidden="true" style="height:${H}px"></${this.isUl?"li":"div"}>`);const A=I(this);this.tbody.innerHTML=x,T(A),this._selectable&&this._restoreSelection()}},v.prototype._buildPlaceholderItem=function(){const n=document.createElement(this.isUl?"li":"div");return n.className="ln-list__placeholder",n.setAttribute("aria-hidden","true"),n.style.height=this._itemHeight+"px",n},v.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const n=this._itemHeight;if(!n)return;const i=this._scrollContainer;let l,a;if(i){const A=this.tbody.getBoundingClientRect(),S=i.getBoundingClientRect(),j=i===this.tbody?0:A.top-S.top+i.scrollTop;l=i.scrollTop-j,a=i.clientHeight}else{const S=this.tbody.getBoundingClientRect().top+window.scrollY;l=window.scrollY-S,a=window.innerHeight}const f=this._readGridLayout(),p=f.columns,g=f.rowGap,y=n+g,E=this._cache.logicalTotal,m=Math.ceil(E/p);let C=Math.max(0,Math.floor(l/y)-15);C=Math.min(C,m);const L=Math.ceil(a/y)+30,W=Math.min(C+L,m),z=Math.min(C*p,E),M=Math.min(W*p,E),R=C*y,B=(m-W)*y,H=document.createDocumentFragment();if(R>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=R+"px",H.appendChild(A)}for(let A=z;A<M;A++)if(this._cache.has(A)){const S=this._buildItem(this._cache.get(A));S&&H.appendChild(S)}else H.appendChild(this._buildPlaceholderItem());if(B>0){const A=document.createElement(this.isUl?"li":"div");A.className="ln-list__spacer",A.setAttribute("aria-hidden","true"),A.style.height=B+"px",H.appendChild(A)}const x=I(this);this.tbody.replaceChildren(H),T(x),this._vStart=z,this._vEnd=M,this._cache.ensure(z,M)},v.prototype._showEmptyState=function(){let n=null;if(this.isDataDriven){const i=this._lastTotal!=null?this._lastTotal:this._data.length,a=this.visibleCount===0&&i>0,f=a?this.name+"-empty-filtered":this.name+"-empty";if(n=at(this.dom,f,"ln-list"),!n){const p=this.dom.querySelector("template[data-ln-empty], template[data-ln-list-empty]");if(p){const g=a?"search":"initial",y=p.content.querySelector(`[data-ln-empty-when="${g}"]`)||p.content.firstElementChild;y&&(n=document.importNode(y,!0))}}}else{const i=this.dom.querySelector(`template[${r}]`);if(i){const l=i.content.firstElementChild;l&&(n=document.importNode(l,!0))}}if(n)if(n.tagName==="LI"||n.tagName==="TR")this.tbody.replaceChildren(n);else{const i=document.createElement(this.isUl?"li":"div");i.appendChild(n),this.tbody.replaceChildren(i)}else this.tbody.replaceChildren();D(this.dom,"ln-list:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},v.prototype._buildItem=function(n){let i=at(this.dom,this.name+"-row","ln-list");if(!i){const a=this.dom.querySelector("template[data-ln-item]");a&&(i=document.importNode(a.content,!0))}let l=i?i.querySelector("[data-ln-item]")||i.firstElementChild:null;if(l)Q(l,n),K(l,n);else if(n&&n.html){const a=document.createElement(this.isUl?"ul":"div");a.innerHTML=n.html,l=a.firstElementChild}else if(l=document.createElement(this.isUl?"li":"div"),l.setAttribute("data-ln-item",""),n&&typeof n=="object"){for(const a in n)if(a!=="html"&&n[a]!=null){const f=document.createElement("span");f.setAttribute("data-ln-field",a),f.textContent=String(n[a]),l.appendChild(f)}}if(l._lnRecord=n,n&&n.id!=null&&(l.setAttribute("data-ln-item-id",n.id),this._selectable&&this.selectedIds.has(String(n.id)))){l.classList.add("ln-item-selected");const a=l.querySelector("[data-ln-item-select]");a&&(a.checked=!0)}return l},v.prototype._restoreSelection=function(){if(!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-item]");for(let i=0;i<n.length;i++){const l=n[i].getAttribute("data-ln-item-id"),a=l!=null&&this.selectedIds.has(String(l));n[i].classList.toggle("ln-item-selected",a);const f=n[i].querySelector("[data-ln-item-select]");f&&(f.checked=a)}this._updateSelectAll()},v.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const n=this;this._onSelectionChange=function(i){const l=i.target.closest("[data-ln-item-select]");if(!l)return;const a=l.closest("[data-ln-item]");if(!a)return;const f=a.getAttribute("data-ln-item-id");f!=null&&(l.checked?(n.selectedIds.add(String(f)),a.classList.add("ln-item-selected")):(n.selectedIds.delete(String(f)),a.classList.remove("ln-item-selected")),n._updateSelectAll(),n._updateFooter(),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}))},this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector("[data-ln-list-select-all]"),this._selectAllCheckbox&&(this._onSelectAll=function(){const i=n._selectAllCheckbox.checked,l=n.tbody.querySelectorAll("[data-ln-item]");for(let a=0;a<l.length;a++){const f=l[a],p=f.getAttribute("data-ln-item-id"),g=f.querySelector("[data-ln-item-select]");p!=null&&(i?(n.selectedIds.add(String(p)),f.classList.add("ln-item-selected")):(n.selectedIds.delete(String(p)),f.classList.remove("ln-item-selected")),g&&(g.checked=i))}D(n.dom,"ln-list:select-all",{list:n.name,selected:i}),D(n.dom,"ln-list:select",{list:n.name,selectedIds:n.selectedIds,count:n.selectedIds.size}),n._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll))},v.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox)return;const n=this.tbody.querySelectorAll("[data-ln-item]");let i=n.length>0;for(let l=0;l<n.length;l++){const a=n[l].getAttribute("data-ln-item-id");if(a!=null&&!this.selectedIds.has(String(a))){i=!1;break}}this._selectAllCheckbox.checked=i},v.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-list--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}St(this,"ln-list:request-data","list")},v.prototype._enterWindowedMode=function(){const n=this,i=this.dom,l=parseInt(i.getAttribute("data-ln-list-window"),10),a=parseInt(i.getAttribute("data-ln-list-window-page"),10),f=parseInt(i.getAttribute("data-ln-list-window-threshold"),10);this._onCacheChange=function(){!n._windowed||!n._cache||(n.totalCount=n._cache.grandTotal,n.visibleCount=n._cache.logicalTotal,n._lastTotal=n._cache.grandTotal,n.isLoaded=!0,n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),D(i,"ln-list:rendered",{list:n.name,total:n.totalCount,visible:n.visibleCount}))},this._renderBatch=Gt(this._onCacheChange),this._cache=Pt({windowSize:l>0?l:1e3,pageSize:a>0?a:200,threshold:f>=0?f:25,fetchDebounce:120,requestPage:function(p,g,y){D(i,"ln-list:request-data",{list:n.name,sort:p.sort,filters:p.filters,search:p.search,offset:g,limit:y,queryGen:n._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},v.prototype._kickWindowInitial=function(){if(this._data.length>0){const n=parseInt(this.dom.getAttribute("data-ln-list-count"),10),i=n>0?n:this._data.length;this._cache.ingest({data:this._data,offset:0,total:i,filtered:i})}else this.dom.classList.add("ln-list--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},v.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._itemHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-list--loading"),this._requestData()},v.prototype._updateFooter=function(){let n=0,i=0;this.isDataDriven?(n=this._lastTotal!=null?this._lastTotal:this._data.length,i=this.visibleCount):(n=this._data.length,i=this._filteredData.length);const l=i<n;if(this._totalSpan&&(this._totalSpan.textContent=q(n,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=l?q(i,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!l),this._selectedSpan){const a=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=a>0?q(a,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",a===0)}},v.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-list:set-search",this._onSetSearch),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-list:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this._cache&&this._cache.destroy(),this.dom.removeEventListener("ln-list:set-data",this._onSetData),this.dom.removeEventListener("ln-list:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-list:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-list:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-list:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onItemClick),this.tbody.removeEventListener("click",this._onItemAction))):(this._emptyObserver&&(this._emptyObserver.disconnect(),this._emptyObserver=null),this._onFilterChange&&this.dom.removeEventListener("ln-filter:change",this._onFilterChange),this._onSort&&this.dom.removeEventListener("ln-sort:change",this._onSort)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._data=[],this._filteredData=[],delete this.dom[e])},Ct(t,e,v,"ln-list",{attributes:k})})()})();
|
|
@@ -707,12 +707,17 @@ import { cloneTemplateScoped, dispatch, requestData, fill, fillTemplate, registe
|
|
|
707
707
|
}
|
|
708
708
|
};
|
|
709
709
|
|
|
710
|
+
this._resizeRafId = null;
|
|
710
711
|
this._resizeHandler = function () {
|
|
711
|
-
self.
|
|
712
|
-
self.
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
712
|
+
if (self._resizeRafId) return;
|
|
713
|
+
self._resizeRafId = requestAnimationFrame(function () {
|
|
714
|
+
self._resizeRafId = null;
|
|
715
|
+
self._itemHeight = 0;
|
|
716
|
+
self._measureItemHeight();
|
|
717
|
+
self._vStart = -1;
|
|
718
|
+
self._vEnd = -1;
|
|
719
|
+
self._windowed ? self._renderWindowed() : self._renderVirtual();
|
|
720
|
+
});
|
|
716
721
|
};
|
|
717
722
|
|
|
718
723
|
container.addEventListener('scroll', this._scrollHandler, { passive: true });
|
|
@@ -732,6 +737,10 @@ import { cloneTemplateScoped, dispatch, requestData, fill, fillTemplate, registe
|
|
|
732
737
|
window.removeEventListener('resize', this._resizeHandler);
|
|
733
738
|
this._resizeHandler = null;
|
|
734
739
|
}
|
|
740
|
+
if (this._resizeRafId) {
|
|
741
|
+
cancelAnimationFrame(this._resizeRafId);
|
|
742
|
+
this._resizeRafId = null;
|
|
743
|
+
}
|
|
735
744
|
this._scrollContainer = null;
|
|
736
745
|
|
|
737
746
|
if (this._rafId) {
|