@stacksjs/components 0.2.225 → 0.2.227
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/dist/Image-4ezne2xj.stx +122 -0
- package/dist/index.js +5 -5
- package/dist/ui/image/index.d.ts +5 -4
- package/package.json +3 -3
- package/src/ui/image/Image.stx +96 -139
- package/src/ui/image/README.md +73 -45
- package/src/ui/image/index.ts +12 -4
- package/dist/Image-yhxcvgzs.stx +0 -165
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
export const src = $props.src || ''
|
|
3
|
+
export const srcSet = $props.srcSet || ''
|
|
4
|
+
export const sizes = $props.sizes || ''
|
|
5
|
+
export const webpSrc = $props.webpSrc || ''
|
|
6
|
+
export const webpSrcSet = $props.webpSrcSet || ''
|
|
7
|
+
export const alt = $props.alt || ''
|
|
8
|
+
export const width = $props.width
|
|
9
|
+
export const height = $props.height
|
|
10
|
+
export const priority = $props.priority || false
|
|
11
|
+
export const lazy = priority ? false : ($props.lazy ?? true)
|
|
12
|
+
export const decoding = $props.decoding || 'async'
|
|
13
|
+
export const fetchpriority = priority ? 'high' : ($props.fetchpriority || 'auto')
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A CSS value painted behind the image while it arrives - a colour, a
|
|
17
|
+
* gradient, or `url("data:image/...")` for a low-quality preview. Anything
|
|
18
|
+
* `background` accepts.
|
|
19
|
+
*
|
|
20
|
+
* Behind, not on the image itself: a background set on an `<img>` shows
|
|
21
|
+
* through anything transparent in it and stays there once it has loaded,
|
|
22
|
+
* which is a permanent artefact on every PNG with an alpha channel.
|
|
23
|
+
*/
|
|
24
|
+
export const placeholder = $props.placeholder || ''
|
|
25
|
+
export const aspectRatio = $props.aspectRatio
|
|
26
|
+
export const objectFit = $props.objectFit || 'cover'
|
|
27
|
+
export const objectPosition = $props.objectPosition || 'center'
|
|
28
|
+
export const rounded = $props.rounded ?? false
|
|
29
|
+
export const zoomOnHover = $props.zoomOnHover || false
|
|
30
|
+
export const className = $props.className || ''
|
|
31
|
+
|
|
32
|
+
export const hasWebP = !!(webpSrc || webpSrcSet)
|
|
33
|
+
|
|
34
|
+
const RADII = {
|
|
35
|
+
true: '0.5rem',
|
|
36
|
+
full: '9999px',
|
|
37
|
+
sm: '0.125rem',
|
|
38
|
+
md: '0.375rem',
|
|
39
|
+
lg: '0.5rem',
|
|
40
|
+
xl: '0.75rem',
|
|
41
|
+
'2xl': '1rem',
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const radius = rounded ? (RADII[String(rounded)] || RADII.true) : ''
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Styles inline rather than as utility classes.
|
|
48
|
+
*
|
|
49
|
+
* This component ships in a library and renders inside applications that do
|
|
50
|
+
* not necessarily use a utility CSS framework - and even where one is present,
|
|
51
|
+
* its scanner has to be pointed at `node_modules` to see class names written
|
|
52
|
+
* here, which is not the default anywhere. It previously emitted `relative`,
|
|
53
|
+
* `block`, `overflow-hidden`, `h-full`, `w-full` and `bg-stone-100`, and in an
|
|
54
|
+
* app whose scanner never saw this file not one of those rules existed: every
|
|
55
|
+
* image rendered at its intrinsic size inside an unstyled wrapper.
|
|
56
|
+
*
|
|
57
|
+
* Width and height at 100% make the wrapper transparent to layout. Against a
|
|
58
|
+
* parent with a definite height it passes that height down; against one
|
|
59
|
+
* without, it resolves to `auto` and the image's own ratio decides. Both
|
|
60
|
+
* matter, because a stylesheet may size either the box or the image.
|
|
61
|
+
*/
|
|
62
|
+
export const frameStyle = [
|
|
63
|
+
'position: relative',
|
|
64
|
+
'display: block',
|
|
65
|
+
'width: 100%',
|
|
66
|
+
'height: 100%',
|
|
67
|
+
'overflow: hidden',
|
|
68
|
+
/*
|
|
69
|
+
* Only when asked for. Deriving a ratio from the intrinsic width and height
|
|
70
|
+
* looks like free layout stability and is really an override: an app that
|
|
71
|
+
* sets its own crop in CSS finds this silently winning, and its images come
|
|
72
|
+
* out the wrong shape. `width` and `height` on the <img> already reserve
|
|
73
|
+
* the right space wherever CSS says nothing.
|
|
74
|
+
*/
|
|
75
|
+
aspectRatio ? `aspect-ratio: ${aspectRatio}` : '',
|
|
76
|
+
radius ? `border-radius: ${radius}` : '',
|
|
77
|
+
placeholder ? `background: ${placeholder} center / cover no-repeat` : '',
|
|
78
|
+
].filter(Boolean).join('; ')
|
|
79
|
+
|
|
80
|
+
export const imageStyle = [
|
|
81
|
+
'display: block',
|
|
82
|
+
'width: 100%',
|
|
83
|
+
'height: 100%',
|
|
84
|
+
`object-fit: ${objectFit}`,
|
|
85
|
+
`object-position: ${objectPosition}`,
|
|
86
|
+
radius ? `border-radius: ${radius}` : '',
|
|
87
|
+
zoomOnHover ? 'transition: transform 0.3s ease-in-out' : '',
|
|
88
|
+
].filter(Boolean).join('; ')
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<picture class="{{ className }}" style="{{ frameStyle }}">
|
|
92
|
+
@if(hasWebP)
|
|
93
|
+
<source
|
|
94
|
+
type="image/webp"
|
|
95
|
+
@if(webpSrcSet)srcset="{{ webpSrcSet }}"@endif
|
|
96
|
+
@if(webpSrc && !webpSrcSet)srcset="{{ webpSrc }}"@endif
|
|
97
|
+
@if(sizes)sizes="{{ sizes }}"@endif
|
|
98
|
+
/>
|
|
99
|
+
@endif
|
|
100
|
+
{{--
|
|
101
|
+
One <img>, always carrying its real `src`.
|
|
102
|
+
|
|
103
|
+
What was here before put a grey SVG in `src`, moved the real URL to
|
|
104
|
+
`data-src`, and swapped them from an IntersectionObserver on mount. That
|
|
105
|
+
meant no image at all without JavaScript - for a crawler, for a reader
|
|
106
|
+
view, for anyone on a failed bundle - while `loading="lazy"` was sitting
|
|
107
|
+
on the same tag already doing the job natively, in every browser since
|
|
108
|
+
2020, without blocking the parser or double-fetching through a probe.
|
|
109
|
+
--}}
|
|
110
|
+
<img
|
|
111
|
+
src="{{ src }}"
|
|
112
|
+
@if(srcSet)srcset="{{ srcSet }}"@endif
|
|
113
|
+
@if(sizes)sizes="{{ sizes }}"@endif
|
|
114
|
+
alt="{{ alt }}"
|
|
115
|
+
@if(width)width="{{ width }}"@endif
|
|
116
|
+
@if(height)height="{{ height }}"@endif
|
|
117
|
+
loading="{{ lazy ? 'lazy' : 'eager' }}"
|
|
118
|
+
decoding="{{ decoding }}"
|
|
119
|
+
fetchpriority="{{ fetchpriority }}"
|
|
120
|
+
style="{{ imageStyle }}"
|
|
121
|
+
/>
|
|
122
|
+
</picture>
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var be={__stx:!0,src:"./components/CodeBlock.stx"};var ge={__stx:!0,src:"./components/Footer.stx"};var xe={__stx:!0,src:"./components/Hero.stx"};var me={__stx:!0,src:"./components/Installation.stx"};function fi(e){let{code:t,onSuccess:s,onError:a,timeout:o=2000}=e,i=!1,r=null;return{copied:i,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),i=!0,s?.(),r=setTimeout(()=>{i=!1,r=null},o)}catch(d){let f=d instanceof Error?d:Error("Failed to copy code");a?.(f),console.error("Failed to copy code:",f)}},reset:()=>{if(i=!1,r)clearTimeout(r),r=null}}}async function hi(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function ve(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Q(e){return e==="system"?ve():e}function gi(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,a=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)a=c}let o=Q(a)==="dark",i=(c)=>{let d=Q(c);if(typeof document<"u")if(d==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},r=(c)=>{a=c,i(c)},n=()=>{let d=Q(a)==="dark"?"light":"dark";r(d)};if(i(a),typeof window<"u"&&a==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(a==="system")i("system")});return{isDark:o,theme:a,toggle:n,setTheme:r}}function we(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function S(e,t,s=!1){if(typeof document>"u")return;let a=s?"property":"name",o=document.querySelector(`meta[${a}="${e}"]`);if(!o)o=document.createElement("meta"),o.setAttribute(a,e),document.head.appendChild(o);o.setAttribute("content",t)}function ye(e,t){if(typeof document>"u")return;let s=document.querySelector(`link[rel="${e}"]`);if(!s)s=document.createElement("link"),s.setAttribute("rel",e),document.head.appendChild(s);s.setAttribute("href",t)}function mi(e){let{title:t,description:s,author:a,keywords:o,ogImage:i,ogImageWidth:r,ogImageHeight:n,twitterCard:c="summary_large_image",twitterSite:d,twitterCreator:f,canonical:p}=e;if(t)we(t),S("og:title",t,!0),S("twitter:title",t);if(s)S("description",s),S("og:description",s,!0),S("twitter:description",s);if(a)S("author",a);if(o&&o.length>0)S("keywords",o.join(", "));if(i)S("og:image",i,!0),S("twitter:image",i);if(r)S("og:image:width",r,!0);if(n)S("og:image:height",n,!0);if(S("twitter:card",c),d)S("twitter:site",d);if(f)S("twitter:creator",f);if(p)ye("canonical",p);if(S("og:type","website",!0),typeof window<"u")S("og:url",window.location.href,!0)}function vi(e){let t=[],{title:s,description:a,author:o,keywords:i,ogImage:r,ogImageWidth:n,ogImageHeight:c,twitterCard:d="summary_large_image",twitterSite:f,twitterCreator:p,canonical:g}=e;if(s)t.push(`<title>${T(s)}</title>`),t.push(`<meta property="og:title" content="${T(s)}" />`),t.push(`<meta name="twitter:title" content="${T(s)}" />`);if(a)t.push(`<meta name="description" content="${T(a)}" />`),t.push(`<meta property="og:description" content="${T(a)}" />`),t.push(`<meta name="twitter:description" content="${T(a)}" />`);if(o)t.push(`<meta name="author" content="${T(o)}" />`);if(i&&i.length>0)t.push(`<meta name="keywords" content="${T(i.join(", "))}" />`);if(r)t.push(`<meta property="og:image" content="${T(r)}" />`),t.push(`<meta name="twitter:image" content="${T(r)}" />`);if(n)t.push(`<meta property="og:image:width" content="${T(n)}" />`);if(c)t.push(`<meta property="og:image:height" content="${T(c)}" />`);if(t.push(`<meta name="twitter:card" content="${T(d)}" />`),f)t.push(`<meta name="twitter:site" content="${T(f)}" />`);if(p)t.push(`<meta name="twitter:creator" content="${T(p)}" />`);if(g)t.push(`<link rel="canonical" href="${T(g)}" />`);return t.push('<meta property="og:type" content="website" />'),t.join(`
|
|
3
|
-
`)}function T(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function yi(e,t,s={}){let{enabled:a=!0,ignore:o=[]}=s,i=(r)=>{if(!a||!e)return;let n=r.target;if(!e.contains(n)){if(!o.some((d)=>{let f=document.querySelectorAll(d);return Array.from(f).some((p)=>p.contains(n))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",i),document.addEventListener("touchstart",i);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}}function $i(e,t={}){let{enabled:s=!0,initialFocus:a=null,returnFocus:o=!0,fallbackFocus:i=null}=t,r=null,n=!1;function c(){if(!e)return[];let h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(h))}function d(h){if(!s||!n||!e)return;let w=c();if(w.length===0){h.preventDefault();return}let v=w[0],k=w[w.length-1];if(h.shiftKey){if(document.activeElement===v||document.activeElement===e)h.preventDefault(),k.focus()}else if(document.activeElement===k)h.preventDefault(),v.focus()}function f(h){if(h.key==="Escape"&&s&&n)g()}function p(){if(!s||!e||n)return;if(r=document.activeElement,a)a.focus();else{let h=c();if(h.length>0)h[0].focus();else if(i)i.focus();else e.focus()}document.addEventListener("keydown",d),document.addEventListener("keydown",f),n=!0}function g(){if(!n)return;if(document.removeEventListener("keydown",d),document.removeEventListener("keydown",f),o&&r)r.focus();n=!1}return{activate:p,deactivate:g}}function Si(e,t={}){let{enabled:s=!0,preventDefault:a=!0,stopPropagation:o=!1,target:i=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],n=(c)=>{if(!s)return;r.forEach((d)=>{if(!(Array.isArray(d.key)?d.key:[d.key]).some((g)=>g.toLowerCase()===c.key.toLowerCase()))return;if(d.ctrl!==void 0&&d.ctrl!==c.ctrlKey)return;if(d.shift!==void 0&&d.shift!==c.shiftKey)return;if(d.alt!==void 0&&d.alt!==c.altKey)return;if(d.meta!==void 0&&d.meta!==c.metaKey)return;if(a)c.preventDefault();if(o)c.stopPropagation();d.handler(c)})};if(i)i.addEventListener("keydown",n);return()=>{if(i)i.removeEventListener("keydown",n)}}var Ti={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function
|
|
3
|
+
`)}function T(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function yi(e,t,s={}){let{enabled:a=!0,ignore:o=[]}=s,i=(r)=>{if(!a||!e)return;let n=r.target;if(!e.contains(n)){if(!o.some((d)=>{let f=document.querySelectorAll(d);return Array.from(f).some((p)=>p.contains(n))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",i),document.addEventListener("touchstart",i);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}}function $i(e,t={}){let{enabled:s=!0,initialFocus:a=null,returnFocus:o=!0,fallbackFocus:i=null}=t,r=null,n=!1;function c(){if(!e)return[];let h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(h))}function d(h){if(!s||!n||!e)return;let w=c();if(w.length===0){h.preventDefault();return}let v=w[0],k=w[w.length-1];if(h.shiftKey){if(document.activeElement===v||document.activeElement===e)h.preventDefault(),k.focus()}else if(document.activeElement===k)h.preventDefault(),v.focus()}function f(h){if(h.key==="Escape"&&s&&n)g()}function p(){if(!s||!e||n)return;if(r=document.activeElement,a)a.focus();else{let h=c();if(h.length>0)h[0].focus();else if(i)i.focus();else e.focus()}document.addEventListener("keydown",d),document.addEventListener("keydown",f),n=!0}function g(){if(!n)return;if(document.removeEventListener("keydown",d),document.removeEventListener("keydown",f),o&&r)r.focus();n=!1}return{activate:p,deactivate:g}}function Si(e,t={}){let{enabled:s=!0,preventDefault:a=!0,stopPropagation:o=!1,target:i=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],n=(c)=>{if(!s)return;r.forEach((d)=>{if(!(Array.isArray(d.key)?d.key:[d.key]).some((g)=>g.toLowerCase()===c.key.toLowerCase()))return;if(d.ctrl!==void 0&&d.ctrl!==c.ctrlKey)return;if(d.shift!==void 0&&d.shift!==c.shiftKey)return;if(d.alt!==void 0&&d.alt!==c.altKey)return;if(d.meta!==void 0&&d.meta!==c.metaKey)return;if(a)c.preventDefault();if(o)c.stopPropagation();d.handler(c)})};if(i)i.addEventListener("keydown",n);return()=>{if(i)i.removeEventListener("keydown",n)}}var Ti={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function Ai(e,t,s={}){let{serializer:a=JSON.stringify,deserializer:o=JSON.parse,onError:i=console.error}=s,r=t;try{if(typeof window<"u"){let p=window.localStorage.getItem(e);if(p!==null)r=o(p)}}catch(p){i(p)}let n=r,c=new Set;function d(p){try{let g=typeof p==="function"?p(n):p;if(n=g,typeof window<"u")window.localStorage.setItem(e,a(g));c.forEach((h)=>h(g))}catch(g){i(g)}}function f(){try{if(n=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((p)=>p(t))}catch(p){i(p)}}if(typeof window<"u"){let p=(g)=>{if(g.key===e&&g.newValue!==null)try{let h=o(g.newValue);n=h,c.forEach((w)=>w(h))}catch(h){i(h)}else if(g.key===e&&g.newValue===null)n=t,c.forEach((h)=>h(t))};window.addEventListener("storage",p)}return{value:n,setValue:d,removeValue:f}}function R(e,t={}){let{defaultValue:s=!1}=t,a=s,o=null;if(typeof window<"u"&&"matchMedia"in window){o=window.matchMedia(e),a=o.matches;let r=(n)=>{a=n.matches};if(o.addEventListener)o.addEventListener("change",r);else o.addListener(r)}function i(){if(o)a=o.matches}return{matches:a,updateMatches:i}}var q={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Di(e){return R(q[e])}function Pi(){return R(q.mobile)}function Li(){return R(q.desktop)}function zi(){return R(q.dark)}function Ei(){return R(q.reducedMotion)}var re=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],Mi="--stx-color";function Ce(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function Ri(e={}){let t={};for(let s of re){let a=e[s];if(!a||typeof a==="string")continue;let o={};for(let[i,r]of Object.entries(a))o[i]=Ce(`--stx-color-${s}-${i}`,r);t[s]=o}return t}function qi(e={}){let t=[];for(let s of re){let a=e[s];if(!a||typeof a==="string")continue;for(let o of Object.keys(a))t.push(`--stx-color-${s}-${o}`)}return t}var ke="./Accordion-8tv78bh9.stx";var Te="./AccordionItem-7bd3ga36.stx";var Ae="./Audio-y0sgq50z.stx";var De="./Login-2cp65d41.stx";var Le="./Signup-cbncrtvd.stx";var Ee="./TwoFactorChallenge-y7n4yrk9.stx";var Me="./Avatar-rjvwnskf.stx";var qe="./Badge-k52qmxcm.stx";var je="./Breadcrumb-sy5taqsn.stx";import B from"process";var He="https://stacksjs.com/components";class N extends Error{component;context;constructor(e,t,s={}){let a=N.formatMessage(e,t,s);super(a);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,N)}static formatMessage(e,t,s){let a=`[${e}] ${t}`;if(s.prop)a+=`
|
|
4
4
|
Prop: "${s.prop}"`;if(s.received!==void 0)a+=`
|
|
5
5
|
Received: ${JSON.stringify(s.received)}`;if(s.expected!==void 0){let o=Array.isArray(s.expected)?s.expected.map((i)=>JSON.stringify(i)).join(", "):JSON.stringify(s.expected);a+=`
|
|
6
6
|
Expected: ${o}`}if(s.details)a+=`
|
|
7
7
|
Details: ${s.details}`;if(s.docsUrl)a+=`
|
|
8
8
|
Documentation: ${s.docsUrl}`;else if(e)a+=`
|
|
9
|
-
Documentation: ${He}/${e.toLowerCase()}`;return a}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var M={invalidProp(e,t,s,a){return new
|
|
9
|
+
Documentation: ${He}/${e.toLowerCase()}`;return a}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var M={invalidProp(e,t,s,a){return new N(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:a,details:Array.isArray(a)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new N(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,a){return new N(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:a,details:`Expected "${t}" to be of type ${a}, but received ${typeof s}`})},componentNotFound(e){return new N("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new N(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new N(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new N(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new N(e,"Failed to render component",{details:t.message})}},W=null;function pr(e){W=e}function ur(){W=null}function V(e,t={}){let{throwError:s=!0,logError:a=!0}=t;if(a&&B.env.NODE_ENV!=="production"){if(console.error("Component Error:",e),e instanceof N)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(W)try{W(e)}catch(o){console.error("Error in error handler:",o)}if(s)throw e}function ne(e,t,s){return(...a)=>{try{let o=e(...a);if(o instanceof Promise)return o.catch((i)=>{let r=M.eventHandler(t,s,i);throw V(r,{throwError:!1}),r});return o}catch(o){let i=M.eventHandler(t,s,o);throw V(i,{throwError:!1}),i}}}function We(e,t){if(!e)throw t}function Ve(e,t,s={}){if(B.env.NODE_ENV==="production")return;let a=N.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${a}`)}function fr(e,t){if(B.env.NODE_ENV==="production")return;We(e,t)}function hr(e){let t=typeof B<"u"&&B.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,a){Ve(e,s,a)},error(s,a){let o=new N(e,s,a);V(o,{throwError:!1})}}}function br(e,t,s){try{return t()}catch(a){let o=M.render(e,a);return V(o,{throwError:!1}),s}}import _e from"process";var _=_e.env.NODE_ENV!=="production";class ${validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new $(this.validate,this.message,!0)}}var l={string:new $((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new $((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new $((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new $((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new $((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new $((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new $(()=>!0,()=>""),oneOf(e){return new $((t)=>e.includes(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected one of [${e.map((o)=>JSON.stringify(o)).join(", ")}].`)},oneOfType(e){return new $((t,s,a)=>e.some((o)=>o.validate(t,s,a)),(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected one of the specified types.`)},arrayOf(e){return new $((t,s,a)=>{if(!Array.isArray(t))return!1;return t.every((o,i)=>e.validate(o,`${s}[${i}]`,a))},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected array of specified type.`)},shape(e){return new $((t,s,a)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[o,i]of Object.entries(e)){if(i.isRequired&&!(o in t))return!1;if(o in t&&!i.validate(t[o],`${s}.${o}`,a))return!1}return!0},(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected object matching specified shape.`)},instanceOf(e){return new $((t)=>t instanceof e,(t,s,a)=>`Invalid prop \`${s}\` supplied to \`${a}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new $(e,typeof t==="string"?()=>t:t)},min(e){return new $((t)=>typeof t==="number"&&t>=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value >= ${e}.`)},max(e){return new $((t)=>typeof t==="number"&&t<=e,(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value <= ${e}.`)},range(e,t){return new $((s)=>typeof s==="number"&&s>=e&&s<=t,(s,a,o)=>`Invalid prop \`${a}\` of value \`${s}\` supplied to \`${o}\`, expected value between ${e} and ${t}.`)},pattern(e){return new $((t)=>typeof t==="string"&&e.test(t),(t,s,a)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${a}\`, expected value matching pattern ${e}.`)},email:new $((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new $((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function Fe(e,t,s,a={}){let{throwOnError:o=!1,logWarnings:i=_}=a,r=[];if(!_)return{valid:!0,errors:[]};for(let[n,c]of Object.entries(s)){let d=t[n],f=d===void 0;if(c.isRequired&&f){let p=`Required prop \`${n}\` was not specified in \`${e}\`.`;r.push(p);continue}if(f)continue;if(!c.validate(d,n,e)){let p=c.message(d,n,e);r.push(p)}}if(r.length>0){if(i)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((n)=>console.warn(n)),console.groupEnd();if(o)throw Error(`Prop validation failed for \`${e}\`:
|
|
10
10
|
${r.join(`
|
|
11
|
-
`)}`)}return{valid:r.length===0,errors:r}}function D(e,t,s){return(a)=>Fe(e,a,t,s)}function mr(e,t,s="value"){if(!_)return;if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function vr(e,t,s="value"){if(!_)return;if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Ge="./Button-wrwmnfpf.stx";var Ue={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},kr=D("Button",Ue);function Sr(e){return ne(e,"Button","onClick")}function Tr(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw M.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Ir(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw M.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Je="./Calendar-gjjhhfnt.stx";var Ze="./Card-473a02fy.stx";var et="./Checkbox-2s2a7n4h.stx";var st="./Combobox-fdkr6cdq.stx";var ot="./ComboboxButton-g76stp1e.stx";var rt="./ComboboxInput-z1293bbh.stx";var lt="./ComboboxOption-6yh7xk7q.stx";var dt="./ComboboxOptions-sq5360ae.stx";var ut="./CommandPalette-36mxf05w.stx";var ht="./CommandPaletteItem-chdw0070.stx";var gt="./Dialog-y5rz2vrq.stx";var mt="./DialogBackdrop-rxax3sec.stx";var wt="./DialogDescription-gth4c2kx.stx";var Ct="./DialogPanel-44d8jeqy.stx";var kt="./DialogTitle-x0r6k8x9.stx";var Tt="./Drawer-jgepqr9j.stx";var Nt="./Dropdown-vvhemtc0.stx";var Dt="./DropdownButton-wcz67dxy.stx";var Lt="./DropdownItem-d8ht2bp5.stx";var Et="./DropdownItems-1sxnd5qn.stx";var Mt="./Form-vbag14t1.stx";var Rt={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},In=D("Form",Rt);var Bt="./Image-yhxcvgzs.stx";var Ht="./EmailInput-vak3kkmk.stx";var Vt="./NumberInput-j9p5bm5y.stx";var Ft="./PasswordInput-4qykq1dz.stx";var Gt="./SearchInput-pdx7agn0.stx";var Yt="./TextInput-cefyyprt.stx";var Jt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Xt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean},Zt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Qt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},es={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Bn=D("TextInput",Xt),jn=D("EmailInput",Jt),Hn=D("PasswordInput",Qt),Wn=D("NumberInput",Zt),Vn=D("SearchInput",es);var ss="./Listbox-q49tnr90.stx";var os="./ListboxButton-keb8gm0q.stx";var rs="./ListboxLabel-7mymt1b8.stx";var ls="./ListboxOption-4j070101.stx";var ds="./ListboxOptions-ejkatcfg.stx";var us="./FilterChip-h896vrxm.stx";var hs="./FilterChips-7pnzycfd.stx";var gs="./ListRow-v45ymhcn.stx";var ms="./NavBar-wcb6f2d3.stx";var ws="./SectionCard-r73hvvbc.stx";var Cs="./TabBar-8143650x.stx";var ks="./TabBarItem-hd2r2ayy.stx";var Ts="./Navigator-smpa7my4.stx";var Ns="./Notification-03vfh3k6.stx";var Ds="./Pagination-jbcjrfcs.stx";var Ls="./Checkout-22wh3s22.stx";var Es="./DefaultPaymentMethod-6qrem3sg.stx";var Ms="./PaymentMethods-2xy66bwk.stx";var qs="./SubscriptionCheckout-7fdkwf04.stx";var js="./Popover-et2q44m7.stx";var Ws="./PopoverButton-mffzc9pr.stx";var _s="./PopoverPanel-054yh38h.stx";var Ks="./Portal-1vf14s4x.stx";var Us="./Progress-4h7dytq5.stx";var Js="./Radio-ccm07b2m.stx";var Zs="./RadioGroup-eerw9gq7.stx";var ea="./RadioGroupDescription-z34r9avr.stx";var sa="./RadioGroupLabel-7mymt1b8.stx";var oa="./RadioGroupOption-7pq7rw84.stx";var ra="./Select-zt72gg1e.stx";var la="./Sidebar-dbwp6rnk.stx";var da="./SidebarFooter-s7skj92y.stx";var ua="./SidebarHeader-1y4fvsm8.stx";var ha="./SidebarItem-5v8atp7p.stx";var ga="./SidebarPinned-48kyk193.stx";var ma="./SidebarSection-sqz49ary.stx";var wa="./SidebarSpace-nmbvgrky.stx";var Ca="./SidebarSpaces-h1564zm6.stx";var ka="./SidebarSpaceSwitcher-az9wqm87.stx";var F={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},O={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Sa={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ta={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ia={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Na={...O,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Aa={...O,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Da={...O,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},le={macos:O,tahoe:O,"macos-tahoe":O,"macos-latest":O,arc:Ia,workspace:Sa,desktop:Ta,solid:Na,transparent:Aa,vibrancy:Da};function $c(e){return le[e||"macos"]||le.macos}function kc(e){if(!e)return;return F[e]||e}var za=F.gray;function P(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function ce(e){return{light:{from:P(e,35,"#ffffff"),to:P(e,12.5,"#ffffff"),ink:P(e,22,"#17171b"),accent:P(e,88,"#2a2a30")},dark:{from:P(e,27,"#101014"),to:P(e,10,"#08080b"),ink:P(e,12,"#f4f4f7"),accent:P(e,74,"#ffffff")}}}function Ic(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function La(e){if(!e)return ce(za);if(typeof e!=="string")return e;return ce(F[e]||e)}function Pa(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function de(e,t,s,a){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||a}}function Ea(e){let t=La(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:de(e.action,e.id,"action","i-f7-plus"),clear:de(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Pa(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function Nc(e){return(e||[]).map(Ea)}function Ac(e,t){if(!t)return 0;let s=e.findIndex((a)=>a.id===t);return s===-1?0:s}function Dc(e){return e.map((t)=>t.tint)}var Ma="./Skeleton-wtwb97xd.stx";var qa="./Spinner-ypya5tt2.stx";var ja="./Stepper-rgbk76hd.stx";var Wa="./StepperStep-3ahq4d9m.stx";class K{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let a=e.oldValue?JSON.parse(e.oldValue).value:null,o=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((i)=>i(o,a,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let a=0;a<t.length;a++)s+=String.fromCharCode(t.charCodeAt(a)^this.encryptionKey.charCodeAt(a%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,a=[],o="";for(let i=0;i<e.length;i++){let r=e.charAt(i),n=o+r;if(t[n]!==void 0)o=n;else a.push(o.length>1?t[o]:o.charCodeAt(0)),t[n]=s++,o=r}if(o!=="")a.push(o.length>1?t[o]:o.charCodeAt(0));return JSON.stringify(a)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},a=256,o=String.fromCharCode(t[0]),i=o;for(let r=1;r<t.length;r++){let n=t[r],c;if(s[n]!==void 0)c=s[n];else if(n===a)c=o+o.charAt(0);else return e;i+=c,s[a++]=o+c.charAt(0),o=c}return i}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let a=this.getKey(e),o=this.get(e),i={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(i);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(a,r),this.notifyWatchers(e,t,o)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let a=JSON.parse(s);if(a.expire&&Date.now()-a.timestamp>a.expire)return this.remove(e),null;return a.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let a=this.watchers.get(e);if(a)a.forEach((o)=>o(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let a=this.storage.key(s);if(a){let o=this.storage.getItem(a)||"";e+=a.length+o.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,a])=>{this.set(s,a,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var sd={local:new K("local"),session:new K("session")};function ad(e="local",t){return new K(e,t)}var _a="./Switch-hdta55a8.stx";var Ka="./Table-0mc3fdek.stx";var Ua="./TableBody-drxyz5jh.stx";var Ja="./TableCell-8swtcq8s.stx";var Za="./TableHead-e9xvjx2j.stx";var eo="./TableHeader-sxc77b4d.stx";var so="./TableRow-xd542nvb.stx";var oo="./TabPanel-5htevsq6.stx";var ro="./Tabs-b4xsba1w.stx";var lo="./Teleport-tsx4bt4n.stx";var po="./Textarea-xcdym703.stx";var fo="./Tooltip-y61h04gp.stx";var bo="./Transition-7smenaz8.stx";var xo="./Video-a0aeyexv.stx";var vo="./VirtualList-fa7v5a3h.stx";var yo="./VirtualTable-jvm1784g.stx";var Co=0;function pe(e="a11y"){return`${e}-${++Co}-${Date.now()}`}function Gd(e,t,s={}){let{visible:a=!1,id:o=pe("label")}=s,i=document.createElement(a?"label":"span");if(i.id=o,i.textContent=e,!a)Object.assign(i.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",o),t.parentElement)t.parentElement.insertBefore(i,t);else document.body.appendChild(i);return o}function Ud(e,t){let s=pe("desc"),a=document.createElement("span");if(a.id=s,a.textContent=e,Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return s}function Yd(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function ee(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Jd(e,t={}){let{initialFocus:s,returnFocus:a,escapeDeactivates:o=!0,clickOutsideDeactivates:i=!0,allowOutsideClick:r=!1,onActivate:n,onDeactivate:c}=t,d=!1,f=!1,p=null,g=(m)=>{if(f)return;if(o&&m.key==="Escape"){m.preventDefault(),v();return}if(m.key==="Tab"){let C=ee(e);if(C.length===0){m.preventDefault();return}let N=C[0],L=C[C.length-1];if(m.shiftKey){if(document.activeElement===N)m.preventDefault(),L.focus()}else if(document.activeElement===L)m.preventDefault(),N.focus()}},h=(m)=>{if(f)return;if(!e.contains(m.target)){if(typeof r==="function"){if(!r(m)&&i)v()}else if(!r&&i)v()}};function w(){if(d)return;d=!0,p=document.activeElement;let m=s||ee(e)[0];if(m&&typeof m.focus==="function")m.focus();document.addEventListener("keydown",g),document.addEventListener("click",h),n?.()}function v(){if(!d)return;d=!1;let m=a||p;if(m&&typeof m.focus==="function")m.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",h),c?.()}function k(){f=!0}function x(){f=!1}return{activate:w,deactivate:v,pause:k,unpause:x}}function Xd(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:a=0,orientation:o="both",loop:i=!0,onFocusChange:r}=t,n=a,c=()=>{return Array.from(e.querySelectorAll(s))},d=(p)=>{let g=c();if(p<0||p>=g.length)return;g.forEach((h,w)=>{if(w===p){if(h.setAttribute("tabindex","0"),typeof h.focus==="function")h.focus()}else h.setAttribute("tabindex","-1")}),n=p,r?.(p,g[p])},f=(p)=>{let h=c().length-1,w=!1,v=n;switch(p.key){case"ArrowRight":if(o==="horizontal"||o==="both"){if(v=n+1,v>h)v=i?0:h;w=!0}break;case"ArrowLeft":if(o==="horizontal"||o==="both"){if(v=n-1,v<0)v=i?h:0;w=!0}break;case"ArrowDown":if(o==="vertical"||o==="both"){if(v=n+1,v>h)v=i?0:h;w=!0}break;case"ArrowUp":if(o==="vertical"||o==="both"){if(v=n-1,v<0)v=i?h:0;w=!0}break;case"Home":v=0,w=!0;break;case"End":v=h,w=!0;break}if(w)p.preventDefault(),d(v)};return d(a),e.addEventListener("keydown",f),()=>{e.removeEventListener("keydown",f)}}var Zd={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Qd(e){return document.activeElement===e}function ep(e,t){let s=t||document.activeElement,a=ee(document.body),o=a.indexOf(s);if(o===-1)return;let i=e==="next"?o+1:o-1,r=a[i];if(r)r.focus()}function tp(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var sp={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function ap(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function op(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function ip(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function rp(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function np(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function lp(e){let t=[],s=(a)=>{let o=e.getAttribute(a);if(o){let i=o.split(" ");for(let r of i)if(!document.getElementById(r))t.push(`${a} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var $o=(e,t,s,a)=>{return s*e/a+t},ko=(e,t,s,a)=>{return e/=a,s*e*e+t},So=(e,t,s,a)=>{return e/=a,-s*e*(e-2)+t},To=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Io=(e,t,s,a)=>{return e/=a,s*e*e*e+t},No=(e,t,s,a)=>{return e/=a,e--,s*(e*e*e+1)+t},Ao=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},Do=(e,t,s,a)=>{return e/=a,s*e*e*e*e+t},zo=(e,t,s,a)=>{return e/=a,e--,-s*(e*e*e*e-1)+t},Lo=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},Po=(e,t,s,a)=>{return e/=a,s*e*e*e*e*e+t},Eo=(e,t,s,a)=>{return e/=a,e--,s*(e*e*e*e*e+1)+t},Oo=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Mo=(e,t,s,a)=>{return-s*Math.cos(e/a*(Math.PI/2))+s+t},Ro=(e,t,s,a)=>{return s*Math.sin(e/a*(Math.PI/2))+t},qo=(e,t,s,a)=>{return-s/2*(Math.cos(Math.PI*e/a)-1)+t},Bo=(e,t,s,a)=>{return e===0?t:s*2**(10*(e/a-1))+t},jo=(e,t,s,a)=>{return e===a?t+s:s*(-(2**(-10*e/a))+1)+t},Ho=(e,t,s,a)=>{if(e===0)return t;if(e===a)return t+s;if(e/=a/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Wo=(e,t,s,a)=>{return e/=a,-s*(Math.sqrt(1-e*e)-1)+t},Vo=(e,t,s,a)=>{return e/=a,e--,s*Math.sqrt(1-e*e)+t},_o=(e,t,s,a)=>{if(e/=a/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Fo=(e,t,s,a)=>{let o=1.70158,i=0,r=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!i)i=a*0.3;if(r<Math.abs(s))r=s,o=i/4;else o=i/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*a-o)*(2*Math.PI)/i))+t},Ko=(e,t,s,a)=>{let o=1.70158,i=0,r=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!i)i=a*0.3;if(r<Math.abs(s))r=s,o=i/4;else o=i/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*a-o)*(2*Math.PI)/i)+s+t},Go=(e,t,s,a)=>{let o=1.70158,i=0,r=s;if(e===0)return t;if(e/=a/2,e===2)return t+s;if(!i)i=a*0.44999999999999996;if(r<Math.abs(s))r=s,o=i/4;else o=i/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*a-o)*(2*Math.PI)/i))+t;return e-=1,r*2**(-10*e)*Math.sin((e*a-o)*(2*Math.PI)/i)*0.5+s+t},Uo=(e,t,s,a)=>{return e/=a,s*e*e*(2.70158*e-1.70158)+t},Yo=(e,t,s,a)=>{return e/=a,e--,s*(e*e*(2.70158*e+1.70158)+1)+t},Jo=(e,t,s,a)=>{let o=1.70158;if(e/=a/2,e<1)return o*=1.525,s/2*(e*e*((o+1)*e-o))+t;return e-=2,o*=1.525,s/2*(e*e*((o+1)*e+o)+2)+t},te=(e,t,s,a)=>{if(e/=a,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},ue=(e,t,s,a)=>{return s-te(a-e,0,s,a)+t},Xo=(e,t,s,a)=>{if(e<a/2)return ue(e*2,0,s,a)*0.5+t;return te(e*2-a,0,s,a)*0.5+s*0.5+t},dp={linear:$o,easeInQuad:ko,easeOutQuad:So,easeInOutQuad:To,easeInCubic:Io,easeOutCubic:No,easeInOutCubic:Ao,easeInQuart:Do,easeOutQuart:zo,easeInOutQuart:Lo,easeInQuint:Po,easeOutQuint:Eo,easeInOutQuint:Oo,easeInSine:Mo,easeOutSine:Ro,easeInOutSine:qo,easeInExpo:Bo,easeOutExpo:jo,easeInOutExpo:Ho,easeInCirc:Wo,easeOutCirc:Vo,easeInOutCirc:_o,easeInElastic:Fo,easeOutElastic:Ko,easeInOutElastic:Go,easeInBack:Uo,easeOutBack:Yo,easeInOutBack:Jo,easeInBounce:ue,easeOutBounce:te,easeInOutBounce:Xo};function Zo(e,t={}){let{duration:s="1s",timing:a="ease",delay:o="0s",iteration:i="1",direction:r="normal",fill:n="both",playState:c="running"}=t;return`${e} ${s} ${a} ${o} ${i} ${r} ${n} ${c}`}function fe(e,t,s={}){e.style.animation=Zo(t,s)}function up(e){e.style.animation=""}function Qo(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function fp(e,t,s={}){let{stagger:a=100,...o}=s;e.forEach((i,r)=>{let n=`${r*a}ms`;fe(i,t,{...o,delay:n})})}async function hp(e,t){for(let s of t)fe(e,s.name,s.options),await Qo(e)}var bp={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function gp(e,t,s=1000){return new Promise((a)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),a()},s)})}function xp(e,t){let s=`
|
|
11
|
+
`)}`)}return{valid:r.length===0,errors:r}}function D(e,t,s){return(a)=>Fe(e,a,t,s)}function mr(e,t,s="value"){if(!_)return;if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function vr(e,t,s="value"){if(!_)return;if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Ge="./Button-wrwmnfpf.stx";var Ue={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},kr=D("Button",Ue);function Sr(e){return ne(e,"Button","onClick")}function Tr(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw M.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Nr(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw M.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Je="./Calendar-gjjhhfnt.stx";var Ze="./Card-473a02fy.stx";var et="./Checkbox-2s2a7n4h.stx";var st="./Combobox-fdkr6cdq.stx";var ot="./ComboboxButton-g76stp1e.stx";var rt="./ComboboxInput-z1293bbh.stx";var lt="./ComboboxOption-6yh7xk7q.stx";var dt="./ComboboxOptions-sq5360ae.stx";var ut="./CommandPalette-36mxf05w.stx";var ht="./CommandPaletteItem-chdw0070.stx";var gt="./Dialog-y5rz2vrq.stx";var mt="./DialogBackdrop-rxax3sec.stx";var wt="./DialogDescription-gth4c2kx.stx";var Ct="./DialogPanel-44d8jeqy.stx";var kt="./DialogTitle-x0r6k8x9.stx";var Tt="./Drawer-jgepqr9j.stx";var At="./Dropdown-vvhemtc0.stx";var Dt="./DropdownButton-wcz67dxy.stx";var Lt="./DropdownItem-d8ht2bp5.stx";var Et="./DropdownItems-1sxnd5qn.stx";var Mt="./Form-vbag14t1.stx";var Rt={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},Nn=D("Form",Rt);var Bt="./Image-4ezne2xj.stx";var Ht="./EmailInput-vak3kkmk.stx";var Vt="./NumberInput-j9p5bm5y.stx";var Ft="./PasswordInput-4qykq1dz.stx";var Gt="./SearchInput-pdx7agn0.stx";var Yt="./TextInput-cefyyprt.stx";var Jt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Xt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean},Zt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Qt={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},es={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Bn=D("TextInput",Xt),jn=D("EmailInput",Jt),Hn=D("PasswordInput",Qt),Wn=D("NumberInput",Zt),Vn=D("SearchInput",es);var ss="./Listbox-q49tnr90.stx";var os="./ListboxButton-keb8gm0q.stx";var rs="./ListboxLabel-7mymt1b8.stx";var ls="./ListboxOption-4j070101.stx";var ds="./ListboxOptions-ejkatcfg.stx";var us="./FilterChip-h896vrxm.stx";var hs="./FilterChips-7pnzycfd.stx";var gs="./ListRow-v45ymhcn.stx";var ms="./NavBar-wcb6f2d3.stx";var ws="./SectionCard-r73hvvbc.stx";var Cs="./TabBar-8143650x.stx";var ks="./TabBarItem-hd2r2ayy.stx";var Ts="./Navigator-smpa7my4.stx";var As="./Notification-03vfh3k6.stx";var Ds="./Pagination-jbcjrfcs.stx";var Ls="./Checkout-22wh3s22.stx";var Es="./DefaultPaymentMethod-6qrem3sg.stx";var Ms="./PaymentMethods-2xy66bwk.stx";var qs="./SubscriptionCheckout-7fdkwf04.stx";var js="./Popover-et2q44m7.stx";var Ws="./PopoverButton-mffzc9pr.stx";var _s="./PopoverPanel-054yh38h.stx";var Ks="./Portal-1vf14s4x.stx";var Us="./Progress-4h7dytq5.stx";var Js="./Radio-ccm07b2m.stx";var Zs="./RadioGroup-eerw9gq7.stx";var ea="./RadioGroupDescription-z34r9avr.stx";var sa="./RadioGroupLabel-7mymt1b8.stx";var oa="./RadioGroupOption-7pq7rw84.stx";var ra="./Select-zt72gg1e.stx";var la="./Sidebar-dbwp6rnk.stx";var da="./SidebarFooter-s7skj92y.stx";var ua="./SidebarHeader-1y4fvsm8.stx";var ha="./SidebarItem-5v8atp7p.stx";var ga="./SidebarPinned-48kyk193.stx";var ma="./SidebarSection-sqz49ary.stx";var wa="./SidebarSpace-nmbvgrky.stx";var Ca="./SidebarSpaces-h1564zm6.stx";var ka="./SidebarSpaceSwitcher-az9wqm87.stx";var F={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},O={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Sa={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Ta={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},Na={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Aa={...O,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ia={...O,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Da={...O,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},le={macos:O,tahoe:O,"macos-tahoe":O,"macos-latest":O,arc:Na,workspace:Sa,desktop:Ta,solid:Aa,transparent:Ia,vibrancy:Da};function $c(e){return le[e||"macos"]||le.macos}function kc(e){if(!e)return;return F[e]||e}var Pa=F.gray;function z(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function ce(e){return{light:{from:z(e,35,"#ffffff"),to:z(e,12.5,"#ffffff"),ink:z(e,22,"#17171b"),accent:z(e,88,"#2a2a30")},dark:{from:z(e,27,"#101014"),to:z(e,10,"#08080b"),ink:z(e,12,"#f4f4f7"),accent:z(e,74,"#ffffff")}}}function Nc(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function La(e){if(!e)return ce(Pa);if(typeof e!=="string")return e;return ce(F[e]||e)}function za(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function de(e,t,s,a){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||a}}function Ea(e){let t=La(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:de(e.action,e.id,"action","i-f7-plus"),clear:de(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:za(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function Ac(e){return(e||[]).map(Ea)}function Ic(e,t){if(!t)return 0;let s=e.findIndex((a)=>a.id===t);return s===-1?0:s}function Dc(e){return e.map((t)=>t.tint)}var Ma="./Skeleton-wtwb97xd.stx";var qa="./Spinner-ypya5tt2.stx";var ja="./Stepper-rgbk76hd.stx";var Wa="./StepperStep-3ahq4d9m.stx";class K{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let a=e.oldValue?JSON.parse(e.oldValue).value:null,o=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((i)=>i(o,a,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let a=0;a<t.length;a++)s+=String.fromCharCode(t.charCodeAt(a)^this.encryptionKey.charCodeAt(a%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,a=[],o="";for(let i=0;i<e.length;i++){let r=e.charAt(i),n=o+r;if(t[n]!==void 0)o=n;else a.push(o.length>1?t[o]:o.charCodeAt(0)),t[n]=s++,o=r}if(o!=="")a.push(o.length>1?t[o]:o.charCodeAt(0));return JSON.stringify(a)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},a=256,o=String.fromCharCode(t[0]),i=o;for(let r=1;r<t.length;r++){let n=t[r],c;if(s[n]!==void 0)c=s[n];else if(n===a)c=o+o.charAt(0);else return e;i+=c,s[a++]=o+c.charAt(0),o=c}return i}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let a=this.getKey(e),o=this.get(e),i={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(i);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(a,r),this.notifyWatchers(e,t,o)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let a=JSON.parse(s);if(a.expire&&Date.now()-a.timestamp>a.expire)return this.remove(e),null;return a.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let a=this.watchers.get(e);if(a)a.forEach((o)=>o(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let a=this.storage.key(s);if(a){let o=this.storage.getItem(a)||"";e+=a.length+o.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,a])=>{this.set(s,a,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var sd={local:new K("local"),session:new K("session")};function ad(e="local",t){return new K(e,t)}var _a="./Switch-hdta55a8.stx";var Ka="./Table-0mc3fdek.stx";var Ua="./TableBody-drxyz5jh.stx";var Ja="./TableCell-8swtcq8s.stx";var Za="./TableHead-e9xvjx2j.stx";var eo="./TableHeader-sxc77b4d.stx";var so="./TableRow-xd542nvb.stx";var oo="./TabPanel-5htevsq6.stx";var ro="./Tabs-b4xsba1w.stx";var lo="./Teleport-tsx4bt4n.stx";var po="./Textarea-xcdym703.stx";var fo="./Tooltip-y61h04gp.stx";var bo="./Transition-7smenaz8.stx";var xo="./Video-a0aeyexv.stx";var vo="./VirtualList-fa7v5a3h.stx";var yo="./VirtualTable-jvm1784g.stx";var Co=0;function pe(e="a11y"){return`${e}-${++Co}-${Date.now()}`}function Gd(e,t,s={}){let{visible:a=!1,id:o=pe("label")}=s,i=document.createElement(a?"label":"span");if(i.id=o,i.textContent=e,!a)Object.assign(i.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",o),t.parentElement)t.parentElement.insertBefore(i,t);else document.body.appendChild(i);return o}function Ud(e,t){let s=pe("desc"),a=document.createElement("span");if(a.id=s,a.textContent=e,Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return s}function Yd(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function ee(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Jd(e,t={}){let{initialFocus:s,returnFocus:a,escapeDeactivates:o=!0,clickOutsideDeactivates:i=!0,allowOutsideClick:r=!1,onActivate:n,onDeactivate:c}=t,d=!1,f=!1,p=null,g=(m)=>{if(f)return;if(o&&m.key==="Escape"){m.preventDefault(),v();return}if(m.key==="Tab"){let C=ee(e);if(C.length===0){m.preventDefault();return}let A=C[0],L=C[C.length-1];if(m.shiftKey){if(document.activeElement===A)m.preventDefault(),L.focus()}else if(document.activeElement===L)m.preventDefault(),A.focus()}},h=(m)=>{if(f)return;if(!e.contains(m.target)){if(typeof r==="function"){if(!r(m)&&i)v()}else if(!r&&i)v()}};function w(){if(d)return;d=!0,p=document.activeElement;let m=s||ee(e)[0];if(m&&typeof m.focus==="function")m.focus();document.addEventListener("keydown",g),document.addEventListener("click",h),n?.()}function v(){if(!d)return;d=!1;let m=a||p;if(m&&typeof m.focus==="function")m.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",h),c?.()}function k(){f=!0}function x(){f=!1}return{activate:w,deactivate:v,pause:k,unpause:x}}function Xd(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:a=0,orientation:o="both",loop:i=!0,onFocusChange:r}=t,n=a,c=()=>{return Array.from(e.querySelectorAll(s))},d=(p)=>{let g=c();if(p<0||p>=g.length)return;g.forEach((h,w)=>{if(w===p){if(h.setAttribute("tabindex","0"),typeof h.focus==="function")h.focus()}else h.setAttribute("tabindex","-1")}),n=p,r?.(p,g[p])},f=(p)=>{let h=c().length-1,w=!1,v=n;switch(p.key){case"ArrowRight":if(o==="horizontal"||o==="both"){if(v=n+1,v>h)v=i?0:h;w=!0}break;case"ArrowLeft":if(o==="horizontal"||o==="both"){if(v=n-1,v<0)v=i?h:0;w=!0}break;case"ArrowDown":if(o==="vertical"||o==="both"){if(v=n+1,v>h)v=i?0:h;w=!0}break;case"ArrowUp":if(o==="vertical"||o==="both"){if(v=n-1,v<0)v=i?h:0;w=!0}break;case"Home":v=0,w=!0;break;case"End":v=h,w=!0;break}if(w)p.preventDefault(),d(v)};return d(a),e.addEventListener("keydown",f),()=>{e.removeEventListener("keydown",f)}}var Zd={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Qd(e){return document.activeElement===e}function ep(e,t){let s=t||document.activeElement,a=ee(document.body),o=a.indexOf(s);if(o===-1)return;let i=e==="next"?o+1:o-1,r=a[i];if(r)r.focus()}function tp(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var sp={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function ap(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function op(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function ip(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function rp(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function np(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function lp(e){let t=[],s=(a)=>{let o=e.getAttribute(a);if(o){let i=o.split(" ");for(let r of i)if(!document.getElementById(r))t.push(`${a} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var $o=(e,t,s,a)=>{return s*e/a+t},ko=(e,t,s,a)=>{return e/=a,s*e*e+t},So=(e,t,s,a)=>{return e/=a,-s*e*(e-2)+t},To=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},No=(e,t,s,a)=>{return e/=a,s*e*e*e+t},Ao=(e,t,s,a)=>{return e/=a,e--,s*(e*e*e+1)+t},Io=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},Do=(e,t,s,a)=>{return e/=a,s*e*e*e*e+t},Po=(e,t,s,a)=>{return e/=a,e--,-s*(e*e*e*e-1)+t},Lo=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},zo=(e,t,s,a)=>{return e/=a,s*e*e*e*e*e+t},Eo=(e,t,s,a)=>{return e/=a,e--,s*(e*e*e*e*e+1)+t},Oo=(e,t,s,a)=>{if(e/=a/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Mo=(e,t,s,a)=>{return-s*Math.cos(e/a*(Math.PI/2))+s+t},Ro=(e,t,s,a)=>{return s*Math.sin(e/a*(Math.PI/2))+t},qo=(e,t,s,a)=>{return-s/2*(Math.cos(Math.PI*e/a)-1)+t},Bo=(e,t,s,a)=>{return e===0?t:s*2**(10*(e/a-1))+t},jo=(e,t,s,a)=>{return e===a?t+s:s*(-(2**(-10*e/a))+1)+t},Ho=(e,t,s,a)=>{if(e===0)return t;if(e===a)return t+s;if(e/=a/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Wo=(e,t,s,a)=>{return e/=a,-s*(Math.sqrt(1-e*e)-1)+t},Vo=(e,t,s,a)=>{return e/=a,e--,s*Math.sqrt(1-e*e)+t},_o=(e,t,s,a)=>{if(e/=a/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Fo=(e,t,s,a)=>{let o=1.70158,i=0,r=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!i)i=a*0.3;if(r<Math.abs(s))r=s,o=i/4;else o=i/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*a-o)*(2*Math.PI)/i))+t},Ko=(e,t,s,a)=>{let o=1.70158,i=0,r=s;if(e===0)return t;if(e/=a,e===1)return t+s;if(!i)i=a*0.3;if(r<Math.abs(s))r=s,o=i/4;else o=i/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*a-o)*(2*Math.PI)/i)+s+t},Go=(e,t,s,a)=>{let o=1.70158,i=0,r=s;if(e===0)return t;if(e/=a/2,e===2)return t+s;if(!i)i=a*0.44999999999999996;if(r<Math.abs(s))r=s,o=i/4;else o=i/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*a-o)*(2*Math.PI)/i))+t;return e-=1,r*2**(-10*e)*Math.sin((e*a-o)*(2*Math.PI)/i)*0.5+s+t},Uo=(e,t,s,a)=>{return e/=a,s*e*e*(2.70158*e-1.70158)+t},Yo=(e,t,s,a)=>{return e/=a,e--,s*(e*e*(2.70158*e+1.70158)+1)+t},Jo=(e,t,s,a)=>{let o=1.70158;if(e/=a/2,e<1)return o*=1.525,s/2*(e*e*((o+1)*e-o))+t;return e-=2,o*=1.525,s/2*(e*e*((o+1)*e+o)+2)+t},te=(e,t,s,a)=>{if(e/=a,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},ue=(e,t,s,a)=>{return s-te(a-e,0,s,a)+t},Xo=(e,t,s,a)=>{if(e<a/2)return ue(e*2,0,s,a)*0.5+t;return te(e*2-a,0,s,a)*0.5+s*0.5+t},dp={linear:$o,easeInQuad:ko,easeOutQuad:So,easeInOutQuad:To,easeInCubic:No,easeOutCubic:Ao,easeInOutCubic:Io,easeInQuart:Do,easeOutQuart:Po,easeInOutQuart:Lo,easeInQuint:zo,easeOutQuint:Eo,easeInOutQuint:Oo,easeInSine:Mo,easeOutSine:Ro,easeInOutSine:qo,easeInExpo:Bo,easeOutExpo:jo,easeInOutExpo:Ho,easeInCirc:Wo,easeOutCirc:Vo,easeInOutCirc:_o,easeInElastic:Fo,easeOutElastic:Ko,easeInOutElastic:Go,easeInBack:Uo,easeOutBack:Yo,easeInOutBack:Jo,easeInBounce:ue,easeOutBounce:te,easeInOutBounce:Xo};function Zo(e,t={}){let{duration:s="1s",timing:a="ease",delay:o="0s",iteration:i="1",direction:r="normal",fill:n="both",playState:c="running"}=t;return`${e} ${s} ${a} ${o} ${i} ${r} ${n} ${c}`}function fe(e,t,s={}){e.style.animation=Zo(t,s)}function up(e){e.style.animation=""}function Qo(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function fp(e,t,s={}){let{stagger:a=100,...o}=s;e.forEach((i,r)=>{let n=`${r*a}ms`;fe(i,t,{...o,delay:n})})}async function hp(e,t){for(let s of t)fe(e,s.name,s.options),await Qo(e)}var bp={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function gp(e,t,s=1000){return new Promise((a)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),a()},s)})}function xp(e,t){let s=`
|
|
12
12
|
@keyframes ${e} {
|
|
13
13
|
${Object.entries(t).map(([o,i])=>{let r=Object.entries(i).map(([n,c])=>`${n}: ${c};`).join(" ");return`${o} { ${r} }`}).join(`
|
|
14
14
|
`)}
|
|
15
15
|
}
|
|
16
|
-
`,a=document.createElement("style");a.textContent=s,document.head.appendChild(a)}function ei(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:a=1000,easing:o="ease",delay:i=0,iterations:r=1,direction:n="normal",fill:c="both"}=s;return e.animate([...t],{duration:a,easing:o,delay:i,iterations:r,direction:n,fill:c})}var ti={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function vp(e,t,s={}){return ei(e,ti[t],s)}import{createHighlighter as si}from"ts-syntax-highlighter";var se=null;async function ai(){if(!se)se=await si({theme:"github-light"});return se}async function Cp(e,t={}){let{theme:s="auto",language:a="typescript",lineNumbers:o=!1,wrapLines:i=!0}=t,r=await ai(),n=s==="auto"?globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"github-dark":"github-light":s==="dark"?"github-dark":"github-light",c=await r.highlight(e,a);return{html:typeof c==="string"?c:String(c),language:a,theme:n}}function $p(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function kp(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var z=null,oi=(e)=>{return e===1?0:1};function G(e,t){return t.split(".").reduce((s,a)=>s?.[a],e)}function ae(e,t={}){return e.replace(/\{(\w+)\}/g,(s,a)=>{return t[a]!==void 0?String(t[a]):s})}function Tp(e){let{locale:t,fallbackLocale:s="en",messages:a,pluralRules:o={},dateTimeFormats:i={},numberFormats:r={},missing:n,warnMissing:c=!0}=e;function d(x,m={}){let C=G(a[t],x);if(C===void 0&&s)C=G(a[s],x);if(C===void 0){if(n){let N=n(t,x);if(N)return ae(N,m)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${x}" in locale "${t}"`);return x}if(typeof C==="string")return ae(C,m);return String(C)}function f(x,m,C={}){let N=d(x,{...C,count:m});if(N.includes("|")){let L=N.split("|").map((Z)=>Z.trim()),J=(o[t]||oi)(m,t),X=L[J]||L[L.length-1];return ae(X,{...C,count:m})}return N}function p(x,m="default"){let C=typeof x==="number"?new Date(x):x,N=i[m]||i.default||{};return new Intl.DateTimeFormat(t,N).format(C)}function g(x,m="default"){let C=r[m]||r.default||{};return new Intl.NumberFormat(t,C).format(x)}function h(x){if(G(a[t],x)!==void 0)return!0;if(s)return G(a[s],x)!==void 0;return!1}function w(x){if(!a[x]){console.warn(`[i18n] Locale "${x}" not found. Available locales: ${Object.keys(a).join(", ")}`);return}t=x}function v(x,m){if(!a[x])a[x]={};a[x]={...a[x],...m}}function k(x){delete a[x]}return{get locale(){return t},get availableLocales(){return Object.keys(a)},setLocale:w,t:d,tc:f,d:p,n:g,te:h,addMessages:v,removeLocale:k}}function Ip(e){z=e}function Np(){return z}function Ap(e,t){if(!z)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return z.t(e,t)}function Dp(e,t,s){if(!z)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return z.tc(e,t,s)}function zp(e,t){if(!z)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return z.d(e,t)}function Lp(e,t){if(!z)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return z.n(e,t)}var Pp={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},Ep={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},Op={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function Mp(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function Rp(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var qp={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function jp(e={}){let{max:t=10,ttl:s=0,include:a,exclude:o,hooks:i,debug:r=!1}=e,n=new Map,c=0,d=0;function f(...u){if(r)console.log("[KeepAlive]",...u)}function p(u){if(o){if(o instanceof RegExp&&o.test(u))return!1;if(Array.isArray(o)&&o.includes(u))return!1}if(a){if(a instanceof RegExp&&!a.test(u))return!1;if(Array.isArray(a)&&!a.includes(u))return!1}return!0}function g(u){if(!s||!u.expiresAt)return!1;return Date.now()>u.expiresAt}function h(u){let b=n.get(u);if(b)b.lastAccessedAt=Date.now(),b.accessCount++,b.instance.lastAccessedAt=b.lastAccessedAt,n.delete(u),n.set(u,b),f(`Touched: ${u} (access count: ${b.accessCount})`)}function w(){if(n.size===0)return!1;let u=n.keys().next().value;if(!u)return!1;let b=n.get(u);if(b){f(`Evicting LRU: ${u}`);let y=b.instance.hooks;if(y?.onDeactivate)y.onDeactivate(b.instance);if(i?.onDeactivate)i.onDeactivate(b.instance);return n.delete(u),!0}return!1}function v(u,b,y){if(!p(b.type))return f(`Type not cacheable: ${b.type}`),b;if(n.size>=t)w();let A=Date.now(),H={instance:{...b,hooks:y||b.hooks,createdAt:b.createdAt||A,lastAccessedAt:A},accessCount:0,createdAt:A,lastAccessedAt:A,expiresAt:s?A+s:void 0};if(n.set(u,H),f(`Cached: ${u} (size: ${n.size}/${t})`),y?.onMount)y.onMount(H.instance);if(i?.onMount)i.onMount(H.instance);return H.instance}function k(u){let b=n.get(u);if(!b)return d++,f(`Miss: ${u}`),null;if(g(b))return f(`Expired: ${u}`),n.delete(u),d++,null;return c++,h(u),f(`Hit: ${u}`),b.instance}function x(u){let b=n.get(u);if(!b)return!1;if(g(b))return n.delete(u),!1;return!0}function m(u){let b=n.get(u);if(!b)return!1;f(`Removing: ${u}`);let y=b.instance.hooks;if(y?.onUnmount)y.onUnmount(b.instance);if(i?.onUnmount)i.onUnmount(b.instance);return n.delete(u)}function C(){f("Clearing cache"),n.forEach((u)=>{let b=u.instance.hooks;if(b?.onUnmount)b.onUnmount(u.instance);if(i?.onUnmount)i.onUnmount(u.instance)}),n.clear(),c=0,d=0}function N(){let u=0,b=Date.now();for(let[y,A]of n.entries())if(g(A))f(`Pruning expired: ${y}`),m(y),u++;while(n.size>t)if(w())u++;else break;if(u>0)f(`Pruned ${u} entries`);return u}function L(u){let b=k(u);if(!b)return null;f(`Activating: ${u}`);let y=b.hooks;if(y?.onActivate)y.onActivate(b);if(i?.onActivate)i.onActivate(b);if(b.state&&y?.onRestore)y.onRestore(b,b.state);return b}function ie(u){let b=n.get(u);if(!b)return!1;f(`Deactivating: ${u}`);let y=b.instance,A=y.hooks;if(A?.onSave)y.state=A.onSave(y);if(A?.onDeactivate)A.onDeactivate(y);if(i?.onDeactivate)i.onDeactivate(y);return!0}function J(){let u=c+d;return{hits:c,misses:d,size:n.size,max:t,hitRate:u>0?c/u:0,keys:Array.from(n.keys())}}function X(){return Array.from(n.keys())}function Z(){return n.size}return{cache:v,get:k,has:x,remove:m,clear:C,prune:N,activate:L,deactivate:ie,getStats:J,keys:X,size:Z}}function Hp(e){let t=new Map;return{set(s,a){if(t.has(s))t.delete(s);if(t.set(s,a),t.size>e){let o=t.keys().next().value;if(o)t.delete(o)}},get(s){if(!t.has(s))return;let a=t.get(s);return t.delete(s),t.set(s,a),a},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function Wp(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function Vp(e,t={}){let{maxSize:s=100,reset:a}=t,o=[];return{acquire(){if(o.length>0)return o.pop();return e()},release(i){if(o.length<s){if(a)a(i);o.push(i)}},clear(){o.length=0},get size(){return o.length},get maxSize(){return s}}}var E=new Map;async function U(e,t){let s=t||e.toString();if(E.has(s))return E.get(s);let a=e();E.set(s,a);try{return await a}catch(o){throw E.delete(s),o}}function Fp(e,t={}){let{retryAttempts:s=3,retryDelay:a=1000,onLoading:o,onLoaded:i,onError:r}=t,n="idle",c,d,f=async(p=0)=>{try{if(n==="loading"||n==="loaded"){if(c)return c}n="loading",o?.();let g=await U(e);return c=g,n="loaded",i?.(g),g}catch(g){let h=g;if(p<s)return await new Promise((w)=>setTimeout(w,a*(p+1))),f(p+1);throw n="error",d=h,r?.(h),h}};return{get state(){return n},get module(){return c},get error(){return d},load:()=>f(),preload:()=>f()}}function ii(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:a=null,rootMargin:o="0px",threshold:i=0.01,placeholder:r,errorContent:n,onLoading:c,onLoaded:d,onError:f}=s,p=!1,g=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return g=new IntersectionObserver(async(w)=>{for(let v of w)if(v.isIntersecting&&!p){p=!0,g?.disconnect();try{c?.();let k=await U(t);if(d?.(k),k&&typeof k.default?.render==="function"){let x=await k.default.render();e.innerHTML=x}}catch(k){let x=k;if(f?.(x),n)if(typeof n==="string")e.innerHTML=n;else e.innerHTML="",e.appendChild(n);else e.innerHTML=`<div style="color: red;">Failed to load component: ${x.message}</div>`}}},{root:a,rootMargin:o,threshold:i}),g.observe(e),()=>{g?.disconnect(),g=null}}function Kp(e,t,s={}){let a=[],o=Array.from(e);for(let i of o){let r=typeof t==="function"&&t.length>0?()=>t(i):t,n=ii(i,r,s);a.push(n)}return()=>{a.forEach((i)=>i())}}function ri(e){return U(e)}function Gp(e){return Promise.all(e.map((t)=>ri(t)))}function Up(e){if(e)E.delete(e);else E.clear()}function Yp(){return{size:E.size,keys:Array.from(E.keys())}}function Jp(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return U(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function ni(e,t,s={}){if(!e)return()=>{};let{root:a=null,rootMargin:o="50px",threshold:i=0.01,placeholder:r,onLoading:n,onLoaded:c,onError:d}=s;if(r&&typeof r==="string")e.src=r;let f=!1,p=null;return p=new IntersectionObserver((h)=>{for(let w of h)if(w.isIntersecting&&!f)f=!0,p?.disconnect(),n?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(v)=>{let k=Error(`Failed to load image: ${t}`);d?.(k),e.classList.add("error")},{once:!0})},{root:a,rootMargin:o,threshold:i}),p.observe(e),()=>{p?.disconnect(),p=null}}function Xp(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),a=[];return s.forEach((o)=>{let i=o.getAttribute("data-lazy-src");if(i){let r=ni(o,i,t);a.push(r)}}),()=>{a.forEach((o)=>o())}}var oe={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function he(e,t){let s={...e};for(let a in t)if(t[a]instanceof Object&&a in e)s[a]=he(e[a],t[a]);else s[a]=t[a];return s}function j(e){return he(oe,e)}var Y=oe;function Qp(){return Y}function li(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,a])=>{if(a)t.push(`--color-${s}: ${a};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,a])=>{if(a)t.push(`--font-${s}: ${a};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,a])=>{if(a)t.push(`--text-${s}: ${a};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,a])=>{if(a)t.push(`--font-weight-${s}: ${a};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,a])=>{if(a)t.push(`--leading-${s}: ${a};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,a])=>{if(a)t.push(`--spacing-${s}: ${a};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,a])=>{if(a)t.push(`--radius-${s}: ${a};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,a])=>{if(a)t.push(`--shadow-${s}: ${a};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,a])=>{if(a)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,a])=>{if(a)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,a])=>{if(a)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});return`:root {
|
|
16
|
+
`,a=document.createElement("style");a.textContent=s,document.head.appendChild(a)}function ei(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:a=1000,easing:o="ease",delay:i=0,iterations:r=1,direction:n="normal",fill:c="both"}=s;return e.animate([...t],{duration:a,easing:o,delay:i,iterations:r,direction:n,fill:c})}var ti={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function vp(e,t,s={}){return ei(e,ti[t],s)}import{createHighlighter as si}from"ts-syntax-highlighter";var se=null;async function ai(){if(!se)se=await si({theme:"github-light"});return se}async function Cp(e,t={}){let{theme:s="auto",language:a="typescript",lineNumbers:o=!1,wrapLines:i=!0}=t,r=await ai(),n=s==="auto"?globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"github-dark":"github-light":s==="dark"?"github-dark":"github-light",c=await r.highlight(e,a);return{html:typeof c==="string"?c:String(c),language:a,theme:n}}function $p(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function kp(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var P=null,oi=(e)=>{return e===1?0:1};function G(e,t){return t.split(".").reduce((s,a)=>s?.[a],e)}function ae(e,t={}){return e.replace(/\{(\w+)\}/g,(s,a)=>{return t[a]!==void 0?String(t[a]):s})}function Tp(e){let{locale:t,fallbackLocale:s="en",messages:a,pluralRules:o={},dateTimeFormats:i={},numberFormats:r={},missing:n,warnMissing:c=!0}=e;function d(x,m={}){let C=G(a[t],x);if(C===void 0&&s)C=G(a[s],x);if(C===void 0){if(n){let A=n(t,x);if(A)return ae(A,m)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${x}" in locale "${t}"`);return x}if(typeof C==="string")return ae(C,m);return String(C)}function f(x,m,C={}){let A=d(x,{...C,count:m});if(A.includes("|")){let L=A.split("|").map((Z)=>Z.trim()),J=(o[t]||oi)(m,t),X=L[J]||L[L.length-1];return ae(X,{...C,count:m})}return A}function p(x,m="default"){let C=typeof x==="number"?new Date(x):x,A=i[m]||i.default||{};return new Intl.DateTimeFormat(t,A).format(C)}function g(x,m="default"){let C=r[m]||r.default||{};return new Intl.NumberFormat(t,C).format(x)}function h(x){if(G(a[t],x)!==void 0)return!0;if(s)return G(a[s],x)!==void 0;return!1}function w(x){if(!a[x]){console.warn(`[i18n] Locale "${x}" not found. Available locales: ${Object.keys(a).join(", ")}`);return}t=x}function v(x,m){if(!a[x])a[x]={};a[x]={...a[x],...m}}function k(x){delete a[x]}return{get locale(){return t},get availableLocales(){return Object.keys(a)},setLocale:w,t:d,tc:f,d:p,n:g,te:h,addMessages:v,removeLocale:k}}function Np(e){P=e}function Ap(){return P}function Ip(e,t){if(!P)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return P.t(e,t)}function Dp(e,t,s){if(!P)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return P.tc(e,t,s)}function Pp(e,t){if(!P)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return P.d(e,t)}function Lp(e,t){if(!P)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return P.n(e,t)}var zp={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},Ep={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},Op={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function Mp(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function Rp(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var qp={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function jp(e={}){let{max:t=10,ttl:s=0,include:a,exclude:o,hooks:i,debug:r=!1}=e,n=new Map,c=0,d=0;function f(...u){if(r)console.log("[KeepAlive]",...u)}function p(u){if(o){if(o instanceof RegExp&&o.test(u))return!1;if(Array.isArray(o)&&o.includes(u))return!1}if(a){if(a instanceof RegExp&&!a.test(u))return!1;if(Array.isArray(a)&&!a.includes(u))return!1}return!0}function g(u){if(!s||!u.expiresAt)return!1;return Date.now()>u.expiresAt}function h(u){let b=n.get(u);if(b)b.lastAccessedAt=Date.now(),b.accessCount++,b.instance.lastAccessedAt=b.lastAccessedAt,n.delete(u),n.set(u,b),f(`Touched: ${u} (access count: ${b.accessCount})`)}function w(){if(n.size===0)return!1;let u=n.keys().next().value;if(!u)return!1;let b=n.get(u);if(b){f(`Evicting LRU: ${u}`);let y=b.instance.hooks;if(y?.onDeactivate)y.onDeactivate(b.instance);if(i?.onDeactivate)i.onDeactivate(b.instance);return n.delete(u),!0}return!1}function v(u,b,y){if(!p(b.type))return f(`Type not cacheable: ${b.type}`),b;if(n.size>=t)w();let I=Date.now(),H={instance:{...b,hooks:y||b.hooks,createdAt:b.createdAt||I,lastAccessedAt:I},accessCount:0,createdAt:I,lastAccessedAt:I,expiresAt:s?I+s:void 0};if(n.set(u,H),f(`Cached: ${u} (size: ${n.size}/${t})`),y?.onMount)y.onMount(H.instance);if(i?.onMount)i.onMount(H.instance);return H.instance}function k(u){let b=n.get(u);if(!b)return d++,f(`Miss: ${u}`),null;if(g(b))return f(`Expired: ${u}`),n.delete(u),d++,null;return c++,h(u),f(`Hit: ${u}`),b.instance}function x(u){let b=n.get(u);if(!b)return!1;if(g(b))return n.delete(u),!1;return!0}function m(u){let b=n.get(u);if(!b)return!1;f(`Removing: ${u}`);let y=b.instance.hooks;if(y?.onUnmount)y.onUnmount(b.instance);if(i?.onUnmount)i.onUnmount(b.instance);return n.delete(u)}function C(){f("Clearing cache"),n.forEach((u)=>{let b=u.instance.hooks;if(b?.onUnmount)b.onUnmount(u.instance);if(i?.onUnmount)i.onUnmount(u.instance)}),n.clear(),c=0,d=0}function A(){let u=0,b=Date.now();for(let[y,I]of n.entries())if(g(I))f(`Pruning expired: ${y}`),m(y),u++;while(n.size>t)if(w())u++;else break;if(u>0)f(`Pruned ${u} entries`);return u}function L(u){let b=k(u);if(!b)return null;f(`Activating: ${u}`);let y=b.hooks;if(y?.onActivate)y.onActivate(b);if(i?.onActivate)i.onActivate(b);if(b.state&&y?.onRestore)y.onRestore(b,b.state);return b}function ie(u){let b=n.get(u);if(!b)return!1;f(`Deactivating: ${u}`);let y=b.instance,I=y.hooks;if(I?.onSave)y.state=I.onSave(y);if(I?.onDeactivate)I.onDeactivate(y);if(i?.onDeactivate)i.onDeactivate(y);return!0}function J(){let u=c+d;return{hits:c,misses:d,size:n.size,max:t,hitRate:u>0?c/u:0,keys:Array.from(n.keys())}}function X(){return Array.from(n.keys())}function Z(){return n.size}return{cache:v,get:k,has:x,remove:m,clear:C,prune:A,activate:L,deactivate:ie,getStats:J,keys:X,size:Z}}function Hp(e){let t=new Map;return{set(s,a){if(t.has(s))t.delete(s);if(t.set(s,a),t.size>e){let o=t.keys().next().value;if(o)t.delete(o)}},get(s){if(!t.has(s))return;let a=t.get(s);return t.delete(s),t.set(s,a),a},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function Wp(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function Vp(e,t={}){let{maxSize:s=100,reset:a}=t,o=[];return{acquire(){if(o.length>0)return o.pop();return e()},release(i){if(o.length<s){if(a)a(i);o.push(i)}},clear(){o.length=0},get size(){return o.length},get maxSize(){return s}}}var E=new Map;async function U(e,t){let s=t||e.toString();if(E.has(s))return E.get(s);let a=e();E.set(s,a);try{return await a}catch(o){throw E.delete(s),o}}function Fp(e,t={}){let{retryAttempts:s=3,retryDelay:a=1000,onLoading:o,onLoaded:i,onError:r}=t,n="idle",c,d,f=async(p=0)=>{try{if(n==="loading"||n==="loaded"){if(c)return c}n="loading",o?.();let g=await U(e);return c=g,n="loaded",i?.(g),g}catch(g){let h=g;if(p<s)return await new Promise((w)=>setTimeout(w,a*(p+1))),f(p+1);throw n="error",d=h,r?.(h),h}};return{get state(){return n},get module(){return c},get error(){return d},load:()=>f(),preload:()=>f()}}function ii(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:a=null,rootMargin:o="0px",threshold:i=0.01,placeholder:r,errorContent:n,onLoading:c,onLoaded:d,onError:f}=s,p=!1,g=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return g=new IntersectionObserver(async(w)=>{for(let v of w)if(v.isIntersecting&&!p){p=!0,g?.disconnect();try{c?.();let k=await U(t);if(d?.(k),k&&typeof k.default?.render==="function"){let x=await k.default.render();e.innerHTML=x}}catch(k){let x=k;if(f?.(x),n)if(typeof n==="string")e.innerHTML=n;else e.innerHTML="",e.appendChild(n);else e.innerHTML=`<div style="color: red;">Failed to load component: ${x.message}</div>`}}},{root:a,rootMargin:o,threshold:i}),g.observe(e),()=>{g?.disconnect(),g=null}}function Kp(e,t,s={}){let a=[],o=Array.from(e);for(let i of o){let r=typeof t==="function"&&t.length>0?()=>t(i):t,n=ii(i,r,s);a.push(n)}return()=>{a.forEach((i)=>i())}}function ri(e){return U(e)}function Gp(e){return Promise.all(e.map((t)=>ri(t)))}function Up(e){if(e)E.delete(e);else E.clear()}function Yp(){return{size:E.size,keys:Array.from(E.keys())}}function Jp(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return U(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function ni(e,t,s={}){if(!e)return()=>{};let{root:a=null,rootMargin:o="50px",threshold:i=0.01,placeholder:r,onLoading:n,onLoaded:c,onError:d}=s;if(r&&typeof r==="string")e.src=r;let f=!1,p=null;return p=new IntersectionObserver((h)=>{for(let w of h)if(w.isIntersecting&&!f)f=!0,p?.disconnect(),n?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(v)=>{let k=Error(`Failed to load image: ${t}`);d?.(k),e.classList.add("error")},{once:!0})},{root:a,rootMargin:o,threshold:i}),p.observe(e),()=>{p?.disconnect(),p=null}}function Xp(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),a=[];return s.forEach((o)=>{let i=o.getAttribute("data-lazy-src");if(i){let r=ni(o,i,t);a.push(r)}}),()=>{a.forEach((o)=>o())}}var oe={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function he(e,t){let s={...e};for(let a in t)if(t[a]instanceof Object&&a in e)s[a]=he(e[a],t[a]);else s[a]=t[a];return s}function j(e){return he(oe,e)}var Y=oe;function Qp(){return Y}function li(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,a])=>{if(a)t.push(`--color-${s}: ${a};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,a])=>{if(a)t.push(`--font-${s}: ${a};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,a])=>{if(a)t.push(`--text-${s}: ${a};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,a])=>{if(a)t.push(`--font-weight-${s}: ${a};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,a])=>{if(a)t.push(`--leading-${s}: ${a};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,a])=>{if(a)t.push(`--spacing-${s}: ${a};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,a])=>{if(a)t.push(`--radius-${s}: ${a};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,a])=>{if(a)t.push(`--shadow-${s}: ${a};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,a])=>{if(a)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,a])=>{if(a)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,a])=>{if(a)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${a};`)});return`:root {
|
|
17
17
|
${t.join(`
|
|
18
18
|
`)}
|
|
19
|
-
}`}function eu(e,t){if(Y=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([a,o])=>{if(o)s.style.setProperty(`--color-${a}`,o)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([a,o])=>{if(o)s.style.setProperty(`--font-${a}`,o)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([a,o])=>{if(o)s.style.setProperty(`--text-${a}`,o)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([a,o])=>{if(o)s.style.setProperty(`--font-weight-${a}`,o)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([a,o])=>{if(o)s.style.setProperty(`--leading-${a}`,o)});if(e.spacing)Object.entries(e.spacing).forEach(([a,o])=>{if(o)s.style.setProperty(`--spacing-${a}`,o)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([a,o])=>{if(o)s.style.setProperty(`--radius-${a}`,o)});if(e.shadows)Object.entries(e.shadows).forEach(([a,o])=>{if(o)s.style.setProperty(`--shadow-${a}`,o)});if(e.components?.button)Object.entries(e.components.button).forEach(([a,o])=>{if(o)s.style.setProperty(`--button-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,o)});if(e.components?.input)Object.entries(e.components.input).forEach(([a,o])=>{if(o)s.style.setProperty(`--input-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,o)});if(e.components?.card)Object.entries(e.components.card).forEach(([a,o])=>{if(o)s.style.setProperty(`--card-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,o)})}function tu(){return Y}function su(e){let t=e.split("."),s=Y;for(let a of t)if(s&&typeof s==="object"&&a in s)s=s[a];else return;return s}var au={default:oe,purple:j({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:j({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:j({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:j({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:j({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function ou(e){return li(e)}export{ne as wrapErrorHandler,vr as warnProp,Ve as warn,Qo as waitForAnimation,Tr as validateVariant,Bn as validateTextInputProps,
|
|
19
|
+
}`}function eu(e,t){if(Y=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([a,o])=>{if(o)s.style.setProperty(`--color-${a}`,o)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([a,o])=>{if(o)s.style.setProperty(`--font-${a}`,o)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([a,o])=>{if(o)s.style.setProperty(`--text-${a}`,o)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([a,o])=>{if(o)s.style.setProperty(`--font-weight-${a}`,o)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([a,o])=>{if(o)s.style.setProperty(`--leading-${a}`,o)});if(e.spacing)Object.entries(e.spacing).forEach(([a,o])=>{if(o)s.style.setProperty(`--spacing-${a}`,o)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([a,o])=>{if(o)s.style.setProperty(`--radius-${a}`,o)});if(e.shadows)Object.entries(e.shadows).forEach(([a,o])=>{if(o)s.style.setProperty(`--shadow-${a}`,o)});if(e.components?.button)Object.entries(e.components.button).forEach(([a,o])=>{if(o)s.style.setProperty(`--button-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,o)});if(e.components?.input)Object.entries(e.components.input).forEach(([a,o])=>{if(o)s.style.setProperty(`--input-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,o)});if(e.components?.card)Object.entries(e.components.card).forEach(([a,o])=>{if(o)s.style.setProperty(`--card-${a.replace(/([A-Z])/g,"-$1").toLowerCase()}`,o)})}function tu(){return Y}function su(e){let t=e.split("."),s=Y;for(let a of t)if(s&&typeof s==="object"&&a in s)s=s[a];else return;return s}var au={default:oe,purple:j({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:j({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:j({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:j({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:j({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function ou(e){return li(e)}export{ne as wrapErrorHandler,vr as warnProp,Ve as warn,Qo as waitForAnimation,Tr as validateVariant,Bn as validateTextInputProps,Nr as validateSize,Vn as validateSearchInputProps,Fe as validateProps,Hn as validatePasswordInputProps,Wn as validateNumberInputProps,Nn as validateFormProps,jn as validateEmailInputProps,kr as validateButtonProps,lp as validateAriaRelationships,tu as useTheme,mi as useSEO,Ei as usePrefersReducedMotion,R as useMediaQuery,Ai as useLocalStorage,Si as useKeyboard,Pi as useIsMobile,Li as useIsDesktop,zi as useIsDarkMode,$i as useFocusTrap,gi as useDarkMode,fi as useCopyCode,yi as useClickOutside,Di as useBreakpoint,qi as themeVariableNames,li as themeToCSSProperties,au as themePresets,Xt as textInputPropSchema,Dp as tc,Ip as t,Ri as stxThemePreset,sd as storage,fp as staggerAnimation,Nc as spaceWashGradient,za as spaceTintVars,Dc as spaceTintPayload,Ic as spaceIndexOf,le as sidebarThemes,we as setTitle,S as setMeta,ye as setLink,Np as setI18n,pr as setErrorHandler,hp as sequenceAnimations,La as resolveSpaceTint,$c as resolveSidebarTheme,kc as resolveIconColor,up as removeAnimation,Gp as preloadModules,ri as preloadModule,op as prefersReducedMotion,ip as prefersHighContrast,zp as pluralRules,Zt as numberInputPropSchema,Op as numberFormats,Ac as normalizeSpaces,Ea as normalizeSpace,Lp as n,ep as moveFocus,F as macosColors,Rp as loadLocaleMessages,$o as linear,U as lazyLoadModule,Xp as lazyLoadImages,ni as lazyLoadImage,Fp as lazyLoadComponent,Kp as lazyLoadAll,ii as lazyLoad,tp as isVisibleToScreenReader,Mp as isRTL,Cp as highlight,Qd as hasFocus,V as handleError,su as getThemeValue,Qp as getTheme,ve as getSystemTheme,Ap as getI18n,ai as getHighlighter,ee as getFocusableElements,Q as getEffectiveTheme,rp as getColorSchemePreference,Yp as getCacheStats,ou as generateThemeCSS,vi as generateSEOTags,pe as generateId,Rt as formPropSchema,br as errorBoundary,Ro as easeOutSine,Eo as easeOutQuint,Po as easeOutQuart,So as easeOutQuad,jo as easeOutExpo,Ko as easeOutElastic,Ao as easeOutCubic,Vo as easeOutCirc,te as easeOutBounce,Yo as easeOutBack,Mo as easeInSine,zo as easeInQuint,Do as easeInQuart,ko as easeInQuad,qo as easeInOutSine,Oo as easeInOutQuint,Lo as easeInOutQuart,To as easeInOutQuad,Ho as easeInOutExpo,Go as easeInOutElastic,Io as easeInOutCubic,_o as easeInOutCirc,Xo as easeInOutBounce,Jo as easeInOutBack,Bo as easeInExpo,Fo as easeInElastic,No as easeInCubic,Wo as easeInCirc,ue as easeInBounce,Uo as easeInBack,fr as devAssert,$p as detectLanguage,ce as deriveSpaceTint,oe as defaultTheme,Ep as dateTimeFormats,Pp as d,Zo as cssAnimation,j as createTheme,ad as createStorage,Wp as createStateManager,np as createSkipLink,ap as createScreenReaderText,Sr as createSafeClickHandler,Xd as createRovingTabindex,Jp as createRouteLoader,D as createPropValidator,Hp as createLRUCache,xp as createKeyframes,ei as createKeyframeAnimation,jp as createKeepAlive,Tp as createI18n,Jd as createFocusTrap,hr as createDebugger,Vp as createComponentPool,Gd as createAriaLabel,Ud as createAriaDescription,hi as copyToClipboard,qp as componentMessages,Up as clearModuleCache,ur as clearErrorHandler,Ue as buttonPropSchema,mr as assertProp,We as assert,sp as aria,eu as applyTheme,kp as applyHeadwindClasses,fe as applyAnimation,Yd as announceToScreenReader,gp as animateWithClass,vp as animate,yo as VirtualTable,vo as VirtualList,xo as Video,Ee as TwoFactorChallenge,bo as Transition,fo as Tooltip,po as Textarea,Yt as TextInput,lo as Teleport,ro as Tabs,so as TableRow,eo as TableHeader,Za as TableHead,Ja as TableCell,Ua as TableBody,Ka as Table,oo as TabPanel,ks as TabBarItem,Cs as TabBar,re as THEMED_FAMILIES,_a as Switch,qs as SubscriptionCheckout,K as StorageManager,Wa as StepperStep,ja as Stepper,qa as Spinner,Ma as Skeleton,Le as Signup,Ca as SidebarSpaces,ka as SidebarSpaceSwitcher,wa as SidebarSpace,ma as SidebarSection,ga as SidebarPinned,ha as SidebarItem,ua as SidebarHeader,da as SidebarFooter,la as Sidebar,ra as Select,ws as SectionCard,Gt as SearchInput,Mi as SHADE_VAR_PREFIX,oa as RadioGroupOption,sa as RadioGroupLabel,ea as RadioGroupDescription,Zs as RadioGroup,Js as Radio,l as PropTypes,Us as Progress,Ks as Portal,_s as PopoverPanel,Ws as PopoverButton,js as Popover,Ms as PaymentMethods,Ft as PasswordInput,Ds as Pagination,Vt as NumberInput,As as Notification,Ts as Navigator,ms as NavBar,De as Login,ds as ListboxOptions,ls as ListboxOption,rs as ListboxLabel,os as ListboxButton,ss as Listbox,gs as ListRow,ti as KeyframeAnimations,Ti as KeyboardShortcuts,Zd as KeyboardKeys,me as Installation,Bt as Image,xe as Hero,Mt as Form,ge as Footer,hs as FilterChips,us as FilterChip,M as ErrorTypes,Ht as EmailInput,dp as Easing,Et as DropdownItems,Lt as DropdownItem,Dt as DropdownButton,At as Dropdown,Tt as Drawer,kt as DialogTitle,Ct as DialogPanel,wt as DialogDescription,mt as DialogBackdrop,gt as Dialog,Es as DefaultPaymentMethod,N as ComponentError,ht as CommandPaletteItem,ut as CommandPalette,dt as ComboboxOptions,lt as ComboboxOption,rt as ComboboxInput,ot as ComboboxButton,st as Combobox,be as CodeBlock,Ls as Checkout,et as Checkbox,Ze as Card,Je as Calendar,Ge as Button,q as Breakpoints,je as Breadcrumb,qe as Badge,Me as Avatar,Ae as Audio,bp as AnimationClasses,Te as AccordionItem,ke as Accordion};
|
package/dist/ui/image/index.d.ts
CHANGED
|
@@ -8,12 +8,13 @@ export declare interface ImageProps {
|
|
|
8
8
|
width?: number | string
|
|
9
9
|
height?: number | string
|
|
10
10
|
lazy?: boolean
|
|
11
|
+
priority?: boolean
|
|
12
|
+
decoding?: 'async' | 'sync' | 'auto'
|
|
13
|
+
fetchpriority?: 'high' | 'low' | 'auto'
|
|
11
14
|
placeholder?: string
|
|
12
|
-
|
|
13
|
-
onLoad?: (event: Event) => void
|
|
14
|
-
onError?: (event: Event) => void
|
|
15
|
-
aspectRatio?: number
|
|
15
|
+
aspectRatio?: number | string
|
|
16
16
|
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
|
|
17
|
+
objectPosition?: string
|
|
17
18
|
rounded?: boolean | 'full' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
|
|
18
19
|
zoomOnHover?: boolean
|
|
19
20
|
className?: string
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.227",
|
|
5
5
|
"description": "A modern component library built with STX, featuring headwind utility classes and TypeScript syntax highlighting.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@iconify-json/f7": "^1.2.2",
|
|
66
66
|
"@cwcss/crosswind": "^0.2.14",
|
|
67
|
-
"@stacksjs/stx": "0.2.
|
|
68
|
-
"bun-plugin-stx": "0.2.
|
|
67
|
+
"@stacksjs/stx": "0.2.227",
|
|
68
|
+
"bun-plugin-stx": "0.2.227",
|
|
69
69
|
"ts-syntax-highlighter": "^0.2.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
package/src/ui/image/Image.stx
CHANGED
|
@@ -7,159 +7,116 @@ export const webpSrcSet = $props.webpSrcSet || ''
|
|
|
7
7
|
export const alt = $props.alt || ''
|
|
8
8
|
export const width = $props.width
|
|
9
9
|
export const height = $props.height
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
10
|
+
export const priority = $props.priority || false
|
|
11
|
+
export const lazy = priority ? false : ($props.lazy ?? true)
|
|
12
|
+
export const decoding = $props.decoding || 'async'
|
|
13
|
+
export const fetchpriority = priority ? 'high' : ($props.fetchpriority || 'auto')
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A CSS value painted behind the image while it arrives - a colour, a
|
|
17
|
+
* gradient, or `url("data:image/...")` for a low-quality preview. Anything
|
|
18
|
+
* `background` accepts.
|
|
19
|
+
*
|
|
20
|
+
* Behind, not on the image itself: a background set on an `<img>` shows
|
|
21
|
+
* through anything transparent in it and stays there once it has loaded,
|
|
22
|
+
* which is a permanent artefact on every PNG with an alpha channel.
|
|
23
|
+
*/
|
|
24
|
+
export const placeholder = $props.placeholder || ''
|
|
13
25
|
export const aspectRatio = $props.aspectRatio
|
|
14
26
|
export const objectFit = $props.objectFit || 'cover'
|
|
27
|
+
export const objectPosition = $props.objectPosition || 'center'
|
|
15
28
|
export const rounded = $props.rounded ?? false
|
|
16
29
|
export const zoomOnHover = $props.zoomOnHover || false
|
|
17
30
|
export const className = $props.className || ''
|
|
18
31
|
|
|
19
32
|
export const hasWebP = !!(webpSrc || webpSrcSet)
|
|
20
33
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
const RADII = {
|
|
35
|
+
true: '0.5rem',
|
|
36
|
+
full: '9999px',
|
|
37
|
+
sm: '0.125rem',
|
|
38
|
+
md: '0.375rem',
|
|
39
|
+
lg: '0.5rem',
|
|
40
|
+
xl: '0.75rem',
|
|
41
|
+
'2xl': '1rem',
|
|
27
42
|
}
|
|
28
43
|
|
|
29
|
-
const
|
|
30
|
-
const zoomClasses = zoomOnHover ? 'transform hover:scale-110 transition-transform duration-300 ease-in-out cursor-zoom-in' : ''
|
|
31
|
-
|
|
32
|
-
export const containerClasses = `relative overflow-hidden ${roundedClass} ${className}`.trim()
|
|
33
|
-
export const imageClasses = `w-full h-full transition-opacity duration-300 ${objectFitClasses[objectFit]} ${zoomClasses}`.trim()
|
|
34
|
-
export const blurPlaceholderClasses = `absolute inset-0 ${roundedClass} filter blur-lg scale-110`.trim()
|
|
35
|
-
export const containerStyle = aspectRatio ? `padding-bottom: ${(1 / aspectRatio) * 100}%` : ''
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<script client>
|
|
39
|
-
const emit = defineEmits()
|
|
40
|
-
const lazy = {{ lazy }}
|
|
41
|
-
const realSrc = {{ src }}
|
|
42
|
-
const realSrcSet = {{ srcSet }}
|
|
43
|
-
const errorPlaceholder = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"%3E%3Crect fill="%23e5e7eb" width="400" height="300"/%3E%3Ctext x="50%25" y="50%25" fill="%239ca3af" font-size="16" text-anchor="middle" dominant-baseline="middle"%3EImage not found%3C/text%3E%3C/svg%3E'
|
|
44
|
-
|
|
45
|
-
function onImageLoad(event) {
|
|
46
|
-
const img = event.target
|
|
47
|
-
img.classList.remove('opacity-0')
|
|
48
|
-
img.classList.add('opacity-100')
|
|
49
|
-
emit('load', event)
|
|
50
|
-
}
|
|
44
|
+
const radius = rounded ? (RADII[String(rounded)] || RADII.true) : ''
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Styles inline rather than as utility classes.
|
|
48
|
+
*
|
|
49
|
+
* This component ships in a library and renders inside applications that do
|
|
50
|
+
* not necessarily use a utility CSS framework - and even where one is present,
|
|
51
|
+
* its scanner has to be pointed at `node_modules` to see class names written
|
|
52
|
+
* here, which is not the default anywhere. It previously emitted `relative`,
|
|
53
|
+
* `block`, `overflow-hidden`, `h-full`, `w-full` and `bg-stone-100`, and in an
|
|
54
|
+
* app whose scanner never saw this file not one of those rules existed: every
|
|
55
|
+
* image rendered at its intrinsic size inside an unstyled wrapper.
|
|
56
|
+
*
|
|
57
|
+
* Width and height at 100% make the wrapper transparent to layout. Against a
|
|
58
|
+
* parent with a definite height it passes that height down; against one
|
|
59
|
+
* without, it resolves to `auto` and the image's own ratio decides. Both
|
|
60
|
+
* matter, because a stylesheet may size either the box or the image.
|
|
61
|
+
*/
|
|
62
|
+
export const frameStyle = [
|
|
63
|
+
'position: relative',
|
|
64
|
+
'display: block',
|
|
65
|
+
'width: 100%',
|
|
66
|
+
'height: 100%',
|
|
67
|
+
'overflow: hidden',
|
|
68
|
+
/*
|
|
69
|
+
* Only when asked for. Deriving a ratio from the intrinsic width and height
|
|
70
|
+
* looks like free layout stability and is really an override: an app that
|
|
71
|
+
* sets its own crop in CSS finds this silently winning, and its images come
|
|
72
|
+
* out the wrong shape. `width` and `height` on the <img> already reserve
|
|
73
|
+
* the right space wherever CSS says nothing.
|
|
74
|
+
*/
|
|
75
|
+
aspectRatio ? `aspect-ratio: ${aspectRatio}` : '',
|
|
76
|
+
radius ? `border-radius: ${radius}` : '',
|
|
77
|
+
placeholder ? `background: ${placeholder} center / cover no-repeat` : '',
|
|
78
|
+
].filter(Boolean).join('; ')
|
|
57
79
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const dataSrc = img.getAttribute('data-src')
|
|
68
|
-
const dataSrcSet = img.getAttribute('data-srcset')
|
|
69
|
-
if (!dataSrc) continue
|
|
70
|
-
const probe = new Image()
|
|
71
|
-
probe.onload = () => {
|
|
72
|
-
img.src = dataSrc
|
|
73
|
-
if (dataSrcSet) img.srcset = dataSrcSet
|
|
74
|
-
img.classList.remove('opacity-0')
|
|
75
|
-
img.classList.add('opacity-100')
|
|
76
|
-
obs.unobserve(img)
|
|
77
|
-
}
|
|
78
|
-
probe.onerror = () => {
|
|
79
|
-
onImageError({ target: img })
|
|
80
|
-
obs.unobserve(img)
|
|
81
|
-
}
|
|
82
|
-
probe.src = dataSrc
|
|
83
|
-
if (dataSrcSet) probe.srcset = dataSrcSet
|
|
84
|
-
}
|
|
85
|
-
}, { rootMargin: '50px' })
|
|
86
|
-
for (const img of lazyImages) observer.observe(img)
|
|
87
|
-
})
|
|
80
|
+
export const imageStyle = [
|
|
81
|
+
'display: block',
|
|
82
|
+
'width: 100%',
|
|
83
|
+
'height: 100%',
|
|
84
|
+
`object-fit: ${objectFit}`,
|
|
85
|
+
`object-position: ${objectPosition}`,
|
|
86
|
+
radius ? `border-radius: ${radius}` : '',
|
|
87
|
+
zoomOnHover ? 'transition: transform 0.3s ease-in-out' : '',
|
|
88
|
+
].filter(Boolean).join('; ')
|
|
88
89
|
</script>
|
|
89
90
|
|
|
90
|
-
<
|
|
91
|
-
@if(
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
<picture class="{{ className }}" style="{{ frameStyle }}">
|
|
92
|
+
@if(hasWebP)
|
|
93
|
+
<source
|
|
94
|
+
type="image/webp"
|
|
95
|
+
@if(webpSrcSet)srcset="{{ webpSrcSet }}"@endif
|
|
96
|
+
@if(webpSrc && !webpSrcSet)srcset="{{ webpSrc }}"@endif
|
|
97
|
+
@if(sizes)sizes="{{ sizes }}"@endif
|
|
97
98
|
/>
|
|
98
99
|
@endif
|
|
100
|
+
{{--
|
|
101
|
+
One <img>, always carrying its real `src`.
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
@error="onImageError($event)"
|
|
121
|
-
/>
|
|
122
|
-
@else
|
|
123
|
-
<img
|
|
124
|
-
src="{{ src }}"
|
|
125
|
-
@if(srcSet)srcset="{{ srcSet }}"@endif
|
|
126
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
127
|
-
alt="{{ alt }}"
|
|
128
|
-
class="{{ imageClasses }}"
|
|
129
|
-
width="{{ width }}"
|
|
130
|
-
height="{{ height }}"
|
|
131
|
-
@load="onImageLoad($event)"
|
|
132
|
-
@error="onImageError($event)"
|
|
133
|
-
/>
|
|
134
|
-
@endif
|
|
135
|
-
</picture>
|
|
136
|
-
@else
|
|
137
|
-
@if(lazy)
|
|
138
|
-
<img
|
|
139
|
-
src="{{ placeholder }}"
|
|
140
|
-
data-src="{{ src }}"
|
|
141
|
-
@if(srcSet)data-srcset="{{ srcSet }}"@endif
|
|
142
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
143
|
-
alt="{{ alt }}"
|
|
144
|
-
class="{{ imageClasses }} lazy-image opacity-0"
|
|
145
|
-
width="{{ width }}"
|
|
146
|
-
height="{{ height }}"
|
|
147
|
-
loading="lazy"
|
|
148
|
-
@load="onImageLoad($event)"
|
|
149
|
-
@error="onImageError($event)"
|
|
150
|
-
/>
|
|
151
|
-
@else
|
|
152
|
-
<img
|
|
153
|
-
src="{{ src }}"
|
|
154
|
-
@if(srcSet)srcset="{{ srcSet }}"@endif
|
|
155
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
156
|
-
alt="{{ alt }}"
|
|
157
|
-
class="{{ imageClasses }}"
|
|
158
|
-
width="{{ width }}"
|
|
159
|
-
height="{{ height }}"
|
|
160
|
-
@load="onImageLoad($event)"
|
|
161
|
-
@error="onImageError($event)"
|
|
162
|
-
/>
|
|
163
|
-
@endif
|
|
164
|
-
@endif
|
|
165
|
-
</div>
|
|
103
|
+
What was here before put a grey SVG in `src`, moved the real URL to
|
|
104
|
+
`data-src`, and swapped them from an IntersectionObserver on mount. That
|
|
105
|
+
meant no image at all without JavaScript - for a crawler, for a reader
|
|
106
|
+
view, for anyone on a failed bundle - while `loading="lazy"` was sitting
|
|
107
|
+
on the same tag already doing the job natively, in every browser since
|
|
108
|
+
2020, without blocking the parser or double-fetching through a probe.
|
|
109
|
+
--}}
|
|
110
|
+
<img
|
|
111
|
+
src="{{ src }}"
|
|
112
|
+
@if(srcSet)srcset="{{ srcSet }}"@endif
|
|
113
|
+
@if(sizes)sizes="{{ sizes }}"@endif
|
|
114
|
+
alt="{{ alt }}"
|
|
115
|
+
@if(width)width="{{ width }}"@endif
|
|
116
|
+
@if(height)height="{{ height }}"@endif
|
|
117
|
+
loading="{{ lazy ? 'lazy' : 'eager' }}"
|
|
118
|
+
decoding="{{ decoding }}"
|
|
119
|
+
fetchpriority="{{ fetchpriority }}"
|
|
120
|
+
style="{{ imageStyle }}"
|
|
121
|
+
/>
|
|
122
|
+
</picture>
|
package/src/ui/image/README.md
CHANGED
|
@@ -21,14 +21,28 @@ bun add @stacksjs/components
|
|
|
21
21
|
/>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
### Lazy
|
|
24
|
+
### Lazy loading (default)
|
|
25
|
+
|
|
26
|
+
Native `loading="lazy"`, so it works with scripts disabled.
|
|
27
|
+
|
|
28
|
+
```stx
|
|
29
|
+
<Image src="/large-image.jpg" alt="Large image" />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### The one image above the fold
|
|
33
|
+
|
|
34
|
+
```stx
|
|
35
|
+
<Image src="/hero.jpg" alt="Hero" priority />
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Responsive
|
|
25
39
|
|
|
26
40
|
```stx
|
|
27
41
|
<Image
|
|
28
|
-
src="/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
src="/photo-960.webp"
|
|
43
|
+
srcSet="/photo-320.webp 320w, /photo-640.webp 640w, /photo-960.webp 960w"
|
|
44
|
+
sizes="(min-width: 1024px) 45vw, 95vw"
|
|
45
|
+
alt="Photo"
|
|
32
46
|
/>
|
|
33
47
|
```
|
|
34
48
|
|
|
@@ -61,57 +75,71 @@ bun add @stacksjs/components
|
|
|
61
75
|
/>
|
|
62
76
|
```
|
|
63
77
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```stx
|
|
67
|
-
<script server>
|
|
68
|
-
const handleLoad = () => {
|
|
69
|
-
console.log('Image loaded!')
|
|
70
|
-
}
|
|
78
|
+
## Props
|
|
71
79
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
| Prop | Type | Default | Description |
|
|
81
|
+
|------|------|---------|-------------|
|
|
82
|
+
| `src` | `string` | - | Image source URL (required) |
|
|
83
|
+
| `alt` | `string` | - | Alt text (required) |
|
|
84
|
+
| `srcSet` | `string` | - | Responsive candidates, e.g. `"a.jpg 320w, b.jpg 640w"` |
|
|
85
|
+
| `sizes` | `string` | - | How wide the slot is. Pair it with a `w` srcset |
|
|
86
|
+
| `width` | `number \| string` | - | Intrinsic width, to reserve space |
|
|
87
|
+
| `height` | `number \| string` | - | Intrinsic height, to reserve space |
|
|
88
|
+
| `lazy` | `boolean` | `true` | Native `loading="lazy"`. Ignored when `priority` |
|
|
89
|
+
| `priority` | `boolean` | `false` | Above the fold: eager, `fetchpriority="high"` |
|
|
90
|
+
| `decoding` | `'async' \| 'sync' \| 'auto'` | `'async'` | Decode hint |
|
|
91
|
+
| `fetchpriority` | `'high' \| 'low' \| 'auto'` | `'auto'` | Priority hint |
|
|
92
|
+
| `placeholder` | `string` | - | CSS painted *behind* the image while it loads |
|
|
93
|
+
| `aspectRatio` | `number \| string` | - | Only when you want one — see below |
|
|
94
|
+
| `objectFit` | `'contain' \| 'cover' \| 'fill' \| 'none' \| 'scale-down'` | `'cover'` | How the image fills its box |
|
|
95
|
+
| `objectPosition` | `string` | `'center'` | Focal point of the crop |
|
|
96
|
+
| `rounded` | `boolean \| 'full' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl'` | `false` | Corner radius |
|
|
97
|
+
| `zoomOnHover` | `boolean` | `false` | Transition hook for a hover scale |
|
|
98
|
+
| `className` | `string` | `''` | Extra classes on the `<picture>` |
|
|
99
|
+
|
|
100
|
+
### Blur-up placeholders
|
|
101
|
+
|
|
102
|
+
`placeholder` takes any CSS `background` value and paints it behind the image,
|
|
103
|
+
so the real file simply covers it as it arrives. No script runs, which means
|
|
104
|
+
it is there in the first paint and survives with JavaScript off.
|
|
76
105
|
|
|
106
|
+
```stx
|
|
77
107
|
<Image
|
|
78
108
|
src="/photo.jpg"
|
|
79
|
-
alt="
|
|
80
|
-
|
|
81
|
-
:onError="handleError"
|
|
109
|
+
alt="…"
|
|
110
|
+
placeholder='url("data:image/bmp;base64,Qk02DAAA…")'
|
|
82
111
|
/>
|
|
83
112
|
```
|
|
84
113
|
|
|
85
|
-
|
|
114
|
+
Generate the data URL at build time — `ts-images` will give you a SplatHash
|
|
115
|
+
(16 bytes) or a thumbhash, and both decode to something you can inline. A flat
|
|
116
|
+
dominant colour works too, and costs twenty bytes:
|
|
86
117
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
118
|
+
```stx
|
|
119
|
+
<Image src="/photo.jpg" alt="…" placeholder="#655449" />
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Behind the image rather than on it, deliberately: a background set on an
|
|
123
|
+
`<img>` shows through anything transparent in the file, and stays there after
|
|
124
|
+
it loads.
|
|
125
|
+
|
|
126
|
+
### On `aspectRatio`
|
|
127
|
+
|
|
128
|
+
Left unset, the component does not impose one. `width` and `height` already
|
|
129
|
+
reserve the right space, and an app that sets its own crop in CSS should win —
|
|
130
|
+
deriving a ratio from the intrinsic dimensions silently overrides it and the
|
|
131
|
+
images come out the wrong shape.
|
|
101
132
|
|
|
102
133
|
## Features
|
|
103
134
|
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
108
|
-
- **Responsive**
|
|
109
|
-
- **
|
|
110
|
-
- **
|
|
111
|
-
- **
|
|
112
|
-
- **Performance** - Optimized with intersection observer
|
|
113
|
-
- **Modern ES modules** - Clean export syntax
|
|
114
|
-
- **Headwind styling** - Utility-first CSS classes
|
|
135
|
+
- **Native lazy loading** — `loading="lazy"`, not an IntersectionObserver
|
|
136
|
+
- **No JavaScript required** — renders and loads with scripts disabled
|
|
137
|
+
- **Self-contained styling** — inline styles, no utility framework needed
|
|
138
|
+
- **Placeholders** — any CSS background, painted behind the image
|
|
139
|
+
- **Responsive** — `srcSet` and `sizes` passed straight through
|
|
140
|
+
- **Priority hint** — one prop for the above-the-fold image
|
|
141
|
+
- **Layout-transparent wrapper** — sizes to its parent or to its content
|
|
142
|
+
- **WebP** — an optional `<source>` ahead of the fallback
|
|
115
143
|
|
|
116
144
|
## Object Fit Options
|
|
117
145
|
|
package/src/ui/image/index.ts
CHANGED
|
@@ -9,13 +9,21 @@ export interface ImageProps {
|
|
|
9
9
|
alt: string
|
|
10
10
|
width?: number | string
|
|
11
11
|
height?: number | string
|
|
12
|
+
/** Native lazy loading. Ignored when `priority` is set. Defaults to true. */
|
|
12
13
|
lazy?: boolean
|
|
14
|
+
/** The one image above the fold: loads eagerly, at high priority. */
|
|
15
|
+
priority?: boolean
|
|
16
|
+
decoding?: 'async' | 'sync' | 'auto'
|
|
17
|
+
fetchpriority?: 'high' | 'low' | 'auto'
|
|
18
|
+
/**
|
|
19
|
+
* A CSS value painted *behind* the image while it arrives — a colour, a
|
|
20
|
+
* gradient, or `url("data:image/...")` for a low-quality preview.
|
|
21
|
+
*/
|
|
13
22
|
placeholder?: string
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onError?: (event: Event) => void
|
|
17
|
-
aspectRatio?: number
|
|
23
|
+
/** Only when you want one: an unset ratio lets your own CSS decide. */
|
|
24
|
+
aspectRatio?: number | string
|
|
18
25
|
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
|
|
26
|
+
objectPosition?: string
|
|
19
27
|
rounded?: boolean | 'full' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
|
|
20
28
|
zoomOnHover?: boolean
|
|
21
29
|
className?: string
|
package/dist/Image-yhxcvgzs.stx
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
<script server>
|
|
2
|
-
export const src = $props.src || ''
|
|
3
|
-
export const srcSet = $props.srcSet || ''
|
|
4
|
-
export const sizes = $props.sizes || ''
|
|
5
|
-
export const webpSrc = $props.webpSrc || ''
|
|
6
|
-
export const webpSrcSet = $props.webpSrcSet || ''
|
|
7
|
-
export const alt = $props.alt || ''
|
|
8
|
-
export const width = $props.width
|
|
9
|
-
export const height = $props.height
|
|
10
|
-
export const lazy = $props.lazy ?? true
|
|
11
|
-
export const placeholder = $props.placeholder || 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"%3E%3Crect fill="%23e5e7eb" width="400" height="300"/%3E%3C/svg%3E'
|
|
12
|
-
export const blurDataURL = $props.blurDataURL || ''
|
|
13
|
-
export const aspectRatio = $props.aspectRatio
|
|
14
|
-
export const objectFit = $props.objectFit || 'cover'
|
|
15
|
-
export const rounded = $props.rounded ?? false
|
|
16
|
-
export const zoomOnHover = $props.zoomOnHover || false
|
|
17
|
-
export const className = $props.className || ''
|
|
18
|
-
|
|
19
|
-
export const hasWebP = !!(webpSrc || webpSrcSet)
|
|
20
|
-
|
|
21
|
-
const objectFitClasses = {
|
|
22
|
-
contain: 'object-contain',
|
|
23
|
-
cover: 'object-cover',
|
|
24
|
-
fill: 'object-fill',
|
|
25
|
-
none: 'object-none',
|
|
26
|
-
'scale-down': 'object-scale-down',
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const roundedClass = rounded === true ? 'rounded-lg' : rounded === 'full' ? 'rounded-full' : rounded ? `rounded-${rounded}` : ''
|
|
30
|
-
const zoomClasses = zoomOnHover ? 'transform hover:scale-110 transition-transform duration-300 ease-in-out cursor-zoom-in' : ''
|
|
31
|
-
|
|
32
|
-
export const containerClasses = `relative overflow-hidden ${roundedClass} ${className}`.trim()
|
|
33
|
-
export const imageClasses = `w-full h-full transition-opacity duration-300 ${objectFitClasses[objectFit]} ${zoomClasses}`.trim()
|
|
34
|
-
export const blurPlaceholderClasses = `absolute inset-0 ${roundedClass} filter blur-lg scale-110`.trim()
|
|
35
|
-
export const containerStyle = aspectRatio ? `padding-bottom: ${(1 / aspectRatio) * 100}%` : ''
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<script client>
|
|
39
|
-
const emit = defineEmits()
|
|
40
|
-
const lazy = {{ lazy }}
|
|
41
|
-
const realSrc = {{ src }}
|
|
42
|
-
const realSrcSet = {{ srcSet }}
|
|
43
|
-
const errorPlaceholder = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"%3E%3Crect fill="%23e5e7eb" width="400" height="300"/%3E%3Ctext x="50%25" y="50%25" fill="%239ca3af" font-size="16" text-anchor="middle" dominant-baseline="middle"%3EImage not found%3C/text%3E%3C/svg%3E'
|
|
44
|
-
|
|
45
|
-
function onImageLoad(event) {
|
|
46
|
-
const img = event.target
|
|
47
|
-
img.classList.remove('opacity-0')
|
|
48
|
-
img.classList.add('opacity-100')
|
|
49
|
-
emit('load', event)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function onImageError(event) {
|
|
53
|
-
const img = event.target
|
|
54
|
-
img.src = errorPlaceholder
|
|
55
|
-
emit('error', event)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
onMount(() => {
|
|
59
|
-
if (!lazy) return
|
|
60
|
-
if (typeof IntersectionObserver === 'undefined') return
|
|
61
|
-
const lazyImages = document.querySelectorAll('.lazy-image:not([data-stx-img-loaded])')
|
|
62
|
-
const observer = new IntersectionObserver((entries, obs) => {
|
|
63
|
-
for (const entry of entries) {
|
|
64
|
-
if (!entry.isIntersecting) continue
|
|
65
|
-
const img = entry.target
|
|
66
|
-
img.setAttribute('data-stx-img-loaded', '1')
|
|
67
|
-
const dataSrc = img.getAttribute('data-src')
|
|
68
|
-
const dataSrcSet = img.getAttribute('data-srcset')
|
|
69
|
-
if (!dataSrc) continue
|
|
70
|
-
const probe = new Image()
|
|
71
|
-
probe.onload = () => {
|
|
72
|
-
img.src = dataSrc
|
|
73
|
-
if (dataSrcSet) img.srcset = dataSrcSet
|
|
74
|
-
img.classList.remove('opacity-0')
|
|
75
|
-
img.classList.add('opacity-100')
|
|
76
|
-
obs.unobserve(img)
|
|
77
|
-
}
|
|
78
|
-
probe.onerror = () => {
|
|
79
|
-
onImageError({ target: img })
|
|
80
|
-
obs.unobserve(img)
|
|
81
|
-
}
|
|
82
|
-
probe.src = dataSrc
|
|
83
|
-
if (dataSrcSet) probe.srcset = dataSrcSet
|
|
84
|
-
}
|
|
85
|
-
}, { rootMargin: '50px' })
|
|
86
|
-
for (const img of lazyImages) observer.observe(img)
|
|
87
|
-
})
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<div class="{{ containerClasses }}" style="{{ containerStyle }}">
|
|
91
|
-
@if(blurDataURL)
|
|
92
|
-
<img
|
|
93
|
-
src="{{ blurDataURL }}"
|
|
94
|
-
alt=""
|
|
95
|
-
class="{{ blurPlaceholderClasses }}"
|
|
96
|
-
aria-hidden="true"
|
|
97
|
-
/>
|
|
98
|
-
@endif
|
|
99
|
-
|
|
100
|
-
@if(hasWebP)
|
|
101
|
-
<picture>
|
|
102
|
-
<source
|
|
103
|
-
type="image/webp"
|
|
104
|
-
@if(webpSrcSet)srcset="{{ webpSrcSet }}"@endif
|
|
105
|
-
@if(webpSrc && !webpSrcSet)srcset="{{ webpSrc }}"@endif
|
|
106
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
107
|
-
/>
|
|
108
|
-
@if(lazy)
|
|
109
|
-
<img
|
|
110
|
-
src="{{ placeholder }}"
|
|
111
|
-
data-src="{{ src }}"
|
|
112
|
-
@if(srcSet)data-srcset="{{ srcSet }}"@endif
|
|
113
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
114
|
-
alt="{{ alt }}"
|
|
115
|
-
class="{{ imageClasses }} lazy-image opacity-0"
|
|
116
|
-
width="{{ width }}"
|
|
117
|
-
height="{{ height }}"
|
|
118
|
-
loading="lazy"
|
|
119
|
-
@load="onImageLoad($event)"
|
|
120
|
-
@error="onImageError($event)"
|
|
121
|
-
/>
|
|
122
|
-
@else
|
|
123
|
-
<img
|
|
124
|
-
src="{{ src }}"
|
|
125
|
-
@if(srcSet)srcset="{{ srcSet }}"@endif
|
|
126
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
127
|
-
alt="{{ alt }}"
|
|
128
|
-
class="{{ imageClasses }}"
|
|
129
|
-
width="{{ width }}"
|
|
130
|
-
height="{{ height }}"
|
|
131
|
-
@load="onImageLoad($event)"
|
|
132
|
-
@error="onImageError($event)"
|
|
133
|
-
/>
|
|
134
|
-
@endif
|
|
135
|
-
</picture>
|
|
136
|
-
@else
|
|
137
|
-
@if(lazy)
|
|
138
|
-
<img
|
|
139
|
-
src="{{ placeholder }}"
|
|
140
|
-
data-src="{{ src }}"
|
|
141
|
-
@if(srcSet)data-srcset="{{ srcSet }}"@endif
|
|
142
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
143
|
-
alt="{{ alt }}"
|
|
144
|
-
class="{{ imageClasses }} lazy-image opacity-0"
|
|
145
|
-
width="{{ width }}"
|
|
146
|
-
height="{{ height }}"
|
|
147
|
-
loading="lazy"
|
|
148
|
-
@load="onImageLoad($event)"
|
|
149
|
-
@error="onImageError($event)"
|
|
150
|
-
/>
|
|
151
|
-
@else
|
|
152
|
-
<img
|
|
153
|
-
src="{{ src }}"
|
|
154
|
-
@if(srcSet)srcset="{{ srcSet }}"@endif
|
|
155
|
-
@if(sizes)sizes="{{ sizes }}"@endif
|
|
156
|
-
alt="{{ alt }}"
|
|
157
|
-
class="{{ imageClasses }}"
|
|
158
|
-
width="{{ width }}"
|
|
159
|
-
height="{{ height }}"
|
|
160
|
-
@load="onImageLoad($event)"
|
|
161
|
-
@error="onImageError($event)"
|
|
162
|
-
/>
|
|
163
|
-
@endif
|
|
164
|
-
@endif
|
|
165
|
-
</div>
|