@stacksjs/components 0.2.827 → 0.2.830
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.
|
@@ -63,7 +63,7 @@ const delay = {{ delay }}
|
|
|
63
63
|
// A live prop: a tooltip is commonly suppressed by state the page only learns
|
|
64
64
|
// about later — while a field is being edited, or once a hint has been read —
|
|
65
65
|
// and frozen it could only ever reflect the state the page was built in.
|
|
66
|
-
const
|
|
66
|
+
const activeTooltipId = useId('tooltip')
|
|
67
67
|
const triggerRef = useRef('triggerRef')
|
|
68
68
|
const panelRef = useRef('panelRef')
|
|
69
69
|
const preferredSide = {{ position }}
|
|
@@ -72,6 +72,7 @@ const preferredSide = {{ position }}
|
|
|
72
72
|
const panelLimits = 'position:fixed;max-width:calc(100vw - 16px);margin:0;'
|
|
73
73
|
const panelStyle = state(nativePopup ? { position: 'absolute', margin: 0, transform: [] } : panelLimits)
|
|
74
74
|
const arrowStyle = state('')
|
|
75
|
+
const tooltipContent = useReactiveProp('content', {{ content }})
|
|
75
76
|
const isDisabled = useReactiveProp('disabled', {{ disabled }})
|
|
76
77
|
// Reactive prop binding — parent can drive `show` via signals. See #1704.
|
|
77
78
|
const isVisible = useReactiveProp('show', {{ show }})
|
|
@@ -167,7 +168,7 @@ effect(() => {
|
|
|
167
168
|
try {
|
|
168
169
|
if (nativePopup && !window.craft?.capabilities?.viewMeasure)
|
|
169
170
|
throw new Error('Native Tooltip requires viewMeasure support')
|
|
170
|
-
window.stx.overlays.open(
|
|
171
|
+
window.stx.overlays.open(activeTooltipId, { modal: false, root: nativePopup ? panelRef.value : null, panel: null, onEscape: hideTooltip, onBackdrop: hideTooltip })
|
|
171
172
|
if (nativePopup) stopPositioning = trackNativePopup(triggerRef.value, panelRef.value, preferredSide, style => panelStyle.set(style))
|
|
172
173
|
}
|
|
173
174
|
catch (error) {
|
|
@@ -175,7 +176,7 @@ effect(() => {
|
|
|
175
176
|
hideTooltip()
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
|
-
else window.stx.overlays.close(
|
|
179
|
+
else window.stx.overlays.close(activeTooltipId)
|
|
179
180
|
})
|
|
180
181
|
|
|
181
182
|
onDestroy(() => {
|
|
@@ -183,7 +184,7 @@ onDestroy(() => {
|
|
|
183
184
|
++positionGeneration
|
|
184
185
|
if (timeoutId) clearTimeout(timeoutId)
|
|
185
186
|
if (stopPositioning) stopPositioning()
|
|
186
|
-
window.stx.overlays.close(
|
|
187
|
+
window.stx.overlays.close(activeTooltipId)
|
|
187
188
|
})
|
|
188
189
|
|
|
189
190
|
/*
|
|
@@ -212,8 +213,8 @@ function describeTrigger() {
|
|
|
212
213
|
// there is nothing better to carry it.
|
|
213
214
|
const target = wrapper.firstElementChild || wrapper
|
|
214
215
|
const existing = (target.getAttribute('aria-describedby') || '').split(/\s+/).filter(Boolean)
|
|
215
|
-
if (existing.indexOf(
|
|
216
|
-
existing.push(
|
|
216
|
+
if (existing.indexOf(activeTooltipId) !== -1) return
|
|
217
|
+
existing.push(activeTooltipId)
|
|
217
218
|
target.setAttribute('aria-describedby', existing.join(' '))
|
|
218
219
|
}
|
|
219
220
|
|
|
@@ -254,13 +255,14 @@ onDestroy(() => { if (restorePanel) restorePanel() })
|
|
|
254
255
|
x-ref="panelRef"
|
|
255
256
|
:style="panelStyle"
|
|
256
257
|
id="{{ tooltipId }}"
|
|
258
|
+
:id="activeTooltipId"
|
|
257
259
|
:show="isVisible() && !isDisabled()"
|
|
258
260
|
class="{{ tooltipClasses }}"
|
|
259
261
|
role="tooltip"
|
|
260
262
|
@mouseenter="showTooltip()"
|
|
261
263
|
@mouseleave="hideTooltip()"
|
|
262
264
|
>
|
|
263
|
-
<span class="block" style="max-height:calc(100vh - 32px);overflow-y:auto;">{{ content }}</span>
|
|
265
|
+
<span class="block" style="max-height:calc(100vh - 32px);overflow-y:auto;" :text="tooltipContent">{{ content }}</span>
|
|
264
266
|
<span :show="!nativePopup" class="{{ arrowClass }}" :style="arrowStyle"></span>
|
|
265
267
|
</span>
|
|
266
268
|
</span>
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var Qe={__stx:!0,src:"./components/CodeBlock.stx"};var Ze={__stx:!0,src:"./compo
|
|
|
8
8
|
Documentation: ${s.docsUrl}`;else if(e)o+=`
|
|
9
9
|
Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var J={invalidProp(e,t,s,o){return new z(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new z(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new z(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new z("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new z(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new z(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new z(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new z(e,"Failed to render component",{details:t.message})}},ae=null;function Cl(e){ae=e}function $l(){ae=null}function ne(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof z)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(ae)try{ae(e)}catch(a){console.error("Error in error handler:",a)}if(s)throw e}function Le(e,t,s){return(...o)=>{try{let a=e(...o);if(a instanceof Promise)return a.catch((n)=>{let r=J.eventHandler(t,s,n);throw ne(r,{throwError:!1}),r});return a}catch(a){let n=J.eventHandler(t,s,a);throw ne(n,{throwError:!1}),n}}}function Ht(e,t){if(!e)throw t}function Bt(e,t,s={}){let o=z.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function Sl(e,t){Ht(e,t)}function Tl(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){Bt(e,s,o)},error(s,o){let a=new z(e,s,o);ne(a,{throwError:!1})}}}function Il(e,t,s){try{return t()}catch(o){let a=J.render(e,o);return ne(a,{throwError:!1}),s}}class A{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new A(this.validate,this.message,!0)}}var l={string:new A((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new A((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new A((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new A((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new A((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 A((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new A(()=>!0,()=>""),oneOf(e){return new A((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((a)=>JSON.stringify(a)).join(", ")}].`)},oneOfType(e){return new A((t,s,o)=>e.some((a)=>a.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new A((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((a,n)=>e.validate(a,`${s}[${n}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new A((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[a,n]of Object.entries(e)){if(n.isRequired&&!(a in t))return!1;if(a in t&&!n.validate(t[a],`${s}.${a}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new A((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new A(e,typeof t==="string"?()=>t:t)},min(e){return new A((t)=>typeof t==="number"&&t>=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value >= ${e}.`)},max(e){return new A((t)=>typeof t==="number"&&t<=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value <= ${e}.`)},range(e,t){return new A((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,a)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${a}\`, expected value between ${e} and ${t}.`)},pattern(e){return new A((t)=>typeof t==="string"&&e.test(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value matching pattern ${e}.`)},email:new A((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 A((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 Ft(e,t,s,o={}){let{throwOnError:a=!1,logWarnings:n=!0}=o,r=[];for(let[i,c]of Object.entries(s)){let d=t[i],u=d===void 0;if(c.isRequired&&u){let p=`Required prop \`${i}\` was not specified in \`${e}\`.`;r.push(p);continue}if(u)continue;if(!c.validate(d,i,e)){let p=c.message(d,i,e);r.push(p)}}if(r.length>0){if(n)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((i)=>console.warn(i)),console.groupEnd();if(a)throw Error(`Prop validation failed for \`${e}\`:
|
|
10
10
|
${r.join(`
|
|
11
|
-
`)}`)}return{valid:r.length===0,errors:r}}function B(e,t,s){return(o)=>Ft(e,o,t,s)}function Pl(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Al(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Wt="./Button-k3j4cc3h.stx";var Kt={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,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Dl=B("Button",Kt);function Ml(e){return Le(e,"Button","onClick")}function zl(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function jl(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Ut="./Calendar-5vs6x7gj.stx";var Jt="./DateRangePicker-4zmf34e4.stx";var Xt="./EmptyState-snj7gbsn.stx";var Zt="./ErrorState-qb7af5zb.stx";var ts="./ThemeToggle-4wm9zare.stx";var os="./Card-r55zpjqh.stx";var ns="./Checkbox-80myyzzm.stx";var is="./ChoiceChips-8dcf172n.stx";var cs="./Combobox-9n04ec5w.stx";var ps="./ComboboxButton-4r6a45s1.stx";var hs="./ComboboxInput-1gyfpnca.stx";var ms="./ComboboxOption-wkw70js7.stx";var bs="./ComboboxOptions-zhr9b6rx.stx";var vs="./CommandPalette-qqjdbcyg.stx";var ys="./CommandPaletteItem-7290ce1z.stx";var Cs="./Dialog-wm7zjqnb.stx";var Ss="./DialogBackdrop-de5m5m4w.stx";var Is="./DialogDescription-yd2jgt2m.stx";var Ps="./DialogPanel-v972ztcc.stx";var Os="./DialogTitle-nw0pw114.stx";var Rs="./Drawer-d78cdr6d.stx";var Ds="./Dropdown-hb8ks69x.stx";var zs="./DropdownButton-wxc25hsy.stx";var Vs="./DropdownItem-af0vzc8a.stx";var Bs="./DropdownItems-bkz7jkyz.stx";var qs="./Form-cybgg9ym.stx";var Ws={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},Qc=B("Form",Ws);var _s="./GroupedList-j3sxv5pb.stx";var Gs="./GroupedListRow-v52zmzpk.stx";var Ys="./Image-ndt0d1dq.stx";var Qs="./EmailInput-sf9jfrgz.stx";var eo="./NumberInput-pq4k2k4k.stx";var so="./PasswordInput-r51qzgc0.stx";var ao="./SearchInput-w15r5t95.stx";var ro="./TextInput-1kvx4pte.stx";var io={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},lo={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,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},co={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},po={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},uo={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},md=B("TextInput",lo),gd=B("EmailInput",io),bd=B("PasswordInput",po),xd=B("NumberInput",co),vd=B("SearchInput",uo);var fo="./List-q8ff8gdr.stx";var go="./Listbox-83j2q4x6.stx";var xo="./ListboxButton-gan8e3nw.stx";var wo="./ListboxLabel-ka0hfm7b.stx";var ko="./ListboxOption-gpaqvk3s.stx";var $o="./ListboxOptions-2928864k.stx";var To="./FilterChip-bynt5maa.stx";var Eo="./FilterChips-mpmev5v5.stx";var Ao="./ListRow-nvyg2fwb.stx";var Lo="./NavBar-ky8tedjb.stx";var No="./SectionCard-8b5fyrjd.stx";var Mo="./TabBar-6m1ajm1d.stx";var jo="./TabBarItem-kddfnhk3.stx";var Ho="./Navigator-1yk1c3pp.stx";var Fo="./Notification-b3cz24f0.stx";var Wo="./Pager-5e7knyqh.stx";var _o="./PagerDots-076w890y.stx";var Go="./Pagination-8bhbkpcp.stx";var Yo="./Checkout-crbegxyv.stx";var Qo="./DefaultPaymentMethod-ss3x61tr.stx";var ea="./PaymentMethods-z4hhr0kv.stx";var sa="./SubscriptionCheckout-rdcv32n1.stx";var aa="./Popover-jjt7p7sn.stx";var ra="./PopoverButton-ks3cttd9.stx";var la="./PopoverPanel-ddgj4gz3.stx";var da="./Portal-m73vz879.stx";var ua="./Progress-2qzb77kc.stx";var fa="./Radio-8153x74w.stx";var ga="./RadioGroup-smqcqgds.stx";var xa="./RadioGroupDescription-z34r9avr.stx";var wa="./RadioGroupLabel-ka0hfm7b.stx";var ka="./RadioGroupOption-twcw1b2a.stx";var $a="./SegmentedControl-fr69q4gb.stx";var Ta="./Select-1cnqbcmg.stx";var Ea="./Sidebar-8dygywjv.stx";var Aa="./SidebarFooter-s7skj92y.stx";var La="./SidebarHeader-x7jdhmyr.stx";var Na="./SidebarItem-64sjb2fe.stx";var Ma="./SidebarPinned-48kyk193.stx";var ja="./SidebarSection-vx5bahsk.stx";var Ha="./SidebarSpace-bwv98azf.stx";var Fa="./SidebarSpaces-mdtrynr2.stx";var Wa="./SidebarSpaceSwitcher-1mycft2g.stx";var re={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={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]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 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"].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]/60 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]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ka={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}},_a={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}},Ua={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"].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}},Ga={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ja={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Ya={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Re={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:Ua,workspace:Ka,desktop:_a,solid:Ga,transparent:Ja,vibrancy:Ya};function du(e){return Re[e||"macos"]||Re.macos}function pu(e){if(!e)return;return re[e]||e}var Xa=re.gray;function W(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ne(e){return{light:{from:W(e,35,"#ffffff"),to:W(e,12.5,"#ffffff"),ink:W(e,22,"#17171b"),accent:W(e,88,"#2a2a30")},dark:{from:W(e,27,"#101014"),to:W(e,10,"#08080b"),ink:W(e,12,"#f4f4f7"),accent:W(e,74,"#ffffff")}}}function fu(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Qa(e){if(!e)return Ne(Xa);if(typeof e!=="string")return e;return Ne(re[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,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function en(e){let t=Qa(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 mu(e){return(e||[]).map(en)}function gu(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function bu(e){return e.map((t)=>t.tint)}var sn="./Skeleton-m4p66zcs.stx";var an="./Spinner-vhnc3y03.stx";var rn="./Stepper-68gxcmej.stx";var cn="./StepperStep-zf4pq1s0.stx";class ie{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 o=e.oldValue?JSON.parse(e.oldValue).value:null,a=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((n)=>n(a,o,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 o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],a="";for(let n=0;n<e.length;n++){let r=e.charAt(n),i=a+r;if(t[i]!==void 0)a=i;else o.push(a.length>1?t[a]:a.charCodeAt(0)),t[i]=s++,a=r}if(a!=="")o.push(a.length>1?t[a]:a.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,a=String.fromCharCode(t[0]),n=a;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=a+a.charAt(0);else return e;n+=c,s[o++]=a+c.charAt(0),a=c}return n}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),a=this.get(e),n={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(n);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,a)}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 o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.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 o=this.watchers.get(e);if(o)o.forEach((a)=>a(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 o=this.storage.key(s);if(o){let a=this.storage.getItem(o)||"";e+=o.length+a.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,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var qu={local:new ie("local"),session:new ie("session")};function Wu(e="local",t){return new ie(e,t)}var pn="./Switch-s8yf2rvm.stx";var hn="./Table-0a4y46vd.stx";var mn="./TableBody-y49bqb1p.stx";var bn="./TableCell-jhvsxw8b.stx";var vn="./TableHead-e9xvjx2j.stx";var yn="./TableHeader-krzcx4sv.stx";var Cn="./TableRow-dt8e11aj.stx";var Sn="./Tab-j9f4t166.stx";var In="./TabList-r1pc87xs.stx";var Pn="./TabPanel-5htevsq6.stx";var On="./Tabs-psm5wj7c.stx";var Rn="./Teleport-vqs75x36.stx";var Dn="./Textarea-40qrctpw.stx";var zn="./AiTextarea-bg6xq5wc.stx";var Vn="./Tooltip-pev702hb.stx";var Bn="./Transition-7m0mk45s.stx";var qn="./Video-bqsx3wr8.stx";var Kn="./VirtualList-fa7v5a3h.stx";var Un="./VirtualTable-kp7b3wyv.stx";var Gn=0;function Me(e="a11y"){return`${e}-${++Gn}-${Date.now()}`}function Hh(e,t,s={}){let{visible:o=!1,id:a=Me("label")}=s,n=document.createElement(o?"label":"span");if(n.id=a,n.textContent=e,!o)Object.assign(n.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",a),t.parentElement)t.parentElement.insertBefore(n,t);else document.body.appendChild(n);return a}function Bh(e,t){let s=Me("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.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(o,t);else document.body.appendChild(o);return s}function Fh(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 ve(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 qh(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:a=!0,clickOutsideDeactivates:n=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,d=!1,u=!1,p=null,h=(w)=>{if(u)return;if(a&&w.key==="Escape"){w.preventDefault(),k();return}if(w.key==="Tab"){let S=ve(e);if(S.length===0){w.preventDefault();return}let L=S[0],R=S[S.length-1];if(w.shiftKey){if(document.activeElement===L)w.preventDefault(),R.focus()}else if(document.activeElement===R)w.preventDefault(),L.focus()}},m=(w)=>{if(u)return;if(!e.contains(w.target)){if(typeof r==="function"){if(!r(w)&&n)k()}else if(!r&&n)k()}};function C(){if(d)return;d=!0,p=document.activeElement;let w=s||ve(e)[0];if(w&&typeof w.focus==="function")w.focus();document.addEventListener("keydown",h),document.addEventListener("click",m),i?.()}function k(){if(!d)return;d=!1;let w=o||p;if(w&&typeof w.focus==="function")w.focus();document.removeEventListener("keydown",h),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:C,deactivate:k,pause:y,unpause:b}}function Wh(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:a="both",loop:n=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),d=(p)=>{let h=c();if(p<0||p>=h.length)return;h.forEach((m,C)=>{if(C===p){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=p,r?.(p,h[p])},u=(p)=>{let m=c().length-1,C=!1,k=i;switch(p.key){case"ArrowRight":if(a==="horizontal"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"ArrowDown":if(a==="vertical"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowUp":if(a==="vertical"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"Home":k=0,C=!0;break;case"End":k=m,C=!0;break}if(C)p.preventDefault(),d(k)};return d(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Kh={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function _h(e){return document.activeElement===e}function Uh(e,t){let s=t||document.activeElement,o=ve(document.body),a=o.indexOf(s);if(a===-1)return;let n=e==="next"?a+1:a-1,r=o[n];if(r)r.focus()}function Gh(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 Jh={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 Yh(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 Xh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Qh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Zh(){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 ef(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 tf(e){let t=[],s=(o)=>{let a=e.getAttribute(o);if(a){let n=a.split(" ");for(let r of n)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var Jn=(e,t,s,o)=>s*e/o+t,Yn=(e,t,s,o)=>(e/=o,s*e*e+t),Xn=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),Qn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Zn=(e,t,s,o)=>(e/=o,s*e*e*e+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),tr=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},sr=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),or=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ar=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},nr=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),rr=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),ir=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},lr=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,cr=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,dr=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,pr=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,ur=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,hr=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},fr=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),mr=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),gr=(e,t,s,o)=>{if(e/=o/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},br=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t},xr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)+s+t},vr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!n)n=o*0.44999999999999996;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)*0.5+s+t},wr=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),yr=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),kr=(e,t,s,o)=>{let a=1.70158;if(e/=o/2,e<1)return a*=1.525,s/2*(e*e*((a+1)*e-a))+t;return e-=2,a*=1.525,s/2*(e*e*((a+1)*e+a)+2)+t},we=(e,t,s,o)=>{if(e/=o,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},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,Cr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},of={linear:Jn,easeInQuad:Yn,easeOutQuad:Xn,easeInOutQuad:Qn,easeInCubic:Zn,easeOutCubic:er,easeInOutCubic:tr,easeInQuart:sr,easeOutQuart:or,easeInOutQuart:ar,easeInQuint:nr,easeOutQuint:rr,easeInOutQuint:ir,easeInSine:lr,easeOutSine:cr,easeInOutSine:dr,easeInExpo:pr,easeOutExpo:ur,easeInOutExpo:hr,easeInCirc:fr,easeOutCirc:mr,easeInOutCirc:gr,easeInElastic:br,easeOutElastic:xr,easeInOutElastic:vr,easeInBack:wr,easeOutBack:yr,easeInOutBack:kr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:Cr};function $r(e,t={}){let{duration:s="1s",timing:o="ease",delay:a="0s",iteration:n="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${a} ${n} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=$r(t,s)}function nf(e){e.style.animation=""}function Sr(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function rf(e,t,s={}){let{stagger:o=100,...a}=s;e.forEach((n,r)=>{let i=`${r*o}ms`;je(n,t,{...a,delay:i})})}async function lf(e,t){for(let s of t)je(e,s.name,s.options),await Sr(e)}var cf={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 df(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function pf(e,t){let s=`
|
|
11
|
+
`)}`)}return{valid:r.length===0,errors:r}}function B(e,t,s){return(o)=>Ft(e,o,t,s)}function Pl(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Al(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Wt="./Button-k3j4cc3h.stx";var Kt={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,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Dl=B("Button",Kt);function Ml(e){return Le(e,"Button","onClick")}function zl(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function jl(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Ut="./Calendar-5vs6x7gj.stx";var Jt="./DateRangePicker-4zmf34e4.stx";var Xt="./EmptyState-snj7gbsn.stx";var Zt="./ErrorState-qb7af5zb.stx";var ts="./ThemeToggle-4wm9zare.stx";var os="./Card-r55zpjqh.stx";var ns="./Checkbox-80myyzzm.stx";var is="./ChoiceChips-8dcf172n.stx";var cs="./Combobox-9n04ec5w.stx";var ps="./ComboboxButton-4r6a45s1.stx";var hs="./ComboboxInput-1gyfpnca.stx";var ms="./ComboboxOption-wkw70js7.stx";var bs="./ComboboxOptions-zhr9b6rx.stx";var vs="./CommandPalette-qqjdbcyg.stx";var ys="./CommandPaletteItem-7290ce1z.stx";var Cs="./Dialog-wm7zjqnb.stx";var Ss="./DialogBackdrop-de5m5m4w.stx";var Is="./DialogDescription-yd2jgt2m.stx";var Ps="./DialogPanel-v972ztcc.stx";var Os="./DialogTitle-nw0pw114.stx";var Rs="./Drawer-d78cdr6d.stx";var Ds="./Dropdown-hb8ks69x.stx";var zs="./DropdownButton-wxc25hsy.stx";var Vs="./DropdownItem-af0vzc8a.stx";var Bs="./DropdownItems-bkz7jkyz.stx";var qs="./Form-cybgg9ym.stx";var Ws={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},Qc=B("Form",Ws);var _s="./GroupedList-j3sxv5pb.stx";var Gs="./GroupedListRow-v52zmzpk.stx";var Ys="./Image-ndt0d1dq.stx";var Qs="./EmailInput-sf9jfrgz.stx";var eo="./NumberInput-pq4k2k4k.stx";var so="./PasswordInput-r51qzgc0.stx";var ao="./SearchInput-w15r5t95.stx";var ro="./TextInput-1kvx4pte.stx";var io={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},lo={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,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},co={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},po={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},uo={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},md=B("TextInput",lo),gd=B("EmailInput",io),bd=B("PasswordInput",po),xd=B("NumberInput",co),vd=B("SearchInput",uo);var fo="./List-q8ff8gdr.stx";var go="./Listbox-83j2q4x6.stx";var xo="./ListboxButton-gan8e3nw.stx";var wo="./ListboxLabel-ka0hfm7b.stx";var ko="./ListboxOption-gpaqvk3s.stx";var $o="./ListboxOptions-2928864k.stx";var To="./FilterChip-bynt5maa.stx";var Eo="./FilterChips-mpmev5v5.stx";var Ao="./ListRow-nvyg2fwb.stx";var Lo="./NavBar-ky8tedjb.stx";var No="./SectionCard-8b5fyrjd.stx";var Mo="./TabBar-6m1ajm1d.stx";var jo="./TabBarItem-kddfnhk3.stx";var Ho="./Navigator-1yk1c3pp.stx";var Fo="./Notification-b3cz24f0.stx";var Wo="./Pager-5e7knyqh.stx";var _o="./PagerDots-076w890y.stx";var Go="./Pagination-8bhbkpcp.stx";var Yo="./Checkout-crbegxyv.stx";var Qo="./DefaultPaymentMethod-ss3x61tr.stx";var ea="./PaymentMethods-z4hhr0kv.stx";var sa="./SubscriptionCheckout-rdcv32n1.stx";var aa="./Popover-jjt7p7sn.stx";var ra="./PopoverButton-ks3cttd9.stx";var la="./PopoverPanel-ddgj4gz3.stx";var da="./Portal-m73vz879.stx";var ua="./Progress-2qzb77kc.stx";var fa="./Radio-8153x74w.stx";var ga="./RadioGroup-smqcqgds.stx";var xa="./RadioGroupDescription-z34r9avr.stx";var wa="./RadioGroupLabel-ka0hfm7b.stx";var ka="./RadioGroupOption-twcw1b2a.stx";var $a="./SegmentedControl-fr69q4gb.stx";var Ta="./Select-1cnqbcmg.stx";var Ea="./Sidebar-8dygywjv.stx";var Aa="./SidebarFooter-s7skj92y.stx";var La="./SidebarHeader-x7jdhmyr.stx";var Na="./SidebarItem-64sjb2fe.stx";var Ma="./SidebarPinned-48kyk193.stx";var ja="./SidebarSection-vx5bahsk.stx";var Ha="./SidebarSpace-bwv98azf.stx";var Fa="./SidebarSpaces-mdtrynr2.stx";var Wa="./SidebarSpaceSwitcher-1mycft2g.stx";var re={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={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]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 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"].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]/60 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]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ka={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}},_a={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}},Ua={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"].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}},Ga={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ja={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Ya={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Re={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:Ua,workspace:Ka,desktop:_a,solid:Ga,transparent:Ja,vibrancy:Ya};function du(e){return Re[e||"macos"]||Re.macos}function pu(e){if(!e)return;return re[e]||e}var Xa=re.gray;function W(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ne(e){return{light:{from:W(e,35,"#ffffff"),to:W(e,12.5,"#ffffff"),ink:W(e,22,"#17171b"),accent:W(e,88,"#2a2a30")},dark:{from:W(e,27,"#101014"),to:W(e,10,"#08080b"),ink:W(e,12,"#f4f4f7"),accent:W(e,74,"#ffffff")}}}function fu(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Qa(e){if(!e)return Ne(Xa);if(typeof e!=="string")return e;return Ne(re[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,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function en(e){let t=Qa(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 mu(e){return(e||[]).map(en)}function gu(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function bu(e){return e.map((t)=>t.tint)}var sn="./Skeleton-m4p66zcs.stx";var an="./Spinner-vhnc3y03.stx";var rn="./Stepper-68gxcmej.stx";var cn="./StepperStep-zf4pq1s0.stx";class ie{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 o=e.oldValue?JSON.parse(e.oldValue).value:null,a=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((n)=>n(a,o,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 o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],a="";for(let n=0;n<e.length;n++){let r=e.charAt(n),i=a+r;if(t[i]!==void 0)a=i;else o.push(a.length>1?t[a]:a.charCodeAt(0)),t[i]=s++,a=r}if(a!=="")o.push(a.length>1?t[a]:a.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,a=String.fromCharCode(t[0]),n=a;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=a+a.charAt(0);else return e;n+=c,s[o++]=a+c.charAt(0),a=c}return n}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),a=this.get(e),n={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(n);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,a)}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 o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.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 o=this.watchers.get(e);if(o)o.forEach((a)=>a(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 o=this.storage.key(s);if(o){let a=this.storage.getItem(o)||"";e+=o.length+a.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,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var qu={local:new ie("local"),session:new ie("session")};function Wu(e="local",t){return new ie(e,t)}var pn="./Switch-s8yf2rvm.stx";var hn="./Table-0a4y46vd.stx";var mn="./TableBody-y49bqb1p.stx";var bn="./TableCell-jhvsxw8b.stx";var vn="./TableHead-e9xvjx2j.stx";var yn="./TableHeader-krzcx4sv.stx";var Cn="./TableRow-dt8e11aj.stx";var Sn="./Tab-j9f4t166.stx";var In="./TabList-r1pc87xs.stx";var Pn="./TabPanel-5htevsq6.stx";var On="./Tabs-psm5wj7c.stx";var Rn="./Teleport-vqs75x36.stx";var Dn="./Textarea-40qrctpw.stx";var zn="./AiTextarea-bg6xq5wc.stx";var Vn="./Tooltip-g8hb5me0.stx";var Bn="./Transition-7m0mk45s.stx";var qn="./Video-bqsx3wr8.stx";var Kn="./VirtualList-fa7v5a3h.stx";var Un="./VirtualTable-kp7b3wyv.stx";var Gn=0;function Me(e="a11y"){return`${e}-${++Gn}-${Date.now()}`}function Hh(e,t,s={}){let{visible:o=!1,id:a=Me("label")}=s,n=document.createElement(o?"label":"span");if(n.id=a,n.textContent=e,!o)Object.assign(n.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",a),t.parentElement)t.parentElement.insertBefore(n,t);else document.body.appendChild(n);return a}function Bh(e,t){let s=Me("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.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(o,t);else document.body.appendChild(o);return s}function Fh(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 ve(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 qh(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:a=!0,clickOutsideDeactivates:n=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,d=!1,u=!1,p=null,h=(w)=>{if(u)return;if(a&&w.key==="Escape"){w.preventDefault(),k();return}if(w.key==="Tab"){let S=ve(e);if(S.length===0){w.preventDefault();return}let L=S[0],R=S[S.length-1];if(w.shiftKey){if(document.activeElement===L)w.preventDefault(),R.focus()}else if(document.activeElement===R)w.preventDefault(),L.focus()}},m=(w)=>{if(u)return;if(!e.contains(w.target)){if(typeof r==="function"){if(!r(w)&&n)k()}else if(!r&&n)k()}};function C(){if(d)return;d=!0,p=document.activeElement;let w=s||ve(e)[0];if(w&&typeof w.focus==="function")w.focus();document.addEventListener("keydown",h),document.addEventListener("click",m),i?.()}function k(){if(!d)return;d=!1;let w=o||p;if(w&&typeof w.focus==="function")w.focus();document.removeEventListener("keydown",h),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:C,deactivate:k,pause:y,unpause:b}}function Wh(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:a="both",loop:n=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),d=(p)=>{let h=c();if(p<0||p>=h.length)return;h.forEach((m,C)=>{if(C===p){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=p,r?.(p,h[p])},u=(p)=>{let m=c().length-1,C=!1,k=i;switch(p.key){case"ArrowRight":if(a==="horizontal"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"ArrowDown":if(a==="vertical"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowUp":if(a==="vertical"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"Home":k=0,C=!0;break;case"End":k=m,C=!0;break}if(C)p.preventDefault(),d(k)};return d(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Kh={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function _h(e){return document.activeElement===e}function Uh(e,t){let s=t||document.activeElement,o=ve(document.body),a=o.indexOf(s);if(a===-1)return;let n=e==="next"?a+1:a-1,r=o[n];if(r)r.focus()}function Gh(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 Jh={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 Yh(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 Xh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Qh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Zh(){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 ef(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 tf(e){let t=[],s=(o)=>{let a=e.getAttribute(o);if(a){let n=a.split(" ");for(let r of n)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var Jn=(e,t,s,o)=>s*e/o+t,Yn=(e,t,s,o)=>(e/=o,s*e*e+t),Xn=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),Qn=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Zn=(e,t,s,o)=>(e/=o,s*e*e*e+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),tr=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},sr=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),or=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ar=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},nr=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),rr=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),ir=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},lr=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,cr=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,dr=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,pr=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,ur=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,hr=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},fr=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),mr=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),gr=(e,t,s,o)=>{if(e/=o/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},br=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t},xr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)+s+t},vr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!n)n=o*0.44999999999999996;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)*0.5+s+t},wr=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),yr=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),kr=(e,t,s,o)=>{let a=1.70158;if(e/=o/2,e<1)return a*=1.525,s/2*(e*e*((a+1)*e-a))+t;return e-=2,a*=1.525,s/2*(e*e*((a+1)*e+a)+2)+t},we=(e,t,s,o)=>{if(e/=o,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},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,Cr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},of={linear:Jn,easeInQuad:Yn,easeOutQuad:Xn,easeInOutQuad:Qn,easeInCubic:Zn,easeOutCubic:er,easeInOutCubic:tr,easeInQuart:sr,easeOutQuart:or,easeInOutQuart:ar,easeInQuint:nr,easeOutQuint:rr,easeInOutQuint:ir,easeInSine:lr,easeOutSine:cr,easeInOutSine:dr,easeInExpo:pr,easeOutExpo:ur,easeInOutExpo:hr,easeInCirc:fr,easeOutCirc:mr,easeInOutCirc:gr,easeInElastic:br,easeOutElastic:xr,easeInOutElastic:vr,easeInBack:wr,easeOutBack:yr,easeInOutBack:kr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:Cr};function $r(e,t={}){let{duration:s="1s",timing:o="ease",delay:a="0s",iteration:n="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${a} ${n} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=$r(t,s)}function nf(e){e.style.animation=""}function Sr(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function rf(e,t,s={}){let{stagger:o=100,...a}=s;e.forEach((n,r)=>{let i=`${r*o}ms`;je(n,t,{...a,delay:i})})}async function lf(e,t){for(let s of t)je(e,s.name,s.options),await Sr(e)}var cf={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 df(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function pf(e,t){let s=`
|
|
12
12
|
@keyframes ${e} {
|
|
13
13
|
${Object.entries(t).map(([a,n])=>{let r=Object.entries(n).map(([i,c])=>`${i}: ${c};`).join(" ");return`${a} { ${r} }`}).join(`
|
|
14
14
|
`)}
|
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.830",
|
|
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",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@iconify-json/f7": "^1.2.2",
|
|
85
85
|
"@stacksjs/ts-css": "^0.3.11",
|
|
86
|
-
"@stacksjs/stx": "0.2.
|
|
87
|
-
"bun-plugin-stx": "0.2.
|
|
86
|
+
"@stacksjs/stx": "0.2.830",
|
|
87
|
+
"bun-plugin-stx": "0.2.830",
|
|
88
88
|
"ts-syntax-highlighter": "^0.2.17",
|
|
89
89
|
"ts-video-player": "^0.1.11"
|
|
90
90
|
},
|
|
@@ -63,7 +63,7 @@ const delay = {{ delay }}
|
|
|
63
63
|
// A live prop: a tooltip is commonly suppressed by state the page only learns
|
|
64
64
|
// about later — while a field is being edited, or once a hint has been read —
|
|
65
65
|
// and frozen it could only ever reflect the state the page was built in.
|
|
66
|
-
const
|
|
66
|
+
const activeTooltipId = useId('tooltip')
|
|
67
67
|
const triggerRef = useRef('triggerRef')
|
|
68
68
|
const panelRef = useRef('panelRef')
|
|
69
69
|
const preferredSide = {{ position }}
|
|
@@ -72,6 +72,7 @@ const preferredSide = {{ position }}
|
|
|
72
72
|
const panelLimits = 'position:fixed;max-width:calc(100vw - 16px);margin:0;'
|
|
73
73
|
const panelStyle = state(nativePopup ? { position: 'absolute', margin: 0, transform: [] } : panelLimits)
|
|
74
74
|
const arrowStyle = state('')
|
|
75
|
+
const tooltipContent = useReactiveProp('content', {{ content }})
|
|
75
76
|
const isDisabled = useReactiveProp('disabled', {{ disabled }})
|
|
76
77
|
// Reactive prop binding — parent can drive `show` via signals. See #1704.
|
|
77
78
|
const isVisible = useReactiveProp('show', {{ show }})
|
|
@@ -167,7 +168,7 @@ effect(() => {
|
|
|
167
168
|
try {
|
|
168
169
|
if (nativePopup && !window.craft?.capabilities?.viewMeasure)
|
|
169
170
|
throw new Error('Native Tooltip requires viewMeasure support')
|
|
170
|
-
window.stx.overlays.open(
|
|
171
|
+
window.stx.overlays.open(activeTooltipId, { modal: false, root: nativePopup ? panelRef.value : null, panel: null, onEscape: hideTooltip, onBackdrop: hideTooltip })
|
|
171
172
|
if (nativePopup) stopPositioning = trackNativePopup(triggerRef.value, panelRef.value, preferredSide, style => panelStyle.set(style))
|
|
172
173
|
}
|
|
173
174
|
catch (error) {
|
|
@@ -175,7 +176,7 @@ effect(() => {
|
|
|
175
176
|
hideTooltip()
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
|
-
else window.stx.overlays.close(
|
|
179
|
+
else window.stx.overlays.close(activeTooltipId)
|
|
179
180
|
})
|
|
180
181
|
|
|
181
182
|
onDestroy(() => {
|
|
@@ -183,7 +184,7 @@ onDestroy(() => {
|
|
|
183
184
|
++positionGeneration
|
|
184
185
|
if (timeoutId) clearTimeout(timeoutId)
|
|
185
186
|
if (stopPositioning) stopPositioning()
|
|
186
|
-
window.stx.overlays.close(
|
|
187
|
+
window.stx.overlays.close(activeTooltipId)
|
|
187
188
|
})
|
|
188
189
|
|
|
189
190
|
/*
|
|
@@ -212,8 +213,8 @@ function describeTrigger() {
|
|
|
212
213
|
// there is nothing better to carry it.
|
|
213
214
|
const target = wrapper.firstElementChild || wrapper
|
|
214
215
|
const existing = (target.getAttribute('aria-describedby') || '').split(/\s+/).filter(Boolean)
|
|
215
|
-
if (existing.indexOf(
|
|
216
|
-
existing.push(
|
|
216
|
+
if (existing.indexOf(activeTooltipId) !== -1) return
|
|
217
|
+
existing.push(activeTooltipId)
|
|
217
218
|
target.setAttribute('aria-describedby', existing.join(' '))
|
|
218
219
|
}
|
|
219
220
|
|
|
@@ -254,13 +255,14 @@ onDestroy(() => { if (restorePanel) restorePanel() })
|
|
|
254
255
|
x-ref="panelRef"
|
|
255
256
|
:style="panelStyle"
|
|
256
257
|
id="{{ tooltipId }}"
|
|
258
|
+
:id="activeTooltipId"
|
|
257
259
|
:show="isVisible() && !isDisabled()"
|
|
258
260
|
class="{{ tooltipClasses }}"
|
|
259
261
|
role="tooltip"
|
|
260
262
|
@mouseenter="showTooltip()"
|
|
261
263
|
@mouseleave="hideTooltip()"
|
|
262
264
|
>
|
|
263
|
-
<span class="block" style="max-height:calc(100vh - 32px);overflow-y:auto;">{{ content }}</span>
|
|
265
|
+
<span class="block" style="max-height:calc(100vh - 32px);overflow-y:auto;" :text="tooltipContent">{{ content }}</span>
|
|
264
266
|
<span :show="!nativePopup" class="{{ arrowClass }}" :style="arrowStyle"></span>
|
|
265
267
|
</span>
|
|
266
268
|
</span>
|