veilkit 0.2.1 → 0.3.0
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/CHANGELOG.md +23 -0
- package/README.md +119 -6
- package/assets/demo-button.gif +0 -0
- package/assets/demo-hero.gif +0 -0
- package/assets/demo-presets.gif +0 -0
- package/assets/demo-spinners.gif +0 -0
- package/dist/angular/index.cjs +5 -5
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.cts +2 -2
- package/dist/angular/index.d.ts +2 -2
- package/dist/angular/index.js +5 -5
- package/dist/angular/index.js.map +1 -1
- package/dist/{controller-Ceub9kLC.d.ts → controller-Cmc3Hp1j.d.ts} +1 -1
- package/dist/{controller-B6kFsWzi.d.cts → controller-CzNTbEGd.d.cts} +1 -1
- package/dist/element/index.cjs +14 -14
- package/dist/element/index.cjs.map +1 -1
- package/dist/element/index.js +14 -14
- package/dist/element/index.js.map +1 -1
- package/dist/index.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/native/index.d.cts +1 -1
- package/dist/native/index.d.ts +1 -1
- package/dist/react/index.cjs +14 -14
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +14 -2
- package/dist/react/index.d.ts +14 -2
- package/dist/react/index.js +14 -14
- package/dist/react/index.js.map +1 -1
- package/dist/svelte/index.cjs +4 -4
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.d.cts +1 -1
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.js +4 -4
- package/dist/svelte/index.js.map +1 -1
- package/dist/themes/index.d.cts +1 -1
- package/dist/themes/index.d.ts +1 -1
- package/dist/{types-CnR-rU97.d.cts → types-D2ryMkLU.d.cts} +25 -2
- package/dist/{types-CnR-rU97.d.ts → types-D2ryMkLU.d.ts} +25 -2
- package/dist/veilkit.min.js +13 -5
- package/dist/vue/index.cjs +3 -3
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.cts +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/dist/vue/index.js +3 -3
- package/dist/vue/index.js.map +1 -1
- package/package.json +2 -1
package/dist/vue/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { Directive, PropType, App } from 'vue';
|
|
3
|
-
import { B as ButtonStatus, e as ButtonLoadingStyle, f as VeilSpinnerType, j as ButtonPressFeedback, k as ButtonResultAnimation, i as VeilPrimitiveType, a as VeilAnimationName, V as VeilThemeName, h as VeilShapeStyle, g as VeilPresetName, d as VeilGlobalConfig } from '../types-
|
|
3
|
+
import { B as ButtonStatus, e as ButtonLoadingStyle, f as VeilSpinnerType, j as ButtonPressFeedback, k as ButtonResultAnimation, i as VeilPrimitiveType, a as VeilAnimationName, V as VeilThemeName, h as VeilShapeStyle, g as VeilPresetName, d as VeilGlobalConfig } from '../types-D2ryMkLU.cjs';
|
|
4
4
|
|
|
5
5
|
declare function useProgress(): {
|
|
6
6
|
start: () => void;
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { Directive, PropType, App } from 'vue';
|
|
3
|
-
import { B as ButtonStatus, e as ButtonLoadingStyle, f as VeilSpinnerType, j as ButtonPressFeedback, k as ButtonResultAnimation, i as VeilPrimitiveType, a as VeilAnimationName, V as VeilThemeName, h as VeilShapeStyle, g as VeilPresetName, d as VeilGlobalConfig } from '../types-
|
|
3
|
+
import { B as ButtonStatus, e as ButtonLoadingStyle, f as VeilSpinnerType, j as ButtonPressFeedback, k as ButtonResultAnimation, i as VeilPrimitiveType, a as VeilAnimationName, V as VeilThemeName, h as VeilShapeStyle, g as VeilPresetName, d as VeilGlobalConfig } from '../types-D2ryMkLU.js';
|
|
4
4
|
|
|
5
5
|
declare function useProgress(): {
|
|
6
6
|
start: () => void;
|
package/dist/vue/index.js
CHANGED
|
@@ -508,7 +508,7 @@ ${Object.entries(x).map(([o,l])=>`[data-veil-theme="${o}"]{--veil-base:${l.base}
|
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
${Q()}
|
|
511
|
-
`}function h(t){if(ee||typeof document>"u")return;ee=true;let e=Ae(),o=t||te;if(typeof document.adoptedStyleSheets<"u"&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype&&!o)try{let r=new CSSStyleSheet;r.replaceSync(e),document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];return}catch{}let l=document.createElement("style");l.id="veilkit-styles",o&&l.setAttribute("nonce",o),l.textContent=e,document.head.appendChild(l);}var z=class{el=null;innerEl=null;currentProgress=0;trickleTimer=null;status="idle";ensureDOM(){this.el||typeof document>"u"||(h(),this.el=document.createElement("div"),this.el.className="veil-progress-bar",this.el.setAttribute("role","progressbar"),this.el.setAttribute("aria-valuemin","0"),this.el.setAttribute("aria-valuemax","100"),this.el.setAttribute("aria-valuenow","0"),this.innerEl=document.createElement("div"),this.innerEl.className="veil-progress-inner",this.innerEl.style.width="0%",this.innerEl.style.opacity="1",this.el.appendChild(this.innerEl),document.body.appendChild(this.el));}start(){this.ensureDOM(),this.status!=="loading"&&(this.status="loading",this.currentProgress=0,this.set(.08),this.innerEl&&(this.innerEl.style.opacity="1",this.innerEl.style.backgroundColor="var(--veil-progress-color, #3b82f6)"),this.trickle());}set(e){this.ensureDOM(),this.currentProgress=Math.min(1,Math.max(0,e));let o=Math.round(this.currentProgress*100);this.innerEl&&(this.innerEl.style.width=`${o}%`),this.el&&this.el.setAttribute("aria-valuenow",String(o));}inc(e){let o=this.currentProgress;o>=1||(typeof e!="number"&&(o>=0&&o<.2?e=.1:o>=.2&&o<.5?e=.04:o>=.5&&o<.8?e=.02:o>=.8&&o<.99?e=.005:e=0),this.set(o+e));}trickle(){this.stopTrickle(),this.trickleTimer=setInterval(()=>{this.currentProgress<.95&&this.inc();},250);}stopTrickle(){this.trickleTimer&&(clearInterval(this.trickleTimer),this.trickleTimer=null);}done(){this.status!=="idle"&&(this.stopTrickle(),this.set(1),this.status="idle",setTimeout(()=>{this.innerEl&&(this.innerEl.style.opacity="0"),setTimeout(()=>{this.el&&(this.el.remove(),this.el=null,this.innerEl=null),this.currentProgress=0;},350);},200));}fail(){this.stopTrickle(),this.status="error",this.innerEl&&(this.innerEl.style.backgroundColor="#ef4444"),this.set(1),setTimeout(()=>this.done(),500);}},g=new z;function ne(t={}){h();let e=!!t.circular,o=t.color||"var(--veil-progress-color, #3b82f6)",l=t.trackColor||"rgba(0, 0, 0, 0.08)";if(e){let i=t.size!==void 0?typeof t.size=="number"?`${t.size}px`:t.size:"48px",a=t.strokeWidth||4,d=document.createElement("div");d.className=`veil-progress-circular ${t.className||""}`.trim(),d.style.width=i,d.style.height=i,d.style.display="inline-flex",d.style.alignItems="center",d.style.justifyContent="center",d.style.position="relative";let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("viewBox","0 0 48 48"),p.style.width="100%",p.style.height="100%",p.style.transform="rotate(-90deg)";let y=document.createElementNS("http://www.w3.org/2000/svg","circle");y.setAttribute("cx","24"),y.setAttribute("cy","24"),y.setAttribute("r","20"),y.setAttribute("fill","none"),y.setAttribute("stroke",l),y.setAttribute("stroke-width",String(a));let m=document.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx","24"),m.setAttribute("cy","24"),m.setAttribute("r","20"),m.setAttribute("fill","none"),m.setAttribute("stroke",o),m.setAttribute("stroke-width",String(a)),m.setAttribute("stroke-linecap","round");let w=2*Math.PI*20;if(m.setAttribute("stroke-dasharray",String(w)),t.value!==void 0){let u=Math.min(100,Math.max(0,t.value)),Le=w-u/100*w;m.setAttribute("stroke-dashoffset",String(Le)),m.style.transition="stroke-dashoffset 300ms ease";}else m.setAttribute("stroke-dashoffset",String(w*.75)),p.style.animation="veil-spin 1200ms linear infinite";if(p.append(y,m),d.appendChild(p),t.showPercentage&&t.value!==void 0){let u=document.createElement("span");u.style.position="absolute",u.style.fontSize="11px",u.style.fontWeight="600",u.textContent=`${Math.round(t.value)}%`,d.appendChild(u);}return d}let r=t.height!==void 0?typeof t.height=="number"?`${t.height}px`:t.height:"4px",s=document.createElement("div");s.className=`veil-progress-linear ${t.className||""}`.trim(),s.setAttribute("role","progressbar"),s.style.width="100%",s.style.height=r,s.style.backgroundColor=l,s.style.borderRadius="9999px",s.style.overflow="hidden",s.style.position="relative";let n=document.createElement("div");if(n.style.height="100%",n.style.backgroundColor=o,n.style.borderRadius="9999px",t.value!==void 0){let i=Math.min(100,Math.max(0,t.value));s.setAttribute("aria-valuenow",String(i)),n.style.width=`${i}%`,n.style.transition="width 250ms ease";}else n.style.width="35%",n.style.animation="veil-progress-indeterminate 1400ms ease-in-out infinite";return s.appendChild(n),s}var B=class{activeIds=new Set;counter=0;listeners=new Set;start(e){let o=e||`req_${Date.now()}_${Math.random().toString(36).substring(2,7)}`;return this.activeIds.has(o)||(this.activeIds.add(o),this.counter++,this.notify()),o}stop(e){if(e)this.activeIds.has(e)&&(this.activeIds.delete(e),this.counter=Math.max(0,this.counter-1),this.notify());else if(this.counter>0){this.counter--;let o=this.activeIds.values().next().value;o&&this.activeIds.delete(o),this.notify();}}isLoading(){return this.counter>0}getCount(){return this.counter}subscribe(e){return this.listeners.add(e),e(this.isLoading(),this.counter),()=>{this.listeners.delete(e);}}reset(){this.activeIds.clear(),this.counter=0,this.notify();}notify(){let e=this.isLoading();for(let o of this.listeners)o(e,this.counter);}},C=new B;function rt(){return {start:()=>g.start(),set:t=>g.set(t),inc:t=>g.inc(t),done:()=>g.done(),fail:()=>g.fail()}}function Re(t,e={}){let o=ref(false),l=null;return onMounted(()=>{l=new L({delay:e.delay!==void 0?e.delay:150,minVisible:e.minVisible!==void 0?e.minVisible:300,onShow:()=>{o.value=true;},onHide:()=>{o.value=false;}}),t.value&&l.start();}),watch(()=>t.value,r=>{l&&(r?l.start():l.finish());}),onUnmounted(()=>{l&&(l.destroy(),l=null);}),o}function st(t,e={}){let o=ref(false),l=ref(null),r=ref(null);return {loading:Re(o,e),rawLoading:o,data:l,error:r,execute:async(...i)=>{o.value=true,r.value=null;let a=C.start();try{let d=await t(...i);return l.value=d,d}catch(d){throw r.value=d,d}finally{C.stop(a),o.value=false;}}}}var H=0;function Ve(){return H===0&&typeof performance<"u"&&(H=performance.now()),H}function O(t=1500){if(typeof performance>"u")return "0ms";let e=performance.now()-Ve();return `-${Math.round(e%t)}ms`}function ae(t=1500){if(typeof t=="number")return t;if(!t)return 1500;let e=t.trim().toLowerCase();return e.endsWith("ms")?parseFloat(e)||1500:e.endsWith("s")?(parseFloat(e)||1.5)*1e3:parseFloat(e)||1500}var $=null,re=new Set,se=false;function Ne(t){for(let e of t){let o=e.target;e.isIntersecting?(o.removeAttribute("data-veil-offscreen"),o.style.removeProperty("--veil-play-state")):(o.setAttribute("data-veil-offscreen","true"),o.style.setProperty("--veil-play-state","paused"));}}function Ie(){se||typeof document>"u"||(se=true,document.addEventListener("visibilitychange",()=>{document.hidden?document.documentElement.setAttribute("data-veil-tab-hidden","true"):document.documentElement.removeAttribute("data-veil-tab-hidden");}));}function le(t){return typeof window>"u"||typeof IntersectionObserver>"u"?()=>{}:(Ie(),$||($=new IntersectionObserver(Ne,{rootMargin:"100px 0px",threshold:0})),$.observe(t),re.add(t),()=>{$&&t&&($.unobserve(t),re.delete(t));})}function c(t={}){h();let e=document.createElement("div");e.className=`veil-skeleton ${t.className||""}`.trim(),e.setAttribute("aria-hidden","true");let o=t.type||"rect";if(e.setAttribute("data-veil-shape",o),t.animation&&e.setAttribute("data-veil-anim",t.animation),t.direction&&e.setAttribute("data-veil-dir",t.direction),typeof t.theme=="string"&&e.setAttribute("data-veil-theme",t.theme),t.width!==void 0&&(e.style.width=typeof t.width=="number"?`${t.width}px`:t.width),t.height!==void 0&&(e.style.height=typeof t.height=="number"?`${t.height}px`:t.height),t.radius!==void 0&&(e.style.setProperty("--veil-radius",typeof t.radius=="number"?`${t.radius}px`:t.radius),e.style.borderRadius=typeof t.radius=="number"?`${t.radius}px`:t.radius),t.speed!==void 0){let l=ae(t.speed);e.style.setProperty("--veil-duration",`${l}ms`),e.style.setProperty("--veil-sync-delay",O(l));}else e.style.setProperty("--veil-sync-delay",O(1500));if(t.style)for(let[l,r]of Object.entries(t.style))e.style[l]=r;return le(e),e}function f(t=3,e={}){let o=document.createElement("div");o.className=`veil-lines-group ${e.className||""}`.trim(),o.setAttribute("aria-hidden","true");let l=e.gap!==void 0?typeof e.gap=="number"?`${e.gap}px`:e.gap:"0.45rem";o.style.display="flex",o.style.flexDirection="column",o.style.gap=l;let r=["100%","94%","88%","75%"],s=e.lastLineWidth!==void 0?typeof e.lastLineWidth=="number"?`${e.lastLineWidth}px`:e.lastLineWidth:"65%";for(let n=0;n<t;n++){let a=n===t-1?s:r[n%r.length]||"95%",d=c({...e,type:"line",width:a});d.style.setProperty("--veil-stagger-idx",String(n)),o.appendChild(d);}return o}function oe(t,e={}){switch(t){case "paragraph":return f(e.lines||3,e);case "line":return c({...e,type:"line"});case "heading":return c({...e,type:"heading",width:e.width||"65%"});case "circle":return c({...e,type:"circle",width:e.width||e.height||"40px",height:e.height||e.width||"40px",radius:"50%"});case "image":return c({...e,type:"rect",width:e.width||"100%",height:e.height||"200px",radius:e.radius||"8px"});case "button":return c({...e,type:"button",width:e.width||"120px",height:e.height||"38px"});case "badge":return c({...e,type:"badge",width:e.width||"64px",height:e.height||"22px"});case "icon":return c({...e,type:"icon",width:e.width||"24px",height:e.height||"24px"});case "input":return c({...e,type:"input",width:e.width||"100%",height:e.height||"40px"});case "divider":return c({...e,type:"divider",width:"100%",height:"1px"});case "table-row":{let o=document.createElement("div");o.style.display="flex",o.style.gap="1rem",o.style.alignItems="center",o.style.width="100%",o.style.padding="0.5rem 0";let l=e.count||4;for(let r=0;r<l;r++){let s=c({...e,type:"line",width:`${100/l}%`,height:"16px"});o.appendChild(s);}return o}default:return c(e)}}function de(t,e={}){let o=e.transition||"fade";if(o==="none"){e.onComplete&&e.onComplete();return}if(t.classList.add("veil-revealing"),o==="stagger-children"){let s=Array.from(t.children);s.forEach((i,a)=>{i.classList.add("veil-reveal-fade"),i.style.animationDelay=`${a*60}ms`,e.duration&&(i.style.animationDuration=`${e.duration}ms`);});let n=(e.duration||350)+s.length*60;setTimeout(()=>{t.classList.remove("veil-revealing"),s.forEach(i=>{i.classList.remove("veil-reveal-fade"),i.style.removeProperty("animation-delay"),i.style.removeProperty("animation-duration");}),e.onComplete&&e.onComplete();},n);return}let l=`veil-reveal-${o}`;t.classList.add(l),e.duration&&(t.style.animationDuration=`${e.duration}ms`),e.easing&&(t.style.animationTimingFunction=e.easing);let r=()=>{t.removeEventListener("animationend",r),t.classList.remove("veil-revealing",l),t.style.removeProperty("animation-duration"),t.style.removeProperty("animation-timing-function"),e.onComplete&&e.onComplete();};t.addEventListener("animationend",r);}var V=new Map;function De(t){if(V.has(t))return V.get(t);if(typeof window<"u"&&window.localStorage)try{let e=localStorage.getItem(`veil_cache_${t}`);if(e){let o=JSON.parse(e);return V.set(t,o),o}}catch{}return null}function ze(t,e,o=false){if(V.set(t,e),o&&typeof window<"u"&&window.localStorage)try{localStorage.setItem(`veil_cache_${t}`,JSON.stringify(e));}catch{}}function Be(t,e){let o=t.getBoundingClientRect(),l=[];function r(n){if(n.hasAttribute("data-veil-ignore")||e&&n.matches(e))return false;let i=window.getComputedStyle(n);if(i.display==="none"||i.visibility==="hidden"||i.opacity==="0")return false;let a=n.tagName.toLowerCase();return ["img","svg","button","input","textarea","select"].includes(a)||n.hasAttribute("data-veil-shape")?true:Array.from(n.childNodes).some(p=>p.nodeType===Node.TEXT_NODE&&(p.textContent||"").trim().length>0)&&n.children.length===0}function s(n){if(n!==t&&r(n)){let a=n.getBoundingClientRect();if(a.width>2&&a.height>2){let p=window.getComputedStyle(n).borderRadius||"6px",y=n.getAttribute("data-veil-shape"),m="rect";y==="circle"||p==="50%"||p.includes("px")&&parseFloat(p)>=a.width/2?m="circle":(y==="line"||["p","span","h1","h2","h3","h4","h5","h6","a","label"].includes(n.tagName.toLowerCase()))&&(m="line"),l.push({x:Math.round(a.left-o.left),y:Math.round(a.top-o.top),width:Math.round(a.width),height:Math.round(a.height),radius:p,shape:m});}return}let i=Array.from(n.children);for(let a of i)a.hasAttribute("data-veil-ignore")||s(a);}return s(t),{width:Math.round(o.width),height:Math.round(o.height),boxes:l}}function T(t,e={},o={}){let l=document.createElement("div");if(l.className="veil-auto-overlay",l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.width="100%",l.style.height="100%",l.style.pointerEvents="none",l.style.zIndex="5",!e.preserveBackground){let d=window.getComputedStyle(t);l.style.backgroundColor=d.backgroundColor!=="rgba(0, 0, 0, 0)"?d.backgroundColor:"transparent";}function r(d){l.innerHTML="";for(let p=0;p<d.boxes.length;p++){let y=d.boxes[p],m=c({...o,type:y.shape,radius:y.radius});m.style.position="absolute",m.style.left=`${y.x}px`,m.style.top=`${y.y}px`,m.style.width=`${y.width}px`,m.style.height=`${y.height}px`,m.style.setProperty("--veil-stagger-idx",String(p)),l.appendChild(m);}}function s(){let d=Be(t,e.ignoreSelector);d.boxes.length>0&&(r(d),e.cacheKey&&ze(e.cacheKey,d,e.persistCache));}if(e.cacheKey){let d=De(e.cacheKey);d&&r(d);}window.getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.appendChild(l),l.children.length===0&&s();let i=null,a=null;return e.observeResize!==false&&typeof ResizeObserver<"u"&&(i=new ResizeObserver(()=>s()),i.observe(t)),e.observeMutations!==false&&typeof MutationObserver<"u"&&(a=new MutationObserver(()=>s()),a.observe(t,{childList:true,subtree:true,attributes:false})),{overlay:l,refresh:s,destroy:()=>{i&&i.disconnect(),a&&a.disconnect(),e.reveal&&e.reveal!=="none"?de(t,{transition:e.reveal,duration:e.revealDuration,easing:e.revealEasing,onComplete:()=>l.remove()}):l.remove();}}}var N=new WeakMap,ce={mounted(t,e){h();let o={};N.set(t,o),e.value&&(o.overlayInstance=T(t,{observeResize:true,observeMutations:true,reveal:"fade"}),t.setAttribute("aria-busy","true"));},updated(t,e){let o=N.get(t);o&&(e.value&&!o.overlayInstance?(o.overlayInstance=T(t,{observeResize:true,observeMutations:true,reveal:"fade"}),t.setAttribute("aria-busy","true")):!e.value&&o.overlayInstance&&(o.overlayInstance.destroy(),o.overlayInstance=void 0,t.removeAttribute("aria-busy")));},unmounted(t){let e=N.get(t);e?.overlayInstance&&(e.overlayInstance.destroy(),e.overlayInstance=void 0),N.delete(t);}};function v(t={}){h();let e=t.type||"ring",o=t.size!==void 0?typeof t.size=="number"?`${t.size}px`:t.size:"28px",l=t.color||"var(--veil-progress-color, #3b82f6)",r=t.secondaryColor||"rgba(0, 0, 0, 0.12)",s=t.speed!==void 0?typeof t.speed=="number"?`${t.speed}ms`:t.speed:void 0,n=document.createElement("div");switch(n.className=`veil-spinner veil-spinner-${e} ${t.glass?"veil-spinner-glass":""} ${t.className||""}`.trim(),n.setAttribute("role","status"),n.setAttribute("aria-label",t.label||"Loading"),n.style.width=o,n.style.height=o,n.style.display="inline-flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.position="relative",t.glass&&(n.style.borderRadius="50%",n.style.backdropFilter="blur(8px)",n.style.webkitBackdropFilter="blur(8px)",n.style.background="rgba(255, 255, 255, 0.12)",n.style.boxShadow="0 4px 16px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.4)",n.style.border="1px solid rgba(255, 255, 255, 0.25)"),e){case "ring":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.border=`3px solid ${r}`,i.style.borderTopColor=l,i.style.animation=`veil-spin ${s||"800ms"} linear infinite`,i.style.boxSizing="border-box",n.appendChild(i);break}case "dual-ring":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.border="3px solid transparent",i.style.borderTopColor=l,i.style.borderBottomColor=l,i.style.animation=`veil-spin ${s||"900ms"} cubic-bezier(0.5, 0, 0.5, 1) infinite`,i.style.boxSizing="border-box",n.appendChild(i);break}case "dots":{n.style.gap="4px";for(let i=0;i<3;i++){let a=document.createElement("div");a.style.width="28%",a.style.height="28%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.animation=`veil-dot-bounce ${s||"1200ms"} ease-in-out infinite`,a.style.animationDelay=`${i*160}ms`,n.appendChild(a);}break}case "bars":{n.style.gap="3px";for(let i=0;i<4;i++){let a=document.createElement("div");a.style.width="18%",a.style.height="100%",a.style.borderRadius="2px",a.style.backgroundColor=l,a.style.animation=`veil-bar-wave ${s||"1000ms"} ease-in-out infinite`,a.style.animationDelay=`${i*140}ms`,n.appendChild(a);}break}case "pulse":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.backgroundColor=l,i.style.animation=`veil-pulse-scale ${s||"1200ms"} ease-out infinite`,n.appendChild(i);break}case "orbit":{let i=document.createElement("div");i.style.width="30%",i.style.height="30%",i.style.borderRadius="50%",i.style.backgroundColor=l,i.style.position="absolute";let a=document.createElement("div");a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.animation=`veil-spin ${s||"1200ms"} linear infinite`;let d=document.createElement("div");d.style.width="24%",d.style.height="24%",d.style.borderRadius="50%",d.style.backgroundColor=l,d.style.position="absolute",d.style.top="0",d.style.left="38%",a.appendChild(d),n.append(i,a);break}case "wave":{n.style.gap="4px";for(let i=0;i<5;i++){let a=document.createElement("div");a.style.width="12%",a.style.height="80%",a.style.borderRadius="3px",a.style.backgroundColor=l,a.style.animation=`veil-wave-dance ${s||"1100ms"} ease-in-out infinite`,a.style.animationDelay=`${i*110}ms`,n.appendChild(a);}break}case "bounce":{let i=document.createElement("div");i.style.width="60%",i.style.height="60%",i.style.borderRadius="50%",i.style.backgroundColor=l,i.style.animation=`veil-bounce-ball ${s||"900ms"} cubic-bezier(0.28, 0.84, 0.42, 1) infinite`,n.appendChild(i);break}case "ios-activity":{for(let i=0;i<12;i++){let a=document.createElement("div");a.style.position="absolute",a.style.width="8%",a.style.height="26%",a.style.backgroundColor=l,a.style.borderRadius="2px",a.style.transformOrigin="50% 190%",a.style.transform=`rotate(${i*30}deg) translateY(-90%)`,a.style.animation=`veil-ios-fade ${s||"1000ms"} linear infinite`,a.style.animationDelay=`-${(12-i)*(1e3/12)}ms`,n.appendChild(a);}break}case "glass-orb":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.background=`radial-gradient(circle at 35% 35%, rgba(255,255,255,0.8), ${l} 70%)`,i.style.boxShadow=`0 4px 12px ${l}44, inset 0 2px 4px rgba(255,255,255,0.6)`,i.style.animation=`veil-glass-orbit ${s||"1600ms"} ease-in-out infinite`,n.appendChild(i);break}case "morph":{let i=document.createElement("div");i.style.width="80%",i.style.height="80%",i.style.backgroundColor=l,i.style.animation=`veil-morph-shape ${s||"2000ms"} ease-in-out infinite`,n.appendChild(i);break}case "progress-circle":{let i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 36 36"),i.style.width="100%",i.style.height="100%",i.style.transform="rotate(-90deg)";let a=document.createElementNS("http://www.w3.org/2000/svg","circle");a.setAttribute("cx","18"),a.setAttribute("cy","18"),a.setAttribute("r","14"),a.setAttribute("fill","none"),a.setAttribute("stroke",r),a.setAttribute("stroke-width","3");let d=document.createElementNS("http://www.w3.org/2000/svg","circle");d.setAttribute("cx","18"),d.setAttribute("cy","18"),d.setAttribute("r","14"),d.setAttribute("fill","none"),d.setAttribute("stroke",l),d.setAttribute("stroke-width","3"),d.setAttribute("stroke-dasharray","88"),d.setAttribute("stroke-dashoffset","25"),d.setAttribute("stroke-linecap","round"),d.style.animation=`veil-spin ${s||"1200ms"} linear infinite`,d.style.transformOrigin="50% 50%",i.append(a,d),n.appendChild(i);break}case "arc-gradient":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.background=`conic-gradient(from 0deg, transparent 20%, ${l} 100%)`,i.style.mask="radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2.5px))",i.style.webkitMask="radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2.5px))",i.style.animation=`veil-spin ${s||"750ms"} linear infinite`,n.appendChild(i);break}case "pulse-ring":{for(let i=0;i<2;i++){let a=document.createElement("div");a.style.position="absolute",a.style.inset="0",a.style.borderRadius="50%",a.style.border=`2px solid ${l}`,a.style.animation=`veil-pulse-ring ${s||"1400ms"} cubic-bezier(0, 0.2, 0.8, 1) infinite`,a.style.animationDelay=`${i*700}ms`,n.appendChild(a);}break}case "dots-circle":{for(let i=0;i<8;i++){let a=document.createElement("div");a.style.position="absolute",a.style.width="20%",a.style.height="20%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.transformOrigin="50% 250%",a.style.transform=`rotate(${i*45}deg) translateY(-150%)`,a.style.animation=`veil-fade-seq ${s||"1000ms"} linear infinite`,a.style.animationDelay=`-${(8-i)*(1e3/8)}ms`,n.appendChild(a);}break}case "grid-dots":{n.style.display="grid",n.style.gridTemplateColumns="repeat(3, 1fr)",n.style.gap="3px";for(let i=0;i<3;i++)for(let a=0;a<3;a++){let d=document.createElement("div");d.style.width="100%",d.style.aspectRatio="1 / 1",d.style.borderRadius="50%",d.style.backgroundColor=l,d.style.animation=`veil-dot-bounce ${s||"1200ms"} ease-in-out infinite`,d.style.animationDelay=`${(i+a)*110}ms`,n.appendChild(d);}break}case "square-flip":{let i=document.createElement("div");i.style.width="60%",i.style.height="60%",i.style.backgroundColor=l,i.style.borderRadius="4px",i.style.animation=`veil-square-flip ${s||"1200ms"} ease-in-out infinite`,n.appendChild(i);break}case "cube-fold":{n.style.display="grid",n.style.gridTemplateColumns="repeat(2, 1fr)",n.style.gap="2px";for(let i=0;i<4;i++){let a=document.createElement("div");a.style.width="100%",a.style.aspectRatio="1 / 1",a.style.backgroundColor=l,a.style.borderRadius="2px",a.style.animation=`veil-cube-fold ${s||"1400ms"} ease-in-out infinite`,a.style.animationDelay=`${i*175}ms`,n.appendChild(a);}break}case "hourglass":{let i=document.createElement("div");i.style.width="65%",i.style.height="65%",i.style.border=`3px solid ${l}`,i.style.borderLeftColor="transparent",i.style.borderRightColor="transparent",i.style.borderRadius="50%",i.style.animation=`veil-hourglass ${s||"1200ms"} cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite`,n.appendChild(i);break}case "infinity":{let i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 48 24"),i.style.width="100%",i.style.height="100%";let a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M12,12 C4,12 4,4 12,4 C20,4 28,20 36,20 C44,20 44,12 36,12 C28,12 20,4 12,4"),a.setAttribute("fill","none"),a.setAttribute("stroke",l),a.setAttribute("stroke-width","3"),a.setAttribute("stroke-dasharray","80"),a.setAttribute("stroke-dashoffset","0"),a.setAttribute("stroke-linecap","round"),a.style.animation=`veil-dash ${s||"1400ms"} linear infinite`,i.appendChild(a),n.appendChild(i);break}case "heartbeat-line":{let i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 50 24"),i.style.width="100%",i.style.height="100%";let a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M0,12 L14,12 L18,3 L24,21 L28,9 L32,15 L36,12 L50,12"),a.setAttribute("fill","none"),a.setAttribute("stroke",l),a.setAttribute("stroke-width","2.5"),a.setAttribute("stroke-dasharray","60"),a.setAttribute("stroke-dashoffset","60"),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round"),a.style.animation=`veil-ecg ${s||"1200ms"} ease-in-out infinite`,i.appendChild(a),n.appendChild(i);break}case "equalizer":{n.style.gap="3px";let i=[0,200,100,300];for(let a=0;a<4;a++){let d=document.createElement("div");d.style.width="18%",d.style.height="100%",d.style.borderRadius="2px",d.style.backgroundColor=l,d.style.animation=`veil-eq-bounce ${s||"800ms"} ease-in-out infinite alternate`,d.style.animationDelay=`${i[a]}ms`,n.appendChild(d);}break}case "chasing-dots":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.position="relative",i.style.animation=`veil-spin ${s||"1800ms"} linear infinite`;for(let a=0;a<2;a++){let d=document.createElement("div");d.style.position="absolute",d.style.width="45%",d.style.height="45%",d.style.borderRadius="50%",d.style.backgroundColor=l,d.style.animation=`veil-chase ${s||"1800ms"} ease-in-out infinite`,a===0?(d.style.top="0",d.style.left="0"):(d.style.bottom="0",d.style.right="0",d.style.animationDelay="-900ms"),i.appendChild(d);}n.appendChild(i);break}case "typing":{n.style.gap="4px";for(let i=0;i<3;i++){let a=document.createElement("div");a.style.width="24%",a.style.height="24%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.animation=`veil-typing ${s||"1000ms"} ease-in-out infinite`,a.style.animationDelay=`${i*150}ms`,n.appendChild(a);}break}case "liquid-fill":{let i=document.createElement("div");i.style.width="85%",i.style.height="85%",i.style.borderRadius="50%",i.style.border=`2px solid ${l}`,i.style.position="relative",i.style.overflow="hidden";let a=document.createElement("div");a.style.position="absolute",a.style.inset="0",a.style.backgroundColor=l,a.style.opacity="0.7",a.style.borderRadius="40%",a.style.animation=`veil-liquid-spin ${s||"2000ms"} linear infinite`,i.appendChild(a),n.appendChild(i);break}case "atom":{let i=document.createElement("div");i.style.width="24%",i.style.height="24%",i.style.borderRadius="50%",i.style.backgroundColor=l,i.style.position="absolute",n.appendChild(i);let a=[0,60,120];for(let d of a){let p=document.createElement("div");p.style.position="absolute",p.style.width="100%",p.style.height="45%",p.style.borderRadius="50%",p.style.border=`1.5px solid ${l}`,p.style.transform=`rotate(${d}deg)`,p.style.animation=`veil-atom-spin ${s||"1600ms"} linear infinite`,n.appendChild(p);}break}case "clock":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.border=`2.5px solid ${l}`,i.style.position="relative";let a=document.createElement("div");a.style.width="14%",a.style.height="14%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.position="absolute",a.style.top="43%",a.style.left="43%";let d=document.createElement("div");d.style.position="absolute",d.style.width="2px",d.style.height="30%",d.style.backgroundColor=l,d.style.top="20%",d.style.left="calc(50% - 1px)",d.style.transformOrigin="bottom center",d.style.animation=`veil-spin ${s||"3000ms"} linear infinite`;let p=document.createElement("div");p.style.position="absolute",p.style.width="2px",p.style.height="42%",p.style.backgroundColor=l,p.style.top="8%",p.style.left="calc(50% - 1px)",p.style.transformOrigin="bottom center",p.style.animation=`veil-spin ${s||"1000ms"} linear infinite`,i.append(a,d,p),n.appendChild(i);break}case "radar":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.border=`1.5px solid ${l}`,i.style.position="relative",i.style.overflow="hidden";let a=document.createElement("div");a.style.position="absolute",a.style.inset="0",a.style.borderRadius="50%",a.style.background=`conic-gradient(from 0deg, transparent 60%, ${l} 100%)`,a.style.opacity="0.6",a.style.animation=`veil-spin ${s||"1500ms"} linear infinite`,i.appendChild(a),n.appendChild(i);break}case "ellipsis":{n.style.gap="3px";for(let i=0;i<3;i++){let a=document.createElement("div");a.style.width="24%",a.style.height="24%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.animation=`veil-ellipsis ${s||"1200ms"} ease-in-out infinite`,a.style.animationDelay=`${i*200}ms`,n.appendChild(a);}break}case "flower":{for(let i=0;i<6;i++){let a=document.createElement("div");a.style.position="absolute",a.style.width="28%",a.style.height="48%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.opacity="0.85",a.style.transformOrigin="50% 100%",a.style.top="2%",a.style.transform=`rotate(${i*60}deg)`,a.style.animation=`veil-flower-bloom ${s||"1600ms"} ease-in-out infinite`,a.style.animationDelay=`${i*120}ms`,n.appendChild(a);}break}}return He(),n}var pe=false;function He(){if(pe||typeof document>"u")return;pe=true;let t=document.createElement("style");t.id="veilkit-spinner-keyframes",t.textContent=`
|
|
511
|
+
`}function h(t){if(ee||typeof document>"u")return;ee=true;let e=Ae(),o=t||te;if(typeof document.adoptedStyleSheets<"u"&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype&&!o)try{let s=new CSSStyleSheet;s.replaceSync(e),document.adoptedStyleSheets=[...document.adoptedStyleSheets,s];return}catch{}let l=document.createElement("style");l.id="veilkit-styles",o&&l.setAttribute("nonce",o),l.textContent=e,document.head.appendChild(l);}var z=class{el=null;innerEl=null;currentProgress=0;trickleTimer=null;status="idle";ensureDOM(){this.el||typeof document>"u"||(h(),this.el=document.createElement("div"),this.el.className="veil-progress-bar",this.el.setAttribute("role","progressbar"),this.el.setAttribute("aria-valuemin","0"),this.el.setAttribute("aria-valuemax","100"),this.el.setAttribute("aria-valuenow","0"),this.innerEl=document.createElement("div"),this.innerEl.className="veil-progress-inner",this.innerEl.style.width="0%",this.innerEl.style.opacity="1",this.el.appendChild(this.innerEl),document.body.appendChild(this.el));}start(){this.ensureDOM(),this.status!=="loading"&&(this.status="loading",this.currentProgress=0,this.set(.08),this.innerEl&&(this.innerEl.style.opacity="1",this.innerEl.style.backgroundColor="var(--veil-progress-color, #3b82f6)"),this.trickle());}set(e){this.ensureDOM(),this.currentProgress=Math.min(1,Math.max(0,e));let o=Math.round(this.currentProgress*100);this.innerEl&&(this.innerEl.style.width=`${o}%`),this.el&&this.el.setAttribute("aria-valuenow",String(o));}inc(e){let o=this.currentProgress;o>=1||(typeof e!="number"&&(o>=0&&o<.2?e=.1:o>=.2&&o<.5?e=.04:o>=.5&&o<.8?e=.02:o>=.8&&o<.99?e=.005:e=0),this.set(o+e));}trickle(){this.stopTrickle(),this.trickleTimer=setInterval(()=>{this.currentProgress<.95&&this.inc();},250);}stopTrickle(){this.trickleTimer&&(clearInterval(this.trickleTimer),this.trickleTimer=null);}done(){this.status!=="idle"&&(this.stopTrickle(),this.set(1),this.status="idle",setTimeout(()=>{this.innerEl&&(this.innerEl.style.opacity="0"),setTimeout(()=>{this.el&&(this.el.remove(),this.el=null,this.innerEl=null),this.currentProgress=0;},350);},200));}fail(){this.stopTrickle(),this.status="error",this.innerEl&&(this.innerEl.style.backgroundColor="#ef4444"),this.set(1),setTimeout(()=>this.done(),500);}},g=new z;function ne(t={}){h();let e=!!t.circular,o=t.color||"var(--veil-progress-color, #3b82f6)",l=t.trackColor||"rgba(0, 0, 0, 0.08)";if(e){let n=t.size!==void 0?typeof t.size=="number"?`${t.size}px`:t.size:"48px",a=t.strokeWidth||4,c=document.createElement("div");c.className=`veil-progress-circular ${t.className||""}`.trim(),c.style.width=n,c.style.height=n,c.style.display="inline-flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.position="relative";let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("viewBox","0 0 48 48"),p.style.width="100%",p.style.height="100%",p.style.transform="rotate(-90deg)";let y=document.createElementNS("http://www.w3.org/2000/svg","circle");y.setAttribute("cx","24"),y.setAttribute("cy","24"),y.setAttribute("r","20"),y.setAttribute("fill","none"),y.setAttribute("stroke",l),y.setAttribute("stroke-width",String(a));let m=document.createElementNS("http://www.w3.org/2000/svg","circle");m.setAttribute("cx","24"),m.setAttribute("cy","24"),m.setAttribute("r","20"),m.setAttribute("fill","none"),m.setAttribute("stroke",o),m.setAttribute("stroke-width",String(a)),m.setAttribute("stroke-linecap","round");let w=2*Math.PI*20;if(m.setAttribute("stroke-dasharray",String(w)),t.value!==void 0){let u=Math.min(100,Math.max(0,t.value)),Le=w-u/100*w;m.setAttribute("stroke-dashoffset",String(Le)),m.style.transition="stroke-dashoffset 300ms ease";}else m.setAttribute("stroke-dashoffset",String(w*.75)),p.style.animation="veil-spin 1200ms linear infinite";if(p.append(y,m),c.appendChild(p),t.showPercentage&&t.value!==void 0){let u=document.createElement("span");u.style.position="absolute",u.style.fontSize="11px",u.style.fontWeight="600",u.textContent=`${Math.round(t.value)}%`,c.appendChild(u);}return c}let s=t.height!==void 0?typeof t.height=="number"?`${t.height}px`:t.height:"4px",r=document.createElement("div");r.className=`veil-progress-linear ${t.className||""}`.trim(),r.setAttribute("role","progressbar"),r.style.width="100%",r.style.height=s,r.style.backgroundColor=l,r.style.borderRadius="9999px",r.style.overflow="hidden",r.style.position="relative";let i=document.createElement("div");if(i.style.height="100%",i.style.backgroundColor=o,i.style.borderRadius="9999px",t.value!==void 0){let n=Math.min(100,Math.max(0,t.value));r.setAttribute("aria-valuenow",String(n)),i.style.width=`${n}%`,i.style.transition="width 250ms ease";}else i.style.width="35%",i.style.animation="veil-progress-indeterminate 1400ms ease-in-out infinite";return r.appendChild(i),r}var B=class{activeIds=new Set;counter=0;listeners=new Set;start(e){let o=e||`req_${Date.now()}_${Math.random().toString(36).substring(2,7)}`;return this.activeIds.has(o)||(this.activeIds.add(o),this.counter++,this.notify()),o}stop(e){if(e)this.activeIds.has(e)&&(this.activeIds.delete(e),this.counter=Math.max(0,this.counter-1),this.notify());else if(this.counter>0){this.counter--;let o=this.activeIds.values().next().value;o&&this.activeIds.delete(o),this.notify();}}isLoading(){return this.counter>0}getCount(){return this.counter}subscribe(e){return this.listeners.add(e),e(this.isLoading(),this.counter),()=>{this.listeners.delete(e);}}reset(){this.activeIds.clear(),this.counter=0,this.notify();}notify(){let e=this.isLoading();for(let o of this.listeners)o(e,this.counter);}},C=new B;function st(){return {start:()=>g.start(),set:t=>g.set(t),inc:t=>g.inc(t),done:()=>g.done(),fail:()=>g.fail()}}function Re(t,e={}){let o=ref(false),l=null;return onMounted(()=>{l=new L({delay:e.delay!==void 0?e.delay:150,minVisible:e.minVisible!==void 0?e.minVisible:300,onShow:()=>{o.value=true;},onHide:()=>{o.value=false;}}),t.value&&l.start();}),watch(()=>t.value,s=>{l&&(s?l.start():l.finish());}),onUnmounted(()=>{l&&(l.destroy(),l=null);}),o}function rt(t,e={}){let o=ref(false),l=ref(null),s=ref(null);return {loading:Re(o,e),rawLoading:o,data:l,error:s,execute:async(...n)=>{o.value=true,s.value=null;let a=C.start();try{let c=await t(...n);return l.value=c,c}catch(c){throw s.value=c,c}finally{C.stop(a),o.value=false;}}}}var H=0;function Ve(){return H===0&&typeof performance<"u"&&(H=performance.now()),H}function O(t=1500){if(typeof performance>"u")return "0ms";let e=performance.now()-Ve();return `-${Math.round(e%t)}ms`}function ae(t=1500){if(typeof t=="number")return t;if(!t)return 1500;let e=t.trim().toLowerCase();return e.endsWith("ms")?parseFloat(e)||1500:e.endsWith("s")?(parseFloat(e)||1.5)*1e3:parseFloat(e)||1500}var $=null,se=new Set,re=false;function Ne(t){for(let e of t){let o=e.target;e.isIntersecting?(o.removeAttribute("data-veil-offscreen"),o.style.removeProperty("--veil-play-state")):(o.setAttribute("data-veil-offscreen","true"),o.style.setProperty("--veil-play-state","paused"));}}function Ie(){re||typeof document>"u"||(re=true,document.addEventListener("visibilitychange",()=>{document.hidden?document.documentElement.setAttribute("data-veil-tab-hidden","true"):document.documentElement.removeAttribute("data-veil-tab-hidden");}));}function le(t){return typeof window>"u"||typeof IntersectionObserver>"u"?()=>{}:(Ie(),$||($=new IntersectionObserver(Ne,{rootMargin:"100px 0px",threshold:0})),$.observe(t),se.add(t),()=>{$&&t&&($.unobserve(t),se.delete(t));})}function d(t={}){h();let e=document.createElement("div");e.className=`veil-skeleton ${t.className||""}`.trim(),e.setAttribute("aria-hidden","true");let o=t.type||"rect";if(e.setAttribute("data-veil-shape",o),t.animation&&e.setAttribute("data-veil-anim",t.animation),t.direction&&e.setAttribute("data-veil-dir",t.direction),typeof t.theme=="string"&&e.setAttribute("data-veil-theme",t.theme),t.width!==void 0&&(e.style.width=typeof t.width=="number"?`${t.width}px`:t.width),t.height!==void 0&&(e.style.height=typeof t.height=="number"?`${t.height}px`:t.height),t.radius!==void 0&&(e.style.setProperty("--veil-radius",typeof t.radius=="number"?`${t.radius}px`:t.radius),e.style.borderRadius=typeof t.radius=="number"?`${t.radius}px`:t.radius),t.speed!==void 0){let l=ae(t.speed);e.style.setProperty("--veil-duration",`${l}ms`),e.style.setProperty("--veil-sync-delay",O(l));}else e.style.setProperty("--veil-sync-delay",O(1500));if(t.style)for(let[l,s]of Object.entries(t.style))e.style[l]=s;return le(e),e}function f(t=3,e={}){let o=document.createElement("div");o.className=`veil-lines-group ${e.className||""}`.trim(),o.setAttribute("aria-hidden","true");let l=e.gap!==void 0?typeof e.gap=="number"?`${e.gap}px`:e.gap:"0.45rem";o.style.display="flex",o.style.flexDirection="column",o.style.gap=l;let s=["100%","94%","88%","75%"],r=e.lastLineWidth!==void 0?typeof e.lastLineWidth=="number"?`${e.lastLineWidth}px`:e.lastLineWidth:"65%";for(let i=0;i<t;i++){let a=i===t-1?r:s[i%s.length]||"95%",c=d({...e,type:"line",width:a});c.style.setProperty("--veil-stagger-idx",String(i)),o.appendChild(c);}return o}function oe(t,e={}){switch(t){case "paragraph":return f(e.lines||3,e);case "line":return d({...e,type:"line"});case "heading":return d({...e,type:"heading",width:e.width||"65%"});case "circle":return d({...e,type:"circle",width:e.width||e.height||"40px",height:e.height||e.width||"40px",radius:"50%"});case "image":return d({...e,type:"rect",width:e.width||"100%",height:e.height||"200px",radius:e.radius||"8px"});case "button":return d({...e,type:"button",width:e.width||"120px",height:e.height||"38px"});case "badge":return d({...e,type:"badge",width:e.width||"64px",height:e.height||"22px"});case "icon":return d({...e,type:"icon",width:e.width||"24px",height:e.height||"24px"});case "input":return d({...e,type:"input",width:e.width||"100%",height:e.height||"40px"});case "divider":return d({...e,type:"divider",width:"100%",height:"1px"});case "table-row":{let o=document.createElement("div");o.style.display="flex",o.style.gap="1rem",o.style.alignItems="center",o.style.width="100%",o.style.padding="0.5rem 0";let l=e.count||4;for(let s=0;s<l;s++){let r=d({...e,type:"line",width:`${100/l}%`,height:"16px"});o.appendChild(r);}return o}default:return d(e)}}function de(t,e={}){let o=e.transition||"fade";if(o==="none"){e.onComplete&&e.onComplete();return}if(t.classList.add("veil-revealing"),o==="stagger-children"){let r=Array.from(t.children);r.forEach((n,a)=>{n.classList.add("veil-reveal-fade"),n.style.animationDelay=`${a*60}ms`,e.duration&&(n.style.animationDuration=`${e.duration}ms`);});let i=(e.duration||350)+r.length*60;setTimeout(()=>{t.classList.remove("veil-revealing"),r.forEach(n=>{n.classList.remove("veil-reveal-fade"),n.style.removeProperty("animation-delay"),n.style.removeProperty("animation-duration");}),e.onComplete&&e.onComplete();},i);return}let l=`veil-reveal-${o}`;t.classList.add(l),e.duration&&(t.style.animationDuration=`${e.duration}ms`),e.easing&&(t.style.animationTimingFunction=e.easing);let s=()=>{t.removeEventListener("animationend",s),t.classList.remove("veil-revealing",l),t.style.removeProperty("animation-duration"),t.style.removeProperty("animation-timing-function"),e.onComplete&&e.onComplete();};t.addEventListener("animationend",s);}var V=new Map;function De(t){if(V.has(t))return V.get(t);if(typeof window<"u"&&window.localStorage)try{let e=localStorage.getItem(`veil_cache_${t}`);if(e){let o=JSON.parse(e);return V.set(t,o),o}}catch{}return null}function ze(t,e,o=false){if(V.set(t,e),o&&typeof window<"u"&&window.localStorage)try{localStorage.setItem(`veil_cache_${t}`,JSON.stringify(e));}catch{}}function Be(t,e){let o=t.getBoundingClientRect(),l=[];function s(i){if(i.hasAttribute("data-veil-ignore")||e&&i.matches(e))return false;let n=window.getComputedStyle(i);if(n.display==="none"||n.visibility==="hidden"||n.opacity==="0")return false;let a=i.tagName.toLowerCase();return ["img","svg","button","input","textarea","select"].includes(a)||i.hasAttribute("data-veil-shape")?true:Array.from(i.childNodes).some(p=>p.nodeType===Node.TEXT_NODE&&(p.textContent||"").trim().length>0)&&i.children.length===0}function r(i){if(i!==t&&s(i)){let a=i.getBoundingClientRect();if(a.width>2&&a.height>2){let p=window.getComputedStyle(i).borderRadius||"6px",y=i.getAttribute("data-veil-shape"),m="rect";y==="circle"||p==="50%"||p.includes("px")&&parseFloat(p)>=a.width/2?m="circle":(y==="line"||["p","span","h1","h2","h3","h4","h5","h6","a","label"].includes(i.tagName.toLowerCase()))&&(m="line"),l.push({x:Math.round(a.left-o.left),y:Math.round(a.top-o.top),width:Math.round(a.width),height:Math.round(a.height),radius:p,shape:m});}return}let n=Array.from(i.children);for(let a of n)a.hasAttribute("data-veil-ignore")||r(a);}return r(t),{width:Math.round(o.width),height:Math.round(o.height),boxes:l}}function T(t,e={},o={}){let l=document.createElement("div");if(l.className="veil-auto-overlay",l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.width="100%",l.style.height="100%",l.style.pointerEvents="none",l.style.zIndex="5",!e.preserveBackground){let c=window.getComputedStyle(t);l.style.backgroundColor=c.backgroundColor!=="rgba(0, 0, 0, 0)"?c.backgroundColor:"transparent";}function s(c){l.innerHTML="";for(let p=0;p<c.boxes.length;p++){let y=c.boxes[p],m=d({...o,type:y.shape,radius:y.radius});m.style.position="absolute",m.style.left=`${y.x}px`,m.style.top=`${y.y}px`,m.style.width=`${y.width}px`,m.style.height=`${y.height}px`,m.style.setProperty("--veil-stagger-idx",String(p)),l.appendChild(m);}}function r(){let c=Be(t,e.ignoreSelector);c.boxes.length>0&&(s(c),e.cacheKey&&ze(e.cacheKey,c,e.persistCache));}if(e.cacheKey){let c=De(e.cacheKey);c&&s(c);}window.getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.appendChild(l),l.children.length===0&&r();let n=null,a=null;return e.observeResize!==false&&typeof ResizeObserver<"u"&&(n=new ResizeObserver(()=>r()),n.observe(t)),e.observeMutations!==false&&typeof MutationObserver<"u"&&(a=new MutationObserver(()=>r()),a.observe(t,{childList:true,subtree:true,attributes:false})),{overlay:l,refresh:r,destroy:()=>{n&&n.disconnect(),a&&a.disconnect(),e.reveal&&e.reveal!=="none"?de(t,{transition:e.reveal,duration:e.revealDuration,easing:e.revealEasing,onComplete:()=>l.remove()}):l.remove();}}}var N=new WeakMap,ce={mounted(t,e){h();let o={};N.set(t,o),e.value&&(o.overlayInstance=T(t,{observeResize:true,observeMutations:true,reveal:"fade"}),t.setAttribute("aria-busy","true"));},updated(t,e){let o=N.get(t);o&&(e.value&&!o.overlayInstance?(o.overlayInstance=T(t,{observeResize:true,observeMutations:true,reveal:"fade"}),t.setAttribute("aria-busy","true")):!e.value&&o.overlayInstance&&(o.overlayInstance.destroy(),o.overlayInstance=void 0,t.removeAttribute("aria-busy")));},unmounted(t){let e=N.get(t);e?.overlayInstance&&(e.overlayInstance.destroy(),e.overlayInstance=void 0),N.delete(t);}};function v(t={}){h();let e=t.type||"ring",o=t.size!==void 0?typeof t.size=="number"?`${t.size}px`:t.size:"28px",l=t.color||"var(--veil-progress-color, #3b82f6)",s=t.secondaryColor||"rgba(0, 0, 0, 0.12)",r=t.speed!==void 0?typeof t.speed=="number"?`${t.speed}ms`:t.speed:void 0,i=document.createElement("div");switch(i.className=`veil-spinner veil-spinner-${e} ${t.glass?"veil-spinner-glass":""} ${t.className||""}`.trim(),i.setAttribute("role","status"),i.setAttribute("aria-label",t.label||"Loading"),i.style.width=o,i.style.height=o,i.style.display="inline-flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.position="relative",t.glass&&(i.style.borderRadius="50%",i.style.backdropFilter="blur(8px)",i.style.webkitBackdropFilter="blur(8px)",i.style.background="rgba(255, 255, 255, 0.12)",i.style.boxShadow="0 4px 16px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.4)",i.style.border="1px solid rgba(255, 255, 255, 0.25)"),e){case "ring":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.border=`3px solid ${s}`,n.style.borderTopColor=l,n.style.animation=`veil-spin ${r||"800ms"} linear infinite`,n.style.boxSizing="border-box",i.appendChild(n);break}case "dual-ring":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.border="3px solid transparent",n.style.borderTopColor=l,n.style.borderBottomColor=l,n.style.animation=`veil-spin ${r||"900ms"} cubic-bezier(0.5, 0, 0.5, 1) infinite`,n.style.boxSizing="border-box",i.appendChild(n);break}case "dots":{i.style.gap="4px";for(let n=0;n<3;n++){let a=document.createElement("div");a.style.width="28%",a.style.height="28%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.animation=`veil-dot-bounce ${r||"1200ms"} ease-in-out infinite`,a.style.animationDelay=`${n*160}ms`,i.appendChild(a);}break}case "bars":{i.style.gap="3px";for(let n=0;n<4;n++){let a=document.createElement("div");a.style.width="18%",a.style.height="100%",a.style.borderRadius="2px",a.style.backgroundColor=l,a.style.animation=`veil-bar-wave ${r||"1000ms"} ease-in-out infinite`,a.style.animationDelay=`${n*140}ms`,i.appendChild(a);}break}case "pulse":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.backgroundColor=l,n.style.animation=`veil-pulse-scale ${r||"1200ms"} ease-out infinite`,i.appendChild(n);break}case "orbit":{let n=document.createElement("div");n.style.width="30%",n.style.height="30%",n.style.borderRadius="50%",n.style.backgroundColor=l,n.style.position="absolute";let a=document.createElement("div");a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.animation=`veil-spin ${r||"1200ms"} linear infinite`;let c=document.createElement("div");c.style.width="24%",c.style.height="24%",c.style.borderRadius="50%",c.style.backgroundColor=l,c.style.position="absolute",c.style.top="0",c.style.left="38%",a.appendChild(c),i.append(n,a);break}case "wave":{i.style.gap="4px";for(let n=0;n<5;n++){let a=document.createElement("div");a.style.width="12%",a.style.height="80%",a.style.borderRadius="3px",a.style.backgroundColor=l,a.style.animation=`veil-wave-dance ${r||"1100ms"} ease-in-out infinite`,a.style.animationDelay=`${n*110}ms`,i.appendChild(a);}break}case "bounce":{let n=document.createElement("div");n.style.width="60%",n.style.height="60%",n.style.borderRadius="50%",n.style.backgroundColor=l,n.style.animation=`veil-bounce-ball ${r||"900ms"} cubic-bezier(0.28, 0.84, 0.42, 1) infinite`,i.appendChild(n);break}case "ios-activity":{for(let n=0;n<12;n++){let a=document.createElement("div");a.style.position="absolute",a.style.width="8%",a.style.height="26%",a.style.backgroundColor=l,a.style.borderRadius="2px",a.style.transformOrigin="50% 190%",a.style.transform=`rotate(${n*30}deg) translateY(-90%)`,a.style.animation=`veil-ios-fade ${r||"1000ms"} linear infinite`,a.style.animationDelay=`-${(12-n)*(1e3/12)}ms`,i.appendChild(a);}break}case "glass-orb":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.background=`radial-gradient(circle at 35% 35%, rgba(255,255,255,0.8), ${l} 70%)`,n.style.boxShadow=`0 4px 12px ${l}44, inset 0 2px 4px rgba(255,255,255,0.6)`,n.style.animation=`veil-glass-orbit ${r||"1600ms"} ease-in-out infinite`,i.appendChild(n);break}case "morph":{let n=document.createElement("div");n.style.width="80%",n.style.height="80%",n.style.backgroundColor=l,n.style.animation=`veil-morph-shape ${r||"2000ms"} ease-in-out infinite`,i.appendChild(n);break}case "progress-circle":{let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 36 36"),n.style.width="100%",n.style.height="100%",n.style.transform="rotate(-90deg)";let a=document.createElementNS("http://www.w3.org/2000/svg","circle");a.setAttribute("cx","18"),a.setAttribute("cy","18"),a.setAttribute("r","14"),a.setAttribute("fill","none"),a.setAttribute("stroke",s),a.setAttribute("stroke-width","3");let c=document.createElementNS("http://www.w3.org/2000/svg","circle");c.setAttribute("cx","18"),c.setAttribute("cy","18"),c.setAttribute("r","14"),c.setAttribute("fill","none"),c.setAttribute("stroke",l),c.setAttribute("stroke-width","3"),c.setAttribute("stroke-dasharray","88"),c.setAttribute("stroke-dashoffset","25"),c.setAttribute("stroke-linecap","round"),c.style.animation=`veil-spin ${r||"1200ms"} linear infinite`,c.style.transformOrigin="50% 50%",n.append(a,c),i.appendChild(n);break}case "arc-gradient":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.background=`conic-gradient(from 0deg, transparent 20%, ${l} 100%)`,n.style.mask="radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2.5px))",n.style.webkitMask="radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2.5px))",n.style.animation=`veil-spin ${r||"750ms"} linear infinite`,i.appendChild(n);break}case "pulse-ring":{for(let n=0;n<2;n++){let a=document.createElement("div");a.style.position="absolute",a.style.inset="0",a.style.borderRadius="50%",a.style.border=`2px solid ${l}`,a.style.animation=`veil-pulse-ring ${r||"1400ms"} cubic-bezier(0, 0.2, 0.8, 1) infinite`,a.style.animationDelay=`${n*700}ms`,i.appendChild(a);}break}case "dots-circle":{for(let n=0;n<8;n++){let a=document.createElement("div");a.style.position="absolute",a.style.width="20%",a.style.height="20%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.transformOrigin="50% 250%",a.style.transform=`rotate(${n*45}deg) translateY(-150%)`,a.style.animation=`veil-fade-seq ${r||"1000ms"} linear infinite`,a.style.animationDelay=`-${(8-n)*(1e3/8)}ms`,i.appendChild(a);}break}case "grid-dots":{i.style.display="grid",i.style.gridTemplateColumns="repeat(3, 1fr)",i.style.gap="3px";for(let n=0;n<3;n++)for(let a=0;a<3;a++){let c=document.createElement("div");c.style.width="100%",c.style.aspectRatio="1 / 1",c.style.borderRadius="50%",c.style.backgroundColor=l,c.style.animation=`veil-dot-bounce ${r||"1200ms"} ease-in-out infinite`,c.style.animationDelay=`${(n+a)*110}ms`,i.appendChild(c);}break}case "square-flip":{let n=document.createElement("div");n.style.width="60%",n.style.height="60%",n.style.backgroundColor=l,n.style.borderRadius="4px",n.style.animation=`veil-square-flip ${r||"1200ms"} ease-in-out infinite`,i.appendChild(n);break}case "cube-fold":{i.style.display="grid",i.style.gridTemplateColumns="repeat(2, 1fr)",i.style.gap="2px";for(let n=0;n<4;n++){let a=document.createElement("div");a.style.width="100%",a.style.aspectRatio="1 / 1",a.style.backgroundColor=l,a.style.borderRadius="2px",a.style.animation=`veil-cube-fold ${r||"1400ms"} ease-in-out infinite`,a.style.animationDelay=`${n*175}ms`,i.appendChild(a);}break}case "hourglass":{let n=document.createElement("div");n.style.width="65%",n.style.height="65%",n.style.border=`3px solid ${l}`,n.style.borderLeftColor="transparent",n.style.borderRightColor="transparent",n.style.borderRadius="50%",n.style.animation=`veil-hourglass ${r||"1200ms"} cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite`,i.appendChild(n);break}case "infinity":{let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 48 24"),n.style.width="100%",n.style.height="100%";let a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M12,12 C4,12 4,4 12,4 C20,4 28,20 36,20 C44,20 44,12 36,12 C28,12 20,4 12,4"),a.setAttribute("fill","none"),a.setAttribute("stroke",l),a.setAttribute("stroke-width","3"),a.setAttribute("stroke-dasharray","80"),a.setAttribute("stroke-dashoffset","0"),a.setAttribute("stroke-linecap","round"),a.style.animation=`veil-dash ${r||"1400ms"} linear infinite`,n.appendChild(a),i.appendChild(n);break}case "heartbeat-line":{let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 50 24"),n.style.width="100%",n.style.height="100%";let a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M0,12 L14,12 L18,3 L24,21 L28,9 L32,15 L36,12 L50,12"),a.setAttribute("fill","none"),a.setAttribute("stroke",l),a.setAttribute("stroke-width","2.5"),a.setAttribute("stroke-dasharray","60"),a.setAttribute("stroke-dashoffset","60"),a.setAttribute("stroke-linecap","round"),a.setAttribute("stroke-linejoin","round"),a.style.animation=`veil-ecg ${r||"1200ms"} ease-in-out infinite`,n.appendChild(a),i.appendChild(n);break}case "equalizer":{i.style.gap="3px";let n=[0,200,100,300];for(let a=0;a<4;a++){let c=document.createElement("div");c.style.width="18%",c.style.height="100%",c.style.borderRadius="2px",c.style.backgroundColor=l,c.style.animation=`veil-eq-bounce ${r||"800ms"} ease-in-out infinite alternate`,c.style.animationDelay=`${n[a]}ms`,i.appendChild(c);}break}case "chasing-dots":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.position="relative",n.style.animation=`veil-spin ${r||"1800ms"} linear infinite`;for(let a=0;a<2;a++){let c=document.createElement("div");c.style.position="absolute",c.style.width="45%",c.style.height="45%",c.style.borderRadius="50%",c.style.backgroundColor=l,c.style.animation=`veil-chase ${r||"1800ms"} ease-in-out infinite`,a===0?(c.style.top="0",c.style.left="0"):(c.style.bottom="0",c.style.right="0",c.style.animationDelay="-900ms"),n.appendChild(c);}i.appendChild(n);break}case "typing":{i.style.gap="4px";for(let n=0;n<3;n++){let a=document.createElement("div");a.style.width="24%",a.style.height="24%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.animation=`veil-typing ${r||"1000ms"} ease-in-out infinite`,a.style.animationDelay=`${n*150}ms`,i.appendChild(a);}break}case "liquid-fill":{let n=document.createElement("div");n.style.width="85%",n.style.height="85%",n.style.borderRadius="50%",n.style.border=`2px solid ${l}`,n.style.position="relative",n.style.overflow="hidden";let a=document.createElement("div");a.style.position="absolute",a.style.inset="0",a.style.backgroundColor=l,a.style.opacity="0.7",a.style.borderRadius="40%",a.style.animation=`veil-liquid-spin ${r||"2000ms"} linear infinite`,n.appendChild(a),i.appendChild(n);break}case "atom":{let n=document.createElement("div");n.style.width="24%",n.style.height="24%",n.style.borderRadius="50%",n.style.backgroundColor=l,n.style.position="absolute",i.appendChild(n);let a=[0,60,120];for(let c of a){let p=document.createElement("div");p.style.position="absolute",p.style.width="100%",p.style.height="45%",p.style.borderRadius="50%",p.style.border=`1.5px solid ${l}`,p.style.transform=`rotate(${c}deg)`,p.style.animation=`veil-atom-spin ${r||"1600ms"} linear infinite`,i.appendChild(p);}break}case "clock":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.border=`2.5px solid ${l}`,n.style.position="relative";let a=document.createElement("div");a.style.width="14%",a.style.height="14%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.position="absolute",a.style.top="43%",a.style.left="43%";let c=document.createElement("div");c.style.position="absolute",c.style.width="2px",c.style.height="30%",c.style.backgroundColor=l,c.style.top="20%",c.style.left="calc(50% - 1px)",c.style.transformOrigin="bottom center",c.style.animation=`veil-spin ${r||"3000ms"} linear infinite`;let p=document.createElement("div");p.style.position="absolute",p.style.width="2px",p.style.height="42%",p.style.backgroundColor=l,p.style.top="8%",p.style.left="calc(50% - 1px)",p.style.transformOrigin="bottom center",p.style.animation=`veil-spin ${r||"1000ms"} linear infinite`,n.append(a,c,p),i.appendChild(n);break}case "radar":{let n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.borderRadius="50%",n.style.border=`1.5px solid ${l}`,n.style.position="relative",n.style.overflow="hidden";let a=document.createElement("div");a.style.position="absolute",a.style.inset="0",a.style.borderRadius="50%",a.style.background=`conic-gradient(from 0deg, transparent 60%, ${l} 100%)`,a.style.opacity="0.6",a.style.animation=`veil-spin ${r||"1500ms"} linear infinite`,n.appendChild(a),i.appendChild(n);break}case "ellipsis":{i.style.gap="3px";for(let n=0;n<3;n++){let a=document.createElement("div");a.style.width="24%",a.style.height="24%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.animation=`veil-ellipsis ${r||"1200ms"} ease-in-out infinite`,a.style.animationDelay=`${n*200}ms`,i.appendChild(a);}break}case "flower":{for(let n=0;n<6;n++){let a=document.createElement("div");a.style.position="absolute",a.style.width="28%",a.style.height="48%",a.style.borderRadius="50%",a.style.backgroundColor=l,a.style.opacity="0.85",a.style.transformOrigin="50% 100%",a.style.top="2%",a.style.transform=`rotate(${n*60}deg)`,a.style.animation=`veil-flower-bloom ${r||"1600ms"} ease-in-out infinite`,a.style.animationDelay=`${n*120}ms`,i.appendChild(a);}break}}return He(),i}var pe=false;function He(){if(pe||typeof document>"u")return;pe=true;let t=document.createElement("style");t.id="veilkit-spinner-keyframes",t.textContent=`
|
|
512
512
|
@keyframes veil-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
|
|
513
513
|
@keyframes veil-dot-bounce { 0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
|
|
514
514
|
@keyframes veil-bar-wave { 0%, 100% { transform: scaleY(0.3); opacity: 0.5; } 50% { transform: scaleY(1); opacity: 1; } }
|
|
@@ -580,7 +580,7 @@ ${Q()}
|
|
|
580
580
|
0%, 100% { transform: scale(0.7); opacity: 0.5; }
|
|
581
581
|
50% { transform: scale(1); opacity: 1; }
|
|
582
582
|
}
|
|
583
|
-
`,document.head.appendChild(t);}function P(t){let e=document.createElement("div");e.className=`veil-preset veil-preset-${t.name} ${t.className||""}`.trim(),e.setAttribute("aria-hidden","true"),e.style.width=t.width!==void 0?typeof t.width=="number"?`${t.width}px`:t.width:"100%",e.style.boxSizing="border-box";let o=t.shape||"rounded",l;o==="pill"?l="9999px":o==="square"?l="4px":o==="sharp"&&(l="0px"),o==="glass"&&(e.style.backdropFilter="blur(10px)",e.style.webkitBackdropFilter="blur(10px)",e.style.background="rgba(255, 255, 255, 0.08)",e.style.border="1px solid rgba(255, 255, 255, 0.18)",e.style.boxShadow="0 8px 32px rgba(0, 0, 0, 0.08)");let r={animation:t.animation,theme:t.theme,direction:t.direction,speed:t.speed,radius:l};switch(t.name){case "card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.08)";let s=c({...r,type:"rect",height:"180px",radius:l||"8px"}),n=c({...r,type:"heading",width:"70%",height:"24px"}),i=f(2,r),a=c({...r,type:"button",width:"110px",height:"36px"});e.append(s,n,i,a);break}case "product-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.padding="14px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"rect",height:"200px",radius:l||"10px"}),n=c({...r,type:"badge",width:"50px",height:"18px"}),i=c({...r,type:"line",width:"85%",height:"18px"}),a=c({...r,type:"line",width:"40%",height:"22px"}),d=c({...r,type:"button",width:"100%",height:"38px"});e.append(s,n,i,a,d);break}case "product-grid":{let s=t.items||4,n=t.columns||2;e.style.display="grid",e.style.gridTemplateColumns=`repeat(${n}, 1fr)`,e.style.gap="16px";for(let i=0;i<s;i++){let a=P({...t,name:"product-card",width:"100%"});e.appendChild(a);}break}case "list":{let s=t.items||4;e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px";for(let n=0;n<s;n++){let i=c({...r,type:"line",width:`${95-n%3*15}%`,height:"18px"});e.appendChild(i);}break}case "list-item":{e.style.display="flex",e.style.alignItems="center",e.style.gap="14px",e.style.padding="10px 0";let s=c({...r,type:"circle",width:"44px",height:"44px"}),n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="6px",n.style.flex="1";let i=c({...r,type:"line",width:"60%",height:"16px"}),a=c({...r,type:"line",width:"40%",height:"12px"});n.append(i,a),e.append(s,n);break}case "table":{let s=t.items||5;e.style.display="flex",e.style.flexDirection="column",e.style.gap="8px",e.style.padding="12px",e.style.borderRadius=l||"8px",e.style.border="1px solid rgba(0,0,0,0.06)";let n=document.createElement("div");n.style.display="grid",n.style.gridTemplateColumns="2fr 1fr 1fr 1fr",n.style.gap="12px",n.style.paddingBottom="8px",n.style.borderBottom="2px solid rgba(0,0,0,0.08)";for(let i=0;i<4;i++)n.appendChild(c({...r,type:"line",height:"16px"}));e.appendChild(n);for(let i=0;i<s;i++){let a=document.createElement("div");a.style.display="grid",a.style.gridTemplateColumns="2fr 1fr 1fr 1fr",a.style.gap="12px",a.style.padding="8px 0",a.style.borderBottom="1px solid rgba(0,0,0,0.04)";for(let d=0;d<4;d++)a.appendChild(c({...r,type:"line",height:"14px"}));e.appendChild(a);}break}case "profile":{e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap="14px",e.style.padding="24px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"circle",width:"88px",height:"88px"}),n=c({...r,type:"heading",width:"160px",height:"22px"}),i=f(2,r),a=document.createElement("div");a.style.display="flex",a.style.gap="10px",a.append(c({...r,type:"button",width:"100px",height:"34px"}),c({...r,type:"button",width:"100px",height:"34px"})),e.append(s,n,i,a);break}case "profile-header":{e.style.display="flex",e.style.flexDirection="column",e.style.borderRadius=l||"16px",e.style.overflow="hidden",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"rect",height:"140px",radius:"0"}),n=document.createElement("div");n.style.display="flex",n.style.alignItems="flex-end",n.style.gap="16px",n.style.padding="0 20px 20px 20px",n.style.marginTop="-40px";let i=c({...r,type:"circle",width:"80px",height:"80px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="6px",a.style.flex="1",a.append(c({...r,type:"heading",width:"140px",height:"20px"}),c({...r,type:"line",width:"200px",height:"14px"})),n.append(i,a),e.append(s,n);break}case "feed-post":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.08)";let s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.gap="10px",s.append(c({...r,type:"circle",width:"40px",height:"40px"}),c({...r,type:"line",width:"120px",height:"16px"}));let n=f(2,r),i=c({...r,type:"rect",height:"220px",radius:l||"8px"}),a=document.createElement("div");a.style.display="flex",a.style.gap="16px",a.append(c({...r,type:"button",width:"60px",height:"28px"}),c({...r,type:"button",width:"60px",height:"28px"})),e.append(s,n,i,a);break}case "article":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let s=c({...r,type:"heading",width:"85%",height:"36px"}),n=document.createElement("div");n.style.display="flex",n.style.gap="12px",n.append(c({...r,type:"circle",width:"32px",height:"32px"}),c({...r,type:"line",width:"140px",height:"14px"}));let i=c({...r,type:"rect",height:"260px",radius:l||"10px"}),a=f(4,r),d=f(3,r);e.append(s,n,i,a,d);break}case "comment-thread":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";for(let s=0;s<3;s++){let n=document.createElement("div");n.style.display="flex",n.style.gap="12px",s===1&&(n.style.marginLeft="40px");let i=c({...r,type:"circle",width:"36px",height:"36px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="6px",a.style.flex="1",a.append(c({...r,type:"line",width:"120px",height:"14px"}),f(2,r)),n.append(i,a),e.appendChild(n);}break}case "chat":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px",e.style.padding="16px";let s=[{align:"flex-start",w:"65%"},{align:"flex-end",w:"50%"},{align:"flex-start",w:"80%"},{align:"flex-end",w:"40%"}];for(let n of s){let i=document.createElement("div");i.style.display="flex",i.style.justifyContent=n.align;let a=c({...r,type:"rect",width:n.w,height:"42px",radius:l||"18px"});i.appendChild(a),e.appendChild(i);}break}case "dashboard":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let s=document.createElement("div");s.style.display="grid",s.style.gridTemplateColumns="repeat(3, 1fr)",s.style.gap="12px";for(let i=0;i<3;i++){let a=document.createElement("div");a.style.padding="16px",a.style.borderRadius=l||"10px",a.style.border="1px solid rgba(0,0,0,0.06)",a.style.display="flex",a.style.flexDirection="column",a.style.gap="8px",a.append(c({...r,type:"line",width:"60%",height:"14px"}),c({...r,type:"heading",width:"80%",height:"28px"})),s.appendChild(a);}let n=c({...r,type:"rect",height:"200px",radius:l||"10px"});e.append(s,n);break}case "form":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="20px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";for(let n=0;n<3;n++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.append(c({...r,type:"line",width:"30%",height:"14px"}),c({...r,type:"input",width:"100%",height:"40px"})),e.appendChild(i);}let s=c({...r,type:"button",width:"140px",height:"40px"});e.appendChild(s);break}case "media-card":{e.style.display="flex",e.style.gap="16px",e.style.padding="12px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"rect",width:"140px",height:"90px",radius:l||"8px"}),n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="8px",n.style.flex="1",n.append(c({...r,type:"heading",width:"80%",height:"18px"}),c({...r,type:"line",width:"60%",height:"14px"}),c({...r,type:"line",width:"40%",height:"12px"})),e.append(s,n);break}case "navbar":{e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="space-between",e.style.padding="12px 20px",e.style.borderBottom="1px solid rgba(0,0,0,0.08)";let s=c({...r,type:"heading",width:"110px",height:"24px"}),n=document.createElement("div");n.style.display="flex",n.style.gap="18px";for(let a=0;a<4;a++)n.appendChild(c({...r,type:"line",width:"60px",height:"14px"}));let i=c({...r,type:"button",width:"90px",height:"34px"});e.append(s,n,i);break}case "sidebar":{e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="space-between",e.style.padding="18px 14px",e.style.height="100%",e.style.minHeight="320px",e.style.borderRight="1px solid rgba(0,0,0,0.08)";let s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="16px",s.appendChild(c({...r,type:"heading",width:"100px",height:"22px"}));for(let i=0;i<5;i++){let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="10px",a.append(c({...r,type:"icon",width:"20px",height:"20px"}),c({...r,type:"line",width:"90px",height:"14px"})),s.appendChild(a);}let n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.gap="10px",n.append(c({...r,type:"circle",width:"36px",height:"36px"}),c({...r,type:"line",width:"80px",height:"14px"})),e.append(s,n);break}case "settings-page":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="24px",e.style.padding="24px";let s=c({...r,type:"heading",width:"220px",height:"30px"});e.appendChild(s);for(let n=0;n<3;n++){let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="14px 0",i.style.borderBottom="1px solid rgba(0,0,0,0.06)";let a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="6px",a.append(c({...r,type:"line",width:"160px",height:"16px"}),c({...r,type:"line",width:"240px",height:"12px"}));let d=c({...r,type:"button",width:"50px",height:"28px",radius:"14px"});i.append(a,d),e.appendChild(i);}break}case "product-detail":{e.style.display="grid",e.style.gridTemplateColumns="1fr 1.2fr",e.style.gap="24px",e.style.padding="20px";let s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="12px";let n=c({...r,type:"rect",height:"280px",radius:l||"12px"}),i=document.createElement("div");i.style.display="flex",i.style.gap="8px";for(let u=0;u<4;u++)i.appendChild(c({...r,type:"rect",width:"60px",height:"60px",radius:"6px"}));s.append(n,i);let a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="14px";let d=c({...r,type:"heading",width:"85%",height:"32px"}),p=c({...r,type:"badge",width:"120px",height:"20px"}),y=c({...r,type:"heading",width:"100px",height:"28px"}),m=f(3,r),w=c({...r,type:"button",width:"180px",height:"44px"});a.append(d,p,y,m,w),e.append(s,a);break}case "news-feed":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";for(let s=0;s<3;s++){let n=document.createElement("div");n.style.display="flex",n.style.gap="16px",n.style.paddingBottom="16px",n.style.borderBottom="1px solid rgba(0,0,0,0.06)";let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="8px",i.style.flex="1",i.append(c({...r,type:"badge",width:"80px",height:"16px"}),c({...r,type:"heading",width:"90%",height:"20px"}),f(2,r));let a=c({...r,type:"rect",width:"120px",height:"90px",radius:l||"8px"});n.append(i,a),e.appendChild(n);}break}case "inbox-list":{e.style.display="flex",e.style.flexDirection="column",e.style.border="1px solid rgba(0,0,0,0.06)",e.style.borderRadius=l||"8px";for(let s=0;s<4;s++){let n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.gap="14px",n.style.padding="12px 16px",n.style.borderBottom="1px solid rgba(0,0,0,0.04)";let i=c({...r,type:"icon",width:"18px",height:"18px"}),a=c({...r,type:"line",width:"120px",height:"14px"}),d=c({...r,type:"line",width:"280px",height:"14px"}),p=c({...r,type:"badge",width:"50px",height:"16px"});n.append(i,a,d,p),e.appendChild(n);}break}case "notification-list":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px";for(let s=0;s<3;s++){let n=document.createElement("div");n.style.display="flex",n.style.alignItems="flex-start",n.style.gap="12px",n.style.padding="12px",n.style.borderRadius=l||"8px",n.style.background="rgba(0,0,0,0.02)";let i=c({...r,type:"circle",width:"10px",height:"10px"});i.style.marginTop="6px";let a=c({...r,type:"circle",width:"38px",height:"38px"}),d=document.createElement("div");d.style.display="flex",d.style.flexDirection="column",d.style.gap="4px",d.style.flex="1",d.append(c({...r,type:"line",width:"75%",height:"14px"}),c({...r,type:"line",width:"40%",height:"12px"})),n.append(i,a,d),e.appendChild(n);}break}case "order-list":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px";for(let s=0;s<2;s++){let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="12px",n.style.padding="16px",n.style.borderRadius=l||"10px",n.style.border="1px solid rgba(0,0,0,0.08)";let i=document.createElement("div");i.style.display="flex",i.style.justifyContent="space-between",i.append(c({...r,type:"line",width:"140px",height:"16px"}),c({...r,type:"badge",width:"80px",height:"22px"}));let a=document.createElement("div");a.style.display="flex",a.style.gap="10px";for(let p=0;p<3;p++)a.appendChild(c({...r,type:"rect",width:"50px",height:"50px",radius:"6px"}));let d=document.createElement("div");d.style.display="flex",d.style.justifyContent="space-between",d.style.alignItems="center",d.append(c({...r,type:"heading",width:"90px",height:"20px"}),c({...r,type:"button",width:"110px",height:"32px"})),n.append(i,a,d),e.appendChild(n);}break}case "kpi-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="18px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=document.createElement("div");s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center",s.append(c({...r,type:"line",width:"90px",height:"14px"}),c({...r,type:"icon",width:"20px",height:"20px"}));let n=c({...r,type:"heading",width:"140px",height:"36px"}),i=c({...r,type:"badge",width:"70px",height:"18px"});e.append(s,n,i);break}case "chart-bar":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="18px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"heading",width:"140px",height:"20px"}),n=document.createElement("div");n.style.display="flex",n.style.alignItems="flex-end",n.style.justifyContent="space-between",n.style.height="140px",n.style.padding="0 10px";let i=["40%","75%","55%","90%","65%","80%","50%"];for(let a of i){let d=c({...r,type:"rect",width:"22px",height:a,radius:"4px"});n.appendChild(d);}e.append(s,n);break}case "chart-line":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px",e.style.padding="18px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"heading",width:"150px",height:"20px"}),n=c({...r,type:"rect",height:"140px",radius:"8px"});e.append(s,n);break}case "chart-pie":{e.style.display="flex",e.style.alignItems="center",e.style.gap="20px",e.style.padding="20px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"circle",width:"120px",height:"120px"}),n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="10px",n.style.flex="1";for(let i=0;i<3;i++){let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="8px",a.append(c({...r,type:"circle",width:"12px",height:"12px"}),c({...r,type:"line",width:"90px",height:"14px"})),n.appendChild(a);}e.append(s,n);break}case "search-results":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="18px";let s=c({...r,type:"input",height:"42px",radius:l||"24px"});e.appendChild(s);for(let n=0;n<3;n++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.append(c({...r,type:"line",width:"160px",height:"12px"}),c({...r,type:"heading",width:"70%",height:"20px"}),f(2,r)),e.appendChild(i);}break}case "video-player":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px";let s=c({...r,type:"rect",height:"240px",radius:l||"12px"}),n=c({...r,type:"heading",width:"80%",height:"24px"}),i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between";let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="10px",a.append(c({...r,type:"circle",width:"40px",height:"40px"}),c({...r,type:"line",width:"120px",height:"14px"}));let d=c({...r,type:"button",width:"100px",height:"36px"});i.append(a,d),e.append(s,n,i);break}case "music-player":{e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap="14px",e.style.padding="20px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=c({...r,type:"rect",width:"180px",height:"180px",radius:l||"12px"}),n=c({...r,type:"heading",width:"160px",height:"20px"}),i=c({...r,type:"line",width:"100px",height:"14px"}),a=c({...r,type:"line",width:"100%",height:"6px"}),d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.gap="20px",d.append(c({...r,type:"icon",width:"24px",height:"24px"}),c({...r,type:"circle",width:"48px",height:"48px"}),c({...r,type:"icon",width:"24px",height:"24px"})),e.append(s,n,i,a,d);break}case "stories-row":{e.style.display="flex",e.style.gap="16px",e.style.overflowX="auto",e.style.padding="8px 0";for(let s=0;s<5;s++){let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.alignItems="center",n.style.gap="6px",n.append(c({...r,type:"circle",width:"60px",height:"60px"}),c({...r,type:"line",width:"48px",height:"10px"})),e.appendChild(n);}break}case "reels":{e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="flex-end",e.style.height="340px",e.style.padding="20px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.1)",e.style.position="relative";let s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.gap="10px",s.append(c({...r,type:"circle",width:"36px",height:"36px"}),c({...r,type:"line",width:"100px",height:"14px"}));let n=f(2,r);e.append(s,n);break}case "tabs":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let s=document.createElement("div");s.style.display="flex",s.style.gap="20px",s.style.borderBottom="2px solid rgba(0,0,0,0.06)",s.style.paddingBottom="8px";for(let i=0;i<4;i++)s.appendChild(c({...r,type:"line",width:"70px",height:"16px"}));let n=f(3,r);e.append(s,n);break}case "calendar":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=document.createElement("div");s.style.display="flex",s.style.justifyContent="space-between",s.append(c({...r,type:"heading",width:"120px",height:"20px"}),c({...r,type:"line",width:"60px",height:"20px"}));let n=document.createElement("div");n.style.display="grid",n.style.gridTemplateColumns="repeat(7, 1fr)",n.style.gap="8px";for(let i=0;i<28;i++)n.appendChild(c({...r,type:"rect",height:"24px",radius:"4px"}));e.append(s,n);break}case "kanban":{e.style.display="grid",e.style.gridTemplateColumns="repeat(3, 1fr)",e.style.gap="14px";for(let s=0;s<3;s++){let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="10px",n.style.padding="12px",n.style.borderRadius=l||"10px",n.style.background="rgba(0,0,0,0.03)";let i=c({...r,type:"heading",width:"80px",height:"16px"});n.appendChild(i);for(let a=0;a<2;a++){let d=document.createElement("div");d.style.display="flex",d.style.flexDirection="column",d.style.gap="8px",d.style.padding="10px",d.style.borderRadius=l||"6px",d.style.background="#fff",d.style.border="1px solid rgba(0,0,0,0.06)",d.append(c({...r,type:"line",width:"85%",height:"14px"}),c({...r,type:"badge",width:"50px",height:"16px"})),n.appendChild(d);}e.appendChild(n);}break}case "timeline":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="18px",e.style.padding="10px 0";for(let s=0;s<3;s++){let n=document.createElement("div");n.style.display="flex",n.style.gap="14px";let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.append(c({...r,type:"circle",width:"16px",height:"16px"}),c({...r,type:"rect",width:"2px",height:"40px"}));let a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="4px",a.style.flex="1",a.append(c({...r,type:"line",width:"90px",height:"12px"}),c({...r,type:"heading",width:"60%",height:"18px"}),c({...r,type:"line",width:"85%",height:"14px"})),n.append(i,a),e.appendChild(n);}break}case "map-card":{e.style.display="flex",e.style.flexDirection="column",e.style.borderRadius=l||"14px",e.style.overflow="hidden",e.style.border="1px solid rgba(0,0,0,0.08)";let s=c({...r,type:"rect",height:"160px",radius:"0"}),n=document.createElement("div");n.style.display="flex",n.style.justifyContent="space-between",n.style.alignItems="center",n.style.padding="14px";let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.append(c({...r,type:"heading",width:"140px",height:"18px"}),c({...r,type:"line",width:"200px",height:"12px"}));let a=c({...r,type:"button",width:"90px",height:"34px"});n.append(i,a),e.append(s,n);break}case "pricing-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="24px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.08)";let s=c({...r,type:"badge",width:"70px",height:"22px"}),n=c({...r,type:"heading",width:"130px",height:"38px"}),i=c({...r,type:"line",width:"80%",height:"14px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="10px";for(let p=0;p<4;p++){let y=document.createElement("div");y.style.display="flex",y.style.alignItems="center",y.style.gap="8px",y.append(c({...r,type:"icon",width:"16px",height:"16px"}),c({...r,type:"line",width:"70%",height:"14px"})),a.appendChild(y);}let d=c({...r,type:"button",width:"100%",height:"42px"});e.append(s,n,i,a,d);break}case "testimonial":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="20px",e.style.borderRadius=l||"14px",e.style.border="1px solid rgba(0,0,0,0.06)";let s=f(3,r),n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.gap="12px",n.append(c({...r,type:"circle",width:"42px",height:"42px"}),c({...r,type:"line",width:"120px",height:"16px"})),e.append(s,n);break}case "faq-accordion":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px";for(let s=0;s<3;s++){let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="8px",n.style.padding="14px 16px",n.style.borderRadius=l||"8px",n.style.border="1px solid rgba(0,0,0,0.06)";let i=document.createElement("div");if(i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center",i.append(c({...r,type:"line",width:"75%",height:"16px"}),c({...r,type:"icon",width:"16px",height:"16px"})),n.appendChild(i),s===0){let a=f(2,r);n.appendChild(a);}e.appendChild(n);}break}case "file-explorer":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.padding="12px";for(let s=0;s<5;s++){let n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.gap="10px",n.style.marginLeft=`${s%3*16}px`,n.append(c({...r,type:"icon",width:"16px",height:"16px"}),c({...r,type:"line",width:`${100+s*20}px`,height:"14px"})),e.appendChild(n);}break}case "code-block":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="8px",e.style.padding="16px",e.style.borderRadius=l||"8px",e.style.background="rgba(0,0,0,0.05)";let s=["40%","70%","55%","85%","30%","60%"];for(let n of s)e.appendChild(c({...r,type:"line",width:n,height:"12px"}));break}}return e}var j={en:{loading:"Loading content, please wait\u2026",loaded:"Content loaded.",progress:"Loading progress",busy:"Busy"},es:{loading:"Cargando contenido, por favor espere\u2026",loaded:"Contenido cargado.",progress:"Progreso de carga",busy:"Ocupado"},fr:{loading:"Chargement du contenu, veuillez patienter\u2026",loaded:"Contenu charg\xE9.",progress:"Progression du chargement",busy:"Occup\xE9"},de:{loading:"Inhalt wird geladen, bitte warten\u2026",loaded:"Inhalt geladen.",progress:"Ladefortschritt",busy:"Besch\xE4ftigt"},ja:{loading:"\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059\u2026",loaded:"\u8AAD\u307F\u8FBC\u307F\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002",progress:"\u8AAD\u307F\u8FBC\u307F\u72B6\u6CC1",busy:"\u51E6\u7406\u4E2D"},zh:{loading:"\u6B63\u5728\u52A0\u8F7D\u5185\u5BB9\uFF0C\u8BF7\u7A0D\u5019\u2026",loaded:"\u5185\u5BB9\u52A0\u8F7D\u5B8C\u6210\u3002",progress:"\u52A0\u8F7D\u8FDB\u5EA6",busy:"\u5FD9\u788C\u4E2D"},ar:{loading:"\u062C\u0627\u0631\u064A \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u062D\u062A\u0648\u0649\u060C \u064A\u0631\u062C\u0649 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631\u2026",loaded:"\u062A\u0645 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u062D\u062A\u0648\u0649.",progress:"\u062A\u0642\u062F\u0645 \u0627\u0644\u062A\u062D\u0645\u064A\u0644",busy:"\u0645\u0634\u063A\u0648\u0644"}},ye="en",Y={};function q(t){ye=t;}function X(t){Object.assign(Y,t);}function Oe(t){return Y[t]?Y[t]:(j[ye]||j.en)[t]||j.en[t]||"Loading\u2026"}function me(t,e){t.setAttribute("aria-busy","true");let o=t.querySelector(".veil-sr-only");return o||(o=document.createElement("span"),o.className="veil-sr-only",o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),t.appendChild(o)),o.textContent=e||Oe("loading"),o}function ue(t){t.removeAttribute("aria-busy");let e=t.querySelector(".veil-sr-only");e&&e.remove();}var M=new Map,F="",W=class{show(e,o={}){h();let l,r=!e;if(r?l=document.body:typeof e=="string"?(l=document.querySelector(e),l||(l=document.body)):l=e,M.has(l))return M.get(l);let s=document.createElement("div");if(s.className=`veil-overlay ${r?"veil-overlay-fullscreen":""} ${o.className||""}`.trim(),s.setAttribute("role","status"),o.color&&s.style.setProperty("--veil-overlay-bg",o.color),o.blur!==void 0){let n=typeof o.blur=="boolean"?o.blur?"8px":"0px":o.blur;s.style.setProperty("--veil-overlay-blur",n);}if(o.zIndex!==void 0&&(s.style.zIndex=String(o.zIndex)),o.spinner!==false){let n=typeof o.spinner=="string"?o.spinner:"ring",i=v({type:n,size:36});s.appendChild(i);}if(o.message){let n=document.createElement("span");n.className="veil-overlay-message",n.style.fontSize="14px",n.style.fontWeight="500",n.style.color="var(--veil-contrast, #1f2937)",n.textContent=o.message,s.appendChild(n);}return r||window.getComputedStyle(l).position==="static"&&(l.style.position="relative"),me(l,o.message),o.lockScroll&&r&&typeof document<"u"&&(F=document.body.style.overflow,document.body.style.overflow="hidden"),l.appendChild(s),M.set(l,s),s}hide(e){let o,l=!e;l?o=document.body:typeof e=="string"?(o=document.querySelector(e),o||(o=document.body)):o=e;let r=M.get(o);r&&(r.style.opacity="0",setTimeout(()=>{r.remove(),M.delete(o),ue(o),l&&F!==void 0&&(document.body.style.overflow=F);},200));}},k=new W;function fe(t,e={}){h(),qe();let o=e.status||(e.loading?"loading":"idle"),l="",r="",s=t.innerHTML,n=null,i=e.pressFeedback||"press-scale";je(t,i);function a(){n&&(clearTimeout(n),n=null);}function d(y,m){a();let w=o;if(o=y,e.onStatusChange&&w!==y&&e.onStatusChange(y),y==="idle"){t.classList.remove("veil-btn-loading","veil-btn-success","veil-btn-error","veil-btn-shake","veil-btn-morph"),t.removeAttribute("aria-disabled"),t.removeAttribute("aria-busy"),t.style.width=l,t.style.height=r,t.innerHTML=s;return}if(w==="idle"){let u=t.getBoundingClientRect();l=t.style.width,r=t.style.height,s=t.innerHTML,u.width>0&&(t.style.width=`${u.width}px`),u.height>0&&(t.style.height=`${u.height}px`);}if(y==="loading"){t.classList.add("veil-btn-loading"),t.classList.remove("veil-btn-success","veil-btn-error"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-busy","true");let u=e.styleType||(e.spinnerPlacement==="replace"?"spinner-replace":e.spinnerPlacement==="end"?"spinner-right":"spinner-left");Ye(t,u,e,m||e.loadingText);}else if(y==="success"){t.classList.remove("veil-btn-loading","veil-btn-error"),t.classList.add("veil-btn-success"),t.setAttribute("aria-busy","false"),he(t,"success",m||e.successText||"Success",e.resultAnimation);let u=e.resetAfter!==void 0?e.resetAfter:2e3;u>0&&(n=setTimeout(()=>d("idle"),u));}else if(y==="error"){t.classList.remove("veil-btn-loading","veil-btn-success"),t.classList.add("veil-btn-error"),t.setAttribute("aria-busy","false"),he(t,"error",m||e.errorText||"Failed",e.resultAnimation);let u=e.resetAfter!==void 0?e.resetAfter:2e3;u>0&&(n=setTimeout(()=>d("idle"),u));}}let p=async y=>{if(o!=="idle"){y.preventDefault(),y.stopPropagation();return}if(e.onClick)try{let m=e.onClick(y);m&&typeof m.then=="function"&&(d("loading"),await m,d("success"));}catch{d("error");}};return t.addEventListener("click",p),e.status?d(e.status):e.loading&&d("loading",e.loadingText),{setStatus:d,setLoading:(y,m)=>d(y?"loading":"idle",m),getStatus:()=>o,destroy:()=>{a(),t.removeEventListener("click",p),d("idle");}}}function je(t,e){if(e!=="none")if(e==="press-scale"){t.style.transition="transform 100ms ease, box-shadow 150ms ease",t.addEventListener("mousedown",()=>{t.style.transform="scale(0.97)";});let o=()=>{t.style.transform="scale(1)";};t.addEventListener("mouseup",o),t.addEventListener("mouseleave",o);}else e==="ripple"?(t.style.position="relative",t.style.overflow="hidden",t.addEventListener("click",o=>{let l=t.getBoundingClientRect(),r=document.createElement("span"),s=Math.max(l.width,l.height),n=s/2;r.style.width=r.style.height=`${s}px`,r.style.left=`${o.clientX-l.left-n}px`,r.style.top=`${o.clientY-l.top-n}px`,r.className="veil-btn-ripple";let i=t.querySelector(".veil-btn-ripple");i&&i.remove(),t.appendChild(r);})):e==="glow-follow"&&t.addEventListener("mousemove",o=>{let l=t.getBoundingClientRect(),r=o.clientX-l.left,s=o.clientY-l.top;t.style.setProperty("--veil-mouse-x",`${r}px`),t.style.setProperty("--veil-mouse-y",`${s}px`);});}function Ye(t,e,o,l){let r=o.spinner||"ring",s=l||t.textContent?.trim()||"";switch(t.innerHTML="",e){case "spinner-left":{let n=v({type:r,size:16,color:"currentColor"});n.classList.add("veil-btn-spinner-wrap");let i=document.createElement("span");i.textContent=s,t.append(n,i);break}case "spinner-right":{let n=document.createElement("span");n.textContent=s;let i=v({type:r,size:16,color:"currentColor"});i.classList.add("veil-btn-spinner-wrap"),i.style.marginLeft="8px",i.style.marginRight="0",t.append(n,i);break}case "spinner-replace":{let n=v({type:r,size:20,color:"currentColor"});t.appendChild(n);break}case "dots-after-text":{let n=document.createElement("span");n.textContent=s;let i=document.createElement("span");i.className="veil-btn-typing-dots",i.textContent="...",t.append(n,i);break}case "progress-fill":{let n=document.createElement("div");n.className="veil-btn-progress-bar";let i=o.progress!==void 0?o.progress:60;n.style.width=`${i}%`;let a=document.createElement("span");a.style.position="relative",a.style.zIndex="2",a.textContent=s,t.append(n,a);break}case "shimmer-surface":{let n=document.createElement("span");n.textContent=s,n.style.position="relative",n.style.zIndex="2";let i=document.createElement("div");i.className="veil-btn-shimmer",t.append(n,i);break}case "pulse-glow":{t.classList.add("veil-btn-pulse-glow");let n=document.createElement("span");n.textContent=s,t.appendChild(n);break}case "stripes-progress":{let n=document.createElement("div");n.className="veil-btn-stripes";let i=document.createElement("span");i.style.position="relative",i.style.zIndex="2",i.textContent=s,t.append(n,i);break}case "morph-circle":{t.classList.add("veil-btn-morph");let n=v({type:r,size:20,color:"currentColor"});t.appendChild(n);break}case "slide-text":{let n=document.createElement("span");n.className="veil-btn-slide-wrap";let i=document.createElement("span");i.className="veil-btn-slide-out",i.textContent=s;let a=document.createElement("span");a.className="veil-btn-slide-in",a.textContent=l||"Loading\u2026",n.append(i,a),t.appendChild(n);break}case "border-trace":{let n=document.createElement("span");n.textContent=s,n.style.position="relative",n.style.zIndex="2";let i=document.createElement("div");i.className="veil-btn-border-trace",t.append(n,i);break}case "liquid-fill":{let n=document.createElement("div");n.className="veil-btn-liquid";let i=document.createElement("span");i.style.position="relative",i.style.zIndex="2",i.textContent=s,t.append(n,i);break}case "bounce-dots":{let n=v({type:"dots",size:22,color:"currentColor"}),i=document.createElement("span");i.textContent=s?` ${s}`:"",t.append(n,i);break}case "glass-shine":{t.classList.add("veil-btn-glass-shine");let n=document.createElement("span");n.textContent=s,t.appendChild(n);break}case "neon-pulse":{t.classList.add("veil-btn-neon-pulse");let n=document.createElement("span");n.textContent=s,t.appendChild(n);break}case "skeleton-button":{let n=document.createElement("div");n.className="veil-skeleton",n.setAttribute("data-veil-shape","button"),n.setAttribute("data-veil-anim","shimmer"),n.style.width="100%",n.style.height="100%",t.appendChild(n);break}}}function he(t,e,o,l="checkmark"){if(t.innerHTML="",t.style.display="inline-flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.gap="8px",e==="error"&&(l==="shake"||l==="cross"||l==="none")&&t.classList.add("veil-btn-shake"),e==="success"&&l==="success-burst"){let i=document.createElement("div");i.className="veil-btn-burst",t.appendChild(i);}let r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("viewBox","0 0 24 24"),r.style.width="18px",r.style.height="18px",r.style.stroke="currentColor",r.style.strokeWidth="2.5",r.style.fill="none",r.style.strokeLinecap="round",r.style.strokeLinejoin="round";let s=document.createElementNS("http://www.w3.org/2000/svg","path");e==="success"?s.setAttribute("d","M5 13l4 4L19 7"):s.setAttribute("d","M6 18L18 6M6 6l12 12"),s.style.strokeDasharray="30",s.style.strokeDashoffset="30",s.style.animation="veil-draw 300ms ease forwards",r.appendChild(s);let n=document.createElement("span");n.textContent=o,t.append(r,n);}var ge=false;function qe(){if(ge||typeof document>"u")return;ge=true;let t=document.createElement("style");t.id="veilkit-button-styles",t.textContent=`
|
|
583
|
+
`,document.head.appendChild(t);}function P(t){let e=document.createElement("div");e.className=`veil-preset veil-preset-${t.name} ${t.className||""}`.trim(),e.setAttribute("aria-hidden","true"),e.style.width=t.width!==void 0?typeof t.width=="number"?`${t.width}px`:t.width:"100%",e.style.boxSizing="border-box";let o=t.shape||"rounded",l;o==="pill"?l="9999px":o==="square"?l="4px":o==="sharp"&&(l="0px"),o==="glass"&&(e.style.backdropFilter="blur(10px)",e.style.webkitBackdropFilter="blur(10px)",e.style.background="rgba(255, 255, 255, 0.08)",e.style.border="1px solid rgba(255, 255, 255, 0.18)",e.style.boxShadow="0 8px 32px rgba(0, 0, 0, 0.08)");let s={animation:t.animation,theme:t.theme,direction:t.direction,speed:t.speed,radius:l};switch(t.name){case "card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.08)";let r=d({...s,type:"rect",height:"180px",radius:l||"8px"}),i=d({...s,type:"heading",width:"70%",height:"24px"}),n=f(2,s),a=d({...s,type:"button",width:"110px",height:"36px"});e.append(r,i,n,a);break}case "product-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.padding="14px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"rect",height:"200px",radius:l||"10px"}),i=d({...s,type:"badge",width:"50px",height:"18px"}),n=d({...s,type:"line",width:"85%",height:"18px"}),a=d({...s,type:"line",width:"40%",height:"22px"}),c=d({...s,type:"button",width:"100%",height:"38px"});e.append(r,i,n,a,c);break}case "product-grid":{let r=t.items||4,i=t.columns||2;e.style.display="grid",e.style.gridTemplateColumns=`repeat(${i}, 1fr)`,e.style.gap="16px";for(let n=0;n<r;n++){let a=P({...t,name:"product-card",width:"100%"});e.appendChild(a);}break}case "list":{let r=t.items||4;e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px";for(let i=0;i<r;i++){let n=d({...s,type:"line",width:`${95-i%3*15}%`,height:"18px"});e.appendChild(n);}break}case "list-item":{e.style.display="flex",e.style.alignItems="center",e.style.gap="14px",e.style.padding="10px 0";let r=d({...s,type:"circle",width:"44px",height:"44px"}),i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.style.flex="1";let n=d({...s,type:"line",width:"60%",height:"16px"}),a=d({...s,type:"line",width:"40%",height:"12px"});i.append(n,a),e.append(r,i);break}case "table":{let r=t.items||5;e.style.display="flex",e.style.flexDirection="column",e.style.gap="8px",e.style.padding="12px",e.style.borderRadius=l||"8px",e.style.border="1px solid rgba(0,0,0,0.06)";let i=document.createElement("div");i.style.display="grid",i.style.gridTemplateColumns="2fr 1fr 1fr 1fr",i.style.gap="12px",i.style.paddingBottom="8px",i.style.borderBottom="2px solid rgba(0,0,0,0.08)";for(let n=0;n<4;n++)i.appendChild(d({...s,type:"line",height:"16px"}));e.appendChild(i);for(let n=0;n<r;n++){let a=document.createElement("div");a.style.display="grid",a.style.gridTemplateColumns="2fr 1fr 1fr 1fr",a.style.gap="12px",a.style.padding="8px 0",a.style.borderBottom="1px solid rgba(0,0,0,0.04)";for(let c=0;c<4;c++)a.appendChild(d({...s,type:"line",height:"14px"}));e.appendChild(a);}break}case "profile":{e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap="14px",e.style.padding="24px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"circle",width:"88px",height:"88px"}),i=d({...s,type:"heading",width:"160px",height:"22px"}),n=f(2,s),a=document.createElement("div");a.style.display="flex",a.style.gap="10px",a.append(d({...s,type:"button",width:"100px",height:"34px"}),d({...s,type:"button",width:"100px",height:"34px"})),e.append(r,i,n,a);break}case "profile-header":{e.style.display="flex",e.style.flexDirection="column",e.style.borderRadius=l||"16px",e.style.overflow="hidden",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"rect",height:"140px",radius:"0"}),i=document.createElement("div");i.style.display="flex",i.style.alignItems="flex-end",i.style.gap="16px",i.style.padding="0 20px 20px 20px",i.style.marginTop="-40px";let n=d({...s,type:"circle",width:"80px",height:"80px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="6px",a.style.flex="1",a.append(d({...s,type:"heading",width:"140px",height:"20px"}),d({...s,type:"line",width:"200px",height:"14px"})),i.append(n,a),e.append(r,i);break}case "feed-post":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.08)";let r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.gap="10px",r.append(d({...s,type:"circle",width:"40px",height:"40px"}),d({...s,type:"line",width:"120px",height:"16px"}));let i=f(2,s),n=d({...s,type:"rect",height:"220px",radius:l||"8px"}),a=document.createElement("div");a.style.display="flex",a.style.gap="16px",a.append(d({...s,type:"button",width:"60px",height:"28px"}),d({...s,type:"button",width:"60px",height:"28px"})),e.append(r,i,n,a);break}case "article":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let r=d({...s,type:"heading",width:"85%",height:"36px"}),i=document.createElement("div");i.style.display="flex",i.style.gap="12px",i.append(d({...s,type:"circle",width:"32px",height:"32px"}),d({...s,type:"line",width:"140px",height:"14px"}));let n=d({...s,type:"rect",height:"260px",radius:l||"10px"}),a=f(4,s),c=f(3,s);e.append(r,i,n,a,c);break}case "comment-thread":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";for(let r=0;r<3;r++){let i=document.createElement("div");i.style.display="flex",i.style.gap="12px",r===1&&(i.style.marginLeft="40px");let n=d({...s,type:"circle",width:"36px",height:"36px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="6px",a.style.flex="1",a.append(d({...s,type:"line",width:"120px",height:"14px"}),f(2,s)),i.append(n,a),e.appendChild(i);}break}case "chat":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px",e.style.padding="16px";let r=[{align:"flex-start",w:"65%"},{align:"flex-end",w:"50%"},{align:"flex-start",w:"80%"},{align:"flex-end",w:"40%"}];for(let i of r){let n=document.createElement("div");n.style.display="flex",n.style.justifyContent=i.align;let a=d({...s,type:"rect",width:i.w,height:"42px",radius:l||"18px"});n.appendChild(a),e.appendChild(n);}break}case "dashboard":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let r=document.createElement("div");r.style.display="grid",r.style.gridTemplateColumns="repeat(3, 1fr)",r.style.gap="12px";for(let n=0;n<3;n++){let a=document.createElement("div");a.style.padding="16px",a.style.borderRadius=l||"10px",a.style.border="1px solid rgba(0,0,0,0.06)",a.style.display="flex",a.style.flexDirection="column",a.style.gap="8px",a.append(d({...s,type:"line",width:"60%",height:"14px"}),d({...s,type:"heading",width:"80%",height:"28px"})),r.appendChild(a);}let i=d({...s,type:"rect",height:"200px",radius:l||"10px"});e.append(r,i);break}case "form":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="20px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";for(let i=0;i<3;i++){let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="6px",n.append(d({...s,type:"line",width:"30%",height:"14px"}),d({...s,type:"input",width:"100%",height:"40px"})),e.appendChild(n);}let r=d({...s,type:"button",width:"140px",height:"40px"});e.appendChild(r);break}case "media-card":{e.style.display="flex",e.style.gap="16px",e.style.padding="12px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"rect",width:"140px",height:"90px",radius:l||"8px"}),i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="8px",i.style.flex="1",i.append(d({...s,type:"heading",width:"80%",height:"18px"}),d({...s,type:"line",width:"60%",height:"14px"}),d({...s,type:"line",width:"40%",height:"12px"})),e.append(r,i);break}case "navbar":{e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="space-between",e.style.padding="12px 20px",e.style.borderBottom="1px solid rgba(0,0,0,0.08)";let r=d({...s,type:"heading",width:"110px",height:"24px"}),i=document.createElement("div");i.style.display="flex",i.style.gap="18px";for(let a=0;a<4;a++)i.appendChild(d({...s,type:"line",width:"60px",height:"14px"}));let n=d({...s,type:"button",width:"90px",height:"34px"});e.append(r,i,n);break}case "sidebar":{e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="space-between",e.style.padding="18px 14px",e.style.height="100%",e.style.minHeight="320px",e.style.borderRight="1px solid rgba(0,0,0,0.08)";let r=document.createElement("div");r.style.display="flex",r.style.flexDirection="column",r.style.gap="16px",r.appendChild(d({...s,type:"heading",width:"100px",height:"22px"}));for(let n=0;n<5;n++){let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="10px",a.append(d({...s,type:"icon",width:"20px",height:"20px"}),d({...s,type:"line",width:"90px",height:"14px"})),r.appendChild(a);}let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.gap="10px",i.append(d({...s,type:"circle",width:"36px",height:"36px"}),d({...s,type:"line",width:"80px",height:"14px"})),e.append(r,i);break}case "settings-page":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="24px",e.style.padding="24px";let r=d({...s,type:"heading",width:"220px",height:"30px"});e.appendChild(r);for(let i=0;i<3;i++){let n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="space-between",n.style.padding="14px 0",n.style.borderBottom="1px solid rgba(0,0,0,0.06)";let a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="6px",a.append(d({...s,type:"line",width:"160px",height:"16px"}),d({...s,type:"line",width:"240px",height:"12px"}));let c=d({...s,type:"button",width:"50px",height:"28px",radius:"14px"});n.append(a,c),e.appendChild(n);}break}case "product-detail":{e.style.display="grid",e.style.gridTemplateColumns="1fr 1.2fr",e.style.gap="24px",e.style.padding="20px";let r=document.createElement("div");r.style.display="flex",r.style.flexDirection="column",r.style.gap="12px";let i=d({...s,type:"rect",height:"280px",radius:l||"12px"}),n=document.createElement("div");n.style.display="flex",n.style.gap="8px";for(let u=0;u<4;u++)n.appendChild(d({...s,type:"rect",width:"60px",height:"60px",radius:"6px"}));r.append(i,n);let a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="14px";let c=d({...s,type:"heading",width:"85%",height:"32px"}),p=d({...s,type:"badge",width:"120px",height:"20px"}),y=d({...s,type:"heading",width:"100px",height:"28px"}),m=f(3,s),w=d({...s,type:"button",width:"180px",height:"44px"});a.append(c,p,y,m,w),e.append(r,a);break}case "news-feed":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";for(let r=0;r<3;r++){let i=document.createElement("div");i.style.display="flex",i.style.gap="16px",i.style.paddingBottom="16px",i.style.borderBottom="1px solid rgba(0,0,0,0.06)";let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="8px",n.style.flex="1",n.append(d({...s,type:"badge",width:"80px",height:"16px"}),d({...s,type:"heading",width:"90%",height:"20px"}),f(2,s));let a=d({...s,type:"rect",width:"120px",height:"90px",radius:l||"8px"});i.append(n,a),e.appendChild(i);}break}case "inbox-list":{e.style.display="flex",e.style.flexDirection="column",e.style.border="1px solid rgba(0,0,0,0.06)",e.style.borderRadius=l||"8px";for(let r=0;r<4;r++){let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.gap="14px",i.style.padding="12px 16px",i.style.borderBottom="1px solid rgba(0,0,0,0.04)";let n=d({...s,type:"icon",width:"18px",height:"18px"}),a=d({...s,type:"line",width:"120px",height:"14px"}),c=d({...s,type:"line",width:"280px",height:"14px"}),p=d({...s,type:"badge",width:"50px",height:"16px"});i.append(n,a,c,p),e.appendChild(i);}break}case "notification-list":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px";for(let r=0;r<3;r++){let i=document.createElement("div");i.style.display="flex",i.style.alignItems="flex-start",i.style.gap="12px",i.style.padding="12px",i.style.borderRadius=l||"8px",i.style.background="rgba(0,0,0,0.02)";let n=d({...s,type:"circle",width:"10px",height:"10px"});n.style.marginTop="6px";let a=d({...s,type:"circle",width:"38px",height:"38px"}),c=document.createElement("div");c.style.display="flex",c.style.flexDirection="column",c.style.gap="4px",c.style.flex="1",c.append(d({...s,type:"line",width:"75%",height:"14px"}),d({...s,type:"line",width:"40%",height:"12px"})),i.append(n,a,c),e.appendChild(i);}break}case "order-list":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px";for(let r=0;r<2;r++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="12px",i.style.padding="16px",i.style.borderRadius=l||"10px",i.style.border="1px solid rgba(0,0,0,0.08)";let n=document.createElement("div");n.style.display="flex",n.style.justifyContent="space-between",n.append(d({...s,type:"line",width:"140px",height:"16px"}),d({...s,type:"badge",width:"80px",height:"22px"}));let a=document.createElement("div");a.style.display="flex",a.style.gap="10px";for(let p=0;p<3;p++)a.appendChild(d({...s,type:"rect",width:"50px",height:"50px",radius:"6px"}));let c=document.createElement("div");c.style.display="flex",c.style.justifyContent="space-between",c.style.alignItems="center",c.append(d({...s,type:"heading",width:"90px",height:"20px"}),d({...s,type:"button",width:"110px",height:"32px"})),i.append(n,a,c),e.appendChild(i);}break}case "kpi-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="18px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=document.createElement("div");r.style.display="flex",r.style.justifyContent="space-between",r.style.alignItems="center",r.append(d({...s,type:"line",width:"90px",height:"14px"}),d({...s,type:"icon",width:"20px",height:"20px"}));let i=d({...s,type:"heading",width:"140px",height:"36px"}),n=d({...s,type:"badge",width:"70px",height:"18px"});e.append(r,i,n);break}case "chart-bar":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="18px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"heading",width:"140px",height:"20px"}),i=document.createElement("div");i.style.display="flex",i.style.alignItems="flex-end",i.style.justifyContent="space-between",i.style.height="140px",i.style.padding="0 10px";let n=["40%","75%","55%","90%","65%","80%","50%"];for(let a of n){let c=d({...s,type:"rect",width:"22px",height:a,radius:"4px"});i.appendChild(c);}e.append(r,i);break}case "chart-line":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px",e.style.padding="18px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"heading",width:"150px",height:"20px"}),i=d({...s,type:"rect",height:"140px",radius:"8px"});e.append(r,i);break}case "chart-pie":{e.style.display="flex",e.style.alignItems="center",e.style.gap="20px",e.style.padding="20px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"circle",width:"120px",height:"120px"}),i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="10px",i.style.flex="1";for(let n=0;n<3;n++){let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="8px",a.append(d({...s,type:"circle",width:"12px",height:"12px"}),d({...s,type:"line",width:"90px",height:"14px"})),i.appendChild(a);}e.append(r,i);break}case "search-results":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="18px";let r=d({...s,type:"input",height:"42px",radius:l||"24px"});e.appendChild(r);for(let i=0;i<3;i++){let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="6px",n.append(d({...s,type:"line",width:"160px",height:"12px"}),d({...s,type:"heading",width:"70%",height:"20px"}),f(2,s)),e.appendChild(n);}break}case "video-player":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px";let r=d({...s,type:"rect",height:"240px",radius:l||"12px"}),i=d({...s,type:"heading",width:"80%",height:"24px"}),n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="space-between";let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="10px",a.append(d({...s,type:"circle",width:"40px",height:"40px"}),d({...s,type:"line",width:"120px",height:"14px"}));let c=d({...s,type:"button",width:"100px",height:"36px"});n.append(a,c),e.append(r,i,n);break}case "music-player":{e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap="14px",e.style.padding="20px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=d({...s,type:"rect",width:"180px",height:"180px",radius:l||"12px"}),i=d({...s,type:"heading",width:"160px",height:"20px"}),n=d({...s,type:"line",width:"100px",height:"14px"}),a=d({...s,type:"line",width:"100%",height:"6px"}),c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.gap="20px",c.append(d({...s,type:"icon",width:"24px",height:"24px"}),d({...s,type:"circle",width:"48px",height:"48px"}),d({...s,type:"icon",width:"24px",height:"24px"})),e.append(r,i,n,a,c);break}case "stories-row":{e.style.display="flex",e.style.gap="16px",e.style.overflowX="auto",e.style.padding="8px 0";for(let r=0;r<5;r++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.gap="6px",i.append(d({...s,type:"circle",width:"60px",height:"60px"}),d({...s,type:"line",width:"48px",height:"10px"})),e.appendChild(i);}break}case "reels":{e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="flex-end",e.style.height="340px",e.style.padding="20px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.1)",e.style.position="relative";let r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.gap="10px",r.append(d({...s,type:"circle",width:"36px",height:"36px"}),d({...s,type:"line",width:"100px",height:"14px"}));let i=f(2,s);e.append(r,i);break}case "tabs":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let r=document.createElement("div");r.style.display="flex",r.style.gap="20px",r.style.borderBottom="2px solid rgba(0,0,0,0.06)",r.style.paddingBottom="8px";for(let n=0;n<4;n++)r.appendChild(d({...s,type:"line",width:"70px",height:"16px"}));let i=f(3,s);e.append(r,i);break}case "calendar":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius=l||"12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=document.createElement("div");r.style.display="flex",r.style.justifyContent="space-between",r.append(d({...s,type:"heading",width:"120px",height:"20px"}),d({...s,type:"line",width:"60px",height:"20px"}));let i=document.createElement("div");i.style.display="grid",i.style.gridTemplateColumns="repeat(7, 1fr)",i.style.gap="8px";for(let n=0;n<28;n++)i.appendChild(d({...s,type:"rect",height:"24px",radius:"4px"}));e.append(r,i);break}case "kanban":{e.style.display="grid",e.style.gridTemplateColumns="repeat(3, 1fr)",e.style.gap="14px";for(let r=0;r<3;r++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="10px",i.style.padding="12px",i.style.borderRadius=l||"10px",i.style.background="rgba(0,0,0,0.03)";let n=d({...s,type:"heading",width:"80px",height:"16px"});i.appendChild(n);for(let a=0;a<2;a++){let c=document.createElement("div");c.style.display="flex",c.style.flexDirection="column",c.style.gap="8px",c.style.padding="10px",c.style.borderRadius=l||"6px",c.style.background="#fff",c.style.border="1px solid rgba(0,0,0,0.06)",c.append(d({...s,type:"line",width:"85%",height:"14px"}),d({...s,type:"badge",width:"50px",height:"16px"})),i.appendChild(c);}e.appendChild(i);}break}case "timeline":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="18px",e.style.padding="10px 0";for(let r=0;r<3;r++){let i=document.createElement("div");i.style.display="flex",i.style.gap="14px";let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.alignItems="center",n.append(d({...s,type:"circle",width:"16px",height:"16px"}),d({...s,type:"rect",width:"2px",height:"40px"}));let a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="4px",a.style.flex="1",a.append(d({...s,type:"line",width:"90px",height:"12px"}),d({...s,type:"heading",width:"60%",height:"18px"}),d({...s,type:"line",width:"85%",height:"14px"})),i.append(n,a),e.appendChild(i);}break}case "map-card":{e.style.display="flex",e.style.flexDirection="column",e.style.borderRadius=l||"14px",e.style.overflow="hidden",e.style.border="1px solid rgba(0,0,0,0.08)";let r=d({...s,type:"rect",height:"160px",radius:"0"}),i=document.createElement("div");i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center",i.style.padding="14px";let n=document.createElement("div");n.style.display="flex",n.style.flexDirection="column",n.style.gap="6px",n.append(d({...s,type:"heading",width:"140px",height:"18px"}),d({...s,type:"line",width:"200px",height:"12px"}));let a=d({...s,type:"button",width:"90px",height:"34px"});i.append(n,a),e.append(r,i);break}case "pricing-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="24px",e.style.borderRadius=l||"16px",e.style.border="1px solid rgba(0,0,0,0.08)";let r=d({...s,type:"badge",width:"70px",height:"22px"}),i=d({...s,type:"heading",width:"130px",height:"38px"}),n=d({...s,type:"line",width:"80%",height:"14px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="10px";for(let p=0;p<4;p++){let y=document.createElement("div");y.style.display="flex",y.style.alignItems="center",y.style.gap="8px",y.append(d({...s,type:"icon",width:"16px",height:"16px"}),d({...s,type:"line",width:"70%",height:"14px"})),a.appendChild(y);}let c=d({...s,type:"button",width:"100%",height:"42px"});e.append(r,i,n,a,c);break}case "testimonial":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="20px",e.style.borderRadius=l||"14px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=f(3,s),i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.gap="12px",i.append(d({...s,type:"circle",width:"42px",height:"42px"}),d({...s,type:"line",width:"120px",height:"16px"})),e.append(r,i);break}case "faq-accordion":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px";for(let r=0;r<3;r++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="8px",i.style.padding="14px 16px",i.style.borderRadius=l||"8px",i.style.border="1px solid rgba(0,0,0,0.06)";let n=document.createElement("div");if(n.style.display="flex",n.style.justifyContent="space-between",n.style.alignItems="center",n.append(d({...s,type:"line",width:"75%",height:"16px"}),d({...s,type:"icon",width:"16px",height:"16px"})),i.appendChild(n),r===0){let a=f(2,s);i.appendChild(a);}e.appendChild(i);}break}case "file-explorer":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.padding="12px";for(let r=0;r<5;r++){let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.gap="10px",i.style.marginLeft=`${r%3*16}px`,i.append(d({...s,type:"icon",width:"16px",height:"16px"}),d({...s,type:"line",width:`${100+r*20}px`,height:"14px"})),e.appendChild(i);}break}case "code-block":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="8px",e.style.padding="16px",e.style.borderRadius=l||"8px",e.style.background="rgba(0,0,0,0.05)";let r=["40%","70%","55%","85%","30%","60%"];for(let i of r)e.appendChild(d({...s,type:"line",width:i,height:"12px"}));break}case "e-commerce-checkout":{e.style.display="grid",e.style.gridTemplateColumns="repeat(auto-fit, minmax(280px, 1fr))",e.style.gap="20px";let r=document.createElement("div");r.style.display="flex",r.style.flexDirection="column",r.style.gap="12px",r.append(d({...s,type:"heading",width:"60%",height:"22px"}),d({...s,type:"input",width:"100%",height:"40px",radius:l||"6px"}),d({...s,type:"input",width:"100%",height:"40px",radius:l||"6px"}),d({...s,type:"input",width:"100%",height:"40px",radius:l||"6px"}));let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="12px",i.style.padding="16px",i.style.borderRadius=l||"8px",i.style.background="rgba(255,255,255,0.03)",i.append(d({...s,type:"heading",width:"50%",height:"20px"}),d({...s,type:"line",width:"100%",height:"14px"}),d({...s,type:"line",width:"80%",height:"14px"}),d({...s,type:"button",width:"100%",height:"44px",radius:l||"8px"})),e.append(r,i);break}case "social-story":{e.style.display="flex",e.style.flexDirection="column",e.style.width="240px",e.style.height="380px",e.style.borderRadius=l||"16px",e.style.padding="14px",e.style.position="relative",e.style.overflow="hidden",e.style.background="rgba(255,255,255,0.05)";let r=document.createElement("div");r.style.display="flex",r.style.gap="4px",r.style.width="100%";for(let n=0;n<4;n++){let a=d({...s,type:"rect",width:"100%",height:"3px",radius:"2px"});r.appendChild(a);}let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.gap="8px",i.style.marginTop="8px",i.append(d({...s,type:"circle",width:"32px",height:"32px"}),d({...s,type:"line",width:"80px",height:"12px"})),e.append(r,i);break}case "hero-banner":{e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.textAlign="center",e.style.gap="14px",e.style.padding="40px 20px";let r=d({...s,type:"badge",width:"110px",height:"24px",radius:"9999px"}),i=d({...s,type:"heading",width:"70%",height:"36px"}),n=d({...s,type:"line",width:"50%",height:"16px"}),a=d({...s,type:"line",width:"40%",height:"16px"}),c=document.createElement("div");c.style.display="flex",c.style.gap="12px",c.style.marginTop="10px",c.append(d({...s,type:"button",width:"140px",height:"44px",radius:l||"8px"}),d({...s,type:"button",width:"120px",height:"44px",radius:l||"8px"})),e.append(r,i,n,a,c);break}}return e}var j={en:{loading:"Loading content, please wait\u2026",loaded:"Content loaded.",progress:"Loading progress",busy:"Busy"},es:{loading:"Cargando contenido, por favor espere\u2026",loaded:"Contenido cargado.",progress:"Progreso de carga",busy:"Ocupado"},fr:{loading:"Chargement du contenu, veuillez patienter\u2026",loaded:"Contenu charg\xE9.",progress:"Progression du chargement",busy:"Occup\xE9"},de:{loading:"Inhalt wird geladen, bitte warten\u2026",loaded:"Inhalt geladen.",progress:"Ladefortschritt",busy:"Besch\xE4ftigt"},ja:{loading:"\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059\u2026",loaded:"\u8AAD\u307F\u8FBC\u307F\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002",progress:"\u8AAD\u307F\u8FBC\u307F\u72B6\u6CC1",busy:"\u51E6\u7406\u4E2D"},zh:{loading:"\u6B63\u5728\u52A0\u8F7D\u5185\u5BB9\uFF0C\u8BF7\u7A0D\u5019\u2026",loaded:"\u5185\u5BB9\u52A0\u8F7D\u5B8C\u6210\u3002",progress:"\u52A0\u8F7D\u8FDB\u5EA6",busy:"\u5FD9\u788C\u4E2D"},ar:{loading:"\u062C\u0627\u0631\u064A \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u062D\u062A\u0648\u0649\u060C \u064A\u0631\u062C\u0649 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631\u2026",loaded:"\u062A\u0645 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0645\u062D\u062A\u0648\u0649.",progress:"\u062A\u0642\u062F\u0645 \u0627\u0644\u062A\u062D\u0645\u064A\u0644",busy:"\u0645\u0634\u063A\u0648\u0644"}},ye="en",Y={};function q(t){ye=t;}function X(t){Object.assign(Y,t);}function Oe(t){return Y[t]?Y[t]:(j[ye]||j.en)[t]||j.en[t]||"Loading\u2026"}function me(t,e){t.setAttribute("aria-busy","true");let o=t.querySelector(".veil-sr-only");return o||(o=document.createElement("span"),o.className="veil-sr-only",o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),t.appendChild(o)),o.textContent=e||Oe("loading"),o}function ue(t){t.removeAttribute("aria-busy");let e=t.querySelector(".veil-sr-only");e&&e.remove();}var M=new Map,F="",W=class{show(e,o={}){h();let l,s=!e;if(s?l=document.body:typeof e=="string"?(l=document.querySelector(e),l||(l=document.body)):l=e,M.has(l))return M.get(l);let r=document.createElement("div");if(r.className=`veil-overlay ${s?"veil-overlay-fullscreen":""} ${o.className||""}`.trim(),r.setAttribute("role","status"),o.color&&r.style.setProperty("--veil-overlay-bg",o.color),o.blur!==void 0){let i=typeof o.blur=="boolean"?o.blur?"8px":"0px":o.blur;r.style.setProperty("--veil-overlay-blur",i);}if(o.zIndex!==void 0&&(r.style.zIndex=String(o.zIndex)),o.spinner!==false){let i=typeof o.spinner=="string"?o.spinner:"ring",n=v({type:i,size:36});r.appendChild(n);}if(o.message){let i=document.createElement("span");i.className="veil-overlay-message",i.style.fontSize="14px",i.style.fontWeight="500",i.style.color="var(--veil-contrast, #1f2937)",i.textContent=o.message,r.appendChild(i);}return s||window.getComputedStyle(l).position==="static"&&(l.style.position="relative"),me(l,o.message),o.lockScroll&&s&&typeof document<"u"&&(F=document.body.style.overflow,document.body.style.overflow="hidden"),l.appendChild(r),M.set(l,r),r}hide(e){let o,l=!e;l?o=document.body:typeof e=="string"?(o=document.querySelector(e),o||(o=document.body)):o=e;let s=M.get(o);s&&(s.style.opacity="0",setTimeout(()=>{s.remove(),M.delete(o),ue(o),l&&F!==void 0&&(document.body.style.overflow=F);},200));}},k=new W;function fe(t,e={}){h(),qe();let o=e.status||(e.loading?"loading":"idle"),l="",s="",r=t.innerHTML,i=null,n=e.pressFeedback||"press-scale";je(t,n);function a(){i&&(clearTimeout(i),i=null);}function c(y,m){a();let w=o;if(o=y,e.onStatusChange&&w!==y&&e.onStatusChange(y),y==="idle"){t.classList.remove("veil-btn-loading","veil-btn-success","veil-btn-error","veil-btn-shake","veil-btn-morph"),t.removeAttribute("aria-disabled"),t.removeAttribute("aria-busy"),t.style.width=l,t.style.height=s,t.innerHTML=r;return}if(w==="idle"){let u=t.getBoundingClientRect();l=t.style.width,s=t.style.height,r=t.innerHTML,u.width>0&&(t.style.width=`${u.width}px`),u.height>0&&(t.style.height=`${u.height}px`);}if(y==="loading"){t.classList.add("veil-btn-loading"),t.classList.remove("veil-btn-success","veil-btn-error"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-busy","true");let u=e.styleType||(e.spinnerPlacement==="replace"?"spinner-replace":e.spinnerPlacement==="end"?"spinner-right":"spinner-left");Ye(t,u,e,m||e.loadingText);}else if(y==="success"){t.classList.remove("veil-btn-loading","veil-btn-error"),t.classList.add("veil-btn-success"),t.setAttribute("aria-busy","false"),he(t,"success",m||e.successText||"Success",e.resultAnimation);let u=e.resetAfter!==void 0?e.resetAfter:2e3;u>0&&(i=setTimeout(()=>c("idle"),u));}else if(y==="error"){t.classList.remove("veil-btn-loading","veil-btn-success"),t.classList.add("veil-btn-error"),t.setAttribute("aria-busy","false"),he(t,"error",m||e.errorText||"Failed",e.resultAnimation);let u=e.resetAfter!==void 0?e.resetAfter:2e3;u>0&&(i=setTimeout(()=>c("idle"),u));}}let p=async y=>{if(o!=="idle"){y.preventDefault(),y.stopPropagation();return}if(e.onClick)try{let m=e.onClick(y);m&&typeof m.then=="function"&&(c("loading"),await m,c("success"));}catch{c("error");}};return t.addEventListener("click",p),e.status?c(e.status):e.loading&&c("loading",e.loadingText),{setStatus:c,setLoading:(y,m)=>c(y?"loading":"idle",m),getStatus:()=>o,destroy:()=>{a(),t.removeEventListener("click",p),c("idle");}}}function je(t,e){if(e!=="none")if(e==="press-scale"){t.style.transition="transform 100ms ease, box-shadow 150ms ease",t.addEventListener("mousedown",()=>{t.style.transform="scale(0.97)";});let o=()=>{t.style.transform="scale(1)";};t.addEventListener("mouseup",o),t.addEventListener("mouseleave",o);}else e==="ripple"?(t.style.position="relative",t.style.overflow="hidden",t.addEventListener("click",o=>{let l=t.getBoundingClientRect(),s=document.createElement("span"),r=Math.max(l.width,l.height),i=r/2;s.style.width=s.style.height=`${r}px`,s.style.left=`${o.clientX-l.left-i}px`,s.style.top=`${o.clientY-l.top-i}px`,s.className="veil-btn-ripple";let n=t.querySelector(".veil-btn-ripple");n&&n.remove(),t.appendChild(s);})):e==="glow-follow"&&t.addEventListener("mousemove",o=>{let l=t.getBoundingClientRect(),s=o.clientX-l.left,r=o.clientY-l.top;t.style.setProperty("--veil-mouse-x",`${s}px`),t.style.setProperty("--veil-mouse-y",`${r}px`);});}function Ye(t,e,o,l){let s=o.spinner||"ring",r=l||t.textContent?.trim()||"";switch(t.innerHTML="",e){case "spinner-left":{let i=v({type:s,size:16,color:"currentColor"});i.classList.add("veil-btn-spinner-wrap");let n=document.createElement("span");n.textContent=r,t.append(i,n);break}case "spinner-right":{let i=document.createElement("span");i.textContent=r;let n=v({type:s,size:16,color:"currentColor"});n.classList.add("veil-btn-spinner-wrap"),n.style.marginLeft="8px",n.style.marginRight="0",t.append(i,n);break}case "spinner-replace":{let i=v({type:s,size:20,color:"currentColor"});t.appendChild(i);break}case "dots-after-text":{let i=document.createElement("span");i.textContent=r;let n=document.createElement("span");n.className="veil-btn-typing-dots",n.textContent="...",t.append(i,n);break}case "progress-fill":{let i=document.createElement("div");i.className="veil-btn-progress-bar";let n=o.progress!==void 0?o.progress:60;i.style.width=`${n}%`;let a=document.createElement("span");a.style.position="relative",a.style.zIndex="2",a.textContent=r,t.append(i,a);break}case "shimmer-surface":{let i=document.createElement("span");i.textContent=r,i.style.position="relative",i.style.zIndex="2";let n=document.createElement("div");n.className="veil-btn-shimmer",t.append(i,n);break}case "pulse-glow":{t.classList.add("veil-btn-pulse-glow");let i=document.createElement("span");i.textContent=r,t.appendChild(i);break}case "stripes-progress":{let i=document.createElement("div");i.className="veil-btn-stripes";let n=document.createElement("span");n.style.position="relative",n.style.zIndex="2",n.textContent=r,t.append(i,n);break}case "morph-circle":{t.classList.add("veil-btn-morph");let i=v({type:s,size:20,color:"currentColor"});t.appendChild(i);break}case "slide-text":{let i=document.createElement("span");i.className="veil-btn-slide-wrap";let n=document.createElement("span");n.className="veil-btn-slide-out",n.textContent=r;let a=document.createElement("span");a.className="veil-btn-slide-in",a.textContent=l||"Loading\u2026",i.append(n,a),t.appendChild(i);break}case "border-trace":{let i=document.createElement("span");i.textContent=r,i.style.position="relative",i.style.zIndex="2";let n=document.createElement("div");n.className="veil-btn-border-trace",t.append(i,n);break}case "liquid-fill":{let i=document.createElement("div");i.className="veil-btn-liquid";let n=document.createElement("span");n.style.position="relative",n.style.zIndex="2",n.textContent=r,t.append(i,n);break}case "bounce-dots":{let i=v({type:"dots",size:22,color:"currentColor"}),n=document.createElement("span");n.textContent=r?` ${r}`:"",t.append(i,n);break}case "glass-shine":{t.classList.add("veil-btn-glass-shine");let i=document.createElement("span");i.textContent=r,t.appendChild(i);break}case "neon-pulse":{t.classList.add("veil-btn-neon-pulse");let i=document.createElement("span");i.textContent=r,t.appendChild(i);break}case "skeleton-button":{let i=document.createElement("div");i.className="veil-skeleton",i.setAttribute("data-veil-shape","button"),i.setAttribute("data-veil-anim","shimmer"),i.style.width="100%",i.style.height="100%",t.appendChild(i);break}}}function he(t,e,o,l="checkmark"){if(t.innerHTML="",t.style.display="inline-flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.gap="8px",e==="error"&&(l==="shake"||l==="cross"||l==="none")&&t.classList.add("veil-btn-shake"),e==="success"&&l==="success-burst"){let n=document.createElement("div");n.className="veil-btn-burst",t.appendChild(n);}let s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox","0 0 24 24"),s.style.width="18px",s.style.height="18px",s.style.stroke="currentColor",s.style.strokeWidth="2.5",s.style.fill="none",s.style.strokeLinecap="round",s.style.strokeLinejoin="round";let r=document.createElementNS("http://www.w3.org/2000/svg","path");e==="success"?r.setAttribute("d","M5 13l4 4L19 7"):r.setAttribute("d","M6 18L18 6M6 6l12 12"),r.style.strokeDasharray="30",r.style.strokeDashoffset="30",r.style.animation="veil-draw 300ms ease forwards",s.appendChild(r);let i=document.createElement("span");i.textContent=o,t.append(s,i);}var ge=false;function qe(){if(ge||typeof document>"u")return;ge=true;let t=document.createElement("style");t.id="veilkit-button-styles",t.textContent=`
|
|
584
584
|
.veil-btn-loading { position: relative; cursor: wait !important; pointer-events: none; }
|
|
585
585
|
.veil-btn-success { background-color: #10b981 !important; color: #fff !important; }
|
|
586
586
|
.veil-btn-error { background-color: #ef4444 !important; color: #fff !important; }
|
|
@@ -656,5 +656,5 @@ ${Q()}
|
|
|
656
656
|
@keyframes veil-liquid-wave { from { transform: scaleY(0.7); } to { transform: scaleY(1); } }
|
|
657
657
|
@keyframes veil-burst { 0% { opacity: 1; transform: scale(0.95); } 100% { opacity: 0; transform: scale(1.2); } }
|
|
658
658
|
@keyframes veil-typing-text { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
|
|
659
|
-
`,document.head.appendChild(t);}function ve(t){h();let e=document.createElement("div");if(e.className=`veil-lazy-img-wrap ${t.className||""}`.trim(),e.style.position="relative",e.style.display="inline-block",e.style.overflow="hidden",t.width&&(e.style.width=typeof t.width=="number"?`${t.width}px`:t.width),t.height&&(e.style.height=typeof t.height=="number"?`${t.height}px`:t.height),t.aspectRatio&&(e.style.aspectRatio=String(t.aspectRatio)),t.radius){let
|
|
659
|
+
`,document.head.appendChild(t);}function ve(t){h();let e=document.createElement("div");if(e.className=`veil-lazy-img-wrap ${t.className||""}`.trim(),e.style.position="relative",e.style.display="inline-block",e.style.overflow="hidden",t.width&&(e.style.width=typeof t.width=="number"?`${t.width}px`:t.width),t.height&&(e.style.height=typeof t.height=="number"?`${t.height}px`:t.height),t.aspectRatio&&(e.style.aspectRatio=String(t.aspectRatio)),t.radius){let s=typeof t.radius=="number"?`${t.radius}px`:t.radius;e.style.borderRadius=s;}let o=d({animation:t.animation||"shimmer",theme:t.theme,width:"100%",height:"100%",radius:t.radius});o.style.position="absolute",o.style.inset="0",e.appendChild(o);let l=document.createElement("img");return l.alt=t.alt||"",l.className="veil-lazy-img veil-lazy-img-loading",l.style.width="100%",l.style.height="100%",l.style.objectFit="cover",l.style.display="block",l.onload=()=>{l.classList.remove("veil-lazy-img-loading"),l.classList.add("veil-lazy-img-loaded"),o.style.opacity="0",setTimeout(()=>{o.remove();},350),t.onLoad&&t.onLoad();},l.onerror=s=>{t.fallbackSrc&&l.src!==t.fallbackSrc?l.src=t.fallbackSrc:(o.remove(),e.style.backgroundColor="#fee2e2",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.textContent="\u26A0\uFE0F Image failed to load"),t.onError&&t.onError(s);},l.src=t.src,e.appendChild(l),e}var be=defineComponent({name:"VSkeleton",props:{type:{type:String,default:"rect"},width:{type:[String,Number]},height:{type:[String,Number]},radius:{type:[String,Number]},count:{type:Number,default:1},gap:{type:[String,Number],default:"0.5rem"},lines:{type:Number},lastLineWidth:{type:[String,Number],default:"65%"},animation:{type:String,default:"shimmer"},theme:{type:String,default:"light"},shape:{type:String},circle:{type:Boolean,default:false},label:{type:String,default:"Loading"}},setup(t,{slots:e}){return onMounted(()=>h()),()=>{let o=t.circle?"circle":t.lines?"line":t.type,l=t.lines||(t.count>1?t.count:1);if(l>1){let s=["100%","94%","88%","75%"];return h$1("div",{class:"veil-lines-group",role:"status","aria-label":t.label,style:{display:"flex",flexDirection:"column",gap:typeof t.gap=="number"?`${t.gap}px`:t.gap}},[h$1("span",{class:"veil-sr-only"},t.label),...Array.from({length:l}).map((r,i)=>{let a=i===l-1?t.lastLineWidth:s[i%s.length]||"95%";return h$1("div",{key:i,class:"veil-skeleton","data-veil-shape":"line","data-veil-anim":t.animation,"data-veil-theme":t.theme,"aria-hidden":"true",style:{width:typeof a=="number"?`${a}px`:a,"--veil-stagger-idx":i}})})])}return h$1("div",{class:"veil-skeleton","data-veil-shape":o,"data-veil-anim":t.animation,"data-veil-theme":t.theme,role:"status","aria-label":t.label,style:{width:typeof t.width=="number"?`${t.width}px`:t.width,height:typeof t.height=="number"?`${t.height}px`:t.height,borderRadius:t.circle?"50%":typeof t.radius=="number"?`${t.radius}px`:t.radius}},[h$1("span",{class:"veil-sr-only"},t.label),e.default?e.default():null])}}}),Wt=defineComponent({name:"VSkeletonPreset",props:{name:{type:String,required:true},items:{type:Number},columns:{type:Number},shape:{type:String,default:"rounded"},animation:{type:String,default:"shimmer"},theme:{type:String,default:"light"},width:{type:[String,Number]}},setup(t){let e=ref(null);return onMounted(()=>{if(!e.value)return;let o=P({name:t.name,items:t.items,columns:t.columns,shape:t.shape,animation:t.animation,theme:t.theme,width:t.width});e.value.replaceWith(o);}),()=>h$1("div",{ref:e,class:"veil-preset-vue"})}}),xe=defineComponent({name:"VVeil",props:{loading:{type:Boolean,required:true},cacheKey:{type:String},persistCache:{type:Boolean,default:false},reveal:{type:String,default:"fade"}},setup(t,{slots:e}){let o=ref(null),l=null;return watch(()=>t.loading,s=>{o.value&&(s?l=T(o.value,{cacheKey:t.cacheKey,persistCache:t.persistCache,reveal:t.reveal}):l&&(l.destroy(),l=null));},{immediate:true}),onUnmounted(()=>{l&&l.destroy();}),()=>h$1("div",{ref:o,class:"veil-vue-wrapper",style:{position:"relative"}},e.default?.())}}),we=defineComponent({name:"VSpinner",props:{type:{type:String,default:"ring"},size:{type:[String,Number],default:28},color:{type:String},secondaryColor:{type:String},speed:{type:[String,Number]},glass:{type:Boolean,default:false},label:{type:String,default:"Loading"}},setup(t){let e=ref(null);return onMounted(()=>{if(!e.value)return;let o=v({type:t.type,size:t.size,color:t.color,secondaryColor:t.secondaryColor,speed:t.speed,glass:t.glass,label:t.label});e.value.appendChild(o);}),()=>h$1("div",{ref:e,class:"veil-spinner-vue",style:{display:"inline-flex"}})}}),ke=defineComponent({name:"VProgressBar",props:{value:{type:Number},circular:{type:Boolean,default:false},size:{type:[String,Number]},color:{type:String}},setup(t){let e=ref(null);return onMounted(()=>{if(!e.value)return;let o=ne(t);e.value.appendChild(o);}),()=>h$1("div",{ref:e,class:"veil-progress-vue"})}}),Ce=defineComponent({name:"VOverlay",props:{visible:{type:Boolean,default:false},blur:{type:Boolean,default:true},message:{type:String},spinner:{type:String,default:"ring"}},setup(t,{slots:e}){let o=ref(null);return watch(()=>t.visible,l=>{o.value&&(l?k.show(o.value,{blur:t.blur,message:t.message,spinner:t.spinner}):k.hide(o.value));}),onUnmounted(()=>{o.value&&k.hide(o.value);}),()=>h$1("div",{ref:o,class:"veil-overlay-vue",style:{position:"relative"}},e.default?.())}}),Ee=defineComponent({name:"VLoadingButton",props:{status:{type:String},loading:{type:Boolean,default:false},styleType:{type:String,default:"spinner-left"},spinner:{type:String,default:"ring"},loadingText:{type:String},successText:{type:String},errorText:{type:String},resetAfter:{type:Number,default:2e3},progress:{type:Number},pressFeedback:{type:String,default:"press-scale"},resultAnimation:{type:String,default:"checkmark"}},setup(t,{slots:e}){let o=ref(null),l=null;return onMounted(()=>{o.value&&(l=fe(o.value,{status:t.status,loading:t.loading,styleType:t.styleType,spinner:t.spinner,loadingText:t.loadingText,successText:t.successText,errorText:t.errorText,resetAfter:t.resetAfter,progress:t.progress,pressFeedback:t.pressFeedback,resultAnimation:t.resultAnimation}));}),watch(()=>[t.status,t.loading],()=>{l&&(t.status?l.setStatus(t.status):l.setLoading(t.loading,t.loadingText));}),onUnmounted(()=>{l&&l.destroy();}),()=>h$1("button",{ref:o,class:"veil-button"},e.default?.())}}),Te=defineComponent({name:"VLazyImage",props:{src:{type:String,required:true},alt:{type:String,default:""},width:{type:[String,Number]},height:{type:[String,Number]},radius:{type:[String,Number]}},setup(t){let e=ref(null);return onMounted(()=>{if(!e.value)return;let o=ve(t);e.value.appendChild(o);}),()=>h$1("div",{ref:e,class:"veil-lazy-img-vue"})}});async function K(t,e={}){let o=C.start(e.id);e.progress&&g.start();let l=new L({delay:e.delay!==void 0?e.delay:150,minVisible:e.minVisible!==void 0?e.minVisible:300,onShow:()=>{e.overlay&&k.show(e.target),e.onStart&&e.onStart();},onHide:()=>{e.overlay&&k.hide(e.target),e.onFinish&&e.onFinish();}});l.start();try{return await(typeof t=="function"?t():t)}catch(s){throw e.progress&&g.fail(),s}finally{C.stop(o),e.progress&&g.done(),l.finish();}}function Se(t=typeof window<"u"?window.fetch.bind(window):fetch,e={}){return async function(l,s){return K(()=>t(l,s),e)}}var U=class{config={};configure(e){Object.assign(this.config,e),e.nonce&&ie(e.nonce),e.locale&&q(e.locale),e.labels&&X(e.labels),h(e.nonce);}skeleton(e,o={}){h();let l=typeof e=="string"?document.querySelector(e):e;if(!l)throw new Error("[Veilkit] Target element not found for skeleton.");let s=null,r=false,i=()=>{r||(r=true,l.setAttribute("aria-busy","true"),s=T(l,o,o));},n=()=>{r&&(r=false,l.removeAttribute("aria-busy"),s&&(s.destroy(),s=null));},a=p=>{Object.assign(o,p),s&&s.refresh();},c=()=>{n();};return i(),{element:l,show:i,hide:n,update:a,destroy:c}}spinner(e,o={}){let l=typeof e=="string"?document.querySelector(e):e,s=v(o);return l&&l.appendChild(s),s}overlay=k;progress=g;manager=C;track=K;wrapFetch=Se;setLocale=q;setLabels=X;createTheme=D;getThemeTokens=Z;createSkeleton=d;createPrimitive=oe;createPreset=P},Xe=new U,I=Xe;var Fe={install(t,e={}){I.configure(e),t.directive("veil",ce),t.component("VSkeleton",be),t.component("VVeil",xe),t.component("VSpinner",we),t.component("VProgressBar",ke),t.component("VOverlay",Ce),t.component("VLoadingButton",Ee),t.component("VLazyImage",Te),t.config.globalProperties.$veil=I,t.provide("veil",I);}};function fi(t){typeof window<"u"&&(h(),t?.hook&&(t.hook("page:start",()=>{g.start();}),t.hook("page:finish",()=>{g.done();})));}export{Te as VLazyImage,Ee as VLoadingButton,Ce as VOverlay,ke as VProgressBar,be as VSkeleton,Wt as VSkeletonPreset,we as VSpinner,xe as VVeil,Fe as default,fi as defineNuxtVeilkit,Re as useDelayedLoading,rt as useLoading,st as useProgress,ce as vVeil,Fe as veilkitPlugin};//# sourceMappingURL=index.js.map
|
|
660
660
|
//# sourceMappingURL=index.js.map
|