vanduo-framework 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/build-info.json +3 -3
- package/dist/vanduo.cjs.min.js +3 -3
- package/dist/vanduo.cjs.min.js.map +2 -2
- package/dist/vanduo.esm.min.js +3 -3
- package/dist/vanduo.esm.min.js.map +2 -2
- package/dist/vanduo.min.css +1 -1
- package/dist/vanduo.min.js +3 -3
- package/dist/vanduo.min.js.map +2 -2
- package/js/components/draggable.js +7 -4
- package/js/vanduo.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Vanduo Framework v1.2.
|
|
1
|
+
# Vanduo Framework v1.2.2
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="vanduo-banner.svg" alt="Vanduo Framework Banner" width="100%">
|
|
@@ -88,8 +88,8 @@ Load directly from jsDelivr — no download required:
|
|
|
88
88
|
|
|
89
89
|
**Pin to a specific version** (recommended for production):
|
|
90
90
|
```html
|
|
91
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Nostromo-618/vanduo-framework@v1.2.
|
|
92
|
-
<script src="https://cdn.jsdelivr.net/gh/Nostromo-618/vanduo-framework@v1.2.
|
|
91
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Nostromo-618/vanduo-framework@v1.2.2/dist/vanduo.min.css">
|
|
92
|
+
<script src="https://cdn.jsdelivr.net/gh/Nostromo-618/vanduo-framework@v1.2.2/dist/vanduo.min.js"></script>
|
|
93
93
|
<script>Vanduo.init();</script>
|
|
94
94
|
```
|
|
95
95
|
|
|
@@ -153,7 +153,7 @@ This project includes an [`llms.txt`](llms.txt) file — a structured markdown s
|
|
|
153
153
|
Use the hardened upload script to attach only approved bundle artifacts from `dist/`:
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
|
-
pnpm run release:assets -- v1.2.
|
|
156
|
+
pnpm run release:assets -- v1.2.2
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
Notes:
|
package/dist/build-info.json
CHANGED
package/dist/vanduo.cjs.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! Vanduo v1.2.
|
|
2
|
-
var R=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.prototype.hasOwnProperty;var se=(d,e)=>{for(var t in e)R(d,t,{get:e[t],enumerable:!0})},ie=(d,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of te(e))!ne.call(d,s)&&s!==t&&R(d,s,{get:()=>e[s],enumerable:!(n=ee(e,s))||n.enumerable});return d};var ae=d=>ie(R({},"__esModule",{value:!0}),d);var re={};se(re,{Vanduo:()=>B,default:()=>oe});module.exports=ae(re);(function(){"use strict";let d={instances:new Map,register:function(e,t,n=[]){if(this.instances.has(e)){let s=this.instances.get(e);s.cleanup=s.cleanup.concat(n);return}this.instances.set(e,{component:t,cleanup:n,registeredAt:Date.now()})},unregister:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(function(n){try{n()}catch(s){console.warn("[Vanduo Lifecycle] Cleanup error:",s)}}),this.instances.delete(e))},destroyAll:function(e){let t=[];this.instances.forEach(function(n,s){(!e||n.component===e)&&t.push(s)}),t.forEach(function(n){d.unregister(n)})},destroyAllInContainer:function(e){let t=[];this.instances.forEach(function(n,s){e.contains(s)&&t.push(s)}),t.forEach(function(n){d.unregister(n)})},getAll:function(){let e=[];return this.instances.forEach(function(t,n){e.push({element:n,component:t.component,registeredAt:t.registeredAt})}),e},has:function(e){return this.instances.has(e)}};window.addEventListener("beforeunload",function(){d.destroyAll()}),window.VanduoLifecycle=d,typeof window.Vanduo<"u"&&window.Vanduo.register("lifecycle",d)})();(function(){"use strict";let d={version:"1.2.
|
|
1
|
+
/*! Vanduo v1.2.2 | Built: 2026-02-28T18:59:21.972Z | git:63a4e7b | production */
|
|
2
|
+
var R=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.prototype.hasOwnProperty;var se=(d,e)=>{for(var t in e)R(d,t,{get:e[t],enumerable:!0})},ie=(d,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of te(e))!ne.call(d,s)&&s!==t&&R(d,s,{get:()=>e[s],enumerable:!(n=ee(e,s))||n.enumerable});return d};var ae=d=>ie(R({},"__esModule",{value:!0}),d);var re={};se(re,{Vanduo:()=>B,default:()=>oe});module.exports=ae(re);(function(){"use strict";let d={instances:new Map,register:function(e,t,n=[]){if(this.instances.has(e)){let s=this.instances.get(e);s.cleanup=s.cleanup.concat(n);return}this.instances.set(e,{component:t,cleanup:n,registeredAt:Date.now()})},unregister:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(function(n){try{n()}catch(s){console.warn("[Vanduo Lifecycle] Cleanup error:",s)}}),this.instances.delete(e))},destroyAll:function(e){let t=[];this.instances.forEach(function(n,s){(!e||n.component===e)&&t.push(s)}),t.forEach(function(n){d.unregister(n)})},destroyAllInContainer:function(e){let t=[];this.instances.forEach(function(n,s){e.contains(s)&&t.push(s)}),t.forEach(function(n){d.unregister(n)})},getAll:function(){let e=[];return this.instances.forEach(function(t,n){e.push({element:n,component:t.component,registeredAt:t.registeredAt})}),e},has:function(e){return this.instances.has(e)}};window.addEventListener("beforeunload",function(){d.destroyAll()}),window.VanduoLifecycle=d,typeof window.Vanduo<"u"&&window.Vanduo.register("lifecycle",d)})();(function(){"use strict";let d={version:"1.2.2",components:{},init:function(){typeof ready<"u"?ready(()=>{this.initComponents()}):document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this.initComponents()}):this.initComponents()},initComponents:function(){Object.keys(this.components).forEach(e=>{let t=this.components[e];if(t.init&&typeof t.init=="function")try{t.init()}catch(n){console.warn('[Vanduo] Failed to initialize component "'+e+'":',n)}}),console.log("Vanduo Framework v1.2.2 initialized")},register:function(e,t){this.components[e]=t},reinit:function(e){let t=this.components[e];if(t&&t.init&&typeof t.init=="function")try{t.init()}catch(n){console.warn('[Vanduo] Failed to reinitialize component "'+e+'":',n)}},destroyAll:function(){let e=Object.keys(this.components);for(let t=0;t<e.length;t++){let n=this.components[e[t]];if(n&&n.destroyAll&&typeof n.destroyAll=="function")try{n.destroyAll()}catch(s){console.warn('[Vanduo] Failed to destroy component "'+e[t]+'":',s)}}typeof window.VanduoLifecycle<"u"&&window.VanduoLifecycle.destroyAll()},getComponent:function(e){return this.components[e]||null}};window.Vanduo=d})();(function(){"use strict";let d={_snippetIdCounter:0,getSnippetInstanceId:function(e){if(e.dataset.codeSnippetId)return e.dataset.codeSnippetId;let t=(e.id||"").trim();return t?(e.dataset.codeSnippetId=`snippet-${t}`,e.dataset.codeSnippetId):(this._snippetIdCounter+=1,e.dataset.codeSnippetId=`snippet-auto-${this._snippetIdCounter}`,e.dataset.codeSnippetId)},addListener:function(e,t,n,s){t&&(t.addEventListener(n,s),e._codeSnippetCleanup||(e._codeSnippetCleanup=[]),e._codeSnippetCleanup.push(()=>t.removeEventListener(n,s)))},init:function(){document.querySelectorAll(".vd-code-snippet").forEach(t=>{t.dataset.initialized||this.initSnippet(t)})},initSnippet:function(e){e.dataset.initialized="true",e._codeSnippetCleanup=[];let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&n&&this.initCollapsible(e,t,n);let s=e.querySelectorAll(".vd-code-snippet-tab"),i=e.querySelectorAll(".vd-code-snippet-pane");s.length>0&&this.initTabs(e,s,i);let a=e.querySelector(".vd-code-snippet-copy");a&&this.initCopyButton(e,a),e.querySelectorAll("[data-extract]").forEach(c=>{this.extractHtml(c)}),e.querySelectorAll(".has-line-numbers").forEach(c=>{this.addLineNumbers(c)})},initCollapsible:function(e,t,n){let s=e.dataset.expanded==="true";t.setAttribute("aria-expanded",s),n.dataset.visible=s,this.addListener(e,t,"click",()=>{let i=e.dataset.expanded==="true";e.dataset.expanded=!i,t.setAttribute("aria-expanded",!i),n.dataset.visible=!i,i||n.querySelectorAll("[data-extract]:not([data-extracted])").forEach(r=>{this.extractHtml(r)});let a=new CustomEvent("codesnippet:toggle",{bubbles:!0,detail:{snippet:e,expanded:!i}});e.dispatchEvent(a)})},initTabs:function(e,t,n){let s=this.getSnippetInstanceId(e),i=e.querySelector(".vd-code-snippet-tabs");i&&i.setAttribute("role","tablist"),t.forEach((a,o)=>{let r=a.dataset.lang,c=a.classList.contains("is-active");a.setAttribute("role","tab"),a.setAttribute("aria-selected",c),a.setAttribute("tabindex",c?"0":"-1"),a.id=a.id||`code-tab-${s}-${r||"tab"}-${o}`;let l=e.querySelector(`.vd-code-snippet-pane[data-lang="${r}"]`);l&&(l.id=l.id||`code-pane-${s}-${r||"pane"}-${o}`,l.setAttribute("role","tabpanel"),a.setAttribute("aria-controls",l.id),l.setAttribute("aria-labelledby",a.id)),this.addListener(e,a,"click",()=>{this.switchTab(e,a,t,n)}),this.addListener(e,a,"keydown",h=>{this.handleTabKeydown(h,e,t,n)})})},switchTab:function(e,t,n,s){let i=t.dataset.lang;n.forEach(r=>{r.classList.remove("is-active"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1")}),s.forEach(r=>{r.classList.remove("is-active")}),t.classList.add("is-active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0");let a=e.querySelector(`.vd-code-snippet-pane[data-lang="${i}"]`);a&&a.classList.add("is-active");let o=new CustomEvent("codesnippet:tabchange",{bubbles:!0,detail:{snippet:e,tab:t,lang:i}});e.dispatchEvent(o)},handleTabKeydown:function(e,t,n,s){let i=Array.from(n),a=i.indexOf(e.target),o;switch(e.key){case"ArrowLeft":e.preventDefault(),o=a>0?a-1:i.length-1;break;case"ArrowRight":e.preventDefault(),o=a<i.length-1?a+1:0;break;case"Home":e.preventDefault(),o=0;break;case"End":e.preventDefault(),o=i.length-1;break;default:return}o!==a&&(i[o].focus(),this.switchTab(t,i[o],n,s))},initCopyButton:function(e,t){this.addListener(e,t,"click",async()=>{await this.copyCode(e,t)})},copyCode:async function(e,t){let n=e.querySelector(".vd-code-snippet-pane.is-active")||e.querySelector(".vd-code-snippet-pane");if(!n){console.warn("CodeSnippet: No code pane found");return}let i=(n.querySelector("code")||n).textContent;try{await navigator.clipboard.writeText(i),this.showCopyFeedback(t,!0)}catch{let r=this.fallbackCopy(i);this.showCopyFeedback(t,r)}let a=new CustomEvent("codesnippet:copy",{bubbles:!0,detail:{snippet:e,code:i,success:!0}});e.dispatchEvent(a)},fallbackCopy:function(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",t.style.top="-9999px",document.body.appendChild(t),t.focus(),t.select();let n=!1;try{n=document.execCommand("copy")}catch(s){console.warn("CodeSnippet: Fallback copy failed",s)}return document.body.removeChild(t),n},showCopyFeedback:function(e,t){if(t){e.classList.add("is-copied");let n=document.createElement("span");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.className="sr-only",n.textContent="Code copied to clipboard",e.appendChild(n),setTimeout(()=>{e.classList.remove("is-copied"),n.parentNode&&n.parentNode.removeChild(n)},2e3)}},extractHtml:function(e){let t=e.dataset.extract;if(!t)return;let n=document.querySelector(t);if(!n){console.warn(`CodeSnippet: Source element not found: ${t}`);return}let s=n.innerHTML;s=this.formatHtml(s),s=this.escapeHtml(s),s=this.highlightHtml(s);let i=document.createElement("code");i.innerHTML=s,e.replaceChildren(i),e.dataset.extracted="true"},formatHtml:function(e){e=e.trim();let t=e.split(`
|
|
3
3
|
`),n=0,s=2,i=[];return t.forEach(a=>{if(a=a.trim(),!a)return;a.match(/^<\/\w/)&&(n=Math.max(0,n-s)),i.push(" ".repeat(n)+a);let o=/<[a-zA-Z]/.test(a),r=a.includes("/>");o&&!r&&(a.match(/<(br|hr|img|input|meta|link|area|base|col|embed|param|source|track|wbr)/i)||a.match(/<\/\w+>$/)||(n+=s))}),i.join(`
|
|
4
4
|
`)},escapeHtml:function(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML},highlightHtml:function(e){return e=e.replace(/(<\/?)([\w-]+)/g,'$1<span class="code-tag">$2</span>'),e=e.replace(/([\w-]+)(=)("|')/g,'<span class="code-attr">$1</span>$2$3'),e=e.replace(/("|')([^&]*)("|')/g,'$1<span class="code-string">$2</span>$3'),e=e.replace(/(<!--)(.*?)(-->)/g,'<span class="code-comment">$1$2$3</span>'),e},highlightCss:function(e){return e=e.replace(/([.#]?[a-zA-Z][a-zA-Z0-9_-]{0,200})(\s*\{)/g,'<span class="code-selector">$1</span>$2'),e=e.replace(/([a-zA-Z][a-zA-Z0-9_-]{0,200})(\s*:)/g,'<span class="code-property">$1</span>$2'),e=e.replace(/:\s*([^;{}]+)(;)/g,': <span class="code-value">$1</span>$2'),e=e.replace(/(\d+)(px|rem|em|%|vh|vw|deg|s|ms)/g,'<span class="code-number">$1</span><span class="code-unit">$2</span>'),e=e.replace(/(\/\*[\s\S]*?\*\/)/g,'<span class="code-comment">$1</span>'),e},highlightJs:function(e){return["const","let","var","function","return","if","else","for","while","switch","case","break","continue","new","this","class","extends","import","export","default","async","await","try","catch","throw","typeof","instanceof"].forEach(n=>{let s=new RegExp(`\\b(${n})\\b`,"g");e=e.replace(s,'<span class="code-keyword">$1</span>')}),e=e.replace(/('(?:[^'\\]|\\.){0,10000}'|"(?:[^"\\]|\\.){0,10000}"|`(?:[^`\\]|\\.){0,10000}`)/g,'<span class="code-string">$1</span>'),e=e.replace(/\b(\d+\.?\d*)\b/g,'<span class="code-number">$1</span>'),e=e.replace(/\b([\w]+)(\s*\()/g,'<span class="code-function">$1</span>$2'),e=e.replace(/(\/\/.*$)/gm,'<span class="code-comment">$1</span>'),e=e.replace(/(\/\*[\s\S]*?\*\/)/g,'<span class="code-comment">$1</span>'),e},addLineNumbers:function(e){let t=e.querySelector("code");if(!t)return;let s=t.innerHTML.split(`
|
|
5
5
|
`).length,i=document.createElement("div");i.className="vd-code-snippet-line-numbers",i.setAttribute("aria-hidden","true");for(let o=1;o<=s;o++){let r=document.createElement("span");r.textContent=o,i.appendChild(r)}let a=document.createElement("div");a.className="vd-code-snippet-code",a.appendChild(t.cloneNode(!0)),t.parentNode.removeChild(t),e.appendChild(i),e.appendChild(a)},expand:function(e){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;e.dataset.expanded="true";let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&t.setAttribute("aria-expanded","true"),n&&(n.dataset.visible="true")},collapse:function(e){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;e.dataset.expanded="false";let t=e.querySelector(".vd-code-snippet-toggle"),n=e.querySelector(".vd-code-snippet-content");t&&t.setAttribute("aria-expanded","false"),n&&(n.dataset.visible="false")},showLang:function(e,t){if(typeof e=="string"&&(e=document.querySelector(e)),!e)return;let n=e.querySelector(`.vd-code-snippet-tab[data-lang="${t}"]`),s=e.querySelectorAll(".vd-code-snippet-tab"),i=e.querySelectorAll(".vd-code-snippet-pane");n&&this.switchTab(e,n,s,i)},destroy:function(e){typeof e=="string"&&(e=document.querySelector(e)),e&&(e._codeSnippetCleanup&&(e._codeSnippetCleanup.forEach(t=>t()),delete e._codeSnippetCleanup),delete e.dataset.initialized)},destroyAll:function(){document.querySelectorAll('.vd-code-snippet[data-initialized="true"]').forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("codeSnippet",d),window.CodeSnippet=d})();(function(){"use strict";let d={instances:new Map,init:function(){document.querySelectorAll(".vd-collapsible, .accordion").forEach(t=>{this.instances.has(t)||this.initCollapsible(t)})},initCollapsible:function(e){let t=e.classList.contains("accordion"),n=e.querySelectorAll(".vd-collapsible-item, .accordion-item"),s=[];n.forEach(i=>{let a=i.querySelector(".vd-collapsible-header, .accordion-header"),o=i.querySelector(".vd-collapsible-body, .accordion-body"),r=i.querySelector(".vd-collapsible-trigger, .accordion-trigger")||a;if(!a||!o)return;i.classList.contains("is-open")?this.openItem(i,o,!1):this.closeItem(i,o,!1);let c=l=>{l.preventDefault(),this.toggleItem(i,o,e,t)};r.addEventListener("click",c),s.push(()=>r.removeEventListener("click",c))}),this.instances.set(e,{cleanup:s})},toggleItem:function(e,t,n,s){e.classList.contains("is-open")?this.closeItem(e,t):(s&&n.querySelectorAll(".vd-collapsible-item.is-open, .accordion-item.is-open").forEach(o=>{if(o!==e){let r=o.querySelector(".vd-collapsible-body, .accordion-body");this.closeItem(o,r)}}),this.openItem(e,t))},openItem:function(e,t,n=!0){n||(t.style.transition="none"),e.classList.add("is-open"),e.setAttribute("aria-expanded","true");let s=t.scrollHeight;t.style.maxHeight=`${s}px`,n||setTimeout(()=>{t.style.transition=""},0),e.dispatchEvent(new CustomEvent("collapsible:open",{bubbles:!0}))},closeItem:function(e,t,n=!0){n||(t.style.transition="none"),e.classList.remove("is-open"),e.setAttribute("aria-expanded","false"),t.style.maxHeight="0",n||setTimeout(()=>{t.style.transition=""},0),e.dispatchEvent(new CustomEvent("collapsible:close",{bubbles:!0}))},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body");n&&this.openItem(t,n)}},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body");n&&this.closeItem(t,n)}},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-collapsible-body, .accordion-body"),s=t.closest(".vd-collapsible, .accordion"),i=s&&s.classList.contains("accordion");n&&this.toggleItem(t,n,s,i)}},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("collapsible",d),window.VanduoCollapsible=d})();(function(){"use strict";let d={instances:new Map,_typeaheadBuffer:"",_typeaheadTimer:null,init:function(){document.querySelectorAll(".vd-dropdown").forEach(t=>{this.instances.has(t)||this.initDropdown(t)})},initDropdown:function(e){let t=e.querySelector(".vd-dropdown-toggle"),n=e.querySelector(".vd-dropdown-menu");if(!t||!n)return;let s=[];t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false"),n.setAttribute("role","menu"),n.setAttribute("aria-hidden","true");let i=c=>{c.preventDefault(),c.stopPropagation(),this.toggleDropdown(e,t,n)};t.addEventListener("click",i),s.push(()=>t.removeEventListener("click",i));let a=c=>{!e.contains(c.target)&&n.classList.contains("is-open")&&this.closeDropdown(e,t,n)};document.addEventListener("click",a),s.push(()=>document.removeEventListener("click",a));let o=c=>{this.handleKeydown(c,e,t,n)};t.addEventListener("keydown",o),s.push(()=>t.removeEventListener("keydown",o)),n.querySelectorAll(".vd-dropdown-item:not(.disabled):not(.is-disabled)").forEach(c=>{let l=f=>{f.preventDefault(),this.selectItem(c,e,t,n)};c.addEventListener("click",l),s.push(()=>c.removeEventListener("click",l));let h=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),this.selectItem(c,e,t,n))};c.addEventListener("keydown",h),s.push(()=>c.removeEventListener("keydown",h))}),this.instances.set(e,{toggle:t,menu:n,cleanup:s})},toggleDropdown:function(e,t,n){n.classList.contains("is-open")?this.closeDropdown(e,t,n):this.openDropdown(e,t,n)},openDropdown:function(e,t,n){document.querySelectorAll(".vd-dropdown-menu.is-open").forEach(a=>{if(a!==n){let o=a.closest(".vd-dropdown"),r=o.querySelector(".vd-dropdown-toggle");this.closeDropdown(o,r,a)}}),e.classList.add("is-open"),n.classList.add("is-open"),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),this.positionMenu(e,n);let i=n.querySelector(".vd-dropdown-item:not(.disabled):not(.is-disabled)");i&&setTimeout(()=>i.focus(),0)},closeDropdown:function(e,t,n){e.classList.remove("is-open"),n.classList.remove("is-open"),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true"),t.focus()},positionMenu:function(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=8;n.left+s.width>i-o&&(t.classList.add("vd-dropdown-menu-end"),t.classList.remove("vd-dropdown-menu-start")),t.classList.contains("dropdown-menu-top")?n.top-s.height<o&&t.classList.remove("vd-dropdown-menu-top"):n.bottom+s.height>a-o&&t.classList.add("vd-dropdown-menu-top")},handleKeydown:function(e,t,n,s){let i=s.classList.contains("is-open"),a=Array.from(s.querySelectorAll(".vd-dropdown-item:not(.disabled):not(.is-disabled)")),o=a.findIndex(r=>r===document.activeElement);switch(e.key){case"Enter":case" ":case"ArrowDown":if(e.preventDefault(),!i)this.openDropdown(t,n,s);else if(e.key==="ArrowDown"){let r=o<a.length-1?o+1:0;a[r].focus()}break;case"ArrowUp":if(i){e.preventDefault();let r=o>0?o-1:a.length-1;a[r].focus()}break;case"Escape":i&&(e.preventDefault(),this.closeDropdown(t,n,s));break;case"Home":i&&(e.preventDefault(),a[0].focus());break;case"End":i&&(e.preventDefault(),a[a.length-1].focus());break;default:if(i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){clearTimeout(this._typeaheadTimer),this._typeaheadBuffer+=e.key.toLowerCase();let r=a.find(c=>c.textContent.trim().toLowerCase().startsWith(this._typeaheadBuffer));r&&r.focus(),this._typeaheadTimer=setTimeout(()=>{this._typeaheadBuffer=""},500)}break}},selectItem:function(e,t,n,s){s.querySelectorAll(".vd-dropdown-item").forEach(i=>{i.classList.remove("active","is-active")}),e.classList.add("active","is-active"),(n.tagName==="BUTTON"||n.classList.contains("btn"))&&(n.textContent=e.textContent.trim()),this.closeDropdown(t,n,s),e.dispatchEvent(new CustomEvent("dropdown:select",{bubbles:!0,detail:{item:e,value:e.dataset.value||e.textContent}}))},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-dropdown-toggle"),s=t.querySelector(".vd-dropdown-menu");n&&s&&this.openDropdown(t,n,s)}},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t){let n=t.querySelector(".vd-dropdown-toggle"),s=t.querySelector(".vd-dropdown-menu");n&&s&&this.closeDropdown(t,n,s)}},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("dropdown",d),window.VanduoDropdown=d})();(function(){"use strict";let d={STORAGE_KEY:"vanduo-font-preference",isInitialized:!1,fonts:{system:{name:"System Default",family:null},inter:{name:"Inter",family:"'Inter', sans-serif"},"source-sans":{name:"Source Sans 3",family:"'Source Sans 3', sans-serif"},"fira-sans":{name:"Fira Sans",family:"'Fira Sans', sans-serif"},"ibm-plex":{name:"IBM Plex Sans",family:"'IBM Plex Sans', sans-serif"},"jetbrains-mono":{name:"JetBrains Mono",family:"'JetBrains Mono', monospace"},ubuntu:{name:"Ubuntu",family:"'Ubuntu', sans-serif",category:"sans-serif",description:"Friendly, humanist sans-serif"},"open-sans":{name:"Open Sans",family:"'Open Sans', sans-serif",category:"sans-serif",description:"Neutral, highly readable"},rubik:{name:"Rubik",family:"'Rubik', sans-serif",category:"sans-serif",description:"Modern, geometric"},"titillium-web":{name:"Titillium Web",family:"'Titillium Web', sans-serif",category:"sans-serif",description:"Technical, elegant"}},init:function(){if(this.state={preference:this.getPreference()},this.isInitialized){this.applyFont(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyFont(),this.renderUI(),console.log("Vanduo Font Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"ubuntu")},setPreference:function(e){if(!this.fonts[e]){console.warn("Unknown font:",e);return}this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyFont(),this.updateUI();let t=new CustomEvent("font:change",{bubbles:!0,detail:{font:e,fontData:this.fonts[e]}});document.dispatchEvent(t)},applyFont:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-font"):document.documentElement.setAttribute("data-font",e)},renderUI:function(){document.querySelectorAll('[data-toggle="font"]').forEach(t=>{if(t.getAttribute("data-font-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._fontToggleHandler=n}else{let n=()=>{let s=Object.keys(this.fonts),a=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[a])};t.addEventListener("click",n),t._fontToggleHandler=n}t.setAttribute("data-font-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="font"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".font-current-label");n&&(n.textContent=this.fonts[this.state.preference].name)}})},getCurrentFont:function(){return this.state.preference},getFontData:function(e){return this.fonts[e]||null},destroyAll:function(){document.querySelectorAll('[data-toggle="font"][data-font-initialized="true"]').forEach(t=>{if(t._fontToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._fontToggleHandler),delete t._fontToggleHandler}t.removeAttribute("data-font-initialized")}),this.isInitialized=!1},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}}};window.Vanduo&&window.Vanduo.register("fontSwitcher",d),window.FontSwitcher=d})();(function(){"use strict";let d=(function(){try{return CSS.supports("selector(:has(*))")}catch{return!1}})(),e={instances:new Map,init:function(){document.querySelectorAll("[data-layout-mode]").forEach(function(n){this.instances.has(n)||this.initContainer(n)}.bind(this)),this.initToggleButtons()},initContainer:function(t){let n=t.getAttribute("data-layout-mode")||"standard",s=[];this.applyMode(t,n),t.setAttribute("role","region"),t.setAttribute("aria-label","Grid layout: "+n+" mode"),this.instances.set(t,{cleanup:s,mode:n})},initToggleButtons:function(){document.querySelectorAll("[data-grid-toggle]").forEach(function(n){if(n.getAttribute("data-grid-initialized")==="true")return;let s=function(i){i.preventDefault();let a=n.getAttribute("data-grid-toggle"),o;a?o=document.querySelector(a):o=n.closest("[data-layout-mode]"),o&&this.toggle(o)}.bind(this);n.addEventListener("click",s),n.setAttribute("data-grid-initialized","true"),n.setAttribute("aria-pressed","false"),n._gridCleanup=function(){n.removeEventListener("click",s),n.removeAttribute("data-grid-initialized"),n.removeAttribute("aria-pressed")}}.bind(this))},applyFibFallback:function(t){if(d)return;t.querySelectorAll(".vd-row, .row").forEach(function(s){let a=s.querySelectorAll(':scope > [class*="vd-col-"], :scope > [class*="col-"]').length;a===1?s.style.gridTemplateColumns="1fr":a===2?s.style.gridTemplateColumns="1fr 1.618fr":a===3?s.style.gridTemplateColumns="2fr 3fr 5fr":a===4?s.style.gridTemplateColumns="1fr 2fr 3fr 5fr":s.style.gridTemplateColumns="repeat("+a+", 1fr)"})},removeFibFallback:function(t){t.querySelectorAll(".vd-row, .row").forEach(function(s){s.style.gridTemplateColumns=""})},applyMode:function(t,n){t.classList.remove("vd-grid-standard","vd-grid-fibonacci"),n==="fibonacci"?(t.classList.add("vd-grid-fibonacci"),this.applyFibFallback(t)):(t.classList.add("vd-grid-standard"),this.removeFibFallback(t)),t.setAttribute("data-layout-mode",n),t.setAttribute("aria-label","Grid layout: "+n+" mode"),document.querySelectorAll("[data-grid-toggle]").forEach(function(o){let r=o.getAttribute("data-grid-toggle");if(r&&t.matches(r)){let c=n==="fibonacci";c?o.classList.add("is-active"):o.classList.remove("is-active"),o.setAttribute("aria-pressed",c?"true":"false")}});let i=this.instances.get(t);i&&(i.mode=n);let a;try{a=new CustomEvent("grid:modechange",{bubbles:!0,detail:{container:t,mode:n}})}catch{a=document.createEvent("CustomEvent"),a.initCustomEvent("grid:modechange",!0,!0,{container:t,mode:n})}t.dispatchEvent(a)},toggle:function(t){if(typeof t=="string"&&(t=document.querySelector(t)),!t)return;let s=(t.getAttribute("data-layout-mode")||"standard")==="fibonacci"?"standard":"fibonacci";this.applyMode(t,s)},setMode:function(t,n){typeof t=="string"&&(t=document.querySelector(t)),t&&(n!=="fibonacci"&&n!=="standard"||this.applyMode(t,n))},getMode:function(t){return typeof t=="string"&&(t=document.querySelector(t)),t?t.getAttribute("data-layout-mode")||"standard":null},destroy:function(t){let n=this.instances.get(t);n&&(n.cleanup.forEach(function(s){s()}),t.classList.remove("vd-grid-standard","vd-grid-fibonacci"),t.removeAttribute("aria-label"),this.removeFibFallback(t),this.instances.delete(t))},destroyAll:function(){this.instances.forEach(function(n,s){this.destroy(s)}.bind(this)),document.querySelectorAll('[data-grid-initialized="true"]').forEach(function(n){n._gridCleanup&&(n._gridCleanup(),delete n._gridCleanup)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("gridLayout",e),window.VanduoGridLayout=e})();(function(){"use strict";let d={backdrop:null,container:null,img:null,closeBtn:null,caption:null,currentTrigger:null,scrollThreshold:50,initialScrollY:0,isOpen:!1,_cleanupFunctions:[],init:function(){this.createBackdrop(),this.bindTriggers()},createBackdrop:function(){if(this.backdrop||document.querySelector(".vd-image-box-backdrop")){this.backdrop||(this.backdrop=document.querySelector(".vd-image-box-backdrop"),this.container=this.backdrop.querySelector(".vd-image-box-container"),this.img=this.backdrop.querySelector(".vd-image-box-img"),this.closeBtn=this.backdrop.querySelector(".vd-image-box-close"),this.caption=this.backdrop.querySelector(".vd-image-box-caption"),this.bindBackdropEvents());return}this.backdrop=document.createElement("div"),this.backdrop.className="vd-image-box-backdrop",this.backdrop.setAttribute("role","dialog"),this.backdrop.setAttribute("aria-modal","true"),this.backdrop.setAttribute("aria-label","Image viewer"),this.backdrop.setAttribute("tabindex","-1"),this.container=document.createElement("div"),this.container.className="vd-image-box-container",this.img=document.createElement("img"),this.img.className="vd-image-box-img",this.img.alt="",this.closeBtn=document.createElement("button"),this.closeBtn.className="vd-image-box-close",this.closeBtn.setAttribute("aria-label","Close image viewer"),this.closeBtn.innerHTML="×",this.caption=document.createElement("div"),this.caption.className="vd-image-box-caption",this.container.appendChild(this.img),this.backdrop.appendChild(this.closeBtn),this.backdrop.appendChild(this.container),this.backdrop.appendChild(this.caption),document.body.appendChild(this.backdrop),this.bindBackdropEvents()},bindBackdropEvents:function(){let e=this,t=function(o){(o.target===e.backdrop||o.target===e.container)&&e.close()};this.backdrop.addEventListener("click",t),this._cleanupFunctions.push(()=>this.backdrop.removeEventListener("click",t));let n=function(){e.close()};this.img.addEventListener("click",n),this._cleanupFunctions.push(()=>this.img.removeEventListener("click",n));let s=function(){e.close()};this.closeBtn.addEventListener("click",s),this._cleanupFunctions.push(()=>this.closeBtn.removeEventListener("click",s));let i=function(o){o.key==="Escape"&&e.isOpen&&e.close()};document.addEventListener("keydown",i),this._cleanupFunctions.push(()=>document.removeEventListener("keydown",i));let a=function(){if(!e.isOpen)return;let o=window.scrollY;Math.abs(o-e.initialScrollY)>e.scrollThreshold&&e.close()};window.addEventListener("scroll",a,{passive:!0}),this._cleanupFunctions.push(()=>window.removeEventListener("scroll",a))},bindTriggers:function(){let e=this;document.querySelectorAll("[data-image-box]").forEach(function(n){if(n.dataset.imageBoxInitialized)return;if(n.dataset.imageBoxInitialized="true",n.classList.add("vd-image-box-trigger"),n.tagName==="IMG"){n.complete&&n.naturalWidth===0&&n.classList.add("is-broken");let i=function(){n.classList.add("is-broken")};n.addEventListener("error",i);let a=function(){n.classList.remove("is-broken")};n.addEventListener("load",a)}let s=function(i){i.preventDefault(),e.open(n)};if(n.addEventListener("click",s),n._imageBoxCleanup=()=>n.removeEventListener("click",s),n.tagName!=="BUTTON"&&n.tagName!=="A"){n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-label","View enlarged image");let i=function(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e.open(n))};n.addEventListener("keydown",i);let a=n._imageBoxCleanup;n._imageBoxCleanup=()=>{a(),n.removeEventListener("keydown",i)}}})},open:function(e){if(this.isOpen)return;this.currentTrigger=e,this.isOpen=!0,this.initialScrollY=window.scrollY;let t=e.dataset.imageBoxFullSrc||e.dataset.imageBoxSrc||e.src||e.href;if(!t){console.warn("[Vanduo ImageBox] No image source found for trigger:",e);return}let n=e.dataset.imageBoxCaption||e.alt||"";this.img.src=t,this.img.alt=e.alt||"",n?(this.caption.textContent=n,this.caption.style.display="block"):this.caption.style.display="none";let s=window.innerWidth-document.documentElement.clientWidth;document.body.style.setProperty("--scrollbar-width",`${s}px`),document.body.classList.add("body-image-box-open"),this.backdrop.classList.add("is-visible"),this.backdrop.focus(),e.dispatchEvent(new CustomEvent("imageBox:open",{bubbles:!0,detail:{src:t}})),this.img.complete||(this.img.style.opacity="0",this.img.onload=()=>{this.img.style.opacity=""})},close:function(){this.isOpen&&(this.isOpen=!1,this.backdrop.classList.remove("is-visible"),document.body.classList.remove("body-image-box-open"),document.body.style.removeProperty("--scrollbar-width"),this.currentTrigger&&(this.currentTrigger.focus(),this.currentTrigger.dispatchEvent(new CustomEvent("imageBox:close",{bubbles:!0})),this.currentTrigger=null),setTimeout(()=>{this.isOpen||(this.img.src="",this.img.alt="")},300))},reinit:function(){this.bindTriggers()},destroy:function(){this.isOpen&&this.close(),this.backdrop&&this.backdrop.parentNode&&this.backdrop.parentNode.removeChild(this.backdrop),this._cleanupFunctions.forEach(t=>t()),this._cleanupFunctions=[],document.querySelectorAll("[data-image-box-initialized]").forEach(t=>{t.classList.remove("vd-image-box-trigger"),t._imageBoxCleanup&&(t._imageBoxCleanup(),delete t._imageBoxCleanup),delete t.dataset.imageBoxInitialized}),this.backdrop=null,this.container=null,this.img=null,this.closeBtn=null,this.caption=null,this.currentTrigger=null,this.isOpen=!1},destroyAll:function(){this.destroy()}};typeof window.Vanduo<"u"&&window.Vanduo.register("imageBox",d),window.VanduoImageBox=d})();(function(){"use strict";let d={modals:new Map,openModals:[],zIndexCounter:1050,_triggerCleanups:[],init:function(){document.querySelectorAll(".vd-modal").forEach(n=>{this.modals.has(n)||this.initModal(n)}),document.querySelectorAll("[data-modal]").forEach(n=>{if(n.dataset.modalTriggerInitialized)return;n.dataset.modalTriggerInitialized="true";let s=i=>{i.preventDefault();let a=n.dataset.modal,o=document.querySelector(a);o&&this.open(o)};n.addEventListener("click",s),this._triggerCleanups.push(()=>n.removeEventListener("click",s))})},initModal:function(e){let t=this.createBackdrop(e),n=e.querySelectorAll('.vd-modal-close, [data-dismiss="modal"]'),s=e.querySelector(".vd-modal-dialog");if(!s)return;let i=[];e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true"),e.id||(e.id="modal-"+Math.random().toString(36).substr(2,9));let a=e.querySelector(".vd-modal-title");a&&!a.id&&(a.id=e.id+"-title",e.setAttribute("aria-labelledby",a.id)),n.forEach(c=>{let l=()=>{this.close(e)};c.addEventListener("click",l),i.push(()=>c.removeEventListener("click",l))});let o=c=>{c.target===t&&e.dataset.backdrop!=="static"&&this.close(e)};t.addEventListener("click",o),i.push(()=>t.removeEventListener("click",o));let r=c=>{if(c.key==="Escape"&&this.openModals.length>0){let l=this.openModals[this.openModals.length-1];l===e&&l.dataset.keyboard!=="false"&&this.close(l)}};document.addEventListener("keydown",r),i.push(()=>document.removeEventListener("keydown",r)),this.modals.set(e,{backdrop:t,dialog:s,trapHandler:null,cleanup:i})},createBackdrop:function(e){let t=e.querySelector(".vd-modal-backdrop");return t||(t=document.createElement("div"),t.className="vd-modal-backdrop",document.body.appendChild(t)),t},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t){console.warn("[Vanduo Modals] Modal element not found:",e);return}if(!this.modals.has(t)){console.warn("[Vanduo Modals] Modal not initialized:",t);return}let n=this.modals.get(t),{backdrop:s,dialog:i}=n;if(this.zIndexCounter+=10,t.style.zIndex=this.zIndexCounter,s.style.zIndex=this.zIndexCounter-1,this.openModals.push(t),s.classList.add("is-visible"),t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),this.openModals.length===1){document.body.classList.add("body-modal-open");let o=window.innerWidth-document.documentElement.clientWidth;o>0&&(document.body.style.paddingRight=`${o}px`)}let a=this.trapFocus(t);n.trapHandler=a,setTimeout(()=>{let o=this.getFocusableElements(t)[0];o&&o.focus()},100),t.dispatchEvent(new CustomEvent("modal:open",{bubbles:!0}))},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t){console.warn("[Vanduo Modals] Modal element not found:",e);return}if(!this.modals.has(t)){console.warn("[Vanduo Modals] Modal not initialized:",t);return}let n=this.modals.get(t),{backdrop:s,trapHandler:i}=n;i&&(t.removeEventListener("keydown",i),n.trapHandler=null);let a=this.openModals.indexOf(t);if(a>-1&&this.openModals.splice(a,1),t.classList.remove("is-open"),t.setAttribute("aria-hidden","true"),this.openModals.length===0)s.classList.remove("is-visible"),document.body.classList.remove("body-modal-open"),document.body.style.paddingRight="",this.zIndexCounter=1050;else{let r=this.openModals[this.openModals.length-1];this.modals.get(r).backdrop.classList.add("is-visible")}let o=document.querySelector(`[data-modal="#${t.id}"]`);o&&o.focus(),t.dispatchEvent(new CustomEvent("modal:close",{bubbles:!0}))},trapFocus:function(e){let t=this,n=function(s){if(s.key!=="Tab")return;let i=t.getFocusableElements(e),a=i[0],o=i[i.length-1];s.shiftKey?document.activeElement===a&&(s.preventDefault(),o.focus()):document.activeElement===o&&(s.preventDefault(),a.focus())};return e.addEventListener("keydown",n),n},getFocusableElements:function(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(n=>!n.hasAttribute("disabled")&&n.offsetWidth>0&&n.offsetHeight>0)},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.classList.contains("is-open")?this.close(t):this.open(t))},destroy:function(e){let t=this.modals.get(e);t&&(e.classList.contains("is-open")&&this.close(e),t.cleanup&&t.cleanup.forEach(n=>n()),t.backdrop&&t.backdrop.parentNode&&t.backdrop.parentNode.removeChild(t.backdrop),this.modals.delete(e))},destroyAll:function(){this.modals.forEach((e,t)=>{this.destroy(t)}),this._triggerCleanups.forEach(e=>e()),this._triggerCleanups=[]}};typeof window.Vanduo<"u"&&window.Vanduo.register("modals",d),window.VanduoModals=d})();(function(){"use strict";let d={instances:new Map,getBreakpoint:function(){let t=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-lg").trim(),n=parseInt(t,10);return isNaN(n)?992:n},init:function(){document.querySelectorAll(".vd-navbar").forEach(t=>{this.instances.has(t)||this.initNavbar(t)})},initNavbar:function(e){let t=e.querySelector(".vd-navbar-toggle, .vd-navbar-burger"),n=e.querySelector(".vd-navbar-menu"),s=e.querySelector(".vd-navbar-overlay")||this.createOverlay(e);if(!t||!n)return;let i=[],a=f=>{f.preventDefault(),f.stopPropagation(),this.toggleMenu(e,t,n,s)};if(t.addEventListener("click",a),i.push(()=>t.removeEventListener("click",a)),s){let f=()=>{this.closeMenu(e,t,n,s)};s.addEventListener("click",f),i.push(()=>s.removeEventListener("click",f))}let o=f=>{f.key==="Escape"&&n.classList.contains("is-open")&&this.closeMenu(e,t,n,s)};document.addEventListener("keydown",o),i.push(()=>document.removeEventListener("keydown",o));let r,c=()=>{clearTimeout(r),r=setTimeout(()=>{let f=this.getBreakpoint();window.innerWidth>=f&&n.classList.contains("is-open")&&this.closeMenu(e,t,n,s)},250)};window.addEventListener("resize",c),i.push(()=>{clearTimeout(r),window.removeEventListener("resize",c)});let l=f=>{n.classList.contains("is-open")&&!e.contains(f.target)&&!n.contains(f.target)&&this.closeMenu(e,t,n,s)};document.addEventListener("click",l),i.push(()=>document.removeEventListener("click",l)),n.querySelectorAll(".vd-navbar-dropdown > .vd-nav-link, .vd-navbar-dropdown > .nav-link").forEach(f=>{let w=L=>{let v=this.getBreakpoint();if(window.innerWidth<v){L.preventDefault();let S=f.parentElement.querySelector(".vd-navbar-dropdown-menu");S&&S.classList.toggle("is-open")}};f.addEventListener("click",w),i.push(()=>f.removeEventListener("click",w))}),this.instances.set(e,{toggle:t,menu:n,overlay:s,cleanup:i})},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.overlay&&t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})},toggleMenu:function(e,t,n,s){n.classList.contains("is-open")?this.closeMenu(e,t,n,s):this.openMenu(e,t,n,s)},openMenu:function(e,t,n,s){n.classList.add("is-open"),t.classList.add("is-active"),s&&s.classList.add("is-active"),document.body.style.overflow="hidden",t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")},closeMenu:function(e,t,n,s){n.classList.remove("is-open"),t.classList.remove("is-active"),s&&s.classList.remove("is-active"),document.body.style.overflow="",n.querySelectorAll(".vd-navbar-dropdown-menu.is-open").forEach(a=>{a.classList.remove("is-open")}),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true")},createOverlay:function(e){let t=document.createElement("div");return t.className="vd-navbar-overlay",document.body.appendChild(t),t}};typeof window.Vanduo<"u"&&window.Vanduo.register("navbar",d),window.VanduoNavbar=d})();(function(){"use strict";let d={instances:new Map,init:function(){document.querySelectorAll(".vd-pagination[data-pagination]").forEach(t=>{this.instances.has(t)||this.initPagination(t)})},initPagination:function(e){let t=parseInt(e.dataset.totalPages)||1,n=parseInt(e.dataset.currentPage)||1,s=parseInt(e.dataset.maxVisible)||7;this.render(e,{totalPages:t,currentPage:n,maxVisible:s});let i=a=>{let o=a.target.closest(".vd-pagination-link");if(!o||o.closest(".vd-pagination-item.disabled")||o.closest(".vd-pagination-item.active"))return;a.preventDefault();let r=o.closest(".vd-pagination-item"),c=r.dataset.page;c?this.goToPage(e,parseInt(c)):r.classList.contains("pagination-prev")?this.prevPage(e):r.classList.contains("pagination-next")&&this.nextPage(e)};e.addEventListener("click",i),this.instances.set(e,{cleanup:[()=>e.removeEventListener("click",i)]})},render:function(e,t){let{totalPages:n,currentPage:s,maxVisible:i}=t;if(n<=1){e.innerHTML="";return}let a="";a+=`<li class="vd-pagination-item vd-pagination-prev pagination-item pagination-prev ${s===1?"disabled":""}">`,a+='<a class="vd-pagination-link pagination-link" href="#" aria-label="Previous">Previous</a>',a+="</li>";let o=this.calculatePages(s,n,i),r=0;o.forEach(c=>{if(c==="ellipsis")a+='<li class="vd-pagination-item pagination-item"><span class="vd-pagination-ellipsis pagination-ellipsis">\u2026</span></li>';else{c!==r+1&&r>0&&(a+='<li class="vd-pagination-item pagination-item"><span class="vd-pagination-ellipsis pagination-ellipsis">\u2026</span></li>');let l=Number(c);a+=`<li class="vd-pagination-item pagination-item ${l===s?"active":""}" data-page="${l}">`,a+=`<a class="vd-pagination-link pagination-link" href="#" aria-label="Page ${l}">${l}</a>`,a+="</li>",r=c}}),a+=`<li class="vd-pagination-item vd-pagination-next pagination-item pagination-next ${s===n?"disabled":""}">`,a+='<a class="vd-pagination-link pagination-link" href="#" aria-label="Next">Next</a>',a+="</li>",e.innerHTML=a,e.dataset.currentPage=s},calculatePages:function(e,t,n){let s=[],i=Math.floor(n/2);if(t<=n)for(let a=1;a<=t;a++)s.push(a);else{s.push(1);let a=Math.max(2,e-i),o=Math.min(t-1,e+i);e<=i+1&&(o=Math.min(t-1,n-1)),e>=t-i&&(a=Math.max(2,t-n+2)),a>2&&s.push("ellipsis");for(let r=a;r<=o;r++)s.push(r);o<t-1&&s.push("ellipsis"),t>1&&s.push(t)}return s},goToPage:function(e,t){let n=parseInt(e.dataset.totalPages)||1,s=parseInt(e.dataset.maxVisible)||7;t<1||t>n||(this.render(e,{totalPages:n,currentPage:t,maxVisible:s}),e.dispatchEvent(new CustomEvent("pagination:change",{bubbles:!0,detail:{page:t,totalPages:n}})))},prevPage:function(e){let t=parseInt(e.dataset.currentPage)||1;t>1&&this.goToPage(e,t-1)},nextPage:function(e){let t=parseInt(e.dataset.currentPage)||1,n=parseInt(e.dataset.totalPages)||1;t<n&&this.goToPage(e,t+1)},update:function(e,t){let n=typeof e=="string"?document.querySelector(e):e;n&&(t.totalPages!==void 0&&(n.dataset.totalPages=t.totalPages),t.currentPage!==void 0&&(n.dataset.currentPage=t.currentPage),t.maxVisible!==void 0&&(n.dataset.maxVisible=t.maxVisible),this.render(n,{totalPages:parseInt(n.dataset.totalPages)||1,currentPage:parseInt(n.dataset.currentPage)||1,maxVisible:parseInt(n.dataset.maxVisible)||7}))},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("pagination",d),window.VanduoPagination=d})();(function(){"use strict";let d={parallaxElements:new Map,ticking:!1,isMobile:window.innerWidth<768,reducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,isInitialized:!1,_onScroll:null,_onResize:null,init:function(){if(this.isInitialized){this.refresh();return}if(this.isInitialized=!0,this.reducedMotion)return;document.querySelectorAll(".vd-parallax").forEach(t=>{t.dataset.parallaxInitialized||this.initParallax(t)}),this.handleScroll(),this._onScroll=()=>{this.handleScroll()},window.addEventListener("scroll",this._onScroll,{passive:!0}),this._onResize=()=>{this.isMobile=window.innerWidth<768,this.updateAll()},window.addEventListener("resize",this._onResize)},initParallax:function(e){e.dataset.parallaxInitialized="true";let t=e.classList.contains("parallax-disable-mobile");if(t&&this.isMobile)return;let n=e.querySelectorAll(".vd-parallax-layer, .vd-parallax-bg"),s=this.getSpeed(e),i=e.classList.contains("parallax-horizontal")?"horizontal":"vertical";this.parallaxElements.set(e,{layers:Array.from(n),speed:s,direction:i,disableMobile:t}),this.updateParallax(e)},getSpeed:function(e){return e.classList.contains("parallax-slow")?.5:e.classList.contains("parallax-fast")?1.5:1},handleScroll:function(){this.ticking||(window.requestAnimationFrame(()=>{this.updateAll(),this.ticking=!1}),this.ticking=!0)},updateAll:function(){this.parallaxElements.forEach((e,t)=>{e.disableMobile&&this.isMobile||this.updateParallax(t)})},updateParallax:function(e){let t=this.parallaxElements.get(e);if(!t)return;let n=e.getBoundingClientRect(),s=window.innerHeight,i=n.top,a=n.height,r=(Math.max(0,Math.min(1,(s-i)/(s+a)))-.5)*t.speed*100;t.layers.forEach((c,l)=>{let h=c.dataset.parallaxSpeed?parseFloat(c.dataset.parallaxSpeed):1,f=r*h;t.direction==="horizontal"?c.style.transform=`translateX(${f}px)`:c.style.transform=`translateY(${f}px)`})},destroy:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.parallaxElements.has(t)&&(this.parallaxElements.get(t).layers.forEach(s=>{s.style.transform=""}),this.parallaxElements.delete(t))},refresh:function(){this.updateAll()},destroyAll:function(){this.parallaxElements.forEach((e,t)=>{this.destroy(t)}),this.parallaxElements.clear(),this._onScroll&&(window.removeEventListener("scroll",this._onScroll),this._onScroll=null),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),this.isInitialized=!1}};typeof window.Vanduo<"u"&&window.Vanduo.register("parallax",d),window.VanduoParallax=d})();(function(){"use strict";let d={init:function(){document.querySelectorAll(".progress-bar[data-progress]").forEach(t=>{t.dataset.progressInitialized||this.initProgressBar(t)})},initProgressBar:function(e){e.dataset.progressInitialized="true";let t=parseInt(e.dataset.progress)||0;this.setProgress(e,t,!1)},setProgress:function(e,t,n=!0){let s=typeof e=="string"?document.querySelector(e):e;if(!s)return;t=Math.max(0,Math.min(100,t)),n?s.style.transition="width var(--transition-duration-slow) var(--transition-ease)":(s.style.transition="none",setTimeout(()=>{s.style.transition=""},0)),s.style.width=t+"%",s.setAttribute("aria-valuenow",t),s.setAttribute("aria-valuemin",0),s.setAttribute("aria-valuemax",100);let i=s.querySelector(".progress-text");i&&(i.textContent=t+"%"),s.dispatchEvent(new CustomEvent("progress:update",{bubbles:!0,detail:{value:t,max:100}})),t>=100&&s.dispatchEvent(new CustomEvent("progress:complete",{bubbles:!0,detail:{value:t,max:100}}))},animateProgress:function(e,t,n=1e3){let s=typeof e=="string"?document.querySelector(e):e;if(!s)return;let i=parseInt(s.style.width)||0,a=t-i,o=performance.now(),r=c=>{let l=c-o,h=Math.min(l/n,1),f=1-Math.pow(1-h,3),w=i+a*f;this.setProgress(s,w,!1),h<1&&requestAnimationFrame(r)};requestAnimationFrame(r)},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display="inline-block",t.setAttribute("aria-hidden","false"))},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display="none",t.setAttribute("aria-hidden","true"))},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.style.display==="none"||t.getAttribute("aria-hidden")==="true"?this.show(t):this.hide(t))},destroyAll:function(){document.querySelectorAll('.progress-bar[data-progress-initialized="true"]').forEach(t=>{delete t.dataset.progressInitialized})}};typeof window.Vanduo<"u"&&window.Vanduo.register("preloader",d),window.VanduoPreloader=d})();(function(){"use strict";let d={instances:new Map,_typeaheadBuffer:"",_typeaheadTimer:null,init:function(){document.querySelectorAll("select.vd-custom-select-input, select[data-custom-select]").forEach(t=>{this.instances.has(t)||this.initSelect(t)})},initSelect:function(e){if(e.closest(".vd-custom-select-wrapper"))return;let t=[],n=document.createElement("div");n.className="custom-select-wrapper",e.parentNode.insertBefore(n,e),n.appendChild(e);let s=document.createElement("button");s.type="button",s.className="custom-select-button",s.setAttribute("aria-haspopup","listbox"),s.setAttribute("aria-expanded","false"),s.setAttribute("aria-labelledby",e.id||this.generateId(e));let i=document.createElement("div");if(i.className="custom-select-dropdown",i.setAttribute("role","listbox"),e.dataset.searchable==="true"){let l=document.createElement("div");l.className="custom-select-search";let h=document.createElement("input");h.type="text",h.className="input input-sm",h.placeholder="Search...",h.setAttribute("aria-label","Search options"),l.appendChild(h),i.appendChild(l);let f=L=>{this.filterOptions(i,L.target.value)},w=typeof debounce=="function"?debounce(f,150):f;h.addEventListener("input",w),t.push(()=>h.removeEventListener("input",w))}this.buildOptions(e,i,s),n.appendChild(s),n.appendChild(i),this.updateButtonText(e,s);let a=l=>{l.preventDefault(),l.stopPropagation(),this.toggleDropdown(s,i)};s.addEventListener("click",a),t.push(()=>s.removeEventListener("click",a));let o=l=>{!n.contains(l.target)&&i.classList.contains("is-open")&&this.closeDropdown(s,i)};document.addEventListener("click",o),t.push(()=>document.removeEventListener("click",o));let r=l=>{this.handleKeydown(l,e,s,i)};s.addEventListener("keydown",r),t.push(()=>s.removeEventListener("keydown",r));let c=()=>{this.updateButtonText(e,s),this.updateSelectedOptions(e,i)};e.addEventListener("change",c),t.push(()=>e.removeEventListener("change",c)),this.instances.set(e,{wrapper:n,button:s,dropdown:i,cleanup:t})},buildOptions:function(e,t,n){let s=e.querySelectorAll("option"),i=document.createDocumentFragment();s.forEach((a,o)=>{if(a.parentElement.tagName==="OPTGROUP"){let c=a.parentElement;if(!t.querySelector(`[data-group="${c.label}"]`)){let l=document.createElement("div");l.className="custom-select-option-group",l.textContent=c.label,l.dataset.group=c.label,i.appendChild(l)}}if(a.value===""&&!a.textContent.trim())return;let r=document.createElement("div");r.className="custom-select-option",r.textContent=a.textContent,r.setAttribute("role","option"),r.setAttribute("data-value",a.value),r.setAttribute("data-index",o),a.selected&&(r.classList.add("is-selected"),r.setAttribute("aria-selected","true")),a.disabled&&(r.classList.add("is-disabled"),r.setAttribute("aria-disabled","true")),r.addEventListener("click",c=>{a.disabled||this.selectOption(e,a,r,n,t)}),i.appendChild(r)}),t.appendChild(i)},selectOption:function(e,t,n,s,i){e.multiple?(t.selected=!t.selected,n.classList.toggle("is-selected"),n.setAttribute("aria-selected",t.selected)):(e.value=t.value,e.dispatchEvent(new Event("change",{bubbles:!0})),this.closeDropdown(s,i)),this.updateButtonText(e,s)},updateButtonText:function(e,t){if(e.multiple){let n=Array.from(e.selectedOptions);n.length===0?t.textContent=e.dataset.placeholder||"Select options...":n.length===1?t.textContent=n[0].textContent:t.textContent=`${n.length} selected`}else{let n=e.options[e.selectedIndex];t.textContent=n?n.textContent:e.dataset.placeholder||"Select..."}},updateSelectedOptions:function(e,t){let n=t.querySelectorAll(".vd-custom-select-option"),s=Array.from(e.selectedOptions).map(i=>i.value);n.forEach(i=>{let a=i.dataset.value;s.includes(a)?(i.classList.add("is-selected"),i.setAttribute("aria-selected","true")):(i.classList.remove("is-selected"),i.setAttribute("aria-selected","false"))})},toggleDropdown:function(e,t){t.classList.contains("is-open")?this.closeDropdown(e,t):this.openDropdown(e,t)},openDropdown:function(e,t){t.classList.add("is-open"),e.setAttribute("aria-expanded","true");let n=t.querySelector(".vd-custom-select-option:not(.is-disabled)");n&&n.focus()},closeDropdown:function(e,t){t.classList.remove("is-open"),e.setAttribute("aria-expanded","false")},handleKeydown:function(e,t,n,s){let i=s.classList.contains("is-open"),a=Array.from(s.querySelectorAll(".vd-custom-select-option:not(.is-disabled)")),o=a.findIndex(r=>r===document.activeElement);switch(e.key){case"Enter":case" ":if(e.preventDefault(),i&&o>=0){let r=a[o],c=t.options[parseInt(r.dataset.index)];this.selectOption(t,c,r,n,s)}else this.openDropdown(n,s);break;case"Escape":i&&(e.preventDefault(),this.closeDropdown(n,s),n.focus());break;case"ArrowDown":if(e.preventDefault(),!i)this.openDropdown(n,s);else{let r=o<a.length-1?o+1:0;a[r].focus()}break;case"ArrowUp":if(e.preventDefault(),i){let r=o>0?o-1:a.length-1;a[r].focus()}break;case"Home":i&&(e.preventDefault(),a[0].focus());break;case"End":i&&(e.preventDefault(),a[a.length-1].focus());break;default:if(i&&e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){clearTimeout(this._typeaheadTimer),this._typeaheadBuffer+=e.key.toLowerCase();let r=a.find(c=>c.textContent.trim().toLowerCase().startsWith(this._typeaheadBuffer));r&&r.focus(),this._typeaheadTimer=setTimeout(()=>{this._typeaheadBuffer=""},500)}break}},filterOptions:function(e,t){let n=e.querySelectorAll(".vd-custom-select-option"),s=t.toLowerCase();n.forEach(i=>{i.textContent.toLowerCase().includes(s)?i.style.display="block":i.style.display="none"})},generateId:function(e){return e.id?e.id:"select-"+Math.random().toString(36).substr(2,9)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),t.wrapper&&t.wrapper.parentNode&&(t.wrapper.parentNode.insertBefore(e,t.wrapper),t.wrapper.parentNode.removeChild(t.wrapper)),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("select",d)})();(function(){"use strict";let d={sidenavs:new Map,breakpoint:992,_globalCleanups:[],isFixedVariant:function(e){return e.classList.contains("vd-sidenav-fixed")||e.classList.contains("sidenav-fixed")},isPushVariant:function(e){return e.classList.contains("vd-sidenav-push")||e.classList.contains("sidenav-push")},isRightVariant:function(e){return e.classList.contains("vd-sidenav-right")||e.classList.contains("sidenav-right")},init:function(){document.querySelectorAll(".vd-sidenav").forEach(s=>{this.sidenavs.has(s)||this.initSidenav(s)}),document.querySelectorAll("[data-sidenav-toggle]").forEach(s=>{if(s.dataset.sidenavToggleInitialized)return;s.dataset.sidenavToggleInitialized="true";let i=a=>{a.preventDefault();let o=s.dataset.sidenavToggle,r=document.querySelector(o);r&&this.toggle(r)};s.addEventListener("click",i),this._globalCleanups.push(()=>s.removeEventListener("click",i))}),this.handleResize();let n=()=>{this.handleResize()};window.addEventListener("resize",n),this._globalCleanups.push(()=>window.removeEventListener("resize",n))},initSidenav:function(e){let t=this.createOverlay(e),n=e.querySelector(".vd-sidenav-close"),s=[];if(e.setAttribute("role","navigation"),e.setAttribute("aria-hidden","true"),n){let o=()=>{this.close(e)};n.addEventListener("click",o),s.push(()=>n.removeEventListener("click",o))}let i=()=>{e.dataset.backdrop!=="static"&&this.close(e)};t.addEventListener("click",i),s.push(()=>t.removeEventListener("click",i));let a=o=>{o.key==="Escape"&&e.classList.contains("is-open")&&e.dataset.keyboard!=="false"&&this.close(e)};document.addEventListener("keydown",a),s.push(()=>document.removeEventListener("keydown",a)),this.sidenavs.set(e,{overlay:t,cleanup:s})},createOverlay:function(e){let t=e.querySelector(".vd-sidenav-overlay");return t||(t=document.createElement("div"),t.className="vd-sidenav-overlay",document.body.appendChild(t)),t},open:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t||!this.sidenavs.has(t))return;let{overlay:n}=this.sidenavs.get(t);this.isFixedVariant(t)||n.classList.add("is-visible"),t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),document.body.classList.add("body-sidenav-open"),this.isPushVariant(t)&&this.handlePushVariant(t,!0),t.dispatchEvent(new CustomEvent("sidenav:open",{bubbles:!0}))},close:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(!t||!this.sidenavs.has(t))return;let{overlay:n}=this.sidenavs.get(t);n.classList.remove("is-visible"),t.classList.remove("is-open"),t.setAttribute("aria-hidden","true"),document.body.classList.remove("body-sidenav-open"),this.isPushVariant(t)&&this.handlePushVariant(t,!1),t.dispatchEvent(new CustomEvent("sidenav:close",{bubbles:!0}))},toggle:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&(t.classList.contains("is-open")?this.close(t):this.open(t))},handlePushVariant:function(e,t){let n=document.querySelector('main, .main-content, .content, [role="main"]')||document.body;t?window.innerWidth>=this.breakpoint&&(this.isRightVariant(e)?n.style.marginRight=e.offsetWidth+"px":n.style.marginLeft=e.offsetWidth+"px"):(n.style.marginLeft="",n.style.marginRight="")},handleResize:function(){this.sidenavs.forEach(({overlay:e},t)=>{window.innerWidth>=this.breakpoint?this.isFixedVariant(t)&&!t.classList.contains("is-open")&&(t.classList.add("is-open"),t.setAttribute("aria-hidden","false"),e.classList.remove("is-visible")):this.isFixedVariant(t)&&t.classList.contains("is-open")&&this.close(t)})},destroy:function(e){let t=this.sidenavs.get(e);t&&(e.classList.contains("is-open")&&this.close(e),t.cleanup.forEach(n=>n()),t.overlay&&t.overlay.parentNode&&t.overlay.parentNode.removeChild(t.overlay),this.sidenavs.delete(e))},destroyAll:function(){this.sidenavs.forEach((e,t)=>{this.destroy(t)}),this._globalCleanups.forEach(e=>e()),this._globalCleanups=[]}};typeof window.Vanduo<"u"&&window.Vanduo.register("sidenav",d),window.VanduoSidenav=d})();(function(){"use strict";let d={instances:new Map,init:function(){document.querySelectorAll(".vd-tabs, [data-tabs]").forEach(t=>{this.instances.has(t)||this.initTabs(t)})},initTabs:function(e){let t=e.querySelector('.vd-tab-list, [role="tablist"]'),n=e.querySelectorAll(".vd-tab-link, [data-tab]"),s=e.querySelectorAll(".vd-tab-pane, [data-tab-pane]");if(!t||n.length===0)return;let i=[];t.setAttribute("role","tablist"),n.forEach((o,r)=>{let c=o.dataset.tab||o.getAttribute("href")?.replace("#","")||`tab-${r}`,l=this.findPane(e,c,s);o.setAttribute("role","tab"),o.setAttribute("aria-selected",o.classList.contains("is-active")?"true":"false"),o.setAttribute("tabindex",o.classList.contains("is-active")?"0":"-1"),o.id||(o.id=`tab-btn-${c}`),l&&(l.setAttribute("role","tabpanel"),l.setAttribute("aria-labelledby",o.id),l.id||(l.id=`tab-pane-${c}`),o.setAttribute("aria-controls",l.id));let h=w=>{w.preventDefault(),!o.classList.contains("disabled")&&!o.disabled&&this.activateTab(e,o,n,s)};o.addEventListener("click",h),i.push(()=>o.removeEventListener("click",h));let f=w=>{this.handleKeydown(w,e,o,n,s)};o.addEventListener("keydown",f),i.push(()=>o.removeEventListener("keydown",f))}),!e.querySelector(".vd-tab-link.is-active, [data-tab].is-active")&&n.length>0&&this.activateTab(e,n[0],n,s),this.instances.set(e,{cleanup:i})},findPane:function(e,t,n){let s=e.querySelector(`[data-tab-pane="${t}"]`);return s||(s=e.querySelector(`#${t}`)),s||e.querySelectorAll(".vd-tab-link, [data-tab]").forEach((a,o)=>{(a.dataset.tab||a.getAttribute("href")?.replace("#",""))===t&&n[o]&&(s=n[o])}),s},activateTab:function(e,t,n,s){let i=t.dataset.tab||t.getAttribute("href")?.replace("#","")||t.id;n.forEach(r=>{r.classList.remove("is-active"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1"),r.parentElement&&r.parentElement.classList.contains("tab-item")&&r.parentElement.classList.remove("is-active")}),s.forEach(r=>{r.classList.remove("is-active")}),t.classList.add("is-active"),t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0"),t.parentElement&&t.parentElement.classList.contains("tab-item")&&t.parentElement.classList.add("is-active");let a=this.findPane(e,i,s);a&&a.classList.add("is-active");let o=new CustomEvent("tab:change",{bubbles:!0,detail:{tab:t,pane:a,tabId:i}});e.dispatchEvent(o)},handleKeydown:function(e,t,n,s,i){let a=t.classList.contains("tabs-vertical"),o=Array.from(s).filter(l=>!l.classList.contains("disabled")&&!l.disabled),r=o.indexOf(n),c=r;switch(e.key){case"ArrowLeft":a||(e.preventDefault(),c=r>0?r-1:o.length-1);break;case"ArrowRight":a||(e.preventDefault(),c=r<o.length-1?r+1:0);break;case"ArrowUp":a&&(e.preventDefault(),c=r>0?r-1:o.length-1);break;case"ArrowDown":a&&(e.preventDefault(),c=r<o.length-1?r+1:0);break;case"Home":e.preventDefault(),c=0;break;case"End":e.preventDefault(),c=o.length-1;break;case"Enter":case" ":e.preventDefault(),this.activateTab(t,n,s,i);return;default:return}c!==r&&(o[c].focus(),this.activateTab(t,o[c],s,i))},show:function(e){let t;if(typeof e=="string"?t=document.querySelector(`[data-tab="${e}"], [href="#${e}"]`):t=e,!t)return;let n=t.closest(".vd-tabs, [data-tabs]");if(!n)return;let s=n.querySelectorAll(".vd-tab-link, [data-tab]"),i=n.querySelectorAll(".vd-tab-pane, [data-tab-pane]");this.activateTab(n,t,s,i)},destroy:function(e){let t=this.instances.get(e);t&&(t.cleanup.forEach(n=>n()),this.instances.delete(e))},destroyAll:function(){this.instances.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tabs",d)})();(function(){"use strict";let d={STORAGE_KEYS:{PRIMARY:"vanduo-primary-color",NEUTRAL:"vanduo-neutral-color",RADIUS:"vanduo-radius",FONT:"vanduo-font-preference",THEME:"vanduo-theme-preference"},DEFAULTS:{PRIMARY_LIGHT:"black",PRIMARY_DARK:"amber",NEUTRAL:"neutral",RADIUS:"0.5",FONT:"ubuntu",THEME:"system"},PRIMARY_COLORS:{black:{name:"Black",color:"#000000"},red:{name:"Red",color:"#fa5252"},orange:{name:"Orange",color:"#fd7e14"},amber:{name:"Amber",color:"#f59f00"},yellow:{name:"Yellow",color:"#fcc419"},lime:{name:"Lime",color:"#82c91e"},green:{name:"Green",color:"#40c057"},emerald:{name:"Emerald",color:"#20c997"},teal:{name:"Teal",color:"#12b886"},cyan:{name:"Cyan",color:"#22b8cf"},sky:{name:"Sky",color:"#3bc9db"},blue:{name:"Blue",color:"#228be6"},indigo:{name:"Indigo",color:"#4c6ef5"},violet:{name:"Violet",color:"#7950f2"},purple:{name:"Purple",color:"#be4bdb"},fuchsia:{name:"Fuchsia",color:"#f06595"},pink:{name:"Pink",color:"#e64980"},rose:{name:"Rose",color:"#ff8787"}},NEUTRAL_COLORS:{slate:{name:"Slate",color:"#64748b"},gray:{name:"Gray",color:"#6b7280"},zinc:{name:"Zinc",color:"#71717a"},neutral:{name:"Neutral",color:"#737373"},stone:{name:"Stone",color:"#78716c"}},RADIUS_OPTIONS:["0","0.125","0.25","0.375","0.5"],FONT_OPTIONS:{"jetbrains-mono":{name:"JetBrains Mono",family:"'JetBrains Mono', monospace"},inter:{name:"Inter",family:"'Inter', sans-serif"},"source-sans":{name:"Source Sans 3",family:"'Source Sans 3', sans-serif"},"fira-sans":{name:"Fira Sans",family:"'Fira Sans', sans-serif"},"ibm-plex":{name:"IBM Plex Sans",family:"'IBM Plex Sans', sans-serif"},system:{name:"System Default",family:null},ubuntu:{name:"Ubuntu",family:"'Ubuntu', sans-serif"},"open-sans":{name:"Open Sans",family:"'Open Sans', sans-serif"},rubik:{name:"Rubik",family:"'Rubik', sans-serif"},"titillium-web":{name:"Titillium Web",family:"'Titillium Web', sans-serif"}},THEME_MODES:["system","dark","light"],state:{primary:null,neutral:null,radius:null,font:null,theme:null,isOpen:!1},isInitialized:!1,_cleanup:[],elements:{customizer:null,trigger:null,panel:null,overlay:null},init:function(){if(this.isInitialized){this.bindExistingElements(),this.bindPanelEvents(),this.updateUI();return}this.isInitialized=!0,this._cleanup=[],this.loadPreferences(),this.applyAllPreferences(),this.bindExistingElements(),this.bindEvents(),console.log("Vanduo Theme Customizer initialized")},addListener:function(e,t,n,s){e&&(e.addEventListener(t,n,s),this._cleanup.push(()=>e.removeEventListener(t,n,s)))},getDefaultPrimary:function(e){return e==="system"?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?this.DEFAULTS.PRIMARY_DARK:this.DEFAULTS.PRIMARY_LIGHT:e==="dark"?this.DEFAULTS.PRIMARY_DARK:this.DEFAULTS.PRIMARY_LIGHT},loadPreferences:function(){this.state.theme=this.getStorageValue(this.STORAGE_KEYS.THEME,this.DEFAULTS.THEME),this.state.primary=this.getStorageValue(this.STORAGE_KEYS.PRIMARY,this.getDefaultPrimary(this.state.theme)),this.state.neutral=this.getStorageValue(this.STORAGE_KEYS.NEUTRAL,this.DEFAULTS.NEUTRAL),this.state.radius=this.getStorageValue(this.STORAGE_KEYS.RADIUS,this.DEFAULTS.RADIUS),this.state.font=this.getStorageValue(this.STORAGE_KEYS.FONT,this.DEFAULTS.FONT)},savePreference:function(e,t){this.setStorageValue(e,t)},applyAllPreferences:function(){this.applyPrimary(this.state.primary),this.applyNeutral(this.state.neutral),this.applyRadius(this.state.radius),this.applyFont(this.state.font),this.applyTheme(this.state.theme)},applyPrimary:function(e){this.PRIMARY_COLORS[e]||(e=this.getDefaultPrimary(this.state.theme)),this.state.primary=e,document.documentElement.setAttribute("data-primary",e),this.savePreference(this.STORAGE_KEYS.PRIMARY,e),this.dispatchEvent("primary-change",{color:e})},applyNeutral:function(e){this.NEUTRAL_COLORS[e]||(e=this.DEFAULTS.NEUTRAL),this.state.neutral=e,document.documentElement.setAttribute("data-neutral",e),this.savePreference(this.STORAGE_KEYS.NEUTRAL,e),this.dispatchEvent("neutral-change",{neutral:e})},applyRadius:function(e){this.RADIUS_OPTIONS.includes(e)||(e=this.DEFAULTS.RADIUS),this.state.radius=e,document.documentElement.setAttribute("data-radius",e),document.documentElement.style.setProperty("--radius-scale",e),this.savePreference(this.STORAGE_KEYS.RADIUS,e),this.dispatchEvent("radius-change",{radius:e})},applyFont:function(e){this.FONT_OPTIONS[e]||(e=this.DEFAULTS.FONT),this.state.font=e,e==="system"?document.documentElement.removeAttribute("data-font"):document.documentElement.setAttribute("data-font",e),this.savePreference(this.STORAGE_KEYS.FONT,e),window.FontSwitcher&&window.FontSwitcher.setPreference&&(window.FontSwitcher.state.preference=e,window.FontSwitcher.applyFont()),this.dispatchEvent("font-change",{font:e})},applyTheme:function(e){this.THEME_MODES.includes(e)||(e=this.DEFAULTS.THEME);let t=this.getDefaultPrimary(this.state.theme);if(this.state.primary===t){let n=this.getDefaultPrimary(e);n!==this.state.primary&&this.applyPrimary(n)}if(this.state.theme=e,e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e),this.savePreference(this.STORAGE_KEYS.THEME,e),window.Vanduo&&window.Vanduo.components.themeSwitcher){let n=window.Vanduo.components.themeSwitcher;n.state&&(n.state.preference=e)}this.dispatchEvent("mode-change",{mode:e})},dispatchEvent:function(e,t){let n=new CustomEvent("theme:"+e,{bubbles:!0,detail:t});document.dispatchEvent(n);let s=new CustomEvent("theme:change",{bubbles:!0,detail:{type:e,value:t[Object.keys(t)[0]],state:{...this.state}}});document.dispatchEvent(s)},bindExistingElements:function(){if(this.elements.customizer=document.querySelector(".vd-theme-customizer"),this.elements.customizer)this.elements.trigger=this.elements.customizer.querySelector(".vd-theme-customizer-trigger"),this.elements.panel=this.elements.customizer.querySelector(".vd-theme-customizer-panel"),this.elements.overlay=this.elements.customizer.querySelector(".vd-theme-customizer-overlay");else{let e=document.querySelector("[data-theme-customizer-trigger]");e&&this.createDynamicPanel(e)}this.updateUI()},createDynamicPanel:function(e){let t=document.createElement("div");t.className="vd-theme-customizer",this.elements.trigger=e;let n=document.createElement("div");n.className="vd-theme-customizer-overlay";let s=document.createElement("div");s.className="vd-theme-customizer-panel",s.innerHTML=this.getPanelHTML(),document.body.appendChild(n),document.body.appendChild(s),this.elements.panel=s,this.elements.overlay=n,this.elements.customizer={contains:i=>s.contains(i)||e.contains(i)},this.positionPanel(),this.bindPanelEvents(),this.addListener(window,"resize",()=>this.positionPanel())},positionPanel:function(){if(!this.elements.panel||!this.elements.trigger)return;if(window.innerWidth<768)this.elements.panel.style.top="",this.elements.panel.style.right="",this.elements.panel.style.left="",this.elements.panel.style.height="",this.elements.panel.style.maxHeight="";else{let t=this.elements.trigger.getBoundingClientRect(),n=320,s=t.bottom+8,i=window.innerWidth,a=i-t.right;i-a-n<8&&(a=i-n-8),this.elements.panel.style.top=s+"px",this.elements.panel.style.right=a+"px",this.elements.panel.style.left="",this.elements.panel.style.height="auto",this.elements.panel.style.maxHeight="calc(100vh - "+s+"px)"}},bindPanelEvents:function(){if(!this.elements.panel||this.elements.panel.getAttribute("data-customizer-initialized")==="true")return;this.elements.panel.setAttribute("data-customizer-initialized","true"),this.elements.panel.querySelectorAll("[data-color]").forEach(s=>{this.addListener(s,"click",()=>{this.applyPrimary(s.dataset.color),this.updateUI()})}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(s=>{this.addListener(s,"click",()=>{this.applyNeutral(s.dataset.neutral),this.updateUI()})}),this.elements.panel.querySelectorAll("[data-radius]").forEach(s=>{this.addListener(s,"click",()=>{this.applyRadius(s.dataset.radius),this.updateUI()})});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&this.addListener(e,"change",s=>{this.applyFont(s.target.value),this.updateUI()}),this.elements.panel.querySelectorAll("[data-mode]").forEach(s=>{this.addListener(s,"click",()=>{this.applyTheme(s.dataset.mode),this.updateUI()})});let t=this.elements.panel.querySelector(".customizer-reset");t&&this.addListener(t,"click",()=>{this.reset()});let n=this.elements.panel.querySelector(".customizer-mobile-close");n&&this.addListener(n,"click",()=>{this.close()}),this.elements.overlay&&this.addListener(this.elements.overlay,"click",()=>{this.close()})},getPanelHTML:function(){let e=typeof escapeHtml=="function"?escapeHtml:function(c){let l=document.createElement("div");return l.textContent=String(c??""),l.innerHTML},t=function(c){let l=String(c??"").trim();return/^(#[0-9a-fA-F]{3,8}|rgb[a]?\([^)]{1,60}\)|hsl[a]?\([^)]{1,60}\)|var\(--[a-zA-Z0-9_-]{1,40}\))$/.test(l)?l:"#000000"},n="";for(let[c,l]of Object.entries(this.PRIMARY_COLORS))n+=`<button class="tc-color-swatch${c===this.state.primary?" is-active":""}" data-color="${e(c)}" style="--swatch-color: ${t(l.color)}" title="${e(l.name)}"></button>`;let s="";for(let[c,l]of Object.entries(this.NEUTRAL_COLORS))s+=`<button class="tc-neutral-swatch${c===this.state.neutral?" is-active":""}" data-neutral="${e(c)}" style="--swatch-color: ${t(l.color)}" title="${e(l.name)}"><span>${e(l.name)}</span></button>`;let i="";this.RADIUS_OPTIONS.forEach(c=>{i+=`<button class="tc-radius-btn${c===this.state.radius?" is-active":""}" data-radius="${e(c)}">${e(c)}</button>`});let a="";for(let[c,l]of Object.entries(this.FONT_OPTIONS))a+=`<option value="${e(c)}"${c===this.state.font?" selected":""}>${e(l.name)}</option>`;let o={system:"ph-desktop",dark:"ph-moon",light:"ph-sun"},r="";return this.THEME_MODES.forEach(c=>{r+=`<button class="tc-mode-btn${c===this.state.theme?" is-active":""}" data-mode="${c}"><i class="ph ${o[c]}"></i><span>${c.charAt(0).toUpperCase()+c.slice(1)}</span></button>`}),`
|
|
@@ -44,5 +44,5 @@ var R=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object
|
|
|
44
44
|
<div class="tc-footer">
|
|
45
45
|
<button class="customizer-reset btn btn-sm btn-outline">Reset to Defaults</button>
|
|
46
46
|
</div>
|
|
47
|
-
`},isUsingDefaultPrimary:function(){return this.state.primary===this.DEFAULTS.PRIMARY_LIGHT||this.state.primary===this.DEFAULTS.PRIMARY_DARK},bindEvents:function(){if(this.elements.trigger&&this.addListener(this.elements.trigger,"click",e=>{e.preventDefault(),e.stopPropagation(),this.toggle()}),this.bindPanelEvents(),window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{if(this.state.theme==="system"&&this.isUsingDefaultPrimary()){let n=this.getDefaultPrimary("system");n!==this.state.primary&&(this.applyPrimary(n),this.updateUI())}};e.addEventListener("change",t),this._cleanup.push(()=>e.removeEventListener("change",t))}this.addListener(document,"click",e=>{this.state.isOpen&&this.elements.customizer&&!this.elements.customizer.contains(e.target)&&this.close()}),this.addListener(document,"keydown",e=>{e.key==="Escape"&&this.state.isOpen&&this.close()})},toggle:function(){this.state.isOpen?this.close():this.open()},open:function(){this.state.isOpen=!0,this.positionPanel(),this.elements.panel&&this.elements.panel.classList.add("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","true"),this.elements.overlay&&this.elements.overlay.classList.add("is-active"),this.dispatchEvent("panel-open",{isOpen:!0})},close:function(){this.state.isOpen=!1,this.elements.panel&&this.elements.panel.classList.remove("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","false"),this.elements.overlay&&this.elements.overlay.classList.remove("is-active"),this.dispatchEvent("panel-close",{isOpen:!1})},updateUI:function(){if(!this.elements.panel)return;this.elements.panel.querySelectorAll("[data-color]").forEach(t=>{t.classList.toggle("is-active",t.dataset.color===this.state.primary)}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(t=>{t.classList.toggle("is-active",t.dataset.neutral===this.state.neutral)}),this.elements.panel.querySelectorAll("[data-radius]").forEach(t=>{t.classList.toggle("is-active",t.dataset.radius===this.state.radius)});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&(e.value=this.state.font),this.elements.panel.querySelectorAll("[data-mode]").forEach(t=>{t.classList.toggle("is-active",t.dataset.mode===this.state.theme)})},reset:function(){this.applyTheme(this.DEFAULTS.THEME),this.applyPrimary(this.getDefaultPrimary(this.DEFAULTS.THEME)),this.applyNeutral(this.DEFAULTS.NEUTRAL),this.applyRadius(this.DEFAULTS.RADIUS),this.applyFont(this.DEFAULTS.FONT),this.applyTheme(this.DEFAULTS.THEME),this.updateUI(),this.dispatchEvent("reset",{state:{...this.state}})},getState:function(){return{...this.state}},setPreferences:function(e){e.primary&&this.applyPrimary(e.primary),e.neutral&&this.applyNeutral(e.neutral),e.radius&&this.applyRadius(e.radius),e.font&&this.applyFont(e.font),e.theme&&this.applyTheme(e.theme),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},destroyAll:function(){this._cleanup.forEach(e=>e()),this._cleanup=[],this.elements.panel&&this.elements.panel.removeAttribute("data-customizer-initialized"),this.close(),this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeCustomizer",d),window.ThemeCustomizer=d})();(function(){"use strict";let d={isInitialized:!1,_mediaQuery:null,_onMediaChange:null,init:function(){if(this.STORAGE_KEY="vanduo-theme-preference",this.state={preference:this.getPreference()},this.isInitialized){this.applyTheme(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyTheme(),this.listenForSystemChanges(),this.renderUI(),console.log("Vanduo Theme Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"system")},setPreference:function(e){this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyTheme(),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},applyTheme:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)},listenForSystemChanges:function(){this._mediaQuery&&this._onMediaChange||(this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this._onMediaChange=e=>{this.state.preference==="system"&&this.applyTheme()},this._mediaQuery.addEventListener("change",this._onMediaChange))},renderUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.getAttribute("data-theme-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._themeToggleHandler=n}else{let n=()=>{let s=["system","light","dark"],i=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[i])};t.addEventListener("click",n),t._themeToggleHandler=n}t.setAttribute("data-theme-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".theme-current-label");n&&(n.textContent=this.state.preference.charAt(0).toUpperCase()+this.state.preference.slice(1))}})},destroyAll:function(){document.querySelectorAll('[data-toggle="theme"][data-theme-initialized="true"]').forEach(t=>{if(t._themeToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._themeToggleHandler),delete t._themeToggleHandler}t.removeAttribute("data-theme-initialized")}),this._mediaQuery&&this._onMediaChange&&this._mediaQuery.removeEventListener("change",this._onMediaChange),this._mediaQuery=null,this._onMediaChange=null,this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeSwitcher",d)})();(function(){"use strict";let d={defaults:{position:"top-right",duration:5e3,dismissible:!0,showProgress:!0,pauseOnHover:!0},containers:{},getContainer:function(e){if(this.containers[e])return this.containers[e];let t=document.createElement("div");return t.className=`vd-toast-container vd-toast-container-${e}`,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","false"),document.body.appendChild(t),this.containers[e]=t,t},show:function(e,t,n){typeof e=="string"&&(e={message:e,type:t,duration:n});let s=Object.assign({},this.defaults,e),i=this.getContainer(s.position),a=document.createElement("div");a.className="vd-toast",s.type&&a.classList.add(`vd-toast-${s.type}`),s.solid&&a.classList.add("vd-toast-solid"),s.showProgress&&s.duration>0&&a.classList.add("vd-toast-with-progress");let o="";if(s.icon){let v=typeof sanitizeHtml=="function"?sanitizeHtml(s.icon):escapeHtml(s.icon);o+=`<span class="vd-toast-icon">${v}</span>`}else s.type&&(o+=`<span class="vd-toast-icon">${this.getDefaultIcon(s.type)}</span>`);let r=typeof escapeHtml=="function"?escapeHtml:function(v){let y=document.createElement("div");return y.appendChild(document.createTextNode(v)),y.innerHTML};if(o+='<div class="vd-toast-content">',s.title&&(o+=`<div class="vd-toast-title">${r(String(s.title))}</div>`),s.message&&(o+=`<div class="vd-toast-message">${r(String(s.message))}</div>`),o+="</div>",s.dismissible&&(o+='<button type="button" class="vd-toast-close" aria-label="Close"></button>'),s.showProgress&&s.duration>0){let v=parseInt(s.duration,10)||0;o+=`<div class="vd-toast-progress" style="animation-duration: ${v}ms"></div>`}if(a.innerHTML=o,i.appendChild(a),a._toastCleanup=[],s.dismissible){let v=a.querySelector(".vd-toast-close"),y=()=>{this.dismiss(a)};v.addEventListener("click",y),a._toastCleanup.push(()=>v.removeEventListener("click",y))}let c=null,l=s.duration,h=null,f=()=>{if(s.duration>0){h=Date.now(),c=setTimeout(()=>{this.dismiss(a)},l),a._toastTimeoutId=c;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="running")}},w=()=>{if(c){clearTimeout(c),c=null,a._toastTimeoutId=null,l-=Date.now()-h;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="paused")}};s.pauseOnHover&&(a.addEventListener("mouseenter",w),a.addEventListener("mouseleave",f),a._toastCleanup.push(()=>a.removeEventListener("mouseenter",w),()=>a.removeEventListener("mouseleave",f))),requestAnimationFrame(()=>{a.classList.add("is-visible"),f()}),a._toastConfig=s;let L=new CustomEvent("toast:show",{bubbles:!0,detail:{toast:a,config:s}});return a.dispatchEvent(L),a},dismiss:function(e){if(!e||e.classList.contains("is-exiting"))return;e._toastTimeoutId&&(clearTimeout(e._toastTimeoutId),e._toastTimeoutId=null),e.classList.remove("is-visible"),e.classList.add("is-exiting");let t=new CustomEvent("toast:dismiss",{bubbles:!0,detail:{toast:e}});e.dispatchEvent(t);let n=()=>{e.removeEventListener("transitionend",n),e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)};e.addEventListener("transitionend",n),setTimeout(()=>{e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)},400)},destroyAll:function(){Object.keys(this.containers).forEach(e=>{let t=this.containers[e];if(!t)return;t.querySelectorAll(".vd-toast").forEach(s=>{s._toastTimeoutId&&clearTimeout(s._toastTimeoutId),s._toastCleanup&&(s._toastCleanup.forEach(i=>i()),delete s._toastCleanup),s.parentElement&&s.parentElement.removeChild(s)}),t.parentElement&&t.parentElement.removeChild(t)}),this.containers={}},dismissAll:function(e){e&&this.containers[e]?this.containers[e].querySelectorAll(".vd-toast").forEach(n=>this.dismiss(n)):Object.values(this.containers).forEach(t=>{t.querySelectorAll(".vd-toast").forEach(s=>this.dismiss(s))})},getDefaultIcon:function(e){return{success:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'}[e]||""},success:function(e,t){return this.show(Object.assign({message:e,type:"success"},t))},error:function(e,t){return this.show(Object.assign({message:e,type:"error"},t))},warning:function(e,t){return this.show(Object.assign({message:e,type:"warning"},t))},info:function(e,t){return this.show(Object.assign({message:e,type:"info"},t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("toast",d),window.Toast=d})();(function(){"use strict";let d={tooltips:new Map,delayTimers:new Map,sanitizeHtml:function(e){if(typeof sanitizeHtml=="function")return sanitizeHtml(e);let t=document.createElement("div");return t.textContent=e||"",t.innerHTML},init:function(){document.querySelectorAll("[data-tooltip], [data-tooltip-html]").forEach(t=>{this.tooltips.has(t)||this.initTooltip(t)})},initTooltip:function(e){let t=this.createTooltip(e),n=[],s=()=>{this.showTooltip(e,t)},i=()=>{this.hideTooltip(e,t)},a=()=>{this.showTooltip(e,t)},o=()=>{this.hideTooltip(e,t)};e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",i),e.addEventListener("focus",a),e.addEventListener("blur",o),n.push(()=>e.removeEventListener("mouseenter",s),()=>e.removeEventListener("mouseleave",i),()=>e.removeEventListener("focus",a),()=>e.removeEventListener("blur",o)),this.tooltips.set(e,{tooltip:t,cleanup:n})},createTooltip:function(e){let t=document.createElement("div");t.className="vd-tooltip",t.setAttribute("role","tooltip"),t.setAttribute("aria-hidden","true");let n="tooltip-"+Math.random().toString(36).substr(2,9);t.id=n,e.setAttribute("aria-describedby",n);let s=e.dataset.tooltipHtml,i=e.dataset.tooltip;s?(t.innerHTML=this.sanitizeHtml(s),t.classList.add("vd-tooltip-html")):i&&(t.textContent=i);let a=e.dataset.tooltipPlacement||e.dataset.placement||"top";t.setAttribute("data-placement",a),t.classList.add(`vd-tooltip-${a}`),e.dataset.tooltipVariant&&t.classList.add(`vd-tooltip-${e.dataset.tooltipVariant}`),e.dataset.tooltipSize&&t.classList.add(`vd-tooltip-${e.dataset.tooltipSize}`);let o=parseInt(e.dataset.tooltipDelay)||0;return t.dataset.delay=o,document.body.appendChild(t),t},showTooltip:function(e,t){let n=parseInt(t.dataset.delay)||0;if(n>0){let s=setTimeout(()=>{this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},n);this.delayTimers.set(e,s)}else this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},hideTooltip:function(e,t){let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.classList.remove("is-visible"),t.setAttribute("aria-hidden","true")},positionTooltip:function(e,t){let n=t.dataset.placement||"top",s=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,r=0,c=0;switch(n){case"top":r=s.top+a-i.height-8,c=s.left+o+s.width/2-i.width/2;break;case"bottom":r=s.bottom+a+8,c=s.left+o+s.width/2-i.width/2;break;case"left":r=s.top+a+s.height/2-i.height/2,c=s.left+o-i.width-8;break;case"right":r=s.top+a+s.height/2-i.height/2,c=s.right+o+8;break}let l=window.innerWidth,h=window.innerHeight,f=8;c<f?c=f:c+i.width>l-f&&(c=l-i.width-f),r<a+f?r=a+f:r+i.height>a+h-f&&(r=a+h-i.height-f),t.style.cssText=`position: absolute; top: 0; left: 0; transform: translate(${c}px, ${r}px);`},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.showTooltip(t,n)}},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.hideTooltip(t,n)}},update:function(e,t,n=!1){let s=typeof e=="string"?document.querySelector(e):e;if(s&&this.tooltips.has(s)){let{tooltip:i}=this.tooltips.get(s);n?(i.innerHTML=this.sanitizeHtml(t),i.classList.add("vd-tooltip-html")):(i.textContent=t,i.classList.remove("vd-tooltip-html"))}},destroy:function(e){let t=this.tooltips.get(e);if(!t)return;let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.cleanup.forEach(s=>s()),t.tooltip&&t.tooltip.parentNode&&t.tooltip.parentNode.removeChild(t.tooltip),this.tooltips.delete(e)},destroyAll:function(){this.tooltips.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tooltips",d),window.VanduoTooltips=d})();(function(){"use strict";let d={minQueryLength:2,maxResults:10,debounceMs:150,highlightTag:"mark",keyboardShortcut:!0,containerSelector:".vd-doc-search",inputSelector:".vd-doc-search-input",resultsSelector:".vd-doc-search-results",contentSelector:".doc-content section[id]",titleSelector:".demo-title, h2, h3",navSelector:".doc-nav-link",sectionSelector:".doc-nav-section",excludeFromContent:"pre, code, script, style",maxContentLength:500,data:null,categoryIcons:{"getting-started":"ph-rocket-launch",core:"ph-cube",components:"ph-puzzle-piece",interactive:"ph-cursor-click","data-display":"ph-table",feedback:"ph-bell",meta:"ph-info",default:"ph-file-text"},onSelect:null,onSearch:null,onOpen:null,onClose:null,emptyTitle:"No results found",emptyText:"Try different keywords or check spelling",placeholder:"Search..."};function e(n){let s=Object.assign({},d,n||{}),i={initialized:!1,index:[],results:[],activeIndex:-1,isOpen:!1,query:"",container:null,input:null,resultsContainer:null,debounceTimer:null,boundHandlers:{}};function a(u,p,...m){try{p(...m)}catch(g){console.warn('[Vanduo Search] Callback error in "'+u+'":',g)}}function o(u){if(i.resultsContainer)try{i.resultsContainer.innerHTML=u}catch(p){console.warn("[Vanduo Search] Failed to render results:",p)}}function r(){return i.initialized?V:(i.container=document.querySelector(s.containerSelector),!i.container||(i.input=i.container.querySelector(s.inputSelector),i.resultsContainer=i.container.querySelector(s.resultsSelector),!i.input||!i.resultsContainer)?(i.initialized=!1,null):(s.placeholder&&i.input.setAttribute("placeholder",s.placeholder),c(),v(),S(),i.initialized=!0,V))}function c(){if(i.index=[],s.data&&Array.isArray(s.data)){s.data.forEach(function(m){i.index.push({id:m.id||L(m.title),title:m.title||"",category:m.category||"",categorySlug:L(m.category||""),content:m.content||"",keywords:m.keywords||w(m.title+" "+m.content),url:m.url||"#"+(m.id||L(m.title)),icon:m.icon||""})});return}let u=document.querySelectorAll(s.contentSelector),p=l();u.forEach(function(m){let g=m.id;if(!g)return;let b=m.querySelector(s.titleSelector),E=b?b.textContent.replace(/v[\d.]+/g,"").trim():g,T=p[g]||"Documentation",x=h(m),A=f(m,E),C=b?b.querySelector("i.ph"):null,I="";if(C&&C.classList){for(let P=0;P<C.classList.length;P++)if(C.classList[P].indexOf("ph-")===0){I=C.classList[P];break}}i.index.push({id:g,title:E,category:T,categorySlug:L(T),content:x,keywords:A,url:"#"+g,icon:I})})}function l(){let u={},p="Documentation";return document.querySelectorAll(s.navSelector+", "+s.sectionSelector).forEach(function(g){if(g.classList.contains("doc-nav-section"))p=g.textContent.trim();else{let b=g.getAttribute("href");if(b&&b.startsWith("#")){let E=b.substring(1);u[E]=p}}}),u}function h(u){let p=u.cloneNode(!0);p.querySelectorAll(s.excludeFromContent).forEach(function(b){b.remove()});let g=p.textContent||"";return g=g.replace(/\s+/g," ").trim(),g.substring(0,s.maxContentLength)}function f(u,p){let m=[];return p.toLowerCase().split(/\s+/).forEach(function(E){E.length>2&&m.push(E)}),u.querySelectorAll("code").forEach(function(E){let x=(E.textContent||"").match(/\.([\w-]+)/g);x&&x.forEach(function(A){m.push(A.substring(1).toLowerCase())})}),u.querySelectorAll("[data-tooltip], [data-modal]").forEach(function(E){E.getAttributeNames().filter(function(x){return x.startsWith("data-")}).forEach(function(x){m.push(x.replace("data-",""))})}),Array.from(new Set(m))}function w(u){return u.toLowerCase().split(/\s+/).filter(function(m){return m.length>2})}function L(u){return u.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function v(){i.boundHandlers.handleInput=function(u){k(u)},i.boundHandlers.handleFocus=function(){i.query.length>=s.minQueryLength&&H()},i.boundHandlers.handleKeydown=function(u){O(u)},i.boundHandlers.handleOutsideClick=function(u){i.container.contains(u.target)||_()},i.boundHandlers.handleGlobalKeydown=function(u){s.keyboardShortcut&&(u.metaKey||u.ctrlKey)&&u.key==="k"&&(u.preventDefault(),i.input.focus(),i.input.select())},i.boundHandlers.handleResultClick=function(u){let p=u.target.closest(".vd-doc-search-result");if(p){let m=parseInt(p.dataset.index,10);z(m)}},i.input.addEventListener("input",i.boundHandlers.handleInput),i.input.addEventListener("focus",i.boundHandlers.handleFocus),i.input.addEventListener("keydown",i.boundHandlers.handleKeydown),document.addEventListener("click",i.boundHandlers.handleOutsideClick),document.addEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer.addEventListener("click",i.boundHandlers.handleResultClick)}function y(){i.input&&(i.input.removeEventListener("input",i.boundHandlers.handleInput),i.input.removeEventListener("focus",i.boundHandlers.handleFocus),i.input.removeEventListener("keydown",i.boundHandlers.handleKeydown)),document.removeEventListener("click",i.boundHandlers.handleOutsideClick),document.removeEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer&&i.resultsContainer.removeEventListener("click",i.boundHandlers.handleResultClick)}function S(){let u=i.resultsContainer.id||"search-results-"+Math.random().toString(36).substr(2,9);i.resultsContainer.id=u,i.input.setAttribute("role","combobox"),i.input.setAttribute("aria-autocomplete","list"),i.input.setAttribute("aria-controls",u),i.input.setAttribute("aria-expanded","false"),i.resultsContainer.setAttribute("role","listbox"),i.resultsContainer.setAttribute("aria-label","Search results")}function k(u){let p=u.target.value.trim();i.debounceTimer&&clearTimeout(i.debounceTimer),i.debounceTimer=setTimeout(function(){if(i.query=p,p.length<s.minQueryLength){_();return}i.results=M(p),i.activeIndex=-1,q(),H(),typeof s.onSearch=="function"&&a("onSearch",s.onSearch,p,i.results)},s.debounceMs)}function O(u){if(!i.isOpen){u.key==="ArrowDown"&&i.query.length>=s.minQueryLength&&(u.preventDefault(),i.results=M(i.query),q(),H());return}switch(u.key){case"ArrowDown":u.preventDefault(),F(1);break;case"ArrowUp":u.preventDefault(),F(-1);break;case"Enter":u.preventDefault(),i.activeIndex>=0?z(i.activeIndex):i.results.length>0&&z(0);break;case"Escape":u.preventDefault(),_();break;case"Tab":_();break}}function M(u){let p=u.toLowerCase().split(/\s+/).filter(function(g){return g.length>0}),m=[];return i.index.forEach(function(g){let b=0,E=g.title.toLowerCase(),T=g.category.toLowerCase(),x=g.content.toLowerCase();p.forEach(function(A){E.includes(A)&&(b+=100,E===A?b+=50:E.startsWith(A)&&(b+=25)),T.includes(A)&&(b+=50),g.keywords.some(function(I){return I.includes(A)})&&(b+=30),x.includes(A)&&(b+=10)}),b>0&&m.push({id:g.id,title:g.title,category:g.category,categorySlug:g.categorySlug,content:g.content,url:g.url,icon:g.icon,score:b})}),m.sort(function(g,b){return b.score-g.score}),m.slice(0,s.maxResults)}function q(){if(i.results.length===0){o($());return}let u='<ul class="vd-doc-search-results-list" role="listbox">';i.results.forEach(function(p,m){let g=m===i.activeIndex,b=p.icon||Y(p.categorySlug),E=G(p.content,i.query);u+='<li class="vd-doc-search-result'+(g?" is-active":"")+'" role="option" id="vd-doc-search-result-'+m+'" data-index="'+m+'" data-category="'+D(p.categorySlug)+'" aria-selected="'+g+'"><div class="vd-doc-search-result-icon"><i class="ph '+D(b)+'"></i></div><div class="vd-doc-search-result-content"><div class="vd-doc-search-result-title">'+N(p.title,i.query)+'</div><div class="vd-doc-search-result-category">'+D(p.category)+'</div><div class="vd-doc-search-result-excerpt">'+N(E,i.query)+"</div></div></li>"}),u+="</ul>",u+=U(),o(u)}function $(){return'<div class="vd-doc-search-empty"><div class="vd-doc-search-empty-icon"><i class="ph ph-magnifying-glass"></i></div><div class="vd-doc-search-empty-title">'+D(s.emptyTitle)+'</div><div class="vd-doc-search-empty-text">'+D(s.emptyText)+"</div></div>"}function U(){return'<div class="vd-doc-search-footer"><span class="vd-doc-search-footer-item"><kbd>\u2191</kbd><kbd>\u2193</kbd> to navigate</span><span class="vd-doc-search-footer-item"><kbd>\u21B5</kbd> to select</span><span class="vd-doc-search-footer-item"><kbd>esc</kbd> to close</span></div>'}function Y(u){return s.categoryIcons[u]||s.categoryIcons.default||"ph-file-text"}function G(u,p){let m=p.toLowerCase().split(/\s+/),g=u.toLowerCase(),b=100,E=-1;for(let C=0;C<m.length;C++){let I=g.indexOf(m[C]);I!==-1&&(E===-1||I<E)&&(E=I)}if(E===-1)return u.substring(0,b)+"...";let T=Math.max(0,E-30),x=Math.min(u.length,E+b),A=u.substring(T,x);return T>0&&(A="..."+A),x<u.length&&(A=A+"..."),A}function N(u,p){if(!p)return D(u);let m=p.toLowerCase().split(/\s+/).filter(function(b){return b.length>0}),g=D(u);return m.forEach(function(b){if(b.length>50)return;let E=new RegExp("("+b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")","gi");g=g.replace(E,"<"+s.highlightTag+">$1</"+s.highlightTag+">")}),g}function D(u){let p=document.createElement("div");return p.textContent=u,p.innerHTML}function F(u){let p=i.activeIndex+u;p<0?p=i.results.length-1:p>=i.results.length&&(p=0),W(p)}function W(u){let p=i.resultsContainer.querySelector(".vd-doc-search-result.is-active");p&&(p.classList.remove("is-active"),p.setAttribute("aria-selected","false")),i.activeIndex=u;let m=i.resultsContainer.querySelector('[data-index="'+u+'"]');m&&(m.classList.add("is-active"),m.setAttribute("aria-selected","true"),i.input.setAttribute("aria-activedescendant","vd-doc-search-result-"+u),m.scrollIntoView({block:"nearest"}))}function z(u){let p=i.results[u];if(!p)return;if(_(),i.input.value="",i.query="",typeof s.onSelect=="function"){a("onSelect",s.onSelect,p);return}let m=document.querySelector(p.url);m&&(m.scrollIntoView({behavior:"smooth",block:"start"}),window.history.pushState(null,"",p.url),K(p.id))}function K(u){document.querySelectorAll(s.navSelector).forEach(function(m){m.classList.remove("active"),m.getAttribute("href")==="#"+u&&m.classList.add("active")})}function H(){i.isOpen||(i.isOpen=!0,i.resultsContainer.classList.add("is-open"),i.input.setAttribute("aria-expanded","true"),typeof s.onOpen=="function"&&a("onOpen",s.onOpen))}function _(){i.isOpen&&(i.isOpen=!1,i.activeIndex=-1,i.resultsContainer.classList.remove("is-open"),i.input.setAttribute("aria-expanded","false"),i.input.removeAttribute("aria-activedescendant"),typeof s.onClose=="function"&&a("onClose",s.onClose))}function X(){y(),i.initialized=!1,i.index=[],i.results=[],i.isOpen=!1,i.query="",i.debounceTimer&&clearTimeout(i.debounceTimer),i.resultsContainer&&o("")}function j(){c()}function Q(u){Object.assign(s,u)}function Z(){return Object.assign({},s)}function J(){return i.index.slice()}let V={init:r,destroy:X,rebuild:j,search:M,open:H,close:_,setConfig:Q,getConfig:Z,getIndex:J};return V}let t={create:function(n){let s=e(n);return s&&s.init(),s||null},_instance:null,config:Object.assign({},d),init:function(n){return this._instance&&this._instance.destroy(),n&&Object.assign(this.config,n),this._instance=e(this.config),this._instance?this._instance.init():null},destroy:function(){this._instance&&(this._instance.destroy(),this._instance=null)},destroyAll:function(){this.destroy()},rebuild:function(){this._instance&&this._instance.rebuild()},search:function(n){return this._instance?this._instance.search(n):[]},open:function(){this._instance&&this._instance.open()},close:function(){this._instance&&this._instance.close()}};typeof window.Vanduo<"u"&&window.Vanduo.register("docSearch",t),window.Search=t,window.DocSearch=t,window.VanduoDocSearch=t})();(function(){"use strict";let d={instances:new Map,currentDrag:null,touchState:null,feedbackElement:null,init:function(){document.querySelectorAll(".vd-draggable, [data-draggable]").forEach(s=>{this.instances.has(s)||this.initDraggable(s)}),document.querySelectorAll(".vd-draggable-container, .vd-draggable-container-vertical").forEach(s=>{this.instances.has(s)||this.initContainer(s)}),document.querySelectorAll(".vd-drop-zone").forEach(s=>{this.instances.has(s)||this.initDropZone(s)}),this.createFeedbackElement()},initDraggable:function(e){let t=[];e.hasAttribute("draggable")||e.setAttribute("draggable","true"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.setAttribute("role","option"),e.setAttribute("aria-roledescription","draggable item"),e.setAttribute("aria-grabbed","false");let n=h=>{this.handleDragStart(h,e)};e.addEventListener("dragstart",n),t.push(()=>e.removeEventListener("dragstart",n));let s=h=>{this.handleDrag(h,e)};e.addEventListener("drag",s),t.push(()=>e.removeEventListener("drag",s));let i=h=>{this.handleDragEnd(h,e)};e.addEventListener("dragend",i),t.push(()=>e.removeEventListener("dragend",i));let a=h=>{this.handleTouchStart(h,e)};e.addEventListener("touchstart",a),t.push(()=>e.removeEventListener("touchstart",a));let o=h=>{this.handleTouchMove(h,e)};e.addEventListener("touchmove",o),t.push(()=>e.removeEventListener("touchmove",o));let r=h=>{this.handleTouchEnd(h,e)};e.addEventListener("touchend",r),t.push(()=>e.removeEventListener("touchend",r));let c=h=>{this.handleTouchEnd(h,e)};e.addEventListener("touchcancel",c),t.push(()=>e.removeEventListener("touchcancel",c));let l=h=>{this.handleKeydown(h,e)};e.addEventListener("keydown",l),t.push(()=>e.removeEventListener("keydown",l)),this.instances.set(e,{cleanup:t})},initContainer:function(e){e.setAttribute("role","listbox"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Draggable items"),e.querySelectorAll(".vd-draggable-item").forEach(o=>{this.instances.has(o)||this.initDraggable(o)});let n=[],s=o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},i=o=>{if(o.preventDefault(),o.dataTransfer.dropEffect="move",!this.currentDrag)return;let r=this.currentDrag.element;e.contains(r)&&(o.clientX===0&&o.clientY===0||this.handleReorder(e,r,o.clientX,o.clientY))},a=o=>{o.preventDefault()};e.addEventListener("dragenter",s),e.addEventListener("dragover",i),e.addEventListener("drop",a),n.push(()=>{e.removeEventListener("dragenter",s),e.removeEventListener("dragover",i),e.removeEventListener("drop",a)}),this.instances.set(e,{cleanup:n})},initDropZone:function(e){let t=[];e.setAttribute("role","region"),e.setAttribute("aria-dropeffect","move"),e.hasAttribute("aria-label")||e.setAttribute("aria-label","Drop zone");let n=o=>{o.preventDefault(),this.handleDragOver(o,e)};e.addEventListener("dragover",n),t.push(()=>e.removeEventListener("dragover",n));let s=o=>{o.preventDefault(),this.handleDragEnter(o,e)};e.addEventListener("dragenter",s),t.push(()=>e.removeEventListener("dragenter",s));let i=o=>{this.handleDragLeave(o,e)};e.addEventListener("dragleave",i),t.push(()=>e.removeEventListener("dragleave",i));let a=o=>{o.preventDefault(),this.handleDrop(o,e)};e.addEventListener("drop",a),t.push(()=>e.removeEventListener("drop",a)),this.instances.set(e,{cleanup:t})},createFeedbackElement:function(){if(!this.feedbackElement){let e=document.querySelector(".vd-drag-feedback");if(e){this.feedbackElement=e;return}this.feedbackElement=document.createElement("div"),this.feedbackElement.className="vd-drag-feedback hidden",this.feedbackElement.setAttribute("role","presentation"),document.body.appendChild(this.feedbackElement)}},handleDragStart:function(e,t){t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:e.clientX,y:e.clientY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",this.currentDrag.data),t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY}}}))},handleDrag:function(e,t){this.currentDrag&&t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-this.currentDrag.initialPosition.x,y:e.clientY-this.currentDrag.initialPosition.y}}}))},handleDragEnd:function(e,t){t.classList.remove("is-dragging"),t.classList.add("is-dropped"),setTimeout(()=>t.classList.remove("is-dropped"),300),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=this.currentDrag?.data||this.getData(t),s=this.currentDrag?.initialPosition||{x:0,y:0};t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:n,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-s.x,y:e.clientY-s.y}}})),this.currentDrag=null},handleTouchStart:function(e,t){let n=e.touches[0];this.touchState={element:t,startX:n.clientX,startY:n.clientY,startTime:Date.now(),isDragging:!1}},handleTouchMove:function(e,t){if(!this.touchState)return;let n=e.touches[0],s=n.clientX-this.touchState.startX,i=n.clientY-this.touchState.startY;if((Math.abs(s)>10||Math.abs(i)>10)&&(e.preventDefault(),this.touchState.isDragging||(this.touchState.isDragging=!0,t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:this.touchState.startX,y:this.touchState.startY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY}}}))),this.updateFeedback(n.clientX,n.clientY),this.currentDrag)){t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY},delta:{x:s,y:i}}}));let a=t.closest(".vd-draggable-container");a&&a.contains(t)&&this.handleReorder(a,t,n.clientX,n.clientY)}},handleTouchEnd:function(e,t){if(this.touchState&&this.touchState.isDragging){e.preventDefault(),t.classList.remove("is-dragging"),t.classList.add("is-dropped"),t.setAttribute("aria-grabbed","false"),setTimeout(()=>t.classList.remove("is-dropped"),300),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=e.changedTouches[0],s=this.currentDrag?.data||this.getData(t),i=this.touchState?.startX||0,a=this.touchState?.startY||0;t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:s,position:{x:n.clientX,y:n.clientY},delta:{x:n.clientX-i,y:n.clientY-a}}}))}this.touchState=null,this.currentDrag=null},handleDragOver:function(e,t){e.preventDefault(),e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){e.preventDefault(),t.classList.add("is-drag-over")},handleDragLeave:function(e,t){t.classList.remove("is-drag-over")},handleDrop:function(e,t){e.preventDefault(),t.classList.remove("is-drag-over"),t.dispatchEvent(new CustomEvent("draggable:drop",{bubbles:!0,detail:{zone:t,element:this.currentDrag?.element,data:this.currentDrag?.data,position:{x:e.clientX,y:e.clientY}}}))},handleReorder:function(e,t,n,s){let i=e.classList.contains("vd-draggable-container-vertical"),o=[...e.querySelectorAll(".vd-draggable-item:not(.is-dragging), .vd-draggable:not(.is-dragging)")].reduce((r,c)=>{let l=c.getBoundingClientRect(),h=i?s-l.top-l.height/2:n-l.left-l.width/2;return h<0&&h>r.offset?{offset:h,element:c}:r},{offset:Number.NEGATIVE_INFINITY}).element;o==null?e.appendChild(t):e.insertBefore(t,o)},handleKeydown:function(e,t){switch(e.key){case"Enter":case" ":e.preventDefault(),t.click();break;case"Escape":t.classList.contains("is-dragging")&&(t.classList.remove("is-dragging"),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden"),this.currentDrag=null);break;case"ArrowUp":case"ArrowLeft":{e.preventDefault();let n=t.previousElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(t,n),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"up"}})));break}case"ArrowDown":case"ArrowRight":{e.preventDefault();let n=t.nextElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(n,t),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"down"}})));break}}},getData:function(e){return e.dataset.draggable||e.textContent.trim()},updateFeedback:function(e,t){if(!this.currentDrag)return;this.feedbackElement.classList.remove("hidden");let n=this.currentDrag.initialBounds;this.feedbackElement.innerHTML="";let s=this.currentDrag.element.cloneNode(!0);this.feedbackElement.appendChild(s),Object.assign(this.feedbackElement.style,{left:e-20+"px",top:t-20+"px",width:n.width+"px",height:n.height+"px"})},makeDraggable:function(e,t={}){let n=typeof e=="string"?document.querySelector(e):e;n&&!this.instances.has(n)&&(n.classList.add("vd-draggable"),n.setAttribute("draggable","true"),t.data&&(n.dataset.draggable=t.data),this.initDraggable(n))},removeDraggable:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.instances.has(t)&&(this.instances.get(t).cleanup.forEach(s=>s()),this.instances.delete(t),t.classList.remove("vd-draggable"),t.removeAttribute("draggable"),t.removeAttribute("data-draggable"))},destroy:function(e){this.removeDraggable(e)},destroyAll:function(){Array.from(this.instances.keys()).forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("draggable",d),window.VanduoDraggable=d})();(function(){"use strict";let d=new Map;function e(r){try{return new URL(r,window.location.href).origin===window.location.origin}catch{return!1}}function t(r,c){let h=new DOMParser().parseFromString(c.trim(),"text/html"),f=["SCRIPT","IFRAME","OBJECT","EMBED","FORM","BASE","LINK","META","STYLE"];for(let v of f){let y=h.querySelectorAll(v);for(let S=y.length-1;S>=0;S--)y[S].parentNode.removeChild(y[S])}function w(v){if(v.nodeType===Node.ELEMENT_NODE){let y=v.attributes;for(let k=y.length-1;k>=0;k--){let O=y[k].name.toLowerCase(),q=y[k].value.toLowerCase().trim();(O.startsWith("on")||q.startsWith("javascript:")||q.startsWith("data:")||q.startsWith("vbscript:"))&&v.removeAttribute(y[k].name)}let S=v.childNodes;for(let k=0;k<S.length;k++)w(S[k])}}w(h.body);let L=Array.from(h.body.childNodes);for(;r.firstChild;)r.removeChild(r.firstChild);L.forEach(function(v){r.appendChild(document.adoptNode(v))})}function n(){return'<div class="vd-skeleton-card" style="position:relative;min-height:200px;padding:2rem;overflow:hidden;"><div class="vd-skeleton vd-skeleton-heading-lg" style="margin-bottom:1.5rem;"></div><div class="vd-skeleton vd-skeleton-paragraph"><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div></div><div class="vd-dynamic-loader" style="position:absolute;inset:0;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div></div>'}function s(){return'<div class="vd-dynamic-loader" style="min-height:180px;display:flex;align-items:center;justify-content:center;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div>'}function i(r){return!r||r==="skeleton"?n():r==="spinner"?s():r}function a(r,c,l){r.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:l||{}}))}let o={observe:function(r,c,l){if(!(r instanceof Element)){console.warn("[VanduoLazyLoad] observe() requires a DOM Element.");return}if(typeof c!="function"){console.warn("[VanduoLazyLoad] observe() requires a callback function.");return}if(d.has(r))return;let h=l&&l.threshold!=null?l.threshold:0,f=l&&l.rootMargin?l.rootMargin:"0px",w=new IntersectionObserver(function(L,v){L.forEach(function(y){if(y.isIntersecting){v.unobserve(y.target),d.delete(y.target);try{c(y.target)}catch(S){console.error("[VanduoLazyLoad] Callback threw:",S)}}})},{threshold:h,rootMargin:f});d.set(r,w),w.observe(r)},unobserve:function(r){let c=d.get(r);c&&(c.unobserve(r),d.delete(r))},unobserveAll:function(){d.forEach(function(r,c){r.unobserve(c)}),d.clear()},loadSection:function(r,c,l){if(typeof r!="string"||!r){console.warn("[VanduoLazyLoad] loadSection() requires a non-empty URL string.");return}if(!(c instanceof Element)){console.warn("[VanduoLazyLoad] loadSection() requires a DOM Element as containerEl.");return}if(!e(r)){console.error("[VanduoLazyLoad] loadSection() blocked cross-origin URL:",r);return}let h=l||{},f=i(h.placeholder);t(c,f),a(c,"lazysection:loading",{url:r}),this.observe(c,function(){let w=new window.AbortController,L=setTimeout(function(){w.abort()},1e4);window.fetch(r,{signal:w.signal}).then(function(v){if(clearTimeout(L),!v.ok)throw new Error("HTTP "+v.status);return v.text()}).then(function(v){t(c,v),a(c,"lazysection:loaded",{url:r}),typeof window.Vanduo<"u"&&window.Vanduo.init(),typeof h.onLoaded=="function"&&h.onLoaded(c)}).catch(function(v){let y=document.createElement("div");y.className="vd-alert vd-alert-error",y.setAttribute("role","alert");let S=document.createElement("span");S.textContent="Failed to load content. ";let k=document.createElement("small");for(k.style.opacity="0.7",k.textContent=v.message,y.appendChild(S),y.appendChild(k);c.firstChild;)c.removeChild(c.firstChild);c.appendChild(y),a(c,"lazysection:error",{url:r,error:v}),console.error("[VanduoLazyLoad] loadSection failed:",v),typeof h.onError=="function"&&h.onError(v)})},{threshold:h.threshold,rootMargin:h.rootMargin})},init:function(){let r=this;document.querySelectorAll("[data-vd-lazy]").forEach(function(l){if(d.has(l)||l.dataset.vdLazyState==="loading"||l.dataset.vdLazyState==="loaded")return;let h=l.getAttribute("data-vd-lazy");if(!h)return;l.dataset.vdLazyState="loading";let f=l.getAttribute("data-vd-lazy-placeholder")||"skeleton";r.loadSection(h,l,{placeholder:f,onLoaded:function(){l.dataset.vdLazyState="loaded"},onError:function(){l.dataset.vdLazyState="error"}})})}};typeof window.Vanduo<"u"&&window.Vanduo.register("LazyLoad",o),window.VanduoLazyLoad=o})();var B=window.Vanduo;var oe=B;
|
|
47
|
+
`},isUsingDefaultPrimary:function(){return this.state.primary===this.DEFAULTS.PRIMARY_LIGHT||this.state.primary===this.DEFAULTS.PRIMARY_DARK},bindEvents:function(){if(this.elements.trigger&&this.addListener(this.elements.trigger,"click",e=>{e.preventDefault(),e.stopPropagation(),this.toggle()}),this.bindPanelEvents(),window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{if(this.state.theme==="system"&&this.isUsingDefaultPrimary()){let n=this.getDefaultPrimary("system");n!==this.state.primary&&(this.applyPrimary(n),this.updateUI())}};e.addEventListener("change",t),this._cleanup.push(()=>e.removeEventListener("change",t))}this.addListener(document,"click",e=>{this.state.isOpen&&this.elements.customizer&&!this.elements.customizer.contains(e.target)&&this.close()}),this.addListener(document,"keydown",e=>{e.key==="Escape"&&this.state.isOpen&&this.close()})},toggle:function(){this.state.isOpen?this.close():this.open()},open:function(){this.state.isOpen=!0,this.positionPanel(),this.elements.panel&&this.elements.panel.classList.add("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","true"),this.elements.overlay&&this.elements.overlay.classList.add("is-active"),this.dispatchEvent("panel-open",{isOpen:!0})},close:function(){this.state.isOpen=!1,this.elements.panel&&this.elements.panel.classList.remove("is-open"),this.elements.trigger&&this.elements.trigger.setAttribute("aria-expanded","false"),this.elements.overlay&&this.elements.overlay.classList.remove("is-active"),this.dispatchEvent("panel-close",{isOpen:!1})},updateUI:function(){if(!this.elements.panel)return;this.elements.panel.querySelectorAll("[data-color]").forEach(t=>{t.classList.toggle("is-active",t.dataset.color===this.state.primary)}),this.elements.panel.querySelectorAll("[data-neutral]").forEach(t=>{t.classList.toggle("is-active",t.dataset.neutral===this.state.neutral)}),this.elements.panel.querySelectorAll("[data-radius]").forEach(t=>{t.classList.toggle("is-active",t.dataset.radius===this.state.radius)});let e=this.elements.panel.querySelector("[data-customizer-font]");e&&(e.value=this.state.font),this.elements.panel.querySelectorAll("[data-mode]").forEach(t=>{t.classList.toggle("is-active",t.dataset.mode===this.state.theme)})},reset:function(){this.applyTheme(this.DEFAULTS.THEME),this.applyPrimary(this.getDefaultPrimary(this.DEFAULTS.THEME)),this.applyNeutral(this.DEFAULTS.NEUTRAL),this.applyRadius(this.DEFAULTS.RADIUS),this.applyFont(this.DEFAULTS.FONT),this.applyTheme(this.DEFAULTS.THEME),this.updateUI(),this.dispatchEvent("reset",{state:{...this.state}})},getState:function(){return{...this.state}},setPreferences:function(e){e.primary&&this.applyPrimary(e.primary),e.neutral&&this.applyNeutral(e.neutral),e.radius&&this.applyRadius(e.radius),e.font&&this.applyFont(e.font),e.theme&&this.applyTheme(e.theme),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},destroyAll:function(){this._cleanup.forEach(e=>e()),this._cleanup=[],this.elements.panel&&this.elements.panel.removeAttribute("data-customizer-initialized"),this.close(),this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeCustomizer",d),window.ThemeCustomizer=d})();(function(){"use strict";let d={isInitialized:!1,_mediaQuery:null,_onMediaChange:null,init:function(){if(this.STORAGE_KEY="vanduo-theme-preference",this.state={preference:this.getPreference()},this.isInitialized){this.applyTheme(),this.renderUI(),this.updateUI();return}this.isInitialized=!0,this.applyTheme(),this.listenForSystemChanges(),this.renderUI(),console.log("Vanduo Theme Switcher initialized")},getPreference:function(){return this.getStorageValue(this.STORAGE_KEY,"system")},setPreference:function(e){this.state.preference=e,this.setStorageValue(this.STORAGE_KEY,e),this.applyTheme(),this.updateUI()},getStorageValue:function(e,t){if(typeof window.safeStorageGet=="function")return window.safeStorageGet(e,t);try{let n=localStorage.getItem(e);return n!==null?n:t}catch{return t}},setStorageValue:function(e,t){if(typeof window.safeStorageSet=="function")return window.safeStorageSet(e,t);try{return localStorage.setItem(e,t),!0}catch{return!1}},applyTheme:function(){let e=this.state.preference;e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)},listenForSystemChanges:function(){this._mediaQuery&&this._onMediaChange||(this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this._onMediaChange=e=>{this.state.preference==="system"&&this.applyTheme()},this._mediaQuery.addEventListener("change",this._onMediaChange))},renderUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.getAttribute("data-theme-initialized")==="true"){t.tagName==="SELECT"&&(t.value=this.state.preference);return}if(t.tagName==="SELECT"){t.value=this.state.preference;let n=s=>{this.setPreference(s.target.value)};t.addEventListener("change",n),t._themeToggleHandler=n}else{let n=()=>{let s=["system","light","dark"],i=(s.indexOf(this.state.preference)+1)%s.length;this.setPreference(s[i])};t.addEventListener("click",n),t._themeToggleHandler=n}t.setAttribute("data-theme-initialized","true")})},updateUI:function(){document.querySelectorAll('[data-toggle="theme"]').forEach(t=>{if(t.tagName==="SELECT")t.value=this.state.preference;else{let n=t.querySelector(".theme-current-label");n&&(n.textContent=this.state.preference.charAt(0).toUpperCase()+this.state.preference.slice(1))}})},destroyAll:function(){document.querySelectorAll('[data-toggle="theme"][data-theme-initialized="true"]').forEach(t=>{if(t._themeToggleHandler){let n=t.tagName==="SELECT"?"change":"click";t.removeEventListener(n,t._themeToggleHandler),delete t._themeToggleHandler}t.removeAttribute("data-theme-initialized")}),this._mediaQuery&&this._onMediaChange&&this._mediaQuery.removeEventListener("change",this._onMediaChange),this._mediaQuery=null,this._onMediaChange=null,this.isInitialized=!1}};window.Vanduo&&window.Vanduo.register("themeSwitcher",d)})();(function(){"use strict";let d={defaults:{position:"top-right",duration:5e3,dismissible:!0,showProgress:!0,pauseOnHover:!0},containers:{},getContainer:function(e){if(this.containers[e])return this.containers[e];let t=document.createElement("div");return t.className=`vd-toast-container vd-toast-container-${e}`,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","false"),document.body.appendChild(t),this.containers[e]=t,t},show:function(e,t,n){typeof e=="string"&&(e={message:e,type:t,duration:n});let s=Object.assign({},this.defaults,e),i=this.getContainer(s.position),a=document.createElement("div");a.className="vd-toast",s.type&&a.classList.add(`vd-toast-${s.type}`),s.solid&&a.classList.add("vd-toast-solid"),s.showProgress&&s.duration>0&&a.classList.add("vd-toast-with-progress");let o="";if(s.icon){let v=typeof sanitizeHtml=="function"?sanitizeHtml(s.icon):escapeHtml(s.icon);o+=`<span class="vd-toast-icon">${v}</span>`}else s.type&&(o+=`<span class="vd-toast-icon">${this.getDefaultIcon(s.type)}</span>`);let r=typeof escapeHtml=="function"?escapeHtml:function(v){let y=document.createElement("div");return y.appendChild(document.createTextNode(v)),y.innerHTML};if(o+='<div class="vd-toast-content">',s.title&&(o+=`<div class="vd-toast-title">${r(String(s.title))}</div>`),s.message&&(o+=`<div class="vd-toast-message">${r(String(s.message))}</div>`),o+="</div>",s.dismissible&&(o+='<button type="button" class="vd-toast-close" aria-label="Close"></button>'),s.showProgress&&s.duration>0){let v=parseInt(s.duration,10)||0;o+=`<div class="vd-toast-progress" style="animation-duration: ${v}ms"></div>`}if(a.innerHTML=o,i.appendChild(a),a._toastCleanup=[],s.dismissible){let v=a.querySelector(".vd-toast-close"),y=()=>{this.dismiss(a)};v.addEventListener("click",y),a._toastCleanup.push(()=>v.removeEventListener("click",y))}let c=null,l=s.duration,h=null,f=()=>{if(s.duration>0){h=Date.now(),c=setTimeout(()=>{this.dismiss(a)},l),a._toastTimeoutId=c;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="running")}},w=()=>{if(c){clearTimeout(c),c=null,a._toastTimeoutId=null,l-=Date.now()-h;let v=a.querySelector(".vd-toast-progress");v&&(v.style.animationPlayState="paused")}};s.pauseOnHover&&(a.addEventListener("mouseenter",w),a.addEventListener("mouseleave",f),a._toastCleanup.push(()=>a.removeEventListener("mouseenter",w),()=>a.removeEventListener("mouseleave",f))),requestAnimationFrame(()=>{a.classList.add("is-visible"),f()}),a._toastConfig=s;let L=new CustomEvent("toast:show",{bubbles:!0,detail:{toast:a,config:s}});return a.dispatchEvent(L),a},dismiss:function(e){if(!e||e.classList.contains("is-exiting"))return;e._toastTimeoutId&&(clearTimeout(e._toastTimeoutId),e._toastTimeoutId=null),e.classList.remove("is-visible"),e.classList.add("is-exiting");let t=new CustomEvent("toast:dismiss",{bubbles:!0,detail:{toast:e}});e.dispatchEvent(t);let n=()=>{e.removeEventListener("transitionend",n),e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)};e.addEventListener("transitionend",n),setTimeout(()=>{e._toastCleanup&&(e._toastCleanup.forEach(s=>s()),delete e._toastCleanup),e.parentElement&&e.parentElement.removeChild(e)},400)},destroyAll:function(){Object.keys(this.containers).forEach(e=>{let t=this.containers[e];if(!t)return;t.querySelectorAll(".vd-toast").forEach(s=>{s._toastTimeoutId&&clearTimeout(s._toastTimeoutId),s._toastCleanup&&(s._toastCleanup.forEach(i=>i()),delete s._toastCleanup),s.parentElement&&s.parentElement.removeChild(s)}),t.parentElement&&t.parentElement.removeChild(t)}),this.containers={}},dismissAll:function(e){e&&this.containers[e]?this.containers[e].querySelectorAll(".vd-toast").forEach(n=>this.dismiss(n)):Object.values(this.containers).forEach(t=>{t.querySelectorAll(".vd-toast").forEach(s=>this.dismiss(s))})},getDefaultIcon:function(e){return{success:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'}[e]||""},success:function(e,t){return this.show(Object.assign({message:e,type:"success"},t))},error:function(e,t){return this.show(Object.assign({message:e,type:"error"},t))},warning:function(e,t){return this.show(Object.assign({message:e,type:"warning"},t))},info:function(e,t){return this.show(Object.assign({message:e,type:"info"},t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("toast",d),window.Toast=d})();(function(){"use strict";let d={tooltips:new Map,delayTimers:new Map,sanitizeHtml:function(e){if(typeof sanitizeHtml=="function")return sanitizeHtml(e);let t=document.createElement("div");return t.textContent=e||"",t.innerHTML},init:function(){document.querySelectorAll("[data-tooltip], [data-tooltip-html]").forEach(t=>{this.tooltips.has(t)||this.initTooltip(t)})},initTooltip:function(e){let t=this.createTooltip(e),n=[],s=()=>{this.showTooltip(e,t)},i=()=>{this.hideTooltip(e,t)},a=()=>{this.showTooltip(e,t)},o=()=>{this.hideTooltip(e,t)};e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",i),e.addEventListener("focus",a),e.addEventListener("blur",o),n.push(()=>e.removeEventListener("mouseenter",s),()=>e.removeEventListener("mouseleave",i),()=>e.removeEventListener("focus",a),()=>e.removeEventListener("blur",o)),this.tooltips.set(e,{tooltip:t,cleanup:n})},createTooltip:function(e){let t=document.createElement("div");t.className="vd-tooltip",t.setAttribute("role","tooltip"),t.setAttribute("aria-hidden","true");let n="tooltip-"+Math.random().toString(36).substr(2,9);t.id=n,e.setAttribute("aria-describedby",n);let s=e.dataset.tooltipHtml,i=e.dataset.tooltip;s?(t.innerHTML=this.sanitizeHtml(s),t.classList.add("vd-tooltip-html")):i&&(t.textContent=i);let a=e.dataset.tooltipPlacement||e.dataset.placement||"top";t.setAttribute("data-placement",a),t.classList.add(`vd-tooltip-${a}`),e.dataset.tooltipVariant&&t.classList.add(`vd-tooltip-${e.dataset.tooltipVariant}`),e.dataset.tooltipSize&&t.classList.add(`vd-tooltip-${e.dataset.tooltipSize}`);let o=parseInt(e.dataset.tooltipDelay)||0;return t.dataset.delay=o,document.body.appendChild(t),t},showTooltip:function(e,t){let n=parseInt(t.dataset.delay)||0;if(n>0){let s=setTimeout(()=>{this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},n);this.delayTimers.set(e,s)}else this.positionTooltip(e,t),t.classList.add("is-visible"),t.setAttribute("aria-hidden","false")},hideTooltip:function(e,t){let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.classList.remove("is-visible"),t.setAttribute("aria-hidden","true")},positionTooltip:function(e,t){let n=t.dataset.placement||"top",s=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,r=0,c=0;switch(n){case"top":r=s.top+a-i.height-8,c=s.left+o+s.width/2-i.width/2;break;case"bottom":r=s.bottom+a+8,c=s.left+o+s.width/2-i.width/2;break;case"left":r=s.top+a+s.height/2-i.height/2,c=s.left+o-i.width-8;break;case"right":r=s.top+a+s.height/2-i.height/2,c=s.right+o+8;break}let l=window.innerWidth,h=window.innerHeight,f=8;c<f?c=f:c+i.width>l-f&&(c=l-i.width-f),r<a+f?r=a+f:r+i.height>a+h-f&&(r=a+h-i.height-f),t.style.cssText=`position: absolute; top: 0; left: 0; transform: translate(${c}px, ${r}px);`},show:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.showTooltip(t,n)}},hide:function(e){let t=typeof e=="string"?document.querySelector(e):e;if(t&&this.tooltips.has(t)){let{tooltip:n}=this.tooltips.get(t);this.hideTooltip(t,n)}},update:function(e,t,n=!1){let s=typeof e=="string"?document.querySelector(e):e;if(s&&this.tooltips.has(s)){let{tooltip:i}=this.tooltips.get(s);n?(i.innerHTML=this.sanitizeHtml(t),i.classList.add("vd-tooltip-html")):(i.textContent=t,i.classList.remove("vd-tooltip-html"))}},destroy:function(e){let t=this.tooltips.get(e);if(!t)return;let n=this.delayTimers.get(e);n&&(clearTimeout(n),this.delayTimers.delete(e)),t.cleanup.forEach(s=>s()),t.tooltip&&t.tooltip.parentNode&&t.tooltip.parentNode.removeChild(t.tooltip),this.tooltips.delete(e)},destroyAll:function(){this.tooltips.forEach((e,t)=>{this.destroy(t)})}};typeof window.Vanduo<"u"&&window.Vanduo.register("tooltips",d),window.VanduoTooltips=d})();(function(){"use strict";let d={minQueryLength:2,maxResults:10,debounceMs:150,highlightTag:"mark",keyboardShortcut:!0,containerSelector:".vd-doc-search",inputSelector:".vd-doc-search-input",resultsSelector:".vd-doc-search-results",contentSelector:".doc-content section[id]",titleSelector:".demo-title, h2, h3",navSelector:".doc-nav-link",sectionSelector:".doc-nav-section",excludeFromContent:"pre, code, script, style",maxContentLength:500,data:null,categoryIcons:{"getting-started":"ph-rocket-launch",core:"ph-cube",components:"ph-puzzle-piece",interactive:"ph-cursor-click","data-display":"ph-table",feedback:"ph-bell",meta:"ph-info",default:"ph-file-text"},onSelect:null,onSearch:null,onOpen:null,onClose:null,emptyTitle:"No results found",emptyText:"Try different keywords or check spelling",placeholder:"Search..."};function e(n){let s=Object.assign({},d,n||{}),i={initialized:!1,index:[],results:[],activeIndex:-1,isOpen:!1,query:"",container:null,input:null,resultsContainer:null,debounceTimer:null,boundHandlers:{}};function a(u,p,...m){try{p(...m)}catch(g){console.warn('[Vanduo Search] Callback error in "'+u+'":',g)}}function o(u){if(i.resultsContainer)try{i.resultsContainer.innerHTML=u}catch(p){console.warn("[Vanduo Search] Failed to render results:",p)}}function r(){return i.initialized?V:(i.container=document.querySelector(s.containerSelector),!i.container||(i.input=i.container.querySelector(s.inputSelector),i.resultsContainer=i.container.querySelector(s.resultsSelector),!i.input||!i.resultsContainer)?(i.initialized=!1,null):(s.placeholder&&i.input.setAttribute("placeholder",s.placeholder),c(),v(),S(),i.initialized=!0,V))}function c(){if(i.index=[],s.data&&Array.isArray(s.data)){s.data.forEach(function(m){i.index.push({id:m.id||L(m.title),title:m.title||"",category:m.category||"",categorySlug:L(m.category||""),content:m.content||"",keywords:m.keywords||w(m.title+" "+m.content),url:m.url||"#"+(m.id||L(m.title)),icon:m.icon||""})});return}let u=document.querySelectorAll(s.contentSelector),p=l();u.forEach(function(m){let g=m.id;if(!g)return;let b=m.querySelector(s.titleSelector),E=b?b.textContent.replace(/v[\d.]+/g,"").trim():g,T=p[g]||"Documentation",x=h(m),A=f(m,E),C=b?b.querySelector("i.ph"):null,I="";if(C&&C.classList){for(let P=0;P<C.classList.length;P++)if(C.classList[P].indexOf("ph-")===0){I=C.classList[P];break}}i.index.push({id:g,title:E,category:T,categorySlug:L(T),content:x,keywords:A,url:"#"+g,icon:I})})}function l(){let u={},p="Documentation";return document.querySelectorAll(s.navSelector+", "+s.sectionSelector).forEach(function(g){if(g.classList.contains("doc-nav-section"))p=g.textContent.trim();else{let b=g.getAttribute("href");if(b&&b.startsWith("#")){let E=b.substring(1);u[E]=p}}}),u}function h(u){let p=u.cloneNode(!0);p.querySelectorAll(s.excludeFromContent).forEach(function(b){b.remove()});let g=p.textContent||"";return g=g.replace(/\s+/g," ").trim(),g.substring(0,s.maxContentLength)}function f(u,p){let m=[];return p.toLowerCase().split(/\s+/).forEach(function(E){E.length>2&&m.push(E)}),u.querySelectorAll("code").forEach(function(E){let x=(E.textContent||"").match(/\.([\w-]+)/g);x&&x.forEach(function(A){m.push(A.substring(1).toLowerCase())})}),u.querySelectorAll("[data-tooltip], [data-modal]").forEach(function(E){E.getAttributeNames().filter(function(x){return x.startsWith("data-")}).forEach(function(x){m.push(x.replace("data-",""))})}),Array.from(new Set(m))}function w(u){return u.toLowerCase().split(/\s+/).filter(function(m){return m.length>2})}function L(u){return u.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function v(){i.boundHandlers.handleInput=function(u){k(u)},i.boundHandlers.handleFocus=function(){i.query.length>=s.minQueryLength&&H()},i.boundHandlers.handleKeydown=function(u){O(u)},i.boundHandlers.handleOutsideClick=function(u){i.container.contains(u.target)||_()},i.boundHandlers.handleGlobalKeydown=function(u){s.keyboardShortcut&&(u.metaKey||u.ctrlKey)&&u.key==="k"&&(u.preventDefault(),i.input.focus(),i.input.select())},i.boundHandlers.handleResultClick=function(u){let p=u.target.closest(".vd-doc-search-result");if(p){let m=parseInt(p.dataset.index,10);z(m)}},i.input.addEventListener("input",i.boundHandlers.handleInput),i.input.addEventListener("focus",i.boundHandlers.handleFocus),i.input.addEventListener("keydown",i.boundHandlers.handleKeydown),document.addEventListener("click",i.boundHandlers.handleOutsideClick),document.addEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer.addEventListener("click",i.boundHandlers.handleResultClick)}function y(){i.input&&(i.input.removeEventListener("input",i.boundHandlers.handleInput),i.input.removeEventListener("focus",i.boundHandlers.handleFocus),i.input.removeEventListener("keydown",i.boundHandlers.handleKeydown)),document.removeEventListener("click",i.boundHandlers.handleOutsideClick),document.removeEventListener("keydown",i.boundHandlers.handleGlobalKeydown),i.resultsContainer&&i.resultsContainer.removeEventListener("click",i.boundHandlers.handleResultClick)}function S(){let u=i.resultsContainer.id||"search-results-"+Math.random().toString(36).substr(2,9);i.resultsContainer.id=u,i.input.setAttribute("role","combobox"),i.input.setAttribute("aria-autocomplete","list"),i.input.setAttribute("aria-controls",u),i.input.setAttribute("aria-expanded","false"),i.resultsContainer.setAttribute("role","listbox"),i.resultsContainer.setAttribute("aria-label","Search results")}function k(u){let p=u.target.value.trim();i.debounceTimer&&clearTimeout(i.debounceTimer),i.debounceTimer=setTimeout(function(){if(i.query=p,p.length<s.minQueryLength){_();return}i.results=M(p),i.activeIndex=-1,q(),H(),typeof s.onSearch=="function"&&a("onSearch",s.onSearch,p,i.results)},s.debounceMs)}function O(u){if(!i.isOpen){u.key==="ArrowDown"&&i.query.length>=s.minQueryLength&&(u.preventDefault(),i.results=M(i.query),q(),H());return}switch(u.key){case"ArrowDown":u.preventDefault(),F(1);break;case"ArrowUp":u.preventDefault(),F(-1);break;case"Enter":u.preventDefault(),i.activeIndex>=0?z(i.activeIndex):i.results.length>0&&z(0);break;case"Escape":u.preventDefault(),_();break;case"Tab":_();break}}function M(u){let p=u.toLowerCase().split(/\s+/).filter(function(g){return g.length>0}),m=[];return i.index.forEach(function(g){let b=0,E=g.title.toLowerCase(),T=g.category.toLowerCase(),x=g.content.toLowerCase();p.forEach(function(A){E.includes(A)&&(b+=100,E===A?b+=50:E.startsWith(A)&&(b+=25)),T.includes(A)&&(b+=50),g.keywords.some(function(I){return I.includes(A)})&&(b+=30),x.includes(A)&&(b+=10)}),b>0&&m.push({id:g.id,title:g.title,category:g.category,categorySlug:g.categorySlug,content:g.content,url:g.url,icon:g.icon,score:b})}),m.sort(function(g,b){return b.score-g.score}),m.slice(0,s.maxResults)}function q(){if(i.results.length===0){o($());return}let u='<ul class="vd-doc-search-results-list" role="listbox">';i.results.forEach(function(p,m){let g=m===i.activeIndex,b=p.icon||Y(p.categorySlug),E=G(p.content,i.query);u+='<li class="vd-doc-search-result'+(g?" is-active":"")+'" role="option" id="vd-doc-search-result-'+m+'" data-index="'+m+'" data-category="'+D(p.categorySlug)+'" aria-selected="'+g+'"><div class="vd-doc-search-result-icon"><i class="ph '+D(b)+'"></i></div><div class="vd-doc-search-result-content"><div class="vd-doc-search-result-title">'+N(p.title,i.query)+'</div><div class="vd-doc-search-result-category">'+D(p.category)+'</div><div class="vd-doc-search-result-excerpt">'+N(E,i.query)+"</div></div></li>"}),u+="</ul>",u+=U(),o(u)}function $(){return'<div class="vd-doc-search-empty"><div class="vd-doc-search-empty-icon"><i class="ph ph-magnifying-glass"></i></div><div class="vd-doc-search-empty-title">'+D(s.emptyTitle)+'</div><div class="vd-doc-search-empty-text">'+D(s.emptyText)+"</div></div>"}function U(){return'<div class="vd-doc-search-footer"><span class="vd-doc-search-footer-item"><kbd>\u2191</kbd><kbd>\u2193</kbd> to navigate</span><span class="vd-doc-search-footer-item"><kbd>\u21B5</kbd> to select</span><span class="vd-doc-search-footer-item"><kbd>esc</kbd> to close</span></div>'}function Y(u){return s.categoryIcons[u]||s.categoryIcons.default||"ph-file-text"}function G(u,p){let m=p.toLowerCase().split(/\s+/),g=u.toLowerCase(),b=100,E=-1;for(let C=0;C<m.length;C++){let I=g.indexOf(m[C]);I!==-1&&(E===-1||I<E)&&(E=I)}if(E===-1)return u.substring(0,b)+"...";let T=Math.max(0,E-30),x=Math.min(u.length,E+b),A=u.substring(T,x);return T>0&&(A="..."+A),x<u.length&&(A=A+"..."),A}function N(u,p){if(!p)return D(u);let m=p.toLowerCase().split(/\s+/).filter(function(b){return b.length>0}),g=D(u);return m.forEach(function(b){if(b.length>50)return;let E=new RegExp("("+b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")","gi");g=g.replace(E,"<"+s.highlightTag+">$1</"+s.highlightTag+">")}),g}function D(u){let p=document.createElement("div");return p.textContent=u,p.innerHTML}function F(u){let p=i.activeIndex+u;p<0?p=i.results.length-1:p>=i.results.length&&(p=0),W(p)}function W(u){let p=i.resultsContainer.querySelector(".vd-doc-search-result.is-active");p&&(p.classList.remove("is-active"),p.setAttribute("aria-selected","false")),i.activeIndex=u;let m=i.resultsContainer.querySelector('[data-index="'+u+'"]');m&&(m.classList.add("is-active"),m.setAttribute("aria-selected","true"),i.input.setAttribute("aria-activedescendant","vd-doc-search-result-"+u),m.scrollIntoView({block:"nearest"}))}function z(u){let p=i.results[u];if(!p)return;if(_(),i.input.value="",i.query="",typeof s.onSelect=="function"){a("onSelect",s.onSelect,p);return}let m=document.querySelector(p.url);m&&(m.scrollIntoView({behavior:"smooth",block:"start"}),window.history.pushState(null,"",p.url),K(p.id))}function K(u){document.querySelectorAll(s.navSelector).forEach(function(m){m.classList.remove("active"),m.getAttribute("href")==="#"+u&&m.classList.add("active")})}function H(){i.isOpen||(i.isOpen=!0,i.resultsContainer.classList.add("is-open"),i.input.setAttribute("aria-expanded","true"),typeof s.onOpen=="function"&&a("onOpen",s.onOpen))}function _(){i.isOpen&&(i.isOpen=!1,i.activeIndex=-1,i.resultsContainer.classList.remove("is-open"),i.input.setAttribute("aria-expanded","false"),i.input.removeAttribute("aria-activedescendant"),typeof s.onClose=="function"&&a("onClose",s.onClose))}function X(){y(),i.initialized=!1,i.index=[],i.results=[],i.isOpen=!1,i.query="",i.debounceTimer&&clearTimeout(i.debounceTimer),i.resultsContainer&&o("")}function j(){c()}function Q(u){Object.assign(s,u)}function Z(){return Object.assign({},s)}function J(){return i.index.slice()}let V={init:r,destroy:X,rebuild:j,search:M,open:H,close:_,setConfig:Q,getConfig:Z,getIndex:J};return V}let t={create:function(n){let s=e(n);return s&&s.init(),s||null},_instance:null,config:Object.assign({},d),init:function(n){return this._instance&&this._instance.destroy(),n&&Object.assign(this.config,n),this._instance=e(this.config),this._instance?this._instance.init():null},destroy:function(){this._instance&&(this._instance.destroy(),this._instance=null)},destroyAll:function(){this.destroy()},rebuild:function(){this._instance&&this._instance.rebuild()},search:function(n){return this._instance?this._instance.search(n):[]},open:function(){this._instance&&this._instance.open()},close:function(){this._instance&&this._instance.close()}};typeof window.Vanduo<"u"&&window.Vanduo.register("docSearch",t),window.Search=t,window.DocSearch=t,window.VanduoDocSearch=t})();(function(){"use strict";let d={instances:new Map,currentDrag:null,touchState:null,feedbackElement:null,init:function(){document.querySelectorAll(".vd-draggable, [data-draggable]").forEach(s=>{this.instances.has(s)||this.initDraggable(s)}),document.querySelectorAll(".vd-draggable-container, .vd-draggable-container-vertical").forEach(s=>{this.instances.has(s)||this.initContainer(s)}),document.querySelectorAll(".vd-drop-zone").forEach(s=>{this.instances.has(s)||this.initDropZone(s)}),this.createFeedbackElement()},initDraggable:function(e){let t=[];e.hasAttribute("draggable")||e.setAttribute("draggable","true"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.setAttribute("role","option"),e.setAttribute("aria-roledescription","draggable item"),e.setAttribute("aria-grabbed","false");let n=h=>{this.handleDragStart(h,e)};e.addEventListener("dragstart",n),t.push(()=>e.removeEventListener("dragstart",n));let s=h=>{this.handleDrag(h,e)};e.addEventListener("drag",s),t.push(()=>e.removeEventListener("drag",s));let i=h=>{this.handleDragEnd(h,e)};e.addEventListener("dragend",i),t.push(()=>e.removeEventListener("dragend",i));let a=h=>{this.handleTouchStart(h,e)};e.addEventListener("touchstart",a),t.push(()=>e.removeEventListener("touchstart",a));let o=h=>{this.handleTouchMove(h,e)};e.addEventListener("touchmove",o,{passive:!1}),t.push(()=>e.removeEventListener("touchmove",o));let r=h=>{this.handleTouchEnd(h,e)};e.addEventListener("touchend",r,{passive:!1}),t.push(()=>e.removeEventListener("touchend",r));let c=h=>{this.handleTouchEnd(h,e)};e.addEventListener("touchcancel",c),t.push(()=>e.removeEventListener("touchcancel",c));let l=h=>{this.handleKeydown(h,e)};e.addEventListener("keydown",l),t.push(()=>e.removeEventListener("keydown",l)),this.instances.set(e,{cleanup:t})},initContainer:function(e){e.setAttribute("role","listbox"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Draggable items"),e.querySelectorAll(".vd-draggable-item").forEach(o=>{this.instances.has(o)||this.initDraggable(o)});let n=[],s=o=>{o.preventDefault(),o.dataTransfer.dropEffect="move"},i=o=>{if(o.preventDefault(),o.dataTransfer.dropEffect="move",!this.currentDrag)return;let r=this.currentDrag.element;e.contains(r)&&(o.clientX===0&&o.clientY===0||this.handleReorder(e,r,o.clientX,o.clientY))},a=o=>{o.preventDefault()};e.addEventListener("dragenter",s),e.addEventListener("dragover",i),e.addEventListener("drop",a),n.push(()=>{e.removeEventListener("dragenter",s),e.removeEventListener("dragover",i),e.removeEventListener("drop",a)}),this.instances.set(e,{cleanup:n})},initDropZone:function(e){let t=[];e.setAttribute("role","region"),e.setAttribute("aria-dropeffect","move"),e.hasAttribute("aria-label")||e.setAttribute("aria-label","Drop zone");let n=o=>{o.preventDefault(),this.handleDragOver(o,e)};e.addEventListener("dragover",n),t.push(()=>e.removeEventListener("dragover",n));let s=o=>{o.preventDefault(),this.handleDragEnter(o,e)};e.addEventListener("dragenter",s),t.push(()=>e.removeEventListener("dragenter",s));let i=o=>{this.handleDragLeave(o,e)};e.addEventListener("dragleave",i),t.push(()=>e.removeEventListener("dragleave",i));let a=o=>{o.preventDefault(),this.handleDrop(o,e)};e.addEventListener("drop",a),t.push(()=>e.removeEventListener("drop",a)),this.instances.set(e,{cleanup:t})},createFeedbackElement:function(){if(!this.feedbackElement){let e=document.querySelector(".vd-drag-feedback");if(e){this.feedbackElement=e;return}this.feedbackElement=document.createElement("div"),this.feedbackElement.className="vd-drag-feedback hidden",this.feedbackElement.setAttribute("role","presentation"),document.body.appendChild(this.feedbackElement)}},handleDragStart:function(e,t){t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:e.clientX,y:e.clientY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",this.currentDrag.data),t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY}}}))},handleDrag:function(e,t){this.currentDrag&&t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-this.currentDrag.initialPosition.x,y:e.clientY-this.currentDrag.initialPosition.y}}}))},handleDragEnd:function(e,t){t.classList.remove("is-dragging"),t.classList.add("is-dropped"),setTimeout(()=>t.classList.remove("is-dropped"),300),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=this.currentDrag?.data||this.getData(t),s=this.currentDrag?.initialPosition||{x:0,y:0};t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:n,position:{x:e.clientX,y:e.clientY},delta:{x:e.clientX-s.x,y:e.clientY-s.y}}})),this.currentDrag=null},handleTouchStart:function(e,t){let n=e.touches[0];this.touchState={element:t,startX:n.clientX,startY:n.clientY,startTime:Date.now(),isDragging:!1}},handleTouchMove:function(e,t){if(!this.touchState)return;let n=e.touches[0],s=n.clientX-this.touchState.startX,i=n.clientY-this.touchState.startY;if((Math.abs(s)>10||Math.abs(i)>10)&&(e.cancelable&&e.preventDefault(),this.touchState.isDragging||(this.touchState.isDragging=!0,t.classList.add("is-dragging"),t.setAttribute("aria-grabbed","true"),this.currentDrag={element:t,initialPosition:{x:this.touchState.startX,y:this.touchState.startY},initialBounds:t.getBoundingClientRect(),data:this.getData(t)},t.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY}}}))),this.updateFeedback(n.clientX,n.clientY),this.currentDrag)){t.dispatchEvent(new CustomEvent("draggable:drag",{bubbles:!0,detail:{element:t,data:this.currentDrag.data,position:{x:n.clientX,y:n.clientY},delta:{x:s,y:i}}}));let a=t.closest(".vd-draggable-container");a&&a.contains(t)&&this.handleReorder(a,t,n.clientX,n.clientY)}},handleTouchEnd:function(e,t){if(this.touchState&&this.touchState.isDragging){e.cancelable&&e.preventDefault(),t.classList.remove("is-dragging"),t.classList.add("is-dropped"),t.setAttribute("aria-grabbed","false"),setTimeout(()=>t.classList.remove("is-dropped"),300),this.feedbackElement&&this.feedbackElement.classList.add("hidden");let n=e.changedTouches[0],s=this.currentDrag?.data||this.getData(t),i=this.touchState?.startX||0,a=this.touchState?.startY||0;t.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0,detail:{element:t,data:s,position:{x:n.clientX,y:n.clientY},delta:{x:n.clientX-i,y:n.clientY-a}}}))}this.touchState=null,this.currentDrag=null},handleDragOver:function(e,t){e.preventDefault(),e.dataTransfer.dropEffect="move"},handleDragEnter:function(e,t){e.preventDefault(),t.classList.add("is-drag-over")},handleDragLeave:function(e,t){t.classList.remove("is-drag-over")},handleDrop:function(e,t){e.preventDefault(),t.classList.remove("is-drag-over"),t.dispatchEvent(new CustomEvent("draggable:drop",{bubbles:!0,detail:{zone:t,element:this.currentDrag?.element,data:this.currentDrag?.data,position:{x:e.clientX,y:e.clientY}}}))},handleReorder:function(e,t,n,s){let i=e.classList.contains("vd-draggable-container-vertical"),o=[...e.querySelectorAll(".vd-draggable-item:not(.is-dragging), .vd-draggable:not(.is-dragging)")].reduce((r,c)=>{let l=c.getBoundingClientRect(),h=i?s-l.top-l.height/2:n-l.left-l.width/2;return h<0&&h>r.offset?{offset:h,element:c}:r},{offset:Number.NEGATIVE_INFINITY}).element;o==null?e.appendChild(t):e.insertBefore(t,o)},handleKeydown:function(e,t){switch(e.key){case"Enter":case" ":e.preventDefault(),t.click();break;case"Escape":t.classList.contains("is-dragging")&&(t.classList.remove("is-dragging"),t.setAttribute("aria-grabbed","false"),this.feedbackElement&&this.feedbackElement.classList.add("hidden"),this.currentDrag=null);break;case"ArrowUp":case"ArrowLeft":{e.preventDefault();let n=t.previousElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(t,n),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"up"}})));break}case"ArrowDown":case"ArrowRight":{e.preventDefault();let n=t.nextElementSibling;n&&(n.classList.contains("vd-draggable")||n.classList.contains("vd-draggable-item"))&&(t.parentNode.insertBefore(n,t),t.focus(),t.dispatchEvent(new CustomEvent("draggable:reorder",{bubbles:!0,detail:{element:t,direction:"down"}})));break}}},getData:function(e){return e.dataset.draggable||e.textContent.trim()},updateFeedback:function(e,t){if(!this.currentDrag)return;this.feedbackElement.classList.remove("hidden");let n=this.currentDrag.initialBounds;this.feedbackElement.innerHTML="";let s=this.currentDrag.element.cloneNode(!0);this.feedbackElement.appendChild(s),Object.assign(this.feedbackElement.style,{left:e-20+"px",top:t-20+"px",width:n.width+"px",height:n.height+"px"})},makeDraggable:function(e,t={}){let n=typeof e=="string"?document.querySelector(e):e;n&&!this.instances.has(n)&&(n.classList.add("vd-draggable"),n.setAttribute("draggable","true"),t.data&&(n.dataset.draggable=t.data),this.initDraggable(n))},removeDraggable:function(e){let t=typeof e=="string"?document.querySelector(e):e;t&&this.instances.has(t)&&(this.instances.get(t).cleanup.forEach(s=>s()),this.instances.delete(t),t.classList.remove("vd-draggable"),t.removeAttribute("draggable"),t.removeAttribute("data-draggable"))},destroy:function(e){this.removeDraggable(e)},destroyAll:function(){Array.from(this.instances.keys()).forEach(t=>this.destroy(t))}};typeof window.Vanduo<"u"&&window.Vanduo.register("draggable",d),window.VanduoDraggable=d})();(function(){"use strict";let d=new Map;function e(r){try{return new URL(r,window.location.href).origin===window.location.origin}catch{return!1}}function t(r,c){let h=new DOMParser().parseFromString(c.trim(),"text/html"),f=["SCRIPT","IFRAME","OBJECT","EMBED","FORM","BASE","LINK","META","STYLE"];for(let v of f){let y=h.querySelectorAll(v);for(let S=y.length-1;S>=0;S--)y[S].parentNode.removeChild(y[S])}function w(v){if(v.nodeType===Node.ELEMENT_NODE){let y=v.attributes;for(let k=y.length-1;k>=0;k--){let O=y[k].name.toLowerCase(),q=y[k].value.toLowerCase().trim();(O.startsWith("on")||q.startsWith("javascript:")||q.startsWith("data:")||q.startsWith("vbscript:"))&&v.removeAttribute(y[k].name)}let S=v.childNodes;for(let k=0;k<S.length;k++)w(S[k])}}w(h.body);let L=Array.from(h.body.childNodes);for(;r.firstChild;)r.removeChild(r.firstChild);L.forEach(function(v){r.appendChild(document.adoptNode(v))})}function n(){return'<div class="vd-skeleton-card" style="position:relative;min-height:200px;padding:2rem;overflow:hidden;"><div class="vd-skeleton vd-skeleton-heading-lg" style="margin-bottom:1.5rem;"></div><div class="vd-skeleton vd-skeleton-paragraph"><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div><div class="vd-skeleton vd-skeleton-text"></div></div><div class="vd-dynamic-loader" style="position:absolute;inset:0;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div></div>'}function s(){return'<div class="vd-dynamic-loader" style="min-height:180px;display:flex;align-items:center;justify-content:center;"><div class="vd-dynamic-loader-grid"><div class="vd-spinner vd-spinner-sm vd-spinner-success" style="animation-delay:0s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-warning" style="animation-delay:-0.15s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-error" style="animation-delay:-0.3s;"></div><div class="vd-spinner vd-spinner-sm vd-spinner-info" style="animation-delay:-0.45s;"></div></div><span class="vd-dynamic-loader-text">Loading\u2026</span></div>'}function i(r){return!r||r==="skeleton"?n():r==="spinner"?s():r}function a(r,c,l){r.dispatchEvent(new CustomEvent(c,{bubbles:!0,detail:l||{}}))}let o={observe:function(r,c,l){if(!(r instanceof Element)){console.warn("[VanduoLazyLoad] observe() requires a DOM Element.");return}if(typeof c!="function"){console.warn("[VanduoLazyLoad] observe() requires a callback function.");return}if(d.has(r))return;let h=l&&l.threshold!=null?l.threshold:0,f=l&&l.rootMargin?l.rootMargin:"0px",w=new IntersectionObserver(function(L,v){L.forEach(function(y){if(y.isIntersecting){v.unobserve(y.target),d.delete(y.target);try{c(y.target)}catch(S){console.error("[VanduoLazyLoad] Callback threw:",S)}}})},{threshold:h,rootMargin:f});d.set(r,w),w.observe(r)},unobserve:function(r){let c=d.get(r);c&&(c.unobserve(r),d.delete(r))},unobserveAll:function(){d.forEach(function(r,c){r.unobserve(c)}),d.clear()},loadSection:function(r,c,l){if(typeof r!="string"||!r){console.warn("[VanduoLazyLoad] loadSection() requires a non-empty URL string.");return}if(!(c instanceof Element)){console.warn("[VanduoLazyLoad] loadSection() requires a DOM Element as containerEl.");return}if(!e(r)){console.error("[VanduoLazyLoad] loadSection() blocked cross-origin URL:",r);return}let h=l||{},f=i(h.placeholder);t(c,f),a(c,"lazysection:loading",{url:r}),this.observe(c,function(){let w=new window.AbortController,L=setTimeout(function(){w.abort()},1e4);window.fetch(r,{signal:w.signal}).then(function(v){if(clearTimeout(L),!v.ok)throw new Error("HTTP "+v.status);return v.text()}).then(function(v){t(c,v),a(c,"lazysection:loaded",{url:r}),typeof window.Vanduo<"u"&&window.Vanduo.init(),typeof h.onLoaded=="function"&&h.onLoaded(c)}).catch(function(v){let y=document.createElement("div");y.className="vd-alert vd-alert-error",y.setAttribute("role","alert");let S=document.createElement("span");S.textContent="Failed to load content. ";let k=document.createElement("small");for(k.style.opacity="0.7",k.textContent=v.message,y.appendChild(S),y.appendChild(k);c.firstChild;)c.removeChild(c.firstChild);c.appendChild(y),a(c,"lazysection:error",{url:r,error:v}),console.error("[VanduoLazyLoad] loadSection failed:",v),typeof h.onError=="function"&&h.onError(v)})},{threshold:h.threshold,rootMargin:h.rootMargin})},init:function(){let r=this;document.querySelectorAll("[data-vd-lazy]").forEach(function(l){if(d.has(l)||l.dataset.vdLazyState==="loading"||l.dataset.vdLazyState==="loaded")return;let h=l.getAttribute("data-vd-lazy");if(!h)return;l.dataset.vdLazyState="loading";let f=l.getAttribute("data-vd-lazy-placeholder")||"skeleton";r.loadSection(h,l,{placeholder:f,onLoaded:function(){l.dataset.vdLazyState="loaded"},onError:function(){l.dataset.vdLazyState="error"}})})}};typeof window.Vanduo<"u"&&window.Vanduo.register("LazyLoad",o),window.VanduoLazyLoad=o})();var B=window.Vanduo;var oe=B;
|
|
48
48
|
//# sourceMappingURL=vanduo.cjs.min.js.map
|