@livenetworks/ashlar 2.1.7 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ln-accordion/ln-accordion.js +1 -1
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-core/README.md +25 -0
- package/components/ln-core/index.js +1 -0
- package/components/ln-core/ln-core.schema.json +14 -4
- package/components/ln-core/query.js +113 -0
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-data-coordinator/README.md +4 -0
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-debug/src/generated-attributes.js +1 -0
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-fill/ln-fill.js +1 -1
- package/components/ln-filter/README.md +1 -0
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/ln-filter.schema.json +8 -0
- package/components/ln-filter/src/ln-filter.js +67 -2
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-http/ln-http.js +1 -1
- package/components/ln-icon/ln-icon.js +1 -1
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-persist/ln-persist.js +1 -1
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-search/README.md +1 -0
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-search/ln-search.schema.json +8 -0
- package/components/ln-search/src/ln-search.js +54 -2
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-sort/README.md +1 -0
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sort/ln-sort.schema.json +112 -104
- package/components/ln-sort/src/ln-sort.js +78 -3
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-sortable/ln-sortable.schema.json +38 -36
- package/components/ln-sortable/ln-sortable.scss +25 -0
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-table/README.md +1 -0
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/ln-ashlar.html-data.json +4 -0
- package/package.json +1 -1
- package/theme/components/_sortable.scss +19 -0
- package/theme/components/_table.scss +1 -0
- package/theme/config/mixins/_chart.scss +1 -0
- package/theme/config/mixins/_dropdown.scss +1 -0
- package/theme/config/mixins/_modal.scss +1 -0
- package/theme/config/mixins/_picklist.scss +1 -0
- package/theme/config/mixins/_popover.scss +1 -0
- package/theme/config/mixins/_position.scss +1 -1
- package/theme/config/mixins/_sidebar.scss +1 -0
- package/theme/config/mixins/_stat-card.scss +1 -0
- package/theme/config/mixins/_timeline.scss +2 -0
- package/theme/config/mixins/_toast.scss +4 -2
- package/theme/ln-ashlar-core.scss +1 -0
- package/theme/ln-ashlar-theme.scss +1 -0
- package/web-types.json +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){n=t[r];break}if(!x(n))return}e.apply(console,t)}}function pe(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function be(e,t,a){const n=a||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const a=!!(t&&t.typed),n=t&&t.exclude,r={},i=e.elements,l={};if(a)for(let d=0;d<i.length;d++){const o=i[d];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let d=0;d<i.length;d++){const o=i[d];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")a&&l[o.name]===1?r[o.name]=o.checked:(r[o.name]||(r[o.name]=[]),o.checked&&r[o.name].push(o.value));else if(o.type==="radio")o.checked&&(r[o.name]=o.value);else if(o.type==="select-multiple"){r[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&r[o.name].push(o.options[s].value)}else if(a&&o.type==="hidden")r[o.name]=o.value;else if(a&&(o.type==="number"||o.type==="range")){const s=Number(o.value);r[o.name]=o.value===""||isNaN(s)?null:s}else r[o.name]=o.value}return r}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ye(e,t){const a=e.elements,n=[],r={};for(let i=0;i<a.length;i++){const l=a[i];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let i=0;i<a.length;i++){const l=a[i];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const d=l.getAttribute("data-ln-fill-as")||l.name;if(!d||!(d in t))continue;const o=t[d];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(r[l.name]>1){const s=String(o).split(",").map(function(c){return c.trim()});l.checked=s.indexOf(l.value)!==-1}else l.checked=ge(o);n.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),n.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<l.options.length;s++)l.options[s].selected=o.indexOf(l.options[s].value)!==-1;n.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),n.push(l)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ye,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=he);const B={};function Ce(e,t){B[e]=t}function ve(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ce,window.lnCore.getDataMapper=ve);function Ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){be(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function xe(e,t){if(!e||typeof t!="object")return;const a=e.toLowerCase().split("-")[0];W[a]=t}function Se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=xe,window.lnCore.getLocaleFallback=Se,window.lnCore.ensureLocaleObserver=Ae);const S={};function ke(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const a=S[e];return a?a.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function U(e,t){if(!e||!t)return e;const a=e.querySelectorAll("[data-ln-field]");for(let l=0;l<a.length;l++){const d=a[l],o=d.getAttribute("data-ln-field");t[o]!=null&&(d.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<n.length;l++){const d=n[l],o=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const d=r[l],o=d.getAttribute("data-ln-show");o in t&&d.classList.toggle("hidden",!t[o])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const d=i[l],o=d.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function _e(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const a=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<a.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",a[n],t??null),a[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)U(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let a=0;a<t.length;a++)t[a].textContent=""}})));function V(e,t){if(!e||!t)return e;const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;a.nextNode();){const i=a.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,d){return t[d]!==void 0?t[d]:""}))}const n=function(i,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const l=r[i],d=l.attributes;for(let o=0;o<d.length;o++){const s=d[o];s.value.indexOf("{{")!==-1&&l.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function De(e,t,a,n,r,i){const l={};for(let o=0;o<e.children.length;o++){const s=e.children[o],c=s.getAttribute("data-ln-render-key");c&&(l[c]=s)}const d=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],c=String(n(s));let u=l[c];if(u)r(u,s,o);else{const f=ke(a,i);if(!f||(V(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),r(u,s,o)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=U,window.lnCore.lnFill=_e,window.lnCore.renderList=De);function k(e,t,a){const n=e.getAttribute(t);return n===null?a:n}function H(e,t,a){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?a:n}function z(e,t,a=!1){const n=e.getAttribute(t);if(n===null)return!!a;const r=n.trim().toLowerCase();return!(r==="false"||r==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(a=>a.trim()).filter(Boolean)}const _=new Map;function Q(e,t){const a=(e?e.join("|"):"")+"::"+t;if(_.has(a))return _.get(a);const n=new Set(e||[]),r=function(i,l){const d=i.getAttribute(l);return d!==null&&n.has(d)?d:t};return _.set(a,r),r}function J(e,t,a){const n=parseFloat(e.getAttribute(t));return isNaN(n)?a:n}function K(e,t,a){const n=e.getAttribute(t);if(!n)return a;try{return JSON.parse(n)}catch{return a}}function P(e,t,a,n,r){if(!e||t===null)return!0;const i=n||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const d=o=>{r?console.warn(o,r):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${a}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${a}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(d(`[${i}] Value ${o} for attribute "${a}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(d(`[${i}] Value ${o} for attribute "${a}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return d(`[${i}] Invalid JSON for attribute "${a}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ee(e,t,a){for(const n in a){const[r,i,l]=a[n];Object.defineProperty(e,n,{get:function(){return r(t,i,l)},enumerable:!0,configurable:!0})}return e}function $e(e){const t={};for(const a in e){const n=e[a];if(!n||!n.prop)continue;let r=n.read;if(!r&&n.type)switch(n.type){case"enum":r=Q(n.values,n.fallback);break;case"integer":r=H;break;case"float":r=J;break;case"boolean":r=z;break;case"list":r=G;break;case"json":r=K;break;case"string":default:r=k;break}r||(r=k),t[n.prop]=[r,a,n.fallback]}return t}function Ie(e){const t={};for(const a in e){const n=e[a];n&&n.effect&&(t[a]=n.effect)}return Object.keys(t).length?t:null}function Oe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const a in e.effects)t.add(a);if(e.onAttrChange&&e.declared)for(const a of e.declared)t.add(a);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ee,window.lnCore.attrSpec=$e,window.lnCore.attrStr=k,window.lnCore.attrInt=H,window.lnCore.attrBool=z,window.lnCore.attrList=G,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(a){console.error("["+t.attribute+"] init failed",e,a)}}}function X(e,t,a,n){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:a,ComponentFn:n};if(e.matches&&e.matches(i)&&h(e,l),e.querySelectorAll){const d=e.querySelectorAll(i);for(let o=0;o<d.length;o++)h(d[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ee(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function te(e){const t=ee(),a=e.observed||[];for(let n=0;n<a.length;n++){const r=a[n];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const r=t.byDeclaredAttr.get(n);r.some(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=Oe(e);if(n===null)t.reactiveWildcard.push(e);else for(const r of n)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ne(e,t,a,n){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const l=i.effects&&i.effects[a];l?l(t,a,n):i.onAttrChange&&(!i.declared||i.declared.has(a))&&i.onAttrChange(t,a,n)}}function Le(e){const t=e.attributeName,a=t.indexOf("data-ln-")===0,n=ee(),r=n.byAttr.get(t),i=j()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!a&&!r&&!i)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(i&&x(l)){const d=n.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let s=0;s<d.length;s++)P(d[s].spec,o,t,d[s].componentTag,l)}if(window.lnCore._debugSink&&(a||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),a){const d=n.byReactive.get(t);d&&ne(d,l,t,e.oldValue),n.reactiveWildcard.length&&ne(n.reactiveWildcard,l,t,e.oldValue)}if(r)for(let d=0;d<r.length;d++){const o=r[d];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(X(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++)try{Le(t[a])}catch(n){console.error("[ln-core] mutation handler failed",t[a].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function $(e,t){if(!document.contains(e))if(t.attribute){const a=e[t.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=D();if(!t.length)return;const a=e.target;if(a){const r=a.nodeType===1?a:a.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const n=E();if(e.target&&n.length)for(let r=0;r<n.length;r++){const i=n[r],l=i.query,d=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;d&&i.onSubtreeChange(d,e)}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const l=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)i.matches&&i.matches(o.query)&&h(i,o);else if(i.matches&&i.matches(o.query)&&h(i,o),i.querySelectorAll){const s=i.querySelectorAll(o.query);for(let c=0;c<s.length;c++)h(s[c],o)}}o.onInit&&o.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){if(document.contains(i))continue;const l=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d],s=o.query;if(s){if(!l)i.matches&&i.matches(s)&&$(i,o);else if(i.matches&&i.matches(s)&&$(i,o),i.querySelectorAll){const c=i.querySelectorAll(s);for(let u=0;u<c.length;u++)$(c[u],o)}}}}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){const e=new MutationObserver(function(t){for(let a=0;a<t.length;a++){const n=t[a];if(n.type==="childList")try{oe(n)}catch(r){console.error("[ln-core] lifecycle handler failed",n.target,r)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function qe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const a=t.takeRecords();for(let n=0;n<a.length;n++){const r=a[n];if(r.type==="childList")try{oe(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Te(e,t){te({observed:e,handler:t}),ae()}function Me(e){D().push(e),e.onSubtreeChange&&e.query&&E().push(e),le()}function re(e,t,a,n,r={}){const i=r.extraAttributes||[],l=r.onAttributeChange||null,d=r.onSubtreeChange||null,o=r.onInit||null,s=r.onAttrChange||null,c=r.effects||null,u=r.attributes||null,f=u?Ie(u):c,q=u?new Set(Object.keys(u)):null,tt=r.persist||null;function A(M){const w=M||document.body;if(X(w,e,t,a),u&&j())for(const y in u){const at=u[y],N=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&N.push(w);for(let F=0;F<N.length;F++){const R=N[F];x(R)&&P(at,R.getAttribute(y),y,n,R)}}o&&o(w)}const T=[];if(e.indexOf("[")!==-1){const M=/\[([\w-]+)/g;let w;for(;(w=M.exec(e))!==null;)T.push(w[1])}else T.push(e);te({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:a,onInit:o,observed:T.concat(i),onAttributeChange:l,onAttrChange:s,effects:f,declared:q,persist:tt}),ae();const nt=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ue=r.subtreeQuery||(nt?e:"["+e+"]"),fe={selector:e,attribute:t,ComponentFn:a,onInit:o,onSubtreeChange:d,query:ue};D().push(fe),d&&ue&&E().push(fe),le(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=re,window.lnCore.observeLifecycle=Me,window.lnCore.withoutLifecycle=qe);function we(){Y()>0?Z(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",we):we(),A}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,a={},n=ie(t);if(!n)return a;const r=n.split("&");for(let i=0;i<r.length;i++){const l=r[i];if(!l)continue;const d=l.indexOf(":"),o=d>-1?l.slice(0,d):l,s=d>-1?l.slice(d+1):"";if(o)try{a[o]=decodeURIComponent(s)}catch{a[o]=s}}return a}function Ne(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const a=I();t==null?delete a[e]:a[e]=String(t);const r=Object.keys(a).map(function(i){const l=a[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");ie(location.hash)!==r&&(location.hash=r)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function je(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const a=e.getAttribute("data-ln-hash");if(a&&a.trim()!=="")return a.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function We(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ue(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const a=e.slice(0,t),n=e.slice(t+1),r=n?n.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:a,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Ne,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=je,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=Ue,window.lnCore.hashFilterDecode=Ve);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);const O=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function ze(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const a=[];for(let n=0;n<=t.length;n++)a[n]=[n];for(let n=0;n<=e.length;n++)a[0][n]=n;for(let n=1;n<=t.length;n++)for(let r=1;r<=e.length;r++)t.charAt(n-1)===e.charAt(r-1)?a[n][r]=a[n-1][r-1]:a[n][r]=Math.min(a[n-1][r-1]+1,a[n][r-1]+1,a[n-1][r]+1);return a[t.length][e.length]}function Ge(e,t=O){if(t.has(e))return null;let a=null,n=1/0;for(const i of t){const l=ze(e,i);l<n&&(n=l,a=i)}const r=Math.max(3,Math.floor(e.length*.4));return n<=r?a:null}function de(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Qe(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const o=l.attributes[d];if(o.name.startsWith("data-ln-")&&o.name.endsWith("-for")){const s=(o.value||"").trim();if(!s){n.push({type:"id-empty",element:l,attribute:o.name,targetId:"",message:`[ln-debug] Empty ID reference in <${l.tagName.toLowerCase()} ${o.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+de(s))||n.push({type:"id-unresolved",element:l,attribute:o.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${l.tagName.toLowerCase()} ${o.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return n}function Je(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const o=l.attributes[d];if(o.name.startsWith("data-ln-")&&(o.name.endsWith("-source")||o.name.endsWith("-store"))&&o.name!=="data-ln-data-store"){const c=(o.value||"").trim();if(!c){n.push({type:"store-empty",element:l,attribute:o.name,storeName:"",message:`[ln-debug] Empty store reference in <${l.tagName.toLowerCase()} ${o.name}="">.`});continue}const u=de(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),q=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!q&&n.push({type:"store-unresolved",element:l,attribute:o.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${l.tagName.toLowerCase()} ${o.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return n}function Ke(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const a=[],n=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&n.unshift(t);const r=new Map;for(let i=0;i<n.length;i++){const l=n[i],d=(l.getAttribute("data-ln-data-store")||"").trim();d&&(r.has(d)||r.set(d,[]),r.get(d).push(l))}for(const[i,l]of r.entries())l.length>1&&a.push({type:"store-duplicate",storeName:i,elements:l,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return a}function Pe(e=document,t=O){const a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const l=r[i];if(l.attributes)for(let d=0;d<l.attributes.length;d++){const o=l.attributes[d];if(o.name.startsWith("data-ln-")&&!t.has(o.name)){const s=Ge(o.name,t),c=s?` Did you mean "${s}"?`:"";n.push({type:"attribute-unknown",element:l,attribute:o.name,suggestion:s,message:`[ln-debug] Unknown attribute "${o.name}" on <${l.tagName.toLowerCase()}>.${c}`})}}}return n}function v(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const a=t.validAttributes||O,n=Qe(e),r=Je(e),i=Ke(e),l=Pe(e,a),d=[...n,...r,...i,...l];if(!t.silent)for(let o=0;o<d.length;o++)console.warn(d[o].message);return{idIssues:n,storeIssues:r,uniquenessIssues:i,spellingIssues:l,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,a=null){if(!e)return;m&&(clearTimeout(m),m=null);function n(){m=setTimeout(()=>{m=null;const r=v(e);a&&a(r)},t)}Y()>0?Z(n):n()}function Xe(e,t,a,n){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",a),console.log("detail",n),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",a),console.log("old → new",n.oldValue,"→",n.newValue),console.groupEnd())}let p=[];function Ye(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function se(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ze(e,t,a,n){se(a)&&Xe(e,t,a,n)}function L(){Ye(),pe(p.length>0?Ze:null,p.length>0?se:null)}function ce(){L()}function et(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){L(),Te(["data-ln-debug"],L)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const a={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};et();function n(i){return this.dom=i,g(i.ownerDocument||document),ce(),this}n.prototype.verify=function(i,l){return v(i||(this.dom?this.dom.ownerDocument||this.dom:document),l)},n.prototype.destroy=function(){delete this.dom[t],ce()};const r=re(e,t,n,"ln-debug",{attributes:a,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});r.verify=function(i,l){return v(i||document,l)},r.schedule=function(i,l,d){return g(i||document,l,d)}})(),C.scheduleVerification=g,C.verifyDOM=v,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
|
|
1
|
+
var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function S(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let a=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){a=t[l];break}if(!S(a))return}e.apply(console,t)}}function pe(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function he(e,t,n){const a=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,a),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:a}))}function h(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){h(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function be(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const n=!!(t&&t.typed),a=t&&t.exclude,l={},i=e.elements,r={};if(n)for(let d=0;d<i.length;d++){const o=i[d];o.name&&o.type==="checkbox"&&!o.disabled&&(r[o.name]=(r[o.name]||0)+1)}for(let d=0;d<i.length;d++){const o=i[d];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(a&&o.matches&&o.matches(a)))if(o.type==="checkbox")n&&r[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&l[o.name].push(o.options[s].value)}else if(n&&o.type==="hidden")l[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const s=Number(o.value);l[o.name]=o.value===""||isNaN(s)?null:s}else l[o.name]=o.value}return l}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ye(e,t){const n=e.elements,a=[],l={};for(let i=0;i<n.length;i++){const r=n[i];r.name&&r.type==="checkbox"&&(l[r.name]=(l[r.name]||0)+1)}for(let i=0;i<n.length;i++){const r=n[i];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const d=r.getAttribute("data-ln-fill-as")||r.name;if(!d||!(d in t))continue;const o=t[d];if(r.type==="checkbox"){if(Array.isArray(o))r.checked=o.indexOf(r.value)!==-1;else if(l[r.name]>1){const s=String(o).split(",").map(function(c){return c.trim()});r.checked=s.indexOf(r.value)!==-1}else r.checked=ge(o);a.push(r)}else if(r.type==="radio")r.checked=r.value===String(o),a.push(r);else if(r.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<r.options.length;s++)r.options[s].selected=o.indexOf(r.options[s].value)!==-1;a.push(r)}else r.value=o,r.tagName==="SELECT"&&o!=null&&r.setAttribute("data-ln-value",o),a.push(r)}return a}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ye,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=be);const B={};function Ce(e,t){B[e]=t}function Ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ce,window.lnCore.getDataMapper=Ae);function ve(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,h(function(){new MutationObserver(function(){he(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function Se(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];W[n]=t}function xe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Se,window.lnCore.getLocaleFallback=xe,window.lnCore.ensureLocaleObserver=ve);const x={};function ke(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=x[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function U(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let r=0;r<n.length;r++){const d=n[r],o=d.getAttribute("data-ln-field");t[o]!=null&&(d.textContent=t[o])}const a=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<a.length;r++){const d=a[r],o=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const d=l[r],o=d.getAttribute("data-ln-show");o in t&&d.classList.toggle("hidden",!t[o])}const i=e.querySelectorAll("[data-ln-class]");for(let r=0;r<i.length;r++){const d=i[r],o=d.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const c=o[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function _e(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let a=0;a<n.length;a++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[a],t??null),n[a].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)U(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function V(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,d){return t[d]!==void 0?t[d]:""}))}const a=function(i,r){return t[r]!==void 0?t[r]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let i=0;i<l.length;i++){const r=l[i],d=r.attributes;for(let o=0;o<d.length;o++){const s=d[o];s.value.indexOf("{{")!==-1&&r.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return e}function De(e,t,n,a,l,i){const r={};for(let o=0;o<e.children.length;o++){const s=e.children[o],c=s.getAttribute("data-ln-render-key");c&&(r[c]=s)}const d=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],c=String(a(s));let u=r[c];if(u)l(u,s,o);else{const f=ke(n,i);if(!f||(V(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),l(u,s,o)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=U,window.lnCore.lnFill=_e,window.lnCore.renderList=De);function k(e,t,n){const a=e.getAttribute(t);return a===null?n:a}function H(e,t,n){const a=parseInt(e.getAttribute(t),10);return isNaN(a)?n:a}function z(e,t,n=!1){const a=e.getAttribute(t);if(a===null)return!!n;const l=a.trim().toLowerCase();return!(l==="false"||l==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function Q(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const a=new Set(e||[]),l=function(i,r){const d=i.getAttribute(r);return d!==null&&a.has(d)?d:t};return _.set(n,l),l}function P(e,t,n){const a=parseFloat(e.getAttribute(t));return isNaN(a)?n:a}function J(e,t,n){const a=e.getAttribute(t);if(!a)return n;try{return JSON.parse(a)}catch{return n}}function K(e,t,n,a,l){if(!e||t===null)return!0;const i=a||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const d=o=>{l?console.warn(o,l):console.warn(o)};if(r==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const o=e.values||[];return o.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(d(`[${i}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(d(`[${i}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(o){return d(`[${i}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ee(e,t,n){for(const a in n){const[l,i,r]=n[a];Object.defineProperty(e,a,{get:function(){return l(t,i,r)},enumerable:!0,configurable:!0})}return e}function qe(e){const t={};for(const n in e){const a=e[n];if(!a||!a.prop)continue;let l=a.read;if(!l&&a.type)switch(a.type){case"enum":l=Q(a.values,a.fallback);break;case"integer":l=H;break;case"float":l=P;break;case"boolean":l=z;break;case"list":l=G;break;case"json":l=J;break;case"string":default:l=k;break}l||(l=k),t[a.prop]=[l,n,a.fallback]}return t}function Ie(e){const t={};for(const n in e){const a=e[n];a&&a.effect&&(t[n]=a.effect)}return Object.keys(t).length?t:null}function $e(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ee,window.lnCore.attrSpec=qe,window.lnCore.attrStr=k,window.lnCore.attrInt=H,window.lnCore.attrBool=z,window.lnCore.attrList=G,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=P,window.lnCore.attrJson=J);function b(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function X(e,t,n,a){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:n,ComponentFn:a};if(e.matches&&e.matches(i)&&b(e,r),e.querySelectorAll){const d=e.querySelectorAll(i);for(let o=0;o<d.length;o++)b(d[o],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ee(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function te(e){const t=ee(),n=e.observed||[];for(let a=0;a<n.length;a++){const l=n[a];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const a in e.attributes){t.byDeclaredAttr.has(a)||t.byDeclaredAttr.set(a,[]);const l=t.byDeclaredAttr.get(a);l.some(i=>i.componentTag===e.componentTag)||l.push({spec:e.attributes[a],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const a=$e(e);if(a===null)t.reactiveWildcard.push(e);else for(const l of a)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function ne(e,t,n,a){for(let l=0;l<e.length;l++){const i=e[l];if(!t[i.attribute])continue;const r=i.effects&&i.effects[n];r?r(t,n,a):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,a)}}function Le(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,a=ee(),l=a.byAttr.get(t),i=j()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(t);if(!n&&!l&&!i)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(i&&S(r)){const d=a.byDeclaredAttr.get(t),o=r.getAttribute(t);for(let s=0;s<d.length;s++)K(d[s].spec,o,t,d[s].componentTag,r)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),n){const d=a.byReactive.get(t);d&&ne(d,r,t,e.oldValue),a.reactiveWildcard.length&&ne(a.reactiveWildcard,r,t,e.oldValue)}if(l)for(let d=0;d<l.length;d++){const o=l[d];if(o.handler){o.handler(r,t,e.oldValue);continue}o.onAttributeChange&&r[o.attribute]?o.onAttributeChange(r,t):(X(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r))}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,h(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Le(t[n])}catch(a){console.error("[ln-core] mutation handler failed",t[n].target,a)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(a){console.error("["+t.attribute+"] destroy failed",e,a)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=D();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const a=E();if(e.target&&a.length)for(let l=0;l<a.length;l++){const i=a[l],r=i.query,d=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;d&&i.onSubtreeChange(d,e)}for(let l=0;l<e.addedNodes.length;l++){const i=e.addedNodes[l];if(i.nodeType===1){const r=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d];if(o.selector&&o.attribute&&o.ComponentFn){if(!r)i.matches&&i.matches(o.query)&&b(i,o);else if(i.matches&&i.matches(o.query)&&b(i,o),i.querySelectorAll){const s=i.querySelectorAll(o.query);for(let c=0;c<s.length;c++)b(s[c],o)}}o.onInit&&o.onInit(i)}}}for(let l=0;l<e.removedNodes.length;l++){const i=e.removedNodes[l];if(i.nodeType===1){if(document.contains(i))continue;const r=!!(i.firstElementChild||i.children&&i.children.length);for(let d=0;d<t.length;d++){const o=t[d],s=o.query;if(s){if(!r)i.matches&&i.matches(s)&&q(i,o);else if(i.matches&&i.matches(s)&&q(i,o),i.querySelectorAll){const c=i.querySelectorAll(s);for(let u=0;u<c.length;u++)q(c[u],o)}}}}}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,h(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.type==="childList")try{oe(a)}catch(l){console.error("[ln-core] lifecycle handler failed",a.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let a=0;a<n.length;a++){const l=n[a];if(l.type==="childList")try{oe(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Te(e,t){te({observed:e,handler:t}),ae()}function Re(e){D().push(e),e.onSubtreeChange&&e.query&&E().push(e),re()}function le(e,t,n,a,l={}){const i=l.extraAttributes||[],r=l.onAttributeChange||null,d=l.onSubtreeChange||null,o=l.onInit||null,s=l.onAttrChange||null,c=l.effects||null,u=l.attributes||null,f=u?Ie(u):c,O=u?new Set(Object.keys(u)):null,ct=l.persist||null;function v(R){const w=R||document.body;if(X(w,e,t,n),u&&j())for(const y in u){const ft=u[y],F=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&F.push(w);for(let M=0;M<F.length;M++){const N=F[M];S(N)&&K(ft,N.getAttribute(y),y,a,N)}}o&&o(w)}const T=[];if(e.indexOf("[")!==-1){const R=/\[([\w-]+)/g;let w;for(;(w=R.exec(e))!==null;)T.push(w[1])}else T.push(e);te({selector:e,attribute:t,componentTag:a,attributes:u,ComponentFn:n,onInit:o,observed:T.concat(i),onAttributeChange:r,onAttrChange:s,effects:f,declared:O,persist:ct}),ae();const ut=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ue=l.subtreeQuery||(ut?e:"["+e+"]"),fe={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:d,query:ue};D().push(fe),d&&ue&&E().push(fe),re(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Re,window.lnCore.withoutLifecycle=Oe);function we(){Y()>0?Z(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",we):we(),v}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,n={},a=ie(t);if(!a)return n;const l=a.split("&");for(let i=0;i<l.length;i++){const r=l[i];if(!r)continue;const d=r.indexOf(":"),o=d>-1?r.slice(0,d):r,s=d>-1?r.slice(d+1):"";if(o)try{n[o]=decodeURIComponent(s)}catch{n[o]=s}}return n}function Fe(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=I();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(i){const r=n[i];return r===""?i:i+":"+encodeURIComponent(r)}).join("&");ie(location.hash)!==l&&(location.hash=l)}function Ne(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function je(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const a=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return a?t?a+"-"+t:a:t||null}function Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function We(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ue(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),a=e.slice(t+1),l=a?a.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Fe,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Ne,window.lnCore.resolveHashNamespace=je,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=Ue,window.lnCore.hashFilterDecode=Ve);function He(e){return(e||"").replace(/^\?/,"")}function ze(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},a=He(t);if(!a)return n;const l=new URLSearchParams(a);for(const[i,r]of l.entries())n[i]=r;return n}function Ge(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const a=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",a)}function Pe(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const a=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return a?t?a+"_"+t:a:t||null}function Je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ke(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const a=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:a}}}return null}function Xe(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ye(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=ze,window.lnCore.queryGet=Ge,window.lnCore.querySet=Qe,window.lnCore.resolveQueryParam=Pe,window.lnCore.querySortEncode=Je,window.lnCore.querySortDecode=Ke,window.lnCore.queryFilterEncode=Xe,window.lnCore.queryFilterDecode=Ye);function Ze(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ze);const $=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-query","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function et(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const n=[];for(let a=0;a<=t.length;a++)n[a]=[a];for(let a=0;a<=e.length;a++)n[0][a]=a;for(let a=1;a<=t.length;a++)for(let l=1;l<=e.length;l++)t.charAt(a-1)===e.charAt(l-1)?n[a][l]=n[a-1][l-1]:n[a][l]=Math.min(n[a-1][l-1]+1,n[a][l-1]+1,n[a-1][l]+1);return n[t.length][e.length]}function tt(e,t=$){if(t.has(e))return null;let n=null,a=1/0;for(const i of t){const r=et(e,i);r<a&&(a=r,n=i)}const l=Math.max(3,Math.floor(e.length*.4));return a<=l?n:null}function de(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function nt(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&o.name.endsWith("-for")){const s=(o.value||"").trim();if(!s){a.push({type:"id-empty",element:r,attribute:o.name,targetId:"",message:`[ln-debug] Empty ID reference in <${r.tagName.toLowerCase()} ${o.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+de(s))||a.push({type:"id-unresolved",element:r,attribute:o.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${r.tagName.toLowerCase()} ${o.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function at(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&(o.name.endsWith("-source")||o.name.endsWith("-store"))&&o.name!=="data-ln-data-store"){const c=(o.value||"").trim();if(!c){a.push({type:"store-empty",element:r,attribute:o.name,storeName:"",message:`[ln-debug] Empty store reference in <${r.tagName.toLowerCase()} ${o.name}="">.`});continue}const u=de(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),O=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!O&&a.push({type:"store-unresolved",element:r,attribute:o.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${r.tagName.toLowerCase()} ${o.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function ot(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const n=[],a=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&a.unshift(t);const l=new Map;for(let i=0;i<a.length;i++){const r=a[i],d=(r.getAttribute("data-ln-data-store")||"").trim();d&&(l.has(d)||l.set(d,[]),l.get(d).push(r))}for(const[i,r]of l.entries())r.length>1&&n.push({type:"store-duplicate",storeName:i,elements:r,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return n}function rt(e=document,t=$){const n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const r=l[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const o=r.attributes[d];if(o.name.startsWith("data-ln-")&&!t.has(o.name)){const s=tt(o.name,t),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:r,attribute:o.name,suggestion:s,message:`[ln-debug] Unknown attribute "${o.name}" on <${r.tagName.toLowerCase()}>.${c}`})}}}return a}function A(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=t.validAttributes||$,a=nt(e),l=at(e),i=ot(e),r=rt(e,n),d=[...a,...l,...i,...r];if(!t.silent)for(let o=0;o<d.length;o++)console.warn(d[o].message);return{idIssues:a,storeIssues:l,uniquenessIssues:i,spellingIssues:r,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,n=null){if(!e)return;m&&(clearTimeout(m),m=null);function a(){m=setTimeout(()=>{m=null;const l=A(e);n&&n(l)},t)}Y()>0?Z(a):a()}function lt(e,t,n,a){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",n),console.log("detail",a),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",n),console.log("old → new",a.oldValue,"→",a.newValue),console.groupEnd())}let p=[];function it(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function se(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function dt(e,t,n,a){se(n)&<(e,t,n,a)}function L(){it(),pe(p.length>0?dt:null,p.length>0?se:null)}function ce(){L()}function st(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,h(function(){L(),Te(["data-ln-debug"],L)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};st();function a(i){return this.dom=i,g(i.ownerDocument||document),ce(),this}a.prototype.verify=function(i,r){return A(i||(this.dom?this.dom.ownerDocument||this.dom:document),r)},a.prototype.destroy=function(){delete this.dom[t],ce()};const l=le(e,t,a,"ln-debug",{attributes:n,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});l.verify=function(i,r){return A(i||document,r)},l.schedule=function(i,r,d){return g(i||document,r,d)}})(),C.scheduleVerification=g,C.verifyDOM=A,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
|
|
@@ -1 +1 @@
|
|
|
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 x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let s=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){s=t[l];break}if(!x(s))return}e.apply(console,t)}}function S(e,t,r){const s=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:s}))}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const r=!!(t&&t.typed),s=t&&t.exclude,l={},c=e.elements,o={};if(r)for(let i=0;i<c.length;i++){const n=c[i];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let i=0;i<c.length;i++){const n=c[i];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const r=e.elements,s=[],l={};for(let c=0;c<r.length;c++){const o=r[c];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let c=0;c<r.length;c++){const o=r[c];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const i=o.getAttribute("data-ln-fill-as")||o.name;if(!i||!(i in t))continue;const n=t[i];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(n).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=se(n);s.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),s.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<o.options.length;u++)o.options[u].selected=n.indexOf(o.options[u].value)!==-1;s.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),s.push(o)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=re);const N={};function ue(e,t){N[e]=t}function de(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=de);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function fe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];j[r]=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=fe,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=ae);const L={};function pe(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=L[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const i=r[o],n=i.getAttribute("data-ln-field");t[n]!=null&&(i.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<s.length;o++){const i=s[o],n=i.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&i.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const i=l[o],n=i.getAttribute("data-ln-show");n in t&&i.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let o=0;o<c.length;o++){const i=c[o],n=i.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&i.classList.toggle(a,!!t[f])}}return e}function he(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<r.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[s],t??null),r[s].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function W(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const s=function(c,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let c=0;c<l.length;c++){const o=l[c],i=o.attributes;for(let n=0;n<i.length;n++){const u=i[n];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function we(e,t,r,s,l,c){const o={};for(let n=0;n<e.children.length;n++){const u=e.children[n],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const i=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],d=String(s(u));let a=o[d];if(a)l(a,u,n);else{const f=pe(r,c);if(!f||(W(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,n)}i.appendChild(a)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=z,window.lnCore.lnFill=he,window.lnCore.renderList=we);function R(e,t,r){const s=e.getAttribute(t);return s===null?r:s}function P(e,t,r){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?r:s}function U(e,t,r=!1){const s=e.getAttribute(t);if(s===null)return!!r;const l=s.trim().toLowerCase();return!(l==="false"||l==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function V(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const s=new Set(e||[]),l=function(c,o){const i=c.getAttribute(o);return i!==null&&s.has(i)?i:t};return O.set(r,l),l}function K(e,t,r){const s=parseFloat(e.getAttribute(t));return isNaN(s)?r:s}function Q(e,t,r){const s=e.getAttribute(t);if(!s)return r;try{return JSON.parse(s)}catch{return r}}function J(e,t,r,s,l){if(!e||t===null)return!0;const c=s||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(i(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(i(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(i(`[${c}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(i(`[${c}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return i(`[${c}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function G(e,t,r){for(const s in r){const[l,c,o]=r[s];Object.defineProperty(e,s,{get:function(){return l(t,c,o)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const r in e){const s=e[r];if(!s||!s.prop)continue;let l=s.read;if(!l&&s.type)switch(s.type){case"enum":l=V(s.values,s.fallback);break;case"integer":l=P;break;case"float":l=K;break;case"boolean":l=U;break;case"list":l=H;break;case"json":l=Q;break;case"string":default:l=R;break}l||(l=R),t[s.prop]=[l,r,s.fallback]}return t}function be(e){const t={};for(const r in e){const s=e[r];s&&s.effect&&(t[r]=s.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=G,window.lnCore.attrSpec=X,window.lnCore.attrStr=R,window.lnCore.attrInt=P,window.lnCore.attrBool=U,window.lnCore.attrList=H,window.lnCore.attrEnum=V,window.lnCore.attrFloat=K,window.lnCore.attrJson=Q);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Y(e,t,r,s){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:s};if(e.matches&&e.matches(c)&&v(e,o),e.querySelectorAll){const i=e.querySelectorAll(c);for(let n=0;n<i.length;n++)v(i[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function _e(e){const t=Z(),r=e.observed||[];for(let s=0;s<r.length;s++){const l=r[s];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const l=t.byDeclaredAttr.get(s);l.some(c=>c.componentTag===e.componentTag)||l.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=me(e);if(s===null)t.reactiveWildcard.push(e);else for(const l of s)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,r,s){for(let l=0;l<e.length;l++){const c=e[l];if(!t[c.attribute])continue;const o=c.effects&&c.effects[r];o?o(t,r,s):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,s)}}function ve(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,s=Z(),l=s.byAttr.get(t),c=$()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!r&&!l&&!c)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(c&&x(o)){const i=s.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let u=0;u<i.length;u++)J(i[u].spec,n,t,i[u].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const i=s.byReactive.get(t);i&&ee(i,o,t,e.oldValue),s.reactiveWildcard.length&&ee(s.reactiveWildcard,o,t,e.oldValue)}if(l)for(let i=0;i<l.length;i++){const n=l[i];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(Y(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ve(t[r])}catch(s){console.error("[ln-core] mutation handler failed",t[r].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function te(e){const t=D();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const s=T();if(e.target&&s.length)for(let l=0;l<s.length;l++){const c=s[l],o=c.query,i=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;i&&c.onSubtreeChange(i,e)}for(let l=0;l<e.addedNodes.length;l++){const c=e.addedNodes[l];if(c.nodeType===1){const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i];if(n.selector&&n.attribute&&n.ComponentFn){if(!o)c.matches&&c.matches(n.query)&&v(c,n);else if(c.matches&&c.matches(n.query)&&v(c,n),c.querySelectorAll){const u=c.querySelectorAll(n.query);for(let d=0;d<u.length;d++)v(u[d],n)}}n.onInit&&n.onInit(c)}}}for(let l=0;l<e.removedNodes.length;l++){const c=e.removedNodes[l];if(c.nodeType===1){if(document.contains(c))continue;const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i],u=n.query;if(u){if(!o)c.matches&&c.matches(u)&&q(c,n);else if(c.matches&&c.matches(u)&&q(c,n),c.querySelectorAll){const d=c.querySelectorAll(u);for(let a=0;a<d.length;a++)q(d[a],n)}}}}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const s=t[r];if(s.type==="childList")try{te(s)}catch(l){console.error("[ln-core] lifecycle handler failed",s.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let s=0;s<r.length;s++){const l=r[s];if(l.type==="childList")try{te(l)}catch(c){console.error("[ln-core] lifecycle handler failed",l.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function ke(e){D().push(e),e.onSubtreeChange&&e.query&&T().push(e),ne()}function oe(e,t,r,s,l={}){const c=l.extraAttributes||[],o=l.onAttributeChange||null,i=l.onSubtreeChange||null,n=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?be(a):d,A=a?new Set(Object.keys(a)):null,_=l.persist||null;function C(w){const p=w||document.body;if(Y(p,e,t,r),a&&$())for(const E in a){const Me=a[E],B=Array.from(p.querySelectorAll("["+E+"]"));p.matches&&p.matches("["+E+"]")&&B.push(p);for(let F=0;F<B.length;F++){const M=B[F];x(M)&&J(Me,M.getAttribute(E),E,s,M)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)b.push(p[1])}else b.push(e);_e({selector:e,attribute:t,componentTag:s,attributes:a,ComponentFn:r,onInit:n,observed:b.concat(c),onAttributeChange:o,onAttrChange:u,effects:f,declared:A,persist:_}),Ae();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,m=l.subtreeQuery||(y?e:"["+e+"]"),g={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:i,query:m};D().push(g),i&&m&&T().push(g),ne(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=ke,window.lnCore.withoutLifecycle=Ee);function h(){ye()>0?Ce(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),C}function ie(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,r={},s=ie(t);if(!s)return r;const l=s.split("&");for(let c=0;c<l.length;c++){const o=l[c];if(!o)continue;const i=o.indexOf(":"),n=i>-1?o.slice(0,i):o,u=i>-1?o.slice(i+1):"";if(n)try{r[n]=decodeURIComponent(u)}catch{r[n]=u}}return r}function xe(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=I();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(c){const o=r[c];return o===""?c:c+":"+encodeURIComponent(o)}).join("&");ie(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Te(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),s=e.slice(t+1),l=s?s.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Te,window.lnCore.hashFilterDecode=qe);function Ie(e,t,r,s){const l=typeof s=="number"?s:4,c=window.innerWidth,o=window.innerHeight,i=t.width,n=t.height,u=r.split("-"),d=u[0],a=u[1]==="start"||u[1]==="end"?u[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[d]||f.bottom;function _(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-i:e.left+(e.width-i)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(g){let h,w,p=!0;return g==="top"?(h=e.top-l-n,w=_(g),h<0&&(p=!1)):g==="bottom"?(h=e.bottom+l,w=_(g),h+n>o&&(p=!1)):g==="left"?(h=_(g),w=e.left-l-i,w<0&&(p=!1)):(h=_(g),w=e.right+l,w+i>c&&(p=!1)),{top:h,left:w,side:g,fits:p}}let b=null;for(let g=0;g<A.length;g++){const h=C(A[g]);if(h.fits){b=h;break}}b||(b=C(A[0]));let y=b.top,m=b.left;return i>=c?m=0:(m<0&&(m=0),m+i>c&&(m=c-i)),n>=o?y=0:(y<0&&(y=0),y+n>o&&(y=o-n)),{top:y,left:m,placement:b.side}}function Be(e){if(!e)return{width:0,height:0};const t=e.style,r=t.visibility,s=t.display,l=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const c=e.offsetWidth,o=e.offsetHeight;return t.visibility=r,t.display=s,t.position=l,{width:c,height:o}}function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe),(function(){const e="data-ln-dropdown",t="lnDropdown",r="bottom-end";if(window[t]!==void 0)return;const s={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:r,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},l=X(s);function c(o){this.dom=o,G(this,o,l),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const i=this;return this._onRequestOpen=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(i.toggleEl){const n=i.toggleEl.getAttribute("data-ln-toggle");i.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const u=i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){u&&(n.preventDefault(),n.stopPropagation(),i.toggleEl.setAttribute("data-ln-toggle","close"),i.triggerBtn&&i.triggerBtn.focus());return}if(n.key==="Tab"){u&&(i.triggerBtn&&i.triggerBtn.focus(),i.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=i._getMenuItems();if(d.length===0)return;if(!u&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),i.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=i._getMenuItems();f.length>0&&i._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!u)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;i._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;i._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),i._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),i._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","true"),typeof i.toggleEl.showPopover=="function"&&i.toggleEl.showPopover(),i._initMenuAria(),i._reposition(),i._addOutsideClickListener(),i._addScrollRepositionListener(),i._addResizeCloseListener(),S(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","false"),i._removeOutsideClickListener(),i._removeScrollRepositionListener(),i._removeResizeCloseListener(),i.toggleEl.style.top="",i.toggleEl.style.left="",i.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof i.toggleEl.hidePopover=="function"&&i.toggleEl.matches(":popover-open")&&i.toggleEl.hidePopover(),S(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}c.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const i=this._getMenuItems();for(let n=0;n<i.length;n++)i[n].setAttribute("role","menuitem"),i[n].setAttribute("tabindex",n===0?"0":"-1")},c.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},c.prototype._focusItem=function(o,i){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===i?"0":"-1");o[i]&&o[i].focus()},c.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl||!document.contains(this.toggleEl))return;const o=this.triggerBtn.getBoundingClientRect(),i=Be(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,u=this.position||r,d=Ie(o,i,u,n),a=d.top+"px",f=d.left+"px";this.toggleEl.style.top!==a&&(this.toggleEl.style.top=a),this.toggleEl.style.left!==f&&(this.toggleEl.style.left=f),this.toggleEl.getAttribute("data-ln-dropdown-placement")!==d.placement&&this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},c.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(i){o.dom.contains(i.target)||o.toggleEl&&o.toggleEl.contains(i.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},c.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},c.prototype._addScrollRepositionListener=function(){const o=this;this._scrollRepositionRaf=null,this._boundScrollReposition=function(){o._scrollRepositionRaf||(o._scrollRepositionRaf=requestAnimationFrame(function(){o._scrollRepositionRaf=null,o._reposition()}))},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},c.prototype._removeScrollRepositionListener=function(){this._scrollRepositionRaf&&(cancelAnimationFrame(this._scrollRepositionRaf),this._scrollRepositionRaf=null),this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},c.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},c.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},c.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},oe(e,t,c,"ln-dropdown",{attributes:s})})()})();
|
|
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 S(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let l=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){l=t[s];break}if(!S(l))return}e.apply(console,t)}}function x(e,t,r){const l=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const r=!!(t&&t.typed),l=t&&t.exclude,s={},c=e.elements,o={};if(r)for(let i=0;i<c.length;i++){const n=c[i];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let i=0;i<c.length;i++){const n=c[i];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")r&&o[n.name]===1?s[n.name]=n.checked:(s[n.name]||(s[n.name]=[]),n.checked&&s[n.name].push(n.value));else if(n.type==="radio")n.checked&&(s[n.name]=n.value);else if(n.type==="select-multiple"){s[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&s[n.name].push(n.options[u].value)}else if(r&&n.type==="hidden")s[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const u=Number(n.value);s[n.name]=n.value===""||isNaN(u)?null:u}else s[n.name]=n.value}return s}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const r=e.elements,l=[],s={};for(let c=0;c<r.length;c++){const o=r[c];o.name&&o.type==="checkbox"&&(s[o.name]=(s[o.name]||0)+1)}for(let c=0;c<r.length;c++){const o=r[c];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const i=o.getAttribute("data-ln-fill-as")||o.name;if(!i||!(i in t))continue;const n=t[i];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(s[o.name]>1){const u=String(n).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=se(n);l.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),l.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<o.options.length;u++)o.options[u].selected=n.indexOf(o.options[u].value)!==-1;l.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),l.push(o)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=ie);const N={};function ue(e,t){N[e]=t}function de(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=de);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function fe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];j[r]=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=fe,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=ae);const L={};function pe(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=L[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function U(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const i=r[o],n=i.getAttribute("data-ln-field");t[n]!=null&&(i.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<l.length;o++){const i=l[o],n=i.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&i.setAttribute(a,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let o=0;o<s.length;o++){const i=s[o],n=i.getAttribute("data-ln-show");n in t&&i.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let o=0;o<c.length;o++){const i=c[o],n=i.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&i.classList.toggle(a,!!t[f])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<r.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[l],t??null),r[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)U(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function P(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const l=function(c,o){return t[o]!==void 0?t[o]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let c=0;c<s.length;c++){const o=s[c],i=o.attributes;for(let n=0;n<i.length;n++){const u=i[n];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function he(e,t,r,l,s,c){const o={};for(let n=0;n<e.children.length;n++){const u=e.children[n],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const i=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],d=String(l(u));let a=o[d];if(a)s(a,u,n);else{const f=pe(r,c);if(!f||(P(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),s(a,u,n)}i.appendChild(a)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=U,window.lnCore.lnFill=we,window.lnCore.renderList=he);function R(e,t,r){const l=e.getAttribute(t);return l===null?r:l}function W(e,t,r){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?r:l}function z(e,t,r=!1){const l=e.getAttribute(t);if(l===null)return!!r;const s=l.trim().toLowerCase();return!(s==="false"||s==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function V(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const l=new Set(e||[]),s=function(c,o){const i=c.getAttribute(o);return i!==null&&l.has(i)?i:t};return O.set(r,s),s}function K(e,t,r){const l=parseFloat(e.getAttribute(t));return isNaN(l)?r:l}function Q(e,t,r){const l=e.getAttribute(t);if(!l)return r;try{return JSON.parse(l)}catch{return r}}function J(e,t,r,l,s){if(!e||t===null)return!0;const c=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=n=>{s?console.warn(n,s):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(i(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(i(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(i(`[${c}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(i(`[${c}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return i(`[${c}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function G(e,t,r){for(const l in r){const[s,c,o]=r[l];Object.defineProperty(e,l,{get:function(){return s(t,c,o)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const r in e){const l=e[r];if(!l||!l.prop)continue;let s=l.read;if(!s&&l.type)switch(l.type){case"enum":s=V(l.values,l.fallback);break;case"integer":s=W;break;case"float":s=K;break;case"boolean":s=z;break;case"list":s=H;break;case"json":s=Q;break;case"string":default:s=R;break}s||(s=R),t[l.prop]=[s,r,l.fallback]}return t}function be(e){const t={};for(const r in e){const l=e[r];l&&l.effect&&(t[r]=l.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=G,window.lnCore.attrSpec=X,window.lnCore.attrStr=R,window.lnCore.attrInt=W,window.lnCore.attrBool=z,window.lnCore.attrList=H,window.lnCore.attrEnum=V,window.lnCore.attrFloat=K,window.lnCore.attrJson=Q);function A(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Y(e,t,r,l){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:l};if(e.matches&&e.matches(c)&&A(e,o),e.querySelectorAll){const i=e.querySelectorAll(c);for(let n=0;n<i.length;n++)A(i[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function _e(e){const t=Z(),r=e.observed||[];for(let l=0;l<r.length;l++){const s=r[l];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const s=t.byDeclaredAttr.get(l);s.some(c=>c.componentTag===e.componentTag)||s.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=me(e);if(l===null)t.reactiveWildcard.push(e);else for(const s of l)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,r,l){for(let s=0;s<e.length;s++){const c=e[s];if(!t[c.attribute])continue;const o=c.effects&&c.effects[r];o?o(t,r,l):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,l)}}function Ae(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,l=Z(),s=l.byAttr.get(t),c=$()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!r&&!s&&!c)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(c&&S(o)){const i=l.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let u=0;u<i.length;u++)J(i[u].spec,n,t,i[u].componentTag,o)}if(window.lnCore._debugSink&&(r||s)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const i=l.byReactive.get(t);i&&ee(i,o,t,e.oldValue),l.reactiveWildcard.length&&ee(l.reactiveWildcard,o,t,e.oldValue)}if(s)for(let i=0;i<s.length;i++){const n=s[i];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(Y(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ae(t[r])}catch(l){console.error("[ln-core] mutation handler failed",t[r].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function D(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function I(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function te(e){const t=q();if(!t.length)return;const r=e.target;if(r){const s=r.nodeType===1?r:r.parentElement;if(s&&(s.isContentEditable||s.closest&&s.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=D();if(e.target&&l.length)for(let s=0;s<l.length;s++){const c=l[s],o=c.query,i=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;i&&c.onSubtreeChange(i,e)}for(let s=0;s<e.addedNodes.length;s++){const c=e.addedNodes[s];if(c.nodeType===1){const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i];if(n.selector&&n.attribute&&n.ComponentFn){if(!o)c.matches&&c.matches(n.query)&&A(c,n);else if(c.matches&&c.matches(n.query)&&A(c,n),c.querySelectorAll){const u=c.querySelectorAll(n.query);for(let d=0;d<u.length;d++)A(u[d],n)}}n.onInit&&n.onInit(c)}}}for(let s=0;s<e.removedNodes.length;s++){const c=e.removedNodes[s];if(c.nodeType===1){if(document.contains(c))continue;const o=!!(c.firstElementChild||c.children&&c.children.length);for(let i=0;i<t.length;i++){const n=t[i],u=n.query;if(u){if(!o)c.matches&&c.matches(u)&&I(c,n);else if(c.matches&&c.matches(u)&&I(c,n),c.querySelectorAll){const d=c.querySelectorAll(u);for(let a=0;a<d.length;a++)I(d[a],n)}}}}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const l=t[r];if(l.type==="childList")try{te(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let l=0;l<r.length;l++){const s=r[l];if(s.type==="childList")try{te(s)}catch(c){console.error("[ln-core] lifecycle handler failed",s.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function ke(e){q().push(e),e.onSubtreeChange&&e.query&&D().push(e),ne()}function oe(e,t,r,l,s={}){const c=s.extraAttributes||[],o=s.onAttributeChange||null,i=s.onSubtreeChange||null,n=s.onInit||null,u=s.onAttrChange||null,d=s.effects||null,a=s.attributes||null,f=a?be(a):d,v=a?new Set(Object.keys(a)):null,_=s.persist||null;function C(h){const p=h||document.body;if(Y(p,e,t,r),a&&$())for(const E in a){const Ve=a[E],F=Array.from(p.querySelectorAll("["+E+"]"));p.matches&&p.matches("["+E+"]")&&F.push(p);for(let B=0;B<F.length;B++){const M=F[B];S(M)&&J(Ve,M.getAttribute(E),E,l,M)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const h=/\[([\w-]+)/g;let p;for(;(p=h.exec(e))!==null;)b.push(p[1])}else b.push(e);_e({selector:e,attribute:t,componentTag:l,attributes:a,ComponentFn:r,onInit:n,observed:b.concat(c),onAttributeChange:o,onAttrChange:u,effects:f,declared:v,persist:_}),ve();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,m=s.subtreeQuery||(y?e:"["+e+"]"),g={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:i,query:m};q().push(g),i&&m&&D().push(g),ne(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=ke,window.lnCore.withoutLifecycle=Ee);function w(){ye()>0?Ce(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),C}function re(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,r={},l=re(t);if(!l)return r;const s=l.split("&");for(let c=0;c<s.length;c++){const o=s[c];if(!o)continue;const i=o.indexOf(":"),n=i>-1?o.slice(0,i):o,u=i>-1?o.slice(i+1):"";if(n)try{r[n]=decodeURIComponent(u)}catch{r[n]=u}}return r}function Se(e){if(!e)return null;const t=T();return e in t?t[e]:null}function xe(e,t){if(!e)return;const r=T();t==null?delete r[e]:r[e]=String(t);const s=Object.keys(r).map(function(c){const o=r[c];return o===""?c:c+":"+encodeURIComponent(o)}).join("&");re(location.hash)!==s&&(location.hash=s)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const 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 Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),l=e.slice(t+1),s=l?l.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=Se,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);function Te(e){return(e||"").replace(/^\?/,"")}function Fe(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,r={},l=Te(t);if(!l)return r;const s=new URLSearchParams(l);for(const[c,o]of s.entries())r[c]=o;return r}function Be(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Me(e,t){if(!e||typeof window>"u")return;const r=new URL(window.location.href);if(t==null||t===""?r.searchParams.delete(e):r.searchParams.set(e,String(t)),r.search===window.location.search)return;const l=r.pathname+r.search+r.hash;window.history.replaceState(window.history.state,"",l)}function $e(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const r=e.getAttribute("data-ln-query");if(r&&r.trim()!=="")return r.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 Ne(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const r=t.sort_field||t.sort_by;if(r){const l=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:r,direction:l}}}return null}function Ue(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Pe(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Fe,window.lnCore.queryGet=Be,window.lnCore.querySet=Me,window.lnCore.resolveQueryParam=$e,window.lnCore.querySortEncode=Ne,window.lnCore.querySortDecode=je,window.lnCore.queryFilterEncode=Ue,window.lnCore.queryFilterDecode=Pe);function We(e,t,r,l){const s=typeof l=="number"?l:4,c=window.innerWidth,o=window.innerHeight,i=t.width,n=t.height,u=r.split("-"),d=u[0],a=u[1]==="start"||u[1]==="end"?u[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},v=f[d]||f.bottom;function _(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-i:e.left+(e.width-i)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(g){let w,h,p=!0;return g==="top"?(w=e.top-s-n,h=_(g),w<0&&(p=!1)):g==="bottom"?(w=e.bottom+s,h=_(g),w+n>o&&(p=!1)):g==="left"?(w=_(g),h=e.left-s-i,h<0&&(p=!1)):(w=_(g),h=e.right+s,h+i>c&&(p=!1)),{top:w,left:h,side:g,fits:p}}let b=null;for(let g=0;g<v.length;g++){const w=C(v[g]);if(w.fits){b=w;break}}b||(b=C(v[0]));let y=b.top,m=b.left;return i>=c?m=0:(m<0&&(m=0),m+i>c&&(m=c-i)),n>=o?y=0:(y<0&&(y=0),y+n>o&&(y=o-n)),{top:y,left:m,placement:b.side}}function ze(e){if(!e)return{width:0,height:0};const t=e.style,r=t.visibility,l=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const c=e.offsetWidth,o=e.offsetHeight;return t.visibility=r,t.display=l,t.position=s,{width:c,height:o}}function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He),(function(){const e="data-ln-dropdown",t="lnDropdown",r="bottom-end";if(window[t]!==void 0)return;const l={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:r,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},s=X(l);function c(o){this.dom=o,G(this,o,s),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const i=this;return this._onRequestOpen=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(i.toggleEl){const n=i.toggleEl.getAttribute("data-ln-toggle");i.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const u=i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){u&&(n.preventDefault(),n.stopPropagation(),i.toggleEl.setAttribute("data-ln-toggle","close"),i.triggerBtn&&i.triggerBtn.focus());return}if(n.key==="Tab"){u&&(i.triggerBtn&&i.triggerBtn.focus(),i.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=i._getMenuItems();if(d.length===0)return;if(!u&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),i.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=i._getMenuItems();f.length>0&&i._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!u)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;i._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;i._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),i._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),i._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","true"),typeof i.toggleEl.showPopover=="function"&&i.toggleEl.showPopover(),i._initMenuAria(),i._reposition(),i._addOutsideClickListener(),i._addScrollRepositionListener(),i._addResizeCloseListener(),x(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","false"),i._removeOutsideClickListener(),i._removeScrollRepositionListener(),i._removeResizeCloseListener(),i.toggleEl.style.top="",i.toggleEl.style.left="",i.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof i.toggleEl.hidePopover=="function"&&i.toggleEl.matches(":popover-open")&&i.toggleEl.hidePopover(),x(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}c.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const i=this._getMenuItems();for(let n=0;n<i.length;n++)i[n].setAttribute("role","menuitem"),i[n].setAttribute("tabindex",n===0?"0":"-1")},c.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},c.prototype._focusItem=function(o,i){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===i?"0":"-1");o[i]&&o[i].focus()},c.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl||!document.contains(this.toggleEl))return;const o=this.triggerBtn.getBoundingClientRect(),i=ze(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,u=this.position||r,d=We(o,i,u,n),a=d.top+"px",f=d.left+"px";this.toggleEl.style.top!==a&&(this.toggleEl.style.top=a),this.toggleEl.style.left!==f&&(this.toggleEl.style.left=f),this.toggleEl.getAttribute("data-ln-dropdown-placement")!==d.placement&&this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},c.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(i){o.dom.contains(i.target)||o.toggleEl&&o.toggleEl.contains(i.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},c.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},c.prototype._addScrollRepositionListener=function(){const o=this;this._scrollRepositionRaf=null,this._boundScrollReposition=function(){o._scrollRepositionRaf||(o._scrollRepositionRaf=requestAnimationFrame(function(){o._scrollRepositionRaf=null,o._reposition()}))},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},c.prototype._removeScrollRepositionListener=function(){this._scrollRepositionRaf&&(cancelAnimationFrame(this._scrollRepositionRaf),this._scrollRepositionRaf=null),this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},c.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},c.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},c.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},oe(e,t,c,"ln-dropdown",{attributes:l})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function P(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!N(i))return}e.apply(console,t)}}function x(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function fe(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(o),o}function O(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){O(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function we(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,o={},s=e.elements,l={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let d=0;d<n.options.length;d++)n.options[d].selected&&o[n.name].push(n.options[d].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const d=Number(n.value);o[n.name]=n.value===""||isNaN(d)?null:d}else o[n.name]=n.value}return o}function be(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function pe(e,t){const r=e.elements,i=[],o={};for(let s=0;s<r.length;s++){const l=r[s];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let s=0;s<r.length;s++){const l=r[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const n=t[c];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const d=String(n).split(",").map(function(p){return p.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=be(n);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let d=0;d<l.options.length;d++)l.options[d].selected=n.indexOf(l.options[d].value)!==-1;i.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=pe,window.lnCore.serializeForm=we,window.lnCore.resolveFormMethod=he);const U={};function me(e,t){U[e]=t}function ge(e){return U[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=ge);function _e(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,O(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function Ce(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];W[r]=t}function ye(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ce,window.lnCore.getLocaleFallback=ye,window.lnCore.ensureLocaleObserver=_e);const M={};function K(e,t){M[e]||(M[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=M[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function ve(e,t,r){if(e){const i=e.querySelector('[data-ln-template="'+t+'"]');if(i)return i.content.cloneNode(!0)}return K(t,r)}function V(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const c=r[l],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const c=i[l],n=c.getAttribute("data-ln-attr").split(",");for(let d=0;d<n.length;d++){const p=n[d].trim().split(":");if(p.length!==2)continue;const m=p[0].trim(),v=p[1].trim();t[v]!=null&&c.setAttribute(m,t[v])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const c=o[l],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],n=c.getAttribute("data-ln-class").split(",");for(let d=0;d<n.length;d++){const p=n[d].trim().split(":");if(p.length!==2)continue;const m=p[0].trim(),v=p[1].trim();v in t&&c.classList.toggle(m,!!t[v])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)V(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function Q(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],c=l.attributes;for(let n=0;n<c.length;n++){const d=c[n];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function xe(e,t,r,i,o,s){const l={};for(let n=0;n<e.children.length;n++){const d=e.children[n],p=d.getAttribute("data-ln-render-key");p&&(l[p]=d)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const d=t[n],p=String(i(d));let m=l[p];if(m)o(m,d,n);else{const v=K(r,s);if(!v||(Q(v,d),m=v.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",p),o(m,d,n)}c.appendChild(m)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=V,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function I(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function z(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function J(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const B=new Map;function X(e,t){const r=(e?e.join("|"):"")+"::"+t;if(B.has(r))return B.get(r);const i=new Set(e||[]),o=function(s,l){const c=s.getAttribute(l);return c!==null&&i.has(c)?c:t};return B.set(r,o),o}function Y(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function Z(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function ee(e,t,r,i,o){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ke(e,t,r){for(const i in r){const[o,s,l]=r[i];Object.defineProperty(e,i,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=X(i.values,i.fallback);break;case"integer":o=z;break;case"float":o=Y;break;case"boolean":o=J;break;case"list":o=G;break;case"json":o=Z;break;case"string":default:o=I;break}o||(o=I),t[i.prop]=[o,r,i.fallback]}return t}function Le(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function Ee(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ke,window.lnCore.attrSpec=Se,window.lnCore.attrStr=I,window.lnCore.attrInt=z,window.lnCore.attrBool=J,window.lnCore.attrList=G,window.lnCore.attrEnum=X,window.lnCore.attrFloat=Y,window.lnCore.attrJson=Z);function L(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function te(e,t,r,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(s)&&L(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)L(c[n],l)}}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 Oe(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 ne(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function De(e){const t=ne(),r=e.observed||[];for(let i=0;i<r.length;i++){const o=r[i];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 i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Ee(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function re(e,t,r,i){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const l=s.effects&&s.effects[r];l?l(t,r,i):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,i)}}function qe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=ne(),o=i.byAttr.get(t),s=P()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&N(l)){const c=i.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let d=0;d<c.length;d++)ee(c[d].spec,n,t,c[d].componentTag,l)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const c=i.byReactive.get(t);c&&re(c,l,t,e.oldValue),i.reactiveWildcard.length&&re(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const n=o[c];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(te(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,O(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{qe(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function F(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function H(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=F();if(!t.length)return;const r=e.target;if(r){const o=r.nodeType===1?r:r.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=R();if(e.target&&i.length)for(let o=0;o<i.length;o++){const s=i[o],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)s.matches&&s.matches(n.query)&&L(s,n);else if(s.matches&&s.matches(n.query)&&L(s,n),s.querySelectorAll){const d=s.querySelectorAll(n.query);for(let p=0;p<d.length;p++)L(d[p],n)}}n.onInit&&n.onInit(s)}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],d=n.query;if(d){if(!l)s.matches&&s.matches(d)&&H(s,n);else if(s.matches&&s.matches(d)&&H(s,n),s.querySelectorAll){const p=s.querySelectorAll(d);for(let m=0;m<p.length;m++)H(p[m],n)}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,O(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{oe(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let i=0;i<r.length;i++){const o=r[i];if(o.type==="childList")try{oe(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ie(e){F().push(e),e.onSubtreeChange&&e.query&&R().push(e),ie()}function le(e,t,r,i,o={}){const s=o.extraAttributes||[],l=o.onAttributeChange||null,c=o.onSubtreeChange||null,n=o.onInit||null,d=o.onAttrChange||null,p=o.effects||null,m=o.attributes||null,v=m?Le(m):p,j=m?new Set(Object.keys(m)):null,D=o.persist||null;function k(C){const w=C||document.body;if(te(w,e,t,r),m&&P())for(const g in m){const b=m[g],_=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&_.push(w);for(let A=0;A<_.length;A++){const S=_[A];N(S)&&ee(b,S.getAttribute(g),g,i,S)}}n&&n(w)}const E=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let w;for(;(w=C.exec(e))!==null;)E.push(w[1])}else E.push(e);De({selector:e,attribute:t,componentTag:i,attributes:m,ComponentFn:r,onInit:n,observed:E.concat(s),onAttributeChange:l,onAttrChange:d,effects:v,declared:j,persist:D}),Ne();const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,a=o.subtreeQuery||(u?e:"["+e+"]"),f={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:c,query:a};F().push(f),c&&a&&R().push(f),ie(),window[t]=k,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Ie,window.lnCore.withoutLifecycle=Me);function h(){Te()>0?Oe(function(){k(document.body)}):k(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),k}function se(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,r={},i=se(t);if(!i)return r;const o=i.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const c=l.indexOf(":"),n=c>-1?l.slice(0,c):l,d=c>-1?l.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(d)}catch{r[n]=d}}return r}function Be(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const r=$();t==null?delete r[e]:r[e]=String(t);const o=Object.keys(r).map(function(s){const l=r[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");se(location.hash)!==o&&(location.hash=o)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function He(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Pe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ue(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=Be,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=He,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=Pe,window.lnCore.hashFilterDecode=Ue);function We(){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=We),(function(){const e="data-ln-editor",t="lnEditor";if(window[t]!==void 0)return;const r={"data-ln-editor":{type:"marker",description:"Mounts rich text editor instance on container"},"data-ln-editor-action":{type:"enum",values:["bold","italic","underline","strikethrough","heading-2","heading-3","heading-4","blockquote","code","paragraph","ordered-list","unordered-list","link","unlink","clear","confirm-link","cancel-link"],description:"Rich text toolbar formatting action"},"data-ln-editor-source":{type:"string",description:"Selector or ID of backing textarea synchronized with editor content"}},i={P:!0,BR:!0,STRONG:!0,B:!0,EM:!0,I:!0,U:!0,S:!0,A:!0,UL:!0,OL:!0,LI:!0,H2:!0,H3:!0,H4:!0,BLOCKQUOTE:!0,PRE:!0,CODE:!0,DIV:!0},o={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikeThrough"},s={"heading-2":"h2","heading-3":"h3","heading-4":"h4",blockquote:"blockquote",code:"pre",paragraph:"p"},l={"ordered-list":"insertOrderedList","unordered-list":"insertUnorderedList"};let c=0;function n(u){return!!(o[u]||s[u]||l[u]||u==="link")}function d(u){this.dom=u;const a=this;if(this._textarea=u.querySelector("textarea"),!this._textarea)return console.warn("[ln-editor] No <textarea> found inside",u),this;const f=this._textarea.getAttribute("placeholder")||"";this._textarea.setAttribute("data-ln-editor-source",""),this._surface=document.createElement("div"),this._surface.className="ln-editor__surface",this._surface.setAttribute("contenteditable","true"),this._surface.setAttribute("role","textbox"),this._surface.setAttribute("aria-multiline","true"),f&&this._surface.setAttribute("data-placeholder",f);const h=this._textarea.id;if(h){const b=u.querySelector('label[for="'+h+'"]');b&&(b.id||(b.id=h+"-label"),this._surface.setAttribute("aria-labelledby",b.id))}this._surface.id=h?h+"-surface":"ln-editor-surface-"+ ++c;const C=this._textarea.value.trim();C&&(this._surface.innerHTML=C);const w=u.querySelector('[role="toolbar"]');if(w&&w.nextSibling?u.insertBefore(this._surface,w.nextSibling):u.appendChild(this._surface),w){w.setAttribute("aria-controls",this._surface.id);const b=w.querySelectorAll("[data-ln-editor-action]");for(let _=0;_<b.length;_++){const A=b[_].getAttribute("data-ln-editor-action");n(A)&&b[_].setAttribute("aria-pressed","false")}}this._onInput=function(){a._syncToTextarea(),x(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom})},this._onMousedownToolbar=function(b){b.target.closest("[data-ln-editor-action]")&&b.preventDefault()},this._onClickToolbar=function(b){const _=b.target.closest("[data-ln-editor-action]");if(!_)return;const A=_.getAttribute("data-ln-editor-action");a._execAction(A)},this._onPaste=function(b){v(a,b)},this._onKeydown=function(b){k(a,b)},this._listeningSelection=!1,this._rafSelection=null,this._onSelectionChange=function(){a._rafSelection||(a._rafSelection=requestAnimationFrame(function(){a._rafSelection=null,document.contains(a._surface)&&a._updateActiveStates()}))},this._attachSelection=function(){a._listeningSelection||(a._listeningSelection=!0,document.addEventListener("selectionchange",a._onSelectionChange))},this._detachSelection=function(){a._listeningSelection&&(a._listeningSelection=!1,document.removeEventListener("selectionchange",a._onSelectionChange)),a._rafSelection&&(cancelAnimationFrame(a._rafSelection),a._rafSelection=null)},this._onFocus=function(){a._attachSelection(),a._updateActiveStates(),x(a.dom,"ln-editor:focus",{target:a.dom})},this._onBlur=function(){a._detachSelection(),a._syncToTextarea(),x(a.dom,"ln-editor:blur",{target:a.dom})},this._onTextareaInput=function(){a._surface.innerHTML!==a._textarea.value&&(a._surface.innerHTML=a._textarea.value,x(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom}))},this._surface.addEventListener("input",this._onInput),this._surface.addEventListener("paste",this._onPaste),this._surface.addEventListener("keydown",this._onKeydown),this._surface.addEventListener("focus",this._onFocus),this._surface.addEventListener("blur",this._onBlur),this._textarea.addEventListener("input",this._onTextareaInput),w&&(w.addEventListener("mousedown",this._onMousedownToolbar),w.addEventListener("click",this._onClickToolbar)),this._onSetContent=function(b){const _=b.detail&&b.detail.html;_!==void 0&&(a._surface.innerHTML=_,a._syncToTextarea(),x(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom}))},u.addEventListener("ln-editor:set-content",this._onSetContent);const g=this._textarea.form;return g&&(this._onFormReset=function(){setTimeout(function(){a._surface.innerHTML=a._textarea.value,x(u,"ln-editor:changed",{html:a._textarea.value,target:u})},0)},g.addEventListener("reset",this._onFormReset)),this}d.prototype._syncToTextarea=function(){this._textarea&&(this._textarea.value=this._surface.innerHTML)},d.prototype._execAction=function(u){if(!(!u||fe(this.dom,"ln-editor:before-change",{action:u,target:this.dom}).defaultPrevented)){if(this._surface.focus(),o[u])document.execCommand(o[u],!1,null);else if(s[u]){const f=s[u],h=p(this._surface);h&&h.toLowerCase()===f?document.execCommand("formatBlock",!1,"<p>"):document.execCommand("formatBlock",!1,"<"+f+">")}else l[u]?document.execCommand(l[u],!1,null):u==="link"?E(this):u==="unlink"?document.execCommand("unlink",!1,null):u==="clear"&&(document.execCommand("removeFormat",!1,null),document.execCommand("formatBlock",!1,"<p>"));this._syncToTextarea(),this._updateActiveStates()}},d.prototype._updateActiveStates=function(){const u=this.dom.querySelector('[role="toolbar"]');if(!u)return;const a=window.getSelection();if(!a||a.rangeCount===0)return;const f=a.anchorNode;if(!f||!this._surface.contains(f))return;const h=u.querySelectorAll("[data-ln-editor-action]");for(let C=0;C<h.length;C++){const w=h[C],g=w.getAttribute("data-ln-editor-action");let b=!1;if(o[g])try{b=document.queryCommandState(o[g])}catch{}else if(s[g]){const _=p(this._surface);b=_&&_.toLowerCase()===s[g]}else if(l[g])try{b=document.queryCommandState(l[g])}catch{}else g==="link"&&(b=!!m(a.anchorNode,"A",this._surface));if(n(g)){const _=String(b);w.getAttribute("aria-pressed")!==_&&w.setAttribute("aria-pressed",_)}b?w.classList.contains("ln-editor-active")||w.classList.add("ln-editor-active"):w.classList.contains("ln-editor-active")&&w.classList.remove("ln-editor-active")}},d.prototype.getHTML=function(){return this._surface?this._surface.innerHTML:""},d.prototype.setHTML=function(u){this._surface&&(this._surface.innerHTML=u,this._syncToTextarea(),x(this.dom,"ln-editor:changed",{html:this._textarea.value,target:this.dom}))},d.prototype.destroy=function(){if(!this.dom[t])return;this._surface&&(this._surface.removeEventListener("input",this._onInput),this._surface.removeEventListener("paste",this._onPaste),this._surface.removeEventListener("keydown",this._onKeydown),this._surface.removeEventListener("focus",this._onFocus),this._surface.removeEventListener("blur",this._onBlur),this._surface.remove());const u=this.dom.querySelector('[role="toolbar"]');u&&(u.removeEventListener("mousedown",this._onMousedownToolbar),u.removeEventListener("click",this._onClickToolbar)),this._detachSelection?this._detachSelection():document.removeEventListener("selectionchange",this._onSelectionChange),this.dom.removeEventListener("ln-editor:set-content",this._onSetContent);const a=this._textarea?this._textarea.form:null;if(a&&this._onFormReset&&a.removeEventListener("reset",this._onFormReset),this._textarea&&(this._onTextareaInput&&this._textarea.removeEventListener("input",this._onTextareaInput),this._textarea.removeAttribute("data-ln-editor-source")),this._closeLinkPopover)this._closeLinkPopover();else{const f=this.dom.querySelector(".ln-editor__link-popover");f&&f.remove()}delete this.dom[t]};function p(u){const a=window.getSelection();if(!a||a.rangeCount===0)return null;let f=a.anchorNode;if(!f)return null;for(;f&&f!==u;){if(f.nodeType===1){const h=f.tagName;if(h==="H2"||h==="H3"||h==="H4"||h==="BLOCKQUOTE"||h==="PRE"||h==="P")return h}f=f.parentNode}return null}function m(u,a,f){for(;u&&u!==f;){if(u.nodeType===1&&u.tagName===a)return u;u=u.parentNode}return null}function v(u,a){a.preventDefault();let f="";if(a.clipboardData&&(f=a.clipboardData.getData("text/html"),!f)){const C=a.clipboardData.getData("text/plain");C&&(f=C.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br>"),f="<p>"+f+"</p>")}if(!f)return;const h=j(f);h&&document.execCommand("insertHTML",!1,h)}function j(u){const a=document.createElement("div");return a.innerHTML=u,D(a),a.innerHTML}function D(u){const a=Array.from(u.childNodes);for(let f=0;f<a.length;f++){const h=a[f];if(h.nodeType!==3){if(h.nodeType!==1){u.removeChild(h);continue}if(i[h.tagName]){const C=Array.from(h.attributes);for(let w=0;w<C.length;w++){const g=C[w].name;if(h.tagName==="A"&&g==="href"){const b=h.getAttribute("href")||"";/^(https?:|mailto:|\/|#)/.test(b)||h.removeAttribute("href")}else h.removeAttribute(g)}h.tagName==="A"&&h.setAttribute("rel","noopener noreferrer"),D(h)}else{for(;h.firstChild;)u.insertBefore(h.firstChild,h);u.removeChild(h)}}}}function k(u,a){if(!(a.ctrlKey||a.metaKey))return;let f=null;switch(a.key.toLowerCase()){case"b":f="bold";break;case"i":f="italic";break;case"u":f="underline";break;case"k":f="link";break}f&&(a.preventDefault(),u._execAction(f))}function E(u){const a=window.getSelection();if(!a||a.rangeCount===0)return;const f=m(a.anchorNode,"A",u._surface),h=a.getRangeAt(0).cloneRange();u._closeLinkPopover&&u._closeLinkPopover();const C=ve(u.dom,"ln-editor-link-popover","ln-editor");if(!C)return;const w=C.firstElementChild;if(!w)return;const g=w.querySelector('input[type="url"]'),b=w.querySelector('[data-ln-editor-action="confirm-link"]'),_=w.querySelector('[data-ln-editor-action="cancel-link"]');f&&(g.value=f.getAttribute("href")||"");const A=u.dom.querySelector('[role="toolbar"]');A?A.after(w):u.dom.insertBefore(w,u._surface),g.focus();function S(){const y=window.getSelection();y.removeAllRanges(),y.addRange(h)}function q(){document.removeEventListener("mousedown",ue),u._closeLinkPopover=null,w.remove()}function ae(){const y=g.value.trim();if(q(),S(),u._surface.focus(),y)if(f)f.setAttribute("href",y),f.setAttribute("rel","noopener noreferrer"),u._syncToTextarea(),x(u.dom,"ln-editor:changed",{html:u._textarea.value,target:u.dom});else{document.execCommand("createLink",!1,y);const T=window.getSelection();if(T&&T.anchorNode){const de=m(T.anchorNode,"A",u._surface);de&&(de.setAttribute("rel","noopener noreferrer"),u._syncToTextarea())}}else f&&document.execCommand("unlink",!1,null)}function ce(){q(),S(),u._surface.focus()}function Ke(){q()}function ue(y){const T=u.dom.contains(y.target)&&y.target.closest('[data-ln-editor-action="link"]');!w.contains(y.target)&&!T&&Ke()}u._closeLinkPopover=q,b.addEventListener("click",ae),_.addEventListener("click",ce),g.addEventListener("keydown",function(y){y.key==="Enter"?(y.preventDefault(),ae()):y.key==="Escape"&&(y.preventDefault(),ce())}),document.addEventListener("mousedown",ue)}le(e,t,d,"ln-editor",{attributes:r})})()})();
|
|
1
|
+
(function(){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!I(o))return}e.apply(console,t)}}function x(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function fe(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function q(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){q(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function we(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let a=0;a<s.length;a++){const r=s[a];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let a=0;a<s.length;a++){const r=s[a];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let d=0;d<r.options.length;d++)r.options[d].selected&&i[r.name].push(r.options[d].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const d=Number(r.value);i[r.name]=r.value===""||isNaN(d)?null:d}else i[r.name]=r.value}return i}function pe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function be(e,t){const n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const r=t[a];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const d=String(r).split(",").map(function(b){return b.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=pe(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let d=0;d<l.options.length;d++)l.options[d].selected=r.indexOf(l.options[d].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=be,window.lnCore.serializeForm=we,window.lnCore.resolveFormMethod=he);const P={};function me(e,t){P[e]=t}function ge(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=ge);function ye(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,q(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function _e(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];W[n]=t}function Ce(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=_e,window.lnCore.getLocaleFallback=Ce,window.lnCore.ensureLocaleObserver=ye);const N={};function K(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 ve(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return K(t,n)}function V(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const a=o[l],r=a.getAttribute("data-ln-attr").split(",");for(let d=0;d<r.length;d++){const b=r[d].trim().split(":");if(b.length!==2)continue;const m=b[0].trim(),v=b[1].trim();t[v]!=null&&a.setAttribute(m,t[v])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const a=i[l],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],r=a.getAttribute("data-ln-class").split(",");for(let d=0;d<r.length;d++){const b=r[d].trim().split(":");if(b.length!==2)continue;const m=b[0].trim(),v=b[1].trim();v in t&&a.classList.toggle(m,!!t[v])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)V(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Q(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],a=l.attributes;for(let r=0;r<a.length;r++){const d=a[r];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function xe(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const d=e.children[r],b=d.getAttribute("data-ln-render-key");b&&(l[b]=d)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const d=t[r],b=String(o(d));let m=l[b];if(m)i(m,d,r);else{const v=K(n,s);if(!v||(Q(v,d),m=v.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",b),i(m,d,r)}a.appendChild(m)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=V,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function M(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function z(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function G(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function J(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const R=new Map;function X(e,t){const n=(e?e.join("|"):"")+"::"+t;if(R.has(n))return R.get(n);const o=new Set(e||[]),i=function(s,l){const a=s.getAttribute(l);return a!==null&&o.has(a)?a:t};return R.set(n,i),i}function Y(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function Z(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ee(e,t,n,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function Se(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function ke(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=X(o.values,o.fallback);break;case"integer":i=z;break;case"float":i=Y;break;case"boolean":i=G;break;case"list":i=J;break;case"json":i=Z;break;case"string":default:i=M;break}i||(i=M),t[o.prop]=[i,n,o.fallback]}return t}function Le(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function 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}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Se,window.lnCore.attrSpec=ke,window.lnCore.attrStr=M,window.lnCore.attrInt=z,window.lnCore.attrBool=G,window.lnCore.attrList=J,window.lnCore.attrEnum=X,window.lnCore.attrFloat=Y,window.lnCore.attrJson=Z);function L(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function te(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&L(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let r=0;r<a.length;r++)L(a[r],l)}}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 qe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ne(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Oe(e){const t=ne(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Ee(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function re(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function De(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=ne(),i=o.byAttr.get(t),s=j()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&I(l)){const a=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let d=0;d<a.length;d++)ee(a[d].spec,r,t,a[d].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const a=o.byReactive.get(t);a&&re(a,l,t,e.oldValue),o.reactiveWildcard.length&&re(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let a=0;a<i.length;a++){const r=i[a];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(te(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Ie(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,q(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{De(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function F(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function B(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function H(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=F();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=B();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&s.onSubtreeChange(a,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const r=t[a];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)s.matches&&s.matches(r.query)&&L(s,r);else if(s.matches&&s.matches(r.query)&&L(s,r),s.querySelectorAll){const d=s.querySelectorAll(r.query);for(let b=0;b<d.length;b++)L(d[b],r)}}r.onInit&&r.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const r=t[a],d=r.query;if(d){if(!l)s.matches&&s.matches(d)&&H(s,r);else if(s.matches&&s.matches(d)&&H(s,r),s.querySelectorAll){const b=s.querySelectorAll(d);for(let m=0;m<b.length;m++)H(b[m],r)}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,q(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{oe(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ne(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{oe(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Me(e){F().push(e),e.onSubtreeChange&&e.query&&B().push(e),ie()}function le(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,a=i.onSubtreeChange||null,r=i.onInit||null,d=i.onAttrChange||null,b=i.effects||null,m=i.attributes||null,v=m?Le(m):b,U=m?new Set(Object.keys(m)):null,O=i.persist||null;function S(_){const w=_||document.body;if(te(w,e,t,n),m&&j())for(const g in m){const p=m[g],y=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&y.push(w);for(let A=0;A<y.length;A++){const k=y[A];I(k)&&ee(p,k.getAttribute(g),g,o,k)}}r&&r(w)}const E=[];if(e.indexOf("[")!==-1){const _=/\[([\w-]+)/g;let w;for(;(w=_.exec(e))!==null;)E.push(w[1])}else E.push(e);Oe({selector:e,attribute:t,componentTag:o,attributes:m,ComponentFn:n,onInit:r,observed:E.concat(s),onAttributeChange:l,onAttrChange:d,effects:v,declared:U,persist:O}),Ie();const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,c=i.subtreeQuery||(u?e:"["+e+"]"),f={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:a,query:c};F().push(f),a&&c&&B().push(f),ie(),window[t]=S,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Me,window.lnCore.withoutLifecycle=Ne);function h(){Te()>0?qe(function(){S(document.body)}):S(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),S}function se(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},o=se(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const a=l.indexOf(":"),r=a>-1?l.slice(0,a):l,d=a>-1?l.slice(a+1):"";if(r)try{n[r]=decodeURIComponent(d)}catch{n[r]=d}}return n}function Re(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");se(location.hash)!==i&&(location.hash=i)}function Be(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function He(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ue(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 je(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Pe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=Re,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Be,window.lnCore.resolveHashNamespace=He,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=Ue,window.lnCore.hashFilterEncode=je,window.lnCore.hashFilterDecode=Pe);function We(e){return(e||"").replace(/^\?/,"")}function Ke(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=We(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function Ve(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function ze(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Ge(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Xe(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ye(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Ke,window.lnCore.queryGet=Ve,window.lnCore.querySet=Qe,window.lnCore.resolveQueryParam=ze,window.lnCore.querySortEncode=Ge,window.lnCore.querySortDecode=Je,window.lnCore.queryFilterEncode=Xe,window.lnCore.queryFilterDecode=Ye);function Ze(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ze),(function(){const e="data-ln-editor",t="lnEditor";if(window[t]!==void 0)return;const n={"data-ln-editor":{type:"marker",description:"Mounts rich text editor instance on container"},"data-ln-editor-action":{type:"enum",values:["bold","italic","underline","strikethrough","heading-2","heading-3","heading-4","blockquote","code","paragraph","ordered-list","unordered-list","link","unlink","clear","confirm-link","cancel-link"],description:"Rich text toolbar formatting action"},"data-ln-editor-source":{type:"string",description:"Selector or ID of backing textarea synchronized with editor content"}},o={P:!0,BR:!0,STRONG:!0,B:!0,EM:!0,I:!0,U:!0,S:!0,A:!0,UL:!0,OL:!0,LI:!0,H2:!0,H3:!0,H4:!0,BLOCKQUOTE:!0,PRE:!0,CODE:!0,DIV:!0},i={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikeThrough"},s={"heading-2":"h2","heading-3":"h3","heading-4":"h4",blockquote:"blockquote",code:"pre",paragraph:"p"},l={"ordered-list":"insertOrderedList","unordered-list":"insertUnorderedList"};let a=0;function r(u){return!!(i[u]||s[u]||l[u]||u==="link")}function d(u){this.dom=u;const c=this;if(this._textarea=u.querySelector("textarea"),!this._textarea)return console.warn("[ln-editor] No <textarea> found inside",u),this;const f=this._textarea.getAttribute("placeholder")||"";this._textarea.setAttribute("data-ln-editor-source",""),this._surface=document.createElement("div"),this._surface.className="ln-editor__surface",this._surface.setAttribute("contenteditable","true"),this._surface.setAttribute("role","textbox"),this._surface.setAttribute("aria-multiline","true"),f&&this._surface.setAttribute("data-placeholder",f);const h=this._textarea.id;if(h){const p=u.querySelector('label[for="'+h+'"]');p&&(p.id||(p.id=h+"-label"),this._surface.setAttribute("aria-labelledby",p.id))}this._surface.id=h?h+"-surface":"ln-editor-surface-"+ ++a;const _=this._textarea.value.trim();_&&(this._surface.innerHTML=_);const w=u.querySelector('[role="toolbar"]');if(w&&w.nextSibling?u.insertBefore(this._surface,w.nextSibling):u.appendChild(this._surface),w){w.setAttribute("aria-controls",this._surface.id);const p=w.querySelectorAll("[data-ln-editor-action]");for(let y=0;y<p.length;y++){const A=p[y].getAttribute("data-ln-editor-action");r(A)&&p[y].setAttribute("aria-pressed","false")}}this._onInput=function(){c._syncToTextarea(),x(c.dom,"ln-editor:changed",{html:c._textarea.value,target:c.dom})},this._onMousedownToolbar=function(p){p.target.closest("[data-ln-editor-action]")&&p.preventDefault()},this._onClickToolbar=function(p){const y=p.target.closest("[data-ln-editor-action]");if(!y)return;const A=y.getAttribute("data-ln-editor-action");c._execAction(A)},this._onPaste=function(p){v(c,p)},this._onKeydown=function(p){S(c,p)},this._listeningSelection=!1,this._rafSelection=null,this._onSelectionChange=function(){c._rafSelection||(c._rafSelection=requestAnimationFrame(function(){c._rafSelection=null,document.contains(c._surface)&&c._updateActiveStates()}))},this._attachSelection=function(){c._listeningSelection||(c._listeningSelection=!0,document.addEventListener("selectionchange",c._onSelectionChange))},this._detachSelection=function(){c._listeningSelection&&(c._listeningSelection=!1,document.removeEventListener("selectionchange",c._onSelectionChange)),c._rafSelection&&(cancelAnimationFrame(c._rafSelection),c._rafSelection=null)},this._onFocus=function(){c._attachSelection(),c._updateActiveStates(),x(c.dom,"ln-editor:focus",{target:c.dom})},this._onBlur=function(){c._detachSelection(),c._syncToTextarea(),x(c.dom,"ln-editor:blur",{target:c.dom})},this._onTextareaInput=function(){c._surface.innerHTML!==c._textarea.value&&(c._surface.innerHTML=c._textarea.value,x(c.dom,"ln-editor:changed",{html:c._textarea.value,target:c.dom}))},this._surface.addEventListener("input",this._onInput),this._surface.addEventListener("paste",this._onPaste),this._surface.addEventListener("keydown",this._onKeydown),this._surface.addEventListener("focus",this._onFocus),this._surface.addEventListener("blur",this._onBlur),this._textarea.addEventListener("input",this._onTextareaInput),w&&(w.addEventListener("mousedown",this._onMousedownToolbar),w.addEventListener("click",this._onClickToolbar)),this._onSetContent=function(p){const y=p.detail&&p.detail.html;y!==void 0&&(c._surface.innerHTML=y,c._syncToTextarea(),x(c.dom,"ln-editor:changed",{html:c._textarea.value,target:c.dom}))},u.addEventListener("ln-editor:set-content",this._onSetContent);const g=this._textarea.form;return g&&(this._onFormReset=function(){setTimeout(function(){c._surface.innerHTML=c._textarea.value,x(u,"ln-editor:changed",{html:c._textarea.value,target:u})},0)},g.addEventListener("reset",this._onFormReset)),this}d.prototype._syncToTextarea=function(){this._textarea&&(this._textarea.value=this._surface.innerHTML)},d.prototype._execAction=function(u){if(!(!u||fe(this.dom,"ln-editor:before-change",{action:u,target:this.dom}).defaultPrevented)){if(this._surface.focus(),i[u])document.execCommand(i[u],!1,null);else if(s[u]){const f=s[u],h=b(this._surface);h&&h.toLowerCase()===f?document.execCommand("formatBlock",!1,"<p>"):document.execCommand("formatBlock",!1,"<"+f+">")}else l[u]?document.execCommand(l[u],!1,null):u==="link"?E(this):u==="unlink"?document.execCommand("unlink",!1,null):u==="clear"&&(document.execCommand("removeFormat",!1,null),document.execCommand("formatBlock",!1,"<p>"));this._syncToTextarea(),this._updateActiveStates()}},d.prototype._updateActiveStates=function(){const u=this.dom.querySelector('[role="toolbar"]');if(!u)return;const c=window.getSelection();if(!c||c.rangeCount===0)return;const f=c.anchorNode;if(!f||!this._surface.contains(f))return;const h=u.querySelectorAll("[data-ln-editor-action]");for(let _=0;_<h.length;_++){const w=h[_],g=w.getAttribute("data-ln-editor-action");let p=!1;if(i[g])try{p=document.queryCommandState(i[g])}catch{}else if(s[g]){const y=b(this._surface);p=y&&y.toLowerCase()===s[g]}else if(l[g])try{p=document.queryCommandState(l[g])}catch{}else g==="link"&&(p=!!m(c.anchorNode,"A",this._surface));if(r(g)){const y=String(p);w.getAttribute("aria-pressed")!==y&&w.setAttribute("aria-pressed",y)}p?w.classList.contains("ln-editor-active")||w.classList.add("ln-editor-active"):w.classList.contains("ln-editor-active")&&w.classList.remove("ln-editor-active")}},d.prototype.getHTML=function(){return this._surface?this._surface.innerHTML:""},d.prototype.setHTML=function(u){this._surface&&(this._surface.innerHTML=u,this._syncToTextarea(),x(this.dom,"ln-editor:changed",{html:this._textarea.value,target:this.dom}))},d.prototype.destroy=function(){if(!this.dom[t])return;this._surface&&(this._surface.removeEventListener("input",this._onInput),this._surface.removeEventListener("paste",this._onPaste),this._surface.removeEventListener("keydown",this._onKeydown),this._surface.removeEventListener("focus",this._onFocus),this._surface.removeEventListener("blur",this._onBlur),this._surface.remove());const u=this.dom.querySelector('[role="toolbar"]');u&&(u.removeEventListener("mousedown",this._onMousedownToolbar),u.removeEventListener("click",this._onClickToolbar)),this._detachSelection?this._detachSelection():document.removeEventListener("selectionchange",this._onSelectionChange),this.dom.removeEventListener("ln-editor:set-content",this._onSetContent);const c=this._textarea?this._textarea.form:null;if(c&&this._onFormReset&&c.removeEventListener("reset",this._onFormReset),this._textarea&&(this._onTextareaInput&&this._textarea.removeEventListener("input",this._onTextareaInput),this._textarea.removeAttribute("data-ln-editor-source")),this._closeLinkPopover)this._closeLinkPopover();else{const f=this.dom.querySelector(".ln-editor__link-popover");f&&f.remove()}delete this.dom[t]};function b(u){const c=window.getSelection();if(!c||c.rangeCount===0)return null;let f=c.anchorNode;if(!f)return null;for(;f&&f!==u;){if(f.nodeType===1){const h=f.tagName;if(h==="H2"||h==="H3"||h==="H4"||h==="BLOCKQUOTE"||h==="PRE"||h==="P")return h}f=f.parentNode}return null}function m(u,c,f){for(;u&&u!==f;){if(u.nodeType===1&&u.tagName===c)return u;u=u.parentNode}return null}function v(u,c){c.preventDefault();let f="";if(c.clipboardData&&(f=c.clipboardData.getData("text/html"),!f)){const _=c.clipboardData.getData("text/plain");_&&(f=_.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br>"),f="<p>"+f+"</p>")}if(!f)return;const h=U(f);h&&document.execCommand("insertHTML",!1,h)}function U(u){const c=document.createElement("div");return c.innerHTML=u,O(c),c.innerHTML}function O(u){const c=Array.from(u.childNodes);for(let f=0;f<c.length;f++){const h=c[f];if(h.nodeType!==3){if(h.nodeType!==1){u.removeChild(h);continue}if(o[h.tagName]){const _=Array.from(h.attributes);for(let w=0;w<_.length;w++){const g=_[w].name;if(h.tagName==="A"&&g==="href"){const p=h.getAttribute("href")||"";/^(https?:|mailto:|\/|#)/.test(p)||h.removeAttribute("href")}else h.removeAttribute(g)}h.tagName==="A"&&h.setAttribute("rel","noopener noreferrer"),O(h)}else{for(;h.firstChild;)u.insertBefore(h.firstChild,h);u.removeChild(h)}}}}function S(u,c){if(!(c.ctrlKey||c.metaKey))return;let f=null;switch(c.key.toLowerCase()){case"b":f="bold";break;case"i":f="italic";break;case"u":f="underline";break;case"k":f="link";break}f&&(c.preventDefault(),u._execAction(f))}function E(u){const c=window.getSelection();if(!c||c.rangeCount===0)return;const f=m(c.anchorNode,"A",u._surface),h=c.getRangeAt(0).cloneRange();u._closeLinkPopover&&u._closeLinkPopover();const _=ve(u.dom,"ln-editor-link-popover","ln-editor");if(!_)return;const w=_.firstElementChild;if(!w)return;const g=w.querySelector('input[type="url"]'),p=w.querySelector('[data-ln-editor-action="confirm-link"]'),y=w.querySelector('[data-ln-editor-action="cancel-link"]');f&&(g.value=f.getAttribute("href")||"");const A=u.dom.querySelector('[role="toolbar"]');A?A.after(w):u.dom.insertBefore(w,u._surface),g.focus();function k(){const C=window.getSelection();C.removeAllRanges(),C.addRange(h)}function D(){document.removeEventListener("mousedown",ue),u._closeLinkPopover=null,w.remove()}function ce(){const C=g.value.trim();if(D(),k(),u._surface.focus(),C)if(f)f.setAttribute("href",C),f.setAttribute("rel","noopener noreferrer"),u._syncToTextarea(),x(u.dom,"ln-editor:changed",{html:u._textarea.value,target:u.dom});else{document.execCommand("createLink",!1,C);const T=window.getSelection();if(T&&T.anchorNode){const de=m(T.anchorNode,"A",u._surface);de&&(de.setAttribute("rel","noopener noreferrer"),u._syncToTextarea())}}else f&&document.execCommand("unlink",!1,null)}function ae(){D(),k(),u._surface.focus()}function et(){D()}function ue(C){const T=u.dom.contains(C.target)&&C.target.closest('[data-ln-editor-action="link"]');!w.contains(C.target)&&!T&&et()}u._closeLinkPopover=D,p.addEventListener("click",ce),y.addEventListener("click",ae),g.addEventListener("keydown",function(C){C.key==="Enter"?(C.preventDefault(),ce()):C.key==="Escape"&&(C.preventDefault(),ae())}),document.addEventListener("mousedown",ue)}le(e,t,d,"ln-editor",{attributes:n})})()})();
|