@livenetworks/ashlar 2.1.1 → 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 +24 -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-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 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 D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){o=t[r];break}if(!D(o))return}e.apply(console,t)}}function ae(e,t,i){const o=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ce(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ue(e,t){const i=!!(t&&t.typed),o=t&&t.exclude,r={},s=e.elements,l={};if(i)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")i&&l[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&r[n.name].push(n.options[u].value)}else if(i&&n.type==="hidden")r[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const u=Number(n.value);r[n.name]=n.value===""||isNaN(u)?null:u}else r[n.name]=n.value}return r}function fe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const i=e.elements,o=[],r={};for(let s=0;s<i.length;s++){const l=i[s];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let s=0;s<i.length;s++){const l=i[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const n=t[a];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(r[l.name]>1){const u=String(n).split(",").map(function(w){return w.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=fe(n);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<l.options.length;u++)l.options[u].selected=n.indexOf(l.options[u].value)!==-1;o.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=ue,window.lnCore.resolveFormMethod=ce);const H={};function we(e,t){H[e]=t}function he(e){return H[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=he);function be(e){const t=e?e.closest("[lang]"):null,i=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return i?i.trim():"en-US"}function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){ae(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Q={};function me(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];Q[i]=t}function E(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Q[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=me,window.lnCore.getLocaleFallback=E,window.lnCore.ensureLocaleObserver=J);const M={};function ge(e,t){M[e]||(M[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=M[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let l=0;l<i.length;l++){const a=i[l],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const a=o[l],n=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const w=n[u].trim().split(":");if(w.length!==2)continue;const h=w[0].trim(),m=w[1].trim();t[m]!=null&&a.setAttribute(h,t[m])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const a=r[l],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],n=a.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const w=n[u].trim().split(":");if(w.length!==2)continue;const h=w[0].trim(),m=w[1].trim();m in t&&a.classList.toggle(h,!!t[m])}}return e}function pe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<i.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[o],t??null),i[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)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function K(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const s=i.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const l=r[s],a=l.attributes;for(let n=0;n<a.length;n++){const u=a[n];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ye(e,t,i,o,r,s){const l={};for(let n=0;n<e.children.length;n++){const u=e.children[n],w=u.getAttribute("data-ln-render-key");w&&(l[w]=u)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],w=String(o(u));let h=l[w];if(h)r(h,u,n);else{const m=ge(i,s);if(!m||(K(m,u),h=m.firstElementChild,!h))continue;h.setAttribute("data-ln-render-key",w),r(h,u,n)}a.appendChild(h)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=K,window.lnCore.fill=z,window.lnCore.lnFill=pe,window.lnCore.renderList=ye);function F(e,t,i){const o=e.getAttribute(t);return o===null?i:o}function P(e,t,i){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?i:o}function Y(e,t,i=!1){const o=e.getAttribute(t);if(o===null)return!!i;const r=o.trim().toLowerCase();return!(r==="false"||r==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const I=new Map;function X(e,t){const i=(e?e.join("|"):"")+"::"+t;if(I.has(i))return I.get(i);const o=new Set(e||[]),r=function(s,l){const a=s.getAttribute(l);return a!==null&&o.has(a)?a:t};return I.set(i,r),r}function Z(e,t,i){const o=parseFloat(e.getAttribute(t));return isNaN(o)?i:o}function ee(e,t,i){const o=e.getAttribute(t);if(!o)return i;try{return JSON.parse(o)}catch{return i}}function te(e,t,i,o,r){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=n=>{r?console.warn(n,r):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ce(e,t,i){for(const o in i){const[r,s,l]=i[o];Object.defineProperty(e,o,{get:function(){return r(t,s,l)},enumerable:!0,configurable:!0})}return e}function ve(e){const t={};for(const i in e){const o=e[i];if(!o||!o.prop)continue;let r=o.read;if(!r&&o.type)switch(o.type){case"enum":r=X(o.values,o.fallback);break;case"integer":r=P;break;case"float":r=Z;break;case"boolean":r=Y;break;case"list":r=G;break;case"json":r=ee;break;case"string":default:r=F;break}r||(r=F),t[o.prop]=[r,i,o.fallback]}return t}function Ae(e){const t={};for(const i in e){const o=e[i];o&&o.effect&&(t[i]=o.effect)}return Object.keys(t).length?t:null}function _e(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ce,window.lnCore.attrSpec=ve,window.lnCore.attrStr=F,window.lnCore.attrInt=P,window.lnCore.attrBool=Y,window.lnCore.attrList=G,window.lnCore.attrEnum=X,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function ne(e,t,i,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:i,ComponentFn:o};if(e.matches&&e.matches(s)&&x(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)x(a[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function xe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Se(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 ke(e){const t=re(),i=e.observed||[];for(let o=0;o<i.length;o++){const r=i[o];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const r=t.byDeclaredAttr.get(o);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=_e(e);if(o===null)t.reactiveWildcard.push(e);else for(const r of o)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,i,o){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const l=s.effects&&s.effects[i];l?l(t,i,o):s.onAttrChange&&(!s.declared||s.declared.has(i))&&s.onAttrChange(t,i,o)}}function Oe(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,o=re(),r=o.byAttr.get(t),s=V()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!i&&!r&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&D(l)){const a=o.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let u=0;u<a.length;u++)te(a[u].spec,n,t,a[u].componentTag,l)}if(window.lnCore._debugSink&&(i||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),i){const a=o.byReactive.get(t);a&&oe(a,l,t,e.oldValue),o.reactiveWildcard.length&&oe(o.reactiveWildcard,l,t,e.oldValue)}if(r)for(let a=0;a<r.length;a++){const n=r[a];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(ne(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Le(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{Oe(t[i])}catch(o){console.error("[ln-core] mutation handler failed",t[i].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function N(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Te(e){const t=$();if(!t.length)return;const i=e.target;if(i){const o=i.nodeType===1?i:i.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let o=0;o<t.length;o++){const r=t[o];if(r.onSubtreeChange&&r.query){const s=r.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;l&&r.onSubtreeChange(l,e)}}for(let o=0;o<e.addedNodes.length;o++){const r=e.addedNodes[o];if(r.nodeType===1){const s=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const a=t[l];if(a.selector&&a.attribute&&a.ComponentFn){if(!s)r.matches&&r.matches(a.query)&&x(r,a);else if(r.matches&&r.matches(a.query)&&x(r,a),r.querySelectorAll){const n=r.querySelectorAll(a.query);for(let u=0;u<n.length;u++)x(n[u],a)}}a.onInit&&a.onInit(r)}}}for(let o=0;o<e.removedNodes.length;o++){const r=e.removedNodes[o];if(r.nodeType===1){const s=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const a=t[l],n=a.query;if(n){if(!s)r.matches&&r.matches(n)&&N(r,a);else if(r.matches&&r.matches(n)&&N(r,a),r.querySelectorAll){const u=r.querySelectorAll(n);for(let w=0;w<u.length;w++)N(u[w],a)}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const o=t[i];if(o.type==="childList")try{Te(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function De(e){$().push(e),ie()}function le(e,t,i,o,r={}){const s=r.extraAttributes||[],l=r.onAttributeChange||null,a=r.onSubtreeChange||null,n=r.onInit||null,u=r.onAttrChange||null,w=r.effects||null,h=r.attributes||null,m=h?Ae(h):w,L=h?new Set(Object.keys(h)):null,T=r.persist||null;function A(v){const p=v||document.body;if(ne(p,e,t,i),h&&V())for(const c in h){const f=h[c],d=Array.from(p.querySelectorAll("["+c+"]"));p.matches&&p.matches("["+c+"]")&&d.push(p);for(let g=0;g<d.length;g++){const b=d[g];D(b)&&te(f,b.getAttribute(c),c,o,b)}}n&&n(p)}const S=[];if(e.indexOf("[")!==-1){const v=/\[([\w-]+)/g;let p;for(;(p=v.exec(e))!==null;)S.push(p[1])}else S.push(e);ke({selector:e,attribute:t,componentTag:o,attributes:h,ComponentFn:i,onInit:n,observed:S.concat(s),onAttributeChange:l,onAttrChange:u,effects:m,declared:L,persist:T}),Le();const R=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=r.subtreeQuery||(R?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:a,query:C}),ie(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=De);function _(){xe()>0?Se(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_):_(),A}function se(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,i={},o=se(t);if(!o)return i;const r=o.split("&");for(let s=0;s<r.length;s++){const l=r[s];if(!l)continue;const a=l.indexOf(":"),n=a>-1?l.slice(0,a):l,u=a>-1?l.slice(a+1):"";if(n)try{i[n]=decodeURIComponent(u)}catch{i[n]=u}}return i}function Ee(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Me(e,t){if(!e)return;const i=q();t==null?delete i[e]:i[e]=String(t);const r=Object.keys(i).map(function(s){const l=i[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");se(location.hash)!==r&&(location.hash=r)}function Fe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ie(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const 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 $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ne(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),o=e.slice(t+1),r=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:i,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Ee,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Fe,window.lnCore.resolveHashNamespace=Ie,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=Ne,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=Re);function Be(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Be);function je(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const i=t<1e11?t*1e3:t,o=new Date(i);return isNaN(o.getTime())?null:o}if(typeof e=="string"){const i=e.trim();if(!i)return null;const o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(i);if(o){const s=+o[1],l=+o[2],a=+o[3],n=new Date(s,l-1,a);return n.getFullYear()!==s||n.getMonth()!==l-1||n.getDate()!==a?null:n}const r=new Date(i);return isNaN(r.getTime())?null:r}return null}function We(e,t=Date.now()){if(!e)return{value:0,unit:"second",isOlderThanMonth:!1};const i=typeof t=="number"?t:t.getTime(),o=e.getTime(),r=Math.floor((o-i)/1e3),s=Math.abs(r);return s<10?{value:0,unit:"second",isOlderThanMonth:!1}:s<60?{value:r,unit:"second",isOlderThanMonth:!1}:s<3600?{value:Math.round(r/60),unit:"minute",isOlderThanMonth:!1}:s<86400?{value:Math.round(r/3600),unit:"hour",isOlderThanMonth:!1}:s<604800?{value:Math.round(r/86400),unit:"day",isOlderThanMonth:!1}:s<2592e3?{value:Math.round(r/604800),unit:"week",isOlderThanMonth:!1}:{value:Math.round(r/2592e3),unit:"month",isOlderThanMonth:!0}}function O(e,t,i=new Date){switch(e){case"full":return{dateStyle:"long",timeStyle:"short"};case"date":return{dateStyle:"medium"};case"time":return{timeStyle:"short"};case"short":default:{const o={month:"short",day:"numeric"};return t&&t.getFullYear()!==i.getFullYear()&&(o.year="numeric"),o}}}(function(){const e="data-ln-time",t="lnTime";if(window[t]!==void 0)return;const i={"data-ln-time":{type:"enum",values:["relative","short","medium","long","iso"],fallback:"relative",effect:v,description:"Time format style preset or activator"},"data-ln-time-locale":{type:"string",effect:v,description:"BCP 47 language tag override for time formatting"}},o={},r={};function s(c){return c.getAttribute("data-ln-time-locale")||be(c)}function l(c,f){const d=(c||"")+"|"+JSON.stringify(f);return o[d]||(o[d]=new Intl.DateTimeFormat(c,f)),o[d]}function a(c){const f=c||"";return r[f]||(r[f]=new Intl.RelativeTimeFormat(c,{numeric:"auto",style:"narrow"})),r[f]}const n=new Set;let u=null;function w(){u||(u=setInterval(m,6e4))}function h(){u&&(clearInterval(u),u=null)}function m(){for(const c of n){if(!document.body.contains(c.dom)){n.delete(c);continue}C(c)}n.size===0&&h()}function L(c,f){const d=E(f),g=(f||"").toLowerCase().split("-")[0],b=l(f,O("full",c)),y=b.resolvedOptions().locale.toLowerCase().split("-")[0];if(d&&y!==g&&d.monthsLong){const B=d.monthsLong[c.getMonth()],j=c.getDate(),W=c.getFullYear(),U=String(c.getHours()).padStart(2,"0"),Ue=String(c.getMinutes()).padStart(2,"0");return`${j} ${B} ${W}, ${U}:${Ue}`}return b.format(c)}function T(c,f){const d=O("short",c),g=E(f),b=(f||"").toLowerCase().split("-")[0],y=l(f,d),B=y.resolvedOptions().locale.toLowerCase().split("-")[0];if(g&&B!==b&&g.monthsShort){const j=g.monthsShort[c.getMonth()],W=c.getDate(),U=d.year?" "+c.getFullYear():"";return`${W} ${j}${U}`}return y.format(c)}function A(c,f){return l(f,O("date",c)).format(c)}function S(c,f){return l(f,O("time",c)).format(c)}function R(c,f){const d=We(c);return d.isOlderThanMonth?T(c,f):a(f).format(d.value,d.unit)}function C(c){const f=c.dom.getAttribute("datetime");if(!f)return;const d=je(f);if(!d)return;const g=c.dom.getAttribute(e)||"short",b=s(c.dom);let y;switch(g){case"relative":y=R(d,b);break;case"full":y=L(d,b);break;case"date":y=A(d,b);break;case"time":y=S(d,b);break;default:y=T(d,b);break}c.dom.textContent=y,g!=="full"&&(c.dom.title=L(d,b))}function _(c){this.dom=c;const f=this;return this._onLocaleChange=function(){C(f)},J(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),C(this),c.getAttribute(e)==="relative"&&(n.add(this),w()),this}_.prototype.render=function(){C(this)},_.prototype.destroy=function(){this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),n.delete(this),n.size===0&&h(),delete this.dom[t]};function v(c){const f=c[t];if(!f)return;c.getAttribute(e)==="relative"?(n.add(f),w()):(n.delete(f),n.size===0&&h()),C(f)}function p(c){c.nodeType===1&&c.hasAttribute&&c.hasAttribute(e)&&c[t]&&C(c[t])}le(e,t,_,"ln-time",{attributes:i,extraAttributes:["datetime","lang"],onAttributeChange:v,onInit:p})})()})();
|
|
1
|
+
(function(){"use strict";function z(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function M(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!M(o))return}e.apply(console,t)}}function de(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function L(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){L(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function we(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function he(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(r)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")r&&l[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&i[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")i[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);i[n.name]=n.value===""||isNaN(c)?null:c}else i[n.name]=n.value}return i}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 r=e.elements,o=[],i={};for(let s=0;s<r.length;s++){const l=r[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<r.length;s++){const l=r[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const n=t[a];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(i[l.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=be(n);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<l.options.length;c++)l.options[c].selected=n.indexOf(l.options[c].value)!==-1;o.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ge,window.lnCore.serializeForm=he,window.lnCore.resolveFormMethod=we);const K={};function me(e,t){K[e]=t}function pe(e){return K[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=pe);function ye(e){const t=e?e.closest("[lang]"):null,r=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function P(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,L(function(){new MutationObserver(function(){de(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function Ce(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];Y[r]=t}function F(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ce,window.lnCore.getLocaleFallback=F,window.lnCore.ensureLocaleObserver=P);const I={};function ve(e,t){I[e]||(I[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=I[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function G(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const a=r[l],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const a=o[l],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const w=d[0].trim(),b=d[1].trim();t[b]!=null&&a.setAttribute(w,t[b])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const a=i[l],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const w=d[0].trim(),b=d[1].trim();b in t&&a.classList.toggle(w,!!t[b])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.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],t??null),r[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)G(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function X(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(l,a){return t[a]!==void 0?t[a]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],a=l.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function _e(e,t,r,o,i,s){const l={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(o(c));let w=l[d];if(w)i(w,c,n);else{const b=ve(r,s);if(!b||(X(b,c),w=b.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",d),i(w,c,n)}a.appendChild(w)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=G,window.lnCore.lnFill=Ae,window.lnCore.renderList=_e);function $(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function Z(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function ee(e,t,r=!1){const o=e.getAttribute(t);if(o===null)return!!r;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const N=new Map;function ne(e,t){const r=(e?e.join("|"):"")+"::"+t;if(N.has(r))return N.get(r);const o=new Set(e||[]),i=function(s,l){const a=s.getAttribute(l);return a!==null&&o.has(a)?a:t};return N.set(r,i),i}function re(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function oe(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function ie(e,t,r,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=n=>{i?console.warn(n,i):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function xe(e,t,r){for(const o in r){const[i,s,l]=r[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const r in e){const o=e[r];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=ne(o.values,o.fallback);break;case"integer":i=Z;break;case"float":i=re;break;case"boolean":i=ee;break;case"list":i=te;break;case"json":i=oe;break;case"string":default:i=$;break}i||(i=$),t[o.prop]=[i,r,o.fallback]}return t}function ke(e){const t={};for(const r in e){const o=e[r];o&&o.effect&&(t[r]=o.effect)}return Object.keys(t).length?t:null}function Oe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const 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=xe,window.lnCore.attrSpec=Se,window.lnCore.attrStr=$,window.lnCore.attrInt=Z,window.lnCore.attrBool=ee,window.lnCore.attrList=te,window.lnCore.attrEnum=ne,window.lnCore.attrFloat=re,window.lnCore.attrJson=oe);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(r){console.error("["+t.attribute+"] init failed",e,r)}}}function le(e,t,r,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(s)&&x(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)x(a[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Te(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function se(){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 Ee(e){const t=se(),r=e.observed||[];for(let o=0;o<r.length;o++){const i=r[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(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Oe(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ae(e,t,r,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[r];l?l(t,r,o):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,o)}}function De(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=se(),i=o.byAttr.get(t),s=z()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&M(l)){const a=o.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let c=0;c<a.length;c++)ie(a[c].spec,n,t,a[c].componentTag,l)}if(window.lnCore._debugSink&&(r||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const a=o.byReactive.get(t);a&&ae(a,l,t,e.oldValue),o.reactiveWildcard.length&&ae(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let a=0;a<i.length;a++){const n=i[a];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(le(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Me(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,L(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{De(t[r])}catch(o){console.error("[ln-core] mutation handler failed",t[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function B(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Fe(e){const t=q();if(!t.length)return;const r=e.target;if(r){const i=r.nodeType===1?r:r.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=R();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,a=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;a&&s.onSubtreeChange(a,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)s.matches&&s.matches(n.query)&&x(s,n);else if(s.matches&&s.matches(n.query)&&x(s,n),s.querySelectorAll){const c=s.querySelectorAll(n.query);for(let d=0;d<c.length;d++)x(c[d],n)}}n.onInit&&n.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a],c=n.query;if(c){if(!l)s.matches&&s.matches(c)&&B(s,n);else if(s.matches&&s.matches(c)&&B(s,n),s.querySelectorAll){const d=s.querySelectorAll(c);for(let w=0;w<d.length;w++)B(d[w],n)}}}}}}function ue(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,L(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{Fe(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ie(e){q().push(e),e.onSubtreeChange&&e.query&&R().push(e),ue()}function ce(e,t,r,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,a=i.onSubtreeChange||null,n=i.onInit||null,c=i.onAttrChange||null,d=i.effects||null,w=i.attributes||null,b=w?ke(w):d,E=w?new Set(Object.keys(w)):null,D=i.persist||null;function A(O){const g=O||document.body;if(le(g,e,t,r),w&&z())for(const C in w){const U=w[C],u=Array.from(g.querySelectorAll("["+C+"]"));g.matches&&g.matches("["+C+"]")&&u.push(g);for(let f=0;f<u.length;f++){const h=u[f];M(h)&&ie(U,h.getAttribute(C),C,o,h)}}n&&n(g)}const S=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let g;for(;(g=O.exec(e))!==null;)S.push(g[1])}else S.push(e);Ee({selector:e,attribute:t,componentTag:o,attributes:w,ComponentFn:r,onInit:n,observed:S.concat(s),onAttributeChange:l,onAttrChange:c,effects:b,declared:E,persist:D}),Me();const W=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,y=i.subtreeQuery||(W?e:"["+e+"]"),_={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:a,query:y};q().push(_),a&&y&&R().push(_),ue(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Ie);function k(){Le()>0?Te(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k):k(),A}function fe(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,r={},o=fe(t);if(!o)return r;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const a=l.indexOf(":"),n=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function $e(e){if(!e)return null;const t=j();return e in t?t[e]:null}function Ne(e,t){if(!e)return;const r=j();t==null?delete r[e]:r[e]=String(t);const i=Object.keys(r).map(function(s){const l=r[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");fe(location.hash)!==i&&(location.hash=i)}function qe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const 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 Be(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 Ue(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=$e,window.lnCore.hashSet=Ne,window.lnCore.hashLinkClick=qe,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ue);function Ve(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ve);function He(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const r=t<1e11?t*1e3:t,o=new Date(r);return isNaN(o.getTime())?null:o}if(typeof e=="string"){const r=e.trim();if(!r)return null;const o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(o){const s=+o[1],l=+o[2],a=+o[3],n=new Date(s,l-1,a);return n.getFullYear()!==s||n.getMonth()!==l-1||n.getDate()!==a?null:n}const i=new Date(r);return isNaN(i.getTime())?null:i}return null}function Je(e,t=Date.now()){if(!e)return{value:0,unit:"second",isOlderThanMonth:!1};const r=typeof t=="number"?t:t.getTime(),o=e.getTime(),i=Math.floor((o-r)/1e3),s=Math.abs(i);return s<10?{value:0,unit:"second",isOlderThanMonth:!1}:s<60?{value:i,unit:"second",isOlderThanMonth:!1}:s<3600?{value:Math.round(i/60),unit:"minute",isOlderThanMonth:!1}:s<86400?{value:Math.round(i/3600),unit:"hour",isOlderThanMonth:!1}:s<604800?{value:Math.round(i/86400),unit:"day",isOlderThanMonth:!1}:s<2592e3?{value:Math.round(i/604800),unit:"week",isOlderThanMonth:!1}:{value:Math.round(i/2592e3),unit:"month",isOlderThanMonth:!0}}function T(e,t,r=new Date){switch(e){case"full":return{dateStyle:"long",timeStyle:"short"};case"date":return{dateStyle:"medium"};case"time":return{timeStyle:"short"};case"short":default:{const o={month:"short",day:"numeric"};return t&&t.getFullYear()!==r.getFullYear()&&(o.year="numeric"),o}}}(function(){const e="data-ln-time",t="lnTime";if(window[t]!==void 0)return;const r={"data-ln-time":{type:"enum",values:["relative","short","medium","long","iso"],fallback:"relative",effect:C,description:"Time format style preset or activator"},"data-ln-time-locale":{type:"string",effect:C,description:"BCP 47 language tag override for time formatting"}},o={},i={};function s(u){return u.getAttribute("data-ln-time-locale")||ye(u)}function l(u,f){const h=(u||"")+"|"+JSON.stringify(f);return o[h]||(o[h]=new Intl.DateTimeFormat(u,f)),o[h]}function a(u){const f=u||"";return i[f]||(i[f]=new Intl.RelativeTimeFormat(u,{numeric:"auto",style:"narrow"})),i[f]}const n=new Set;let c=null;function d(){c||(c=setInterval(b,6e4))}function w(){c&&(clearInterval(c),c=null)}function b(){for(const u of n){if(!document.body.contains(u.dom)){n.delete(u);continue}y(u)}n.size===0&&w()}function E(u,f){const h=F(f),v=(f||"").toLowerCase().split("-")[0],m=l(f,T("full",u)),p=m.resolvedOptions().locale.toLowerCase().split("-")[0];if(h&&p!==v&&h.monthsLong){const V=h.monthsLong[u.getMonth()],H=u.getDate(),J=u.getFullYear(),Q=String(u.getHours()).padStart(2,"0"),Qe=String(u.getMinutes()).padStart(2,"0");return`${H} ${V} ${J}, ${Q}:${Qe}`}return m.format(u)}function D(u,f){const h=T("short",u),v=F(f),m=(f||"").toLowerCase().split("-")[0],p=l(f,h),V=p.resolvedOptions().locale.toLowerCase().split("-")[0];if(v&&V!==m&&v.monthsShort){const H=v.monthsShort[u.getMonth()],J=u.getDate(),Q=h.year?" "+u.getFullYear():"";return`${J} ${H}${Q}`}return p.format(u)}function A(u,f){return l(f,T("date",u)).format(u)}function S(u,f){return l(f,T("time",u)).format(u)}function W(u,f){const h=Je(u);return h.isOlderThanMonth?D(u,f):a(f).format(h.value,h.unit)}function y(u){const f=u.dom.getAttribute("datetime");if(!f)return;const h=He(f);if(!h)return;const v=u.dom.getAttribute(e)||"short",m=s(u.dom);let p;switch(v){case"relative":p=W(h,m);break;case"full":p=E(h,m);break;case"date":p=A(h,m);break;case"time":p=S(h,m);break;default:p=D(h,m);break}u.dom.textContent=p,v!=="full"&&(u.dom.title=E(h,m))}const _=new Set;let k=!1;function O(){P(),!k&&(k=!0,document.addEventListener("ln-core:locale-change",function(){_.forEach(function(u){y(u)})}))}function g(u){return this.dom=u,_.add(this),O(),y(this),u.getAttribute(e)==="relative"&&(n.add(this),d()),this}g.prototype.render=function(){y(this)},g.prototype.destroy=function(){_.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),n.delete(this),n.size===0&&w(),delete this.dom[t]};function C(u){const f=u[t];if(!f)return;u.getAttribute(e)==="relative"?(n.add(f),d()):(n.delete(f),n.size===0&&w()),y(f)}function U(u){u.nodeType===1&&u.hasAttribute&&u.hasAttribute(e)&&u[t]&&y(u[t])}ce(e,t,g,"ln-time",{attributes:r,extraAttributes:["datetime","lang"],onAttributeChange:C,onInit:U})})()})();
|
|
@@ -139,17 +139,26 @@ import { calculateRelativeTime, resolveDateFormatOptions } from './time-model.js
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
const _allInstances = new Set();
|
|
143
|
+
let _localeListenerBound = false;
|
|
144
|
+
|
|
145
|
+
function _ensureLocaleListener() {
|
|
146
|
+
ensureLocaleObserver();
|
|
147
|
+
if (_localeListenerBound) return;
|
|
148
|
+
_localeListenerBound = true;
|
|
149
|
+
document.addEventListener('ln-core:locale-change', function () {
|
|
150
|
+
_allInstances.forEach(function (inst) {
|
|
151
|
+
_render(inst);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
142
156
|
// ─── Component ────────────────────────────────────────────
|
|
143
157
|
function _constructor(dom) {
|
|
144
158
|
this.dom = dom;
|
|
145
|
-
const self = this;
|
|
146
159
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
_render(self);
|
|
150
|
-
};
|
|
151
|
-
ensureLocaleObserver();
|
|
152
|
-
document.addEventListener('ln-core:locale-change', this._onLocaleChange);
|
|
160
|
+
_allInstances.add(this);
|
|
161
|
+
_ensureLocaleListener();
|
|
153
162
|
|
|
154
163
|
_render(this);
|
|
155
164
|
|
|
@@ -166,6 +175,7 @@ import { calculateRelativeTime, resolveDateFormatOptions } from './time-model.js
|
|
|
166
175
|
};
|
|
167
176
|
|
|
168
177
|
_constructor.prototype.destroy = function () {
|
|
178
|
+
_allInstances.delete(this);
|
|
169
179
|
if (this._onLocaleChange) {
|
|
170
180
|
document.removeEventListener('ln-core:locale-change', this._onLocaleChange);
|
|
171
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function M(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!x(r))return}e.apply(console,t)}}function ne(e,t,o){const r=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const o=!!(t&&t.typed),r=t&&t.exclude,i={},a=e.elements,l={};if(o)for(let s=0;s<a.length;s++){const n=a[s];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let s=0;s<a.length;s++){const n=a[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")o&&l[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&i[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")i[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);i[n.name]=n.value===""||isNaN(u)?null:u}else i[n.name]=n.value}return i}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const o=e.elements,r=[],i={};for(let a=0;a<o.length;a++){const l=o[a];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let a=0;a<o.length;a++){const l=o[a];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const n=t[s];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(i[l.name]>1){const u=String(n).split(",").map(function(h){return h.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=ie(n);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<l.options.length;u++)l.options[u].selected=n.indexOf(l.options[u].value)!==-1;r.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const B={};function se(e,t){B[e]=t}function ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ae);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){ne(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function ue(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];R[o]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ce);const S={};function j(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=S[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function fe(e,t,o){if(e){const r=e.querySelector('[data-ln-template="'+t+'"]');if(r)return r.content.cloneNode(!0)}return j(t,o)}function k(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let l=0;l<o.length;l++){const s=o[l],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const s=r[l],n=s.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const h=n[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();t[b]!=null&&s.setAttribute(w,t[b])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const s=i[l],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const a=e.querySelectorAll("[data-ln-class]");for(let l=0;l<a.length;l++){const s=a[l],n=s.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const h=n[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();b in t&&s.classList.toggle(w,!!t[b])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<o.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[r],t??null),o[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)k(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function W(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const a=o.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const r=function(a,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let a=0;a<i.length;a++){const l=i[a],s=l.attributes;for(let n=0;n<s.length;n++){const u=s[n];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function he(e,t,o,r,i,a){const l={};for(let n=0;n<e.children.length;n++){const u=e.children[n],h=u.getAttribute("data-ln-render-key");h&&(l[h]=u)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],h=String(r(u));let w=l[h];if(w)i(w,u,n);else{const b=j(o,a);if(!b||(W(b,u),w=b.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),i(w,u,n)}s.appendChild(w)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=k,window.lnCore.lnFill=we,window.lnCore.renderList=he);function E(e,t,o){const r=e.getAttribute(t);return r===null?o:r}function _(e,t,o){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?o:r}function H(e,t,o=!1){const r=e.getAttribute(t);if(r===null)return!!o;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function V(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const r=new Set(e||[]),i=function(a,l){const s=a.getAttribute(l);return s!==null&&r.has(s)?s:t};return L.set(o,i),i}function P(e,t,o){const r=parseFloat(e.getAttribute(t));return isNaN(r)?o:r}function Q(e,t,o){const r=e.getAttribute(t);if(!r)return o;try{return JSON.parse(r)}catch{return o}}function J(e,t,o,r,i){if(!e||t===null)return!0;const a=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=n=>{i?console.warn(n,i):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(s(`[${a}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(s(`[${a}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(s(`[${a}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(s(`[${a}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return s(`[${a}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function K(e,t,o){for(const r in o){const[i,a,l]=o[r];Object.defineProperty(e,r,{get:function(){return i(t,a,l)},enumerable:!0,configurable:!0})}return e}function z(e){const t={};for(const o in e){const r=e[o];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=V(r.values,r.fallback);break;case"integer":i=_;break;case"float":i=P;break;case"boolean":i=H;break;case"list":i=U;break;case"json":i=Q;break;case"string":default:i=E;break}i||(i=E),t[r.prop]=[i,o,r.fallback]}return t}function pe(e){const t={};for(const o in e){const r=e[o];r&&r.effect&&(t[o]=r.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=K,window.lnCore.attrSpec=z,window.lnCore.attrStr=E,window.lnCore.attrInt=_,window.lnCore.attrBool=H,window.lnCore.attrList=U,window.lnCore.attrEnum=V,window.lnCore.attrFloat=P,window.lnCore.attrJson=Q);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function G(e,t,o,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:o,ComponentFn:r};if(e.matches&&e.matches(a)&&v(e,l),e.querySelectorAll){const s=e.querySelectorAll(a);for(let n=0;n<s.length;n++)v(s[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ge(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ye(e){const t=X(),o=e.observed||[];for(let r=0;r<o.length;r++){const i=o[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(a=>a.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=me(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,o,r){for(let i=0;i<e.length;i++){const a=e[i];if(!t[a.attribute])continue;const l=a.effects&&a.effects[o];l?l(t,o,r):a.onAttrChange&&(!a.declared||a.declared.has(o))&&a.onAttrChange(t,o,r)}}function Ce(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,r=X(),i=r.byAttr.get(t),a=M()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!o&&!i&&!a)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(a&&x(l)){const s=r.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let u=0;u<s.length;u++)J(s[u].spec,n,t,s[u].componentTag,l)}if(window.lnCore._debugSink&&(o||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),o){const s=r.byReactive.get(t);s&&Y(s,l,t,e.oldValue),r.reactiveWildcard.length&&Y(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let s=0;s<i.length;s++){const n=i[s];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(G(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ce(t[o])}catch(r){console.error("[ln-core] mutation handler failed",t[o].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=q();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const i=t[r];if(i.onSubtreeChange&&i.query){const a=i.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;l&&i.onSubtreeChange(l,e)}}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const a=!!(i.firstElementChild||i.children&&i.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!a)i.matches&&i.matches(s.query)&&v(i,s);else if(i.matches&&i.matches(s.query)&&v(i,s),i.querySelectorAll){const n=i.querySelectorAll(s.query);for(let u=0;u<n.length;u++)v(n[u],s)}}s.onInit&&s.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){const a=!!(i.firstElementChild||i.children&&i.children.length);for(let l=0;l<t.length;l++){const s=t[l],n=s.query;if(n){if(!a)i.matches&&i.matches(n)&&T(i,s);else if(i.matches&&i.matches(n)&&T(i,s),i.querySelectorAll){const u=i.querySelectorAll(n);for(let h=0;h<u.length;h++)T(u[h],s)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const r=t[o];if(r.type==="childList")try{ve(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){q().push(e),Z()}function ee(e,t,o,r,i={}){const a=i.extraAttributes||[],l=i.onAttributeChange||null,s=i.onSubtreeChange||null,n=i.onInit||null,u=i.onAttrChange||null,h=i.effects||null,w=i.attributes||null,b=w?pe(w):h,D=w?new Set(Object.keys(w)):null,I=i.persist||null;function C(m){const g=m||document.body;if(G(g,e,t,o),w&&M())for(const y in w){const Ie=w[y],N=Array.from(g.querySelectorAll("["+y+"]"));g.matches&&g.matches("["+y+"]")&&N.push(g);for(let F=0;F<N.length;F++){const $=N[F];x($)&&J(Ie,$.getAttribute(y),y,r,$)}}n&&n(g)}const c=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let g;for(;(g=m.exec(e))!==null;)c.push(g[1])}else c.push(e);ye({selector:e,attribute:t,componentTag:r,attributes:w,ComponentFn:o,onInit:n,observed:c.concat(a),onAttributeChange:l,onAttrChange:u,effects:b,declared:D,persist:I}),Ae();const d=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,f=i.subtreeQuery||(d?e:"["+e+"]");q().push({selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:s,query:f}),Z(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=_e);function p(){be()>0?ge(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p(),C}function te(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,o={},r=te(t);if(!r)return o;const i=r.split("&");for(let a=0;a<i.length;a++){const l=i[a];if(!l)continue;const s=l.indexOf(":"),n=s>-1?l.slice(0,s):l,u=s>-1?l.slice(s+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function xe(e){if(!e)return null;const t=O();return e in t?t[e]:null}function Se(e,t){if(!e)return;const o=O();t==null?delete o[e]:o[e]=String(t);const i=Object.keys(o).map(function(a){const l=o[a];return l===""?a:a+":"+encodeURIComponent(l)}).join("&");te(location.hash)!==i&&(location.hash=i)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const 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 Le(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Te(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:o,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Le,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Te,window.lnCore.hashFilterDecode=Oe);function De(){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=De),(function(){const e="data-ln-toast",t="lnToast",o="ln-toast-item";if(window[t]!==void 0)return;const r={"data-ln-toast":{type:"marker",description:"Initializes the toast notifications container"},"data-ln-toast-timeout":{prop:"timeoutDefault",type:"integer",read:_,fallback:6e3,min:500,description:"Default auto-dismiss timeout in ms"},"data-ln-toast-max":{prop:"max",type:"integer",read:_,fallback:5,min:1,description:"Maximum visible concurrent toast notifications"},"data-ln-toast-close":{type:"trigger",description:"Click dismiss trigger inside a toast item"},"data-ln-toast-item":{type:"marker",description:"Individual toast notification element"}},i=z(r);function a(c){if(!(!c||!(c instanceof HTMLElement))&&(c.hasAttribute("popover")||c.setAttribute("popover","manual"),typeof c.showPopover=="function")){if(c.matches(":popover-open"))try{c.hidePopover()}catch{}try{c.showPopover()}catch{}}}function l(c){if(!c||!(c instanceof HTMLElement))return;if(c.querySelectorAll("[data-ln-toast-item]").length===0&&typeof c.hidePopover=="function"&&c.matches(":popover-open"))try{c.hidePopover()}catch{}}function s(c){this.dom=c,K(this,c,i);const d=Array.from(c.querySelectorAll("[data-ln-toast-item]"));for(;d.length>this.max;)c.removeChild(d.shift());for(const f of d)D(f,this);return d.length>0&&a(c),this}s.prototype.enqueue=function(c){if(!c)return;const d=n(c,this.dom);if(!d)return;const f=Number.isFinite(c.timeout)?c.timeout:this.timeoutDefault;h(this,d),f>0&&(d._timer=setTimeout(()=>w(d),f))},s.prototype.clear=function(){for(const c of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(c)},s.prototype.destroy=function(){if(this.dom[t]){for(const c of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(c);l(this.dom),delete this.dom[t]}};function n(c,d){const f=((c.type||"")+"").trim().toLowerCase(),p=fe(d,o,"ln-toast");if(!p)return console.warn('[ln-toast] Template "'+o+'" not found'),null;k(p,{type:f,title:c.title,message:typeof c.message=="string"?c.message:void 0});const m=p.firstElementChild;if(!m)return null;m.hasAttribute("data-ln-toast-item")||m.setAttribute("data-ln-toast-item",""),m.classList.add("ln-enter");const g=m.querySelector(".body");g&&u(g,c);const y=m.querySelector("[data-ln-toast-close]");return y&&y.addEventListener("click",function(){w(m)}),m}function u(c,d){if(Array.isArray(d.message)){const f=document.createElement("ul");for(const p of d.message){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}c.appendChild(f)}if(d.data&&d.data.errors){const f=document.createElement("ul");for(const p of Object.values(d.data.errors).flat()){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}c.appendChild(f)}}function h(c,d){const f=Array.from(c.dom.querySelectorAll("[data-ln-toast-item]"));for(;f.length>=c.max&&f.length>0;)c.dom.removeChild(f.shift());c.dom.appendChild(d),a(c.dom),requestAnimationFrame(()=>d.classList.remove("ln-enter"))}function w(c){if(!c||!c.parentNode)return;const d=c.parentNode;clearTimeout(c._timer),c.classList.remove("ln-enter"),c.classList.add("ln-out"),setTimeout(()=>{c.parentNode&&(c.parentNode.removeChild(c),l(d))},200)}function b(c){let d=c&&c.container;return typeof d=="string"&&(d=document.querySelector(d)),d instanceof HTMLElement||(d=document.querySelector("["+e+"]")||document.getElementById("ln-toast-container")),d||null}function D(c,d){if(c._lnToastHydrated)return;c._lnToastHydrated=!0;const f=c.querySelector("[data-ln-toast-close]");f&&f.addEventListener("click",function(){w(c)});const p=+(c.getAttribute("data-ln-toast-timeout")??d.timeoutDefault);p>0&&(c._timer=setTimeout(function(){w(c)},p))}function I(c){const d=c.detail||{},f=b(d);if(!f){console.warn("[ln-toast] No toast container found");return}(f[t]||(f[t]=new s(f))).enqueue(d)}function C(c){const d=c&&c.detail||{};if(d.container){const f=b(d);f&&(f[t]||(f[t]=new s(f))).clear()}else{const f=document.querySelectorAll("["+e+"]");for(const p of Array.from(f))(p[t]||(p[t]=new s(p))).clear()}}A(function(){window.addEventListener("ln-toast:enqueue",I),window.addEventListener("ln-toast:clear",C),window.addEventListener("ln-modal:open",function(){const c=document.querySelectorAll("["+e+"], #ln-toast-container");for(const d of Array.from(c))d.querySelectorAll("[data-ln-toast-item]").length>0&&a(d)})},"ln-toast"),ee(e,t,s,"ln-toast",{attributes:r})})()})();
|
|
1
|
+
(function(){"use strict";function B(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function S(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!S(r))return}e.apply(console,t)}}function re(e,t,o){const r=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const o=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[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")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")o&&i[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")l[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const o=e.elements,r=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(n).split(",").map(function(h){return h.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=se(n);r.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),r.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;r.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),r.push(i)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=ie);const j={};function ae(e,t){j[e]=t}function ue(e){return j[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=ue);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){re(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function fe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];W[o]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=de);const k={};function H(e,t){k[e]||(k[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=k[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function he(e,t,o){if(e){const r=e.querySelector('[data-ln-template="'+t+'"]');if(r)return r.content.cloneNode(!0)}return H(t,o)}function E(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const h=n[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();t[b]!=null&&c.setAttribute(w,t[b])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const h=n[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();b in t&&c.classList.toggle(w,!!t[b])}}return e}function pe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<o.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[r],t??null),o[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)E(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function U(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const r=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 n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function me(e,t,o,r,l,s){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],h=u.getAttribute("data-ln-render-key");h&&(i[h]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],h=String(r(u));let w=i[h];if(w)l(w,u,n);else{const b=H(o,s);if(!b||(U(b,u),w=b.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),l(w,u,n)}c.appendChild(w)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=E,window.lnCore.lnFill=pe,window.lnCore.renderList=me);function L(e,t,o){const r=e.getAttribute(t);return r===null?o:r}function x(e,t,o){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?o:r}function V(e,t,o=!1){const r=e.getAttribute(t);if(r===null)return!!o;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function P(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const q=new Map;function Q(e,t){const o=(e?e.join("|"):"")+"::"+t;if(q.has(o))return q.get(o);const r=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&r.has(c)?c:t};return q.set(o,l),l}function J(e,t,o){const r=parseFloat(e.getAttribute(t));return isNaN(r)?o:r}function K(e,t,o){const r=e.getAttribute(t);if(!r)return o;try{return JSON.parse(r)}catch{return o}}function z(e,t,o,r,l){if(!e||t===null)return!0;const s=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function G(e,t,o){for(const r in o){const[l,s,i]=o[r];Object.defineProperty(e,r,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const o in e){const r=e[o];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=Q(r.values,r.fallback);break;case"integer":l=x;break;case"float":l=J;break;case"boolean":l=V;break;case"list":l=P;break;case"json":l=K;break;case"string":default:l=L;break}l||(l=L),t[r.prop]=[l,o,r.fallback]}return t}function be(e){const t={};for(const o in e){const r=e[o];r&&r.effect&&(t[o]=r.effect)}return Object.keys(t).length?t:null}function ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=G,window.lnCore.attrSpec=X,window.lnCore.attrStr=L,window.lnCore.attrInt=x,window.lnCore.attrBool=V,window.lnCore.attrList=P,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Y(e,t,o,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:r};if(e.matches&&e.matches(s)&&v(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)v(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ae(e){const t=Z(),o=e.observed||[];for(let r=0;r<o.length;r++){const l=o[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=ge(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 ee(e,t,o,r){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,r):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,r)}}function ve(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,r=Z(),l=r.byAttr.get(t),s=B()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&S(i)){const c=r.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<c.length;u++)z(c[u].spec,n,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=r.byReactive.get(t);c&&ee(c,i,t,e.oldValue),r.reactiveWildcard.length&&ee(r.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Y(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{ve(t[o])}catch(r){console.error("[ln-core] mutation handler failed",t[o].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function O(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function D(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(!t.length)return;const o=e.target;if(o){const l=o.nodeType===1?o:o.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=O();if(e.target&&r.length)for(let l=0;l<r.length;l++){const s=r[l],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):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 i=!!(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(!i)s.matches&&s.matches(n.query)&&v(s,n);else if(s.matches&&s.matches(n.query)&&v(s,n),s.querySelectorAll){const u=s.querySelectorAll(n.query);for(let h=0;h<u.length;h++)v(u[h],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 i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!i)s.matches&&s.matches(u)&&D(s,n);else if(s.matches&&s.matches(u)&&D(s,n),s.querySelectorAll){const h=s.querySelectorAll(u);for(let w=0;w<h.length;w++)D(h[w],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const r=t[o];if(r.type==="childList")try{xe(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){T().push(e),e.onSubtreeChange&&e.query&&O().push(e),te()}function ne(e,t,o,r,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,u=l.onAttrChange||null,h=l.effects||null,w=l.attributes||null,b=w?be(w):h,N=w?new Set(Object.keys(w)):null,F=l.persist||null;function y(C){const g=C||document.body;if(Y(g,e,t,o),w&&B())for(const _ in w){const Fe=w[_],$=Array.from(g.querySelectorAll("["+_+"]"));g.matches&&g.matches("["+_+"]")&&$.push(g);for(let M=0;M<$.length;M++){const R=$[M];S(R)&&z(Fe,R.getAttribute(_),_,r,R)}}n&&n(g)}const a=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let g;for(;(g=C.exec(e))!==null;)a.push(g[1])}else a.push(e);Ae({selector:e,attribute:t,componentTag:r,attributes:w,ComponentFn:o,onInit:n,observed:a.concat(s),onAttributeChange:i,onAttrChange:u,effects:b,declared:N,persist:F}),_e();const d=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,f=l.subtreeQuery||(d?e:"["+e+"]"),p={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:f};T().push(p),c&&f&&O().push(p),te(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ne,window.lnCore.observeLifecycle=Se);function m(){ye()>0?Ce(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m(),y}function oe(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,o={},r=oe(t);if(!r)return o;const l=r.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function ke(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const o=I();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");oe(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const 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 Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=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:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=ke,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);function Ne(){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=Ne),(function(){const e="data-ln-toast",t="lnToast",o="ln-toast-item";if(window[t]!==void 0)return;const r={"data-ln-toast":{type:"marker",description:"Initializes the toast notifications container"},"data-ln-toast-timeout":{prop:"timeoutDefault",type:"integer",read:x,fallback:6e3,min:500,description:"Default auto-dismiss timeout in ms"},"data-ln-toast-max":{prop:"max",type:"integer",read:x,fallback:5,min:1,description:"Maximum visible concurrent toast notifications"},"data-ln-toast-close":{type:"trigger",description:"Click dismiss trigger inside a toast item"},"data-ln-toast-item":{type:"marker",description:"Individual toast notification element"}},l=X(r);function s(a){if(!(!a||!(a instanceof HTMLElement))&&(a.hasAttribute("popover")||a.setAttribute("popover","manual"),typeof a.showPopover=="function")){if(a.matches(":popover-open"))try{a.hidePopover()}catch{}try{a.showPopover()}catch{}}}function i(a){if(!a||!(a instanceof HTMLElement))return;if(a.querySelectorAll("[data-ln-toast-item]").length===0&&typeof a.hidePopover=="function"&&a.matches(":popover-open"))try{a.hidePopover()}catch{}}function c(a){this.dom=a,G(this,a,l);const d=Array.from(a.querySelectorAll("[data-ln-toast-item]"));for(;d.length>this.max;)a.removeChild(d.shift());for(const f of d)N(f,this);return d.length>0&&s(a),this}c.prototype.enqueue=function(a){if(!a)return;const d=n(a,this.dom);if(!d)return;const f=Number.isFinite(a.timeout)?a.timeout:this.timeoutDefault;h(this,d),f>0&&(d._timer=setTimeout(()=>w(d),f))},c.prototype.clear=function(){for(const a of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(a)},c.prototype.destroy=function(){if(this.dom[t]){for(const a of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(a);i(this.dom),delete this.dom[t]}};function n(a,d){const f=((a.type||"")+"").trim().toLowerCase(),p=he(d,o,"ln-toast");if(!p)return console.warn('[ln-toast] Template "'+o+'" not found'),null;E(p,{type:f,title:a.title,message:typeof a.message=="string"?a.message:void 0});const m=p.firstElementChild;if(!m)return null;m.hasAttribute("data-ln-toast-item")||m.setAttribute("data-ln-toast-item",""),m.classList.add("ln-enter");const C=m.querySelector(".body");C&&u(C,a);const g=m.querySelector("[data-ln-toast-close]");return g&&g.addEventListener("click",function(){w(m)}),m}function u(a,d){if(Array.isArray(d.message)){const f=document.createElement("ul");for(const p of d.message){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}a.appendChild(f)}if(d.data&&d.data.errors){const f=document.createElement("ul");for(const p of Object.values(d.data.errors).flat()){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}a.appendChild(f)}}function h(a,d){const f=Array.from(a.dom.querySelectorAll("[data-ln-toast-item]"));for(;f.length>=a.max&&f.length>0;)a.dom.removeChild(f.shift());a.dom.appendChild(d),s(a.dom),requestAnimationFrame(()=>d.classList.remove("ln-enter"))}function w(a){if(!a||!a.parentNode)return;const d=a.parentNode;clearTimeout(a._timer),a.classList.remove("ln-enter"),a.classList.add("ln-out"),setTimeout(()=>{a.parentNode&&(a.parentNode.removeChild(a),i(d))},200)}function b(a){let d=a&&a.container;return typeof d=="string"&&(d=document.querySelector(d)),d instanceof HTMLElement||(d=document.querySelector("["+e+"]")||document.getElementById("ln-toast-container")),d||null}function N(a,d){if(a._lnToastHydrated)return;a._lnToastHydrated=!0;const f=a.querySelector("[data-ln-toast-close]");f&&f.addEventListener("click",function(){w(a)});const p=+(a.getAttribute("data-ln-toast-timeout")??d.timeoutDefault);p>0&&(a._timer=setTimeout(function(){w(a)},p))}function F(a){const d=a.detail||{},f=b(d);if(!f){console.warn("[ln-toast] No toast container found");return}(f[t]||(f[t]=new c(f))).enqueue(d)}function y(a){const d=a&&a.detail||{};if(d.container){const f=b(d);f&&(f[t]||(f[t]=new c(f))).clear()}else{const f=document.querySelectorAll("["+e+"]");for(const p of Array.from(f))(p[t]||(p[t]=new c(p))).clear()}}A(function(){window.addEventListener("ln-toast:enqueue",F),window.addEventListener("ln-toast:clear",y),window.addEventListener("ln-modal:open",function(){const a=document.querySelectorAll("["+e+"], #ln-toast-container");for(const d of Array.from(a))d.querySelectorAll("[data-ln-toast-item]").length>0&&s(d)})},"ln-toast"),ne(e,t,c,"ln-toast",{attributes:r})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function F(){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 v(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 n=1;n<t.length;n++)if(t[n]&&t[n].nodeType===1){i=t[n];break}if(!v(i))return}e.apply(console,t)}}function _(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 $(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(n),n}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function te(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function ne(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,n={},c=e.elements,l={};if(r)for(let s=0;s<c.length;s++){const o=c[s];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<c.length;s++){const o=c[s];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(i&&o.matches&&o.matches(i)))if(o.type==="checkbox")r&&l[o.name]===1?n[o.name]=o.checked:(n[o.name]||(n[o.name]=[]),o.checked&&n[o.name].push(o.value));else if(o.type==="radio")o.checked&&(n[o.name]=o.value);else if(o.type==="select-multiple"){n[o.name]=[];for(let u=0;u<o.options.length;u++)o.options[u].selected&&n[o.name].push(o.options[u].value)}else if(r&&o.type==="hidden")n[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const u=Number(o.value);n[o.name]=o.value===""||isNaN(u)?null:u}else n[o.name]=o.value}return n}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const r=e.elements,i=[],n={};for(let c=0;c<r.length;c++){const l=r[c];l.name&&l.type==="checkbox"&&(n[l.name]=(n[l.name]||0)+1)}for(let c=0;c<r.length;c++){const l=r[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const o=t[s];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(n[l.name]>1){const u=String(o).split(",").map(function(d){return d.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=ie(o);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<l.options.length;u++)l.options[u].selected=o.indexOf(l.options[u].value)!==-1;i.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const N={};function se(e,t){N[e]=t}function ce(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){_(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const B={};function ae(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];B[r]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return B[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const x={};function fe(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=x[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const s=r[l],o=s.getAttribute("data-ln-field");t[o]!=null&&(s.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const s=i[l],o=s.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const d=o[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),b=d[1].trim();t[b]!=null&&s.setAttribute(f,t[b])}}const n=e.querySelectorAll("[data-ln-show]");for(let l=0;l<n.length;l++){const s=n[l],o=s.getAttribute("data-ln-show");o in t&&s.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const s=c[l],o=s.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const d=o[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),b=d[1].trim();b in t&&s.classList.toggle(f,!!t[b])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const 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)M(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 j(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const i=function(c,l){return t[l]!==void 0?t[l]:""},n=Array.from(e.querySelectorAll("*"));e.nodeType===1&&n.push(e);for(let c=0;c<n.length;c++){const l=n[c],s=l.attributes;for(let o=0;o<s.length;o++){const u=s[o];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ge(e,t,r,i,n,c){const l={};for(let o=0;o<e.children.length;o++){const u=e.children[o],d=u.getAttribute("data-ln-render-key");d&&(l[d]=u)}const s=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],d=String(i(u));let f=l[d];if(f)n(f,u,o);else{const b=fe(r,c);if(!b||(j(b,u),f=b.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),n(f,u,o)}s.appendChild(f)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=M,window.lnCore.lnFill=we,window.lnCore.renderList=ge);function k(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function W(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function U(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const n=i.trim().toLowerCase();return!(n==="false"||n==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const S=new Map;function H(e,t){const r=(e?e.join("|"):"")+"::"+t;if(S.has(r))return S.get(r);const i=new Set(e||[]),n=function(c,l){const s=c.getAttribute(l);return s!==null&&i.has(s)?s:t};return S.set(r,n),n}function K(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function Q(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function J(e,t,r,i,n){if(!e||t===null)return!0;const c=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=o=>{n?console.warn(o,n):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(s(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(s(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(s(`[${c}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(s(`[${c}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return s(`[${c}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function be(e,t,r){for(const i in r){const[n,c,l]=r[i];Object.defineProperty(e,i,{get:function(){return n(t,c,l)},enumerable:!0,configurable:!0})}return e}function he(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let n=i.read;if(!n&&i.type)switch(i.type){case"enum":n=H(i.values,i.fallback);break;case"integer":n=W;break;case"float":n=K;break;case"boolean":n=U;break;case"list":n=V;break;case"json":n=Q;break;case"string":default:n=k;break}n||(n=k),t[i.prop]=[n,r,i.fallback]}return t}function pe(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=be,window.lnCore.attrSpec=he,window.lnCore.attrStr=k,window.lnCore.attrInt=W,window.lnCore.attrBool=U,window.lnCore.attrList=V,window.lnCore.attrEnum=H,window.lnCore.attrFloat=K,window.lnCore.attrJson=Q);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 G(e,t,r,i){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(c)&&m(e,l),e.querySelectorAll){const s=e.querySelectorAll(c);for(let o=0;o<s.length;o++)m(s[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function P(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ae(e){const t=P(),r=e.observed||[];for(let i=0;i<r.length;i++){const n=r[i];t.byAttr.has(n)||t.byAttr.set(n,[]),t.byAttr.get(n).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 n=t.byDeclaredAttr.get(i);n.some(c=>c.componentTag===e.componentTag)||n.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=me(e);if(i===null)t.reactiveWildcard.push(e);else for(const n of i)t.byReactive.has(n)||t.byReactive.set(n,[]),t.byReactive.get(n).push(e)}e.persist&&t.persist.push(e)}function z(e,t,r,i){for(let n=0;n<e.length;n++){const c=e[n];if(!t[c.attribute])continue;const l=c.effects&&c.effects[r];l?l(t,r,i):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,i)}}function ve(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=P(),n=i.byAttr.get(t),c=F()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!n&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&v(l)){const s=i.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let u=0;u<s.length;u++)J(s[u].spec,o,t,s[u].componentTag,l)}if(window.lnCore._debugSink&&(r||n)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const s=i.byReactive.get(t);s&&z(s,l,t,e.oldValue),i.reactiveWildcard.length&&z(i.reactiveWildcard,l,t,e.oldValue)}if(n)for(let s=0;s<n.length;s++){const o=n[s];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(G(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ve(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 O(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(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 xe(e){const t=O();if(!t.length)return;const r=e.target;if(r){const i=r.nodeType===1?r:r.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let i=0;i<t.length;i++){const n=t[i];if(n.onSubtreeChange&&n.query){const c=n.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;l&&n.onSubtreeChange(l,e)}}for(let i=0;i<e.addedNodes.length;i++){const n=e.addedNodes[i];if(n.nodeType===1){const c=!!(n.firstElementChild||n.children&&n.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)n.matches&&n.matches(s.query)&&m(n,s);else if(n.matches&&n.matches(s.query)&&m(n,s),n.querySelectorAll){const o=n.querySelectorAll(s.query);for(let u=0;u<o.length;u++)m(o[u],s)}}s.onInit&&s.onInit(n)}}}for(let i=0;i<e.removedNodes.length;i++){const n=e.removedNodes[i];if(n.nodeType===1){const c=!!(n.firstElementChild||n.children&&n.children.length);for(let l=0;l<t.length;l++){const s=t[l],o=s.query;if(o){if(!c)n.matches&&n.matches(o)&&E(n,s);else if(n.matches&&n.matches(o)&&E(n,s),n.querySelectorAll){const u=n.querySelectorAll(o);for(let d=0;d<u.length;d++)E(u[d],s)}}}}}}function X(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{xe(i)}catch(n){console.error("[ln-core] lifecycle handler failed",i.target,n)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ke(e){O().push(e),X()}function Y(e,t,r,i,n={}){const c=n.extraAttributes||[],l=n.onAttributeChange||null,s=n.onSubtreeChange||null,o=n.onInit||null,u=n.onAttrChange||null,d=n.effects||null,f=n.attributes||null,b=f?pe(f):d,a=f?new Set(Object.keys(f)):null,w=n.persist||null;function h(T){const p=T||document.body;if(G(p,e,t,r),f&&F())for(const y in f){const Fe=f[y],I=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&I.push(p);for(let D=0;D<I.length;D++){const R=I[D];v(R)&&J(Fe,R.getAttribute(y),y,i,R)}}o&&o(p)}const g=[];if(e.indexOf("[")!==-1){const T=/\[([\w-]+)/g;let p;for(;(p=T.exec(e))!==null;)g.push(p[1])}else g.push(e);Ae({selector:e,attribute:t,componentTag:i,attributes:f,ComponentFn:r,onInit:o,observed:g.concat(c),onAttributeChange:l,onAttrChange:u,effects:b,declared:a,persist:w}),_e();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,q=n.subtreeQuery||(C?e:"["+e+"]");O().push({selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:s,query:q}),X(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Y,window.lnCore.observeLifecycle=ke);function ee(){Ce()>0?ye(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),h}function Z(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,r={},i=Z(t);if(!i)return r;const n=i.split("&");for(let c=0;c<n.length;c++){const l=n[c];if(!l)continue;const s=l.indexOf(":"),o=s>-1?l.slice(0,s):l,u=s>-1?l.slice(s+1):"";if(o)try{r[o]=decodeURIComponent(u)}catch{r[o]=u}}return r}function Se(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const r=L();t==null?delete r[e]:r[e]=String(t);const n=Object.keys(r).map(function(c){const l=r[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");Z(location.hash)!==n&&(location.hash=n)}function Ee(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Te(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(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),n=i?i.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:n}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=L,window.lnCore.hashGet=Se,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=Te,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=De);function Re(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Re),(function(){const e="data-ln-toggle",t="lnToggle",r="data-ln-toggle-for",i="data-ln-toggle-action";if(window[t]!==void 0)return;const n={"data-ln-toggle":{effect:b,type:"enum",values:["open","close"],fallback:"close",description:"Visibility state of toggleable element"},"data-ln-toggle-for":{type:"string",description:"Target element ID to toggle on trigger click"},"data-ln-toggle-action":{type:"enum",values:["open","close","toggle"],fallback:"toggle",description:"Action performed on target element when trigger is clicked"}},c=new Set;let l=null;function s(a,w){return w==="open"?"open":w==="close"||a==="open"?"close":"open"}function o(){l||(l=function(a){if(te(a))return;const w=a.target.closest("["+r+"]");if(!w||ne(w))return;const h=w.getAttribute(r);if(!h)return;const g=document.getElementById(h);if(!g||!g[t])return;a.preventDefault();const C=w.getAttribute(i)||"toggle",q=g.getAttribute(e);g.setAttribute(e,s(q,C))},document.addEventListener("click",l))}function u(){c.size>0||!l||(document.removeEventListener("click",l),l=null)}function d(a,w){if(!a||!a.id)return;const h=document.querySelectorAll("["+r+'="'+a.id+'"]');for(let g=0;g<h.length;g++)h[g].setAttribute("aria-expanded",w?"true":"false")}function f(a){this.dom=a;const w=this;return this._onRequestOpen=function(){w.open()},this._onRequestClose=function(){w.close()},this._onRequestToggle=function(){w.toggle()},this.dom.addEventListener("ln-toggle:request-open",this._onRequestOpen),this.dom.addEventListener("ln-toggle:request-close",this._onRequestClose),this.dom.addEventListener("ln-toggle:request-toggle",this._onRequestToggle),this.isOpen=a.getAttribute(e)==="open",this.isOpen&&a.classList.add("open"),d(a,this.isOpen),c.add(this),o(),this}f.prototype.open=function(){this.dom.setAttribute(e,"open")},f.prototype.close=function(){this.dom.setAttribute(e,"close")},f.prototype.toggle=function(){const a=this.dom.getAttribute(e);this.dom.setAttribute(e,s(a,"toggle"))},f.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-toggle:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-toggle:request-close",this._onRequestClose),this.dom.removeEventListener("ln-toggle:request-toggle",this._onRequestToggle),c.delete(this),delete this.dom[t],u())};function b(a){const w=a[t];if(!w)return;const g=a.getAttribute(e)==="open";if(g!==w.isOpen)if(g){if($(a,"ln-toggle:before-open",{target:a}).defaultPrevented){a.setAttribute(e,"close");return}w.isOpen=!0,a.classList.add("open"),d(a,!0),_(a,"ln-toggle:open",{target:a})}else{if($(a,"ln-toggle:before-close",{target:a}).defaultPrevented){a.setAttribute(e,"open");return}w.isOpen=!1,a.classList.remove("open"),d(a,!1),_(a,"ln-toggle:close",{target:a})}}Y(e,t,f,"ln-toggle",{attributes:n,persist:{attr:e,hashActive:null}})})()})();
|
|
1
|
+
(function(){"use strict";function $(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function _(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 l=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){l=t[i];break}if(!_(l))return}e.apply(console,t)}}function x(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function N(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(i),i}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function re(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,i={},s=e.elements,r={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[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")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&r[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&i[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")i[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);i[n.name]=n.value===""||isNaN(u)?null:u}else i[n.name]=n.value}return i}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const o=e.elements,l=[],i={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(i[r.name]=(i[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const n=t[c];if(r.type==="checkbox"){if(Array.isArray(n))r.checked=n.indexOf(r.value)!==-1;else if(i[r.name]>1){const u=String(n).split(",").map(function(f){return f.trim()});r.checked=u.indexOf(r.value)!==-1}else r.checked=se(n);l.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),l.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<r.options.length;u++)r.options[u].selected=n.indexOf(r.options[u].value)!==-1;l.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),l.push(r)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=ie);const B={};function ue(e,t){B[e]=t}function ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=ae);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const M={};function fe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];M[o]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return M[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=de);const k={};function ge(e,t){k[e]||(k[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=k[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function j(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[r],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),b=f[1].trim();t[b]!=null&&c.setAttribute(d,t[b])}}const i=e.querySelectorAll("[data-ln-show]");for(let r=0;r<i.length;r++){const c=i[r],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),b=f[1].trim();b in t&&c.classList.toggle(d,!!t[b])}}return e}function be(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].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)j(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function W(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,r){return t[r]!==void 0?t[r]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const r=i[s],c=r.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&r.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function he(e,t,o,l,i,s){const r={};for(let n=0;n<e.children.length;n++){const u=e.children[n],f=u.getAttribute("data-ln-render-key");f&&(r[f]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],f=String(l(u));let d=r[f];if(d)i(d,u,n);else{const b=ge(o,s);if(!b||(W(b,u),d=b.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",f),i(d,u,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=j,window.lnCore.lnFill=be,window.lnCore.renderList=he);function S(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function U(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function V(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const i=l.trim().toLowerCase();return!(i==="false"||i==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const O=new Map;function K(e,t){const o=(e?e.join("|"):"")+"::"+t;if(O.has(o))return O.get(o);const l=new Set(e||[]),i=function(s,r){const c=s.getAttribute(r);return c!==null&&l.has(c)?c:t};return O.set(o,i),i}function Q(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function J(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function G(e,t,o,l,i){if(!e||t===null)return!0;const s=l||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=n=>{i?console.warn(n,i):console.warn(n)};if(r==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function pe(e,t,o){for(const l in o){const[i,s,r]=o[l];Object.defineProperty(e,l,{get:function(){return i(t,s,r)},enumerable:!0,configurable:!0})}return e}function me(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let i=l.read;if(!i&&l.type)switch(l.type){case"enum":i=K(l.values,l.fallback);break;case"integer":i=U;break;case"float":i=Q;break;case"boolean":i=V;break;case"list":i=H;break;case"json":i=J;break;case"string":default:i=S;break}i||(i=S),t[l.prop]=[i,o,l.fallback]}return t}function Ce(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function ye(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pe,window.lnCore.attrSpec=me,window.lnCore.attrStr=S,window.lnCore.attrInt=U,window.lnCore.attrBool=V,window.lnCore.attrList=H,window.lnCore.attrEnum=K,window.lnCore.attrFloat=Q,window.lnCore.attrJson=J);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(o){console.error("["+t.attribute+"] init failed",e,o)}}}function P(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&m(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)m(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function _e(e){const t=z(),o=e.observed||[];for(let l=0;l<o.length;l++){const i=o[l];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 l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const i=t.byDeclaredAttr.get(l);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=ye(e);if(l===null)t.reactiveWildcard.push(e);else for(const i of l)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function X(e,t,o,l){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=z(),i=l.byAttr.get(t),s=$()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!i&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&_(r)){const c=l.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let u=0;u<c.length;u++)G(c[u].spec,n,t,c[u].componentTag,r)}if(window.lnCore._debugSink&&(o||i)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&X(c,r,t,e.oldValue),l.reactiveWildcard.length&&X(l.reactiveWildcard,r,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const n=i[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(P(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function E(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function L(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Se(e){const t=E();if(!t.length)return;const o=e.target;if(o){const i=o.nodeType===1?o:o.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=L();if(e.target&&l.length)for(let i=0;i<l.length;i++){const s=l[i],r=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const r=!!(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(!r)s.matches&&s.matches(n.query)&&m(s,n);else if(s.matches&&s.matches(n.query)&&m(s,n),s.querySelectorAll){const u=s.querySelectorAll(n.query);for(let f=0;f<u.length;f++)m(u[f],n)}}n.onInit&&n.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!r)s.matches&&s.matches(u)&&q(s,n);else if(s.matches&&s.matches(u)&&q(s,n),s.querySelectorAll){const f=s.querySelectorAll(u);for(let d=0;d<f.length;d++)q(f[d],n)}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{Se(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){E().push(e),e.onSubtreeChange&&e.query&&L().push(e),Y()}function Z(e,t,o,l,i={}){const s=i.extraAttributes||[],r=i.onAttributeChange||null,c=i.onSubtreeChange||null,n=i.onInit||null,u=i.onAttrChange||null,f=i.effects||null,d=i.attributes||null,b=d?Ce(d):f,a=d?new Set(Object.keys(d)):null,w=i.persist||null;function h(I){const p=I||document.body;if(P(p,e,t,o),d&&$())for(const y in d){const Ne=d[y],R=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&R.push(p);for(let D=0;D<R.length;D++){const F=R[D];_(F)&&G(Ne,F.getAttribute(y),y,l,F)}}n&&n(p)}const g=[];if(e.indexOf("[")!==-1){const I=/\[([\w-]+)/g;let p;for(;(p=I.exec(e))!==null;)g.push(p[1])}else g.push(e);_e({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:o,onInit:n,observed:g.concat(s),onAttributeChange:r,onAttrChange:u,effects:b,declared:a,persist:w}),ke();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=i.subtreeQuery||(C?e:"["+e+"]"),te={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:v};E().push(te),c&&v&&L().push(te),Y(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Oe);function ne(){Ae()>0?ve(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ne):ne(),h}function ee(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,o={},l=ee(t);if(!l)return o;const i=l.split("&");for(let s=0;s<i.length;s++){const r=i[s];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,u=c>-1?r.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function Ee(e){if(!e)return null;const t=T();return e in t?t[e]:null}function Le(e,t){if(!e)return;const o=T();t==null?delete o[e]:o[e]=String(t);const i=Object.keys(o).map(function(s){const r=o[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");ee(location.hash)!==i&&(location.hash=i)}function qe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Te(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Re(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),i=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=Ee,window.lnCore.hashSet=Le,window.lnCore.hashLinkClick=qe,window.lnCore.resolveHashNamespace=Te,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Re,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Fe);function $e(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=$e),(function(){const e="data-ln-toggle",t="lnToggle",o="data-ln-toggle-for",l="data-ln-toggle-action";if(window[t]!==void 0)return;const i={"data-ln-toggle":{effect:b,type:"enum",values:["open","close"],fallback:"close",description:"Visibility state of toggleable element"},"data-ln-toggle-for":{type:"string",description:"Target element ID to toggle on trigger click"},"data-ln-toggle-action":{type:"enum",values:["open","close","toggle"],fallback:"toggle",description:"Action performed on target element when trigger is clicked"}},s=new Set;let r=null;function c(a,w){return w==="open"?"open":w==="close"||a==="open"?"close":"open"}function n(){r||(r=function(a){if(oe(a))return;const w=a.target.closest("["+o+"]");if(!w||re(w))return;const h=w.getAttribute(o);if(!h)return;const g=document.getElementById(h);if(!g||!g[t])return;a.preventDefault();const C=w.getAttribute(l)||"toggle",v=g.getAttribute(e);g.setAttribute(e,c(v,C))},document.addEventListener("click",r))}function u(){s.size>0||!r||(document.removeEventListener("click",r),r=null)}function f(a,w){if(!a||!a.id)return;const h=document.querySelectorAll("["+o+'="'+a.id+'"]');for(let g=0;g<h.length;g++)h[g].setAttribute("aria-expanded",w?"true":"false")}function d(a){this.dom=a;const w=this;return this._onRequestOpen=function(){w.open()},this._onRequestClose=function(){w.close()},this._onRequestToggle=function(){w.toggle()},this.dom.addEventListener("ln-toggle:request-open",this._onRequestOpen),this.dom.addEventListener("ln-toggle:request-close",this._onRequestClose),this.dom.addEventListener("ln-toggle:request-toggle",this._onRequestToggle),this.isOpen=a.getAttribute(e)==="open",this.isOpen&&a.classList.add("open"),f(a,this.isOpen),s.add(this),n(),this}d.prototype.open=function(){this.dom.setAttribute(e,"open")},d.prototype.close=function(){this.dom.setAttribute(e,"close")},d.prototype.toggle=function(){const a=this.dom.getAttribute(e);this.dom.setAttribute(e,c(a,"toggle"))},d.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-toggle:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-toggle:request-close",this._onRequestClose),this.dom.removeEventListener("ln-toggle:request-toggle",this._onRequestToggle),s.delete(this),delete this.dom[t],u())};function b(a){const w=a[t];if(!w)return;const g=a.getAttribute(e)==="open";if(g!==w.isOpen)if(g){if(N(a,"ln-toggle:before-open",{target:a}).defaultPrevented){a.setAttribute(e,"close");return}w.isOpen=!0,a.classList.add("open"),f(a,!0),x(a,"ln-toggle:open",{target:a})}else{if(N(a,"ln-toggle:before-close",{target:a}).defaultPrevented){a.setAttribute(e,"open");return}w.isOpen=!1,a.classList.remove("open"),f(a,!1),x(a,"ln-toggle:close",{target:a})}}Z(e,t,d,"ln-toggle",{attributes:i,persist:{attr:e,hashActive:null}})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function B(){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 r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!L(r))return}e.apply(console,t)}}function te(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function 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 ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const i=!!(t&&t.typed),r=t&&t.exclude,o={},c=e.elements,l={};if(i)for(let s=0;s<c.length;s++){const n=c[s];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let s=0;s<c.length;s++){const n=c[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")i&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&o[n.name].push(n.options[a].value)}else if(i&&n.type==="hidden")o[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const a=Number(n.value);o[n.name]=n.value===""||isNaN(a)?null:a}else o[n.name]=n.value}return o}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ie(e,t){const i=e.elements,r=[],o={};for(let c=0;c<i.length;c++){const l=i[c];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let c=0;c<i.length;c++){const l=i[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const n=t[s];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const a=String(n).split(",").map(function(f){return f.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=re(n);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<l.options.length;a++)l.options[a].selected=n.indexOf(l.options[a].value)!==-1;r.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ie,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const M={};function le(e,t){M[e]=t}function se(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){te(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function ae(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];j[i]=t}function ue(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=ue,window.lnCore.ensureLocaleObserver=ce);const O={};function de(e,t){O[e]||(O[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=O[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let l=0;l<i.length;l++){const s=i[l],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const s=r[l],n=s.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const f=n[a].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),p=f[1].trim();t[p]!=null&&s.setAttribute(d,t[p])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const s=c[l],n=s.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const f=n[a].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),p=f[1].trim();p in t&&s.classList.toggle(d,!!t[p])}}return e}function fe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<i.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[r],t??null),i[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function W(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const c=i.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const r=function(c,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const l=o[c],s=l.attributes;for(let n=0;n<s.length;n++){const a=s[n];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function we(e,t,i,r,o,c){const l={};for(let n=0;n<e.children.length;n++){const a=e.children[n],f=a.getAttribute("data-ln-render-key");f&&(l[f]=a)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],f=String(r(a));let d=l[f];if(d)o(d,a,n);else{const p=de(i,c);if(!p||(W(p,a),d=p.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",f),o(d,a,n)}s.appendChild(d)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=R,window.lnCore.lnFill=fe,window.lnCore.renderList=we);function T(e,t,i){const r=e.getAttribute(t);return r===null?i:r}function U(e,t,i){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?i:r}function P(e,t,i=!1){const r=e.getAttribute(t);if(r===null)return!!i;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const D=new Map;function V(e,t){const i=(e?e.join("|"):"")+"::"+t;if(D.has(i))return D.get(i);const r=new Set(e||[]),o=function(c,l){const s=c.getAttribute(l);return s!==null&&r.has(s)?s:t};return D.set(i,o),o}function Q(e,t,i){const r=parseFloat(e.getAttribute(t));return isNaN(r)?i:r}function J(e,t,i){const r=e.getAttribute(t);if(!r)return i;try{return JSON.parse(r)}catch{return i}}function K(e,t,i,r,o){if(!e||t===null)return!0;const c=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(s(`[${c}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(s(`[${c}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(s(`[${c}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(s(`[${c}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return s(`[${c}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function pe(e,t,i){for(const r in i){const[o,c,l]=i[r];Object.defineProperty(e,r,{get:function(){return o(t,c,l)},enumerable:!0,configurable:!0})}return e}function he(e){const t={};for(const i in e){const r=e[i];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=V(r.values,r.fallback);break;case"integer":o=U;break;case"float":o=Q;break;case"boolean":o=P;break;case"list":o=H;break;case"json":o=J;break;case"string":default:o=T;break}o||(o=T),t[r.prop]=[o,i,r.fallback]}return t}function be(e){const t={};for(const i in e){const r=e[i];r&&r.effect&&(t[i]=r.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pe,window.lnCore.attrSpec=he,window.lnCore.attrStr=T,window.lnCore.attrInt=U,window.lnCore.attrBool=P,window.lnCore.attrList=H,window.lnCore.attrEnum=V,window.lnCore.attrFloat=Q,window.lnCore.attrJson=J);function _(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(i){console.error("["+t.attribute+"] init failed",e,i)}}}function G(e,t,i,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:i,ComponentFn:r};if(e.matches&&e.matches(c)&&_(e,l),e.querySelectorAll){const s=e.querySelectorAll(c);for(let n=0;n<s.length;n++)_(s[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ge(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ce(e){const t=X(),i=e.observed||[];for(let r=0;r<i.length;r++){const o=i[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=me(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function z(e,t,i,r){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const l=c.effects&&c.effects[i];l?l(t,i,r):c.onAttrChange&&(!c.declared||c.declared.has(i))&&c.onAttrChange(t,i,r)}}function ve(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,r=X(),o=r.byAttr.get(t),c=B()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!i&&!o&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&L(l)){const s=r.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let a=0;a<s.length;a++)K(s[a].spec,n,t,s[a].componentTag,l)}if(window.lnCore._debugSink&&(i||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),i){const s=r.byReactive.get(t);s&&z(s,l,t,e.oldValue),r.reactiveWildcard.length&&z(r.reactiveWildcard,l,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const n=o[s];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(G(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{ve(t[i])}catch(r){console.error("[ln-core] mutation handler failed",t[i].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function I(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function F(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function _e(e){const t=I();if(!t.length)return;const i=e.target;if(i){const r=i.nodeType===1?i:i.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const o=t[r];if(o.onSubtreeChange&&o.query){const c=o.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;l&&o.onSubtreeChange(l,e)}}for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)o.matches&&o.matches(s.query)&&_(o,s);else if(o.matches&&o.matches(s.query)&&_(o,s),o.querySelectorAll){const n=o.querySelectorAll(s.query);for(let a=0;a<n.length;a++)_(n[a],s)}}s.onInit&&s.onInit(o)}}}for(let r=0;r<e.removedNodes.length;r++){const o=e.removedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l],n=s.query;if(n){if(!c)o.matches&&o.matches(n)&&F(o,s);else if(o.matches&&o.matches(n)&&F(o,s),o.querySelectorAll){const a=o.querySelectorAll(n);for(let f=0;f<a.length;f++)F(a[f],s)}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.type==="childList")try{_e(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){I().push(e),Y()}function Z(e,t,i,r,o={}){const c=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,n=o.onInit||null,a=o.onAttrChange||null,f=o.effects||null,d=o.attributes||null,p=d?be(d):f,A=d?new Set(Object.keys(d)):null,v=o.persist||null;function C(b){const h=b||document.body;if(G(h,e,t,i),d&&B())for(const w in d){const q=d[w],x=Array.from(h.querySelectorAll("["+w+"]"));h.matches&&h.matches("["+w+"]")&&x.push(h);for(let k=0;k<x.length;k++){const E=x[k];L(E)&&K(q,E.getAttribute(w),w,r,E)}}n&&n(h)}const g=[];if(e.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let h;for(;(h=b.exec(e))!==null;)g.push(h[1])}else g.push(e);Ce({selector:e,attribute:t,componentTag:r,attributes:d,ComponentFn:i,onInit:n,observed:g.concat(c),onAttributeChange:l,onAttrChange:a,effects:p,declared:A,persist:v}),Ae();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,y=o.subtreeQuery||(m?e:"["+e+"]");I().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:s,query:y}),Y(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=xe);function u(){ge()>0?ye(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",u):u(),C}function ee(e){return(e||"").replace(/^#/,"")}function N(e){const t=e===void 0?location.hash:e,i={},r=ee(t);if(!r)return i;const o=r.split("&");for(let c=0;c<o.length;c++){const l=o[c];if(!l)continue;const s=l.indexOf(":"),n=s>-1?l.slice(0,s):l,a=s>-1?l.slice(s+1):"";if(n)try{i[n]=decodeURIComponent(a)}catch{i[n]=a}}return i}function ke(e){if(!e)return null;const t=N();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const i=N();t==null?delete i[e]:i[e]=String(t);const o=Object.keys(i).map(function(c){const l=i[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");ee(location.hash)!==o&&(location.hash=o)}function Se(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Te(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:i,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=N,window.lnCore.hashGet=ke,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Se,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Te,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);function Fe(e,t,i,r){const o=r,c=window.innerWidth,l=window.innerHeight,s=t.width,n=t.height,a=i.split("-"),f=a[0],d=a[1]==="start"||a[1]==="end"?a[1]:"center",p={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=p[f]||p.bottom;function v(u){return u==="top"||u==="bottom"?d==="start"?e.left:d==="end"?e.right-s:e.left+(e.width-s)/2:d==="start"?e.top:d==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(u){let b,h,w=!0;return u==="top"?(b=e.top-o-n,h=v(u),b<0&&(w=!1)):u==="bottom"?(b=e.bottom+o,h=v(u),b+n>l&&(w=!1)):u==="left"?(b=v(u),h=e.left-o-s,h<0&&(w=!1)):(b=v(u),h=e.right+o,h+s>c&&(w=!1)),{top:b,left:h,side:u,fits:w}}let g=null;for(let u=0;u<A.length;u++){const b=C(A[u]);if(b.fits){g=b;break}}g||(g=C(A[0]));let m=g.top,y=g.left;return s>=c?y=0:(y<0&&(y=0),y+s>c&&(y=c-s)),n>=l?m=0:(m<0&&(m=0),m+n>l&&(m=l-n)),{top:m,left:y,placement:g.side}}function Ne(){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=Ne),(function(){const e="data-ln-tooltip-enhance",t="data-ln-tooltip",i="data-ln-tooltip-position",r="lnTooltipEnhance",o="ln-tooltip-portal";if(window[r]!==void 0)return;const c={"data-ln-tooltip-enhance":{type:"marker",description:"Activates enhanced tooltip behavior on element or container"},"data-ln-tooltip-enhanced":{type:"marker",description:"Runtime marker applied to enhanced tooltip trigger"},"data-ln-tooltip":{type:"string",description:"Tooltip text content to display"},"data-ln-tooltip-position":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:"top",description:"Preferred positioning anchor"},"data-ln-tooltip-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"}};let l=0,s=null,n=null,a=null,f=null,d=null,p=null;function A(){return s&&s.parentNode||(s=document.getElementById(o),s||(s=document.createElement("div"),s.id=o,document.body.appendChild(s)),s.hasAttribute("popover")||s.setAttribute("popover","manual")),s}function v(){p||(p=function(u){u.key==="Escape"&&m()},document.addEventListener("keydown",p))}function C(){p&&(document.removeEventListener("keydown",p),p=null)}function g(u){if(a===u)return;m();const b=u.getAttribute(t)||u.getAttribute("title");if(!b)return;A(),typeof s.showPopover=="function"&&s.showPopover(),u.hasAttribute("title")&&(f=u.getAttribute("title"),u.removeAttribute("title"));const h=u.getAttribute("aria-describedby");h?d=h:d=null;const w=document.createElement("div");w.className="ln-tooltip",w.textContent=b,u[r+"Uid"]||(l+=1,u[r+"Uid"]="ln-tooltip-"+l),w.id=u[r+"Uid"],s.appendChild(w);const q=w.offsetWidth,x=w.offsetHeight,k=u.getBoundingClientRect(),E=u.getAttribute(i)||"top",$=Fe(k,{width:q,height:x},E,6);w.style.top=$.top+"px",w.style.left=$.left+"px",w.setAttribute("data-ln-tooltip-placement",$.placement),d?u.setAttribute("aria-describedby",d+" "+w.id):u.setAttribute("aria-describedby",w.id),n=w,a=u,v()}function m(){if(!n){C();return}a&&(d!==null?a.setAttribute("aria-describedby",d):a.removeAttribute("aria-describedby"),d=null,f!==null&&a.setAttribute("title",f)),f=null,n.parentNode&&n.parentNode.removeChild(n),n=null,a=null,s&&typeof s.hidePopover=="function"&&s.matches(":popover-open")&&s.hidePopover(),C()}function y(u){return this.dom=u,u.hasAttribute("data-ln-tooltip-enhanced")||(u.setAttribute("data-ln-tooltip-enhanced",""),this._addedEnhancedAttr=!0),this._onEnter=function(){g(u)},this._onLeave=function(){a===u&&!u.contains(document.activeElement)&&m()},this._onFocus=function(){g(u)},this._onBlur=function(){a===u&&!u.matches(":hover")&&m()},u.addEventListener("mouseenter",this._onEnter),u.addEventListener("mouseleave",this._onLeave),u.addEventListener("focus",this._onFocus,!0),u.addEventListener("blur",this._onBlur,!0),this}y.prototype.destroy=function(){const u=this.dom;u.removeEventListener("mouseenter",this._onEnter),u.removeEventListener("mouseleave",this._onLeave),u.removeEventListener("focus",this._onFocus,!0),u.removeEventListener("blur",this._onBlur,!0),a===u&&m(),this._addedEnhancedAttr&&u.removeAttribute("data-ln-tooltip-enhanced"),delete u[r],delete u[r+"Uid"]},Z("["+e+"], [data-ln-tooltip-enhanced], ["+t+"][title]",r,y,"ln-tooltip",{attributes:c})})()})();
|
|
1
|
+
(function(){"use strict";function M(){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 O(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(!O(i))return}e.apply(console,t)}}function ne(e,t,o){const i=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function L(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){L(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const o=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,r={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[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")o&&r[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(o&&n.type==="hidden")l[n.name]=n.value;else if(o&&(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 ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const o=e.elements,i=[],l={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(l[r.name]=(l[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const n=t[c];if(r.type==="checkbox"){if(Array.isArray(n))r.checked=n.indexOf(r.value)!==-1;else if(l[r.name]>1){const a=String(n).split(",").map(function(f){return f.trim()});r.checked=a.indexOf(r.value)!==-1}else r.checked=ie(n);i.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),i.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<r.options.length;a++)r.options[a].selected=n.indexOf(r.options[a].value)!==-1;i.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),i.push(r)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const R={};function se(e,t){R[e]=t}function ce(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,L(function(){new MutationObserver(function(){ne(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function ue(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];j[o]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ae);const T={};function fe(e,t){T[e]||(T[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=T[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[r],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<i.length;r++){const c=i[r],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const f=n[a].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),p=f[1].trim();t[p]!=null&&c.setAttribute(d,t[p])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const f=n[a].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),p=f[1].trim();p in t&&c.classList.toggle(d,!!t[p])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<o.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[i],t??null),o[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function U(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,r){return t[r]!==void 0?t[r]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const r=l[s],c=r.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&r.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function pe(e,t,o,i,l,s){const r={};for(let n=0;n<e.children.length;n++){const a=e.children[n],f=a.getAttribute("data-ln-render-key");f&&(r[f]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],f=String(i(a));let d=r[f];if(d)l(d,a,n);else{const p=fe(o,s);if(!p||(U(p,a),d=p.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",f),l(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=W,window.lnCore.lnFill=we,window.lnCore.renderList=pe);function D(e,t,o){const i=e.getAttribute(t);return i===null?o:i}function P(e,t,o){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?o:i}function H(e,t,o=!1){const i=e.getAttribute(t);if(i===null)return!!o;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const I=new Map;function Q(e,t){const o=(e?e.join("|"):"")+"::"+t;if(I.has(o))return I.get(o);const i=new Set(e||[]),l=function(s,r){const c=s.getAttribute(r);return c!==null&&i.has(c)?c:t};return I.set(o,l),l}function J(e,t,o){const i=parseFloat(e.getAttribute(t));return isNaN(i)?o:i}function K(e,t,o){const i=e.getAttribute(t);if(!i)return o;try{return JSON.parse(i)}catch{return o}}function G(e,t,o,i,l){if(!e||t===null)return!0;const s=i||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(r==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function he(e,t,o){for(const i in o){const[l,s,r]=o[i];Object.defineProperty(e,i,{get:function(){return l(t,s,r)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const o in e){const i=e[o];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=Q(i.values,i.fallback);break;case"integer":l=P;break;case"float":l=J;break;case"boolean":l=H;break;case"list":l=V;break;case"json":l=K;break;case"string":default:l=D;break}l||(l=D),t[i.prop]=[l,o,i.fallback]}return t}function me(e){const t={};for(const o in e){const i=e[o];i&&i.effect&&(t[o]=i.effect)}return Object.keys(t).length?t:null}function ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=he,window.lnCore.attrSpec=be,window.lnCore.attrStr=D,window.lnCore.attrInt=P,window.lnCore.attrBool=H,window.lnCore.attrList=V,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);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(o){console.error("["+t.attribute+"] init failed",e,o)}}}function X(e,t,o,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:i};if(e.matches&&e.matches(s)&&k(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)k(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ve(e){const t=z(),o=e.observed||[];for(let i=0;i<o.length;i++){const l=o[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=ge(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 Y(e,t,o,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,i):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,i)}}function Ae(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,i=z(),l=i.byAttr.get(t),s=M()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&O(r)){const c=i.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let a=0;a<c.length;a++)G(c[a].spec,n,t,c[a].componentTag,r)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=i.byReactive.get(t);c&&Y(c,r,t,e.oldValue),i.reactiveWildcard.length&&Y(i.reactiveWildcard,r,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(X(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,L(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ae(t[o])}catch(i){console.error("[ln-core] mutation handler failed",t[o].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function F(){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 q(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=F();if(!t.length)return;const o=e.target;if(o){const l=o.nodeType===1?o:o.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=N();if(e.target&&i.length)for(let l=0;l<i.length;l++){const s=i[l],r=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const r=!!(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(!r)s.matches&&s.matches(n.query)&&k(s,n);else if(s.matches&&s.matches(n.query)&&k(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let f=0;f<a.length;f++)k(a[f],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 r=!!(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(!r)s.matches&&s.matches(a)&&q(s,n);else if(s.matches&&s.matches(a)&&q(s,n),s.querySelectorAll){const f=s.querySelectorAll(a);for(let d=0;d<f.length;d++)q(f[d],n)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,L(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const i=t[o];if(i.type==="childList")try{xe(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ke(e){F().push(e),e.onSubtreeChange&&e.query&&N().push(e),Z()}function ee(e,t,o,i,l={}){const s=l.extraAttributes||[],r=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,a=l.onAttrChange||null,f=l.effects||null,d=l.attributes||null,p=d?me(d):f,A=d?new Set(Object.keys(d)):null,v=l.persist||null;function C(m){const w=m||document.body;if(X(w,e,t,o),d&&M())for(const _ in d){const B=d[_],E=Array.from(w.querySelectorAll("["+_+"]"));w.matches&&w.matches("["+_+"]")&&E.push(w);for(let S=0;S<E.length;S++){const x=E[S];O(x)&&G(B,x.getAttribute(_),_,i,x)}}n&&n(w)}const g=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let w;for(;(w=m.exec(e))!==null;)g.push(w[1])}else g.push(e);ve({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:o,onInit:n,observed:g.concat(s),onAttributeChange:r,onAttrChange:a,effects:p,declared:A,persist:v}),_e();const b=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,y=l.subtreeQuery||(b?e:"["+e+"]"),u={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:y};F().push(u),c&&y&&N().push(u),Z(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=ke);function h(){ye()>0?Ce(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),C}function te(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,o={},i=te(t);if(!i)return o;const l=i.split("&");for(let s=0;s<l.length;s++){const r=l[s];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,a=c>-1?r.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function Ee(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Se(e,t){if(!e)return;const o=$();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const r=o[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");te(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Oe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=Ee,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=Fe);function Ne(e,t,o,i){const l=i,s=window.innerWidth,r=window.innerHeight,c=t.width,n=t.height,a=o.split("-"),f=a[0],d=a[1]==="start"||a[1]==="end"?a[1]:"center",p={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=p[f]||p.bottom;function v(u){return u==="top"||u==="bottom"?d==="start"?e.left:d==="end"?e.right-c:e.left+(e.width-c)/2:d==="start"?e.top:d==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(u){let h,m,w=!0;return u==="top"?(h=e.top-l-n,m=v(u),h<0&&(w=!1)):u==="bottom"?(h=e.bottom+l,m=v(u),h+n>r&&(w=!1)):u==="left"?(h=v(u),m=e.left-l-c,m<0&&(w=!1)):(h=v(u),m=e.right+l,m+c>s&&(w=!1)),{top:h,left:m,side:u,fits:w}}let g=null;for(let u=0;u<A.length;u++){const h=C(A[u]);if(h.fits){g=h;break}}g||(g=C(A[0]));let b=g.top,y=g.left;return c>=s?y=0:(y<0&&(y=0),y+c>s&&(y=s-c)),n>=r?b=0:(b<0&&(b=0),b+n>r&&(b=r-n)),{top:b,left:y,placement:g.side}}function qe(){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=qe),(function(){const e="data-ln-tooltip-enhance",t="data-ln-tooltip",o="data-ln-tooltip-position",i="lnTooltipEnhance",l="ln-tooltip-portal";if(window[i]!==void 0)return;const s={"data-ln-tooltip-enhance":{type:"marker",description:"Activates enhanced tooltip behavior on element or container"},"data-ln-tooltip-enhanced":{type:"marker",description:"Runtime marker applied to enhanced tooltip trigger"},"data-ln-tooltip":{type:"string",description:"Tooltip text content to display"},"data-ln-tooltip-position":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:"top",description:"Preferred positioning anchor"},"data-ln-tooltip-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"}};let r=0,c=null,n=null,a=null,f=null,d=null,p=null;function A(){return c&&c.parentNode||(c=document.getElementById(l),c||(c=document.createElement("div"),c.id=l,document.body.appendChild(c)),c.hasAttribute("popover")||c.setAttribute("popover","manual")),c}function v(){p||(p=function(u){u.key==="Escape"&&b()},document.addEventListener("keydown",p))}function C(){p&&(document.removeEventListener("keydown",p),p=null)}function g(u){if(a===u)return;b();const h=u.getAttribute(t)||u.getAttribute("title");if(!h)return;A(),typeof c.showPopover=="function"&&c.showPopover(),u.hasAttribute("title")&&(f=u.getAttribute("title"),u.removeAttribute("title"));const m=u.getAttribute("aria-describedby");m?d=m:d=null;const w=document.createElement("div");w.className="ln-tooltip",w.textContent=h,u[i+"Uid"]||(r+=1,u[i+"Uid"]="ln-tooltip-"+r),w.id=u[i+"Uid"],c.appendChild(w);const _=w.offsetWidth,B=w.offsetHeight,E=u.getBoundingClientRect(),S=u.getAttribute(o)||"top",x=Ne(E,{width:_,height:B},S,6);w.style.top=x.top+"px",w.style.left=x.left+"px",w.setAttribute("data-ln-tooltip-placement",x.placement),d?u.setAttribute("aria-describedby",d+" "+w.id):u.setAttribute("aria-describedby",w.id),n=w,a=u,v()}function b(){if(!n){C();return}a&&(d!==null?a.setAttribute("aria-describedby",d):a.removeAttribute("aria-describedby"),d=null,f!==null&&a.setAttribute("title",f)),f=null,n.parentNode&&n.parentNode.removeChild(n),n=null,a=null,c&&typeof c.hidePopover=="function"&&c.matches(":popover-open")&&c.hidePopover(),C()}function y(u){return this.dom=u,u.hasAttribute("data-ln-tooltip-enhanced")||(u.setAttribute("data-ln-tooltip-enhanced",""),this._addedEnhancedAttr=!0),this._onEnter=function(){g(u)},this._onLeave=function(){a===u&&!u.contains(document.activeElement)&&b()},this._onFocus=function(){g(u)},this._onBlur=function(){a===u&&!u.matches(":hover")&&b()},u.addEventListener("mouseenter",this._onEnter),u.addEventListener("mouseleave",this._onLeave),u.addEventListener("focus",this._onFocus,!0),u.addEventListener("blur",this._onBlur,!0),this}y.prototype.destroy=function(){const u=this.dom;u.removeEventListener("mouseenter",this._onEnter),u.removeEventListener("mouseleave",this._onLeave),u.removeEventListener("focus",this._onFocus,!0),u.removeEventListener("blur",this._onBlur,!0),a===u&&b(),this._addedEnhancedAttr&&u.removeAttribute("data-ln-tooltip-enhanced"),delete u[i],delete u[i+"Uid"]},ee("["+e+"], [data-ln-tooltip-enhanced], ["+t+"][title]",i,y,"ln-tooltip",{attributes:s})})()})();
|