@livenetworks/ashlar 2.0.7 → 2.0.8
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/LICENSE +641 -641
- package/components/COMPONENTS.md +1116 -1116
- package/components/index.js +81 -81
- package/components/ln-accordion/ln-accordion-dev.scss +8 -8
- package/components/ln-accordion/ln-accordion.js +1 -1
- package/components/ln-accordion/ln-accordion.schema.json +30 -30
- package/components/ln-ajax/ln-ajax-dev.scss +8 -8
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-ajax/ln-ajax.schema.json +30 -30
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-connector/ln-api-connector.schema.json +96 -96
- package/components/ln-api-connector/src/ln-api-connector.js +1 -0
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-api-queue/ln-api-queue.schema.json +34 -34
- package/components/ln-api-queue/src/ln-api-queue.js +3 -13
- package/components/ln-autoresize/ln-autoresize-dev.scss +8 -8
- package/components/ln-autoresize/ln-autoresize.js +1 -1
- package/components/ln-autoresize/ln-autoresize.schema.json +22 -22
- package/components/ln-autosave/ln-autosave-dev.scss +13 -13
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-autosave/ln-autosave.schema.json +48 -48
- package/components/ln-autosave/src/autosave-model.js +34 -34
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-chart/ln-chart.schema.json +146 -146
- package/components/ln-chart/src/chart-model.js +154 -154
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.schema.json +42 -42
- package/components/ln-confirm/ln-confirm-dev.scss +24 -24
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-confirm/ln-confirm.schema.json +66 -66
- package/components/ln-confirm/src/ln-confirm.js +178 -178
- package/components/ln-core/crypto.js +286 -265
- package/components/ln-core/dom.js +115 -115
- package/components/ln-core/form.js +136 -136
- package/components/ln-core/helpers.js +33 -33
- package/components/ln-core/http.js +48 -48
- package/components/ln-core/index.js +1 -1
- package/components/ln-core/ln-core.schema.json +109 -109
- package/components/ln-core/locale.js +55 -55
- package/components/ln-core/matching.js +78 -78
- package/components/ln-core/number.js +125 -125
- package/components/ln-core/template.js +206 -206
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-couchdb-connector/ln-couchdb-connector.schema.json +50 -50
- package/components/ln-couchdb-connector/src/ln-couchdb-connector.js +1 -0
- package/components/ln-data-coordinator/README.md +9 -38
- package/components/ln-data-coordinator/ln-data-coordinator-dev.scss +8 -8
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-coordinator/ln-data-coordinator.schema.json +16 -16
- package/components/ln-data-coordinator/src/data-read-policy.js +0 -7
- package/components/ln-data-coordinator/src/ln-data-coordinator.js +428 -1308
- package/components/ln-data-store/ln-data-store-dev.scss +13 -13
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-data-store/ln-data-store.schema.json +84 -84
- package/components/ln-data-store/src/data-store-model.js +184 -184
- package/components/ln-data-store/src/ln-data-store.js +1 -1
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-date/ln-date.schema.json +92 -92
- package/components/ln-date/src/date-model.js +186 -186
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-debug/ln-debug.schema.json +28 -28
- package/components/ln-debug/src/console-sink.js +19 -19
- package/components/ln-debug/src/gate.js +95 -95
- package/components/ln-debug/src/generated-attributes.js +2 -2
- package/components/ln-dropdown/ln-dropdown-dev.scss +13 -13
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-editor/ln-editor.schema.json +58 -58
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-external-links/ln-external-links.schema.json +18 -18
- package/components/ln-fill/ln-fill.js +1 -1
- package/components/ln-fill/ln-fill.schema.json +23 -23
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/ln-filter.schema.json +153 -153
- package/components/ln-filter/src/filter-model.js +185 -185
- package/components/ln-form/ln-form-dev.scss +8 -8
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-form/ln-form.schema.json +45 -45
- package/components/ln-http/ln-http.js +1 -1
- package/components/ln-http/ln-http.schema.json +6 -6
- package/components/ln-icon/ln-icon.schema.json +6 -6
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-include/ln-include.schema.json +23 -23
- package/components/ln-key/ln-key-dev.scss +18 -18
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-key/ln-key.schema.json +56 -56
- package/components/ln-key/src/ln-key.js +10 -10
- package/components/ln-link/ln-link-dev.scss +8 -8
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-link/ln-link.schema.json +22 -22
- package/components/ln-list/README.md +152 -152
- package/components/ln-list/ln-list-dev.scss +8 -8
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-list/ln-list.schema.json +166 -166
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-modal/ln-modal.schema.json +65 -65
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-nav/ln-nav.schema.json +25 -25
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-number/ln-number.schema.json +63 -63
- package/components/ln-number/src/number-model.js +31 -31
- package/components/ln-obfuscator/README.md +60 -60
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-obfuscator/ln-obfuscator.schema.json +49 -49
- package/components/ln-obfuscator/src/ln-obfuscator.js +159 -159
- package/components/ln-obfuscator/src/obfuscator-model.js +250 -250
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-options/ln-options.schema.json +41 -41
- package/components/ln-persist/README.md +151 -151
- package/components/ln-persist/ln-persist.js +1 -1
- package/components/ln-persist/ln-persist.schema.json +28 -28
- package/components/ln-persist/src/ln-persist.js +83 -83
- package/components/ln-picklist/README.md +230 -230
- package/components/ln-picklist/ln-picklist-dev.scss +22 -22
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-picklist/ln-picklist.schema.json +49 -49
- package/components/ln-picklist/src/ln-picklist.js +228 -228
- package/components/ln-popover/ln-popover-dev.scss +13 -13
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-popover/ln-popover.schema.json +82 -82
- package/components/ln-progress/ln-progress-dev.scss +8 -8
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-progress/ln-progress.schema.json +40 -40
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-router/ln-router.schema.json +76 -76
- package/components/ln-scroll/README.md +45 -45
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-scroll/ln-scroll.schema.json +85 -85
- package/components/ln-scroll/src/ln-scroll.js +150 -150
- package/components/ln-search/README.md +188 -188
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-search/ln-search.schema.json +103 -103
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-slug/ln-slug.schema.json +23 -23
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sort/ln-sort.schema.json +104 -104
- package/components/ln-sort/src/ln-sort.js +321 -321
- package/components/ln-sort/src/sort-model.js +117 -117
- package/components/ln-sortable/ln-sortable-dev.scss +13 -13
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-sortable/ln-sortable.schema.json +36 -36
- package/components/ln-stat/ln-stat-dev.scss +8 -8
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-stat/ln-stat.schema.json +32 -32
- package/components/ln-stat/src/stat-model.js +28 -28
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table/ln-table.schema.json +211 -211
- package/components/ln-table/src/table-model.js +98 -98
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-table-coordinator/ln-table-coordinator.schema.json +93 -93
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-tabs/ln-tabs.schema.json +75 -75
- package/components/ln-tabs/src/ln-tabs.js +208 -208
- package/components/ln-tabs/src/tabs-model.js +82 -82
- package/components/ln-time/ln-time-dev.scss +13 -13
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-time/ln-time.schema.json +38 -38
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toast/ln-toast.schema.json +65 -65
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-toggle/ln-toggle.schema.json +52 -52
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-tooltip/ln-tooltip.schema.json +86 -86
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-translations/ln-translations.schema.json +120 -120
- package/components/ln-ui-coordinator/README.md +62 -62
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.schema.json +28 -28
- package/components/ln-ui-coordinator/src/ln-ui-coordinator.js +140 -140
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-upload/ln-upload.schema.json +193 -193
- package/components/ln-upload/src/upload-model.js +78 -78
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-validate/ln-validate.schema.json +50 -50
- package/components/ln-validate/src/validate-model.js +64 -64
- package/components/ln-websocket-connector/README.md +166 -166
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/components/ln-websocket-connector/ln-websocket-connector.schema.json +29 -29
- package/components/ln-websocket-connector/src/ln-websocket-connector.js +283 -279
- package/ln-ashlar.html-data.json +7 -8
- package/package.json +84 -84
- package/theme/brand.css +73 -73
- package/theme/components/_confirm.scss +6 -6
- package/theme/components/_picklist.scss +3 -3
- package/theme/config/_palette.scss +274 -274
- package/theme/config/_theme.scss +292 -292
- package/theme/config/_tokens.scss +285 -285
- package/theme/config/mixins/_index.scss +62 -62
- package/theme/config/mixins/_picklist.scss +66 -66
- package/theme/ln-ashlar-dev.scss +66 -66
- package/theme/ln-ashlar-landing.scss +56 -56
- package/theme/ln-ashlar-theme.scss +63 -63
- package/theme/presentation/_bento.scss +151 -151
- package/theme/presentation/_cta.scss +111 -111
- package/theme/presentation/_effects.scss +216 -216
- package/theme/presentation/_features.scss +108 -108
- package/theme/presentation/_footer.scss +129 -129
- package/theme/presentation/_hero.scss +158 -158
- package/theme/presentation/_layout.scss +170 -170
- package/theme/presentation/_navbar.scss +140 -140
- package/theme/presentation/_pricing.scss +262 -262
- package/theme/presentation/_stats.scss +87 -87
- package/theme/presentation/_testimonials.scss +124 -124
- package/theme/presentation/_tokens.scss +39 -39
- package/theme/presentation/_typography.scss +163 -163
- package/web-types.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function S(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function g(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 a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){l=t[a];break}if(!g(l))return}e.apply(console,t)}}function b(e,t,n){const l=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function w(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){w(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const C={};function x(e,t){C[e]=t}function L(e){return C[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=x,window.lnCore.getDataMapper=L);function $(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,w(function(){new MutationObserver(function(){b(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const m={};function O(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];m[n]=t}function D(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=O,window.lnCore.getLocaleFallback=D,window.lnCore.ensureLocaleObserver=$);const h={};function E(e,t){h[e]||(h[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=h[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const i=n[o],r=i.getAttribute("data-ln-field");t[r]!=null&&(i.textContent=t[r])}const l=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<l.length;o++){const i=l[o],r=i.getAttribute("data-ln-attr").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&i.setAttribute(d,t[f])}}const a=e.querySelectorAll("[data-ln-show]");for(let o=0;o<a.length;o++){const i=a[o],r=i.getAttribute("data-ln-show");r in t&&i.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const i=s[o],r=i.getAttribute("data-ln-class").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&i.classList.toggle(d,!!t[f])}}return e}function T(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<n.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[l],t??null),n[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)y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function A(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const l=function(s,o){return t[o]!==void 0?t[o]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let s=0;s<a.length;s++){const o=a[s],i=o.attributes;for(let r=0;r<i.length;r++){const c=i[r];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function F(e,t,n,l,a,s){const o={};for(let r=0;r<e.children.length;r++){const c=e.children[r],u=c.getAttribute("data-ln-render-key");u&&(o[u]=c)}const i=document.createDocumentFragment();for(let r=0;r<t.length;r++){const c=t[r],u=String(l(c));let d=o[u];if(d)a(d,c,r);else{const f=E(n,s);if(!f||(A(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),a(d,c,r)}i.appendChild(d)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=A,window.lnCore.fill=y,window.lnCore.lnFill=T,window.lnCore.renderList=F);function I(e,t,n,l,a){if(!e||t===null)return!0;const s=l||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=r=>{a?console.warn(r,a):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(i(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(i(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(i(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(i(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return i(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function M(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function R(e,t,n,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&o.push(e);for(const i of o)if(!i[n]){window.lnCore._persistSink&&i.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(i,t);try{i[n]=new l(i)}catch(r){console.error("["+n+"] init failed",i,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function k(){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 W(e){const t=k(),n=e.observed||[];for(let l=0;l<n.length;l++){const a=n[l];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const a=t.byDeclaredAttr.get(l);a.some(s=>s.componentTag===e.componentTag)||a.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=M(e);if(l===null)t.reactiveWildcard.push(e);else for(const a of l)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function _(e,t,n,l){for(let a=0;a<e.length;a++){const s=e[a];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,l):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,l)}}function q(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const l=k(),a=l.byAttr.get(n);if(S()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(n)&&g(t)){const s=l.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let i=0;i<s.length;i++)I(s[i].spec,o,n,s[i].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||a)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=l.byReactive.get(n);s&&_(s,t,n,e.oldValue),l.reactiveWildcard.length&&_(l.reactiveWildcard,t,n,e.oldValue)}if(a)for(let s=0;s<a.length;s++){const o=a[s];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(R(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function B(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,w(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{q(t[n])}catch(l){console.error("[ln-core] mutation handler failed",t[n].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(e,t){W({observed:e,handler:t}),B()}function v(e){return(e||"").replace(/^#/,"")}function p(e){const t=e===void 0?location.hash:e,n={},l=v(t);if(!l)return n;const a=l.split("&");for(let s=0;s<a.length;s++){const o=a[s];if(!o)continue;const i=o.indexOf(":"),r=i>-1?o.slice(0,i):o,c=i>-1?o.slice(i+1):"";if(r)try{n[r]=decodeURIComponent(c)}catch{n[r]=c}}return n}function j(e){if(!e)return null;const t=p();return e in t?t[e]:null}function N(e,t){if(!e)return;const n=p();t==null?delete n[e]:n[e]=String(t);const a=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");v(location.hash)!==a&&(location.hash=a)}function H(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function U(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const 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 K(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function G(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 J(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Q(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),l=e.slice(t+1),a=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=p,window.lnCore.hashGet=j,window.lnCore.hashSet=N,window.lnCore.hashLinkClick=H,window.lnCore.resolveHashNamespace=U,window.lnCore.hashSortEncode=K,window.lnCore.hashSortDecode=G,window.lnCore.hashFilterEncode=J,window.lnCore.hashFilterDecode=Q),(function(){const e="lnExternalLinks";if(window[e]!==void 0)return;function t(i){return i.hostname&&i.hostname!==window.location.hostname}function n(i){if(i.getAttribute("data-ln-external-link")==="processed"||!t(i))return;i.target="_blank";const r=(i.rel||"").split(/\s+/).filter(Boolean);r.includes("noopener")||r.push("noopener"),r.includes("noreferrer")||r.push("noreferrer"),i.rel=r.join(" ");const c=document.createElement("span");c.className="sr-only",c.textContent="(opens in new tab)",i.appendChild(c),i.setAttribute("data-ln-external-link","processed"),b(i,"ln-external-links:processed",{link:i,href:i.href})}function l(i){i=i||document.body;for(const r of i.querySelectorAll("a, area"))n(r)}function a(){w(function(){document.body.addEventListener("click",function(i){const r=i.target.closest("a, area");r&&r.getAttribute("data-ln-external-link")==="processed"&&b(r,"ln-external-links:clicked",{link:r,href:r.href,text:r.textContent||r.title||""})})},"ln-external-links")}function s(){w(function(){new MutationObserver(function(r){for(const c of r)if(c.type==="childList"){for(const u of c.addedNodes)if(u.nodeType===1&&(u.matches&&(u.matches("a")||u.matches("area"))&&n(u),u.querySelectorAll))for(const d of u.querySelectorAll("a, area"))n(d)}}).observe(document.body,{childList:!0,subtree:!0}),V(["href"],function(r){r.matches&&(r.matches("a")||r.matches("area"))&&n(r)})},"ln-external-links")}function o(){a(),s(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){l()}):l()}window[e]={process:l},o()})()})();
|
|
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 g(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 a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){l=t[a];break}if(!g(l))return}e.apply(console,t)}}function b(e,t,n){const l=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function w(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){w(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const C={};function S(e,t){C[e]=t}function L(e){return C[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=S,window.lnCore.getDataMapper=L);function $(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,w(function(){new MutationObserver(function(){b(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const m={};function O(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];m[n]=t}function D(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=O,window.lnCore.getLocaleFallback=D,window.lnCore.ensureLocaleObserver=$);const h={};function E(e,t){h[e]||(h[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=h[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const i=n[o],r=i.getAttribute("data-ln-field");t[r]!=null&&(i.textContent=t[r])}const l=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<l.length;o++){const i=l[o],r=i.getAttribute("data-ln-attr").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&i.setAttribute(d,t[f])}}const a=e.querySelectorAll("[data-ln-show]");for(let o=0;o<a.length;o++){const i=a[o],r=i.getAttribute("data-ln-show");r in t&&i.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const i=s[o],r=i.getAttribute("data-ln-class").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&i.classList.toggle(d,!!t[f])}}return e}function T(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<n.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[l],t??null),n[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)y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function x(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const l=function(s,o){return t[o]!==void 0?t[o]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let s=0;s<a.length;s++){const o=a[s],i=o.attributes;for(let r=0;r<i.length;r++){const c=i[r];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function I(e,t,n,l,a,s){const o={};for(let r=0;r<e.children.length;r++){const c=e.children[r],u=c.getAttribute("data-ln-render-key");u&&(o[u]=c)}const i=document.createDocumentFragment();for(let r=0;r<t.length;r++){const c=t[r],u=String(l(c));let d=o[u];if(d)a(d,c,r);else{const f=E(n,s);if(!f||(x(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),a(d,c,r)}i.appendChild(d)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=x,window.lnCore.fill=y,window.lnCore.lnFill=T,window.lnCore.renderList=I);function F(e,t,n,l,a){if(!e||t===null)return!0;const s=l||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=r=>{a?console.warn(r,a):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(i(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(i(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(i(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(i(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return i(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function M(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function R(e,t,n,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&o.push(e);for(const i of o)if(!i[n]){window.lnCore._persistSink&&i.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(i,t);try{i[n]=new l(i)}catch(r){console.error("["+n+"] init failed",i,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function A(){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 W(e){const t=A(),n=e.observed||[];for(let l=0;l<n.length;l++){const a=n[l];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const a=t.byDeclaredAttr.get(l);a.some(s=>s.componentTag===e.componentTag)||a.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=M(e);if(l===null)t.reactiveWildcard.push(e);else for(const a of l)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function k(e,t,n,l){for(let a=0;a<e.length;a++){const s=e[a];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,l):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,l)}}function q(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const l=A(),a=l.byAttr.get(n);if(_()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(n)&&g(t)){const s=l.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let i=0;i<s.length;i++)F(s[i].spec,o,n,s[i].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||a)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=l.byReactive.get(n);s&&k(s,t,n,e.oldValue),l.reactiveWildcard.length&&k(l.reactiveWildcard,t,n,e.oldValue)}if(a)for(let s=0;s<a.length;s++){const o=a[s];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(R(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function B(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,w(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{q(t[n])}catch(l){console.error("[ln-core] mutation handler failed",t[n].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(e,t){W({observed:e,handler:t}),B()}function v(e){return(e||"").replace(/^#/,"")}function p(e){const t=e===void 0?location.hash:e,n={},l=v(t);if(!l)return n;const a=l.split("&");for(let s=0;s<a.length;s++){const o=a[s];if(!o)continue;const i=o.indexOf(":"),r=i>-1?o.slice(0,i):o,c=i>-1?o.slice(i+1):"";if(r)try{n[r]=decodeURIComponent(c)}catch{n[r]=c}}return n}function j(e){if(!e)return null;const t=p();return e in t?t[e]:null}function N(e,t){if(!e)return;const n=p();t==null?delete n[e]:n[e]=String(t);const a=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");v(location.hash)!==a&&(location.hash=a)}function U(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function H(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const 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 K(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function G(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 J(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Q(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),l=e.slice(t+1),a=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=p,window.lnCore.hashGet=j,window.lnCore.hashSet=N,window.lnCore.hashLinkClick=U,window.lnCore.resolveHashNamespace=H,window.lnCore.hashSortEncode=K,window.lnCore.hashSortDecode=G,window.lnCore.hashFilterEncode=J,window.lnCore.hashFilterDecode=Q);function z(){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=z),(function(){const e="lnExternalLinks";if(window[e]!==void 0)return;function t(i){return i.hostname&&i.hostname!==window.location.hostname}function n(i){if(i.getAttribute("data-ln-external-link")==="processed"||!t(i))return;i.target="_blank";const r=(i.rel||"").split(/\s+/).filter(Boolean);r.includes("noopener")||r.push("noopener"),r.includes("noreferrer")||r.push("noreferrer"),i.rel=r.join(" ");const c=document.createElement("span");c.className="sr-only",c.textContent="(opens in new tab)",i.appendChild(c),i.setAttribute("data-ln-external-link","processed"),b(i,"ln-external-links:processed",{link:i,href:i.href})}function l(i){i=i||document.body;for(const r of i.querySelectorAll("a, area"))n(r)}function a(){w(function(){document.body.addEventListener("click",function(i){const r=i.target.closest("a, area");r&&r.getAttribute("data-ln-external-link")==="processed"&&b(r,"ln-external-links:clicked",{link:r,href:r.href,text:r.textContent||r.title||""})})},"ln-external-links")}function s(){w(function(){new MutationObserver(function(r){for(const c of r)if(c.type==="childList"){for(const u of c.addedNodes)if(u.nodeType===1&&(u.matches&&(u.matches("a")||u.matches("area"))&&n(u),u.querySelectorAll))for(const d of u.querySelectorAll("a, area"))n(d)}}).observe(document.body,{childList:!0,subtree:!0}),V(["href"],function(r){r.matches&&(r.matches("a")||r.matches("area"))&&n(r)})},"ln-external-links")}function o(){a(),s(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){l()}):l()}window[e]={process:l},o()})()})();
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
-
"component": "ln-external-links",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-external-link": {
|
|
7
|
-
"direction": "both",
|
|
8
|
-
"sources": [
|
|
9
|
-
"src/ln-external-links.js"
|
|
10
|
-
],
|
|
11
|
-
"type": "enum",
|
|
12
|
-
"values": [
|
|
13
|
-
"processed"
|
|
14
|
-
],
|
|
15
|
-
"description": "Marker indicating link was identified and processed as external"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
+
"component": "ln-external-links",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-external-link": {
|
|
7
|
+
"direction": "both",
|
|
8
|
+
"sources": [
|
|
9
|
+
"src/ln-external-links.js"
|
|
10
|
+
],
|
|
11
|
+
"type": "enum",
|
|
12
|
+
"values": [
|
|
13
|
+
"processed"
|
|
14
|
+
],
|
|
15
|
+
"description": "Marker indicating link was identified and processed as external"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function
|
|
1
|
+
(function(){"use strict";function x(n){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return n?window.lnCore._debugIsContained(n):window.lnCore._debugSink!==null;if(n&&n.closest){const e=n.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const n=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let u=null;for(let s=1;s<e.length;s++)if(e[s]&&e[s].nodeType===1){u=e[s];break}if(!x(u))return}n.apply(console,e)}}function S(n,e,r){const u=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,n,u),n.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:u}))}function p(n,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(n,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}n()}const C={};function A(n,e){C[n]=e}function _(n){return C[n]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=A,window.lnCore.getDataMapper=_);function k(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const g={};function E(n,e){if(!n||typeof e!="object")return;const r=n.toLowerCase().split("-")[0];g[r]=e}function L(n){if(!n)return null;const e=n.toLowerCase().split("-")[0];return g[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=E,window.lnCore.getLocaleFallback=L,window.lnCore.ensureLocaleObserver=k);const w={};function F(n,e){w[n]||(w[n]=document.querySelector('[data-ln-template="'+n+'"]'));const r=w[n];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+n+'" not found'),null)}function b(n,e){if(!n||!e)return n;const r=n.querySelectorAll("[data-ln-field]");for(let t=0;t<r.length;t++){const i=r[t],o=i.getAttribute("data-ln-field");e[o]!=null&&(i.textContent=e[o])}const u=n.querySelectorAll("[data-ln-attr]");for(let t=0;t<u.length;t++){const i=u[t],o=i.getAttribute("data-ln-attr").split(",");for(let d=0;d<o.length;d++){const c=o[d].trim().split(":");if(c.length!==2)continue;const f=c[0].trim(),a=c[1].trim();e[a]!=null&&i.setAttribute(f,e[a])}}const s=n.querySelectorAll("[data-ln-show]");for(let t=0;t<s.length;t++){const i=s[t],o=i.getAttribute("data-ln-show");o in e&&i.classList.toggle("hidden",!e[o])}const l=n.querySelectorAll("[data-ln-class]");for(let t=0;t<l.length;t++){const i=l[t],o=i.getAttribute("data-ln-class").split(",");for(let d=0;d<o.length;d++){const c=o[d].trim().split(":");if(c.length!==2)continue;const f=c[0].trim(),a=c[1].trim();a in e&&i.classList.toggle(f,!!e[a])}}return n}function v(n,e){n.matches&&n.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n,e??null),n.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const r=n.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let u=0;u<r.length;u++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[u],e??null),r[u].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(n){if(!(!n.target.matches||!n.target.matches("[data-ln-fillable]")))if(n.detail)b(n.target,n.detail);else{const e=n.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function m(n,e){if(!n||!e)return n;const r=document.createTreeWalker(n,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const l=r.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(t,i){return e[i]!==void 0?e[i]:""}))}const u=function(l,t){return e[t]!==void 0?e[t]:""},s=Array.from(n.querySelectorAll("*"));n.nodeType===1&&s.push(n);for(let l=0;l<s.length;l++){const t=s[l],i=t.attributes;for(let o=0;o<i.length;o++){const d=i[o];d.value.indexOf("{{")!==-1&&t.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,u))}}return n}function D(n,e,r,u,s,l){const t={};for(let o=0;o<n.children.length;o++){const d=n.children[o],c=d.getAttribute("data-ln-render-key");c&&(t[c]=d)}const i=document.createDocumentFragment();for(let o=0;o<e.length;o++){const d=e[o],c=String(u(d));let f=t[c];if(f)s(f,d,o);else{const a=F(r,l);if(!a||(m(a,d),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",c),s(f,d,o)}i.appendChild(f)}n.textContent="",n.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=m,window.lnCore.fill=b,window.lnCore.lnFill=v,window.lnCore.renderList=D),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function y(n){return(n||"").replace(/^#/,"")}function h(n){const e=n===void 0?location.hash:n,r={},u=y(e);if(!u)return r;const s=u.split("&");for(let l=0;l<s.length;l++){const t=s[l];if(!t)continue;const i=t.indexOf(":"),o=i>-1?t.slice(0,i):t,d=i>-1?t.slice(i+1):"";if(o)try{r[o]=decodeURIComponent(d)}catch{r[o]=d}}return r}function I(n){if(!n)return null;const e=h();return n in e?e[n]:null}function O(n,e){if(!n)return;const r=h();e==null?delete r[n]:r[n]=String(e);const s=Object.keys(r).map(function(l){const t=r[l];return t===""?l:l+":"+encodeURIComponent(t)}).join("&");y(location.hash)!==s&&(location.hash=s)}function B(n){return n.button===1||n.ctrlKey||n.metaKey||n.shiftKey?!1:(n.preventDefault(),!0)}function T(n,e){if(!n||!n.hasAttribute("data-ln-hash"))return null;const r=n.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const u=n.getAttribute("data-ln-sort")||n.getAttribute("data-ln-search-for")||n.getAttribute("data-ln-search")||n.getAttribute("data-ln-filter")||n.id;return u?e?u+"-"+e:u:e||null}function q(n,e){return!e||e==="none"||n===null||n===void 0?null:String(n)+"."+e}function M(n){return!n||typeof n!="string"?null:n.endsWith(".asc")?{fieldOrColumn:n.slice(0,-4),direction:"asc"}:n.endsWith(".desc")?{fieldOrColumn:n.slice(0,-5),direction:"desc"}:null}function W(n,e){return!n||!Array.isArray(e)||e.length===0?null:n+":"+e.map(encodeURIComponent).join(",")}function U(n){if(!n||typeof n!="string")return null;const e=n.indexOf(":");if(e===-1)return null;const r=n.slice(0,e),u=n.slice(e+1),s=u?u.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:r,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=h,window.lnCore.hashGet=I,window.lnCore.hashSet=O,window.lnCore.hashLinkClick=B,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=q,window.lnCore.hashSortDecode=M,window.lnCore.hashFilterEncode=W,window.lnCore.hashFilterDecode=U);function j(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=j),(function(){const n="lnFill";if(window[n]!==void 0)return;const e={lnFillForm:!0,lnFillStore:!0};function r(s){const l={},t=s.dataset;for(const i in t){if(!i.startsWith("lnFill")||e[i])continue;const o=i.slice(6);o&&(l[o.charAt(0).toLowerCase()+o.slice(1)]=t[i])}return l}function u(s,l){const t=window.CSS&&CSS.escape?CSS.escape(l):l,i=document.querySelectorAll('[data-ln-fill-id="'+t+'"]');if(i.length===0)return null;for(let o=0;o<i.length;o++){const d=i[o].getAttribute("data-ln-fill-form");if(d){const c=document.getElementById(d);if(c&&s.contains(c))return i[o]}}return i[0]}document.addEventListener("click",function(s){if(s.ctrlKey||s.metaKey||s.button===1)return;const l=s.target.closest("[data-ln-fill-form]");if(!l)return;const t=l.getAttribute("data-ln-fill-form"),i=document.getElementById(t);if(!i)return;const o=r(l),d=Object.keys(o).length>0;window.lnCore.lnFill(i,d?o:null)}),document.addEventListener("ln-fill:request",function(s){const l=s.detail;if(!l)return;const t=s.target,i=l.id;if(i==null){window.lnCore.lnFill(t,null);return}const o=u(t,i);if(!o)return;const d=r(o);window.lnCore.lnFill(t,d)}),window[n]=!0})()})();
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
-
"component": "ln-fill",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-fill-form": {
|
|
7
|
-
"direction": "author",
|
|
8
|
-
"sources": [
|
|
9
|
-
"src/ln-fill.js"
|
|
10
|
-
],
|
|
11
|
-
"type": "string",
|
|
12
|
-
"description": "ID of target form populated with source element dataset properties"
|
|
13
|
-
},
|
|
14
|
-
"data-ln-fill-id": {
|
|
15
|
-
"direction": "author",
|
|
16
|
-
"sources": [
|
|
17
|
-
"src/ln-fill.js"
|
|
18
|
-
],
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "Unique identifier of data source element providing fill attributes"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
+
"component": "ln-fill",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-fill-form": {
|
|
7
|
+
"direction": "author",
|
|
8
|
+
"sources": [
|
|
9
|
+
"src/ln-fill.js"
|
|
10
|
+
],
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "ID of target form populated with source element dataset properties"
|
|
13
|
+
},
|
|
14
|
+
"data-ln-fill-id": {
|
|
15
|
+
"direction": "author",
|
|
16
|
+
"sources": [
|
|
17
|
+
"src/ln-fill.js"
|
|
18
|
+
],
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Unique identifier of data source element providing fill attributes"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function U(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function N(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(!N(r))return}e.apply(console,t)}}function T(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function ce(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function x(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){x(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function P(e){return e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.tagName==="DATA"&&e.hasAttribute("value")?e.getAttribute("value"):e.textContent.trim()}const Q={};function ue(e,t){Q[e]=t}function de(e){return Q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=de);function fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,x(function(){new MutationObserver(function(){T(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const J={};function he(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];J[n]=t}function ge(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return J[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=he,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=fe);const D={};function be(e,t){D[e]||(D[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=D[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function G(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const a=n[i],s=a.getAttribute("data-ln-field");t[s]!=null&&(a.textContent=t[s])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const a=r[i],s=a.getAttribute("data-ln-attr").split(",");for(let h=0;h<s.length;h++){const y=s[h].trim().split(":");if(y.length!==2)continue;const p=y[0].trim(),m=y[1].trim();t[m]!=null&&a.setAttribute(p,t[m])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const a=o[i],s=a.getAttribute("data-ln-show");s in t&&a.classList.toggle("hidden",!t[s])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const a=l[i],s=a.getAttribute("data-ln-class").split(",");for(let h=0;h<s.length;h++){const y=s[h].trim().split(":");if(y.length!==2)continue;const p=y[0].trim(),m=y[1].trim();m in t&&a.classList.toggle(p,!!t[m])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)G(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function X(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const l=n.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const r=function(l,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let l=0;l<o.length;l++){const i=o[l],a=i.attributes;for(let s=0;s<a.length;s++){const h=a[s];h.value.indexOf("{{")!==-1&&i.setAttribute(h.name,h.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function pe(e,t,n,r,o,l){const i={};for(let s=0;s<e.children.length;s++){const h=e.children[s],y=h.getAttribute("data-ln-render-key");y&&(i[y]=h)}const a=document.createDocumentFragment();for(let s=0;s<t.length;s++){const h=t[s],y=String(r(h));let p=i[y];if(p)o(p,h,s);else{const m=be(n,l);if(!m||(X(m,h),p=m.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",y),o(p,h,s)}a.appendChild(p)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=G,window.lnCore.lnFill=we,window.lnCore.renderList=pe);function F(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function ye(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function me(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function Ce(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function Ae(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),o=function(l,i){const a=l.getAttribute(i);return a!==null&&r.has(a)?a:t};return $.set(n,o),o}function ve(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ke(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function Y(e,t,n,r,o){if(!e||t===null)return!0;const l=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=s=>{o?console.warn(s,o):console.warn(s)};if(i==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(a(`[${l}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const s=e.values||[];return s.includes(t)?!0:(a(`[${l}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${l}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(a(`[${l}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(a(`[${l}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${l}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(s){return a(`[${l}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function _e(e,t,n){for(const r in n){const[o,l,i]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,l,i)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Ae(r.values,r.fallback);break;case"integer":o=ye;break;case"float":o=ve;break;case"boolean":o=me;break;case"list":o=Ce;break;case"json":o=ke;break;case"string":default:o=F;break}o||(o=F),t[r.prop]=[o,n,r.fallback]}return t}function Ie(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Ee(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function B(e,t,n,r){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(l));e.matches&&e.matches(l)&&i.push(e);for(const a of i)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new r(a)}catch(s){console.error("["+n+"] init failed",a,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Te(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function L(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 xe(e){const t=z(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(l=>l.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ee(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,n,r){for(let o=0;o<e.length;o++){const l=e[o];if(!t[l.attribute])continue;const i=l.effects&&l.effects[n];i?i(t,n,r):l.onAttrChange&&(!l.declared||l.declared.has(n))&&l.onAttrChange(t,n,r)}}function Le(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=z(),o=r.byAttr.get(n);if(U()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&N(t)){const l=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let a=0;a<l.length;a++)Y(l[a].spec,i,n,l[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const l=r.byReactive.get(n);l&&Z(l,t,n,e.oldValue),r.reactiveWildcard.length&&Z(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let l=0;l<o.length;l++){const i=o[l];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(B(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function Re(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,x(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Le(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ee(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function qe(e){const t=ee();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,l=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;l&&r.onSubtreeChange(l,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const l=t[o];B(r,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const l=t[o],i=l.query,a=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&a.push(r);for(let s=0;s<a.length;s++){const h=a[s];if(!document.contains(h)){const y=h[l.attribute];if(y&&typeof y.destroy=="function")try{y.destroy()}catch(p){console.error("["+l.attribute+"] destroy failed",h,p)}delete h[l.attribute]}}}}}}function Oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{qe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ne(e,t,n,r,o={}){const l=o.extraAttributes||[],i=o.onAttributeChange||null,a=o.onSubtreeChange||null,s=o.onInit||null,h=o.onAttrChange||null,y=o.effects||null,p=o.attributes||null,m=p?Ie(p):y,H=p?new Set(Object.keys(p)):null,_=o.persist||null;function v(f){const d=f||document.body;if(B(d,e,t,n),p&&U())for(const g in p){const w=p[g],u=Array.from(d.querySelectorAll("["+g+"]"));d.matches&&d.matches("["+g+"]")&&u.push(d);for(let b=0;b<u.length;b++){const C=u[b];N(C)&&Y(w,C.getAttribute(g),g,r,C)}}s&&s(d)}const S=[];if(e.indexOf("[")!==-1){const f=/\[([\w-]+)/g;let d;for(;(d=f.exec(e))!==null;)S.push(d[1])}else S.push(e);xe({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:n,onInit:s,observed:S.concat(l),onAttributeChange:i,onAttrChange:h,effects:m,declared:H,persist:_}),Re();const q=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";ee().push({selector:e,attribute:t,ComponentFn:n,onInit:s,onSubtreeChange:a,query:q}),Oe(),window[t]=v;function c(){Te()>0?L(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",c):c(),v}function De(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function te(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=te(t);if(!r)return n;const o=r.split("&");for(let l=0;l<o.length;l++){const i=o[l];if(!i)continue;const a=i.indexOf(":"),s=a>-1?i.slice(0,a):i,h=a>-1?i.slice(a+1):"";if(s)try{n[s]=decodeURIComponent(h)}catch{n[s]=h}}return n}function V(e){if(!e)return null;const t=M();return e in t?t[e]:null}function ne(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(l){const i=n[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");te(location.hash)!==o&&(location.hash=o)}function Fe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function R(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function j(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=V,window.lnCore.hashSet=ne,window.lnCore.hashLinkClick=Fe,window.lnCore.resolveHashNamespace=R,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=re,window.lnCore.hashFilterDecode=j);function oe(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let r=0;r<t.length;r++)if(String(t[r]).trim().toLowerCase()===n)return!0;return!1}function Me(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function Ve(e,t,n){if(!t||typeof t!="object")return!0;const r=Object.keys(t);if(r.length===0)return!0;for(let o=0;o<r.length;o++){const l=t[r[o]];let i="";if(l.col!==null&&l.col!==void 0?i=e[l.col]||"":l.attr&&n&&typeof n.getAttribute=="function"&&(i=n.getAttribute(l.attr)||""),!oe(i,l.values))return!1}return!0}function ie(e,t,n,r){if(r!=null&&!isNaN(r))return parseInt(r,10);if(t&&typeof t.getAttribute=="function"){const o=t.getAttribute("data-ln-filter-col");if(o!==null&&!isNaN(parseInt(o,10)))return parseInt(o,10);if(typeof t.closest=="function"){const l=t.closest("th");if(l&&typeof l.cellIndex=="number")return l.cellIndex;const i=t.closest("[data-ln-popover], [id]");if(i&&i.id){const a=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(a&&typeof a.querySelector=="function"){const s=a.querySelector('[data-ln-popover-for="'+i.id+'"]');if(s&&typeof s.closest=="function"){const h=s.closest("th");if(h&&typeof h.cellIndex=="number")return h.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const o=e.querySelectorAll("thead th, tr:first-child th"),l=String(n).trim().toLowerCase();for(let i=0;i<o.length;i++){const a=o[i],s=a.getAttribute("data-ln-table-filter-col")||a.getAttribute("data-ln-filter-col")||a.getAttribute("data-ln-filter-key")||a.getAttribute("data-ln-table-col")||a.getAttribute("data-ln-col")||a.getAttribute("data-ln-field");if(s&&s.trim().toLowerCase()===l)return typeof a.cellIndex=="number"?a.cellIndex:i}if(t){const i=t.closest?t.closest("[data-ln-popover], [id]"):null,a=i&&i.id||t.id||null;if(a)for(let s=0;s<o.length;s++){const h=o[s];if(typeof h.querySelector=="function"&&h.querySelector('[data-ln-popover-for="'+a+'"]'))return typeof h.cellIndex=="number"?h.cellIndex:s}}for(let i=0;i<o.length;i++){const a=o[i],h=Array.from(a.childNodes||[]).filter(p=>p.nodeType===3),y=(h.length>0?h.map(p=>p.textContent.trim()).join(" "):a.textContent||"").trim().toLowerCase();if(y&&y===l)return typeof a.cellIndex=="number"?a.cellIndex:i}}return null}function je(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let r=0;r<e.length;r++){const o=e[r];!t&&o.key&&(t=o.key),o.checked&&!o.isReset&&o.value&&n.push(o.value)}return{key:t,values:n}}function He(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function le(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",r="data-ln-filter-value",o="data-ln-filter-hide",l="data-ln-filter-reset",i="data-ln-filter-col",a="data-ln-hash",s="data-ln-filter-values",h=new WeakMap;if(window[t]!==void 0)return;const y={"data-ln-filter":{prop:"targetId",type:"string",read:F,fallback:null,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:q,description:"URL hash routing key for filter state persistence"},"data-ln-filter-values":{type:"string",effect:q,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"}},p=Se(y);function m(c){return c.hasAttribute(l)||!c.getAttribute(r)}function H(c){const f=c.dom.querySelectorAll("["+n+"]"),d=[];for(let w=0;w<f.length;w++){const u=f[w];d.push({key:u.getAttribute(n),value:u.getAttribute(r)||"",checked:u.checked,isReset:m(u)})}const g=je(d);return{key:g.key,values:g.values,targetId:c.targetId}}function _(c,f,d){const g=c.querySelectorAll("["+n+"]"),w=Array.isArray(d)&&d.length>0;for(let u=0;u<g.length;u++){const b=g[u];m(b)?b.checked=!w:w&&b.getAttribute(n)===f&&d.indexOf(b.getAttribute(r))!==-1?b.checked=!0:b.checked=!1}}function v(c){this.dom=c,_e(this,c,p);const f=c.getAttribute(i);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=R(c,"filter"),this.hashEnabled=!!this.nsKey;const d=this,g=De(function(){d._render()});this._queueRender=g,this._attachHandlers(),this._onHashChange=function(){if(d._destroyed||!d.hashEnabled)return;const u=V(d.nsKey),b=j(u);b&&b.key&&b.values.length>0?_(d.dom,b.key,b.values):_(d.dom,null,[]),d._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let w=!1;if(this.hashEnabled){const u=V(this.nsKey),b=j(u);b&&b.key&&b.values.length>0&&(_(c,b.key,b.values),L(function(){d._destroyed||d._render()}),w=!0)}if(!w){const u=le(c.getAttribute(s));if(u.length>0){const b=c.querySelector("["+n+"]"),C=b?b.getAttribute(n):null;C&&(_(c,C,u),L(function(){d._destroyed||d._render()}),w=!0)}}if(!w){const u=c.querySelectorAll("["+n+"]");for(let b=0;b<u.length;b++)if(u[b].checked&&!m(u[b])){L(function(){d._destroyed||d._render()});break}}return this}v.prototype._attachHandlers=function(){const c=this;this._onDomChange=function(f){const d=f.target;if(!d||!d.hasAttribute||!d.hasAttribute(n))return;const g=Array.from(c.dom.querySelectorAll("["+n+"]"));if(m(d)){for(let w=0;w<g.length;w++)m(g[w])||(g[w].checked=!1);d.checked=!0,c._queueRender();return}if(d.checked){for(let u=0;u<g.length;u++)m(g[u])&&(g[u].checked=!1);let w=!1;for(let u=0;u<g.length;u++)if(m(g[u])){w=!0;break}if(w){let u=!0;for(let b=0;b<g.length;b++)if(!m(g[b])&&!g[b].checked){u=!1;break}if(u)for(let b=0;b<g.length;b++)m(g[b])?g[b].checked=!0:g[b].checked=!1}}else{let w=!1;for(let u=0;u<g.length;u++)if(!m(g[u])&&g[u].checked){w=!0;break}if(!w)for(let u=0;u<g.length;u++)m(g[u])&&(g[u].checked=!0)}c._queueRender()},this.dom.addEventListener("change",this._onDomChange)},v.prototype._render=function(){const c=this,f=H(this),d=this._lastSnapshot;if(!(!d||d.key!==f.key||Me(d.values,f.values)))return;const w=f.key===null||f.values.length===0,u=document.getElementById(c.targetId),b={key:f.key,values:f.values.slice(),targetId:c.targetId};T(c.dom,"ln-filter:change",b);let C=!1;u&&u!==c.dom&&ce(u,"ln-filter:change",b).defaultPrevented&&(C=!0);const O=d&&d.values.length>0,I=f.values.length===0;if(O&&I){const A={targetId:c.targetId};T(c.dom,"ln-filter:reset",A),u&&u!==c.dom&&T(u,"ln-filter:reset",A)}this._lastSnapshot={key:f.key,values:f.values.slice()};const k=He(f.values);if(k?this.dom.setAttribute(s,k):this.dom.removeAttribute(s),this.hashEnabled){const A=re(f.key,f.values);ne(this.nsKey,A)}if(C)return;const E=u&&(u.tagName==="TABLE"?u:u.querySelector?u.querySelector("table"):null);if(E)c._filterTableRows(f,E);else{if(!u)return;const A=u.children;for(let W=0;W<A.length;W++){const K=A[W];if(K.removeAttribute(o),w)continue;const ae=K.getAttribute("data-"+f.key);ae!==null&&(oe(ae,f.values)||K.setAttribute(o,"true"))}}};function S(c){if(!c)return"";const f=c.querySelector?c.querySelector("[data-ln-value]"):null;return P(f||c)}function se(c){return!!(!c||typeof c!="object"||c.tagName==="TEMPLATE"||typeof c.hasAttribute=="function"&&(c.hasAttribute("data-ln-sort-exclude")||c.hasAttribute("hidden"))||c.classList&&c.classList.contains("hidden")||c.style&&c.style.display==="none"||typeof c.matches=="function"&&c.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof c.querySelector=="function"&&c.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}v.prototype._filterTableRows=function(c,f){if(!f){const C=document.getElementById(this.targetId);if(!C||(f=C.tagName==="TABLE"?C:C.querySelector?C.querySelector("table"):null,!f))return}const d=ie(f,this.dom,c.key,this.colIndex),g=c.key||this.dom.getAttribute("data-ln-filter-key")||(d!==null?"col"+d:"attr-filter"),w=c.values;h.has(f)||h.set(f,{});const u=h.get(f);g&&w.length>0?u[g]={col:d,values:w.slice(),attr:"data-"+g}:g&&delete u[g];const b=f.tBodies;for(let C=0;C<b.length;C++){const O=b[C].rows;for(let I=0;I<O.length;I++){const k=O[I];if(se(k))continue;const E={};for(let A=0;A<k.cells.length;A++)E[A]=S(k.cells[A]);Ve(E,u,k)?k.removeAttribute(o):k.setAttribute(o,"true")}}},v.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const c=document.getElementById(this.targetId);if(c){const f=c.tagName==="TABLE"?c:c.querySelector?c.querySelector("table"):null;if(f&&h.has(f)){const d=h.get(f),g=ie(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),w=this.dom.getAttribute("data-ln-filter-key")||(g!==null?"col"+g:this.colIndex!==null?"col"+this.colIndex:null);w&&d[w]&&(delete d[w],this._filterTableRows({key:null,values:[]},f)),Object.keys(d).length===0&&h.delete(f)}}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),delete this.dom[t]};function q(c,f){const d=c[t];if(!(!d||d._destroyed)){if(f===a)d.hashEnabled&&d._onHashChange&&window.removeEventListener("hashchange",d._onHashChange),d.nsKey=R(c,"filter"),d.hashEnabled=!!d.nsKey,d.hashEnabled&&window.addEventListener("hashchange",d._onHashChange);else if(f===s){const g=le(c.getAttribute(s)),w=c.querySelector("["+n+"]"),u=w?w.getAttribute(n):null;u&&(_(c,u,g),d._render())}}}Ne(e,t,v,"ln-filter",{attributes:y,persist:{attr:s,hashActive:function(c){return!!R(c,"filter")}}})})()})();
|
|
1
|
+
(function(){"use strict";function K(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!D(r))return}e.apply(console,t)}}function E(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function ue(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function T(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){T(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function P(e){return e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.tagName==="DATA"&&e.hasAttribute("value")?e.getAttribute("value"):e.textContent.trim()}const Q={};function ce(e,t){Q[e]=t}function de(e){return Q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=de);function fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,T(function(){new MutationObserver(function(){E(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const J={};function he(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];J[n]=t}function ge(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return J[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=he,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=fe);const N={};function be(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function G(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const a=n[i],s=a.getAttribute("data-ln-field");t[s]!=null&&(a.textContent=t[s])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const a=r[i],s=a.getAttribute("data-ln-attr").split(",");for(let h=0;h<s.length;h++){const y=s[h].trim().split(":");if(y.length!==2)continue;const p=y[0].trim(),m=y[1].trim();t[m]!=null&&a.setAttribute(p,t[m])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const a=o[i],s=a.getAttribute("data-ln-show");s in t&&a.classList.toggle("hidden",!t[s])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const a=l[i],s=a.getAttribute("data-ln-class").split(",");for(let h=0;h<s.length;h++){const y=s[h].trim().split(":");if(y.length!==2)continue;const p=y[0].trim(),m=y[1].trim();m in t&&a.classList.toggle(p,!!t[m])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)G(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function X(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const l=n.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const r=function(l,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let l=0;l<o.length;l++){const i=o[l],a=i.attributes;for(let s=0;s<a.length;s++){const h=a[s];h.value.indexOf("{{")!==-1&&i.setAttribute(h.name,h.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function pe(e,t,n,r,o,l){const i={};for(let s=0;s<e.children.length;s++){const h=e.children[s],y=h.getAttribute("data-ln-render-key");y&&(i[y]=h)}const a=document.createDocumentFragment();for(let s=0;s<t.length;s++){const h=t[s],y=String(r(h));let p=i[y];if(p)o(p,h,s);else{const m=be(n,l);if(!m||(X(m,h),p=m.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",y),o(p,h,s)}a.appendChild(p)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=G,window.lnCore.lnFill=we,window.lnCore.renderList=pe);function F(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function ye(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function me(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function Ce(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function Ae(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),o=function(l,i){const a=l.getAttribute(i);return a!==null&&r.has(a)?a:t};return $.set(n,o),o}function ve(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ke(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function Y(e,t,n,r,o){if(!e||t===null)return!0;const l=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=s=>{o?console.warn(s,o):console.warn(s)};if(i==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(a(`[${l}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const s=e.values||[];return s.includes(t)?!0:(a(`[${l}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${l}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(a(`[${l}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(a(`[${l}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${l}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(s){return a(`[${l}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function _e(e,t,n){for(const r in n){const[o,l,i]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,l,i)},enumerable:!0,configurable:!0})}return e}function xe(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Ae(r.values,r.fallback);break;case"integer":o=ye;break;case"float":o=ve;break;case"boolean":o=me;break;case"list":o=Ce;break;case"json":o=ke;break;case"string":default:o=F;break}o||(o=F),t[r.prop]=[o,n,r.fallback]}return t}function Se(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Ie(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function B(e,t,n,r){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(l));e.matches&&e.matches(l)&&i.push(e);for(const a of i)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new r(a)}catch(s){console.error("["+n+"] init failed",a,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ee(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function L(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 Te(e){const t=z(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(l=>l.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ie(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,n,r){for(let o=0;o<e.length;o++){const l=e[o];if(!t[l.attribute])continue;const i=l.effects&&l.effects[n];i?i(t,n,r):l.onAttrChange&&(!l.declared||l.declared.has(n))&&l.onAttrChange(t,n,r)}}function Le(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=z(),o=r.byAttr.get(n);if(K()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&D(t)){const l=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let a=0;a<l.length;a++)Y(l[a].spec,i,n,l[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const l=r.byReactive.get(n);l&&Z(l,t,n,e.oldValue),r.reactiveWildcard.length&&Z(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let l=0;l<o.length;l++){const i=o[l];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(B(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function Re(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Le(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ee(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function qe(e){const t=ee();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,l=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;l&&r.onSubtreeChange(l,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const l=t[o];B(r,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const l=t[o],i=l.query,a=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&a.push(r);for(let s=0;s<a.length;s++){const h=a[s];if(!document.contains(h)){const y=h[l.attribute];if(y&&typeof y.destroy=="function")try{y.destroy()}catch(p){console.error("["+l.attribute+"] destroy failed",h,p)}delete h[l.attribute]}}}}}}function Oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{qe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function De(e,t,n,r,o={}){const l=o.extraAttributes||[],i=o.onAttributeChange||null,a=o.onSubtreeChange||null,s=o.onInit||null,h=o.onAttrChange||null,y=o.effects||null,p=o.attributes||null,m=p?Se(p):y,H=p?new Set(Object.keys(p)):null,_=o.persist||null;function v(f){const d=f||document.body;if(B(d,e,t,n),p&&K())for(const g in p){const w=p[g],c=Array.from(d.querySelectorAll("["+g+"]"));d.matches&&d.matches("["+g+"]")&&c.push(d);for(let b=0;b<c.length;b++){const C=c[b];D(C)&&Y(w,C.getAttribute(g),g,r,C)}}s&&s(d)}const x=[];if(e.indexOf("[")!==-1){const f=/\[([\w-]+)/g;let d;for(;(d=f.exec(e))!==null;)x.push(d[1])}else x.push(e);Te({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:n,onInit:s,observed:x.concat(l),onAttributeChange:i,onAttrChange:h,effects:m,declared:H,persist:_}),Re();const q=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";ee().push({selector:e,attribute:t,ComponentFn:n,onInit:s,onSubtreeChange:a,query:q}),Oe(),window[t]=v;function u(){Ee()>0?L(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",u):u(),v}function Ne(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function te(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=te(t);if(!r)return n;const o=r.split("&");for(let l=0;l<o.length;l++){const i=o[l];if(!i)continue;const a=i.indexOf(":"),s=a>-1?i.slice(0,a):i,h=a>-1?i.slice(a+1):"";if(s)try{n[s]=decodeURIComponent(h)}catch{n[s]=h}}return n}function V(e){if(!e)return null;const t=M();return e in t?t[e]:null}function ne(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(l){const i=n[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");te(location.hash)!==o&&(location.hash=o)}function Fe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function R(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function j(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=V,window.lnCore.hashSet=ne,window.lnCore.hashLinkClick=Fe,window.lnCore.resolveHashNamespace=R,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=re,window.lnCore.hashFilterDecode=j);function Me(){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=Me);function oe(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let r=0;r<t.length;r++)if(String(t[r]).trim().toLowerCase()===n)return!0;return!1}function Ve(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function je(e,t,n){if(!t||typeof t!="object")return!0;const r=Object.keys(t);if(r.length===0)return!0;for(let o=0;o<r.length;o++){const l=t[r[o]];let i="";if(l.col!==null&&l.col!==void 0?i=e[l.col]||"":l.attr&&n&&typeof n.getAttribute=="function"&&(i=n.getAttribute(l.attr)||""),!oe(i,l.values))return!1}return!0}function ie(e,t,n,r){if(r!=null&&!isNaN(r))return parseInt(r,10);if(t&&typeof t.getAttribute=="function"){const o=t.getAttribute("data-ln-filter-col");if(o!==null&&!isNaN(parseInt(o,10)))return parseInt(o,10);if(typeof t.closest=="function"){const l=t.closest("th");if(l&&typeof l.cellIndex=="number")return l.cellIndex;const i=t.closest("[data-ln-popover], [id]");if(i&&i.id){const a=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(a&&typeof a.querySelector=="function"){const s=a.querySelector('[data-ln-popover-for="'+i.id+'"]');if(s&&typeof s.closest=="function"){const h=s.closest("th");if(h&&typeof h.cellIndex=="number")return h.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const o=e.querySelectorAll("thead th, tr:first-child th"),l=String(n).trim().toLowerCase();for(let i=0;i<o.length;i++){const a=o[i],s=a.getAttribute("data-ln-table-filter-col")||a.getAttribute("data-ln-filter-col")||a.getAttribute("data-ln-filter-key")||a.getAttribute("data-ln-table-col")||a.getAttribute("data-ln-col")||a.getAttribute("data-ln-field");if(s&&s.trim().toLowerCase()===l)return typeof a.cellIndex=="number"?a.cellIndex:i}if(t){const i=t.closest?t.closest("[data-ln-popover], [id]"):null,a=i&&i.id||t.id||null;if(a)for(let s=0;s<o.length;s++){const h=o[s];if(typeof h.querySelector=="function"&&h.querySelector('[data-ln-popover-for="'+a+'"]'))return typeof h.cellIndex=="number"?h.cellIndex:s}}for(let i=0;i<o.length;i++){const a=o[i],h=Array.from(a.childNodes||[]).filter(p=>p.nodeType===3),y=(h.length>0?h.map(p=>p.textContent.trim()).join(" "):a.textContent||"").trim().toLowerCase();if(y&&y===l)return typeof a.cellIndex=="number"?a.cellIndex:i}}return null}function He(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let r=0;r<e.length;r++){const o=e[r];!t&&o.key&&(t=o.key),o.checked&&!o.isReset&&o.value&&n.push(o.value)}return{key:t,values:n}}function We(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function le(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",r="data-ln-filter-value",o="data-ln-filter-hide",l="data-ln-filter-reset",i="data-ln-filter-col",a="data-ln-hash",s="data-ln-filter-values",h=new WeakMap;if(window[t]!==void 0)return;const y={"data-ln-filter":{prop:"targetId",type:"string",read:F,fallback:null,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:q,description:"URL hash routing key for filter state persistence"},"data-ln-filter-values":{type:"string",effect:q,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"}},p=xe(y);function m(u){return u.hasAttribute(l)||!u.getAttribute(r)}function H(u){const f=u.dom.querySelectorAll("["+n+"]"),d=[];for(let w=0;w<f.length;w++){const c=f[w];d.push({key:c.getAttribute(n),value:c.getAttribute(r)||"",checked:c.checked,isReset:m(c)})}const g=He(d);return{key:g.key,values:g.values,targetId:u.targetId}}function _(u,f,d){const g=u.querySelectorAll("["+n+"]"),w=Array.isArray(d)&&d.length>0;for(let c=0;c<g.length;c++){const b=g[c];m(b)?b.checked=!w:w&&b.getAttribute(n)===f&&d.indexOf(b.getAttribute(r))!==-1?b.checked=!0:b.checked=!1}}function v(u){this.dom=u,_e(this,u,p);const f=u.getAttribute(i);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=R(u,"filter"),this.hashEnabled=!!this.nsKey;const d=this,g=Ne(function(){d._render()});this._queueRender=g,this._attachHandlers(),this._onHashChange=function(){if(d._destroyed||!d.hashEnabled)return;const c=V(d.nsKey),b=j(c);b&&b.key&&b.values.length>0?_(d.dom,b.key,b.values):_(d.dom,null,[]),d._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let w=!1;if(this.hashEnabled){const c=V(this.nsKey),b=j(c);b&&b.key&&b.values.length>0&&(_(u,b.key,b.values),L(function(){d._destroyed||d._render()}),w=!0)}if(!w){const c=le(u.getAttribute(s));if(c.length>0){const b=u.querySelector("["+n+"]"),C=b?b.getAttribute(n):null;C&&(_(u,C,c),L(function(){d._destroyed||d._render()}),w=!0)}}if(!w){const c=u.querySelectorAll("["+n+"]");for(let b=0;b<c.length;b++)if(c[b].checked&&!m(c[b])){L(function(){d._destroyed||d._render()});break}}return this}v.prototype._attachHandlers=function(){const u=this;this._onDomChange=function(f){const d=f.target;if(!d||!d.hasAttribute||!d.hasAttribute(n))return;const g=Array.from(u.dom.querySelectorAll("["+n+"]"));if(m(d)){for(let w=0;w<g.length;w++)m(g[w])||(g[w].checked=!1);d.checked=!0,u._queueRender();return}if(d.checked){for(let c=0;c<g.length;c++)m(g[c])&&(g[c].checked=!1);let w=!1;for(let c=0;c<g.length;c++)if(m(g[c])){w=!0;break}if(w){let c=!0;for(let b=0;b<g.length;b++)if(!m(g[b])&&!g[b].checked){c=!1;break}if(c)for(let b=0;b<g.length;b++)m(g[b])?g[b].checked=!0:g[b].checked=!1}}else{let w=!1;for(let c=0;c<g.length;c++)if(!m(g[c])&&g[c].checked){w=!0;break}if(!w)for(let c=0;c<g.length;c++)m(g[c])&&(g[c].checked=!0)}u._queueRender()},this.dom.addEventListener("change",this._onDomChange)},v.prototype._render=function(){const u=this,f=H(this),d=this._lastSnapshot;if(!(!d||d.key!==f.key||Ve(d.values,f.values)))return;const w=f.key===null||f.values.length===0,c=document.getElementById(u.targetId),b={key:f.key,values:f.values.slice(),targetId:u.targetId};E(u.dom,"ln-filter:change",b);let C=!1;c&&c!==u.dom&&ue(c,"ln-filter:change",b).defaultPrevented&&(C=!0);const O=d&&d.values.length>0,S=f.values.length===0;if(O&&S){const A={targetId:u.targetId};E(u.dom,"ln-filter:reset",A),c&&c!==u.dom&&E(c,"ln-filter:reset",A)}this._lastSnapshot={key:f.key,values:f.values.slice()};const k=We(f.values);if(k?this.dom.setAttribute(s,k):this.dom.removeAttribute(s),this.hashEnabled){const A=re(f.key,f.values);ne(this.nsKey,A)}if(C)return;const I=c&&(c.tagName==="TABLE"?c:c.querySelector?c.querySelector("table"):null);if(I)u._filterTableRows(f,I);else{if(!c)return;const A=c.children;for(let W=0;W<A.length;W++){const U=A[W];if(U.removeAttribute(o),w)continue;const ae=U.getAttribute("data-"+f.key);ae!==null&&(oe(ae,f.values)||U.setAttribute(o,"true"))}}};function x(u){if(!u)return"";const f=u.querySelector?u.querySelector("[data-ln-value]"):null;return P(f||u)}function se(u){return!!(!u||typeof u!="object"||u.tagName==="TEMPLATE"||typeof u.hasAttribute=="function"&&(u.hasAttribute("data-ln-sort-exclude")||u.hasAttribute("hidden"))||u.classList&&u.classList.contains("hidden")||u.style&&u.style.display==="none"||typeof u.matches=="function"&&u.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof u.querySelector=="function"&&u.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}v.prototype._filterTableRows=function(u,f){if(!f){const C=document.getElementById(this.targetId);if(!C||(f=C.tagName==="TABLE"?C:C.querySelector?C.querySelector("table"):null,!f))return}const d=ie(f,this.dom,u.key,this.colIndex),g=u.key||this.dom.getAttribute("data-ln-filter-key")||(d!==null?"col"+d:"attr-filter"),w=u.values;h.has(f)||h.set(f,{});const c=h.get(f);g&&w.length>0?c[g]={col:d,values:w.slice(),attr:"data-"+g}:g&&delete c[g];const b=f.tBodies;for(let C=0;C<b.length;C++){const O=b[C].rows;for(let S=0;S<O.length;S++){const k=O[S];if(se(k))continue;const I={};for(let A=0;A<k.cells.length;A++)I[A]=x(k.cells[A]);je(I,c,k)?k.removeAttribute(o):k.setAttribute(o,"true")}}},v.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const u=document.getElementById(this.targetId);if(u){const f=u.tagName==="TABLE"?u:u.querySelector?u.querySelector("table"):null;if(f&&h.has(f)){const d=h.get(f),g=ie(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),w=this.dom.getAttribute("data-ln-filter-key")||(g!==null?"col"+g:this.colIndex!==null?"col"+this.colIndex:null);w&&d[w]&&(delete d[w],this._filterTableRows({key:null,values:[]},f)),Object.keys(d).length===0&&h.delete(f)}}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),delete this.dom[t]};function q(u,f){const d=u[t];if(!(!d||d._destroyed)){if(f===a)d.hashEnabled&&d._onHashChange&&window.removeEventListener("hashchange",d._onHashChange),d.nsKey=R(u,"filter"),d.hashEnabled=!!d.nsKey,d.hashEnabled&&window.addEventListener("hashchange",d._onHashChange);else if(f===s){const g=le(u.getAttribute(s)),w=u.querySelector("["+n+"]"),c=w?w.getAttribute(n):null;c&&(_(u,c,g),d._render())}}}De(e,t,v,"ln-filter",{attributes:y,persist:{attr:s,hashActive:function(u){return!!R(u,"filter")}}})})()})();
|