veilkit 0.0.0-stage → 0.1.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +21 -0
  3. package/README.md +245 -2
  4. package/dist/angular/index.cjs +394 -0
  5. package/dist/angular/index.cjs.map +1 -0
  6. package/dist/angular/index.d.cts +78 -0
  7. package/dist/angular/index.d.ts +78 -0
  8. package/dist/angular/index.js +394 -0
  9. package/dist/angular/index.js.map +1 -0
  10. package/dist/cli/index.cjs +25 -0
  11. package/dist/cli/index.cjs.map +1 -0
  12. package/dist/cli/index.d.cts +1 -0
  13. package/dist/cli/index.d.ts +1 -0
  14. package/dist/cli/index.js +25 -0
  15. package/dist/cli/index.js.map +1 -0
  16. package/dist/controller-5OzP0U8X.d.cts +193 -0
  17. package/dist/controller-Co5bvnaB.d.ts +193 -0
  18. package/dist/element/index.cjs +395 -0
  19. package/dist/element/index.cjs.map +1 -0
  20. package/dist/element/index.d.cts +42 -0
  21. package/dist/element/index.d.ts +42 -0
  22. package/dist/element/index.js +395 -0
  23. package/dist/element/index.js.map +1 -0
  24. package/dist/index.cjs +394 -0
  25. package/dist/index.cjs.map +1 -0
  26. package/dist/index.d.cts +209 -0
  27. package/dist/index.d.ts +209 -0
  28. package/dist/index.js +394 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/native/index.cjs +2 -0
  31. package/dist/native/index.cjs.map +1 -0
  32. package/dist/native/index.d.cts +48 -0
  33. package/dist/native/index.d.ts +48 -0
  34. package/dist/native/index.js +2 -0
  35. package/dist/native/index.js.map +1 -0
  36. package/dist/react/index.cjs +394 -0
  37. package/dist/react/index.cjs.map +1 -0
  38. package/dist/react/index.d.cts +99 -0
  39. package/dist/react/index.d.ts +99 -0
  40. package/dist/react/index.js +394 -0
  41. package/dist/react/index.js.map +1 -0
  42. package/dist/styles.css +377 -0
  43. package/dist/svelte/index.cjs +394 -0
  44. package/dist/svelte/index.cjs.map +1 -0
  45. package/dist/svelte/index.d.cts +41 -0
  46. package/dist/svelte/index.d.ts +41 -0
  47. package/dist/svelte/index.js +394 -0
  48. package/dist/svelte/index.js.map +1 -0
  49. package/dist/themes/index.cjs +2 -0
  50. package/dist/themes/index.cjs.map +1 -0
  51. package/dist/themes/index.d.cts +18 -0
  52. package/dist/themes/index.d.ts +18 -0
  53. package/dist/themes/index.js +2 -0
  54. package/dist/themes/index.js.map +1 -0
  55. package/dist/types-Ciu5e5xt.d.cts +159 -0
  56. package/dist/types-Ciu5e5xt.d.ts +159 -0
  57. package/dist/veilkit.min.js +393 -0
  58. package/dist/vue/index.cjs +394 -0
  59. package/dist/vue/index.cjs.map +1 -0
  60. package/dist/vue/index.d.cts +366 -0
  61. package/dist/vue/index.d.ts +366 -0
  62. package/dist/vue/index.js +394 -0
  63. package/dist/vue/index.js.map +1 -0
  64. package/package.json +238 -4
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Veilkit - Core Type Definitions
3
+ * Complete Loading & Skeleton UI Toolkit
4
+ */
5
+ type VeilThemeName = 'light' | 'dark' | 'auto' | 'glass' | 'ios' | 'material' | 'minimal' | 'mono' | 'neon' | 'sunset' | 'ocean';
6
+ type VeilAnimationName = 'shimmer' | 'wave' | 'pulse' | 'blink' | 'breathe' | 'glass-shine' | 'gradient-flow' | 'aurora' | 'scan-line' | 'sparkle' | 'neon-glow' | 'stagger' | 'none';
7
+ type VeilDirection = 'ltr' | 'rtl' | 'ttb' | 'btt';
8
+ type VeilPrimitiveType = 'line' | 'paragraph' | 'heading' | 'circle' | 'rect' | 'image' | 'button' | 'badge' | 'icon' | 'input' | 'table-row' | 'divider';
9
+ type VeilPresetName = 'card' | 'product-card' | 'product-grid' | 'list' | 'list-item' | 'table' | 'profile' | 'profile-header' | 'feed-post' | 'article' | 'comment-thread' | 'chat' | 'dashboard' | 'form' | 'media-card' | 'navbar' | 'sidebar' | 'settings-page';
10
+ type VeilSpinnerType = 'ring' | 'dual-ring' | 'dots' | 'bars' | 'pulse' | 'orbit' | 'wave' | 'bounce' | 'ios-activity' | 'glass-orb' | 'morph' | 'progress-circle';
11
+ type VeilRevealTransition = 'fade' | 'blur-in' | 'slide-up' | 'scale' | 'stagger-children' | 'none';
12
+ interface VeilThemeTokens {
13
+ base: string;
14
+ highlight: string;
15
+ radius: string;
16
+ duration: string;
17
+ easing: string;
18
+ blur?: string;
19
+ border?: string;
20
+ glow?: string;
21
+ contrast?: string;
22
+ }
23
+ type CustomThemeInput = Partial<VeilThemeTokens> & {
24
+ name: string;
25
+ parent?: VeilThemeName;
26
+ };
27
+ interface VeilGlobalConfig {
28
+ theme?: VeilThemeName | CustomThemeInput;
29
+ animation?: VeilAnimationName;
30
+ duration?: number | string;
31
+ easing?: string;
32
+ direction?: VeilDirection;
33
+ speedMultiplier?: number;
34
+ intensity?: number;
35
+ nonce?: string;
36
+ locale?: string;
37
+ labels?: Record<string, string>;
38
+ syncTimeline?: boolean;
39
+ pauseOffscreen?: boolean;
40
+ respectReducedMotion?: boolean;
41
+ antiFlicker?: {
42
+ delay?: number;
43
+ minVisible?: number;
44
+ };
45
+ }
46
+ interface SkeletonProps {
47
+ type?: VeilPrimitiveType;
48
+ width?: string | number;
49
+ height?: string | number;
50
+ radius?: string | number;
51
+ count?: number;
52
+ gap?: string | number;
53
+ lines?: number;
54
+ lastLineWidth?: string | number;
55
+ animation?: VeilAnimationName;
56
+ theme?: VeilThemeName | CustomThemeInput;
57
+ direction?: VeilDirection;
58
+ speed?: number | string;
59
+ intensity?: number;
60
+ className?: string;
61
+ style?: Record<string, string | number>;
62
+ ariaLabel?: string;
63
+ }
64
+ interface PresetProps extends Omit<SkeletonProps, 'type'> {
65
+ name: VeilPresetName;
66
+ items?: number;
67
+ columns?: number;
68
+ }
69
+ interface AutoMeasureOptions {
70
+ container?: HTMLElement;
71
+ cacheKey?: string;
72
+ persistCache?: boolean;
73
+ ignoreSelector?: string;
74
+ observeMutations?: boolean;
75
+ observeResize?: boolean;
76
+ preserveBackground?: boolean;
77
+ reveal?: VeilRevealTransition;
78
+ revealDuration?: number;
79
+ revealEasing?: string;
80
+ delay?: number;
81
+ minVisible?: number;
82
+ }
83
+ interface SkeletonController {
84
+ element: HTMLElement;
85
+ show: () => void;
86
+ hide: () => void;
87
+ update: (props: Partial<SkeletonProps>) => void;
88
+ destroy: () => void;
89
+ }
90
+ interface SpinnerProps {
91
+ type?: VeilSpinnerType;
92
+ size?: number | string;
93
+ color?: string;
94
+ secondaryColor?: string;
95
+ speed?: number | string;
96
+ label?: string;
97
+ className?: string;
98
+ style?: Record<string, string | number>;
99
+ }
100
+ interface ProgressProps {
101
+ value?: number;
102
+ max?: number;
103
+ height?: number | string;
104
+ color?: string;
105
+ trackColor?: string;
106
+ circular?: boolean;
107
+ size?: number | string;
108
+ strokeWidth?: number;
109
+ trickle?: boolean;
110
+ showPercentage?: boolean;
111
+ status?: 'loading' | 'success' | 'error';
112
+ className?: string;
113
+ }
114
+ interface OverlayProps {
115
+ target?: HTMLElement | string;
116
+ visible?: boolean;
117
+ blur?: boolean | string;
118
+ opacity?: number;
119
+ color?: string;
120
+ spinner?: VeilSpinnerType | boolean;
121
+ message?: string;
122
+ lockScroll?: boolean;
123
+ className?: string;
124
+ zIndex?: number;
125
+ }
126
+ interface LoadingButtonProps {
127
+ loading?: boolean;
128
+ spinner?: VeilSpinnerType;
129
+ spinnerPlacement?: 'start' | 'end' | 'replace';
130
+ loadingText?: string;
131
+ disabled?: boolean;
132
+ className?: string;
133
+ children?: any;
134
+ onClick?: (event: any) => void;
135
+ }
136
+ interface LazyImageProps {
137
+ src: string;
138
+ alt?: string;
139
+ width?: string | number;
140
+ height?: string | number;
141
+ radius?: string | number;
142
+ aspectRatio?: string | number;
143
+ animation?: VeilAnimationName;
144
+ theme?: VeilThemeName;
145
+ reveal?: VeilRevealTransition;
146
+ fallbackSrc?: string;
147
+ onLoad?: () => void;
148
+ onError?: (err: any) => void;
149
+ className?: string;
150
+ }
151
+ interface TextLoaderProps {
152
+ text?: string;
153
+ dots?: number;
154
+ speed?: number;
155
+ locale?: string;
156
+ className?: string;
157
+ }
158
+
159
+ export type { AutoMeasureOptions as A, CustomThemeInput as C, LoadingButtonProps as L, OverlayProps as O, ProgressProps as P, SkeletonProps as S, TextLoaderProps as T, VeilThemeName as V, VeilAnimationName as a, SpinnerProps as b, VeilGlobalConfig as c, VeilPrimitiveType as d, VeilSpinnerType as e, PresetProps as f, SkeletonController as g, LazyImageProps as h, VeilDirection as i, VeilRevealTransition as j, VeilPresetName as k, VeilThemeTokens as l };
@@ -0,0 +1,393 @@
1
+ "use strict";var Veilkit=(()=>{var V=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var fe=Object.prototype.hasOwnProperty;var ve=(t,e)=>{for(var n in e)V(t,n,{get:e[n],enumerable:!0})},be=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ge(e))!fe.call(t,s)&&s!==n&&V(t,s,{get:()=>e[s],enumerable:!(r=ye(e,s))||r.enumerable});return t};var xe=t=>be(V({},"__esModule",{value:!0}),t);var $e={};ve($e,{ANIMATION_NAMES:()=>we,AntiFlickerController:()=>S,BUILTIN_THEMES:()=>y,LoadingManager:()=>R,OverlayController:()=>O,RouteProgressController:()=>I,SPINNER_TYPES:()=>Ee,VeilkitController:()=>H,applyA11yLoading:()=>K,applyReveal:()=>Z,createAutoMeasureOverlay:()=>Q,createLazyImage:()=>Me,createPreset:()=>x,createPrimitive:()=>J,createProgressElement:()=>Se,createSkeletonElement:()=>o,createSkeletonParagraph:()=>g,createSpinner:()=>v,createTextLoader:()=>Pe,createTheme:()=>A,default:()=>pe,getAnimationKeyframesCSS:()=>j,getCachedLayout:()=>de,getLabel:()=>$,getLocale:()=>Ce,getStylesCSS:()=>oe,getSyncDelay:()=>M,getThemeTokens:()=>D,getTimelineOrigin:()=>ne,injectStyles:()=>u,loadingManager:()=>T,measureContainer:()=>me,observeOffscreen:()=>W,overlayController:()=>C,parseDurationMs:()=>Y,progressController:()=>w,removeA11yLoading:()=>G,setCachedLayout:()=>ce,setLabels:()=>P,setLocale:()=>k,setNonce:()=>U,setupVisibilityObserver:()=>ae,teardownObservers:()=>Te,track:()=>z,veil:()=>pe,wrapFetch:()=>te,wrapLoadingButton:()=>Ae});var y={light:{base:"#e5e7eb",highlight:"rgba(255, 255, 255, 0.7)",radius:"6px",duration:"1.5s",easing:"cubic-bezier(0.4, 0, 0.2, 1)",border:"none",contrast:"#374151"},dark:{base:"#1f2937",highlight:"rgba(255, 255, 255, 0.12)",radius:"6px",duration:"1.5s",easing:"cubic-bezier(0.4, 0, 0.2, 1)",border:"none",contrast:"#f3f4f6"},auto:{base:"var(--veil-auto-base, #e5e7eb)",highlight:"var(--veil-auto-highlight, rgba(255, 255, 255, 0.7))",radius:"6px",duration:"1.5s",easing:"cubic-bezier(0.4, 0, 0.2, 1)",border:"none",contrast:"var(--veil-auto-contrast, #374151)"},glass:{base:"rgba(255, 255, 255, 0.08)",highlight:"rgba(255, 255, 255, 0.25)",radius:"12px",duration:"1.8s",easing:"cubic-bezier(0.25, 1, 0.5, 1)",blur:"12px",border:"1px solid rgba(255, 255, 255, 0.15)",glow:"inset 0 1px 1px 0 rgba(255, 255, 255, 0.25), 0 4px 16px 0 rgba(0, 0, 0, 0.12)",contrast:"#ffffff"},ios:{base:"rgba(120, 120, 128, 0.18)",highlight:"rgba(255, 255, 255, 0.45)",radius:"10px",duration:"1.4s",easing:"cubic-bezier(0.32, 0.72, 0, 1)",border:"none",contrast:"#1c1c1e"},material:{base:"#e7e0ec",highlight:"#f7f2fa",radius:"12px",duration:"1.6s",easing:"cubic-bezier(0.2, 0, 0, 1)",border:"none",contrast:"#1d1b20"},minimal:{base:"#f1f3f5",highlight:"#ffffff",radius:"4px",duration:"1.4s",easing:"ease-in-out",border:"none",contrast:"#212529"},mono:{base:"#e0e0e0",highlight:"#ffffff",radius:"0px",duration:"1.2s",easing:"linear",border:"1px solid #cccccc",contrast:"#000000"},neon:{base:"#0c0b16",highlight:"rgba(0, 240, 255, 0.5)",radius:"8px",duration:"1.6s",easing:"cubic-bezier(0.4, 0, 0.2, 1)",border:"1px solid rgba(0, 240, 255, 0.3)",glow:"0 0 12px rgba(0, 240, 255, 0.35)",contrast:"#00f0ff"},sunset:{base:"#fed7aa",highlight:"#fff7ed",radius:"8px",duration:"1.7s",easing:"cubic-bezier(0.4, 0, 0.2, 1)",border:"none",glow:"0 0 8px rgba(251, 146, 60, 0.25)",contrast:"#7c2d12"},ocean:{base:"#0f2937",highlight:"rgba(56, 189, 248, 0.45)",radius:"8px",duration:"1.7s",easing:"cubic-bezier(0.4, 0, 0.2, 1)",border:"1px solid rgba(56, 189, 248, 0.2)",glow:"0 0 10px rgba(56, 189, 248, 0.25)",contrast:"#38bdf8"}},ie=new Map;function A(t){let e=t.parent&&y[t.parent]?y[t.parent]:y.light,n={base:t.base??e.base,highlight:t.highlight??e.highlight,radius:t.radius??e.radius,duration:t.duration??e.duration,easing:t.easing??e.easing,border:t.border??e.border,blur:t.blur??e.blur,glow:t.glow??e.glow,contrast:t.contrast??e.contrast};return ie.set(t.name,n),n}function D(t){if(!t)return y.light;if(typeof t=="string"){if(t in y)return y[t];let e=ie.get(t);return e||y.light}return A(t)}var we=["shimmer","wave","pulse","blink","breathe","glass-shine","gradient-flow","aurora","scan-line","sparkle","neon-glow","stagger","none"];function j(){return["@keyframes veil-shimmer-ltr{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}","@keyframes veil-shimmer-rtl{0%{transform:translateX(100%)}100%{transform:translateX(-100%)}}","@keyframes veil-shimmer-ttb{0%{transform:translateY(-100%)}100%{transform:translateY(100%)}}","@keyframes veil-shimmer-btt{0%{transform:translateY(100%)}100%{transform:translateY(-100%)}}","@keyframes veil-wave{0%{transform:translateX(-120%) scaleX(0.8);opacity:0.3}50%{opacity:0.95}100%{transform:translateX(120%) scaleX(1.2);opacity:0.3}}","@keyframes veil-pulse{0%,100%{opacity:1}50%{opacity:0.38}}","@keyframes veil-blink{0%,49%{opacity:1}50%,99%{opacity:0.2}100%{opacity:1}}","@keyframes veil-breathe{0%,100%{opacity:0.65;transform:scale(0.995)}50%{opacity:1;transform:scale(1.005)}}","@keyframes veil-glass-shine{0%{transform:translate3d(-150%,-150%,0) rotate(35deg);opacity:0.1}40%,60%{opacity:0.85}100%{transform:translate3d(200%,200%,0) rotate(35deg);opacity:0.1}}","@keyframes veil-gradient-flow{0%{transform:translateX(-66.6%)}100%{transform:translateX(0%)}}","@keyframes veil-aurora{0%{transform:translate3d(-20%,-15%,0) rotate(0deg) scale(1);opacity:0.5}50%{transform:translate3d(25%,20%,0) rotate(180deg) scale(1.25);opacity:0.85}100%{transform:translate3d(-20%,-15%,0) rotate(360deg) scale(1);opacity:0.5}}","@keyframes veil-scan-line{0%{transform:translateY(-100%);opacity:0.2}50%{opacity:1}100%{transform:translateY(300%);opacity:0.2}}","@keyframes veil-sparkle{0%,100%{opacity:0.2;transform:scale(0.98)}25%{opacity:0.8;transform:scale(1.02)}50%{opacity:0.3;transform:scale(0.99)}75%{opacity:0.95;transform:scale(1.01)}}","@keyframes veil-neon-glow{0%,100%{opacity:0.45;transform:scale(0.998)}50%{opacity:1;transform:scale(1.002)}}",'[data-veil-anim="stagger"]>*{animation-delay:calc(var(--veil-stagger-idx,0)*120ms)!important}'].join("")}var B=0;function ne(){return B===0&&typeof performance<"u"&&(B=performance.now()),B}function M(t=1500){if(typeof performance>"u")return"0ms";let e=performance.now()-ne();return`-${Math.round(e%t)}ms`}function Y(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 f=null,F=new Set,re=!1;function ke(t){for(let e of t){let n=e.target;e.isIntersecting?(n.removeAttribute("data-veil-offscreen"),n.style.removeProperty("--veil-play-state")):(n.setAttribute("data-veil-offscreen","true"),n.style.setProperty("--veil-play-state","paused"))}}function ae(){re||typeof document>"u"||(re=!0,document.addEventListener("visibilitychange",()=>{document.hidden?document.documentElement.setAttribute("data-veil-tab-hidden","true"):document.documentElement.removeAttribute("data-veil-tab-hidden")}))}function W(t){return typeof window>"u"||typeof IntersectionObserver>"u"?()=>{}:(ae(),f||(f=new IntersectionObserver(ke,{rootMargin:"100px 0px",threshold:0})),f.observe(t),F.add(t),()=>{f&&t&&(f.unobserve(t),F.delete(t))})}function Te(){f&&(f.disconnect(),f=null),F.clear()}var _={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"}},q="en",X={};function k(t){q=t}function Ce(){return q}function P(t){Object.assign(X,t)}function $(t){return X[t]?X[t]:(_[q]||_.en)[t]||_.en[t]||"Loading\u2026"}function K(t,e){t.setAttribute("aria-busy","true");let n=t.querySelector(".veil-sr-only");return n||(n=document.createElement("span"),n.className="veil-sr-only",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),t.appendChild(n)),n.textContent=e||$("loading"),n}function G(t){t.removeAttribute("aria-busy");let e=t.querySelector(".veil-sr-only");e&&e.remove()}var se=!1,le;function U(t){le=t}function oe(){let t=y.light,e=y.dark;return`
2
+ /* === VEILKIT CORE STYLES === */
3
+ :root {
4
+ --veil-base: ${t.base};
5
+ --veil-highlight: ${t.highlight};
6
+ --veil-radius: ${t.radius};
7
+ --veil-duration: ${t.duration};
8
+ --veil-easing: ${t.easing};
9
+ --veil-direction: ltr;
10
+ --veil-border: none;
11
+ --veil-blur: none;
12
+ --veil-glow: none;
13
+ --veil-contrast: ${t.contrast};
14
+
15
+ --veil-auto-base: ${t.base};
16
+ --veil-auto-highlight: ${t.highlight};
17
+ --veil-auto-contrast: ${t.contrast};
18
+ }
19
+
20
+ @media (prefers-color-scheme: dark) {
21
+ :root {
22
+ --veil-auto-base: ${e.base};
23
+ --veil-auto-highlight: ${e.highlight};
24
+ --veil-auto-contrast: ${e.contrast};
25
+ }
26
+ }
27
+
28
+ /* === DARK THEME SELECTORS === */
29
+ [data-theme="dark"], .dark, [data-theme="dark"] .veil-skeleton {
30
+ --veil-base: ${e.base};
31
+ --veil-highlight: ${e.highlight};
32
+ --veil-contrast: ${e.contrast};
33
+ }
34
+
35
+ /* === THEME ATTRIBUTE CLASSES === */
36
+ ${Object.entries(y).map(([n,r])=>`[data-veil-theme="${n}"]{--veil-base:${r.base};--veil-highlight:${r.highlight};--veil-radius:${r.radius};--veil-duration:${r.duration};--veil-easing:${r.easing};${r.border?`--veil-border:${r.border};`:""}${r.blur?`--veil-blur:${r.blur};`:""}${r.glow?`--veil-glow:${r.glow};`:""}--veil-contrast:${r.contrast};}`).join("")}
37
+
38
+ /* === BASE SKELETON ELEMENT === */
39
+ .veil-skeleton {
40
+ position: relative;
41
+ display: block;
42
+ box-sizing: border-box;
43
+ background-color: var(--veil-base, #e5e7eb);
44
+ border-radius: var(--veil-radius, 6px);
45
+ border: var(--veil-border, none);
46
+ box-shadow: var(--veil-glow, none);
47
+ overflow: hidden;
48
+ pointer-events: none;
49
+ user-select: none;
50
+ min-height: 12px;
51
+ }
52
+
53
+ [data-veil-theme="glass"] .veil-skeleton,
54
+ .veil-skeleton[data-veil-theme="glass"] {
55
+ backdrop-filter: blur(var(--veil-blur, 12px));
56
+ -webkit-backdrop-filter: blur(var(--veil-blur, 12px));
57
+ }
58
+
59
+ /* === SHIMMER / ANIMATION OVERLAY === */
60
+ .veil-skeleton::after {
61
+ content: "";
62
+ position: absolute;
63
+ top: 0;
64
+ left: 0;
65
+ right: 0;
66
+ bottom: 0;
67
+ pointer-events: none;
68
+ will-change: transform, opacity;
69
+ background: linear-gradient(
70
+ 90deg,
71
+ transparent 0%,
72
+ var(--veil-highlight, rgba(255, 255, 255, 0.7)) 50%,
73
+ transparent 100%
74
+ );
75
+ animation-duration: var(--veil-duration, 1.5s);
76
+ animation-timing-function: var(--veil-easing, cubic-bezier(0.4, 0, 0.2, 1));
77
+ animation-iteration-count: infinite;
78
+ animation-delay: var(--veil-sync-delay, 0s);
79
+ animation-play-state: var(--veil-play-state, running);
80
+ }
81
+
82
+ /* Animation name mapping */
83
+ .veil-skeleton[data-veil-anim="shimmer"]::after,
84
+ .veil-skeleton:not([data-veil-anim])::after {
85
+ animation-name: veil-shimmer-ltr;
86
+ }
87
+ .veil-skeleton[data-veil-dir="rtl"]::after,
88
+ [dir="rtl"] .veil-skeleton[data-veil-anim="shimmer"]::after {
89
+ animation-name: veil-shimmer-rtl;
90
+ }
91
+ .veil-skeleton[data-veil-dir="ttb"]::after {
92
+ animation-name: veil-shimmer-ttb;
93
+ background: linear-gradient(180deg, transparent 0%, var(--veil-highlight, rgba(255,255,255,0.7)) 50%, transparent 100%);
94
+ }
95
+ .veil-skeleton[data-veil-dir="btt"]::after {
96
+ animation-name: veil-shimmer-btt;
97
+ background: linear-gradient(0deg, transparent 0%, var(--veil-highlight, rgba(255,255,255,0.7)) 50%, transparent 100%);
98
+ }
99
+
100
+ .veil-skeleton[data-veil-anim="wave"]::after {
101
+ animation-name: veil-wave;
102
+ }
103
+
104
+ .veil-skeleton[data-veil-anim="pulse"]::after {
105
+ background: none;
106
+ }
107
+ .veil-skeleton[data-veil-anim="pulse"] {
108
+ animation: veil-pulse var(--veil-duration, 1.5s) var(--veil-easing, ease-in-out) infinite;
109
+ animation-delay: var(--veil-sync-delay, 0s);
110
+ animation-play-state: var(--veil-play-state, running);
111
+ }
112
+
113
+ .veil-skeleton[data-veil-anim="blink"]::after {
114
+ background: none;
115
+ }
116
+ .veil-skeleton[data-veil-anim="blink"] {
117
+ animation: veil-blink var(--veil-duration, 1.2s) steps(2, start) infinite;
118
+ animation-delay: var(--veil-sync-delay, 0s);
119
+ animation-play-state: var(--veil-play-state, running);
120
+ }
121
+
122
+ .veil-skeleton[data-veil-anim="breathe"]::after {
123
+ background: none;
124
+ }
125
+ .veil-skeleton[data-veil-anim="breathe"] {
126
+ animation: veil-breathe var(--veil-duration, 2.2s) var(--veil-easing, ease-in-out) infinite;
127
+ animation-delay: var(--veil-sync-delay, 0s);
128
+ animation-play-state: var(--veil-play-state, running);
129
+ }
130
+
131
+ .veil-skeleton[data-veil-anim="glass-shine"]::after {
132
+ animation-name: veil-glass-shine;
133
+ background: linear-gradient(
134
+ 115deg,
135
+ transparent 20%,
136
+ var(--veil-highlight, rgba(255, 255, 255, 0.4)) 50%,
137
+ transparent 80%
138
+ );
139
+ }
140
+
141
+ .veil-skeleton[data-veil-anim="gradient-flow"]::after {
142
+ width: 300%;
143
+ animation-name: veil-gradient-flow;
144
+ background: linear-gradient(
145
+ 90deg,
146
+ var(--veil-base, #e5e7eb) 0%,
147
+ var(--veil-highlight, rgba(255, 255, 255, 0.8)) 30%,
148
+ var(--veil-base, #e5e7eb) 60%,
149
+ var(--veil-highlight, rgba(255, 255, 255, 0.8)) 100%
150
+ );
151
+ }
152
+
153
+ .veil-skeleton[data-veil-anim="aurora"]::after {
154
+ width: 160%;
155
+ height: 160%;
156
+ animation-name: veil-aurora;
157
+ background: radial-gradient(
158
+ circle at 50% 50%,
159
+ rgba(56, 189, 248, 0.3) 0%,
160
+ rgba(168, 85, 247, 0.25) 45%,
161
+ rgba(236, 72, 153, 0.2) 75%,
162
+ transparent 100%
163
+ );
164
+ }
165
+
166
+ .veil-skeleton[data-veil-anim="scan-line"]::after {
167
+ height: 30%;
168
+ animation-name: veil-scan-line;
169
+ background: linear-gradient(180deg, transparent, var(--veil-highlight, rgba(0, 240, 255, 0.8)), transparent);
170
+ }
171
+
172
+ .veil-skeleton[data-veil-anim="sparkle"]::after {
173
+ animation-name: veil-sparkle;
174
+ }
175
+
176
+ .veil-skeleton[data-veil-anim="neon-glow"] {
177
+ animation: veil-neon-glow var(--veil-duration, 1.6s) ease-in-out infinite;
178
+ animation-delay: var(--veil-sync-delay, 0s);
179
+ }
180
+
181
+ .veil-skeleton[data-veil-anim="none"]::after {
182
+ display: none !important;
183
+ }
184
+
185
+ /* === PRIMITIVE VARIANTS === */
186
+ .veil-skeleton[data-veil-shape="line"] {
187
+ height: 1em;
188
+ margin: 0.35em 0;
189
+ border-radius: var(--veil-radius, 4px);
190
+ }
191
+ .veil-skeleton[data-veil-shape="circle"] {
192
+ border-radius: 50% !important;
193
+ aspect-ratio: 1 / 1;
194
+ }
195
+ .veil-skeleton[data-veil-shape="heading"] {
196
+ height: 1.8em;
197
+ margin: 0.5em 0;
198
+ border-radius: var(--veil-radius, 6px);
199
+ }
200
+ .veil-skeleton[data-veil-shape="button"] {
201
+ height: 2.5rem;
202
+ border-radius: var(--veil-radius, 8px);
203
+ }
204
+ .veil-skeleton[data-veil-shape="badge"] {
205
+ height: 1.35rem;
206
+ border-radius: 9999px;
207
+ display: inline-block;
208
+ }
209
+ .veil-skeleton[data-veil-shape="icon"] {
210
+ width: 1.5rem;
211
+ height: 1.5rem;
212
+ border-radius: var(--veil-radius, 6px);
213
+ display: inline-block;
214
+ }
215
+ .veil-skeleton[data-veil-shape="input"] {
216
+ height: 2.6rem;
217
+ border-radius: var(--veil-radius, 8px);
218
+ }
219
+ .veil-skeleton[data-veil-shape="divider"] {
220
+ height: 1px;
221
+ width: 100%;
222
+ margin: 1rem 0;
223
+ min-height: 1px;
224
+ }
225
+
226
+ /* Natural randomized last-line widths */
227
+ .veil-lines-group > .veil-skeleton:last-child {
228
+ width: var(--veil-last-width, 68%);
229
+ }
230
+
231
+ /* === ACCESSIBILITY === */
232
+ .veil-sr-only {
233
+ position: absolute !important;
234
+ width: 1px !important;
235
+ height: 1px !important;
236
+ padding: 0 !important;
237
+ margin: -1px !important;
238
+ overflow: hidden !important;
239
+ clip: rect(0, 0, 0, 0) !important;
240
+ white-space: nowrap !important;
241
+ border-width: 0 !important;
242
+ }
243
+
244
+ /* prefers-reduced-motion */
245
+ @media (prefers-reduced-motion: reduce) {
246
+ .veil-skeleton::after {
247
+ animation: none !important;
248
+ display: none !important;
249
+ }
250
+ .veil-skeleton {
251
+ animation: veil-pulse 3s ease-in-out infinite !important;
252
+ transform: none !important;
253
+ }
254
+ }
255
+
256
+ /* forced-colors */
257
+ @media (forced-colors: active) {
258
+ .veil-skeleton {
259
+ forced-color-adjust: none;
260
+ background-color: ButtonFace !important;
261
+ outline: 1px solid Highlight !important;
262
+ }
263
+ .veil-skeleton::after {
264
+ display: none !important;
265
+ }
266
+ }
267
+
268
+ /* Offscreen & Tab Hidden Pausing */
269
+ [data-veil-tab-hidden="true"] .veil-skeleton,
270
+ [data-veil-tab-hidden="true"] .veil-skeleton::after,
271
+ [data-veil-offscreen="true"],
272
+ [data-veil-offscreen="true"]::after {
273
+ animation-play-state: paused !important;
274
+ }
275
+
276
+ /* === REVEAL TRANSITIONS === */
277
+ .veil-revealing {
278
+ position: relative;
279
+ }
280
+ .veil-reveal-fade {
281
+ animation: veil-reveal-fade 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
282
+ }
283
+ .veil-reveal-blur-in {
284
+ animation: veil-reveal-blur 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
285
+ }
286
+ .veil-reveal-slide-up {
287
+ animation: veil-reveal-slide 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
288
+ }
289
+ .veil-reveal-scale {
290
+ animation: veil-reveal-scale 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
291
+ }
292
+
293
+ @keyframes veil-reveal-fade {
294
+ 0% { opacity: 0; }
295
+ 100% { opacity: 1; }
296
+ }
297
+ @keyframes veil-reveal-blur {
298
+ 0% { opacity: 0; filter: blur(8px); }
299
+ 100% { opacity: 1; filter: blur(0px); }
300
+ }
301
+ @keyframes veil-reveal-slide {
302
+ 0% { opacity: 0; transform: translateY(12px); }
303
+ 100% { opacity: 1; transform: translateY(0); }
304
+ }
305
+ @keyframes veil-reveal-scale {
306
+ 0% { opacity: 0; transform: scale(0.96); }
307
+ 100% { opacity: 1; transform: scale(1); }
308
+ }
309
+
310
+ /* === SPINNERS, PROGRESS, OVERLAY, BUTTON, LAZY IMAGE === */
311
+ .veil-spinner {
312
+ display: inline-block;
313
+ box-sizing: border-box;
314
+ vertical-align: middle;
315
+ }
316
+ .veil-overlay {
317
+ position: absolute;
318
+ inset: 0;
319
+ display: flex;
320
+ flex-direction: column;
321
+ align-items: center;
322
+ justify-content: center;
323
+ gap: 12px;
324
+ background-color: var(--veil-overlay-bg, rgba(255, 255, 255, 0.75));
325
+ backdrop-filter: blur(var(--veil-overlay-blur, 6px));
326
+ -webkit-backdrop-filter: blur(var(--veil-overlay-blur, 6px));
327
+ z-index: 100;
328
+ transition: opacity 250ms ease;
329
+ }
330
+ .veil-overlay-fullscreen {
331
+ position: fixed !important;
332
+ z-index: 999999 !important;
333
+ }
334
+ .veil-progress-bar {
335
+ position: fixed;
336
+ top: 0;
337
+ left: 0;
338
+ right: 0;
339
+ height: 3px;
340
+ z-index: 999999;
341
+ background: transparent;
342
+ pointer-events: none;
343
+ }
344
+ .veil-progress-inner {
345
+ height: 100%;
346
+ background: var(--veil-progress-color, #3b82f6);
347
+ box-shadow: 0 0 10px var(--veil-progress-color, #3b82f6), 0 0 5px var(--veil-progress-color, #3b82f6);
348
+ transition: width 200ms ease, opacity 350ms ease;
349
+ }
350
+ .veil-btn-loading {
351
+ position: relative;
352
+ pointer-events: none;
353
+ cursor: default;
354
+ }
355
+ .veil-btn-spinner-wrap {
356
+ display: inline-flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ margin-right: 8px;
360
+ }
361
+ .veil-lazy-img-wrap {
362
+ position: relative;
363
+ overflow: hidden;
364
+ display: inline-block;
365
+ }
366
+ .veil-lazy-img {
367
+ transition: opacity 350ms ease, filter 350ms ease;
368
+ }
369
+ .veil-lazy-img-loading {
370
+ opacity: 0;
371
+ filter: blur(10px);
372
+ }
373
+ .veil-lazy-img-loaded {
374
+ opacity: 1;
375
+ filter: blur(0px);
376
+ }
377
+
378
+ ${j()}
379
+ `}function u(t){if(se||typeof document>"u")return;se=!0;let e=oe(),n=t||le;if(typeof document.adoptedStyleSheets<"u"&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype&&!n)try{let s=new CSSStyleSheet;s.replaceSync(e),document.adoptedStyleSheets=[...document.adoptedStyleSheets,s];return}catch{}let r=document.createElement("style");r.id="veilkit-styles",n&&r.setAttribute("nonce",n),r.textContent=e,document.head.appendChild(r)}function o(t={}){u();let e=document.createElement("div");e.className=`veil-skeleton ${t.className||""}`.trim(),e.setAttribute("aria-hidden","true");let n=t.type||"rect";if(e.setAttribute("data-veil-shape",n),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 r=Y(t.speed);e.style.setProperty("--veil-duration",`${r}ms`),e.style.setProperty("--veil-sync-delay",M(r))}else e.style.setProperty("--veil-sync-delay",M(1500));if(t.style)for(let[r,s]of Object.entries(t.style))e.style[r]=s;return W(e),e}function g(t=3,e={}){let n=document.createElement("div");n.className=`veil-lines-group ${e.className||""}`.trim(),n.setAttribute("aria-hidden","true");let r=e.gap!==void 0?typeof e.gap=="number"?`${e.gap}px`:e.gap:"0.45rem";n.style.display="flex",n.style.flexDirection="column",n.style.gap=r;let s=["100%","94%","88%","75%"],a=e.lastLineWidth!==void 0?typeof e.lastLineWidth=="number"?`${e.lastLineWidth}px`:e.lastLineWidth:"65%";for(let i=0;i<t;i++){let d=i===t-1?a:s[i%s.length]||"95%",c=o({...e,type:"line",width:d});c.style.setProperty("--veil-stagger-idx",String(i)),n.appendChild(c)}return n}function J(t,e={}){switch(t){case"paragraph":return g(e.lines||3,e);case"line":return o({...e,type:"line"});case"heading":return o({...e,type:"heading",width:e.width||"65%"});case"circle":return o({...e,type:"circle",width:e.width||e.height||"40px",height:e.height||e.width||"40px",radius:"50%"});case"image":return o({...e,type:"rect",width:e.width||"100%",height:e.height||"200px",radius:e.radius||"8px"});case"button":return o({...e,type:"button",width:e.width||"120px",height:e.height||"38px"});case"badge":return o({...e,type:"badge",width:e.width||"64px",height:e.height||"22px"});case"icon":return o({...e,type:"icon",width:e.width||"24px",height:e.height||"24px"});case"input":return o({...e,type:"input",width:e.width||"100%",height:e.height||"40px"});case"divider":return o({...e,type:"divider",width:"100%",height:"1px"});case"table-row":{let n=document.createElement("div");n.style.display="flex",n.style.gap="1rem",n.style.alignItems="center",n.style.width="100%",n.style.padding="0.5rem 0";let r=e.count||4;for(let s=0;s<r;s++){let a=o({...e,type:"line",width:`${100/r}%`,height:"16px"});n.appendChild(a)}return n}default:return o(e)}}function x(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 n={animation:t.animation,theme:t.theme,direction:t.direction,speed:t.speed};switch(t.name){case"card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius="12px",e.style.border="1px solid rgba(0,0,0,0.08)";let r=o({...n,type:"rect",height:"180px",radius:"8px"}),s=o({...n,type:"heading",width:"70%",height:"24px"}),a=g(2,n),i=o({...n,type:"button",width:"110px",height:"36px"});e.append(r,s,a,i);break}case"product-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.padding="14px",e.style.borderRadius="12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=o({...n,type:"rect",height:"200px",radius:"10px"}),s=o({...n,type:"badge",width:"50px",height:"18px"}),a=o({...n,type:"line",width:"85%",height:"18px"}),i=o({...n,type:"line",width:"40%",height:"22px"}),l=o({...n,type:"button",width:"100%",height:"38px"});e.append(r,s,a,i,l);break}case"product-grid":{let r=t.items||4,s=t.columns||2;e.style.display="grid",e.style.gridTemplateColumns=`repeat(${s}, minmax(0, 1fr))`,e.style.gap="16px";for(let a=0;a<r;a++){let i=x({...t,name:"product-card"});i.style.setProperty("--veil-stagger-idx",String(a)),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 r=o({...n,type:"circle",width:"44px",height:"44px"}),s=document.createElement("div");s.style.flex="1",s.style.display="flex",s.style.flexDirection="column",s.style.gap="6px";let a=o({...n,type:"line",width:"55%",height:"16px"}),i=o({...n,type:"line",width:"35%",height:"12px"});s.append(a,i);let l=o({...n,type:"icon",width:"24px",height:"24px"});e.append(r,s,l);break}case"list":{let r=t.items||5;e.style.display="flex",e.style.flexDirection="column",e.style.gap="8px";for(let s=0;s<r;s++){let a=x({...t,name:"list-item"});a.style.setProperty("--veil-stagger-idx",String(s)),e.appendChild(a)}break}case"table":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px",e.style.width="100%";let r=document.createElement("div");r.style.display="flex",r.style.gap="16px",r.style.paddingBottom="8px",r.style.borderBottom="2px solid rgba(0,0,0,0.06)";let s=t.columns||4;for(let i=0;i<s;i++){let l=o({...n,type:"line",width:`${100/s}%`,height:"20px"});r.appendChild(l)}e.appendChild(r);let a=t.items||5;for(let i=0;i<a;i++){let l=document.createElement("div");l.style.display="flex",l.style.gap="16px",l.style.padding="8px 0",l.style.borderBottom="1px solid rgba(0,0,0,0.04)";for(let d=0;d<s;d++){let c=o({...n,type:"line",width:`${100/s}%`,height:"14px"});l.appendChild(c)}l.style.setProperty("--veil-stagger-idx",String(i)),e.appendChild(l)}break}case"profile":{e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap="12px",e.style.padding="24px",e.style.textAlign="center";let r=o({...n,type:"circle",width:"80px",height:"80px"}),s=o({...n,type:"heading",width:"160px",height:"22px"}),a=g(2,{...n,width:"240px"}),i=o({...n,type:"button",width:"120px",height:"36px"});e.append(r,s,a,i);break}case"profile-header":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let r=o({...n,type:"rect",height:"140px",radius:"10px"}),s=document.createElement("div");s.style.display="flex",s.style.alignItems="flex-end",s.style.gap="16px",s.style.marginTop="-40px",s.style.paddingLeft="20px";let a=o({...n,type:"circle",width:"72px",height:"72px"});a.style.border="4px solid white";let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.style.flex="1";let l=o({...n,type:"heading",width:"140px",height:"20px"}),d=o({...n,type:"line",width:"90px",height:"14px"});i.append(l,d),s.append(a,i);let c=g(2,n);e.append(r,s,c);break}case"feed-post":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px",e.style.padding="16px",e.style.borderRadius="12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.gap="10px";let s=o({...n,type:"circle",width:"40px",height:"40px"}),a=document.createElement("div");a.style.display="flex",a.style.flexDirection="column",a.style.gap="4px",a.append(o({...n,type:"line",width:"110px",height:"14px"}),o({...n,type:"line",width:"60px",height:"10px"})),r.append(s,a);let i=g(3,n),l=o({...n,type:"rect",height:"180px",radius:"8px"}),d=document.createElement("div");d.style.display="flex",d.style.gap="24px",d.append(o({...n,type:"icon",width:"20px",height:"20px"}),o({...n,type:"icon",width:"20px",height:"20px"}),o({...n,type:"icon",width:"20px",height:"20px"})),e.append(r,i,l,d);break}case"article":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px";let r=o({...n,type:"rect",height:"240px",radius:"10px"}),s=o({...n,type:"heading",width:"80%",height:"32px"}),a=o({...n,type:"line",width:"30%",height:"14px"}),i=g(4,n),l=g(3,n);e.append(r,s,a,i,l);break}case"comment-thread":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="14px";let r=t.items||3;for(let s=0;s<r;s++){let a=x({...t,name:"list-item"});if(a.style.setProperty("--veil-stagger-idx",String(s)),e.appendChild(a),s===1){let i=x({...t,name:"list-item"});i.style.marginLeft="40px",e.appendChild(i)}}break}case"chat":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="12px";let r=[{isSelf:!1,width:"60%"},{isSelf:!0,width:"45%"},{isSelf:!1,width:"75%"},{isSelf:!0,width:"50%"}];for(let s=0;s<r.length;s++){let a=r[s],i=document.createElement("div");i.style.display="flex",i.style.gap="8px",i.style.justifyContent=a.isSelf?"flex-end":"flex-start",a.isSelf||i.appendChild(o({...n,type:"circle",width:"28px",height:"28px"}));let l=o({...n,type:"rect",width:a.width,height:"36px",radius:"16px"});i.appendChild(l),i.style.setProperty("--veil-stagger-idx",String(s)),e.appendChild(i)}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(auto-fit, minmax(180px, 1fr))",r.style.gap="12px";for(let l=0;l<4;l++){let d=document.createElement("div");d.style.padding="14px",d.style.borderRadius="10px",d.style.border="1px solid rgba(0,0,0,0.06)",d.style.display="flex",d.style.flexDirection="column",d.style.gap="8px",d.append(o({...n,type:"line",width:"50%",height:"14px"}),o({...n,type:"heading",width:"70%",height:"24px"})),r.appendChild(d)}let s=document.createElement("div");s.style.display="grid",s.style.gridTemplateColumns="repeat(auto-fit, minmax(280px, 1fr))",s.style.gap="16px";let a=o({...n,type:"rect",height:"220px",radius:"10px"}),i=o({...n,type:"rect",height:"220px",radius:"10px"});s.append(a,i),e.append(r,s);break}case"form":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="16px",e.style.padding="20px",e.style.borderRadius="12px",e.style.border="1px solid rgba(0,0,0,0.06)";let r=o({...n,type:"heading",width:"40%",height:"26px"});e.appendChild(r);for(let a=0;a<3;a++){let i=document.createElement("div");i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.append(o({...n,type:"line",width:"25%",height:"12px"}),o({...n,type:"input",width:"100%",height:"40px"})),e.appendChild(i)}let s=o({...n,type:"button",width:"140px",height:"40px"});e.appendChild(s);break}case"media-card":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="10px";let r=o({...n,type:"rect",height:"180px",radius:"10px"}),s=document.createElement("div");s.style.display="flex",s.style.gap="12px";let a=o({...n,type:"circle",width:"38px",height:"38px"}),i=document.createElement("div");i.style.flex="1",i.style.display="flex",i.style.flexDirection="column",i.style.gap="6px",i.append(o({...n,type:"line",width:"85%",height:"16px"}),o({...n,type:"line",width:"50%",height:"12px"})),s.append(a,i),e.append(r,s);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.06)";let r=o({...n,type:"rect",width:"100px",height:"28px",radius:"6px"}),s=document.createElement("div");s.style.display="flex",s.style.gap="20px";for(let i=0;i<4;i++)s.appendChild(o({...n,type:"line",width:"60px",height:"14px"}));let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.gap="12px",a.append(o({...n,type:"input",width:"140px",height:"32px"}),o({...n,type:"circle",width:"32px",height:"32px"})),e.append(r,s,a);break}case"sidebar":{e.style.display="flex",e.style.flexDirection="column",e.style.justifyContent="space-between",e.style.padding="20px 16px",e.style.width="220px",e.style.height="450px",e.style.borderRight="1px solid rgba(0,0,0,0.06)";let r=document.createElement("div");r.style.display="flex",r.style.flexDirection="column",r.style.gap="16px",r.appendChild(o({...n,type:"rect",width:"120px",height:"32px",radius:"6px"}));for(let a=0;a<5;a++){let i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.gap="10px",i.append(o({...n,type:"icon",width:"20px",height:"20px"}),o({...n,type:"line",width:"90px",height:"14px"})),r.appendChild(i)}let s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.gap="10px",s.append(o({...n,type:"circle",width:"36px",height:"36px"}),o({...n,type:"line",width:"80px",height:"14px"})),e.append(r,s);break}case"settings-page":{e.style.display="flex",e.style.flexDirection="column",e.style.gap="24px",e.style.padding="24px";let r=o({...n,type:"heading",width:"220px",height:"30px"});e.appendChild(r);for(let s=0;s<3;s++){let a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="14px 0",a.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="6px",i.append(o({...n,type:"line",width:"160px",height:"16px"}),o({...n,type:"line",width:"240px",height:"12px"}));let l=o({...n,type:"button",width:"50px",height:"28px",radius:"14px"});a.append(i,l),e.appendChild(a)}break}}return e}var S=class{delay;minVisible;onShow;onHide;delayTimer=null;minVisibleTimer=null;shownTimestamp=null;isVisible=!1;isPending=!1;constructor(e={}){this.delay=e.delay!==void 0?e.delay:150,this.minVisible=e.minVisible!==void 0?e.minVisible:300,this.onShow=e.onShow,this.onHide=e.onHide}start(){if(!(this.isPending||this.isVisible)){if(this.isPending=!0,this.delay<=0){this.display();return}this.delayTimer=setTimeout(()=>{this.delayTimer=null,this.isPending&&this.display()},this.delay)}}display(){this.isPending=!1,this.isVisible=!0,this.shownTimestamp=Date.now(),this.onShow&&this.onShow()}finish(e){if(this.delayTimer){clearTimeout(this.delayTimer),this.delayTimer=null,this.isPending=!1,e&&e();return}if(!this.isVisible){this.isPending=!1,e&&e();return}let n=this.shownTimestamp?Date.now()-this.shownTimestamp:0,r=Math.max(0,this.minVisible-n);r<=0?(this.hide(),e&&e()):this.minVisibleTimer=setTimeout(()=>{this.minVisibleTimer=null,this.hide(),e&&e()},r)}hide(){this.isVisible=!1,this.isPending=!1,this.shownTimestamp=null,this.onHide&&this.onHide()}active(){return this.isVisible}destroy(){this.delayTimer&&clearTimeout(this.delayTimer),this.minVisibleTimer&&clearTimeout(this.minVisibleTimer),this.delayTimer=null,this.minVisibleTimer=null,this.isVisible=!1,this.isPending=!1}};function Z(t,e={}){let n=e.transition||"fade";if(n==="none"){e.onComplete&&e.onComplete();return}if(t.classList.add("veil-revealing"),n==="stagger-children"){let a=Array.from(t.children);a.forEach((l,d)=>{l.classList.add("veil-reveal-fade"),l.style.animationDelay=`${d*60}ms`,e.duration&&(l.style.animationDuration=`${e.duration}ms`)});let i=(e.duration||350)+a.length*60;setTimeout(()=>{t.classList.remove("veil-revealing"),a.forEach(l=>{l.classList.remove("veil-reveal-fade"),l.style.removeProperty("animation-delay"),l.style.removeProperty("animation-duration")}),e.onComplete&&e.onComplete()},i);return}let r=`veil-reveal-${n}`;t.classList.add(r),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",r),t.style.removeProperty("animation-duration"),t.style.removeProperty("animation-timing-function"),e.onComplete&&e.onComplete()};t.addEventListener("animationend",s)}var N=new Map;function de(t){if(N.has(t))return N.get(t);if(typeof window<"u"&&window.localStorage)try{let e=localStorage.getItem(`veil_cache_${t}`);if(e){let n=JSON.parse(e);return N.set(t,n),n}}catch{}return null}function ce(t,e,n=!1){if(N.set(t,e),n&&typeof window<"u"&&window.localStorage)try{localStorage.setItem(`veil_cache_${t}`,JSON.stringify(e))}catch{}}function me(t,e){let n=t.getBoundingClientRect(),r=[];function s(i){if(i.hasAttribute("data-veil-ignore")||e&&i.matches(e))return!1;let l=window.getComputedStyle(i);if(l.display==="none"||l.visibility==="hidden"||l.opacity==="0")return!1;let d=i.tagName.toLowerCase();return["img","svg","button","input","textarea","select"].includes(d)||i.hasAttribute("data-veil-shape")?!0:Array.from(i.childNodes).some(m=>m.nodeType===Node.TEXT_NODE&&(m.textContent||"").trim().length>0)&&i.children.length===0}function a(i){if(i!==t&&s(i)){let d=i.getBoundingClientRect();if(d.width>2&&d.height>2){let m=window.getComputedStyle(i).borderRadius||"6px",p=i.getAttribute("data-veil-shape"),h="rect";p==="circle"||m==="50%"||m.includes("px")&&parseFloat(m)>=d.width/2?h="circle":(p==="line"||["p","span","h1","h2","h3","h4","h5","h6","a","label"].includes(i.tagName.toLowerCase()))&&(h="line"),r.push({x:Math.round(d.left-n.left),y:Math.round(d.top-n.top),width:Math.round(d.width),height:Math.round(d.height),radius:m,shape:h})}return}let l=Array.from(i.children);for(let d of l)d.hasAttribute("data-veil-ignore")||a(d)}return a(t),{width:Math.round(n.width),height:Math.round(n.height),boxes:r}}function Q(t,e={},n={}){let r=document.createElement("div");if(r.className="veil-auto-overlay",r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.pointerEvents="none",r.style.zIndex="5",!e.preserveBackground){let c=window.getComputedStyle(t);r.style.backgroundColor=c.backgroundColor!=="rgba(0, 0, 0, 0)"?c.backgroundColor:"transparent"}function s(c){r.innerHTML="";for(let m=0;m<c.boxes.length;m++){let p=c.boxes[m],h=o({...n,type:p.shape,radius:p.radius});h.style.position="absolute",h.style.left=`${p.x}px`,h.style.top=`${p.y}px`,h.style.width=`${p.width}px`,h.style.height=`${p.height}px`,h.style.setProperty("--veil-stagger-idx",String(m)),r.appendChild(h)}}function a(){let c=me(t,e.ignoreSelector);c.boxes.length>0&&(s(c),e.cacheKey&&ce(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(r),r.children.length===0&&a();let l=null,d=null;return e.observeResize!==!1&&typeof ResizeObserver<"u"&&(l=new ResizeObserver(()=>a()),l.observe(t)),e.observeMutations!==!1&&typeof MutationObserver<"u"&&(d=new MutationObserver(()=>a()),d.observe(t,{childList:!0,subtree:!0,attributes:!1})),{overlay:r,refresh:a,destroy:()=>{l&&l.disconnect(),d&&d.disconnect(),e.reveal&&e.reveal!=="none"?Z(t,{transition:e.reveal,duration:e.revealDuration,easing:e.revealEasing,onComplete:()=>r.remove()}):r.remove()}}}var R=class{activeIds=new Set;counter=0;listeners=new Set;start(e){let n=e||`req_${Date.now()}_${Math.random().toString(36).substring(2,7)}`;return this.activeIds.has(n)||(this.activeIds.add(n),this.counter++,this.notify()),n}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 n=this.activeIds.values().next().value;n&&this.activeIds.delete(n),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 n of this.listeners)n(e,this.counter)}},T=new R;var I=class{el=null;innerEl=null;currentProgress=0;trickleTimer=null;status="idle";ensureDOM(){this.el||typeof document>"u"||(u(),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 n=Math.round(this.currentProgress*100);this.innerEl&&(this.innerEl.style.width=`${n}%`),this.el&&this.el.setAttribute("aria-valuenow",String(n))}inc(e){let n=this.currentProgress;n>=1||(typeof e!="number"&&(n>=0&&n<.2?e=.1:n>=.2&&n<.5?e=.04:n>=.5&&n<.8?e=.02:n>=.8&&n<.99?e=.005:e=0),this.set(n+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)}},w=new I;function Se(t={}){u();let e=!!t.circular,n=t.color||"var(--veil-progress-color, #3b82f6)",r=t.trackColor||"rgba(0, 0, 0, 0.08)";if(e){let l=t.size!==void 0?typeof t.size=="number"?`${t.size}px`:t.size:"48px",d=t.strokeWidth||4,c=document.createElement("div");c.className=`veil-progress-circular ${t.className||""}`.trim(),c.style.width=l,c.style.height=l,c.style.display="inline-flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.position="relative";let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 48 48"),m.style.width="100%",m.style.height="100%",m.style.transform="rotate(-90deg)";let p=document.createElementNS("http://www.w3.org/2000/svg","circle");p.setAttribute("cx","24"),p.setAttribute("cy","24"),p.setAttribute("r","20"),p.setAttribute("fill","none"),p.setAttribute("stroke",r),p.setAttribute("stroke-width",String(d));let h=document.createElementNS("http://www.w3.org/2000/svg","circle");h.setAttribute("cx","24"),h.setAttribute("cy","24"),h.setAttribute("r","20"),h.setAttribute("fill","none"),h.setAttribute("stroke",n),h.setAttribute("stroke-width",String(d)),h.setAttribute("stroke-linecap","round");let L=2*Math.PI*20;if(h.setAttribute("stroke-dasharray",String(L)),t.value!==void 0){let b=Math.min(100,Math.max(0,t.value)),ue=L-b/100*L;h.setAttribute("stroke-dashoffset",String(ue)),h.style.transition="stroke-dashoffset 300ms ease"}else h.setAttribute("stroke-dashoffset",String(L*.75)),m.style.animation="veil-spin 1200ms linear infinite";if(m.append(p,h),c.appendChild(m),t.showPercentage&&t.value!==void 0){let b=document.createElement("span");b.style.position="absolute",b.style.fontSize="11px",b.style.fontWeight="600",b.textContent=`${Math.round(t.value)}%`,c.appendChild(b)}return c}let s=t.height!==void 0?typeof t.height=="number"?`${t.height}px`:t.height:"4px",a=document.createElement("div");a.className=`veil-progress-linear ${t.className||""}`.trim(),a.setAttribute("role","progressbar"),a.style.width="100%",a.style.height=s,a.style.backgroundColor=r,a.style.borderRadius="9999px",a.style.overflow="hidden",a.style.position="relative";let i=document.createElement("div");if(i.style.height="100%",i.style.backgroundColor=n,i.style.borderRadius="9999px",t.value!==void 0){let l=Math.min(100,Math.max(0,t.value));a.setAttribute("aria-valuenow",String(l)),i.style.width=`${l}%`,i.style.transition="width 250ms ease"}else i.style.width="35%",i.style.animation="veil-progress-indeterminate 1400ms ease-in-out infinite";return a.appendChild(i),a}var Ee=["ring","dual-ring","dots","bars","pulse","orbit","wave","bounce","ios-activity","glass-orb","morph","progress-circle"];function v(t={}){u();let e=t.type||"ring",n=t.size!==void 0?typeof t.size=="number"?`${t.size}px`:t.size:"28px",r=t.color||"var(--veil-progress-color, #3b82f6)",s=t.secondaryColor||"rgba(0, 0, 0, 0.12)",a=document.createElement("div");switch(a.className=`veil-spinner veil-spinner-${e} ${t.className||""}`.trim(),a.setAttribute("role","status"),a.setAttribute("aria-label",t.label||"Loading"),a.style.width=n,a.style.height=n,a.style.display="inline-flex",a.style.alignItems="center",a.style.justifyContent="center",a.style.position="relative",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 ${s}`,i.style.borderTopColor=r,i.style.animation="veil-spin 800ms linear infinite",i.style.boxSizing="border-box",a.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=r,i.style.borderBottomColor=r,i.style.animation="veil-spin 900ms cubic-bezier(0.5, 0, 0.5, 1) infinite",i.style.boxSizing="border-box",a.appendChild(i);break}case"dots":{a.style.gap="4px";for(let i=0;i<3;i++){let l=document.createElement("div");l.style.width="28%",l.style.height="28%",l.style.borderRadius="50%",l.style.backgroundColor=r,l.style.animation="veil-dot-bounce 1200ms ease-in-out infinite",l.style.animationDelay=`${i*160}ms`,a.appendChild(l)}break}case"bars":{a.style.gap="3px";for(let i=0;i<4;i++){let l=document.createElement("div");l.style.width="18%",l.style.height="100%",l.style.borderRadius="2px",l.style.backgroundColor=r,l.style.animation="veil-bar-wave 1000ms ease-in-out infinite",l.style.animationDelay=`${i*140}ms`,a.appendChild(l)}break}case"pulse":{let i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.borderRadius="50%",i.style.backgroundColor=r,i.style.animation="veil-pulse-scale 1200ms ease-out infinite",a.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=r,i.style.position="absolute";let l=document.createElement("div");l.style.width="100%",l.style.height="100%",l.style.position="absolute",l.style.animation="veil-spin 1200ms linear infinite";let d=document.createElement("div");d.style.width="24%",d.style.height="24%",d.style.borderRadius="50%",d.style.backgroundColor=r,d.style.position="absolute",d.style.top="0",d.style.left="38%",l.appendChild(d),a.append(i,l);break}case"wave":{a.style.gap="4px";for(let i=0;i<5;i++){let l=document.createElement("div");l.style.width="12%",l.style.height="80%",l.style.borderRadius="3px",l.style.backgroundColor=r,l.style.animation="veil-wave-dance 1100ms ease-in-out infinite",l.style.animationDelay=`${i*110}ms`,a.appendChild(l)}break}case"bounce":{let i=document.createElement("div");i.style.width="60%",i.style.height="60%",i.style.borderRadius="50%",i.style.backgroundColor=r,i.style.animation="veil-bounce-ball 900ms cubic-bezier(0.28, 0.84, 0.42, 1) infinite",a.appendChild(i);break}case"ios-activity":{for(let i=0;i<12;i++){let l=document.createElement("div");l.style.position="absolute",l.style.width="8%",l.style.height="26%",l.style.backgroundColor=r,l.style.borderRadius="2px",l.style.transformOrigin="50% 190%",l.style.transform=`rotate(${i*30}deg) translateY(-90%)`,l.style.animation="veil-ios-fade 1000ms linear infinite",l.style.animationDelay=`-${(12-i)*(1e3/12)}ms`,a.appendChild(l)}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), ${r} 70%)`,i.style.boxShadow=`0 4px 12px ${r}44, inset 0 2px 4px rgba(255,255,255,0.6)`,i.style.animation="veil-glass-orbit 1600ms ease-in-out infinite",a.appendChild(i);break}case"morph":{let i=document.createElement("div");i.style.width="80%",i.style.height="80%",i.style.backgroundColor=r,i.style.animation="veil-morph-shape 2000ms ease-in-out infinite",a.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 l=document.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx","18"),l.setAttribute("cy","18"),l.setAttribute("r","14"),l.setAttribute("fill","none"),l.setAttribute("stroke",s),l.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",r),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 1200ms linear infinite",d.style.transformOrigin="50% 50%",i.append(l,d),a.appendChild(i);break}}return Le(),a}var he=!1;function Le(){if(he||typeof document>"u")return;he=!0;let t=document.createElement("style");t.id="veilkit-spinner-keyframes",t.textContent=`
380
+ @keyframes veil-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
381
+ @keyframes veil-dot-bounce { 0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
382
+ @keyframes veil-bar-wave { 0%, 100% { transform: scaleY(0.3); opacity: 0.5; } 50% { transform: scaleY(1); opacity: 1; } }
383
+ @keyframes veil-pulse-scale { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
384
+ @keyframes veil-wave-dance { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }
385
+ @keyframes veil-bounce-ball { 0%, 100% { transform: translateY(35%) scale(1.15, 0.75); } 50% { transform: translateY(-40%) scale(0.9, 1.1); } }
386
+ @keyframes veil-ios-fade { 0% { opacity: 1; } 100% { opacity: 0.15; } }
387
+ @keyframes veil-glass-orbit { 0%, 100% { transform: scale(0.9) rotate(0deg); } 50% { transform: scale(1.08) rotate(180deg); } }
388
+ @keyframes veil-morph-shape {
389
+ 0%, 100% { border-radius: 50%; transform: rotate(0deg); }
390
+ 33% { border-radius: 8px; transform: rotate(90deg); }
391
+ 66% { border-radius: 20px; transform: rotate(180deg); }
392
+ }
393
+ `,document.head.appendChild(t)}var E=new Map,ee="",O=class{show(e,n={}){u();let r,s=!e;if(s?r=document.body:typeof e=="string"?(r=document.querySelector(e),r||(r=document.body)):r=e,E.has(r))return E.get(r);let a=document.createElement("div");if(a.className=`veil-overlay ${s?"veil-overlay-fullscreen":""} ${n.className||""}`.trim(),a.setAttribute("role","status"),n.color&&a.style.setProperty("--veil-overlay-bg",n.color),n.blur!==void 0){let i=typeof n.blur=="boolean"?n.blur?"8px":"0px":n.blur;a.style.setProperty("--veil-overlay-blur",i)}if(n.zIndex!==void 0&&(a.style.zIndex=String(n.zIndex)),n.spinner!==!1){let i=typeof n.spinner=="string"?n.spinner:"ring",l=v({type:i,size:36});a.appendChild(l)}if(n.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=n.message,a.appendChild(i)}return s||window.getComputedStyle(r).position==="static"&&(r.style.position="relative"),K(r,n.message),n.lockScroll&&s&&typeof document<"u"&&(ee=document.body.style.overflow,document.body.style.overflow="hidden"),r.appendChild(a),E.set(r,a),a}hide(e){let n,r=!e;r?n=document.body:typeof e=="string"?(n=document.querySelector(e),n||(n=document.body)):n=e;let s=E.get(n);s&&(s.style.opacity="0",setTimeout(()=>{s.remove(),E.delete(n),G(n),r&&ee!==void 0&&(document.body.style.overflow=ee)},200))}},C=new O;async function z(t,e={}){let n=T.start(e.id);e.progress&&w.start();let r=new S({delay:e.delay!==void 0?e.delay:150,minVisible:e.minVisible!==void 0?e.minVisible:300,onShow:()=>{e.overlay&&C.show(e.target),e.onStart&&e.onStart()},onHide:()=>{e.overlay&&C.hide(e.target),e.onFinish&&e.onFinish()}});r.start();try{return await(typeof t=="function"?t():t)}catch(s){throw e.progress&&w.fail(),s}finally{T.stop(n),e.progress&&w.done(),r.finish()}}function te(t=typeof window<"u"?window.fetch.bind(window):fetch,e={}){return async function(r,s){return z(()=>t(r,s),e)}}function Ae(t,e={}){u();let n="",r="",s=[],a=null,i=null;function l(d,c){if(d){if(!t.classList.contains("veil-btn-loading")){let m=t.getBoundingClientRect();if(n=t.style.width,r=t.style.height,m.width>0&&(t.style.width=`${m.width}px`),m.height>0&&(t.style.height=`${m.height}px`),t.classList.add("veil-btn-loading"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-busy","true"),e.spinnerPlacement==="replace"){s=Array.from(t.childNodes),t.innerHTML="";let p=v({type:e.spinner||"ring",size:18,color:"currentColor"});t.appendChild(p)}else{a=document.createElement("span"),a.className="veil-btn-spinner-wrap";let p=v({type:e.spinner||"ring",size:16,color:"currentColor"});a.appendChild(p),t.insertBefore(a,t.firstChild),(c||e.loadingText)&&(i=document.createTextNode(` ${c||e.loadingText}`),t.appendChild(i))}}}else if(t.classList.contains("veil-btn-loading"))if(t.classList.remove("veil-btn-loading"),t.removeAttribute("aria-disabled"),t.removeAttribute("aria-busy"),t.style.width=n,t.style.height=r,e.spinnerPlacement==="replace"){t.innerHTML="";for(let m of s)t.appendChild(m);s=[]}else a&&(a.remove(),a=null),i&&(i.remove(),i=null)}return e.loading&&l(!0,e.loadingText),{setLoading:l,destroy:()=>l(!1)}}function Me(t){u();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 n=o({animation:t.animation||"shimmer",theme:t.theme,width:"100%",height:"100%",radius:t.radius});n.style.position="absolute",n.style.inset="0",e.appendChild(n);let r=document.createElement("img");return r.alt=t.alt||"",r.className="veil-lazy-img veil-lazy-img-loading",r.style.width="100%",r.style.height="100%",r.style.objectFit="cover",r.style.display="block",r.onload=()=>{r.classList.remove("veil-lazy-img-loading"),r.classList.add("veil-lazy-img-loaded"),n.style.opacity="0",setTimeout(()=>{n.remove()},350),t.onLoad&&t.onLoad()},r.onerror=s=>{t.fallbackSrc&&r.src!==t.fallbackSrc?r.src=t.fallbackSrc:(n.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)},r.src=t.src,e.appendChild(r),e}function Pe(t={}){u(),t.locale&&k(t.locale);let e=document.createElement("span");e.className=`veil-text-loader ${t.className||""}`.trim(),e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let n=document.createElement("span");n.className="veil-text-loader-text",n.textContent=t.text||$("loading");let r=document.createElement("span");r.className="veil-text-loader-dots",r.setAttribute("aria-hidden","true");let s=t.dots||3;for(let a=0;a<s;a++){let i=document.createElement("span");i.className="veil-typing-dot",i.textContent=".",i.style.display="inline-block",i.style.animation="veil-dot-pulse 1200ms infinite",i.style.animationDelay=`${a*200}ms`,r.appendChild(i)}return e.append(n,r),e}var H=class{config={};configure(e){Object.assign(this.config,e),e.nonce&&U(e.nonce),e.locale&&k(e.locale),e.labels&&P(e.labels),u(e.nonce)}skeleton(e,n={}){u();let r=typeof e=="string"?document.querySelector(e):e;if(!r)throw new Error("[Veilkit] Target element not found for skeleton.");let s=null,a=!1,i=()=>{a||(a=!0,r.setAttribute("aria-busy","true"),s=Q(r,n,n))},l=()=>{a&&(a=!1,r.removeAttribute("aria-busy"),s&&(s.destroy(),s=null))},d=m=>{Object.assign(n,m),s&&s.refresh()},c=()=>{l()};return i(),{element:r,show:i,hide:l,update:d,destroy:c}}spinner(e,n={}){let r=typeof e=="string"?document.querySelector(e):e,s=v(n);return r&&r.appendChild(s),s}overlay=C;progress=w;manager=T;track=z;wrapFetch=te;setLocale=k;setLabels=P;createTheme=A;getThemeTokens=D;createSkeleton=o;createPrimitive=J;createPreset=x},pe=new H;return xe($e);})();