@joy-ride/joy-ride 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/npm/bookmarklet.js +1 -1
- package/npm/embed-chunks/{Documentation-BLhgtEUK.js → Documentation-COD3aHk0.js} +2 -2
- package/npm/embed-chunks/bookmarklet-DiJXCaH2.js +20 -0
- package/npm/embed-chunks/src-Dk3uJEXq.js +1252 -0
- package/npm/embed-chunks/{vehicle-popover-C0m9IGMZ.js → vehicle-popover-BOloRPP9.js} +3 -3
- package/npm/embed.js +1 -1
- package/npm/index.d.ts +12 -12
- package/npm/index.js +1 -1
- package/package.json +1 -1
- package/npm/embed-chunks/bookmarklet-CETkHiK_.js +0 -20
- package/npm/embed-chunks/src-44B8xWmw.js +0 -1252
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Documentation-
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$ as r,E as i,J as a,K as o,Q as s,X as c,Y as l,Z as u,at as d,c as f,gt as p,ht as m,lt as h,mt as g,nt as _,ot as v,pt as y,q as b,tt as x,x as S}from"./bookmarklet-CETkHiK_.js";import{S as C,_ as w,a as T,b as E,c as D,d as O,f as k,g as A,h as j,i as M,l as N,m as P,n as F,o as I,p as L,r as R,s as z,u as B,v as V,x as H,y as ee}from"./src-44B8xWmw.js";import{A as te,B as U,C as ne,D as re,E as ie,F as ae,H as oe,I as se,L as ce,M as le,N as ue,O as de,P as fe,R as W,S as pe,T as me,V as he,_ as ge,a as _e,b as G,c as ve,d as ye,f as be,g as xe,h as Se,i as K,j as Ce,k as we,l as Te,m as Ee,n as De,o as q,p as Oe,r as ke,s as Ae,t as je,u as Me,v as Ne,w as Pe,x as Fe,y as J,z as Ie}from"./IconBase.es-CgBjh3hj.js";function Le(e,t){return[{label:`Speed`,read:e=>e.engineForceN/e.rollingResistance},{label:`Acceleration`,read:e=>e.engineForceN/e.massKg},{label:`Handling`,read:e=>e.corneringAccelerationMps2/Math.sqrt(g(e))},{label:`Drift`,read:e=>e.drift.slipAngleRad/e.drift.entrySpeedMps},{label:`Braking`,read:e=>e.handbrakeDecelerationMps2}].map(({label:n,read:r})=>{let i=t.map(r),a=Math.min(...i),o=Math.max(...i),s=o===a?.5:(r(e)-a)/(o-a);return{label:n,value:Math.round(20+s*80)}})}function Re(e){return e?.ownerDocument||document}var Y=t(oe(),1),ze=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z`}))]]),Be=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60ZM164,96h32a12,12,0,0,1,0,24H164a12,12,0,0,1,0-24Zm44,52a12,12,0,0,1-12,12H164a12,12,0,0,1,0-24h32A12,12,0,0,1,208,148Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32V88a32,32,0,0,1,32-32Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64ZM160,88h40a8,8,0,0,1,0,16H160a8,8,0,0,1,0-16Zm48,40a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,128Zm0,32a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,160Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,48H168a32,32,0,0,0-32,32v87.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V80A32,32,0,0,0,88,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,23.94,7.9,7.9,0,0,0,5.12,7.55A8,8,0,0,0,136,232a24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM208,168H168.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h39.73a8.17,8.17,0,0,1,8.25,7.47A8,8,0,0,1,208,168Zm0-32H168.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h39.73a8.17,8.17,0,0,1,8.25,7.47A8,8,0,0,1,208,136Zm0-32H168.27A8.17,8.17,0,0,1,160,96.53,8,8,0,0,1,168,88h39.73A8.17,8.17,0,0,1,216,95.47,8,8,0,0,1,208,104Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66ZM160,90h40a6,6,0,0,1,0,12H160a6,6,0,0,1,0-12Zm46,38a6,6,0,0,1-6,6H160a6,6,0,0,1,0-12h40A6,6,0,0,1,206,128Zm0,32a6,6,0,0,1-6,6H160a6,6,0,0,1,0-12h40A6,6,0,0,1,206,160Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64ZM160,88h40a8,8,0,0,1,0,16H160a8,8,0,0,1,0-16Zm48,40a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,128Zm0,32a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,160Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.94,35.94,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68ZM160,92h40a4,4,0,0,1,0,8H160a4,4,0,0,1,0-8Zm44,36a4,4,0,0,1-4,4H160a4,4,0,0,1,0-8h40A4,4,0,0,1,204,128Zm0,32a4,4,0,0,1-4,4H160a4,4,0,0,1,0-8h40A4,4,0,0,1,204,160Z`}))]]),Ve=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M236,108H213L170.83,65.86A19.86,19.86,0,0,0,156.69,60H48.28a20,20,0,0,0-16.64,8.91L2,113.34A12,12,0,0,0,0,120v48a20,20,0,0,0,20,20H33.5a34,34,0,0,0,65,0h59a34,34,0,0,0,65,0H236a20,20,0,0,0,20-20V128A20,20,0,0,0,236,108ZM50.42,84H155l24,24H34.42ZM66,188a10,10,0,1,1,10-10A10,10,0,0,1,66,188Zm124,0a10,10,0,1,1,10-10A10,10,0,0,1,190,188Zm42-24H221A34,34,0,0,0,159,164H97A34,34,0,0,0,35,164H24V132H232Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M88,176a24,24,0,1,1-24-24A24,24,0,0,1,88,176Zm104-24a24,24,0,1,0,24,24A24,24,0,0,0,192,152ZM162.34,74.34A8,8,0,0,0,156.69,72H44.28a8,8,0,0,0-6.66,3.56L8,120H208Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M240,112H211.31L168,68.69A15.86,15.86,0,0,0,156.69,64H44.28A16,16,0,0,0,31,71.12L1.34,115.56A8.07,8.07,0,0,0,0,120v48a16,16,0,0,0,16,16H33a32,32,0,0,0,62,0h66a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V128A16,16,0,0,0,240,112ZM44.28,80H156.69l32,32H23ZM64,192a16,16,0,1,1,16-16A16,16,0,0,1,64,192Zm128,0a16,16,0,1,1,16-16A16,16,0,0,1,192,192Zm48-24H223a32,32,0,0,0-62,0H95a32,32,0,0,0-62,0H16V128H240Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,112H211.31L168,68.69A15.86,15.86,0,0,0,156.69,64H44.28A16,16,0,0,0,31,71.12L1.34,115.56A8.07,8.07,0,0,0,0,120v48a16,16,0,0,0,16,16H33a32,32,0,0,0,62,0h66a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V128A16,16,0,0,0,240,112ZM44.28,80H156.69l32,32H23ZM64,192a16,16,0,1,1,16-16A16,16,0,0,1,64,192Zm128,0a16,16,0,1,1,16-16A16,16,0,0,1,192,192Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,114H210.49l-43.9-43.9a13.94,13.94,0,0,0-9.9-4.1H44.28a14,14,0,0,0-11.65,6.23L3,116.67A6,6,0,0,0,2,120v48a14,14,0,0,0,14,14H34.6a30,30,0,0,0,58.8,0h69.2a30,30,0,0,0,58.8,0H240a14,14,0,0,0,14-14V128A14,14,0,0,0,240,114ZM42.62,78.89A2,2,0,0,1,44.28,78H156.69a2,2,0,0,1,1.41.59L193.52,114H19.21ZM64,194a18,18,0,1,1,18-18A18,18,0,0,1,64,194Zm128,0a18,18,0,1,1,18-18A18,18,0,0,1,192,194Zm50-26a2,2,0,0,1-2,2H221.4a30,30,0,0,0-58.8,0H93.4a30,30,0,0,0-58.8,0H16a2,2,0,0,1-2-2V126H240a2,2,0,0,1,2,2Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,112H211.31L168,68.69A15.86,15.86,0,0,0,156.69,64H44.28A16,16,0,0,0,31,71.12L1.34,115.56A8.07,8.07,0,0,0,0,120v48a16,16,0,0,0,16,16H33a32,32,0,0,0,62,0h66a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V128A16,16,0,0,0,240,112ZM44.28,80H156.69l32,32H23ZM64,192a16,16,0,1,1,16-16A16,16,0,0,1,64,192Zm128,0a16,16,0,1,1,16-16A16,16,0,0,1,192,192Zm48-24H223a32,32,0,0,0-62,0H95a32,32,0,0,0-62,0H16V128H240Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,116H209.66L165.17,71.52A11.9,11.9,0,0,0,156.69,68H44.28a12,12,0,0,0-10,5.34L4.67,117.78A4,4,0,0,0,4,120v48a12,12,0,0,0,12,12H36.29a28,28,0,0,0,55.42,0h72.58a28,28,0,0,0,55.42,0H240a12,12,0,0,0,12-12V128A12,12,0,0,0,240,116ZM41,77.78A4,4,0,0,1,44.28,76H156.69a4,4,0,0,1,2.82,1.17L198.34,116H15.47ZM64,196a20,20,0,1,1,20-20A20,20,0,0,1,64,196Zm128,0a20,20,0,1,1,20-20A20,20,0,0,1,192,196Zm52-28a4,4,0,0,1-4,4H219.71a28,28,0,0,0-55.42,0H91.71a28,28,0,0,0-55.42,0H16a4,4,0,0,1-4-4V124H240a4,4,0,0,1,4,4Z`}))]]),He=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Ue=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]]),We=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),Ge=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),Ke=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),qe=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M71.68,97.22,34.74,128l36.94,30.78a12,12,0,1,1-15.36,18.44l-48-40a12,12,0,0,1,0-18.44l48-40A12,12,0,0,1,71.68,97.22Zm176,21.56-48-40a12,12,0,1,0-15.36,18.44L221.26,128l-36.94,30.78a12,12,0,1,0,15.36,18.44l48-40a12,12,0,0,0,0-18.44ZM164.1,28.72a12,12,0,0,0-15.38,7.18l-64,176a12,12,0,0,0,7.18,15.37A11.79,11.79,0,0,0,96,228a12,12,0,0,0,11.28-7.9l64-176A12,12,0,0,0,164.1,28.72Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,128l-48,40H64L16,128,64,88H192Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM92.8,145.6a8,8,0,1,1-9.6,12.8l-32-24a8,8,0,0,1,0-12.8l32-24a8,8,0,0,1,9.6,12.8L69.33,128Zm58.89-71.4-32,112a8,8,0,1,1-15.38-4.4l32-112a8,8,0,0,1,15.38,4.4Zm53.11,60.2-32,24a8,8,0,0,1-9.6-12.8L186.67,128,163.2,110.4a8,8,0,1,1,9.6-12.8l32,24a8,8,0,0,1,0,12.8Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M67.84,92.61,25.37,128l42.47,35.39a6,6,0,1,1-7.68,9.22l-48-40a6,6,0,0,1,0-9.22l48-40a6,6,0,0,1,7.68,9.22Zm176,30.78-48-40a6,6,0,1,0-7.68,9.22L230.63,128l-42.47,35.39a6,6,0,1,0,7.68,9.22l48-40a6,6,0,0,0,0-9.22Zm-81.79-89A6,6,0,0,0,154.36,38l-64,176A6,6,0,0,0,94,221.64a6.15,6.15,0,0,0,2,.36,6,6,0,0,0,5.64-3.95l64-176A6,6,0,0,0,162.05,34.36Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M66.56,91.07,22.25,128l44.31,36.93A4,4,0,0,1,64,172a3.94,3.94,0,0,1-2.56-.93l-48-40a4,4,0,0,1,0-6.14l48-40a4,4,0,0,1,5.12,6.14Zm176,33.86-48-40a4,4,0,1,0-5.12,6.14L233.75,128l-44.31,36.93a4,4,0,1,0,5.12,6.14l48-40a4,4,0,0,0,0-6.14ZM161.37,36.24a4,4,0,0,0-5.13,2.39l-64,176a4,4,0,0,0,2.39,5.13A4.12,4.12,0,0,0,96,220a4,4,0,0,0,3.76-2.63l64-176A4,4,0,0,0,161.37,36.24Z`}))]]),Je=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Ye=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,116h-4.72A100.21,100.21,0,0,0,140,28.72V24a12,12,0,0,0-24,0v4.72A100.21,100.21,0,0,0,28.72,116H24a12,12,0,0,0,0,24h4.72A100.21,100.21,0,0,0,116,227.28V232a12,12,0,0,0,24,0v-4.72A100.21,100.21,0,0,0,227.28,140H232a12,12,0,0,0,0-24Zm-92,87v-3a12,12,0,0,0-24,0v3a76.15,76.15,0,0,1-63-63h3a12,12,0,0,0,0-24H53a76.15,76.15,0,0,1,63-63v3a12,12,0,0,0,24,0V53a76.15,76.15,0,0,1,63,63h-3a12,12,0,0,0,0,24h3A76.15,76.15,0,0,1,140,203ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-32,16h7.6A80.15,80.15,0,0,1,136,207.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16Zm-32-8a40,40,0,1,1-40-40A40,40,0,0,1,168,128Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,122H221.8A94.13,94.13,0,0,0,134,34.2V24a6,6,0,0,0-12,0V34.2A94.13,94.13,0,0,0,34.2,122H24a6,6,0,0,0,0,12H34.2A94.13,94.13,0,0,0,122,221.8V232a6,6,0,0,0,12,0V221.8A94.13,94.13,0,0,0,221.8,134H232a6,6,0,0,0,0-12Zm-98,87.76V200a6,6,0,0,0-12,0v9.76A82.09,82.09,0,0,1,46.24,134H56a6,6,0,0,0,0-12H46.24A82.09,82.09,0,0,1,122,46.24V56a6,6,0,0,0,12,0V46.24A82.09,82.09,0,0,1,209.76,122H200a6,6,0,0,0,0,12h9.76A82.09,82.09,0,0,1,134,209.76ZM128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,124H219.91A92.13,92.13,0,0,0,132,36.09V24a4,4,0,0,0-8,0V36.09A92.13,92.13,0,0,0,36.09,124H24a4,4,0,0,0,0,8H36.09A92.13,92.13,0,0,0,124,219.91V232a4,4,0,0,0,8,0V219.91A92.13,92.13,0,0,0,219.91,132H232a4,4,0,0,0,0-8ZM132,211.9V200a4,4,0,0,0-8,0v11.9A84.11,84.11,0,0,1,44.1,132H56a4,4,0,0,0,0-8H44.1A84.11,84.11,0,0,1,124,44.1V56a4,4,0,0,0,8,0V44.1A84.11,84.11,0,0,1,211.9,124H200a4,4,0,0,0,0,8h11.9A84.11,84.11,0,0,1,132,211.9ZM128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Z`}))]]),Xe=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,128,115.4,56,76ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l72-39.4v76.65Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.16a8,8,0,0,1-4.16-7V80.2a8,8,0,0,1,.7-3.27Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,120,47.65,76,128,32l80.35,44Zm8,99.64V133.83l80-43.78v85.76Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222.72,67.9l-88-48.17a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.9ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,128,122.24,43.49,76ZM39,177.57a2,2,0,0,1-1-1.75V86.66l84,46V223Zm177.92,0L134,223V132.64l84-46v89.16A2,2,0,0,1,217,177.57Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,128,124.52,39.33,76Zm-88,150.83A4,4,0,0,1,36,175.82V83.29l88,48.16v94.91Zm179.84,0-85.92,47V131.45l88-48.16v92.53A4,4,0,0,1,217.92,179.32Z`}))]]),Ze=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M236,100H225L190.83,65.86A19.86,19.86,0,0,0,176.69,60H144V44h20a12,12,0,0,0,0-24H100a12,12,0,0,0,0,24h20V60H64A20,20,0,0,0,44,80v48H28V108a12,12,0,0,0-24,0v64a12,12,0,0,0,24,0V152H44v16.69a19.86,19.86,0,0,0,5.86,14.14l39.31,39.31A19.86,19.86,0,0,0,103.31,228h73.38a19.86,19.86,0,0,0,14.14-5.86L225,188h11a20,20,0,0,0,20-20V120A20,20,0,0,0,236,100Zm-4,64H220a12,12,0,0,0-8.49,3.51L175,204H105L68,167V84H175l36.48,36.49A12,12,0,0,0,220,124h12Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M248,120v48a8,8,0,0,1-8,8H224l-37.66,37.66a8,8,0,0,1-5.65,2.34H103.31a8,8,0,0,1-5.65-2.34L58.34,174.34A8,8,0,0,1,56,168.69V80a8,8,0,0,1,8-8H180.69a8,8,0,0,1,5.65,2.34L224,112h16A8,8,0,0,1,248,120Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M240,104H227.31L192,68.69A15.86,15.86,0,0,0,180.69,64H140V40h24a8,8,0,0,0,0-16H100a8,8,0,0,0,0,16h24V64H64A16,16,0,0,0,48,80v52H24V108a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0V148H48v20.69A15.86,15.86,0,0,0,52.69,180L92,219.31A15.86,15.86,0,0,0,103.31,224h77.38A15.86,15.86,0,0,0,192,219.31L227.31,184H240a16,16,0,0,0,16-16V120A16,16,0,0,0,240,104Zm0,64H224a8,8,0,0,0-5.66,2.34L180.69,208H103.31L64,168.69V80H180.69l37.65,37.66A8,8,0,0,0,224,120h16Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M256,120v48a16,16,0,0,1-16,16H227.31L192,219.31A15.86,15.86,0,0,1,180.69,224H103.31A15.86,15.86,0,0,1,92,219.31L52.69,180A15.86,15.86,0,0,1,48,168.69V148H24v24a8,8,0,0,1-16,0V108a8,8,0,0,1,16,0v24H48V80A16,16,0,0,1,64,64h60V40H100a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16H140V64h40.69A15.86,15.86,0,0,1,192,68.69L227.31,104H240A16,16,0,0,1,256,120Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,106H226.49L190.58,70.1a13.9,13.9,0,0,0-9.89-4.1H138V38h26a6,6,0,0,0,0-12H100a6,6,0,0,0,0,12h26V66H64A14,14,0,0,0,50,80v54H22V108a6,6,0,0,0-12,0v64a6,6,0,0,0,12,0V146H50v22.69a13.9,13.9,0,0,0,4.1,9.89L93.42,217.9a13.9,13.9,0,0,0,9.89,4.1h77.38a13.9,13.9,0,0,0,9.89-4.1L226.49,182H240a14,14,0,0,0,14-14V120A14,14,0,0,0,240,106Zm2,62a2,2,0,0,1-2,2H224a6,6,0,0,0-4.24,1.76L182.1,209.42a2,2,0,0,1-1.41.58H103.31a2,2,0,0,1-1.41-.58L62.58,170.1a2,2,0,0,1-.58-1.41V80a2,2,0,0,1,2-2H180.69a2,2,0,0,1,1.41.58l37.66,37.66A6,6,0,0,0,224,118h16a2,2,0,0,1,2,2Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,104H227.31L192,68.69A15.86,15.86,0,0,0,180.69,64H140V40h24a8,8,0,0,0,0-16H100a8,8,0,0,0,0,16h24V64H64A16,16,0,0,0,48,80v52H24V108a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0V148H48v20.69A15.86,15.86,0,0,0,52.69,180L92,219.31A15.86,15.86,0,0,0,103.31,224h77.38A15.86,15.86,0,0,0,192,219.31L227.31,184H240a16,16,0,0,0,16-16V120A16,16,0,0,0,240,104Zm0,64H224a8,8,0,0,0-5.66,2.34L180.69,208H103.31L64,168.69V80H180.69l37.65,37.66A8,8,0,0,0,224,120h16Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,108H225.66L189.17,71.51A11.93,11.93,0,0,0,180.69,68H136V36h28a4,4,0,0,0,0-8H100a4,4,0,0,0,0,8h28V68H64A12,12,0,0,0,52,80v56H20V108a4,4,0,0,0-8,0v64a4,4,0,0,0,8,0V144H52v24.69a11.93,11.93,0,0,0,3.51,8.48l39.32,39.32a11.93,11.93,0,0,0,8.48,3.51h77.38a11.93,11.93,0,0,0,8.48-3.51L225.66,180H240a12,12,0,0,0,12-12V120A12,12,0,0,0,240,108Zm4,60a4,4,0,0,1-4,4H224a4,4,0,0,0-2.83,1.17l-37.66,37.66a4,4,0,0,1-2.82,1.17H103.31a4,4,0,0,1-2.82-1.17L61.17,171.51A4,4,0,0,1,60,168.69V80a4,4,0,0,1,4-4H180.69a4,4,0,0,1,2.82,1.17l37.66,37.66A4,4,0,0,0,224,116h16a4,4,0,0,1,4,4Z`}))]]),Qe=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z`}))]]),$e=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z`}))]]),et=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,44H32A20,20,0,0,0,12,64V192a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V64A20,20,0,0,0,224,44Zm-4,144H36V68H220ZM52,128a12,12,0,0,1,12-12H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,128Zm0-36A12,12,0,0,1,64,80H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,92Zm0,72a12,12,0,0,1,12-12h8a12,12,0,0,1,0,24H64A12,12,0,0,1,52,164Zm108,0a12,12,0,0,1-12,12H108a12,12,0,0,1,0-24h40A12,12,0,0,1,160,164Zm44,0a12,12,0,0,1-12,12h-8a12,12,0,0,1,0-24h8A12,12,0,0,1,204,164Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,64V192a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H224A8,8,0,0,1,232,64Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM64,168H48a8,8,0,0,1,0-16H64a8,8,0,0,1,0,16Zm96,0H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm48,0H192a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,50H32A14,14,0,0,0,18,64V192a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50Zm2,142a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2Zm-20-64a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,128Zm0-32a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,96ZM70,160a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12h8A6,6,0,0,1,70,160Zm96,0a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,160Zm40,0a6,6,0,0,1-6,6h-8a6,6,0,0,1,0-12h8A6,6,0,0,1,206,160Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,52H32A12,12,0,0,0,20,64V192a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52Zm4,140a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4Zm-24-64a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,128Zm0-32a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,96ZM68,160a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8h8A4,4,0,0,1,68,160Zm96,0a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,160Zm40,0a4,4,0,0,1-4,4h-8a4,4,0,0,1,0-8h8A4,4,0,0,1,204,160Z`}))]]),tt=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),nt=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),rt=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),it=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M72,104a16,16,0,1,1,16,16A16,16,0,0,1,72,104Zm96,16a16,16,0,1,0-16-16A16,16,0,0,0,168,120Zm68-40V192a36,36,0,0,1-36,36H56a36,36,0,0,1-36-36V80A36,36,0,0,1,56,44h60V16a12,12,0,0,1,24,0V44h60A36,36,0,0,1,236,80Zm-24,0a12,12,0,0,0-12-12H56A12,12,0,0,0,44,80V192a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12Zm-12,82a30,30,0,0,1-30,30H86a30,30,0,0,1,0-60h84A30,30,0,0,1,200,162Zm-80-6v12h16V156ZM86,168H96V156H86a6,6,0,0,0,0,12Zm90-6a6,6,0,0,0-6-6H160v12h10A6,6,0,0,0,176,162Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,56H56A24,24,0,0,0,32,80V192a24,24,0,0,0,24,24H200a24,24,0,0,0,24-24V80A24,24,0,0,0,200,56ZM164,184H92a20,20,0,0,1,0-40h72a20,20,0,0,1,0,40Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Zm4,28H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48ZM172,96a12,12,0,1,1-12,12A12,12,0,0,1,172,96ZM96,184H80a16,16,0,0,1,0-32H96ZM84,120a12,12,0,1,1,12-12A12,12,0,0,1,84,120Zm60,64H112V152h32Zm32,0H160V152h16a16,16,0,0,1,0,32Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,50H134V16a6,6,0,0,0-12,0V50H56A30,30,0,0,0,26,80V192a30,30,0,0,0,30,30H200a30,30,0,0,0,30-30V80A30,30,0,0,0,200,50Zm18,142a18,18,0,0,1-18,18H56a18,18,0,0,1-18-18V80A18,18,0,0,1,56,62H200a18,18,0,0,1,18,18ZM74,108a10,10,0,1,1,10,10A10,10,0,0,1,74,108Zm88,0a10,10,0,1,1,10,10A10,10,0,0,1,162,108Zm2,30H92a26,26,0,0,0,0,52h72a26,26,0,0,0,0-52Zm-22,12v28H114V150ZM78,164a14,14,0,0,1,14-14h10v28H92A14,14,0,0,1,78,164Zm86,14H154V150h10a14,14,0,0,1,0,28Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,52H132V16a4,4,0,0,0-8,0V52H56A28,28,0,0,0,28,80V192a28,28,0,0,0,28,28H200a28,28,0,0,0,28-28V80A28,28,0,0,0,200,52Zm20,140a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V80A20,20,0,0,1,56,60H200a20,20,0,0,1,20,20ZM76,108a8,8,0,1,1,8,8A8,8,0,0,1,76,108Zm88,0a8,8,0,1,1,8,8A8,8,0,0,1,164,108Zm0,32H92a24,24,0,0,0,0,48h72a24,24,0,0,0,0-48Zm-20,8v32H112V148ZM76,164a16,16,0,0,1,16-16h12v32H92A16,16,0,0,1,76,164Zm88,16H152V148h12a16,16,0,0,1,0,32Z`}))]]),at=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),ot=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0ZM96.49,80.49,116,61v83a12,12,0,0,0,24,0V61l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM88,80h32v64a8,8,0,0,0,16,0V80h32a8,8,0,0,0,5.66-13.66l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,88,80Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0ZM92.24,76.24,122,46.49V144a6,6,0,0,0,12,0V46.49l29.76,29.75a6,6,0,0,0,8.48-8.48l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0ZM90.83,74.83,124,41.66V144a4,4,0,0,0,8,0V41.66l33.17,33.17a4,4,0,1,0,5.66-5.66l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66Z`}))]]),st=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:ze}));st.displayName=`ArrowCounterClockwiseIcon`;var ct=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Be}));ct.displayName=`BookOpenTextIcon`;var lt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ve}));lt.displayName=`CarProfileIcon`;var ut=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:He}));ut.displayName=`CaretDownIcon`;var dt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ue}));dt.displayName=`CaretLeftIcon`;var ft=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:We}));ft.displayName=`CaretRightIcon`;var pt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ge}));pt.displayName=`CaretUpIcon`;var mt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ke}));mt.displayName=`CheckIcon`;var ht=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:qe}));ht.displayName=`CodeIcon`;var gt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Je}));gt.displayName=`CopyIcon`;var _t=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ye}));_t.displayName=`CrosshairIcon`;var vt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Xe}));vt.displayName=`CubeIcon`;var yt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ze}));yt.displayName=`EngineIcon`;var bt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Qe}));bt.displayName=`GearIcon`;var xt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:$e}));xt.displayName=`GithubLogoIcon`;var St=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:et}));St.displayName=`KeyboardIcon`;var Ct=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:tt}));Ct.displayName=`MoonIcon`;var wt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:nt}));wt.displayName=`PencilSimpleIcon`;var Tt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:rt}));Tt.displayName=`PlusIcon`;var Et=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:it}));Et.displayName=`RobotIcon`;var Dt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:at}));Dt.displayName=`SunIcon`;var Ot=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:ot}));Ot.displayName=`UploadSimpleIcon`;var kt=t(j(),1),X=ke(),At=`identifier keyword string class property entity jsxliterals sign comment break space`.split(` `),[jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt]=At.map((e,t)=>t);new Map(At.map((e,t)=>[e,t]));function Ht(e,t){let n=[],r=0,i=[],a=!1;function o(e){let t=``,i=Array(e.length);for(let n=0;n<e.length;n++){let[r,a]=e[n];t+=a,i[n]={type:At[r],value:a}}n.push({index:r++,value:t,tokens:i,annotations:[]})}for(let e=0;e<t.length;e++){let n=t[e],[r,s]=n;if(r!==Bt){if(s.includes(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Documentation-COD3aHk0.js","./rolldown-runtime-XKyaHtl9.js","./IconBase.es-CgBjh3hj.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$ as r,E as i,J as a,K as o,Q as s,X as c,Y as l,Z as u,at as d,c as f,gt as p,ht as m,lt as h,mt as g,nt as _,ot as v,pt as y,q as b,tt as x,x as S}from"./bookmarklet-DiJXCaH2.js";import{S as C,_ as w,a as T,b as E,c as D,d as O,f as k,g as A,h as j,i as M,l as N,m as P,n as F,o as I,p as L,r as R,s as z,u as B,v as V,x as H,y as ee}from"./src-Dk3uJEXq.js";import{A as te,B as U,C as ne,D as re,E as ie,F as ae,H as oe,I as se,L as ce,M as le,N as ue,O as de,P as fe,R as W,S as pe,T as me,V as he,_ as ge,a as _e,b as G,c as ve,d as ye,f as be,g as xe,h as Se,i as K,j as Ce,k as we,l as Te,m as Ee,n as De,o as q,p as Oe,r as ke,s as Ae,t as je,u as Me,v as Ne,w as Pe,x as Fe,y as J,z as Ie}from"./IconBase.es-CgBjh3hj.js";function Le(e,t){return[{label:`Speed`,read:e=>e.engineForceN/e.rollingResistance},{label:`Acceleration`,read:e=>e.engineForceN/e.massKg},{label:`Handling`,read:e=>e.corneringAccelerationMps2/Math.sqrt(g(e))},{label:`Drift`,read:e=>e.drift.slipAngleRad/e.drift.entrySpeedMps},{label:`Braking`,read:e=>e.handbrakeDecelerationMps2}].map(({label:n,read:r})=>{let i=t.map(r),a=Math.min(...i),o=Math.max(...i),s=o===a?.5:(r(e)-a)/(o-a);return{label:n,value:Math.round(20+s*80)}})}function Re(e){return e?.ownerDocument||document}var Y=t(oe(),1),ze=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z`}))]]),Be=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60ZM164,96h32a12,12,0,0,1,0,24H164a12,12,0,0,1,0-24Zm44,52a12,12,0,0,1-12,12H164a12,12,0,0,1,0-24h32A12,12,0,0,1,208,148Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32V88a32,32,0,0,1,32-32Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64ZM160,88h40a8,8,0,0,1,0,16H160a8,8,0,0,1,0-16Zm48,40a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,128Zm0,32a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,160Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,48H168a32,32,0,0,0-32,32v87.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V80A32,32,0,0,0,88,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,23.94,7.9,7.9,0,0,0,5.12,7.55A8,8,0,0,0,136,232a24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM208,168H168.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h39.73a8.17,8.17,0,0,1,8.25,7.47A8,8,0,0,1,208,168Zm0-32H168.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h39.73a8.17,8.17,0,0,1,8.25,7.47A8,8,0,0,1,208,136Zm0-32H168.27A8.17,8.17,0,0,1,160,96.53,8,8,0,0,1,168,88h39.73A8.17,8.17,0,0,1,216,95.47,8,8,0,0,1,208,104Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66ZM160,90h40a6,6,0,0,1,0,12H160a6,6,0,0,1,0-12Zm46,38a6,6,0,0,1-6,6H160a6,6,0,0,1,0-12h40A6,6,0,0,1,206,128Zm0,32a6,6,0,0,1-6,6H160a6,6,0,0,1,0-12h40A6,6,0,0,1,206,160Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64ZM160,88h40a8,8,0,0,1,0,16H160a8,8,0,0,1,0-16Zm48,40a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,128Zm0,32a8,8,0,0,1-8,8H160a8,8,0,0,1,0-16h40A8,8,0,0,1,208,160Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.94,35.94,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68ZM160,92h40a4,4,0,0,1,0,8H160a4,4,0,0,1,0-8Zm44,36a4,4,0,0,1-4,4H160a4,4,0,0,1,0-8h40A4,4,0,0,1,204,128Zm0,32a4,4,0,0,1-4,4H160a4,4,0,0,1,0-8h40A4,4,0,0,1,204,160Z`}))]]),Ve=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M236,108H213L170.83,65.86A19.86,19.86,0,0,0,156.69,60H48.28a20,20,0,0,0-16.64,8.91L2,113.34A12,12,0,0,0,0,120v48a20,20,0,0,0,20,20H33.5a34,34,0,0,0,65,0h59a34,34,0,0,0,65,0H236a20,20,0,0,0,20-20V128A20,20,0,0,0,236,108ZM50.42,84H155l24,24H34.42ZM66,188a10,10,0,1,1,10-10A10,10,0,0,1,66,188Zm124,0a10,10,0,1,1,10-10A10,10,0,0,1,190,188Zm42-24H221A34,34,0,0,0,159,164H97A34,34,0,0,0,35,164H24V132H232Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M88,176a24,24,0,1,1-24-24A24,24,0,0,1,88,176Zm104-24a24,24,0,1,0,24,24A24,24,0,0,0,192,152ZM162.34,74.34A8,8,0,0,0,156.69,72H44.28a8,8,0,0,0-6.66,3.56L8,120H208Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M240,112H211.31L168,68.69A15.86,15.86,0,0,0,156.69,64H44.28A16,16,0,0,0,31,71.12L1.34,115.56A8.07,8.07,0,0,0,0,120v48a16,16,0,0,0,16,16H33a32,32,0,0,0,62,0h66a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V128A16,16,0,0,0,240,112ZM44.28,80H156.69l32,32H23ZM64,192a16,16,0,1,1,16-16A16,16,0,0,1,64,192Zm128,0a16,16,0,1,1,16-16A16,16,0,0,1,192,192Zm48-24H223a32,32,0,0,0-62,0H95a32,32,0,0,0-62,0H16V128H240Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,112H211.31L168,68.69A15.86,15.86,0,0,0,156.69,64H44.28A16,16,0,0,0,31,71.12L1.34,115.56A8.07,8.07,0,0,0,0,120v48a16,16,0,0,0,16,16H33a32,32,0,0,0,62,0h66a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V128A16,16,0,0,0,240,112ZM44.28,80H156.69l32,32H23ZM64,192a16,16,0,1,1,16-16A16,16,0,0,1,64,192Zm128,0a16,16,0,1,1,16-16A16,16,0,0,1,192,192Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,114H210.49l-43.9-43.9a13.94,13.94,0,0,0-9.9-4.1H44.28a14,14,0,0,0-11.65,6.23L3,116.67A6,6,0,0,0,2,120v48a14,14,0,0,0,14,14H34.6a30,30,0,0,0,58.8,0h69.2a30,30,0,0,0,58.8,0H240a14,14,0,0,0,14-14V128A14,14,0,0,0,240,114ZM42.62,78.89A2,2,0,0,1,44.28,78H156.69a2,2,0,0,1,1.41.59L193.52,114H19.21ZM64,194a18,18,0,1,1,18-18A18,18,0,0,1,64,194Zm128,0a18,18,0,1,1,18-18A18,18,0,0,1,192,194Zm50-26a2,2,0,0,1-2,2H221.4a30,30,0,0,0-58.8,0H93.4a30,30,0,0,0-58.8,0H16a2,2,0,0,1-2-2V126H240a2,2,0,0,1,2,2Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,112H211.31L168,68.69A15.86,15.86,0,0,0,156.69,64H44.28A16,16,0,0,0,31,71.12L1.34,115.56A8.07,8.07,0,0,0,0,120v48a16,16,0,0,0,16,16H33a32,32,0,0,0,62,0h66a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V128A16,16,0,0,0,240,112ZM44.28,80H156.69l32,32H23ZM64,192a16,16,0,1,1,16-16A16,16,0,0,1,64,192Zm128,0a16,16,0,1,1,16-16A16,16,0,0,1,192,192Zm48-24H223a32,32,0,0,0-62,0H95a32,32,0,0,0-62,0H16V128H240Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,116H209.66L165.17,71.52A11.9,11.9,0,0,0,156.69,68H44.28a12,12,0,0,0-10,5.34L4.67,117.78A4,4,0,0,0,4,120v48a12,12,0,0,0,12,12H36.29a28,28,0,0,0,55.42,0h72.58a28,28,0,0,0,55.42,0H240a12,12,0,0,0,12-12V128A12,12,0,0,0,240,116ZM41,77.78A4,4,0,0,1,44.28,76H156.69a4,4,0,0,1,2.82,1.17L198.34,116H15.47ZM64,196a20,20,0,1,1,20-20A20,20,0,0,1,64,196Zm128,0a20,20,0,1,1,20-20A20,20,0,0,1,192,196Zm52-28a4,4,0,0,1-4,4H219.71a28,28,0,0,0-55.42,0H91.71a28,28,0,0,0-55.42,0H16a4,4,0,0,1-4-4V124H240a4,4,0,0,1,4,4Z`}))]]),He=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Ue=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]]),We=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),Ge=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),Ke=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),qe=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M71.68,97.22,34.74,128l36.94,30.78a12,12,0,1,1-15.36,18.44l-48-40a12,12,0,0,1,0-18.44l48-40A12,12,0,0,1,71.68,97.22Zm176,21.56-48-40a12,12,0,1,0-15.36,18.44L221.26,128l-36.94,30.78a12,12,0,1,0,15.36,18.44l48-40a12,12,0,0,0,0-18.44ZM164.1,28.72a12,12,0,0,0-15.38,7.18l-64,176a12,12,0,0,0,7.18,15.37A11.79,11.79,0,0,0,96,228a12,12,0,0,0,11.28-7.9l64-176A12,12,0,0,0,164.1,28.72Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,128l-48,40H64L16,128,64,88H192Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM92.8,145.6a8,8,0,1,1-9.6,12.8l-32-24a8,8,0,0,1,0-12.8l32-24a8,8,0,0,1,9.6,12.8L69.33,128Zm58.89-71.4-32,112a8,8,0,1,1-15.38-4.4l32-112a8,8,0,0,1,15.38,4.4Zm53.11,60.2-32,24a8,8,0,0,1-9.6-12.8L186.67,128,163.2,110.4a8,8,0,1,1,9.6-12.8l32,24a8,8,0,0,1,0,12.8Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M67.84,92.61,25.37,128l42.47,35.39a6,6,0,1,1-7.68,9.22l-48-40a6,6,0,0,1,0-9.22l48-40a6,6,0,0,1,7.68,9.22Zm176,30.78-48-40a6,6,0,1,0-7.68,9.22L230.63,128l-42.47,35.39a6,6,0,1,0,7.68,9.22l48-40a6,6,0,0,0,0-9.22Zm-81.79-89A6,6,0,0,0,154.36,38l-64,176A6,6,0,0,0,94,221.64a6.15,6.15,0,0,0,2,.36,6,6,0,0,0,5.64-3.95l64-176A6,6,0,0,0,162.05,34.36Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M66.56,91.07,22.25,128l44.31,36.93A4,4,0,0,1,64,172a3.94,3.94,0,0,1-2.56-.93l-48-40a4,4,0,0,1,0-6.14l48-40a4,4,0,0,1,5.12,6.14Zm176,33.86-48-40a4,4,0,1,0-5.12,6.14L233.75,128l-44.31,36.93a4,4,0,1,0,5.12,6.14l48-40a4,4,0,0,0,0-6.14ZM161.37,36.24a4,4,0,0,0-5.13,2.39l-64,176a4,4,0,0,0,2.39,5.13A4.12,4.12,0,0,0,96,220a4,4,0,0,0,3.76-2.63l64-176A4,4,0,0,0,161.37,36.24Z`}))]]),Je=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Ye=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,116h-4.72A100.21,100.21,0,0,0,140,28.72V24a12,12,0,0,0-24,0v4.72A100.21,100.21,0,0,0,28.72,116H24a12,12,0,0,0,0,24h4.72A100.21,100.21,0,0,0,116,227.28V232a12,12,0,0,0,24,0v-4.72A100.21,100.21,0,0,0,227.28,140H232a12,12,0,0,0,0-24Zm-92,87v-3a12,12,0,0,0-24,0v3a76.15,76.15,0,0,1-63-63h3a12,12,0,0,0,0-24H53a76.15,76.15,0,0,1,63-63v3a12,12,0,0,0,24,0V53a76.15,76.15,0,0,1,63,63h-3a12,12,0,0,0,0,24h3A76.15,76.15,0,0,1,140,203ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-32,16h7.6A80.15,80.15,0,0,1,136,207.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16Zm-32-8a40,40,0,1,1-40-40A40,40,0,0,1,168,128Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,122H221.8A94.13,94.13,0,0,0,134,34.2V24a6,6,0,0,0-12,0V34.2A94.13,94.13,0,0,0,34.2,122H24a6,6,0,0,0,0,12H34.2A94.13,94.13,0,0,0,122,221.8V232a6,6,0,0,0,12,0V221.8A94.13,94.13,0,0,0,221.8,134H232a6,6,0,0,0,0-12Zm-98,87.76V200a6,6,0,0,0-12,0v9.76A82.09,82.09,0,0,1,46.24,134H56a6,6,0,0,0,0-12H46.24A82.09,82.09,0,0,1,122,46.24V56a6,6,0,0,0,12,0V46.24A82.09,82.09,0,0,1,209.76,122H200a6,6,0,0,0,0,12h9.76A82.09,82.09,0,0,1,134,209.76ZM128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,120h-8.34A96.14,96.14,0,0,0,136,32.34V24a8,8,0,0,0-16,0v8.34A96.14,96.14,0,0,0,32.34,120H24a8,8,0,0,0,0,16h8.34A96.14,96.14,0,0,0,120,223.66V232a8,8,0,0,0,16,0v-8.34A96.14,96.14,0,0,0,223.66,136H232a8,8,0,0,0,0-16Zm-96,87.6V200a8,8,0,0,0-16,0v7.6A80.15,80.15,0,0,1,48.4,136H56a8,8,0,0,0,0-16H48.4A80.15,80.15,0,0,1,120,48.4V56a8,8,0,0,0,16,0V48.4A80.15,80.15,0,0,1,207.6,120H200a8,8,0,0,0,0,16h7.6A80.15,80.15,0,0,1,136,207.6ZM128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,124H219.91A92.13,92.13,0,0,0,132,36.09V24a4,4,0,0,0-8,0V36.09A92.13,92.13,0,0,0,36.09,124H24a4,4,0,0,0,0,8H36.09A92.13,92.13,0,0,0,124,219.91V232a4,4,0,0,0,8,0V219.91A92.13,92.13,0,0,0,219.91,132H232a4,4,0,0,0,0-8ZM132,211.9V200a4,4,0,0,0-8,0v11.9A84.11,84.11,0,0,1,44.1,132H56a4,4,0,0,0,0-8H44.1A84.11,84.11,0,0,1,124,44.1V56a4,4,0,0,0,8,0V44.1A84.11,84.11,0,0,1,211.9,124H200a4,4,0,0,0,0,8h11.9A84.11,84.11,0,0,1,132,211.9ZM128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Z`}))]]),Xe=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,128,115.4,56,76ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l72-39.4v76.65Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.16a8,8,0,0,1-4.16-7V80.2a8,8,0,0,1,.7-3.27Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,120,47.65,76,128,32l80.35,44Zm8,99.64V133.83l80-43.78v85.76Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222.72,67.9l-88-48.17a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.9ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,128,122.24,43.49,76ZM39,177.57a2,2,0,0,1-1-1.75V86.66l84,46V223Zm177.92,0L134,223V132.64l84-46v89.16A2,2,0,0,1,217,177.57Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,128,124.52,39.33,76Zm-88,150.83A4,4,0,0,1,36,175.82V83.29l88,48.16v94.91Zm179.84,0-85.92,47V131.45l88-48.16v92.53A4,4,0,0,1,217.92,179.32Z`}))]]),Ze=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M236,100H225L190.83,65.86A19.86,19.86,0,0,0,176.69,60H144V44h20a12,12,0,0,0,0-24H100a12,12,0,0,0,0,24h20V60H64A20,20,0,0,0,44,80v48H28V108a12,12,0,0,0-24,0v64a12,12,0,0,0,24,0V152H44v16.69a19.86,19.86,0,0,0,5.86,14.14l39.31,39.31A19.86,19.86,0,0,0,103.31,228h73.38a19.86,19.86,0,0,0,14.14-5.86L225,188h11a20,20,0,0,0,20-20V120A20,20,0,0,0,236,100Zm-4,64H220a12,12,0,0,0-8.49,3.51L175,204H105L68,167V84H175l36.48,36.49A12,12,0,0,0,220,124h12Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M248,120v48a8,8,0,0,1-8,8H224l-37.66,37.66a8,8,0,0,1-5.65,2.34H103.31a8,8,0,0,1-5.65-2.34L58.34,174.34A8,8,0,0,1,56,168.69V80a8,8,0,0,1,8-8H180.69a8,8,0,0,1,5.65,2.34L224,112h16A8,8,0,0,1,248,120Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M240,104H227.31L192,68.69A15.86,15.86,0,0,0,180.69,64H140V40h24a8,8,0,0,0,0-16H100a8,8,0,0,0,0,16h24V64H64A16,16,0,0,0,48,80v52H24V108a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0V148H48v20.69A15.86,15.86,0,0,0,52.69,180L92,219.31A15.86,15.86,0,0,0,103.31,224h77.38A15.86,15.86,0,0,0,192,219.31L227.31,184H240a16,16,0,0,0,16-16V120A16,16,0,0,0,240,104Zm0,64H224a8,8,0,0,0-5.66,2.34L180.69,208H103.31L64,168.69V80H180.69l37.65,37.66A8,8,0,0,0,224,120h16Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M256,120v48a16,16,0,0,1-16,16H227.31L192,219.31A15.86,15.86,0,0,1,180.69,224H103.31A15.86,15.86,0,0,1,92,219.31L52.69,180A15.86,15.86,0,0,1,48,168.69V148H24v24a8,8,0,0,1-16,0V108a8,8,0,0,1,16,0v24H48V80A16,16,0,0,1,64,64h60V40H100a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16H140V64h40.69A15.86,15.86,0,0,1,192,68.69L227.31,104H240A16,16,0,0,1,256,120Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,106H226.49L190.58,70.1a13.9,13.9,0,0,0-9.89-4.1H138V38h26a6,6,0,0,0,0-12H100a6,6,0,0,0,0,12h26V66H64A14,14,0,0,0,50,80v54H22V108a6,6,0,0,0-12,0v64a6,6,0,0,0,12,0V146H50v22.69a13.9,13.9,0,0,0,4.1,9.89L93.42,217.9a13.9,13.9,0,0,0,9.89,4.1h77.38a13.9,13.9,0,0,0,9.89-4.1L226.49,182H240a14,14,0,0,0,14-14V120A14,14,0,0,0,240,106Zm2,62a2,2,0,0,1-2,2H224a6,6,0,0,0-4.24,1.76L182.1,209.42a2,2,0,0,1-1.41.58H103.31a2,2,0,0,1-1.41-.58L62.58,170.1a2,2,0,0,1-.58-1.41V80a2,2,0,0,1,2-2H180.69a2,2,0,0,1,1.41.58l37.66,37.66A6,6,0,0,0,224,118h16a2,2,0,0,1,2,2Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,104H227.31L192,68.69A15.86,15.86,0,0,0,180.69,64H140V40h24a8,8,0,0,0,0-16H100a8,8,0,0,0,0,16h24V64H64A16,16,0,0,0,48,80v52H24V108a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0V148H48v20.69A15.86,15.86,0,0,0,52.69,180L92,219.31A15.86,15.86,0,0,0,103.31,224h77.38A15.86,15.86,0,0,0,192,219.31L227.31,184H240a16,16,0,0,0,16-16V120A16,16,0,0,0,240,104Zm0,64H224a8,8,0,0,0-5.66,2.34L180.69,208H103.31L64,168.69V80H180.69l37.65,37.66A8,8,0,0,0,224,120h16Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M240,108H225.66L189.17,71.51A11.93,11.93,0,0,0,180.69,68H136V36h28a4,4,0,0,0,0-8H100a4,4,0,0,0,0,8h28V68H64A12,12,0,0,0,52,80v56H20V108a4,4,0,0,0-8,0v64a4,4,0,0,0,8,0V144H52v24.69a11.93,11.93,0,0,0,3.51,8.48l39.32,39.32a11.93,11.93,0,0,0,8.48,3.51h77.38a11.93,11.93,0,0,0,8.48-3.51L225.66,180H240a12,12,0,0,0,12-12V120A12,12,0,0,0,240,108Zm4,60a4,4,0,0,1-4,4H224a4,4,0,0,0-2.83,1.17l-37.66,37.66a4,4,0,0,1-2.82,1.17H103.31a4,4,0,0,1-2.82-1.17L61.17,171.51A4,4,0,0,1,60,168.69V80a4,4,0,0,1,4-4H180.69a4,4,0,0,1,2.82,1.17l37.66,37.66A4,4,0,0,0,224,116h16a4,4,0,0,1,4,4Z`}))]]),Qe=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z`}))]]),$e=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z`}))]]),et=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,44H32A20,20,0,0,0,12,64V192a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V64A20,20,0,0,0,224,44Zm-4,144H36V68H220ZM52,128a12,12,0,0,1,12-12H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,128Zm0-36A12,12,0,0,1,64,80H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,92Zm0,72a12,12,0,0,1,12-12h8a12,12,0,0,1,0,24H64A12,12,0,0,1,52,164Zm108,0a12,12,0,0,1-12,12H108a12,12,0,0,1,0-24h40A12,12,0,0,1,160,164Zm44,0a12,12,0,0,1-12,12h-8a12,12,0,0,1,0-24h8A12,12,0,0,1,204,164Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232,64V192a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H224A8,8,0,0,1,232,64Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM64,168H48a8,8,0,0,1,0-16H64a8,8,0,0,1,0,16Zm96,0H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm48,0H192a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,50H32A14,14,0,0,0,18,64V192a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50Zm2,142a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2Zm-20-64a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,128Zm0-32a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,96ZM70,160a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12h8A6,6,0,0,1,70,160Zm96,0a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,160Zm40,0a6,6,0,0,1-6,6h-8a6,6,0,0,1,0-12h8A6,6,0,0,1,206,160Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,52H32A12,12,0,0,0,20,64V192a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52Zm4,140a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4Zm-24-64a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,128Zm0-32a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,96ZM68,160a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8h8A4,4,0,0,1,68,160Zm96,0a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,160Zm40,0a4,4,0,0,1-4,4h-8a4,4,0,0,1,0-8h8A4,4,0,0,1,204,160Z`}))]]),tt=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),nt=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),rt=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),it=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M72,104a16,16,0,1,1,16,16A16,16,0,0,1,72,104Zm96,16a16,16,0,1,0-16-16A16,16,0,0,0,168,120Zm68-40V192a36,36,0,0,1-36,36H56a36,36,0,0,1-36-36V80A36,36,0,0,1,56,44h60V16a12,12,0,0,1,24,0V44h60A36,36,0,0,1,236,80Zm-24,0a12,12,0,0,0-12-12H56A12,12,0,0,0,44,80V192a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12Zm-12,82a30,30,0,0,1-30,30H86a30,30,0,0,1,0-60h84A30,30,0,0,1,200,162Zm-80-6v12h16V156ZM86,168H96V156H86a6,6,0,0,0,0,12Zm90-6a6,6,0,0,0-6-6H160v12h10A6,6,0,0,0,176,162Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,56H56A24,24,0,0,0,32,80V192a24,24,0,0,0,24,24H200a24,24,0,0,0,24-24V80A24,24,0,0,0,200,56ZM164,184H92a20,20,0,0,1,0-40h72a20,20,0,0,1,0,40Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Zm4,28H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48ZM172,96a12,12,0,1,1-12,12A12,12,0,0,1,172,96ZM96,184H80a16,16,0,0,1,0-32H96ZM84,120a12,12,0,1,1,12-12A12,12,0,0,1,84,120Zm60,64H112V152h32Zm32,0H160V152h16a16,16,0,0,1,0,32Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,50H134V16a6,6,0,0,0-12,0V50H56A30,30,0,0,0,26,80V192a30,30,0,0,0,30,30H200a30,30,0,0,0,30-30V80A30,30,0,0,0,200,50Zm18,142a18,18,0,0,1-18,18H56a18,18,0,0,1-18-18V80A18,18,0,0,1,56,62H200a18,18,0,0,1,18,18ZM74,108a10,10,0,1,1,10,10A10,10,0,0,1,74,108Zm88,0a10,10,0,1,1,10,10A10,10,0,0,1,162,108Zm2,30H92a26,26,0,0,0,0,52h72a26,26,0,0,0,0-52Zm-22,12v28H114V150ZM78,164a14,14,0,0,1,14-14h10v28H92A14,14,0,0,1,78,164Zm86,14H154V150h10a14,14,0,0,1,0,28Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M200,52H132V16a4,4,0,0,0-8,0V52H56A28,28,0,0,0,28,80V192a28,28,0,0,0,28,28H200a28,28,0,0,0,28-28V80A28,28,0,0,0,200,52Zm20,140a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V80A20,20,0,0,1,56,60H200a20,20,0,0,1,20,20ZM76,108a8,8,0,1,1,8,8A8,8,0,0,1,76,108Zm88,0a8,8,0,1,1,8,8A8,8,0,0,1,164,108Zm0,32H92a24,24,0,0,0,0,48h72a24,24,0,0,0,0-48Zm-20,8v32H112V148ZM76,164a16,16,0,0,1,16-16h12v32H92A16,16,0,0,1,76,164Zm88,16H152V148h12a16,16,0,0,1,0,32Z`}))]]),at=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),ot=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0ZM96.49,80.49,116,61v83a12,12,0,0,0,24,0V61l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z`}))],[`duotone`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z`,opacity:`0.2`}),Y.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z`}))],[`fill`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM88,80h32v64a8,8,0,0,0,16,0V80h32a8,8,0,0,0,5.66-13.66l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,88,80Z`}))],[`light`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0ZM92.24,76.24,122,46.49V144a6,6,0,0,0,12,0V46.49l29.76,29.75a6,6,0,0,0,8.48-8.48l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z`}))],[`thin`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0ZM90.83,74.83,124,41.66V144a4,4,0,0,0,8,0V41.66l33.17,33.17a4,4,0,1,0,5.66-5.66l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66Z`}))]]),st=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:ze}));st.displayName=`ArrowCounterClockwiseIcon`;var ct=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Be}));ct.displayName=`BookOpenTextIcon`;var lt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ve}));lt.displayName=`CarProfileIcon`;var ut=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:He}));ut.displayName=`CaretDownIcon`;var dt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ue}));dt.displayName=`CaretLeftIcon`;var ft=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:We}));ft.displayName=`CaretRightIcon`;var pt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ge}));pt.displayName=`CaretUpIcon`;var mt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ke}));mt.displayName=`CheckIcon`;var ht=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:qe}));ht.displayName=`CodeIcon`;var gt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Je}));gt.displayName=`CopyIcon`;var _t=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ye}));_t.displayName=`CrosshairIcon`;var vt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Xe}));vt.displayName=`CubeIcon`;var yt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Ze}));yt.displayName=`EngineIcon`;var bt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:Qe}));bt.displayName=`GearIcon`;var xt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:$e}));xt.displayName=`GithubLogoIcon`;var St=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:et}));St.displayName=`KeyboardIcon`;var Ct=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:tt}));Ct.displayName=`MoonIcon`;var wt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:nt}));wt.displayName=`PencilSimpleIcon`;var Tt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:rt}));Tt.displayName=`PlusIcon`;var Et=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:it}));Et.displayName=`RobotIcon`;var Dt=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:at}));Dt.displayName=`SunIcon`;var Ot=Y.forwardRef((e,t)=>Y.createElement(je,{ref:t,...e,weights:ot}));Ot.displayName=`UploadSimpleIcon`;var kt=t(j(),1),X=ke(),At=`identifier keyword string class property entity jsxliterals sign comment break space`.split(` `),[jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt]=At.map((e,t)=>t);new Map(At.map((e,t)=>[e,t]));function Ht(e,t){let n=[],r=0,i=[],a=!1;function o(e){let t=``,i=Array(e.length);for(let n=0;n<e.length;n++){let[r,a]=e[n];t+=a,i[n]={type:At[r],value:a}}n.push({index:r++,value:t,tokens:i,annotations:[]})}for(let e=0;e<t.length;e++){let n=t[e],[r,s]=n;if(r!==Bt){if(s.includes(`
|
|
3
3
|
`)){let e=s.split(`
|
|
4
4
|
`);for(let t=0;t<e.length;t++){let n=t<e.length-1,a=e[t];i.push([r,n&&a.endsWith(`\r`)?a.slice(0,-1):a]),n&&(o(i),i.length=0)}}else i.push(n);a=!1}else{if(a)o([]);else{let e=i[i.length-1];s===`
|
|
5
5
|
`&&e&&e[1].endsWith(`\r`)&&(i[i.length-1]=[e[0],e[1].slice(0,-1)]),o(i),i.length=0}e===t.length-1&&o([]),a=!0}}return i.length&&o(i),{value:e,lines:n}}function Ut(e,t){let n={index:e.index,value:e.value,tokens:e.tokens,annotations:e.annotations,className:`sh__line${e.annotations.map(e=>` sh__line--${e}`).join(``)}`,style:{},properties:{}};return t?.(n),n}function Wt({type:e,value:t},n,r){let i=n?.[e],a={type:e,value:t,className:`sh__token--${e}${i?` ${i}`:``}`,style:{color:`var(--sh-${e})`},properties:{}};return r?.(a),a}function Gt(e,t){let n=t?.cx,r=t?.mark,i=t?.markLine;return e.lines.map(e=>{let t=Ut(e,i);return{type:`element`,tagName:`span`,children:e.tokens.map(e=>{let t=Wt(e,n,r);return{type:`element`,tokenType:t.type,tagName:`span`,children:[{type:`text`,value:t.value}],properties:{...t.properties,className:t.className,style:t.style}}}),properties:{...t.properties,className:t.className,style:t.style}}})}Object.fromEntries(At.map(e=>[e,`<span class="sh__token--${e}" style="color:var(--sh-${e})">`]));var Kt=new Set(`+-*/%=!&|^~?:.,;()[]{}<>#@\\`.split(``)),qt=()=>0,Jt=e=>{let t=e.charCodeAt(0);return t<128?t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36:/[\p{L}\p{N}]/u.test(e)},Yt=e=>e>=48&&e<=57,Xt=(e,t)=>{let n=e.charCodeAt(t);return n<128?n===32||n===9||n===11||n===12:/\s/.test(e[t])},Zt=e=>{let t=e.charCodeAt(0);return t<128?t>=65&&t<=90:/^\p{Lu}/u.test(e)};function Qt(e,t){for(;t<e.length&&/\s/.test(e[t]);)t++;return e[t]===`:`}function $t(e,t){if(typeof t?.tokenize==`function`)return t.tokenize(e,t);let n=t?.keywords||new Set,r=t?.typeKeywords||new Set,i=t?.onCommentStart||qt,a=t?.onCommentEnd||qt,o=t?.caseInsensitive?e=>e.toLowerCase():e=>e,s=[],c=``;function l(e,t){t&&(s.push([e,t]),e!==Vt&&e!==Bt&&(c=t))}for(let s=0;s<e.length;){let u=e[s],d=e[s+1],f=i(u,d,s,e);if(f){let t=s++;for(;s<e.length;){if(a(e[s-1],e[s],s,e,t)==f){s++;break}s++}l(zt,e.slice(t,s));continue}let p=t?.onLiteral?.(u,s,e);if(p)l(Nt,e.slice(s,s+p)),s+=p;else{if(typeof t?.onQuote==`function`&&u===`'`){let n=t.onQuote(u,s,e);if(typeof n==`number`&&n>=1){l(jt,e.slice(s,s+n)),s+=n;continue}}if(u===`"`||u===`'`||t?.templateStrings&&u==="`"){let n=u,r=s++;for(;s<e.length;){if(e[s]===`\\`)s++;else if(e[s]===n){s++;break}s++}let i=e.slice(r,s);l(t?.quotedKeys&&Qt(e,s)?Ft:Nt,i)}else if(u===`
|
|
@@ -18,4 +18,4 @@ import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$ as r,E
|
|
|
18
18
|
\r/<>{}[]`.includes(e[n]);)n++;g+=e.slice(t+1,n),t=n-1}}else i===`<`&&r===`/`&&(g=`</`),V(),(i!==`<`||r!==`/`)&&(g=r),r===`<`&&o===`/`||r===`/`&&o===`>`?(g=r+o,V(),t++):tn.has(r)&&V();if(!S&&!_&&c===xn&&pn(r)){let n=t+1;for(;n<e.length&&pn(e[n]);)n++;g+=e.slice(t+1,n),t=n-1}C&&r===`{`&&C++}}return V(),b}var Tn=wn,En=e({tokenize:()=>Dn}),Dn=(e,t)=>wn(e,{...t,typescript:!0}),On=e({keywords:()=>kn,onCommentEnd:()=>jn,onCommentStart:()=>An,onLiteral:()=>Mn,tokenize:()=>Bn}),kn=new Set([`@media`,`@import`,`@keyframes`,`@font-face`,`@supports`,`@page`,`@counter-style`,`@font-feature-values`,`@viewport`,`@counter-style`,`@font-feature-values`,`@document`]),An=(e,t)=>+(e+t===`/*`),jn=(e,t)=>+(e+t===`*/`),Mn=(e,t,n)=>e===`#`&&n.slice(t).match(/^#(?:[\da-f]{8}|[\da-f]{6}|[\da-f]{4}|[\da-f]{3})(?![\w-])/i)?.[0].length||0,Nn=e=>e===Vt||e===Bt||e===zt,Pn=([e,t])=>e===jt||e===Pt||e===Rt&&t===`-`,Fn=([e])=>e===jt||e===Pt||e===Ft,In=e=>Fn(e)&&!/^\d/.test(e[1]),Ln=([e,t])=>e===Rt&&t===`-`,Rn=e=>{let t=[];for(let n=0;n<e.length;n++){let r=n,i=n;if(Ln(e[i])){for(;e[i]&&Ln(e[i]);)i++;if(!e[i]||!In(e[i])){t.push(e[n]);continue}r=i++}else if(In(e[i]))i++;else{t.push(e[n]);continue}let a=r>n;for(;e[i]&&Ln(e[i]);){let t=i;for(;e[i]&&Ln(e[i]);)i++;if(!e[i]||!Fn(e[i])){i=t;break}a=!0,i++}if(!a){t.push(e[n]);continue}let o=e.slice(n,i).map(([,e])=>e).join(``);t.push([e[r][0],o]),n=i-1}return t},zn=(e,t)=>{let n=0,r=0;for(let i=t;i<e.length;i++){let[t,a]=e[i];if(t===Rt){if(a===`(`)n++;else if(a===`)`)n--;else if(a===`[`)r++;else if(a===`]`)r--;else if(!n&&!r&&a===`{`)return!0;else if(!n&&!r&&(a===`;`||a===`}`))return!1}}return!1},Bn=(e,t)=>{let n=Rn($t(e,{...t,tokenize:void 0})),r=[],i=0,a=!1;for(let e=0;e<n.length;e++){let t=n[e],[o,s]=t;if(o===Rt&&s===`{`){i++,a=!0,r.push(t);continue}if(o===Rt&&s===`}`){i--,a=!1,r.push(t);continue}if(o===Rt&&s===`;`){a=i>0,r.push(t);continue}if(!a||Nn(o)){r.push(t);continue}let c=e,l=e;for(;l<n.length&&Pn(n[l]);)l++;let u=l;for(;u<n.length&&Nn(n[u][0]);)u++;if(l>c&&n[u]?.[0]===Rt&&n[u][1]===`:`&&!zn(n,u+1)){let t=n.slice(c,l).map(([,e])=>e).join(``);r.push([Ft,t]),e=l-1}else r.push(t);a=!1}return r},Vn={keywords:new Set,jsx:!0,regex:!1,templateStrings:!1,onCommentStart:(e,t,n,r)=>r.startsWith(`<!--`,n)?2:0,onCommentEnd:(e,t,n,r)=>r.slice(n-2,n+1)===`-->`?2:0},Hn=e=>Tn(e,Vn),Un=/^<\s*(script|style)\b/i,Wn=e=>RegExp(`</\\s*${e}\\s*>`,`ig`);function Gn(e,t){let n=``;for(let r=t;r<e.length;r++){let t=e[r];if(n)t===n&&(n=``);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r+1}return-1}function Kn(e){let t=[],n=new Set,r=0;for(;r<e.length;){if(e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);r=t===-1?e.length:t+3;continue}if(e[r]!==`<`){r++;continue}let i=Gn(e,r);if(i===-1)break;let a=e.slice(r,i).match(Un);if(!a){r=i;continue}let o=a[1].toLowerCase();if(n.has(o)){r=i;continue}let s=Wn(o);s.lastIndex=i;let c=s.exec(e);c?(t.push({start:r,openEnd:i,closeStart:c.index,end:s.lastIndex,tag:o}),r=s.lastIndex):(n.add(o),r=i)}return t}function qn(e){let t=Kn(e);if(!t.length)return Hn(e);let n=[],r=e=>{for(let t=0;t<e.length;t++)n.push(e[t])},i=0;for(let n of t){let{start:t,openEnd:a,closeStart:o,end:s,tag:c}=n;r(Hn(e.slice(i,t))),r(Hn(e.slice(t,a))),r(c===`style`?Bn(e.slice(a,o),On):Tn(e.slice(a,o),{jsx:!1})),r(Hn(e.slice(o,s))),i=s}return r(Hn(e.slice(i))),n}var Jn=e({jsx:()=>!0,keywords:()=>Yn,onCommentEnd:()=>Qn,onCommentStart:()=>Zn,regex:()=>!1,templateStrings:()=>!1,tokenize:()=>Xn}),Yn=new Set([]),Xn=qn,Zn=(e,t,n,r)=>r.startsWith(`<!--`,n)?2:0,Qn=(e,t,n,r)=>r.slice(n-2,n+1)===`-->`?2:0,$n=(e,t)=>{let n=e+t;return n===`//`?1:n===`/*`?2:0},er=(e,t)=>t===`
|
|
19
19
|
`?1:e+t===`*/`?2:0,tr=e({keywords:()=>nr,onCommentEnd:()=>er,onCommentStart:()=>$n,quotedKeys:()=>!0}),nr=new Set([`true`,`false`,`null`]),rr=e=>+(e===`#`),ir=(e,t)=>+(t===`
|
|
20
20
|
`),ar=e({keywords:()=>or,onCommentEnd:()=>ir,onCommentStart:()=>rr}),or=new Set([`case`,`coproc`,`do`,`done`,`elif`,`else`,`esac`,`export`,`fi`,`for`,`function`,`if`,`in`,`local`,`readonly`,`return`,`select`,`then`,`time`,`until`,`while`]),sr={javascript:{tokenize:e=>Tn(e,void 0)},typescript:En,jsx:{tokenize:e=>Tn(e,void 0)},tsx:En,html:{...Jn,tokenize:e=>Xn(e,Jn)},css:On,json:tr,shell:ar},cr={javascript:`JavaScript`,typescript:`TypeScript`,jsx:`JSX`,tsx:`TSX`,html:`HTML`,css:`CSS`,json:`JSON`,shell:`Terminal`,text:`Text`};function lr({code:e,language:t=`text`,title:n,toolbar:r,panelId:i,labelledBy:a,theme:o,maxHeight:s=400,height:c,compact:l=!1,wrap:u=!1,copyable:d=!0,className:f=``}){let p=(0,Y.useMemo)(()=>t===`text`?null:Gt(en(e,sr[t])),[e,t]),[m,h]=(0,Y.useState)(null),g=m?.code===e&&m.failed,_=m?.code===e&&!m.failed;return(0,X.jsxs)(`div`,{className:`joy-code-block ${f}`,"data-code-theme":o,"data-compact":l||void 0,"data-wrap":u||void 0,onKeyDown:e=>{e.key!==`Escape`&&e.stopPropagation()},children:[(0,X.jsxs)(`div`,{className:`joy-code-header`,children:[r?(0,X.jsx)(`div`,{className:`joy-code-tabs`,children:r}):(0,X.jsxs)(`div`,{className:`joy-code-heading`,children:[(0,X.jsx)(`span`,{className:`joy-code-title`,children:n??cr[t]}),n&&(0,X.jsx)(`span`,{className:`joy-code-language`,children:cr[t]})]}),d&&(0,X.jsxs)(`button`,{type:`button`,className:`joy-code-copy`,"aria-label":`Copy ${n??`${cr[t]} code`}`,onClick:async()=>{try{await navigator.clipboard.writeText(e),h({code:e,failed:!1})}catch{h({code:e,failed:!0})}},children:[_?(0,X.jsx)(mt,{"aria-hidden":`true`}):(0,X.jsx)(gt,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:_?`Copied`:`Copy`})]})]}),(0,X.jsx)(`pre`,{className:`joy-code-pre`,tabIndex:0,style:{maxHeight:s,height:c},id:i,role:a?`tabpanel`:void 0,"aria-labelledby":a,"aria-label":a?void 0:n??`${cr[t]} example`,children:(0,X.jsx)(`code`,{className:`language-${t}`,children:p?p.map((e,t)=>(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)(`span`,{className:`sh__line`,children:e.children.map((e,t)=>(0,X.jsx)(`span`,{className:e.properties.className,style:e.properties.style,children:e.children.map(e=>e.value).join(``)},t))}),t<p.length-1?`
|
|
21
|
-
`:null]},t)):e})}),(0,X.jsx)(`span`,{className:`joy-code-status`,role:`status`,"data-error":g||void 0,children:g?`Copy unavailable. Select the code to copy it.`:_?`Code copied.`:``})]})}function ur(e){return q(e.defaultTagName??`div`,e,e)}var dr=768;function fr(){let[e,t]=Y.useState(void 0);return Y.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<dr)};return e.addEventListener(`change`,n),t(window.innerWidth<dr),()=>e.removeEventListener(`change`,n)},[]),!!e}var pr=`data-valid`,mr=`data-invalid`,hr={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},gr={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},_r={valid(e){return e===null?null:e?{[pr]:``}:{[mr]:``}}},vr={invalid:void 0,name:void 0,validityData:{state:hr,errors:[],error:``,value:``,initialValue:null},setValidityData:Me,disabled:void 0,setTouched:Me,setDirty:Me,setFilled:Me,setFocused:Me,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:gr,registerFieldControl:Me,validation:{getValidationProps:(e,t=Te)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Me,getInputControl:()=>null,commit:async()=>{},change:Me}},yr=Y.createContext(vr);function br(e=!0){let t=Y.useContext(yr);if(t.setValidityData===Me&&!e)throw Error(ge(28));return t}var xr=Y.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:`onSubmit`,submitCountRef:{current:0}});function Sr(){return Y.useContext(xr)}function Cr(){let[,e]=Y.useState({});return Y.useCallback(()=>{e({})},[])}var wr=0;function Tr(e,t=`mui`){let n=Y.useRef(void 0),r=Cr(),i=e??n.current;return Y.useEffect(()=>{n.current??(wr+=1,n.current=`${t}-${wr}`,e??r())},[e,t,r]),i}var Er=pe.useId;function Dr(e,t){if(Er!==void 0){let n=Er();return e??(t?`${t}-${n}`:n)}return Tr(e,t)}function Or(e){return Dr(e,`base-ui`)}var kr=Y.createContext({controlId:void 0,registerControlId:Me,resetControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});function Ar(){return Y.useContext(kr)}function jr(e,t,n,r=!0,i,a){let[o,s]=Y.useState(),c=Or(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return J(()=>{let i=e||t||l||!r?void 0:Mr(n.current,c);o!==i&&s(i)}),u}function Mr(e,t){let n=Nr(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Nr(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function Pr(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Ar(),o=Or(),s=Fe(()=>Symbol()),c=Y.useRef(!1),l=Y.useRef(!1),u=G(()=>{c.current&&i!==Me&&(c.current=!1,i(s.current,void 0))});return J(()=>{if(!n||i===Me){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),J(()=>u,[u]),(n?r:void 0)??t??o}function Fr(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Ir,platform:Lr,maxTouchPoints:Rr}=Fr(),zr=Ir.toLowerCase(),Br=Lr.toLowerCase(),Vr=/^i(os$|p)/.test(Br)||Br===`macintel`&&Rr>1,Hr=`android`,Ur=Br===Hr||zr.includes(Hr),Wr=!Vr&&Br.startsWith(`mac`);Br.startsWith(`win`),!Ur&&/^(linux|chrome os)/.test(Br);var Gr=Wr||Vr,Kr=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Kr&&zr.includes(`firefox`),!Kr&&zr.includes(`chrom`);var qr=Gr,Jr=/jsdom|happydom/.test(zr);function Yr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&W(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Xr(e,t){let n=e;for(;n;){if(ue(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(W(n)?n.host:null)}return null}function Zr(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Qr=`data-base-ui-focusable`,$r=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ei=`ArrowLeft`,ti=`ArrowRight`,ni=`ArrowUp`,ri=`ArrowDown`,ii=`data-starting-style`,ai=`data-ending-style`,oi={[ii]:``},si={[ai]:``},ci={transitionStatus(e){return e===`starting`?oi:e===`ending`?si:null}},li=`data-open`,ui=`data-closed`,di=`data-anchor-hidden`,fi=`data-popup-open`,pi=`data-pressed`,mi={[fi]:``},hi={[fi]:``,[pi]:``},gi={[li]:``},_i={[ui]:``},vi={[di]:``},yi={open(e){return e?mi:null}},bi={open(e){return e?hi:null}},xi={open(e){return e?gi:_i},anchorHidden(e){return e?vi:null}},Si={...xi,...ci},Ci=`data-trigger-disabled`;function wi(e,t){if(!ue(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Ci);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(Ci);return!1}function Ti(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ei(e){return e.matches(`html,body`)}function Di(e){return fe(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Oi(e){return Xr(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${$r}`)!=null}function ki(e){return e?e.getAttribute(`role`)===`combobox`&&Di(e):!1}function Ai(e){if(!e||Jr)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ji(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Mi(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Mi(e,t.id,n)])}function Ni(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Pi(e){e.preventDefault(),e.stopPropagation()}function Fi(e){return`nativeEvent`in e}function Ii(e){return e.pointerType===``&&e.isTrusted?!0:Ur&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Li(e){return Jr?!1:!Ur&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ur||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Ri(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function zi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Bi=Math.min,Vi=Math.max,Hi=Math.round,Ui=Math.floor,Wi=e=>({x:e,y:e}),Gi={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ki(e,t,n){return Vi(e,Bi(t,n))}function qi(e,t){return typeof e==`function`?e(t):e}function Ji(e){return e.split(`-`)[0]}function Yi(e){return e.split(`-`)[1]}function Xi(e){return e===`x`?`y`:`x`}function Zi(e){return e===`y`?`height`:`width`}function Qi(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $i(e){return Xi(Qi(e))}function ea(e,t,n){n===void 0&&(n=!1);let r=Yi(e),i=$i(e),a=Zi(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=la(o)),[o,la(o)]}function ta(e){let t=la(e);return[na(e),t,na(t)]}function na(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ra=[`left`,`right`],ia=[`right`,`left`],aa=[`top`,`bottom`],oa=[`bottom`,`top`];function sa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ia:ra:t?ra:ia;case`left`:case`right`:return t?aa:oa;default:return[]}}function ca(e,t,n,r){let i=Yi(e),a=sa(Ji(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(na)))),a}function la(e){let t=Ji(e);return Gi[t]+e.slice(t.length)}function ua(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function da(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ua(e)}function fa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pa(e,t){return t<0||t>=e.length}function ma(e,t){return _a(e.current,{disabledIndices:t})}function ha(e,t){return _a(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ga(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>_a(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:pa(e,u)?-1:u,wrapped:d}}function _a(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&va(e,a,r));return a}function va(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!ba(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function ya(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ba(e,t=e?ne(e):null){return!e||!e.isConnected||!t||ya(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var xa=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Sa(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return W(n)?n.host:null}function Ca(e){for(let t of Array.from(e.children))if(re(t)===`summary`)return t;return null}function wa(e,t){let n=Ca(t);return!!n&&(e===n||Z(n,e))}function Ta(e){let t=e?re(e):``;return e!=null&&e.matches(xa)&&(t!==`summary`||e.parentElement!=null&&re(e.parentElement)===`details`&&Ca(e.parentElement)===e)&&(t!==`details`||Ca(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ea(e){if(!Ta(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Sa(t)){let n=t!==e,r=re(t)===`slot`;if(t.hasAttribute(`inert`)||n&&re(t)===`details`&&!t.open&&!wa(e,t)||t.hasAttribute(`hidden`)||!r&&!Da(t,n))return!1}return!0}function Da(e,t){let n=ne(e);return t?n.display!==`none`:ba(e,n)}function Oa(e){let t=e.tabIndex;if(t<0){let t=re(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return t}function ka(e){if(re(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Aa(e,t){let n=ka(e);if(!n)return!0;let r=t.find(e=>{let t=ka(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=ka(e);return t?.name===n.name&&t.form===n.form})===n}function ja(e){if(fe(e)&&re(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ma(e,t){ja(e).forEach(e=>{Ta(e)&&t.push(e),Ma(e,t)})}function Na(e,t,n){ja(e).forEach(e=>{fe(e)&&e.matches(t)&&n.push(e),Na(e,t,n)})}function Pa(e){return Ea(e)&&Oa(e)>=0}function Fa(e){let t=[];return Ma(e,t),t.filter(Ea)}function Ia(e){let t=Fa(e);return t.filter(e=>Oa(e)>=0&&Aa(e,t))}function La(e,t){let n=Ia(e),r=n.length;if(r===0)return;let i=Yr(Re(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ra(e){return La(Re(e).body,1)||e}function za(e){return La(Re(e).body,-1)||e}function Ba(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function Va(e){Ia(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Ha(e){let t=[];Na(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Ua(e,t){let n=Or(e);return J(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}function Wa(e){Y.useEffect(e,ve)}var Ga=0,Ka=class e{static create(){return new e}currentId=Ga;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ga,t()},e)}isStarted(){return this.currentId!==Ga}clear=()=>{this.currentId!==Ga&&(clearTimeout(this.currentId),this.currentId=Ga)};disposeEffect=()=>this.clear};function qa(){let e=Fe(Ka.create).current;return Wa(e.disposeEffect),e}var Ja=Y.createContext({disabled:!1});function Ya(){return Y.useContext(Ja)}var Xa=null;globalThis.requestAnimationFrame;var Za=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Qa=class e{static create(){return new e}static request(e){return Za.request(e)}static cancel(e){return Za.cancel(e)}currentId=Xa;request(e){this.cancel(),this.currentId=Za.request(()=>{this.currentId=Xa,e()})}cancel=()=>{this.currentId!==Xa&&(Za.cancel(this.currentId),this.currentId=Xa)};disposeEffect=()=>this.cancel};function $a(){let e=Fe(Qa.create).current;return Wa(e.disposeEffect),e}function eo(e){return e==null?e:`current`in e?e.current:e}function to(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var no=null;function ro(e){if(!no){let e=[];no=e,queueMicrotask(()=>{no=null,kt.flushSync(()=>{for(let t of e)t()})})}no.push(e)}function io(e,t=!1,n=!1){let r=$a();return G((i,a=null)=>{r.cancel();let o=eo(e);if(o==null)return;let s=o,c=()=>{n?ro(()=>{a?.aborted||i()}):kt.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(to(s).map(e=>e.finished.then(Me))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(to(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ii;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function ao(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=G(a),s=io(r,n,i);Y.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function oo(e,t=!1,n=!1,r=!1){let[i,a]=Y.useState(e&&t?`idle`:void 0),[o,s]=Y.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),J(()=>{if(!e&&o&&i!==`ending`&&n){let e=Qa.request(()=>{a(`ending`)});return()=>{Qa.cancel(e)}}},[e,o,i,n]),J(()=>{if(!e||t||i===void 0)return;let n=Qa.request(()=>{a(void 0)});return()=>{Qa.cancel(n)}},[t,e,i]),J(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Qa.request(()=>{a(`idle`)});return()=>{Qa.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function so(e,t,n){let{setFocused:r,focusOwnerRef:i}=br(),a=G(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return J(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function co(e,t,n,r,i=!0,a){let{registerFieldControl:o}=br(),s=Fe(()=>Symbol());J(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),J(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function lo(e,t){let n=Y.useRef(e),r=G(t);J(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Q(e,t,n,r){let i=!1,a=!1,o=r??Te;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function uo(e,t,n){let r=n??Te;return{reason:e,event:t??new Event(`base-ui`),...r}}var fo=`none`,po=`trigger-press`,mo=`trigger-hover`,ho=`trigger-focus`,go=`outside-press`,_o=`item-press`,vo=`close-press`,yo=`track-press`,bo=`input-change`,xo=`focus-out`,So=`escape-key`,Co=`list-navigation`,wo=`keyboard`,To=`drag`,Eo=`cancel-open`,Do=`disabled`,Oo=`missing`,ko=`initial`,Ao=`imperative-action`,jo=`window-resize`,Mo=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=br(),{clearErrors:S,elementRef:C,submitCountRef:w}=Sr(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=Ar(),k=Pr({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=G(()=>x.inputRef.current?.value);co(x.inputRef,k,j,M,!T,a),J(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),lo(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=Y.useRef(null),P=so(T,N),F=qa();return q(`input`,e,{ref:[t,N],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Q(fo,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:_r})}),No=Y.forwardRef(function(e,t){return(0,X.jsx)(Mo,{ref:t,...e})});function Po({className:e,type:t,...n}){return(0,X.jsx)(No,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}var Fo=Y.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return q(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Io({className:e,orientation:t=`horizontal`,...n}){return(0,X.jsx)(Fo,{"data-slot":`separator`,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}var Lo=Y.createContext(void 0);function Ro(e){let t=Y.useContext(Lo);if(!e&&t===void 0)throw Error(ge(27));return t}var zo=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Ro(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return q(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:Si,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Bo=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Ro(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Oe({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Q(vo,e.nativeEvent))}return q(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Vo=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Ro(),c=Or(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),q(`p`,e,{ref:t,props:[{id:c},o]})});function Ho(e,t){return t!=null&&!Ri(t)?0:typeof e==`function`?e():e}function Uo(e,t,n){let r=Ho(e,n);return typeof r==`number`?r:r?.[t]}function Wo(e){return typeof e==`function`?e():e}function Go(e,t){return t||e===`click`||e===`mousedown`}function Ko(e){return e?.includes(`mouse`)&&e!==`mousedown`}var qo=Y.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ka,currentIdRef:{current:null},currentContextRef:{current:null}});function Jo(e,t){e.current=t.current}function Yo(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=Y.useContext(qo),[d,f]=Y.useState(!1),p=Y.useRef(n);return J(()=>{p.current=n},[n]),J(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),J(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:Uo(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Q(fo))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),J(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,Jo(a,s),u.clear()}},[c,i,a,r,s,u]),Y.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function Xo(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Zo(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Qo(e){let t=Fe($o,e).current;return t.next=e,J(t.effect),t}function $o(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var es={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ts={...es,position:`fixed`,margin:0,top:0,left:0},ns={...es,position:`absolute`},rs=Y.forwardRef(function(e,t){let[n,r]=Y.useState();J(()=>{qr&&Kr&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,X.jsx)(`span`,{...e,ref:t,style:ts,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function is(e){return`data-base-ui-${e}`}var as=0;function os(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(as);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Me;let o=requestAnimationFrame(a);return as=o,()=>{as===o&&(cancelAnimationFrame(o),as=0)}}var ss=`data-base-ui-inert`,cs=new WeakMap,ls=new WeakSet,us=new WeakMap,ds=0;function fs(e){return e?W(e)?e.host:fs(e.parentNode):null}var ps=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=fs(t);return e.contains(n)?n:null}).filter(e=>e!=null),ms=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},hs=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{re(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function gs(e,t,n,{mark:r=!0}){let i=ps(t,e),a=r?hs(t,ms(i),new Set(i)):[],o=[],s=[];if(n){let e=ps(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);hs(t,ms(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(cs.get(e)||0)+1;cs.set(e,r),o.push(e),r===1&&n&&ls.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(us.get(e)||0)+1;us.set(e,t),s.push(e),t===1&&e.setAttribute(ss,``)}),ds+=1,()=>{o.forEach(e=>{let t=(cs.get(e)||0)-1;cs.set(e,t),t||(ls.has(e)||e.removeAttribute(`aria-hidden`),ls.delete(e))}),r&&s.forEach(e=>{let t=(us.get(e)||0)-1;us.set(e,t),t||e.removeAttribute(ss)}),--ds,ds||(cs=new WeakMap,ls=new WeakSet,us=new WeakMap)}}function _s(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Re(e[0]).body;return gs(e,i,n,{mark:r})}var vs={style:{transition:`none`}},ys={fallbackAxisSide:`none`},bs={fallbackAxisSide:`end`},xs={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ss=Y.createContext(null),Cs=()=>Y.useContext(Ss),ws=is(`portal`);function Ts(e={}){let{ref:t,container:n,componentProps:r=Te,elementProps:i}=e,a=Dr(),o=Cs()?.portalNode,[s,c]=Y.useState(null),[l,u]=Y.useState(null),d=G(e=>{e!==null&&u(e)}),f=Y.useRef(null);J(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(se(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=q(`div`,r,{ref:[t,d],props:[{id:a,[ws]:``},i]}),m=s&&p?kt.createPortal(p,s):null;return{node:l,nodeId:Y.isValidElement(p)?p.props.id:void 0,subtree:m}}var Es=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ts({container:o,ref:t,componentProps:e,elementProps:c}),f=Y.useRef(null),p=Y.useRef(null),m=Y.useRef(null),h=Y.useRef(null),[g,_]=Y.useState(null),v=Y.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;Y.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Ba(e)&&(e.type===`focusin`?v.current&&=(Ha(l),!1):(Va(l),v.current=!0))}return Zo(Xo(l,`focusin`,e,!0),Xo(l,`focusout`,e,!0))},[l,y]),J(()=>{l&&b===!0&&v.current&&(Ha(l),v.current=!1)},[b,l]);let S=Y.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,X.jsxs)(Y.Fragment,{children:[d,(0,X.jsxs)(Ss.Provider,{value:S,children:[x&&l&&(0,X.jsx)(rs,{"data-type":`outside`,ref:f,onFocus:e=>{Ba(e,l)?m.current?.focus():za(g?g.domReference:null)?.focus()}}),x&&l&&(0,X.jsx)(`span`,{role:s,"aria-owns":u,style:xs}),l&&kt.createPortal(a,l),x&&l&&(0,X.jsx)(rs,{"data-type":`outside`,ref:p,onFocus:e=>{Ba(e,l)?h.current?.focus():(Ra(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Q(`focus-out`,e.nativeEvent)))}})]})]})});function Ds(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Os=Y.createContext(null),ks=Y.createContext(null),As=()=>Y.useContext(Os)?.id||null,js=e=>{let t=Y.useContext(ks);return e??t};function Ms(e,t){let n=Ce(Zr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ii(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Ns=20,Ps=[];function Fs(){Ps=Ps.filter(e=>e.deref()?.isConnected)}function Is(e){Fs(),e&&re(e)!==`body`&&(Ps.push(new WeakRef(e)),Ps.length>Ns&&(Ps=Ps.slice(-20)))}function Ls(){return Fs(),Ps[Ps.length-1]?.deref()}function Rs(e){return e?Pa(e)?e:Ia(e)[0]||e:null}function zs(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Fa(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Pa(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Bs(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=G(()=>b.current.floatingContext?.nodeId),S=i===!1,C=ki(_)&&S,w=Qo(i),T=Qo(a),E=Qo(o),D=Qo(u),O=Qo(g),k=js(m),A=Cs(),j=Y.useRef(!1),M=Y.useRef(!1),N=Y.useRef(!1),P=Y.useRef(null),F=Y.useRef(``),I=Y.useRef(``),L=Y.useRef(null),R=Y.useRef(null),z=be(L,p,A?.beforeInsideRef),B=be(R,A?.afterInsideRef),V=qa(),H=qa(),ee=$a(),te=A!=null,U=ji(v),ne=G((e=U)=>e?Ia(e):[]),ie=G(()=>h?.().filter(e=>e!=null)??[]);Y.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(U,Yr(Re(U)))&&ne().length===0&&!C&&Pi(e)}return Xo(Re(U),`keydown`,e)},[r,U,c,C,ne]),Y.useEffect(()=>{if(r||!g)return;let e=Re(U);function t(){N.current=!1}function n(e){let t=Zr(e),n=ie(),r=Z(v,t)||Z(_,t)||Z(A?.portalNode,t)||n.some(e=>e===t||Z(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,Xr(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,H.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return Zo(Xo(e,`pointerdown`,n,!0),Xo(e,`pointerup`,t,!0),Xo(e,`pointercancel`,t,!0),Xo(e,`keydown`,i,!0),t)},[r,v,_,U,g,A,H,ie]),Y.useEffect(()=>{if(r||!l)return;let e=Re(U);function n(){M.current=!0,H.start(0,()=>{M.current=!1})}function i(e){let t=Zr(e);Pa(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Zr(n);c&&r==null&&a!=null&&Z(v,a)&&Is(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ie(),p=r?.hasAttribute(is(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,eo(f),eo(d)].includes(r),m=!(Z(_,r)||Z(v,r)||Z(r,v)||Z(A?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||p||k&&(Mi(k.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Ni(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,ji(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&U&&zs(U),s&&i!==_&&!ba(a)&&Yr(e)===e.body){if(fe(U)&&(U.focus(),s===`popup`)){ee.request(()=>{U.focus()});return}let e=ne(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||U;fe(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!c)&&r&&m&&!M.current&&(C||r!==Ls())&&(j.current=!0,t.setOpen(!1,Q(xo,n)))})}function o(){N.current||(b.current.insideReactTree=!0,V.start(0,()=>{b.current.insideReactTree=!1}))}let u=fe(_)?_:null;if(v||u)return Zo(u&&Xo(u,`focusout`,a),u&&Xo(u,`pointerdown`,n),v&&Xo(v,`focusin`,i),v&&Xo(v,`focusout`,a),v&&A&&Xo(v,`focusout`,o,!0))},[r,_,v,U,c,k,A,t,l,s,ne,C,x,b,V,H,ee,d,f,ie]),Y.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${is(`portal`)}]`)||[]),t=(k?Ni(k.nodesRef.current,x()):[]).find(e=>ki(e.context?.elements.domReference||null))?.context?.elements.domReference,n=_s([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ie(),t,eo(f),eo(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=_s([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ie]),J(()=>{if(!g||r||!fe(U))return;F.current=``,I.current=``;let e=Re(U),t=Yr(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Z(U,t))return;let i=null,a=()=>(i??=ne(U),i[0]||U),o;o=r===!0||r===null?a():eo(r),o||=a();let s=Z(U,Yr(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&Ii(c);os(o,{sync:l,preventScroll:o===U,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Yr(e);return!(t!==o&&Z(U,t))}})})},[r,g,U,ne,w,D,O,b]);let ae=Y.useRef(null);J(()=>{if(r||!U){ae.current=null;return}ae.current&&=(ae.current.cancelled=!0,null);let e=Re(U),t=Yr(e),n=D.current==null;Is(t);function i(e){if(e.open||(F.current=Ms(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(is(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(Ii(e.nativeEvent)||Li(e.nativeEvent))j.current=!1;else{let e=!1;Re(U).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&re(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Ls()||null,typeof i==`boolean`?s:eo(i)||s||null}return()=>{y.off(`openchange`,i);let t=Yr(e),n=ie(),r=Z(v,t)||n.some(e=>e===t||Z(e,t))||k&&Mi(k.nodesRef.current,x(),!1).some(e=>Z(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};ae.current=l,queueMicrotask(()=>{ae.current===l&&(ae.current=null);let n=Rs(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&fe(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,U,T,E,D,y,k,_,x,ie]),J(()=>{if(!Kr||g||!v)return;let e=Yr(Re(v));fe(e)&&Di(e)&&Z(v,e)&&e.blur()},[g,v]),J(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),J(()=>{if(!r&&U)return zs(U),()=>{queueMicrotask(Fs)}},[r,U]);let oe=!r&&(!c||!C)&&(te||c);return(0,X.jsxs)(Y.Fragment,{children:[oe&&(0,X.jsx)(rs,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=ne();os(e[e.length-1])}else A?.portalNode&&(j.current=!1,Ba(e,A.portalNode)?Ra(_)?.focus():eo(f??A.beforeOutsideRef)?.focus())}}),n,oe&&(0,X.jsx)(rs,{"data-type":`inside`,ref:B,onFocus:e=>{c?os(ne()[0]):A?.portalNode&&(l&&(j.current=!0),Ba(e,A.portalNode)?za(_)?.focus():eo(d??A.afterOutsideRef)?.focus())}})]})}function Vs(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=po}=t,l=e.context.dataRef,u=Y.useRef(void 0),d=$a(),f=qa(),p=Y.useMemo(()=>{function t(t,n,r,i){let a=Q(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=Ri(e.pointerType,!0)&&Li(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Ri(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Zr(s),p=Di(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:Ri(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return Y.useMemo(()=>n?{reference:p}:Te,[n,p])}function Hs(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Us(e){return e!=null&&e.clientX!=null}function Ws(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=Y.useRef(!1),l=Y.useRef(null),[u,d]=Y.useState(),[f,p]=Y.useState([]),m=G(t=>{e.set(`positionReference`,t)}),h=G((t,n,i)=>{c.current||(!s.current.openEvent||Us(s.current.openEvent))&&e.set(`positionReference`,Hs(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=G(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=Ri(u)?a:i;Y.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Ce(a);function r(t){let n=Zr(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Us(s.current.openEvent)?l.current=Xo(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),Y.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),Y.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),Y.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=Y.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return Y.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function Gs(){return!1}function Ks(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function qs(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Gs,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=js(c),m=G(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=G(()=>a),{escapeKey:v,outsidePress:y}=Ks(s),b=Y.useRef(!1),x=Y.useRef(!1),S=Y.useRef(!1),C=Y.useRef(!1),w=Y.useRef(!1),T=Y.useRef(``),E=Y.useRef(null),D=qa(),O=qa(),k=qa(),A=G(()=>{O.clear(),d.current.insideReactTree=!1}),j=G(e=>{let t=d.current.floatingContext?.nodeId;return(p?Mi(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=G(t=>Ti(t,e.select(`floatingElement`))||Ti(t,e.select(`domReferenceElement`))),N=G(t=>{o()&&e.setOpen(!1,Q(po,t.nativeEvent))}),P=G(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Fi(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Q(So,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=G(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=G(t=>{if(!l||!n||t.button!==0)return;let r=Zr(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=G(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});Y.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),Y.useEffect(()=>A,[A]),Y.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new Ka,i=Re(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(Kr?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&Mi(p.nodesRef.current,t).some(t=>Ti(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=Zr(n),i=`[${is(`inert`)}]`,a=ue(r)?r.getRootNode():null,o=Array.from((W(a)?a:Re(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=ue(r)?r:null;for(;c&&!ae(c);){let e=te(c);if(ae(e)||!ue(e))break;c=e}if(!(o.length&&ue(r)&&!Ei(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(fe(r)&&!(`touches`in n)){let e=ae(r),t=ne(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!Ii(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Q(go,n)),A())}}}function F(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Zr(e);if(!n)return;let r=Xo(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function z(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function B(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():O(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,A())))}function V(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function H(e){L(e,V)}function ee(e){f()===`sloppy`&&E.current&&!M(e)&&(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function U(e){L(e,ee)}let re=Zo(r&&Zo(Xo(i,`keydown`,P),Xo(i,`compositionstart`,a),Xo(i,`compositionend`,o)),g&&Zo(Xo(i,`click`,z,!0),Xo(i,`pointerdown`,z,!0),Xo(i,`pointerup`,B,!0),Xo(i,`pointercancel`,B,!0),Xo(i,`mousedown`,z,!0),Xo(i,`mouseup`,B,!0),Xo(i,`touchstart`,R,{capture:!0,passive:!0}),Xo(i,`touchmove`,H,{capture:!0,passive:!0}),Xo(i,`touchend`,U,{capture:!0,passive:!0})));return()=>{re(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=Y.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),z=Y.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return Y.useMemo(()=>n?{reference:R,floating:z,trigger:R}:{},[n,R,z])}function Js(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),J(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};ue(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Ys(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=G(i),{mounted:c,setMounted:l,transitionStatus:u}=oo(t,!1,!1,o),d=!t&&r;J(()=>{t&&s(!1)},[t,s]);let f=Y.useRef(c),p=Y.useRef(!1),m=Cr(),h=()=>{f.current=!1,l(!1),a()};J(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=G(()=>{f.current&&(t?(p.current=!0,m()):h())});return ao({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Xs={tabIndex:-1,[Qr]:``};function Zs(e){return t=>t!==`touch`||e.current}function Qs(e,t=!1){let n=Dr(),r=As()!=null,i=Fe(()=>e(n,r)).current;return Js({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function $s({handle:e,store:t}){return J(()=>e.attachStore(t),[e,t]),null}function ec(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function tc(e,t){let n=Y.useRef(null);return G(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),ec(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),ec(t))})}function nc(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function rc(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function ic(e,t,n,r={}){let i=n.reason,a=i===mo,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=rc(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=nc(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?kt.flushSync(l):l()}function ac(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=tc(e,n),o=G(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=G(e=>{a(e),e&&o(e)});return J(()=>(s(t.current),()=>s(null)),[s,t,n,e]),J(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function oc(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=Y.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);J(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Q(fo);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function sc(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Ys({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Fe(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function cc(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:Te,inactiveTriggerProps:Te,popupProps:Te})},[e])}function lc(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var uc=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},dc=n((e=>{var t=oe();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),fc=n(((e,t)=>{t.exports=dc()})),pc=n((e=>{var t=oe(),n=fc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),mc=n(((e,t)=>{t.exports=pc()})),hc=[],gc=void 0;function _c(){return gc}function vc(e){hc.push(e)}function yc(e){let t=(t,n)=>{let r=Fe(xc).current,i;try{gc=r;for(let e of hc)e.before(r);i=e(t,n);for(let e of hc)e.after(r);r.didInitialize=!0}finally{gc=void 0}return i};return t.displayName=e.displayName||e.name,t}function bc(e){return Y.forwardRef(yc(e))}function xc(){return{didInitialize:!1}}var Sc=fc(),Cc=mc(),wc=ye(19)?Dc:Oc;function Tc(e,t,n,r,i){return wc(e,t,n,r,i)}function Ec(e,t,n,r,i){let a=Y.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Sc.useSyncExternalStore)(e.subscribe,a,a)}vc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Sc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Dc(e,t,n,r,i){let a=_c();if(!a)return Ec(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Oc(e,t,n,r,i){return(0,Cc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var kc=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Tc(this,e,t,n,r)}},Ac=class extends kc{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){Y.useDebugValue(e);let n=this;J(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;J(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);J(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){Y.useDebugValue(e);let n=this,r=t!==void 0;J(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return Y.useDebugValue(e),Tc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){Y.useDebugValue(e);let n=G(t??Me);this.context[e]=n}useStateSetter(e){let t=Y.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jc={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Mc=class extends Ac{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ds(),nested:n,triggerElements:i},jc),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&zi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Nc(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Mc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Te,inactiveTriggerProps:Te,popupProps:Te}}var Pc=e=>e.triggerIdProp??e.activeTriggerId,Fc=e=>e.openProp??e.open,Ic=e=>(e.popupElement?.id??e.floatingId)||void 0;function Lc(e,t){return t!==void 0&&Fc(e)&&Pc(e)===t}function Rc(e,t){return Lc(e,t)?!0:t!==void 0&&Fc(e)&&Pc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var zc={open:Fc,mounted:e=>e.mounted,transitionStatus:e=>Fc(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Pc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Ic,isTriggerActive:(e,t)=>t!==void 0&&Pc(e)===t,isOpenedByTrigger:(e,t)=>Lc(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Pc(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Rc(e,t)?Ic(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Bc(e){let t=Y.useCallback(t=>e===void 0?Me:e.subscribeStore(t),[e]),n=Y.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Sc.useSyncExternalStore)(t,n,()=>e?.serverStore)}function Vc(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Dr(),a=As()!=null,o=Fe(()=>new Mc({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new uc,floatingId:i,syncOnly:!1,nested:a})).current;return J(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ue(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var Hc=Wr&&Kr;function Uc(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=Y.useRef(!1),s=Y.useRef(null),c=Y.useRef(!0),l=qa();Y.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ce(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&fe(t)&&t===Yr(Re(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Zo(Xo(r,`blur`,i),Hc&&Xo(r,`keydown`,a,!0),Hc&&Xo(r,`pointerdown`,l,!0))},[e,n]),Y.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);ue(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=Y.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=Zr(n.nativeEvent);if(ue(a)){if(Hc&&!n.relatedTarget){if(!c.current&&!Di(a))return}else if(!Ai(a))return}let u=wi(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Q(ho,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Q(ho,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=ue(r)&&r.hasAttribute(is(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Yr(Re(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||wi(r??n,e.context.triggerElements)||e.setOpen(!1,Q(ho,i))})}}},[a,r,e,l]);return Y.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Wc=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Ka;restTimeout=new Ka;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Gc=new WeakMap;function Kc(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Gc.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Gc.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function qc(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Gc.get(n);a&&a!==e&&Kc(a),Kc(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Gc.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Jc(e){let t=e.context.dataRef.current,n=Fe(()=>t.hoverInteractionState??Wc.create()).current;return t.hoverInteractionState||=n,Wa(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Yc(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=js(),u=As(),d=Jc(e),f=qa(),p=G(()=>Go(c.current.openEvent?.type,d.interactedInside)),m=G(()=>Ko(c.current.openEvent?.type)),h=G(()=>{Kc(d)});J(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),Y.useEffect(()=>h,[h]),J(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&ue(s)&&o){let e=s,t=o,n=Re(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??Xr(e,`[data-rootownerid]`)??n.body;return qc(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),Y.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Mi(l.nodesRef.current,u).length>0)}function a(t){let n=Uo(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Q(mo,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Zr(e);Oi(t)?d.interactedInside=Xr(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(wi(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&ue(o)&&Mi(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Q(mo,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Zo(y&&Xo(y,`mouseenter`,g),y&&Xo(y,`mouseleave`,_),y&&Xo(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Xc={current:null};function Zc(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Xc,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=js(l),v=Jc(e),y=Y.useRef(!1),b=Qo(i),x=Qo(r),S=Qo(o),C=Qo(n),w=Qo(p),T=Qo(f),E=G(()=>Go(h.current.openEvent?.type,v.interactedInside)),D=G(()=>w.current?.()!==!1),O=G((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!ue(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),k=G(()=>{v.handler&&=(Re(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=G(()=>{Kc(v)});return u&&(v.handleCloseOptions=i?.__options),Y.useEffect(()=>k,[k]),Y.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===mo,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),Y.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Uo(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Q(mo,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Q(mo,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!ue(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Ri(v.pointerType))return;let n=Wo(S.current),r=Uo(x.current,`open`,v.pointerType),i=Zr(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(ue(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}ue(o)&&ue(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&ue(c)&&ue(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,Q(mo,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Q(mo,t,c))}):g&&D()&&e.setOpen(!0,Q(mo,t,c)))}function o(n){if(E()){A();return}k();let r=Re(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!wi(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&Z(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Z(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?Xo(r,`mouseout`,l):void 0;return s?Zo(Xo(r,`mousemove`,i,{once:!0}),Xo(r,`mouseenter`,i),Xo(r,`mouseleave`,o),f):Zo(Xo(r,`mouseenter`,i),Xo(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),Y.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!Ri(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;qc(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Wo(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Q(mo,n,r))}v.pointerType===`touch`?kt.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function Qc(e){return Kr&&e.movementX===0&&e.movementY===0}function $c(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function el(e,t){return $c(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function tl(e,t,n){return $c(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function nl(e,t,n){return $c(t,n?e===ei:e===ti,e===ri)}function rl(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:$c(t,n?e===ti:e===ei,e===ni)}function il(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=ji(E),A=ki(D),j=Qo(k),M=As(),N=js(x),P=Y.useRef(f),F=Y.useRef(o??-1),I=Y.useRef(null),L=Y.useRef(!0),R=G(e=>{i(F.current===-1?null:F.current,e)}),z=Y.useRef(!!E),B=Y.useRef(T),V=Y.useRef(!1),H=Y.useRef(!1),ee=Y.useRef(null),te=Qo(h),U=Qo(T),ne=Qo(o),re=Qo(b),ie=$a(),ae=$a(),oe=G(()=>{ie.cancel();function e(e){d||(ee.current=os(e,{sync:V.current,preventScroll:!0}))}let t=n.current[F.current],r=H.current;t&&e(t),(V.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),W&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});J(()=>{O.current.orientation=g},[O,g]),J(()=>{T||(I.current=null),T&&f===`auto`||(P.current=f)},[T,f]),J(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(H.current=!0,R())):z.current&&(F.current=-1,R()))},[a,T,E,o,R]),J(()=>{if(a){if(!T)V.current=!1;else if(E){if(r==null){if(V.current=!1,ne.current!=null)return;if(z.current&&(F.current=-1,oe()),(!B.current||!z.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||tl(I.current,_,u)||l?ma(n):ha(n),I.current=null,R())};t()}}else pa(n.current,r)||(F.current=r,oe(),H.current=!1)}}},[a,T,E,r,ne,l,n,_,u,R,oe,ae]),J(()=>{if(!a||E||!N||d||!z.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=Yr(Re(D??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),J(()=>{B.current=T,z.current=!!E});let se=r!=null,ce=G(e=>{if(!U.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),le=G(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),ue=G(()=>ma(n,te.current)),de=G(t=>{if(L.current=!1,V.current=!0,t.which===229||!U.current&&t.currentTarget===j.current)return;if(l&&rl(t.key,g,u,w)){el(t.key,le())||Pi(t),e.setOpen(!1,Q(Co,t.nativeEvent));let n=S?.current??D;fe(n)&&n.focus();return}r!=null&&r!==F.current&&!pa(n.current,r)&&(F.current=r);let i=F.current,a=ma(n,h),o=ha(n,h);if(A||(t.key===`Home`&&(Pi(t),F.current=a,R(t)),t.key===`End`&&(Pi(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(el(t.key,g)){Pi(t);let e=Yr(t.currentTarget.ownerDocument);if(T&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){F.current=tl(t.key,g,u)?a:o,R(t),r===F.current&&oe();return}let{index:l,wrapped:f}=ga(n.current,i,{decrement:!tl(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(V.current=!1),F.current=l,R(t)}}),W=Y.useMemo(()=>({onFocus(e){V.current=!0,ce(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Qc(e)||(V.current=!0,H.current=!1,p&&ce(e))},onPointerLeave(e){if(!U.current||!L.current||e.pointerType===`touch`)return;V.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,F.current=-1,R(e),!d)){let e=j.current,t=Yr(Re(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[ce,U,j,p,n,R,re,d]),pe=Y.useMemo(()=>d&&T&&se&&{"aria-activedescendant":`${y}-${r}`},[d,T,se,y,r]),me=Y.useMemo(()=>({...A?{}:pe,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=Zr(t.nativeEvent);if(n&&!Z(j.current,n))return;Pi(t);let r=Q(xo,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&fe(i)&&i.focus()}else de(t)},onPointerMove(e){Qc(e)||(L.current=!0)}}),[pe,de,j,A,e,T,d,D,S]),he=Y.useMemo(()=>{function t(t){e.setOpen(!0,Q(Co,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Ii(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&Li(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=nl(n.key,le(),u),o=el(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Di(n.currentTarget)))return de(n);if(r||m||!i){if(s){let e=el(n.key,le());I.current=l&&e?null:n.key}l?a&&(Pi(n),r?(F.current=ue(),R(n),d&&j.current?.focus()):t(n)):o&&(ne.current!=null&&(F.current=ne.current),Pi(n),!r&&m?t(n):de(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[de,f,ue,l,R,e,m,g,_,le,u,ne,d,j]),ge=Y.useMemo(()=>({...pe,...he}),[pe,he]);return Y.useMemo(()=>a?{reference:ge,floating:me,item:W,trigger:he}:{},[a,ge,me,he,W])}function al(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=G(s),f=e.useState(`open`),p=qa(),m=Y.useRef(``),h=Y.useRef(u??i??-1),g=Y.useRef(null),_=G(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!ba(n)||n?.matches(`:disabled`)?!1:o==null||!va(ve,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Pi(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Pi(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=G(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Z(r,n)||Z(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});J(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=Y.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Y.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var ol=.1,sl=ol*ol,cl=.5;function ll(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ul(e,t,n,r,i,a,o,s,c,l){let u=!1;return ll(e,t,n,r,i,a)&&(u=!u),ll(e,t,i,a,o,s)&&(u=!u),ll(e,t,o,s,c,l)&&(u=!u),ll(e,t,c,l,n,r)&&(u=!u),u}function dl(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function fl(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function pl(e={}){let{blockPointerEvents:t=!1}=e,n=new Ka,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*sl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Zr(r),g=r.type===`mouseleave`,_=Z(u,h),v=Z(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ue(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Mi(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=fl(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=fl(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=fl(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=fl(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!dl(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?cl/2:cl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+cl+1,o=C||T?S.bottom-cl:S.top,s=C?T?S.bottom-cl:S.top:S.bottom-cl;M=ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?cl/2:cl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-cl,o=C||T?S.top+cl:S.bottom,s=C?T?S.top+cl:S.bottom:S.top+cl;M=ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?cl/2:cl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+cl+1,o=w||E?S.right-cl:S.left,s=w?E?S.right-cl:S.left:S.right-cl;M=ul(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?cl/2:cl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-cl,o=w||E?S.left+cl:S.right,s=w?E?S.left+cl:S.right:S.left+cl;M=ul(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function ml(e,t,n){let{reference:r,floating:i}=e,a=Qi(t),o=$i(t),s=Zi(o),c=Ji(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Yi(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function hl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=qi(t,e),p=da(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=fa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var gl=50,_l=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:hl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ml(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<gl&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ml(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},vl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=qi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ji(r),_=Qi(o),v=Ji(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[la(o)]:ta(o)),x=p!==`none`;!d&&x&&b.push(...ca(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ea(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Qi(t)||T.every(e=>Qi(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Qi(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},yl=new Set([`left`,`top`]);async function bl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ji(n),s=Yi(n),c=Qi(n)===`y`,l=yl.has(o)?-1:1,u=a&&c?-1:1,d=qi(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var xl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await bl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Sl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=qi(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Qi(i),p=Xi(f),m=u[p],h=u[f],g=(e,t)=>Ki(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Cl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=qi(e,t),u={x:n,y:r},d=Qi(i),f=Xi(d),p=u[f],m=u[d],h=qi(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=yl.has(Ji(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},wl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=qi(e,t),c=await i.detectOverflow(t,s),l=Ji(n),u=Yi(n),d=Qi(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Bi(p-c[m],g),y=Bi(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Vi(c.left,c.right):S=p-2*Vi(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Tl(e){let t=ne(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=fe(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Hi(n)!==a||Hi(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function El(e){return ue(e)?e:e.contextElement}function Dl(e){let t=El(e);if(!fe(t))return Wi(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Tl(t),o=(a?Hi(n.width):n.width)/r,s=(a?Hi(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ol=Wi(0);function kl(e){let t=Ce(e);return!he()||!t.visualViewport?Ol:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Al(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ce(e)}function jl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=El(e),o=Wi(1);t&&(r?ue(r)&&(o=Dl(r)):o=Dl(e));let s=Al(a,n,r)?kl(a):Wi(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ce(a),t=ue(r)?Ce(r):r,n=e,i=ie(n);for(;i&&t!==n;){let e=Dl(i),t=i.getBoundingClientRect(),r=ne(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ce(i),i=ie(n)}}return fa({width:u,height:d,x:c,y:l})}function Ml(e,t){let n=de(e).scrollLeft;return t?t.left+n:jl(me(e)).left+n}function Nl(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ml(e,n),y:n.top+t.scrollTop}}function Pl(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=me(r),s=t?U(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wi(1),u=Wi(0),d=fe(r);if((d||!a)&&((re(r)!==`body`||ce(o))&&(c=de(r)),d)){let e=jl(r);l=Dl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Nl(o,c):Wi(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Fl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Il(e){let t=de(e),n=e.ownerDocument.body,r=Vi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Vi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ml(e),o=-t.scrollTop;return ne(n).direction===`rtl`&&(a+=Vi(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ll=25;function Rl(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ce(e),a=me(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!he()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ml(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ll&&(s-=o)}return{width:s,height:c,x:l,y:u}}function zl(e,t){let n=jl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Dl(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Bl(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Rl(e,n,t);else if(t===`document`)r=Il(me(e));else if(ue(t))r=zl(t,n);else{let n=kl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fa(r)}function Vl(e,t){let n=t.get(e);if(n)return n;let r=we(e,[],!1).filter(e=>ue(e)&&re(e)!==`body`),i=null,a=ne(e).position===`fixed`,o=a?te(e):e;for(;ue(o)&&!ae(o);){let e=ne(o),t=le(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=te(o)}return t.set(e,r),r}function Hl(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?U(t)?[]:Vl(t,this._c):[].concat(n),r],o=Bl(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Bl(t,a[e],i);s=Vi(n.top,s),c=Bi(n.right,c),l=Bi(n.bottom,l),u=Vi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ul(e){let{width:t,height:n}=Tl(e);return{width:t,height:n}}function Wl(e,t,n){let r=fe(t),i=me(t),a=n===`fixed`,o=jl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Wi(0);if((r||!a)&&((re(t)!==`body`||ce(i))&&(s=de(t)),r)){let e=jl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ml(i));let l=i&&!r&&!a?Nl(i,s):Wi(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Gl(e){return ne(e).position===`static`}function Kl(e,t){if(!fe(e)||ne(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return me(e)===n&&(n=n.ownerDocument.body),n}function ql(e,t){let n=Ce(e);if(U(e))return n;if(!fe(e)){let t=te(e);for(;t&&!ae(t);){if(ue(t)&&!Gl(t))return t;t=te(t)}return n}let r=Kl(e,t);for(;r&&Ie(r)&&Gl(r);)r=Kl(r,t);return r&&ae(r)&&Gl(r)&&!le(r)?n:r||Pe(e)||n}var Jl=async function(e){let t=this.getOffsetParent||ql,n=this.getDimensions,r=await n(e.floating);return{reference:Wl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Yl(e){return ne(e).direction===`rtl`}var Xl={convertOffsetParentRelativeRectToViewportRelativeRect:Pl,getDocumentElement:me,getClippingRect:Hl,getOffsetParent:ql,getElementRects:Jl,getClientRects:Fl,getDimensions:Ul,getScale:Dl,isElement:ue,isRTL:Yl};function Zl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ql(e,t,n){let r=null,i,a=me(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Ui(d),h=Ui(a.clientWidth-(u+f)),g=Ui(a.clientHeight-(d+p)),_=Ui(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Vi(0,Bi(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Zl(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ce(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function $l(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=El(e),u=i||a?[...l?we(l):[],...t?we(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ql(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?jl(e):null;c&&g();function g(){let t=jl(e);h&&!Zl(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var eu=xl,tu=Sl,nu=vl,ru=wl,iu=Cl,au=(e,t,n)=>{let r=new Map,i=n??{},a={...Xl,...i.platform,_c:r};return _l(e,t,{...i,platform:a})},ou=typeof document<`u`?Y.useLayoutEffect:function(){};function su(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!su(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!su(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function cu(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lu(e,t){let n=cu(e);return Math.round(t*n)/n}function uu(e){let t=Y.useRef(e);return ou(()=>{t.current=e}),t}function du(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);su(f,r)||p(r);let[m,h]=Y.useState(null),[g,_]=Y.useState(null),v=Y.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=Y.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=Y.useRef(null),C=Y.useRef(null),w=Y.useRef(u),T=c!=null,E=uu(c),D=uu(i),O=uu(l),k=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),au(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!su(w.current,t)&&(w.current=t,kt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);ou(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Y.useRef(!1);ou(()=>(A.current=!0,()=>{A.current=!1}),[]),ou(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=Y.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=Y.useMemo(()=>({reference:b,floating:x}),[b,x]),N=Y.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=lu(M.floating,u.x),r=lu(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...cu(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return Y.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var fu=(e,t)=>{let n=eu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pu=(e,t)=>{let n=tu(e);return{name:n.name,fn:n.fn,options:[e,t]}},mu=(e,t)=>({fn:iu(e).fn,options:[e,t]}),hu=(e,t)=>{let n=nu(e);return{name:n.name,fn:n.fn,options:[e,t]}},gu=(e,t)=>{let n=ru(e);return{name:n.name,fn:n.fn,options:[e,t]}},_u=Y.createContext(void 0);function vu(){let e=Y.useContext(_u);if(e===void 0)throw Error(ge(26));return e}var yu=`ArrowUp`,bu=`ArrowDown`,xu=`ArrowLeft`,Su=`ArrowRight`,Cu=`Home`,wu=`PageUp`,Tu=`PageDown`,Eu=new Set([yu,bu,xu,Su,Cu,`End`]),Du=[`Shift`,`Control`,`Alt`,`Meta`];function Ou(e){return fe(e)&&e.tagName===`INPUT`}function ku(e){return!!(Ou(e)&&e.selectionStart!=null||fe(e)&&e.tagName===`TEXTAREA`)}function Au(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=ju(e,t,`left`),a=Mu(e),o=Mu(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=ju(e,t,`top`),r=Mu(e),i=Mu(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function ju(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Mu(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Nu=`--nested-dialogs`,Pu=`data-nested-dialog-open`,Fu={...xi,...ci,nestedDialogOpen(e){return e?{[Pu]:``}:null}},Iu=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Ro(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);vu(),ao({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Zs(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=q(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Xs,hidden:!m,onKeyDown(e){Eu.has(e.key)&&e.stopPropagation()},style:{[Nu]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:Fu});return(0,X.jsx)(Bs,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})});function Lu(e){return ye(19)?e:e?`true`:void 0}var Ru=Y.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,X.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),zu=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Ro(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,X.jsx)(_u.Provider,{value:n,children:(0,X.jsxs)(Es,{ref:t,...r,children:[a&&o===!0&&(0,X.jsx)(Ru,{ref:i.context.internalBackdropRef,inert:Lu(!s)}),e.children]})}):null}),Bu={},Vu={},Hu=``;function Uu(e,t){return ce(e)?e:t}function Wu(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Uu(t,n)).overflowY)}function Gu(e){if(typeof document>`u`)return!1;let t=Re(e);return Ce(t).innerWidth-t.documentElement.clientWidth>0}function Ku(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Re(e),n=t.documentElement,r=t.body,i=Uu(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function qu(e){let t=Re(e),n=t.documentElement,r=t.body,i=Uu(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ju(e){let t=Re(e),n=t.documentElement,r=t.body,i=Ce(n),a=0,o=0,s=!1,c=Qa.create();if(Kr&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Bu={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Hu=n.style.scrollBehavior,Vu={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Uu(n,r);s=Ku(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Bu),Object.assign(r.style,Vu),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Hu)}function d(){u(),c.request(l)}l();let f=Xo(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Yu=new class{lockCount=0;restore=null;timeoutLock=Ka.create();timeoutUnlock=Ka.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Re(e),n=t.documentElement,r=t.body,i=Ce(n);if(Wu(i,n,r)){let t=new i.MutationObserver(()=>{Wu(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Vr||!Gu(e);this.restore=a?qu(e):Ju(e)}};function Xu(e=!0,t=null){J(()=>{if(e)return Yu.acquire(t)},[e,t])}function Zu({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=Y.useState(0),[d,f]=Y.useState(0),p=l===0,m=qs(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Zr(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Z(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return Xu(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),J(()=>{!r&&!i&&(u(0),f(0))},[r,i]),J(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),cc(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Qu={...zc,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},$u=class extends Ac{constructor(e,t,n){let r=new uc,i=ed(e,r,t,n);super(i,td(r),Qu)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(nc(this.state,e,t.trigger)))}};function ed(e,t,n,r=!1){return{...Nc(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function td(e){return{popupRef:Y.createRef(),backdropRef:Y.createRef(),internalBackdropRef:Y.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function nd(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Ro(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=Qs((e,t)=>new $u({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);lc(b,x),oc(b);let{forceUnmount:w}=sc(x,b);Y.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,Q(Ao))}),[w,b]);let T=x||S||u!=null;return(0,X.jsxs)(Lo.Provider,{value:b,children:[u&&(0,X.jsx)($s,{handle:u,store:b}),T&&(0,X.jsx)(Zu,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var rd=yc(function(e){return nd(`dialog`,e)}),id=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Ro(),c=Or(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),q(`h2`,e,{ref:t,props:[{id:c},o]})});function ad(e){let t=Y.useRef(``),n=Y.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Y.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function od(e,t){let{onClick:n,onPointerDown:r}=ad(G((n,r)=>{(typeof e==`function`?e():e)||t(r||(Vr?`touch`:``))}));return Y.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function sd(e){let[t,n]=Y.useState(null),r=od(e,n);return lo(e,t=>{t&&!e&&n(null)}),Y.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function cd({...e}){return(0,X.jsx)(rd,{"data-slot":`sheet`,...e})}function ld({...e}){return(0,X.jsx)(zu,{"data-slot":`sheet-portal`,...e})}function ud({className:e,...t}){return(0,X.jsx)(zo,{"data-slot":`sheet-overlay`,className:K(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function dd({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,X.jsxs)(ld,{children:[(0,X.jsx)(ud,{}),(0,X.jsxs)(Iu,{"data-slot":`sheet-content`,"data-side":n,className:K(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,X.jsxs)(Bo,{"data-slot":`sheet-close`,render:(0,X.jsx)(De,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,X.jsx)(I,{}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function fd({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sheet-header`,className:K(`flex flex-col gap-0.5 p-4`,e),...t})}function pd({className:e,...t}){return(0,X.jsx)(id,{"data-slot":`sheet-title`,className:K(`cn-font-heading text-base font-medium text-foreground`,e),...t})}function md({className:e,...t}){return(0,X.jsx)(Vo,{"data-slot":`sheet-description`,className:K(`text-sm text-muted-foreground`,e),...t})}var hd=Y.createContext(void 0);function gd(e){let t=Y.useContext(hd);if(t===void 0&&!e)throw Error(ge(72));return t}var _d={...zc,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},vd=class extends Ac{constructor(e,t,n){let r=new uc;super(yd(e,r,t,n),bd(r),_d)}setOpen=(e,t)=>{ic(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Q(po,e))}};function yd(e,t,n,r=!1){return{...Nc(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function bd(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var xd=yc(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Qs((e,t)=>new vd({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),oc(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=sc(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=Y.useRef(null);J(()=>{m&&t&&p.setOpen(!1,Q(Do))},[m,t,p]),J(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),J(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),Y.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Q(Ao))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,X.jsxs)(hd.Provider,{value:p,children:[l&&(0,X.jsx)($s,{handle:l,store:p}),T&&(0,X.jsx)(Sd,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Sd({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=qs(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Ws(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=Y.useMemo(()=>Ne(a.reference,i.reference),[a.reference,i.reference]);return cc(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Te}),null}var Cd=Y.createContext(void 0);function wd(){return Y.useContext(Cd)}var Td=`data-base-ui-tooltip-trigger`;function Ed(e){let t=Zr(e);return ue(t)?t:null}var Dd=bc(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=gd(!0),m=Bc(a)??p;if(!m)throw Error(ge(82));let h=Or(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=Y.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=ac(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=wd(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=Yo(v,{open:_}),O=Jc(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=Qo(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=Y.useRef(!1),F=qa(),I=Y.useRef(void 0);function L(){return D&&w.current!=null?0:c??C??600}function R(e){let t=y.current;if(!t||!e)return!1;let n=Xr(e,`[${Td}]`);return n!==null&&n!==t&&Z(t,n)}function z(e){let t=R(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let B=Zc(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?pl():null,restMs:L,delay(){return u==null&&D?{close:Uo(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),V=Uc(v,{enabled:!A}).reference,H=e=>{let t=P.current,n=Ed(e),r=z(n),i=y.current,a=i&&n&&Z(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,Q(mo,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Ri(I.current)){let t=()=>{P.current||j.current||m.select(`open`)||m.setOpen(!0,Q(mo,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ee=m.useState(`appliedTriggerProps`,S||M!==`none`);return q(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,V,ee,{onMouseOver(e){H(e.nativeEvent)},onFocus(e){R(Ed(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Ci]:A?``:void 0,[Td]:A?void 0:``},f],stateAttributesMapping:yi})}),Od=Y.createContext(void 0);function kd(){let e=Y.useContext(Od);if(e===void 0)throw Error(ge(70));return e}var Ad=Y.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ts({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,X.jsxs)(Y.Fragment,{children:[l,c&&kt.createPortal(n,c)]})}),jd=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return gd().useState(`mounted`)||n?(0,X.jsx)(Od.Provider,{value:n,children:(0,X.jsx)(Ad,{ref:t,...r})}):null}),Md=Y.createContext(void 0);function Nd(){let e=Y.useContext(Md);if(e===void 0)throw Error(ge(71));return e}function Pd(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=Y.useState(null),d=Y.useRef(null),f=js(n),p=Y.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=du({...e,elements:{...p,...l&&{reference:l}}}),h=Y.useCallback(e=>{let t=ue(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=Y.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=Y.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=Y.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return J(()=>{o&&(d.current=o)},[o]),J(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),Y.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var Fd=Y.createContext(void 0);function Id(){return Y.useContext(Fd)?.direction??`ltr`}var Ld=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=qi(e,t)||{};if(l==null)return{};let d=da(u),f={x:n,y:r},p=$i(i),m=Zi(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Ki(D,k,O),j=!c.arrow&&Yi(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Rd=(e,t)=>{let{name:n,fn:r}=Ld(e);return{name:n,fn:r,options:[e,t]}},zd={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Bd={sideX:`left`,sideY:`top`},Vd=`--available-width`,Hd=`--available-height`,Ud=`--anchor-width`,Wd=`--anchor-height`,Gd=`--transform-origin`,Kd=Vd,qd=Hd;function Jd(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Yd(e,t,n){let{rects:r,placement:i}=e;return{side:Jd(t,Ji(i),n),align:Yi(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Xd(e){return Zd(e,Pd)}function Zd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=G(O),A=O?k:n,j=Qo(n),M=Qo(g),N=Id()===`rtl`,[P,F]=Y.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?Ji(P):null,R=P&&I?Yi(P)||`center`:null,z=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],B=R||o,V=B===`center`?z:`${z}-${B}`,H=l;typeof H==`number`?H={top:H,right:H,bottom:H,left:H}:H&&={top:H.top||0,right:H.right||0,bottom:H.bottom||0,left:H.left||0};let ee=+(i===`bottom`),te=+(i===`top`),U=+(i===`right`),ne=+(i===`left`),re={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:H},ie=Y.useRef(null),ae=Qo(a),oe=Qo(s),se=typeof a==`function`?0:a,ce=typeof s==`function`?0:s,le=[];p&&le.push(p),le.push(fu(e=>{let t=Yd(e,i,N),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof oe.current==`function`?oe.current(t):oe.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[se,ce,N,i]));let ue=w===`none`&&C!==`shift`,de=!ue&&(u||E||C===`shift`),fe=C===`none`?null:hu({...re,padding:{top:H.top+1+ee,right:H.right+1+ne,bottom:H.bottom+1+te,left:H.left+1+U},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),W=ue?null:pu({...re,rootBoundary:D,mainAxis:w!==`none`,crossAxis:de,limiter:u||E?void 0:mu(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=Qi(Ji(e.placement)),i=r===`y`?t:n,a=r===`y`?H.left+H.right:H.top+H.bottom;return{offset:i/2+a/2}})},[re,u,E,D,H,w]);C===`shift`||w===`shift`||B===`center`?le.push(W,fe):le.push(fe,W),le.push(gu({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(Kd,`${t}px`),i.setProperty(qd,`${n}px`);let a=Ce(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Ud,`${u}px`),i.setProperty(Wd,`${d}px`)}}),Rd(e=>({element:ie.current||Re(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Ji(r),u=Yi(r),d=Qi(l)===`y`,f=ie.current,p=typeof a==`function`?a(Yd(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return de&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Gd,d?`${m} ${h}`:`${h} ${m}`),{}}},zd,b),J(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let pe=Y.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:me,elements:he,x:ge,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:K}=t({rootContext:h,open:m?g:void 0,placement:V,middleware:le,strategy:r,whileElementsMounted:m?void 0:(...e)=>$l(...e,pe),nodeId:y,externalTree:S}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||Bd,Ee=Se?r:`fixed`,De=Y.useMemo(()=>{let e;return e=Se?b?{position:Ee,[we]:ge,[Te]:_e}:{...K,position:Ee}:{position:Ee,top:0,left:0},e[Kd]=`100vw`,e[qd]=`100vh`,Se||(e.opacity=0),e},[b,Ee,we,ge,Te,_e,K,Se]),q=Y.useRef(null);J(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(Qd(t)?t.current:t)||null;n!==q.current&&(me.setPositionReference(n),q.current=n)},[g,me,A,j]),Y.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&Qd(e)&&e.current!==q.current&&(me.setPositionReference(e.current),q.current=e.current)},[g,me,A,j]),Y.useEffect(()=>{if(m&&g&&he.reference&&he.floating)return $l(he.reference,he.floating,ye,pe)},[m,g,he,ye,pe]);let Oe=Ji(be),ke=Jd(i,Oe,N),Ae=Yi(be)||`center`,je=!!ve.hide?.referenceHidden;J(()=>{x&&g&&Se&&(Oe!==z||I&&Ae!==B)&&F(be)},[x,I,g,Se,be,Oe,Ae,z,B]);let Me=Y.useMemo(()=>({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Ne=ve.arrow?.centerOffset!==0;return Y.useMemo(()=>({positionerStyles:De,arrowStyles:Me,arrowRef:ie,arrowUncentered:Ne,side:ke,align:Ae,physicalSide:Oe,anchorHidden:je,refs:me,context:xe,isPositioned:Se,update:ye}),[De,Me,ie,Ne,ke,Ae,Oe,je,me,xe,Se,ye])}function Qd(e){return e!=null&&`current`in e}function $d(e){return e===`starting`?vs:Te}function ef(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),q(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},$d(r),i],stateAttributesMapping:xi})}var tf=Y.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=bs,style:g,..._}=e,v=gd(),y=kd(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Xd({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=ef(e,Y.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,X.jsx)(Md.Provider,{value:D,children:O})}),nf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=gd(),{side:s,align:c}=Nd(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ao({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Yc(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return q(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Xs,f,$d(d),a],stateAttributesMapping:Si})}),rf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=gd(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Nd(),f={open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)};return q(`div`,e,{state:f,ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:xi})});function af(e){let[t,n]=Y.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function of({...e}){return(0,X.jsx)(xd,{"data-slot":`tooltip`,...e})}function sf({...e}){return(0,X.jsx)(Dd,{"data-slot":`tooltip-trigger`,...e})}function cf({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,X.jsx)(jd,{children:(0,X.jsx)(tf,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,X.jsxs)(nf,{"data-slot":`tooltip-content`,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,X.jsx)(rf,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var lf=`sidebar_state`,uf=604800,df=`16rem`,ff=`18rem`,pf=`3rem`,mf=`b`,hf=Y.createContext(null);function gf(){let e=Y.useContext(hf);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function _f({defaultOpen:e=!0,keyboardShortcut:t=!0,open:n,onOpenChange:r,className:i,style:a,children:o,...s}){let c=fr(),[l,u]=Y.useState(!1),[d,f]=Y.useState(e),p=n??d,m=Y.useCallback(e=>{let t=typeof e==`function`?e(p):e;r?r(t):f(t),document.cookie=`${lf}=${t}; path=/; max-age=${uf}`},[r,p]),h=Y.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);Y.useEffect(()=>{let e=e=>{t&&e.key===mf&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,t]);let g=p?`expanded`:`collapsed`,_=Y.useMemo(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,X.jsx)(hf.Provider,{value:_,children:(0,X.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":df,"--sidebar-width-icon":pf,...a},className:K(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,i),...s,children:o})})}function vf({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=gf();return n===`none`?(0,X.jsx)(`div`,{"data-slot":`sidebar`,className:K(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,X.jsx)(cd,{open:l,onOpenChange:u,...o,children:(0,X.jsxs)(dd,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":ff},side:e,children:[(0,X.jsxs)(fd,{className:`sr-only`,children:[(0,X.jsx)(pd,{children:`Sidebar`}),(0,X.jsx)(md,{children:`Displays the mobile sidebar.`})]}),(0,X.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,X.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,X.jsx)(`div`,{"data-slot":`sidebar-gap`,className:K(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,X.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:K(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,X.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function yf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function bf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function xf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:K(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Sf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:K(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Cf({className:e,...t}){return(0,X.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:K(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function wf({className:e,...t}){return(0,X.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:K(`group/menu-item relative`,e),...t})}var Tf=_e(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Ef({render:e,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let{isMobile:s,state:c}=gf(),l=ur({defaultTagName:`button`,props:Ne({className:K(Tf({variant:n,size:r}),a)},o),render:i?(0,X.jsx)(sf,{render:e}):e,state:{slot:`sidebar-menu-button`,sidebar:`menu-button`,size:r,active:t}});return i?(typeof i==`string`&&(i={children:i}),(0,X.jsxs)(of,{children:[l,(0,X.jsx)(cf,{side:`right`,align:`center`,hidden:c!==`collapsed`||s,...i})]})):l}function Df({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=Y.useRef(e!==void 0),[a,o]=Y.useState(()=>t);return[i&&e!==void 0?e:a,Y.useCallback(e=>{i||o(e)},[])]}function Of(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var kf=`data-checked`,Af=`data-unchecked`;function jf(e){return{checked(t){return e.indeterminate?{}:t?{[kf]:``}:{[Af]:``}},..._r}}var Mf=Y.createContext(void 0);function Nf(){return Y.useContext(Mf)}var Pf=Y.createContext(void 0);function Ff(){let e=Y.useContext(Pf);if(e===void 0)throw Error(ge(14));return e}var If=`data-parent`,Lf=Y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=Sr(),{disabled:C,name:w,setDirty:T,setFilled:E,setTouched:D,state:O,validationMode:k,validityData:A,validation:j}=br(),M=Ya(),{labelId:N,registerControlId:P,getDescriptionProps:F}=Ar(),I=Nf(),L=I?.allValues===void 0?void 0:I.parent,R=L!==void 0,z=C||M.disabled||I?.disabled||o,B=w??d,V=v??B,H=Or(),ee=I?.registerControlId!==P,te=Pr({id:c||void 0,enabled:ee}),U=y?te:H,ne={};R&&(p?ne=L.getParentProps():V!==void 0&&(ne=L.getChildProps(V)));let{checked:re=n,indeterminate:ie=l,onCheckedChange:ae,...oe}=ne,se=I?.value,ce=Y.useRef(null),le=so(z,ce),{getButtonProps:ue,buttonRef:de}=Oe({disabled:z,native:y}),fe=I?.validation??j,[W,pe]=Df({controlled:V!==void 0&&se!==void 0&&!p?se.includes(V):re,default:i,name:`Checkbox`,state:`checked`}),me=R?!!re:W,he=R&&ie||l;co(ce,H,W,void 0,!I&&!z,d);let ge=L?.registerChildId,_e=Y.useRef(null),G=fe.registerInput,ve=I?V:void 0,ye=Y.useCallback(e=>G(e,{controlRef:ce,value:ve}),[G,ve]),xe=be(u,_e,p?void 0:ye),Se=jr(a,N,_e,!y,te,x[`aria-label`]);J(()=>{_e.current&&(_e.current.indeterminate=he),I||E(W)},[W,he,I,E]),lo(W,()=>{I||(S(B),T(W!==A.initialValue),fe.change(W))});let K=Ne({checked:W,disabled:z,form:s,name:p?void 0:B,id:y?void 0:te,required:g,ref:xe,style:B?ns:ts,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Q(fo,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(ae?.(t,n),!n.isCanceled&&(pe(t),V!==void 0&&I!==void 0&&!p&&!R))){let e=t?[...I.value,V]:I.value.filter(e=>e!==V);I.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){ce.current?.focus()}},v===void 0?Te:{value:(I?W&&v:v)||``},F,e=>fe.getValidationProps(z,e));Y.useEffect(()=>{if(!L||V===void 0)return;let e=L.disabledStatesRef.current;return e.set(V,z),()=>{e.delete(V)}},[L,z,V]);let we=Y.useMemo(()=>({...O,checked:me,disabled:z,readOnly:m,required:g,indeterminate:he}),[O,me,z,m,g,he]),De=jf(we),ke=q(`span`,e,{state:we,ref:[de,ce,t],props:[{id:U,role:`checkbox`,"aria-checked":he?`mixed`:me,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Se,[If]:p?``:void 0,onFocus(){le(!0)},onBlur(){let e=_e.current;e&&(D(!0),le(!1),k===`onBlur`&&fe.commit(I?se:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=_e.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Ce(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||Of(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=_e.current;t&&Ee(t,e)}},x,oe,ue,F,e=>fe.getValidationProps(z,e)],stateAttributesMapping:De}),Ae=ke.props.id;return J(()=>{if(ge&&!p&&V!==void 0&&Ae!==void 0)return ge(V,Ae)},[ge,p,V,Ae]),(0,X.jsxs)(Pf.Provider,{value:we,children:[ke,!W&&!I&&B&&!p&&_!==void 0&&(0,X.jsx)(`input`,{type:`hidden`,form:s,name:B,value:_,disabled:z}),(0,X.jsx)(`input`,{...K,suppressHydrationWarning:!0})]})}),Rf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Ff(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=oo(c),f=Y.useRef(null),p={...s,transitionStatus:u};ao({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...jf(s),...ci},h=a||l,g=q(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function zf({className:e,...t}){return(0,X.jsx)(Lf,{"data-slot":`checkbox`,className:K(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary`,e),...t,children:(0,X.jsx)(Rf,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,X.jsx)(mt,{})})})}function Bf({className:e,size:t=`default`,...n}){return(0,X.jsxs)(`div`,{className:K(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":t,children:[(0,X.jsx)(`select`,{"data-slot":`native-select`,"data-size":t,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...n}),(0,X.jsx)(ut,{className:`pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function Vf({className:e,...t}){return(0,X.jsx)(`option`,{"data-slot":`native-select-option`,className:K(`bg-[Canvas] text-[CanvasText]`,e),...t})}var Hf=Y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Uf(){return Y.useContext(Hf)}function Wf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=G(i),[,o]=Y.useState(0),s=Fe(Kf).current,c=Fe(Gf).current,l=Y.useRef(0),u=Y.useRef(!0),d=Y.useRef(null),f=Y.useRef(null),p=G(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=G((e,t)=>{c.set(e,t),p()}),h=G(e=>{c.delete(e),p()}),g=G(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Yf(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Xf(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Jf(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=G(()=>{let[e,t]=qf(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});J(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),J(()=>{u.current&&v()}),J(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=G(e=>(s.add(e),()=>{s.delete(e)})),b=Y.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,X.jsx)(Hf.Provider,{value:b,children:t})}function Gf(){return new Map}function Kf(){return new Set}function qf(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Xf(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Jf(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Yf(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Xf(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var Zf=Y.createContext(void 0);function Qf(){let e=Y.useContext(Zf);if(e===void 0)throw Error(ge(64));return e}var $f=`data-activation-direction`,ep={tabActivationDirection:e=>({[$f]:e})},tp=Y.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=Y.useRef([]),[f,p]=Y.useState(()=>new Map),[m,h]=Df({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=Y.useState(()=>new Map),y=Y.useRef(void 0),b=Y.useCallback(e=>np(_,e),[_]),[x,S]=Y.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==m&&(T=rp(C,m,a,_),E=C!=null&&m!=null&&b(m)==null);let D=E?C:m,O=C!==D||w!==T;J(()=>{O&&S({previousValue:D,tabActivationDirection:T})},[D,O,T]);let k=G((e,t)=>{t.activationDirection=rp(m,e,a,_),i?.(e,t),!t.isCanceled&&h(()=>e)}),A=G((e,t)=>{i?.(e,Q(t,void 0,void 0,{activationDirection:`none`}))}),j=G((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),M=Y.useCallback(e=>f.get(e),[f]),N=Y.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),P=Y.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:N,getTabPanelIdByValue:M,onValueChange:k,orientation:a,registerMountedTabPanel:j,setTabMap:v,tabActivationDirection:T,value:m}),[b,N,M,k,a,j,v,T,m]),F=Y.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),I=Y.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),L=Y.useRef(!u),R=Y.useRef(r),z=Y.useRef(u),B=Y.useRef(!1);J(()=>{if(g)return;function e(e,t){h(()=>e),S({previousValue:e,tabActivationDirection:`none`}),A(e,t),L.current=!1}if(_.size===0){B.current&&m!==null&&!y.current?.isConnected&&e(null,Oo);return}B.current=!0,y.current=_.keys().next().value;let t=F?.disabled,n=F==null&&m!==null;if(!t&&m===R.current&&(z.current=!1),z.current&&t&&m===R.current)return;let r=L.current;if(t||n){let n=I??null;if(m===n){L.current=!1;return}let i=Oo;r?i=ko:t&&(i=Do),e(n,i)}else r&&F!=null&&(A(m,ko),L.current=!1)},[I,g,A,F,h,_,m]);let V=q(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:ep});return(0,X.jsx)(Zf.Provider,{value:P,children:(0,X.jsx)(Wf,{elementsRef:d,children:V})})});function np(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function rp(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=np(r,e),c=np(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var ip=`data-composite-item-active`;function ap(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Uf(),u=Y.useRef(-1),[d,f]=Y.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=Y.useRef(null),h=Y.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return J(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function op(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=xe(),{ref:i,index:a}=ap(e),o=n===a,s=Y.useRef(null),c=be(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}var sp=Y.createContext(void 0);function cp(){let e=Y.useContext(sp);if(e===void 0)throw Error(ge(65));return e}var lp=Y.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=Qf(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=cp(),{highlightedIndex:v,onHighlightedIndexChange:y}=xe(),b=Or(o),{compositeProps:x,compositeRef:S,index:C}=op({metadata:Y.useMemo(()=>({disabled:r,id:b,value:a}),[r,b,a])}),w=a===u,T=Y.useRef(!1),E=Y.useRef(null),D=G(e=>{E.current?.(),E.current=e?g(e):null});J(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&v!==C))return;let e=_;if(e!=null){let t=Yr(Re(e));if(t&&Z(e,t))return}r||y(C)},[w,C,v,y,r,_]);let{getButtonProps:O,buttonRef:k}=Oe({disabled:r,native:s,focusableWhenDisabled:!0}),A=d(a),j=Y.useRef(!1),M=Y.useRef(!1);function N(e){f(a,Q(fo,e.nativeEvent,void 0,{activationDirection:`none`}))}function P(e){w||r||N(e)}function F(e){w||r||h&&(!j.current||M.current)&&N(e)}function I(e){if(w||r)return;j.current=!0,M.current=e.button===0;let t=Re(e.currentTarget);function n(){j.current=!1,M.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return q(`button`,e,{state:{disabled:r,active:w,orientation:p,tabActivationDirection:m},ref:[t,k,S,D],props:[x,{role:`tab`,"aria-controls":A,"aria-selected":w,id:b,onClick:P,onFocus:F,onPointerDown:I,[ip]:w?``:void 0,onKeyDownCapture(){T.current=!0}},l,O],stateAttributesMapping:ep})}),up=()=>()=>{},dp=()=>!0,fp=()=>!1;function pp(){return(0,Sc.useSyncExternalStore)(up,dp,fp)}function mp(){let[e,t]=Y.useState(!1);return Y.useEffect(()=>{t(!0)},[]),e}var hp=ye(18)?pp:mp;function gp(){return!hp()}var _p=Y.createContext(void 0),vp={disableStyleElements:!1};function yp(){return Y.useContext(_p)??vp}function bp(e){let{script:t}=e,{nonce:n}=yp();return gp()?(0,X.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var xp=`data-index`,Sp={...ep,...ci},Cp=Y.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=Qf(),p=Or(),{ref:m,index:h}=ap(),g=r===c,{mounted:_,transitionStatus:v,setMounted:y}=oo(g),b=!_,x=l(r),S={hidden:b,orientation:u,tabActivationDirection:d,transitionStatus:v},C=Y.useRef(null),w=q(`div`,e,{state:S,ref:[t,m,C],props:[{"aria-labelledby":x,hidden:b,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:Lu(!g),[xp]:h},s],stateAttributesMapping:Sp});return ao({open:g,ref:C,onComplete(){g||y(!1)}}),J(()=>{if(!(p==null||b&&!a))return f(r,p)},[b,a,r,p,f]),a||_?w:null});function wp(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function Tp(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=ve}=e,[p,m]=Y.useState(0),h=r!=null,g=Y.useRef(null),_=be(g,c),v=Y.useRef([]),y=Y.useRef(!1),b=Y.useRef(null),x=o??p,S=G((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Au(g.current,t,a,n)}}),C=G(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(b.current);if(t===-1){let t=e[x];!t||va(e,x,d)?S(Ep(e,d)):b.current=t}else t!==x&&S(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)S(i);else if(va(t,x,d)){let e=_a(t,{disabledIndices:d});pa(t,e)||S(e)}Au(g.current,r,a,n)});J(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(va(e,x,d)){let t=_a(e,{disabledIndices:d});pa(e,t)||S(t)}},[d,o,x,v,S]);let w=G((e,t,n)=>i?i(e,t,n,v):n),T=G(e=>{let o=e.key===`Home`||e.key===`End`;if(!Eu.has(e.key)||!l&&o||Dp(e,f)||!g.current)return;let s=a===`rtl`,c=s?xu:Su,p=s?Su:xu,m=n===`vertical`?bu:c,_=n===`vertical`?yu:p,y=Zr(e.nativeEvent);if(y!=null&&ku(y)&&!wp(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=x,C=ma(v,d),T=ha(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:x,loopFocus:t,maxIndex:T,minIndex:C,onLoop:w,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=C:e.key===`End`&&(b=T)),b===x&&(E||D)&&(t&&b===T&&E?(b=C,i&&(b=i(e,x,b,v))):t&&b===C&&D?(b=T,i&&(b=i(e,x,b,v))):b=_a(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!pa(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=Zr(e.nativeEvent);t&&n!=null&&ku(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function Ep(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!va(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Dp(e,t){for(let n of Du)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Op(e){let{render:t,className:n,style:r,refs:i=ve,props:a=ve,state:o=Te,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:O}=Tp({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:Id(),disabledIndices:v,modifierKeys:y}),k=q(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),A=Y.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,X.jsx)(Se.Provider,{value:A,children:(0,X.jsx)(Wf,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var kp=Y.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=Qf(),[d,f]=Y.useState(0),[p,m]=Y.useState(null),h=Y.useRef(new Set),g=Y.useRef(new Set),_=Y.useRef(null);J(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=G(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=G(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),b={orientation:c,tabActivationDirection:u},x={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},S=Y.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,X.jsx)(sp.Provider,{value:S,children:(0,X.jsx)(Op,{render:a,className:r,style:o,state:b,refs:[t,m],props:[x,s],stateAttributesMapping:ep,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:ve})})});function Ap({className:e,orientation:t=`horizontal`,...n}){return(0,X.jsx)(tp,{"data-slot":`tabs`,"data-orientation":t,className:K(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var jp=_e(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Mp({className:e,variant:t=`default`,...n}){return(0,X.jsx)(kp,{"data-slot":`tabs-list`,"data-variant":t,className:K(jp({variant:t}),e),...n})}function Np({className:e,...t}){return(0,X.jsx)(lp,{"data-slot":`tabs-trigger`,className:K(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Pp({className:e,...t}){return(0,X.jsx)(Cp,{"data-slot":`tabs-content`,className:K(`flex-1 text-sm outline-none`,e),...t})}function Fp(e,t){return{throttle:+!!e,steer:0,action:t&&!e,boost:!1}}var Ip=class{sim=new S;constructor(e){this.reset(e)}reset(e){this.sim.setMode(`car`),this.sim.setPreset(e),this.sim.barrier=!1,this.sim.body.position={x:0,y:0},this.sim.body.velocity={x:0,y:0},this.sim.body.angle=0,this.sim.body.spin=0}step(e,t,n=!1){let r=Fp(t===`engine`,!1);n&&t===`engine`&&(this.sim.body.velocity.x+=(24-this.sim.body.velocity.x)*(1-Math.exp(-e*5))),this.sim.tick(r,e);let a=i(this.sim.body.velocity);return{controls:r,speedMps:a,active:t!==null||a>.45}}};function Lp({preset:e,point:t=null,onPlace:n,enabledTools:r,masterVolume:a=1}){let o=(0,Y.useRef)(null),s=(0,Y.useRef)(null),[c,l]=(0,Y.useState)(()=>typeof document<`u`&&document.documentElement.classList.contains(`dark`)),[u,d]=(0,Y.useState)(`idle`),[m,h]=(0,Y.useState)(null),[g,_]=(0,Y.useState)(0),v=(0,Y.useRef)(``),b=a>0?a:.65,x=u===`boosting`&&!r.includes(`boost`)||u===`firing`&&!r.includes(`machineGun`)||u===`rocket`&&!r.includes(`rocket`)?`idle`:u,C=(0,Y.useRef)({preset:e,point:t,dark:c,state:u,held:m,masterVolume:a});C.current={preset:e,point:t,dark:c,state:x,held:m,masterVolume:b};let T=()=>{h(null),s.current?.sound?.setHorn(!1)};(0,Y.useEffect)(()=>{let e=o.current;if(!e)return;let t=new S;t.setMode(`car`),t.setPreset(C.current.preset),t.barrier=!1;let n=new f(`preview`,t),r=new V(e,!1,`high`,!0);r.speedZoom=!1,r.deadZone=!1,r.cameraSmoothing=0,r.setTireSmokeEnabled(!1),r.setScreenShakeEnabled(!1);let a=new Ip(C.current.preset);s.current={renderer:r,vehicle:n,sound:null,audioMotion:a};let c=0,l=0,u=0,d=0,m=o=>{if(c=requestAnimationFrame(m),document.hidden||!e.clientWidth||!e.clientHeight){l=o;return}let f=Math.min(1/30,Math.max(0,(o-(l||o))/1e3));l=o;let h=C.current,g=s.current?.sound,v=h.state===`boosting`||h.held===`engine`,b=Fp(v,h.dark);v?h.state===`boosting`&&(t.body.velocity={x:t.body.velocity.x+(24-t.body.velocity.x)*(1-Math.exp(-f*5)),y:0}):t.body.velocity={x:0,y:0},t.tick(b,f,g?.rpm);let x=i(t.body.velocity);o-u>=100&&(_(Math.round(x*2.236936)),u=o),t.body.angle=0,t.body.spin=0;let S=a.step(f,h.held,h.state===`boosting`);g?.setActive(S.active),g?.setMasterVolume(h.masterVolume),g?.setHorn(h.held===`horn`),g?.update(f,S.controls,S.speedMps),g&&r.queueExhaustPops(g.takeExhaustPops()),t.lastInput={...b,machineGun:h.state===`firing`},n.weapons.rocket.previewOpen=h.state===`rocket`,d+=f,h.state===`boosting`&&!h.preset.sound.electric&&d>=.08&&(r.queueExhaustPops([.95]),d=0),r.setSurfaceTone(h.dark?`dark`:`light`);let w=Math.min(e.clientWidth/(28*Math.max(6.8,h.preset.geometry.lengthM+2.4)),e.clientHeight/(28*Math.max(4.8,h.preset.geometry.widthM+2.6)));if(r.setCanvasWorldScale(w,4),r.advanceEffects(n,f,{driven:!1}),r.render(n,o),h.point){let n=e.getContext(`2d`),i=h.preset.geometry,a=p(h.preset),o,s,c=h.point;c===`front`||c===`rear`?(o=c===`front`?i.frontAxleXM??i.wheelbaseM/2:i.rearAxleXM??-i.wheelbaseM/2,s=(c===`front`?i.frontTrackWidthM??i.trackWidthM:i.rearTrackWidthM??i.trackWidthM)/2):c===`headlights`||c===`taillights`?{xM:o,yM:s}=a[c]:c===`door`?(o=y(h.preset).xM,s=i.widthM*.43):{xM:o,yM:s}=h.preset.roofRocket,n.save(),n.setTransform(e.width/e.clientWidth,0,0,e.height/e.clientHeight,0,0);for(let e of c===`roof`?[1]:[-1,1]){let i=r.viewportFromDocument(r.documentPoint(t.body.world({x:o,y:s*e})));n.beginPath(),n.arc(i.x,i.y,7,0,Math.PI*2),n.fillStyle=`#fff`,n.fill(),n.strokeStyle=`#18181b`,n.lineWidth=2,n.stroke(),n.beginPath(),n.arc(i.x,i.y,12,0,Math.PI*2),n.strokeStyle=h.dark?`#fff9`:`#18181b88`,n.lineWidth=1,n.stroke()}n.restore()}};c=requestAnimationFrame(m);let g=()=>{h(null),s.current?.sound?.setHorn(!1)},v=()=>{g(),a.reset(C.current.preset),s.current?.sound?.setActive(!1)};return window.addEventListener(`blur`,v),document.addEventListener(`visibilitychange`,v),window.addEventListener(`pointerup`,g),window.addEventListener(`pointercancel`,g),()=>{cancelAnimationFrame(c),window.removeEventListener(`blur`,v),window.removeEventListener(`pointerup`,g),window.removeEventListener(`pointercancel`,g),document.removeEventListener(`visibilitychange`,v),s.current?.sound?.dispose(),r.dispose(),n.dispose(),s.current=null}},[]),(0,Y.useEffect)(()=>{T();let t=s.current;if(!t)return;t.vehicle.setPreset(e),t.audioMotion.reset(e),t.sound?.setActive(!1);let n=JSON.stringify(e.sound);v.current!==n&&(t.sound?.setPreset(e),v.current=n)},[e]);let E=t=>{let n=s.current;n&&(n.sound||=new w(e,{idleSound:!1,masterVolume:b}),n.sound.setActive(!0),n.sound.start(),n.sound.setHorn(t===`horn`),h(t))},D=e=>({onPointerDown:t=>{t.button===0&&(t.currentTarget.setPointerCapture(t.pointerId),E(e))},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:T,onBlur:T,onKeyDown:t=>{(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),t.repeat||E(e))},onKeyUp:e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),T())},"aria-pressed":m===e});return(0,X.jsxs)(`div`,{className:`grid min-w-0 gap-3`,children:[(0,X.jsx)(Ap,{value:x,onValueChange:e=>{T(),d(e)},children:(0,X.jsxs)(Mp,{className:`w-full`,"aria-label":`Vehicle preview state`,children:[(0,X.jsx)(Np,{value:`idle`,children:`Idle`}),r.includes(`boost`)&&(0,X.jsx)(Np,{value:`boosting`,children:`Boosting`}),r.includes(`machineGun`)&&(0,X.jsx)(Np,{value:`firing`,children:`Firing`}),r.includes(`rocket`)&&(0,X.jsx)(Np,{value:`rocket`,children:`Rocket open`})]})}),(0,X.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-border`,style:{colorScheme:c?`dark`:`light`,backgroundColor:c?`#171b1d`:`#fafbfc`},children:[(0,X.jsx)(`canvas`,{ref:o,className:`block h-[220px] w-full max-sm:h-[190px] ${n&&t?`cursor-crosshair`:``}`,role:`img`,"aria-label":`${e.name} ${u} preview${t?`; place ${t}`:``}`,onClick:r=>{if(!n||!t||!s.current)return;let i=r.currentTarget.getBoundingClientRect(),a=s.current.renderer,o=a.worldFromDocument(a.documentFromViewport({x:(r.clientX-i.left)/i.width*r.currentTarget.clientWidth,y:(r.clientY-i.top)/i.height*r.currentTarget.clientHeight})),c=e.geometry,l=s.current.vehicle.sim.body,u=o.x-l.position.x,d=o.y-l.position.y;Math.abs(u)<=c.lengthM/2&&Math.abs(d)<=c.widthM/2&&n(u,d)}}),(0,X.jsx)(De,{variant:`outline`,size:`icon-sm`,className:`absolute right-3 top-3 bg-background text-foreground`,onClick:()=>l(!c),"aria-label":c?`Use light preview surface`:`Use dark preview surface`,children:c?(0,X.jsx)(Dt,{}):(0,X.jsx)(Ct,{})}),(0,X.jsx)(`span`,{className:`pointer-events-none absolute bottom-3 left-3 text-[10px]`,style:{color:c?`#aaa`:`#737373`},children:c?`Night · lights auto`:`Day · lights auto`}),(x===`boosting`||m===`engine`)&&(0,X.jsxs)(`output`,{"aria-label":`Simulated speed`,className:`pointer-events-none absolute bottom-3 right-3 text-[10px] tabular-nums`,style:{color:c?`#aaa`:`#737373`},children:[g,` mph`]})]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsxs)(De,{variant:`outline`,size:`sm`,className:`touch-none select-none`,...D(`engine`),children:[(0,X.jsx)(yt,{}),` Engine`]}),(0,X.jsxs)(De,{variant:`outline`,size:`sm`,className:`touch-none select-none`,...D(`horn`),children:[(0,X.jsx)(N,{}),` Horn`]}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Press and hold to listen`})]})]})}function Rp(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Df({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=oo(a,!0,!0),u=Or(),[d,f]=Y.useState(),p=d===null?void 0:d??u,m=G(e=>{let t=!a,n=Q(po,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return Y.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var zp=Y.createContext(void 0);function Bp(){let e=Y.useContext(zp);if(e===void 0)throw Error(ge(15));return e}var Vp=`data-open`,Hp=`data-closed`,Up=ii,Wp=`data-panel-open`,Gp={[Vp]:``},Kp={[Hp]:``},qp={open(e){return e?{[Wp]:``}:null}},Jp={open(e){return e?Gp:Kp}},Yp={...Jp,...ci},Xp=Y.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=G(o),d=Rp({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=Y.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=Y.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=q(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:Yp});return(0,X.jsx)(zp.Provider,{value:p,children:m})}),Zp={...qp,...ci},Qp=Y.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Bp(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=Oe({disabled:c,native:u});return q(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:Zp})}),$p={height:void 0,width:void 0};function em(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=Y.useRef(null),f=Y.useRef(null),[p,m]=Y.useState($p),h=Y.useRef($p),g=Y.useRef(!1),_=Y.useRef(s),v=Y.useRef(!1),[y,b]=Y.useState(!1),x=Y.useRef(null),S=be(t,d),C=Qo(s),w=io(d),T=!s&&!a,E=y?`idle`:u,D=s&&(_.current||v.current),O=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,k=n&&T&&f.current!==`css-animation`,A=G((e,t=!0)=>{t&&(h.current=e),m(e)}),j=G(()=>{x.current?.(),x.current=null}),M=G(e=>{j(),x.current=()=>{x.current=null,e()}}),N=G(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});J(()=>{y&&u!==`starting`&&b(!1)},[y,u]),Y.useEffect(()=>()=>{N(),j()},[N,j]),J(()=>{s||(_.current=!1,v.current=!1);let e=d.current;if(!e)return;!s&&x.current&&j();let t=nm(e,D);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=tm(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){A(tm(e)),b(!0);return}if(t===`css-transition`){let t=am(e);if(A(tm(e)),!n)return t;let r=im(e,`transition-duration`,`0s`);return M(r),b(!0),t}A(tm(e));let r=im(e,`animation-name`,`none`);if(!n){r();return}let i=im(e,`animation-duration`,`0s`);r(),M(i),b(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){A($p,!1),c(!1);return}A(tm(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=tm(e);n.height>0||n.width>0?(A(n),t===`css-animation`&&im(e,`animation-name`,`none`)()):c(!1)},[a,s,j,A,c,M,D,u]),ao({enabled:s&&a&&E===`idle`,open:!0,ref:d,onComplete(){s&&A($p,!1)}}),Y.useEffect(()=>{if(s||!a||E!==`ending`)return;if(!d.current){c(!1),A($p,!1);return}let e=new AbortController,t=-1;function n(){C.current||(c(!1),A($p,!1))}return t=Qa.request(()=>{w(n,e.signal)}),()=>{Qa.cancel(t),e.abort()}},[C,a,s,E,w,A,c]),J(()=>{let e=d.current;e&&n&&T&&e.setAttribute(`hidden`,`until-found`)},[T,n]),Y.useEffect(function(){let e=d.current;if(!e)return;let t=Ka.create(),n=-1,r=(r,i)=>{t.start(0,()=>{C.current||(n=Qa.request(()=>{C.current||(r&&(g.current=!1),i&&e.setAttribute(Up,``),e.setAttribute(`hidden`,`until-found`))}))})},i=Xo(e,`beforematch`,t=>{let n=Q(fo,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}g.current=!0;let i=e.hasAttribute(Up);e.removeAttribute(Up),l(!0),r(!0,i)});return()=>{t.clear(),Qa.cancel(n),i()}},[C,o,l]);let P=i||n||a||s;return{height:O.height,props:{...k?{[Up]:``}:void 0,hidden:T,id:r},ref:S,shouldPreventOpenAnimation:D,shouldRender:P,transitionStatus:E,width:O.width}}function tm(e){return{height:e.scrollHeight,width:e.scrollWidth}}function nm(e,t){let n=Ce(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&rm(n.animationDuration),i=rm(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function rm(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function im(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function am(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=Qa.request(n);return()=>{Qa.cancel(r),n()}}var om=`--collapsible-panel-height`,sm=`--collapsible-panel-width`,cm=Y.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=Bp(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;J(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=em({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=Ae(s,k),j=q(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[om]:S===void 0?`auto`:`${S}px`,[sm]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Yp});return E?j:null});function lm({...e}){return(0,X.jsx)(Xp,{"data-slot":`collapsible`,...e})}function um({...e}){return(0,X.jsx)(Qp,{"data-slot":`collapsible-trigger`,...e})}function dm({...e}){return(0,X.jsx)(cm,{"data-slot":`collapsible-content`,...e})}var fm=Y.createContext(void 0);function pm(){let e=Y.useContext(fm);if(e===void 0)throw Error(ge(10));return e}var mm={value:()=>null},hm=Y.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,hiddenUntilFound:a,keepMounted:o,loopFocus:s,onValueChange:c,multiple:l=!1,orientation:u=`vertical`,value:d,defaultValue:f,style:p,...m}=e,h=f??ve,g=Y.useRef([]),[_,v]=Df({controlled:d,default:h,name:`Accordion`,state:`value`}),y=G((e,t,n)=>{let r;r=l?t?[..._,e]:_.filter(t=>t!==e):_[0]===e?[]:[e],c?.(r,n),!n.isCanceled&&v(r)}),b=Y.useMemo(()=>({value:_,disabled:i,orientation:u}),[_,i,u]),x=Y.useMemo(()=>({disabled:i,handleValueChange:y,hiddenUntilFound:a??!1,keepMounted:o??!1,state:b,value:_}),[i,y,a,o,b,_]),S=q(`div`,e,{state:b,ref:t,props:m,stateAttributesMapping:mm});return(0,X.jsx)(fm.Provider,{value:x,children:(0,X.jsx)(Wf,{elementsRef:g,children:S})})}),gm=Y.createContext(void 0);function _m(){let e=Y.useContext(gm);if(e===void 0)throw Error(ge(9));return e}var vm=`data-index`,ym={...Jp,index:e=>({[vm]:String(e)}),...ci,value:()=>null},bm=Y.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:i,render:a,value:o,style:s,...c}=e,{ref:l,index:u}=ap(),{disabled:d,handleValueChange:f,state:p,value:m}=pm(),h=Or(),g=o??h,_=r||d,v=m.includes(g),y=G((e,t)=>{i?.(e,t),!t.isCanceled&&f(g,e,t)}),b=Rp({open:v,onOpenChange:y,disabled:_}),x=Y.useMemo(()=>({...b,onOpenChange:y,state:{open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}}),[b,y]),S=Y.useMemo(()=>({...p,hidden:!v&&!b.mounted,index:u,disabled:_,open:v}),[b.mounted,_,u,v,p]),C=Or(),[w,T]=Y.useState(),E=w===null?void 0:w??C,D=Y.useMemo(()=>({defaultTriggerId:C,open:v,state:S,setTriggerId:T,triggerId:E}),[C,v,S,T,E]),O=q(`div`,e,{state:S,ref:[t,l],props:c,stateAttributesMapping:ym});return(0,X.jsx)(zp.Provider,{value:x,children:(0,X.jsx)(gm.Provider,{value:D,children:O})})}),xm=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=_m();return q(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:ym})}),Sm={...ym,...qp},Cm=Y.forwardRef(function(e,t){let{disabled:n,className:r,id:i,render:a,nativeButton:o=!0,style:s,...c}=e,{panelId:l,open:u,handleTrigger:d,disabled:f}=Bp(),{getButtonProps:p,buttonRef:m}=Oe({disabled:n||f,native:o}),{defaultTriggerId:h,state:g,setTriggerId:_}=_m(),v=i||void 0,y=v??h;return J(()=>(_(e=>v??(e===null?void 0:e)),()=>{_(e=>e===v?null:e)}),[v,_]),q(`button`,e,{state:g,ref:[t,m],props:[{"aria-controls":u?l:void 0,"aria-expanded":u,id:y,onClick:d},c,p],stateAttributesMapping:Sm})}),wm=`--accordion-panel-height`,Tm=`--accordion-panel-width`,Em=Y.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,id:a,render:o,style:s,...c}=e,{hiddenUntilFound:l,keepMounted:u}=pm(),{defaultPanelId:d,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:g,setPanelIdState:_,transitionStatus:v}=Bp(),y=r??l,b=i??u,x=a||void 0,S=a??d;J(()=>(_(e=>x??(e===null?void 0:e)),()=>{_(e=>e===x?null:e)}),[x,_]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:O,width:k}=em({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:g,transitionStatus:v}),{state:A,triggerId:j}=_m(),M={...A,transitionStatus:O},N=Ae(s,M),P=q(`div`,{...e,style:void 0},{state:M,ref:T,props:[w,{"aria-labelledby":j,role:`region`,style:{[wm]:C===void 0?`auto`:`${C}px`,[Tm]:k===void 0?`auto`:`${k}px`}},c,N?{style:N}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:ym});return D?P:null});function Dm({className:e,...t}){return(0,X.jsx)(hm,{"data-slot":`accordion`,className:K(`flex w-full flex-col`,e),...t})}function Om({className:e,...t}){return(0,X.jsx)(bm,{"data-slot":`accordion-item`,className:K(`not-last:border-b`,e),...t})}function km({className:e,children:t,...n}){return(0,X.jsx)(xm,{className:`flex`,children:(0,X.jsxs)(Cm,{"data-slot":`accordion-trigger`,className:K(`group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground`,e),...n,children:[t,(0,X.jsx)(ut,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden`}),(0,X.jsx)(pt,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline`})]})})}function Am({className:e,children:t,...n}){return(0,X.jsx)(Em,{"data-slot":`accordion-content`,className:`overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up`,...n,children:(0,X.jsx)(`div`,{className:K(`h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),children:t})})}var $=(e,t,n,r,i=.01)=>({path:e,label:t,min:n,max:r,step:i}),jm={handling:[$(`corneringAccelerationMps2`,`Cornering · m/s²`,1,100),$(`lateralResistance`,`Lateral resistance`,1,1e4,1),$(`maxSteerAngleRad`,`Max steer · rad`,.05,1.4),$(`handbrakeStrength`,`Handbrake strength`,0,2),$(`handbrakeDecelerationMps2`,`Handbrake decel · m/s²`,0,30),$(`serviceBrakeDecelerationMps2`,`Service brake · m/s²`,0,30),$(`drift.entrySpeedMps`,`Drift entry · m/s`,.2,30),$(`drift.slipAngleRad`,`Drift slip · rad`,.05,1.2)],power:[$(`engineForceN`,`Engine force · N`,100,1e5,10),$(`reversePowerRatio`,`Reverse power ratio`,.05,2),$(`maxReverseSpeedMps`,`Reverse limit · m/s`,1,30),$(`rollingResistance`,`Rolling resistance`,.1,1e4),$(`coastDecelerationMps2`,`Coast decel · m/s²`,0,30),$(`launch.minRpm`,`Launch RPM`,0,12e3,10),$(`launch.boostMps`,`Launch gain · m/s`,0,20),$(`launch.boostedBoostMps`,`Boosted launch · m/s`,0,30),$(`launch.assistDurationSeconds`,`Launch assist · s`,.05,10),$(`launch.burnoutRampSeconds`,`Burnout ramp · s`,.1,10),$(`launch.chargedSpinSeconds`,`Charged tire spin · s`,0,20),$(`launch.fireLifetimeSeconds`,`Fire lifetime · s`,0,30)],weapons:[$(`driveBoost.gainMps`,`Boost gain · m/s`,0,30),$(`driveBoost.durationSeconds`,`Boost capacity · s`,.05,10),$(`driveBoost.cooldownSeconds`,`Boost refill · s`,0,30),$(`roofRocket.xM`,`Roof hatch X · m`,-5,5),$(`roofRocket.yM`,`Roof hatch Y · m`,-2,2),$(`roofRocket.sizeM`,`Roof hatch size · m`,.1,2),$(`machineGuns.xM`,`Door / guns X · m`,-5,5),$(`machineGuns.revealM`,`Panel reveal · m`,.12,.5),$(`machineGuns.roundsPerSecond`,`Bullets per second`,2,20),$(`machineGuns.bulletSpeedMps`,`Bullet speed · m/s`,20,150),$(`machineGuns.bulletLifetimeSeconds`,`Bullet lifetime · s`,.25,3),$(`flamethrower.rangeM`,`Flame range · m`,1,12),$(`flamethrower.ignitionSeconds`,`Ignition · s`,.1,10),$(`flamethrower.spreadSeconds`,`Fire spread · s`,.5,30),$(`flamethrower.spreadRadiusPx`,`Fire spread gap · px`,0,96),$(`flamethrower.burnSeconds`,`Burn duration · s`,.5,30),$(`flamethrower.smokePerSecond`,`Smoke output`,0,50),$(`flamethrower.jetWidthM`,`Flame width · m`,.2,.9),$(`flamethrower.flowRate`,`Flame flow`,.2,2),$(`rockets.roundsPerSecond`,`Rockets per second`,.25,5),$(`rockets.launchSpeedMps`,`Rocket launch · m/s`,5,60),$(`rockets.accelerationMps2`,`Rocket acceleration`,0,100),$(`rockets.maxSpeedMps`,`Rocket max speed · m/s`,10,100),$(`rockets.lifetimeSeconds`,`Rocket lifetime · s`,.5,8),$(`rockets.smokePerSecond`,`Rocket smoke output`,0,60)],sound:[$(`sound.horn.lowHz`,`Horn low · Hz`,80,1200,1),$(`sound.horn.highHz`,`Horn high · Hz`,80,1600,1),$(`sound.horn.level`,`Horn level`,0,2)]},Mm=[$(`sound.electric.fadeStartMps`,`Warning fade start · m/s`,0,100),$(`sound.electric.fadeEndMps`,`Warning fade end · m/s`,0,100),$(`sound.electric.motorFadeStartMps`,`Motor fade start · m/s`,0,200),$(`sound.electric.motorFadeEndMps`,`Motor fade end · m/s`,0,200)];function Nm(e,t){return t.startsWith(`lights.`)&&(e={...e,lights:p(e)}),t.split(`.`).reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,e)}function Pm(e,t,n){let r=structuredClone(e);t.startsWith(`lights.`)&&(r.lights=p(e));let i=t.split(`.`),a=r;for(let e of i.slice(0,-1))a[e]&&typeof a[e]==`object`||(a[e]={}),a=a[e];return a[i.at(-1)]=n,r}var Fm=(e,t,n)=>Math.max(t,Math.min(n,e));async function Im(e,t){if(![`image/png`,`image/jpeg`,`image/webp`].includes(e.type)||e.size>15e6)throw Error(`Choose a PNG, JPEG, or WebP image under 15 MB.`);let n=URL.createObjectURL(e);try{let e=new Image;e.src=n,await e.decode();let r=document.createElement(`canvas`);r.width=1200,r.height=600;let i=r.getContext(`2d`);if(!i)throw Error(`Could not process this image.`);let a=Math.min(r.width/e.naturalWidth,r.height/e.naturalHeight),o=e.naturalWidth*a,s=e.naturalHeight*a;i.drawImage(e,(r.width-o)/2,(r.height-s)/2,o,s);let c=r.toDataURL(`image/webp`,.86);if(c.length>25e5)throw Error(`This image is too large for browser storage.`);return E(t,c,r.width,r.height,i.getImageData(0,0,r.width,r.height).data)}finally{URL.revokeObjectURL(n)}}async function Lm(e){if(!e.image||e.image.src.startsWith(`data:`))return e;let t=await fetch(e.image.src);if(!t.ok)throw Error(`Could not include the vehicle image in the JSON file.`);let n=await t.blob();if(n.size>2e6)throw Error(`This vehicle image is too large for browser storage.`);return Pm(e,`image.src`,await new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(String(r.result)),r.onerror=()=>t(Error(`Could not include the vehicle image.`)),r.readAsDataURL(n)}))}function Rm({preset:e,createNew:t=!1,garage:n,onSave:i,onDelete:a,onClose:o,enabledTools:s=r.map(e=>e.id)}){let c=s.includes(`machineGun`),l=s.includes(`flamethrower`),u=s.includes(`rocket`),[f,g]=(0,Y.useState)(()=>t?_(e):structuredClone(e)),[y,b]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{(y===`roof`&&!u||y===`door`&&!c&&!l)&&b(null)},[y,u,c,l]);let[C,w]=(0,Y.useState)(``),T=(0,Y.useRef)(null),E=(0,Y.useRef)(null),D=(e,t)=>g(n=>Pm(n,e,t)),k=(e,t)=>g(n=>{if(!y)return n;let r=structuredClone(n),i=r.geometry,a=i.lengthM/2;if(y===`front`||y===`rear`){let n=y===`front`,r=n?i.rearAxleXM??-i.wheelbaseM/2:i.frontAxleXM??i.wheelbaseM/2,o=n?Fm(e,r+.5,a-.1):Fm(e,-a+.1,r-.5),s=Fm(Math.abs(t)*2,.3,i.widthM);n?(i.frontAxleXM=o,i.frontTrackWidthM=s):(i.rearAxleXM=o,i.rearTrackWidthM=s),i.wheelbaseM=(i.frontAxleXM??i.wheelbaseM/2)-(i.rearAxleXM??-i.wheelbaseM/2)}else y===`headlights`||y===`taillights`?r.lights={...p(r),[y]:{xM:Fm(e,-a,a),yM:Fm(Math.abs(t),0,i.widthM/2)}}:y===`door`?r.machineGuns={...r.machineGuns,xM:Fm(e,-a+.5,a-.5)}:r.roofRocket={...r.roofRocket,xM:Fm(e,-a+.1,a-.1),yM:Fm(t,-i.widthM/2+.1,i.widthM/2-.1)};return r}),A=async e=>{if(e){try{let t=await Im(e,f);g(t),w(``)}catch(e){w(e instanceof Error?e.message:`Image upload failed.`)}T.current&&(T.current.value=``)}},j=async e=>{if(e){try{g(h(JSON.parse(await e.text()))),w(``)}catch(e){w(e instanceof Error?e.message:`Invalid vehicle file.`)}E.current&&(E.current.value=``)}},M=async()=>{try{let e=await Lm(h(f)),t=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:`application/json`})),n=document.createElement(`a`);n.href=t,n.download=`${f.name.toLowerCase().replace(/[^a-z0-9]+/g,`-`)||`vehicle`}.json`,n.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3),w(``)}catch(e){w(e instanceof Error?e.message:`Export failed.`)}},N=async()=>{try{await i(await Lm(h(f))),w(``)}catch(e){w(e instanceof Error?e.message:`Could not save vehicle.`)}},P=e=>(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[...jm[e],...e===`sound`&&f.sound.electric?Mm:[]].filter(({path:e})=>e.startsWith(`roofRocket.`)||e.startsWith(`rockets.`)?u:e.startsWith(`machineGuns.`)?c||l&&[`machineGuns.xM`,`machineGuns.revealM`].includes(e):e.startsWith(`flamethrower.`)?l:!e.startsWith(`driveBoost.`)||s.includes(`boost`)).map(({path:e,label:t,min:n,max:r,step:i})=>(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground`,children:[e===`machineGuns.xM`&&!c?`Side tool X · m`:t,(0,X.jsx)(Po,{type:`number`,min:n,max:r,step:i,value:typeof Nm(f,e)==`number`?Nm(f,e):e===`health`?100:e===`serviceBrakeDecelerationMps2`?m(f):``,onChange:t=>{t.target.value!==``&&D(e,Fm(Number(t.target.value),n,r))}})]},e))}),F={front:`Front wheels`,rear:`Rear wheels`,door:`Side panels`,roof:`Rocket hatch`,headlights:`Headlights`,taillights:`Taillights`};return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col text-sm`,children:[(0,X.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:(0,X.jsxs)(`div`,{className:`grid items-start gap-4 p-4 md:grid-cols-[minmax(0,1.35fr)_minmax(230px,.8fr)]`,children:[(0,X.jsxs)(`section`,{className:`grid min-w-0 gap-4`,children:[(0,X.jsx)(Lp,{preset:f,point:x??y,onPlace:y?k:void 0,enabledTools:s}),(0,X.jsx)(Dm,{onValueChange:e=>{e.includes(`points`)||(b(null),S(null))},children:(0,X.jsxs)(Om,{value:`points`,children:[(0,X.jsx)(km,{children:`Place vehicle points`}),(0,X.jsxs)(Am,{className:`grid gap-3`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Select a part, then click its position on the car. Paired points mirror automatically.`}),(0,X.jsx)(`div`,{className:`flex flex-wrap gap-2`,onMouseLeave:()=>S(null),children:[`front`,`rear`,`headlights`,`taillights`,`door`,`roof`].filter(e=>(e!==`roof`||u)&&(e!==`door`||c||l)).map(e=>(0,X.jsx)(De,{variant:y===e?`secondary`:`outline`,size:`sm`,"aria-pressed":y===e,onMouseEnter:()=>S(e),onFocus:()=>S(e),onBlur:()=>S(null),onClick:()=>b(y===e?null:e),children:F[e]},e))}),y&&(0,X.jsxs)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:[`Click to place `,F[y].toLowerCase(),`.`,` `,(0,X.jsx)(De,{variant:`link`,size:`sm`,onClick:()=>{b(null),S(null)},children:`Done`})]}),(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs text-muted-foreground`,children:[`Exhaust placement`,(0,X.jsxs)(Bf,{value:f.exhaust.layout,onChange:e=>D(`exhaust.layout`,e.target.value),children:[(0,X.jsx)(Vf,{value:`left`,children:`Left`}),(0,X.jsx)(Vf,{value:`right`,children:`Right`}),(0,X.jsx)(Vf,{value:`center`,children:`Center`}),(0,X.jsx)(Vf,{value:`left-right`,children:`Left and right`})]})]})]})]})}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsxs)(De,{size:`sm`,variant:`outline`,onClick:()=>T.current?.click(),children:[(0,X.jsx)(Ot,{}),` Replace image`]}),(0,X.jsx)(De,{size:`sm`,variant:`ghost`,onClick:()=>E.current?.click(),children:`Import JSON`}),(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>void M(),children:[(0,X.jsx)(O,{}),` Export JSON`]}),(0,X.jsx)(`input`,{ref:T,type:`file`,accept:`image/png,image/jpeg,image/webp`,hidden:!0,onChange:e=>void A(e.target.files?.[0])}),(0,X.jsx)(`input`,{ref:E,type:`file`,accept:`.json,application/json`,hidden:!0,onChange:e=>void j(e.target.files?.[0])})]}),(0,X.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Top-down image, nose facing right. Body size comes from the cutout.`})]}),(0,X.jsxs)(`section`,{className:`grid min-w-0 gap-5`,children:[(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:[`name`,`make`,`model`,`year`].map(e=>(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground ${e===`name`?`col-span-2`:``}`,children:[e===`name`?`Display name`:e[0].toUpperCase()+e.slice(1),(0,X.jsx)(Po,{value:f[e]??``,onChange:t=>D(e,t.target.value)})]},e))}),(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground`,children:[`Engine sound`,(0,X.jsx)(Bf,{value:f.sound.engineId,onChange:e=>{let t=n.find(t=>t.sound.engineId===e.target.value);t&&D(`sound`,{...structuredClone(t.sound),horn:f.sound.horn})},children:Array.from(new Map([...n,f].map(e=>[e.sound.engineId,e])).values()).map(e=>(0,X.jsx)(Vf,{value:e.sound.engineId,children:e.sound.engineLabel},e.sound.engineId))})]}),(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground`,children:[`Horn`,(0,X.jsxs)(Bf,{value:f.sound.horn.tone,onChange:e=>D(`sound.horn.tone`,e.target.value),children:[(0,X.jsx)(Vf,{value:`disc`,children:`Disc`}),(0,X.jsx)(Vf,{value:`trumpet`,children:`Trumpet`}),(0,X.jsx)(Vf,{value:`electronic`,children:`Electronic`})]})]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,X.jsx)(zf,{checked:!!f.sound.turbo,onCheckedChange:e=>D(`sound.turbo`,e)}),` `,`Turbo`]}),(0,X.jsxs)(lm,{className:`grid gap-3`,children:[(0,X.jsxs)(um,{render:(0,X.jsx)(De,{variant:`ghost`,className:`justify-between px-0`}),children:[`Advanced tuning `,(0,X.jsx)(`span`,{"aria-hidden":`true`,children:`⌄`})]}),(0,X.jsx)(dm,{children:(0,X.jsxs)(Ap,{defaultValue:`handling`,children:[(0,X.jsxs)(Mp,{className:`w-full`,children:[(0,X.jsx)(Np,{value:`handling`,children:`Handling`}),(0,X.jsx)(Np,{value:`power`,children:`Power`}),(0,X.jsx)(Np,{value:`weapons`,children:`Tools`}),(0,X.jsx)(Np,{value:`sound`,children:`Sound`})]}),Object.keys(jm).map(e=>(0,X.jsx)(Pp,{value:e,children:P(e)},e))]})})]})]})]})}),(0,X.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-t border-border p-4`,children:[(0,X.jsx)(`span`,{role:`status`,className:`min-w-0 flex-1 text-xs text-destructive`,children:C}),!t&&(d(e.id)||v(e.id))&&(0,X.jsx)(De,{variant:`ghost`,size:`sm`,onClick:()=>a(e.id),children:d(e.id)?`Delete vehicle`:`Restore original`}),(0,X.jsx)(De,{variant:`outline`,size:`sm`,onClick:o,children:`Cancel`}),(0,X.jsx)(De,{size:`sm`,onClick:()=>void N(),children:`Save vehicle`})]})]})}var zm=_e(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function Bm({className:e,variant:t=`default`,render:n,...r}){return ur({defaultTagName:`span`,props:Ne({className:K(zm({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}function Vm(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var Hm=Y.createContext(void 0),Um=Y.createContext(void 0);function Wm(){let e=Y.useContext(Hm);if(e===void 0)throw Error(ge(60));return e}function Gm(){let e=Y.useContext(Um);if(e===void 0)throw Error(ge(61));return e}function Km(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var qm=(e,t)=>Object.is(e,t);function Jm(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Ym(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Km(e,t,(e,t)=>Jm(e,t,n)):e!==t}function Xm(e,t,n){return e?e.some(e=>e!==void 0&&Jm(t,e,n)):!1}function Zm(e,t,n){return e?e.findIndex(e=>e!==void 0&&Jm(e,t,n)):-1}function Qm(e,t){if(t!==qm)return n=>Xm(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function $m(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(Qm(t,n)):Zm(e,t,n);return i===-1?null:i}function eh(e,t,n,r,i,a){return Xm(r,t,i)?a!=null&&e>a&&Xm(r,n[a],i)?a:e:e===a?$m(n,r,i,!0):a}function th(e,t,n){return e.filter(e=>!Jm(t,e,n))}function nh(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function rh(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function ih(e){return rh(e?.[0])}function ah(e){return ih(e)?e.flatMap(e=>e.items):e}function oh(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(ih(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function sh(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return nh(e)}function ch(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?nh(e.value):nh(e)}function lh(e,t,n){function r(){return sh(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=ah(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function uh(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,X.jsx)(Y.Fragment,{children:lh(r,t,n)},i)),e),[])}var dh={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ch(t,r)!==``},hasNullItemLabel:(e,t)=>t?oh(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>Jm(t,e,n)):Jm(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function fh(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function ph(e,t){return Math.max(0,e-t)}function mh(e,t){if(t<=0)return 0;let n=fh(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function hh(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=qm,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=Sr(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=br(),F=Pr({id:t}),I=M||d,L=j??c,[R,z]=Df({controlled:n,default:y?r??ve:r,name:`Select`,state:`value`}),[B,V]=Df({controlled:a,default:o,name:`Select`,state:`open`}),H=Y.useRef([]),ee=Y.useRef([]),te=Y.useRef(null),U=Y.useRef(null),ne=Y.useRef(0),re=Y.useRef(null),ie=Y.useRef([]),ae=Y.useRef(!1),oe=Y.useRef(null),se=Y.useRef(null),ce=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),le=Y.useRef(!1),ue=Y.useRef(R),{openMethod:de,triggerProps:fe}=sd(B),W=Fe(()=>new Ac({id:F,labelId:void 0,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:B,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Te,triggerProps:Te,itemRoot:{props:Te,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Me,setOpen:Me,handleScrollArrowVisibility:Me,onOpenChangeComplete:Me,listRef:H,popupRef:te,scrollHandlerRef:U,scrollArrowsMountedCountRef:ne,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,firstItemTextRef:oe,selectedItemTextRef:se,alignItemWithTriggerActiveRef:le,initialValueRef:ue},dh)).current,[pe,me]=Y.useState(!1),{mounted:he,transitionStatus:ge,forceUnmount:_e}=Ys({open:B,ref:te,preventUnmountOnClose:pe,setPreventUnmountOnClose:me,onUnmount(){W.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),ye=W.useState(`activeIndex`),xe=W.useState(`selectedIndex`),Se=W.useState(`triggerElement`),K=W.useState(`positionerElement`),Ce=af(de),we=de??Ce,Ee=Y.useMemo(()=>y?``:ch(R,x),[y,R,x]),De=Y.useMemo(()=>y&&Array.isArray(R)?R.map(e=>ch(e,x)):ch(R,x),[y,R,x]);co(Qo(Se),F,R,G(()=>De),!I,c);let q=y?Array.isArray(R)&&R.length>0:R!=null&&Ee!==``;J(()=>{A(q)},[q,A]),J(function(){let e=$m(ie.current,R,S,y);e===null&&(se.current=null),!B&&W.set(`selectedIndex`,e)},[y,B,R,S,W]),lo(R,()=>{T(L),E(Ym(R,k.initialValue,S)),N.change(R)});let Oe=G((e,t)=>{let n=t,r=rc(n);s?.(e,n),!t.isCanceled&&(e||me(r()),V(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(D(!0),O(!1),P===`onBlur`&&N.commit(R)))});Y.useImperativeHandle(h,()=>({unmount:_e,close:()=>{W.state.open&&Oe(!1,Q(Ao))}}),[_e,Oe,W]);let ke=G((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),Ae=G(e=>{let t=ph(e.scrollHeight,e.clientHeight),n=mh(e.scrollTop,t),r=n>0,i=n<t;W.set(`scrollUpArrowVisible`,r),W.set(`scrollDownArrowVisible`,i)}),je=Vc({open:B,onOpenChange:Oe,elements:{reference:Se,floating:K}}),Pe=Vs(je,{enabled:!I,event:`mousedown`}),Ie=qs(je),Le=il(je,{enabled:!I,listRef:H,activeIndex:ye,selectedIndex:xe,disabledIndices:ve,onNavigate(e){(e!==null||B)&&W.set(`activeIndex`,e)},focusItemOnHover:C}),Re=al(je,{enabled:!I&&(B||!f&&!y),listRef:ee,activeIndex:ye,selectedIndex:xe,disabledIndices:e=>wp(H.current[e]),onMatch(e){B?W.set(`activeIndex`,e):ke(ie.current[e],Q(fo))},onTyping(e){ae.current=e}}),ze=Y.useMemo(()=>Ne(Re.reference,Le.reference,Ie.reference,Pe.reference,fe),[Pe.reference,Re.reference,Le.reference,Ie.reference,fe]),Be=Y.useMemo(()=>Ne(Xs,Re.floating,Le.floating,Ie.floating),[Re.floating,Le.floating,Ie.floating]),Ve=Le.item??Te,He=Y.useMemo(()=>({props:Ve,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S}),[Ve,y,I,f,S]);W.useContextCallback(`setValue`,ke),W.useContextCallback(`setOpen`,Oe),W.useContextCallback(`handleScrollArrowVisibility`,Ae),W.useContextCallback(`onOpenChangeComplete`,_),Vm(()=>{W.update({popupProps:Be,triggerProps:ze,itemRoot:He})}),W.useSyncedValues({id:F,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,value:R,open:B,mounted:he,transitionStatus:ge,popupProps:Be,triggerProps:ze,itemRoot:He,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:we});let Ue=be(g,N.inputRef),We=y?void 0:L,Ge=Y.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=ch(e,x);return(0,X.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,X.jsxs)(Hm.Provider,{value:W,children:[(0,X.jsx)(Um.Provider,{value:je,children:w}),(0,X.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){W.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=Q(fo,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=ie.current.findIndex(t=>ch(t,x).toLowerCase()===e||sh(t,b).toLowerCase()===e);r===-1&&(r=ie.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=ie.current[r];i!=null&&ke(i,n)}W.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&We==null?`${F}-hidden-input`:void 0,form:l,name:We,autoComplete:u,value:Ee,disabled:I,required:p&&!(y&&q),readOnly:f,ref:Ue,style:L?ns:ts,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ge]})}function gh(e){return e==null?void 0:`${e}-label`}function _h(e,t){return e??t}var vh=5;function yh(e,t){let n=bh(t);return e.clientX>=n.left-vh&&e.clientX<=n.right+vh&&e.clientY>=n.top-vh&&e.clientY<=n.bottom+vh}function bh(e){let t=e.getBoundingClientRect(),n=Ce(e);if(Jr)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var xh=`data-popup-side`,Sh=400,Ch={...bi,..._r,popupSide:e=>e?{[xh]:e}:null,value:()=>null},wh=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=br(),{labelId:m}=Ar(),h=Wm(),g=h.useState(`readOnly`),_=h.useState(`required`),v=h.useState(`disabled`),y=p||v||a,b=h.useState(`open`),x=h.useState(`mounted`),S=h.useState(`value`),C=h.useState(`triggerProps`),w=h.useState(`positionerElement`),T=h.useState(`listElement`),E=h.useState(`popupSide`),D=h.useState(`id`),O=h.useState(`labelId`),k=h.useState(`hasSelectedValue`),A=x&&w?E:null,j=i??D,M=_h(m,O);Pr({id:i});let N=Qo(w),P=Y.useRef(null),F=so(y,P),{getButtonProps:I,buttonRef:L}=Oe({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=qa(),B=qa(),V=qa();Y.useEffect(()=>{if(b)return V.start(Sh,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{V.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[b,h,B,V]);let H=Ne(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??ji(w)?.id:void 0,"aria-labelledby":M,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){F(!0),b&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,Q(fo,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Z(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=Re(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Z(P.current,t)||Z(N.current,t)||yh(e,P.current)||h.context.setOpen(!1,Q(Eo,e))}B.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,I),ee=d.getValidationProps(y,H);ee.role=`combobox`;let te={...f,open:b,disabled:y,value:S,readOnly:g,popupSide:A,placeholder:!k};return q(`button`,e,{ref:[t,P,L,R],state:te,stateAttributesMapping:Ch,props:ee})}),Th={value:()=>null},Eh=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Wm(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?uh(l,u,d):lh(l,u,d)),q(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:Th})}),Dh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o={open:Wm().useState(`open`)};return q(`span`,e,{state:o,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:yi})}),Oh=Y.forwardRef(function(e,t){let n=Wm(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,X.jsx)(Es,{ref:t,...e}):null}),kh=Y.createContext(void 0);function Ah(){let e=Y.useContext(kh);if(!e)throw Error(ge(59));return e}function jh(e,t){e&&Object.assign(e.style,t)}var Mh={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Nh=20;function Ph(e,t,n,r){let[i,a]=Y.useState(!1);J(()=>{if(!e||!t||n==null){a(!1);return}let r=Re(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Nh)},[e,t,n]),Xu(e&&(!t||i),r)}var Fh={position:`fixed`},Ih=Y.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=ys,style:_,...v}=e,y=Wm(),b=Gm(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`modal`),w=y.useState(`value`),T=y.useState(`openMethod`),E=y.useState(`positionerElement`),D=y.useState(`triggerElement`),O=y.useState(`isItemEqualToValue`),k=y.useState(`transitionStatus`),A=Y.useRef(null),j=Y.useRef(null),[M,N]=Y.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),Y.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),Ph((P||C)&&x,T===`touch`,E,D);let F=Xd({anchor:n,floatingRootContext:b,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??P,collisionAvoidance:g,keepMounted:!0}),I=P?`none`:F.side,L=P?Fh:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};J(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=ef(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=Y.useRef(0),V=G(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=Q(fo);if(t!==0&&!y.state.multiple&&w!==null&&Zm(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&Zm(y.context.valuesRef.current,e,O)!==-1?e:null;y.context.setValue(t,n),t===null&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(w)){let e=w.filter(e=>Zm(y.context.valuesRef.current,e,O)!==-1);e.length!==w.length&&(y.context.setValue(e,n),e.length===0&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null))}if(x&&P){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};jh(E,e),jh(y.context.popupRef.current,e)}}),H=Y.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,X.jsx)(Wf,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:V,children:(0,X.jsxs)(kh.Provider,{value:H,children:[S&&C&&(0,X.jsx)(Ru,{inert:Lu(!x),cutout:D}),z]})})}),Lh=`base-ui-disable-scrollbar`,Rh={className:Lh,getElement(e){return(0,X.jsx)(`style`,{nonce:e,href:Lh,precedence:`base-ui:low`,children:`.${Lh}{scrollbar-width:none}.${Lh}::-webkit-scrollbar{display:none}`})}},zh=Y.createContext(void 0);function Bh(e){let t=Y.useContext(zh);if(t===void 0&&!e)throw Error(ge(69));return t}var Vh=`--transform-origin`,Hh={...xi,...ci},Uh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=Wm(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=Gm(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=Ah(),_=Bh(!0)!=null,v=Id(),{nonce:y,disableStyleElements:b}=yp(),x=s.useState(`id`),S=s.useState(`open`),C=s.useState(`openMethod`),w=s.useState(`mounted`),T=s.useState(`popupProps`),E=s.useState(`transitionStatus`),D=s.useState(`triggerElement`),O=s.useState(`positionerElement`),k=s.useState(`listElement`),A=Y.useRef(!1),j=Y.useRef(!1),M=Y.useRef({}),N=$a(),P=G(e=>{if(!O||!s.context.popupRef.current||!j.current)return;let t=O.style.top===`0px`,n=O.style.bottom===`0px`;if(A.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=Kh(O),i=qh(O.getBoundingClientRect().height,`y`,r),a=Re(O),o=Ce(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=Wh(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=Gh(e),g=null,_=e=>{O.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=fh(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(A.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=fh(g,0,Gh(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(A.current=!0),s.context.handleScrollArrowVisibility(e)});Y.useImperativeHandle(s.context.scrollHandlerRef,()=>P,[P]),ao({open:S,ref:s.context.popupRef,onComplete(){S&&s.context.onOpenChangeComplete(!0)}});let F={open:S,transitionStatus:E,side:f,align:p};J(()=>{O&&s.context.popupRef.current&&!Object.keys(M.current).length&&(M.current={top:O.style.top||`0`,left:O.style.left||`0`,right:O.style.right,height:O.style.height,bottom:O.style.bottom,minHeight:O.style.minHeight,maxHeight:O.style.maxHeight,marginTop:O.style.marginTop,marginBottom:O.style.marginBottom})},[s,O]),J(()=>{S||m||(j.current=!1,A.current=!1,jh(O,M.current))},[S,m,O]),J(()=>{let e=s.context.popupRef.current;if(!S||!D||!O||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(j.current=!0,e.style.removeProperty(Vh),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=Xh(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=Ce(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=Re(D),c=Kh(D),l=Jh(D.getBoundingClientRect(),c),d=Jh(O.getBoundingClientRect(),c),f=l.height,p=k||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=Wh(a),S=o.documentElement.clientHeight-_-y,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=v===`rtl`?l.right-d.width:l.left,j=0;if(t&&n){let e=Jh(n.getBoundingClientRect(),c);T=Jh(t.getBoundingClientRect(),c),E=d.left+(v===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;j=T.top-d.top+T.height/2-r}let N=w+j+y+h,P=Math.min(S,N),F=S-_-y,I=N-P,L=C-5;O.style.left=`${fh(E,5,L-d.width)}px`,O.style.height=`${P}px`,O.style.maxHeight=`none`,O.style.marginTop=`${_}px`,O.style.marginBottom=`${y}px`,e.style.height=`100%`;let R=Gh(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&Kr;if(B||V){jh(O,M.current),g(!1);return}let H=Math.max(b,P);if(z){let e=Math.max(0,S-N);O.style.top=d.height>=F?`0`:`${e}px`,O.style.height=`${P}px`,p.scrollTop=Gh(p)}else O.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=fh(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(Vh,`50% ${i}%`)}(H===S||P>=x)&&(A.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,S,O,D,m,g,N,k,u,v,h]),Y.useEffect(()=>{if(!m||!O||!S)return;let e=Ce(O);function t(e){s.context.setOpen(!1,Q(jo,e))}return Xo(e,`resize`,t)},[s,m,O,S]);let I={...k?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${x}-list`},onKeyDown(e){_&&Eu.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:Mh},className:!k&&m?Rh.className:void 0},L=q(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:Hh,props:[T,I,$d(E),o]});return(0,X.jsxs)(Y.Fragment,{children:[!b&&Rh.getElement(y),(0,X.jsx)(Bs,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function Wh(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Gh(e){return ph(e.scrollHeight,e.clientHeight)}function Kh(e){return Xl.getScale(e)}function qh(e,t,n){return e/n[t]}function Jh(e,t){return fa({x:qh(e.x,`x`,t),y:qh(e.y,`y`,t),width:qh(e.width,`x`,t),height:qh(e.height,`y`,t)})}var Yh=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Xh(e){let{style:t}=e,n={};for(let[e,r]of Yh)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Yh){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Zh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Wm(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=Ah(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:Mh},className:u&&d!==`touch`?Rh.className:void 0},p=o.useStateSetter(`listElement`);return q(`div`,e,{ref:[t,p],props:[f,a]})}),Qh=Y.createContext(void 0);function $h(){let e=Y.useContext(Qh);if(!e)throw Error(ge(57));return e}var eg=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=Y.useRef(null),d=ap({guess:!0,label:o,textRef:u}),f=Wm(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=d.index,w=Y.useRef(null);J(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),J(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=eh(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&Jm(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=Y.useRef(`mouse`),E=Y.useRef(!1),{getButtonProps:D,buttonRef:O}=Oe({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),k={disabled:v,selected:x,highlighted:y};function A(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?th(n,a,_):[...n,a];f.context.setValue(r,Q(_o,e))}else f.context.setValue(a,Q(_o,e)),f.context.setOpen(!1,Q(_o,e))}function j(){f.context.selectionRef.current.dragY=0}let M={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,C),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=T.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Ii(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!E.current;E.current=!1,!(v||i)&&A(e.nativeEvent)},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,E.current=!0,j()},onMouseUp(){if(j(),v||T.current===`touch`||E.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(E.current=!0,w.current?.click(),E.current=!1)}},N=q(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=Y.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,X.jsx)(Qh.Provider,{value:P,children:N})})),tg=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=Y.useRef(null),{transitionStatus:l,setMounted:u}=oo(o),d=q(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:ci});return ao({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),ng=Y.forwardRef(function(e,t){let{selected:n}=$h();return e.keepMounted||n?(0,X.jsx)(tg,{...e,selected:n,ref:t}):null}),rg=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=$h(),a=Wm(),{render:o,className:s,style:c,...l}=e,u=Y.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]);return q(`div`,e,{ref:[u,t,r],props:l})})),ig=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=Wm(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=Ah(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=qa(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=oo(g);J(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),ao({open:g,ref:v,onComplete(){g||x(!1)}});let S=q(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=ph(e.scrollHeight,e.clientHeight),r=mh(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=ag(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:ci});return y||o?S:null});function ag(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?mh(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?mh(l.offsetTop+l.offsetHeight-r+i,a):a}var og=Y.forwardRef(function(e,t){return(0,X.jsx)(ig,{...e,ref:t,direction:`down`})}),sg=Y.forwardRef(function(e,t){return(0,X.jsx)(ig,{...e,ref:t,direction:`up`})}),cg=hh;function lg({className:e,...t}){return(0,X.jsx)(Eh,{"data-slot":`select-value`,className:K(`flex flex-1 text-left`,e),...t})}function ug({className:e,size:t=`default`,children:n,...r}){return(0,X.jsxs)(wh,{"data-slot":`select-trigger`,"data-size":t,className:K(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,X.jsx)(Dh,{render:(0,X.jsx)(ut,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function dg({className:e,children:t,container:n,side:r=`bottom`,sideOffset:i=4,align:a=`center`,alignOffset:o=0,alignItemWithTrigger:s=!0,...c}){return(0,X.jsx)(Oh,{container:n,children:(0,X.jsx)(Ih,{side:r,sideOffset:i,align:a,alignOffset:o,alignItemWithTrigger:s,className:`pointer-events-auto isolate z-50`,children:(0,X.jsxs)(Uh,{"data-slot":`select-content`,"data-align-trigger":s,className:K(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...c,children:[(0,X.jsx)(pg,{}),(0,X.jsx)(Zh,{children:t}),(0,X.jsx)(mg,{})]})})})}function fg({className:e,children:t,...n}){return(0,X.jsxs)(eg,{"data-slot":`select-item`,className:K(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,X.jsx)(rg,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,X.jsx)(ng,{render:(0,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,X.jsx)(mt,{className:`pointer-events-none`})})]})}function pg({className:e,...t}){return(0,X.jsx)(sg,{"data-slot":`select-scroll-up-button`,className:K(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,X.jsx)(pt,{})})}function mg({className:e,...t}){return(0,X.jsx)(og,{"data-slot":`select-scroll-down-button`,className:K(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,X.jsx)(ut,{})})}function hg(e){return e.name||`AI ${e.id.split(`-`).at(-1)}`}function gg({label:e,value:t,options:n,container:r,onChange:i}){return(0,X.jsxs)(`label`,{className:`grid min-w-0 gap-1 text-[10px] font-semibold text-muted-foreground`,children:[e,(0,X.jsxs)(cg,{value:t,onValueChange:e=>i(String(e)),children:[(0,X.jsx)(ug,{"aria-label":e,className:`h-[27px] w-full rounded-sm text-[11px] text-foreground`,children:(0,X.jsx)(lg,{children:n.find(e=>e.value===t)?.label??t})}),(0,X.jsx)(dg,{container:r,children:n.map(e=>(0,X.jsx)(fg,{value:e.value,children:e.label},e.value))})]})]})}function _g({state:e,presets:t,defaultPresetId:n,portalRoot:r}){let[i,a]=(0,Y.useState)(``),[o,s]=(0,Y.useState)(`follow`),[c,l]=(0,Y.useState)(`default`),u=e.cars.find(t=>t.id===e.selectedId),d=t.map(e=>({value:e.id,label:e.name})),f=[{value:`idle`,label:`Idle`},{value:`follow`,label:`Follow`},{value:`flee`,label:`Flee`},{value:`pursue`,label:`Pursue`}],p=t=>[{value:`default`,label:`Player / focus`},...e.cars.filter(e=>e.id!==t).map(e=>({value:e.id,label:hg(e)}))];return(0,X.jsxs)(`section`,{"aria-label":`AI cars`,className:`space-y-2.5 px-3 py-2.5 text-[11px]`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h2`,{className:`font-semibold`,children:`AI cars`}),(0,X.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`Choose how each car drives.`})]}),(0,X.jsx)(Bm,{variant:`secondary`,className:`rounded-sm text-[10px]`,children:e.cars.length})]}),e.cars.length>0&&(0,X.jsx)(`div`,{role:`list`,"aria-label":`Spawned AI cars`,className:`max-h-32 space-y-1 overflow-auto`,children:e.cars.map(n=>(0,X.jsx)(`div`,{role:`listitem`,children:(0,X.jsxs)(De,{variant:n.id===u?.id?`secondary`:`outline`,size:`sm`,className:`h-9 w-full justify-between rounded-sm px-2 text-left`,onClick:()=>e.onSelect(n.id),"aria-label":`Edit ${hg(n)}`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 truncate`,children:[(0,X.jsx)(`strong`,{children:hg(n)}),(0,X.jsx)(`span`,{className:`min-w-0 truncate font-normal text-muted-foreground`,children:t.find(e=>e.id===n.presetId)?.name??`Vehicle`})]}),(0,X.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground`,children:f.find(e=>e.value===n.mode)?.label})]})},n.id))}),(0,X.jsx)(Io,{}),u?(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,X.jsx)(`strong`,{children:hg(u)}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(De,{variant:`ghost`,size:`xs`,onClick:()=>e.onSelect(null),children:`New car`}),(0,X.jsxs)(De,{variant:`destructive`,size:`xs`,className:`rounded-sm`,onClick:()=>e.onRemove(u.id),children:[(0,X.jsx)(z,{}),` Remove`]})]})]}),(0,X.jsxs)(`label`,{className:`grid gap-1 text-[10px] font-semibold text-muted-foreground`,children:[`Name`,(0,X.jsx)(Po,{value:u.name,placeholder:hg(u),maxLength:32,onChange:t=>e.onUpdate(u.id,{name:t.target.value})})]}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,X.jsx)(gg,{label:`Vehicle`,value:u.presetId,options:d,container:r,onChange:n=>{let r=t.find(e=>e.id===n);r&&e.onUpdate(u.id,{preset:r})}}),(0,X.jsx)(gg,{label:`Mode`,value:u.mode,options:f,container:r,onChange:t=>e.onUpdate(u.id,{mode:t})})]}),(0,X.jsx)(gg,{label:`Target`,value:u.targetId??`default`,options:p(u.id),container:r,onChange:t=>e.onUpdate(u.id,{targetId:t==="default"?null:t})})]}):(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsxs)(`label`,{className:`grid gap-1 text-[10px] font-semibold text-muted-foreground`,children:[(0,X.jsxs)(`span`,{children:[`Name `,(0,X.jsx)(`span`,{className:`font-normal`,children:`(optional)`})]}),(0,X.jsx)(Po,{value:i,placeholder:`Automatic name`,maxLength:32,onChange:e=>a(e.target.value)})]}),(0,X.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`A random vehicle, different from your ride.`}),(0,X.jsx)(`div`,{className:`grid gap-2`,children:(0,X.jsx)(gg,{label:`Mode`,value:o,options:f,container:r,onChange:e=>s(e)})}),(0,X.jsx)(gg,{label:`Target`,value:c,options:p(),container:r,onChange:l}),(0,X.jsxs)(De,{size:`sm`,className:`w-full rounded-sm`,disabled:!t.some(e=>e.id!==n),onClick:()=>{let r=A(t,n);r&&(e.onSpawn(r,o,i,c==="default"?void 0:c),a(``))},children:[(0,X.jsx)(Tt,{}),` Spawn car`]})]})]})}function vg({hovered:e,breakable:t=!1,animateOnEnter:n=!1,...r}){let i=(0,Y.useRef)(null),[a,o]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(n),l=(e??a)||s;return(0,Y.useEffect)(()=>{if(c(n),!n)return;let e=window.setTimeout(()=>c(!1),1e3);return()=>window.clearTimeout(e)},[n]),(0,Y.useEffect)(()=>{let e=i.current;if(!e||!l)return;let t=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=Math.floor(Math.random()*4294967296),r=performance.now(),a,o=()=>{if(clearTimeout(a),t.matches){e.style.removeProperty(`transform`);return}let i=performance.now()-r,s=i%1e3,c=P(s,n+Math.floor(i/1e3));c&&(e.style.transform=`translate(${c.x*.28}px, ${c.y*.28}px) rotate(${c.rotation}rad)`);let l=L.find(e=>e>s)??1e3;a=setTimeout(o,Math.max(1,l-s))};return o(),t.addEventListener(`change`,o),()=>{clearTimeout(a),e.style.removeProperty(`transform`),t.removeEventListener(`change`,o)}},[l]),(0,X.jsxs)(`svg`,{...r,ref:i,viewBox:k.viewBox,role:r.role??`img`,"aria-label":r[`aria-label`]??`Joy Ride`,"data-jr-breakable":t||void 0,"data-jr-combustible":t||void 0,style:{overflow:`visible`,transformOrigin:`center`,...r.style},onPointerEnter:e=>{o(!0),r.onPointerEnter?.(e)},onPointerLeave:e=>{o(!1),r.onPointerLeave?.(e)},children:[(0,X.jsx)(`path`,{d:k.wordmarkPath,fill:`currentColor`,fillRule:`evenodd`}),(0,X.jsx)(`path`,{d:k.crownPath,fill:`var(--joy-logo-accent, var(--drive-accent, #d63228))`,fillRule:`evenodd`})]})}function yg(){return(0,X.jsxs)(De,{variant:`outline`,size:`sm`,nativeButton:!1,render:(0,X.jsx)(`a`,{href:`https://github.com/jakiestfu/joy-ride`,target:`_blank`,rel:`noreferrer`}),children:[(0,X.jsx)(xt,{"aria-hidden":`true`}),`GitHub`]})}var bg=`.joy-code-block{--code-bg:#f5f5f5;--code-header:transparent;--code-ink:#171717;--code-muted:#737373;--code-line:#e5e5e5;--code-accent:#171717;--sh-class:#8f3c2e;--sh-identifier:var(--code-ink);--sh-sign:#72695f;--sh-property:#8f3c2e;--sh-entity:#b32d25;--sh-jsxliterals:#8f3c2e;--sh-string:#775b43;--sh-keyword:#b32d25;--sh-comment:#797267;--sh-space:inherit;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;border:1px solid var(--code-line);border-radius:var(--radius-lg,8px);background:var(--code-bg);min-width:0;color:var(--code-ink);text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}:where(.dark,[data-jr-theme=dark],[data-theme=dark]) .joy-code-block:not([data-code-theme=light]),:host(.dark) .joy-code-block:not([data-code-theme=light]),.joy-code-block[data-code-theme=dark]{--code-bg:#1c1c1c;--code-header:transparent;--code-ink:#fafafa;--code-muted:#a3a3a3;--code-line:#333;--code-accent:#fafafa;--sh-class:#e6b49b;--sh-sign:#b5a99b;--sh-property:#e6b49b;--sh-entity:#ff998a;--sh-jsxliterals:#e6b49b;--sh-string:#d4c3aa;--sh-keyword:#ff998a;--sh-comment:#9a9389;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.joy-code-block .joy-code-header{border-bottom:1px solid var(--code-line);background:var(--code-header);align-items:center;gap:10px;min-height:43px;padding:0 16px;display:flex}.joy-code-block .joy-code-heading{flex:1;align-items:center;gap:12px;min-width:0;display:flex}.joy-code-block .joy-code-title{color:var(--code-ink);letter-spacing:0;text-overflow:ellipsis;white-space:nowrap;font:600 11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.joy-code-block .joy-code-language{color:var(--code-muted);font:9px ui-monospace,SFMono-Regular,Menlo,monospace}.joy-code-block button{min-height:32px;color:var(--code-muted);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:0;justify-content:center;align-items:center;gap:6px;padding:4px 6px;font:500 10px -apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;display:inline-flex}.joy-code-block button:hover{color:var(--code-ink);text-underline-offset:4px;text-decoration:underline}.joy-code-block .joy-code-copy{flex:none;margin-left:auto}.joy-code-block .joy-code-copy>span{text-align:left;min-width:36px}.joy-code-block .joy-code-copy svg{flex:none;width:13px;height:13px}.joy-code-block :is(button,pre):focus-visible{outline:2px solid var(--code-accent);outline-offset:-3px}.joy-code-block .joy-code-tabs{flex:1;min-width:0}.joy-code-block [role=tablist]{flex-wrap:wrap;gap:2px;display:flex}.joy-code-block button[role=tab]{text-transform:uppercase;letter-spacing:.06em;border-bottom:2px solid #0000;border-radius:0;min-height:42px;padding-inline:8px;font-weight:700}.joy-code-block button[aria-selected=true]{border-bottom-color:var(--code-accent);color:var(--code-ink)}.joy-code-block .joy-code-pre{min-width:0;max-width:100%;color:var(--code-ink);text-align:left;white-space:pre;overflow-wrap:normal;font-variant-ligatures:none;tab-size:2;-webkit-overflow-scrolling:touch;background:0 0;border:0;border-radius:0;margin:0;padding:18px;font:11.5px/1.85 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;display:block;overflow:auto}.joy-code-block code{font:inherit;color:inherit;background:0 0;padding:0}.joy-code-block .sh__line{display:inline}.joy-code-block .sh__token--comment{font-style:italic}.joy-code-block[data-wrap] .joy-code-pre{white-space:pre-wrap;overflow-wrap:anywhere}.joy-code-block[data-compact] .joy-code-header{min-height:35px;padding-inline:10px}.joy-code-block[data-compact] .joy-code-pre{padding:12px;font-size:10.5px;line-height:1.75}.joy-code-block .joy-code-status{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.joy-code-block .joy-code-status[data-error]{clip-path:none;width:auto;height:auto;color:var(--code-accent);padding:10px 14px;font-size:11px;display:block;position:static}@media (width<=480px){.joy-code-block .joy-code-header{gap:6px;padding-inline:9px}.joy-code-block .joy-code-language{display:none}.joy-code-block .joy-code-pre{padding:14px;font-size:11px}.joy-code-block button[role=tab]{padding-inline:5px;font-size:9px}}`,xg=`.joy-pause-menu{--pause-accent:var(--joy-ride-brand-color,var(--primary));--joy-logo-accent:var(--pause-accent);--pause-inset:20px;--text-xs:10px;--text-sm:12px;--text-base:13px;z-index:2;pointer-events:auto;color:var(--foreground);outline:none;font-size:12px;position:fixed}.joy-pause-frame{border:1px solid var(--border);background:var(--background);width:100%;height:100%;display:flex;overflow:hidden;box-shadow:0 24px 80px #0005}.joy-pause-layout{--pause-sidebar-width:160px;align-items:stretch;height:100%;min-height:0}.joy-pause-sidebar{border-right:1px solid var(--sidebar-border);flex-shrink:0}.joy-pause-brand{justify-content:center;align-items:center;min-height:102px;padding:18px 12px 8px}.joy-pause-logo-backing{isolation:isolate;place-items:center;width:138px;height:76px;display:grid;position:relative}.joy-pause-logo-backing:before{content:"";z-index:-1;background:var(--sidebar);pointer-events:none;position:absolute;inset:-8px;-webkit-mask:url(`+new URL(`../embed-assets/logo-backing-DQNUb3C2.svg`,import.meta.url).href+`) 50%/100% 100% no-repeat;mask:url(`+new URL(`../embed-assets/logo-backing-DQNUb3C2.svg`,import.meta.url).href+`) 50%/100% 100% no-repeat}.joy-pause-logo{width:124px;height:76px;display:block;overflow:visible}.joy-pause-brand-name{overflow-wrap:anywhere;font-size:15px;line-height:1.4}.joy-pause-sidebar [data-slot=sidebar-menu]{gap:3px}.joy-pause-sidebar-footer{gap:14px;padding:14px 12px}.joy-pause-selected-vehicle{align-items:center;gap:10px;min-width:0;display:flex}.joy-pause-selected-image,.joy-pause-selected-vehicle>svg{object-fit:contain;flex:none;width:34px;height:48px}.joy-pause-selected-image{place-items:center;display:grid}.joy-pause-selected-image img{object-fit:contain;width:48px;max-width:none;height:34px;transform:rotate(-90deg)}.joy-pause-selected-vehicle>div:not(.joy-pause-selected-image){gap:5px;min-width:0;display:grid}.joy-pause-selected-vehicle strong{text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:600;line-height:1.4;overflow:hidden}.joy-pause-selected-vehicle span{color:var(--muted-foreground);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.4;overflow:hidden}.joy-pause-workspace{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.joy-pause-header{padding:18px var(--pause-inset) 16px;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.joy-pause-header[data-dragging]{cursor:grabbing}.joy-pause-header:focus-visible{outline:2px solid var(--ring);outline-offset:-3px}.joy-pause-heading{min-width:0}.joy-pause-heading h1{letter-spacing:-.04em;margin:0;font-size:22px;font-weight:650;line-height:1.25}.joy-pause-heading p{color:var(--muted-foreground);margin:4px 0 0;font-size:12px;line-height:1.5}.joy-pause-header-actions{flex:none;align-items:center;gap:8px;display:flex}.joy-pause-content,.joy-pause-body{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.joy-pause-panels{min-width:0}.joy-pause-panels>section{padding:2px var(--pause-inset) 16px}.joy-pause-panels>section>section+section{margin-top:16px}.joy-pause-settings-main>label{grid-template-columns:minmax(110px,.8fr) minmax(0,1fr);align-items:center;gap:20px;font-size:12px;font-weight:500;display:grid}.joy-pause-settings-main>label+label{margin-top:14px}.joy-pause-audio{grid-template-columns:minmax(110px,.8fr) minmax(0,1fr);align-items:center;gap:20px;display:grid}.joy-pause-audio>div{align-items:center;gap:14px;display:flex}.joy-pause-audio [data-slot=slider]{flex:1;min-width:0}.joy-pause-audio output{text-align:right;min-width:3ch;color:var(--muted-foreground);font-size:12px}.joy-pause-tool{border-radius:var(--radius-lg);border:0;padding:8px 0}.joy-pause-vehicle-image{place-items:center;height:160px;display:grid}.joy-pause-vehicle-image img{object-fit:contain;max-width:220px;max-height:140px}.joy-pause-vehicle-image svg{width:180px}.joy-pause-vehicle-name{margin:6px 0;font-size:17px;font-weight:600;line-height:1.4;display:block}.joy-pause-vehicle-tools{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin-top:12px;display:flex}.joy-pause-vehicle-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin-top:16px;display:grid}.joy-pause-vehicle-stats>div>span{color:var(--muted-foreground);font-size:11px}.joy-pause-footer{padding:12px var(--pause-inset) 16px;flex-shrink:0;justify-content:flex-end;display:flex}.joy-pause-footer-actions{gap:10px;display:flex}@media (width<=600px){.joy-pause-menu{--pause-inset:16px}.joy-pause-layout{--pause-sidebar-width:62px}.joy-pause-brand{min-height:86px;padding:16px 5px}.joy-pause-logo-backing{width:52px;height:42px}.joy-pause-logo{width:50px;height:40px}.joy-pause-brand-name{font-size:10px}.joy-pause-sidebar [data-slot=sidebar-group]{padding-inline:8px}.joy-pause-sidebar [data-slot=sidebar-menu-button]{justify-content:center;height:40px;padding:8px}.joy-pause-sidebar [data-slot=sidebar-menu-button]>span,.joy-pause-selected-vehicle>div:not(.joy-pause-selected-image){clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.joy-pause-sidebar-footer{align-items:center;gap:16px;padding:12px 6px}.joy-pause-selected-image,.joy-pause-selected-vehicle>svg{width:34px;height:44px}.joy-pause-sidebar-footer [data-slot=button]{gap:0;width:36px;padding:0;font-size:0}.joy-pause-header{gap:8px;padding-top:14px;padding-bottom:14px}.joy-pause-heading h1{font-size:21px}.joy-pause-heading p{font-size:11px}.joy-pause-header-actions{gap:4px}.joy-pause-settings-main>label,.joy-pause-audio{grid-template-columns:minmax(0,1fr);gap:8px}.joy-pause-vehicle-image img{max-width:165px}.joy-pause-vehicle-image{height:135px}.joy-pause-vehicle-tools{justify-content:flex-start}.joy-pause-vehicle-stats{grid-template-columns:minmax(0,1fr)}}@media (height<=600px){.joy-pause-header{padding-block:16px}.joy-pause-footer{padding-block:12px}.joy-pause-brand{min-height:90px}}`,Sg=`.joy-docs{grid-template-columns:190px minmax(0,1fr);height:100%;min-height:0;display:grid;position:relative;overflow:clip}.joy-docs-navigation{min-width:0;padding:6px var(--pause-inset,20px) 24px;font-size:12px;overflow:auto}.joy-docs-nav-label{color:var(--muted-foreground);margin:0 0 14px;font-size:11px;font-weight:500}.joy-docs-navigation ul{margin:0;padding:0;list-style:none}.joy-docs-chapters>li+li{margin-top:3px}.joy-docs-navigation a{color:var(--muted-foreground);line-height:1.5;text-decoration:none;transition:color .12s;display:block;position:relative}.joy-docs-chapter{padding:6px 0}.joy-docs-navigation a:hover,.joy-docs-navigation a[aria-current]{color:var(--foreground)}.joy-docs-chapter[aria-current=page]{font-weight:600}.joy-docs-navigation .joy-docs-sections{margin:4px 0 14px;padding-left:14px;font-size:11px}.joy-docs-section{padding:5px 0}.joy-docs-section[aria-current=location]{font-weight:500}.joy-docs-navigation a:focus-visible,.joy-docs-prose a:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.joy-docs-article{overscroll-behavior:contain;min-width:0;min-height:0;padding:2px 24px 24px;overflow:auto}.joy-docs-prose{color:var(--muted-foreground);overflow-wrap:anywhere;font-size:13px;line-height:1.75}.joy-docs-prose :is(h2,h3,h4){color:var(--foreground);letter-spacing:-.025em;scroll-margin-top:20px;font-weight:600;line-height:1.35}.joy-docs-prose h2{margin:0 0 12px;font-size:24px}.joy-docs-prose h3{border-top:1px solid var(--border);margin:32px 0 12px;padding-top:20px;font-size:16px}.joy-docs-prose h4{margin:24px 0 8px;font-size:13px}.joy-docs-prose :is(h2,h3,h4):focus{outline:none}.joy-docs-prose :is(h2,h3,h4):focus-visible{outline:2px solid var(--ring);outline-offset:4px}.joy-docs-prose p{margin:12px 0}.joy-docs-prose :is(ul,ol){margin:14px 0;padding-left:22px}.joy-docs-prose ul{list-style:outside}.joy-docs-prose ol{list-style:decimal}.joy-docs-prose li{margin-block:5px}.joy-docs-prose strong{color:var(--foreground);font-weight:600}.joy-docs-prose a{color:var(--foreground);text-underline-offset:3px;text-decoration:underline}.joy-docs-prose :not(pre)>code{color:var(--foreground);background:var(--muted);border-radius:var(--radius-sm);padding:2px 4px;font-family:ui-monospace,monospace;font-size:.9em}.joy-docs-prose blockquote{border-left:2px solid var(--border);color:var(--muted-foreground);margin:18px 0;padding:4px 16px}.joy-docs-prose .joy-code-block{max-width:100%;margin-block:16px}.joy-docs-table{border:1px solid var(--border);border-radius:var(--radius-lg);margin-block:18px;overflow-x:auto}.joy-docs-table table{border-collapse:collapse;width:100%;font-size:11px;line-height:1.65}.joy-docs-table :is(th,td){text-align:left;vertical-align:top;border-bottom:1px solid var(--border);padding:10px 12px}.joy-docs-table th{color:var(--foreground);background:var(--muted);white-space:nowrap;font-weight:600}.joy-docs-table tr:last-child td{border-bottom:0}.joy-docs-next{border-top:1px solid var(--border);margin-top:28px;padding-top:20px}.joy-docs-browse{display:none}.joy-pause-panels[data-documentation]{overflow:clip}.joy-pause-menu[data-documentation] .joy-pause-footer{padding-block:8px}@media (width<=800px){.joy-docs{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);padding-top:4px}.joy-docs-browse{width:fit-content;margin:0 16px 12px;display:flex}.joy-docs-navigation{background:var(--popover);border:1px solid var(--border);border-radius:var(--radius-lg);z-index:2;max-height:min(360px,65%);padding:12px;display:none;position:absolute;top:44px;left:16px;right:16px;box-shadow:0 8px 24px #0003}.joy-docs-navigation[data-open=true]{display:block}.joy-docs-article{padding-inline:16px}.joy-docs-prose{font-size:12px}.joy-docs-prose h2{font-size:21px}}`,Cg=14,wg=(e,t,n)=>Math.max(t,Math.min(n,e));function Tg(e,t={width:480,height:560},n={x:0,y:0}){let r=Math.min(Cg,e.width/2,e.height/2),i=Math.min(t.width,Math.max(0,e.width-r*2)),a=Math.min(t.height,Math.max(0,e.height-r*2));return{width:i,height:a,left:wg((e.width-i)/2+n.x,r,e.width-r-i),top:wg((e.height-a)/2+n.y,r,e.height-r-a)}}function Eg({styles:e,size:t,onEscape:n,onReset:r,onRecordShortcut:i,shortcutsEnabled:a}){let o=(0,Y.useRef)(e),[s,c]=(0,Y.useState)(null),[l,u]=(0,Y.useState)(()=>({width:window.innerWidth,height:Math.min(window.innerHeight,window.visualViewport?.height??window.innerHeight)})),[d,f]=(0,Y.useState)({x:0,y:0}),[p,m]=(0,Y.useState)(!1),h=(0,Y.useRef)(null),g=(0,Y.useRef)(null);(0,Y.useLayoutEffect)(()=>{let e=document.createElement(`div`);e.dataset.jrUi=``,e.dataset.jrPopoverHost=``,e.style.cssText=`position:fixed;inset:0;z-index:${ee(`controls`)};pointer-events:none`;let t=e.attachShadow({mode:`open`}),n=document.createElement(`style`);n.dataset.jrDialogStyles=``,n.textContent=o.current,t.append(n);let r=R(e);return document.body.append(e),c(t),()=>{r(),e.remove()}},[]),(0,Y.useLayoutEffect)(()=>{let t=s?.querySelector(`style`);t&&(t.textContent=e)},[s,e]),(0,Y.useEffect)(()=>{let e=()=>u({width:window.innerWidth,height:Math.min(window.innerHeight,window.visualViewport?.height??window.innerHeight)});window.addEventListener(`resize`,e),window.visualViewport?.addEventListener(`resize`,e);let t=e=>{e.defaultPrevented||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),n()):e.repeat||e.metaKey||e.ctrlKey||e.altKey||H(e)||a&&(e.code===`KeyR`&&(e.preventDefault(),e.stopPropagation(),i()),e.code===`KeyC`&&(e.preventDefault(),e.stopPropagation(),r())))};return document.addEventListener(`keydown`,t),()=>{window.removeEventListener(`resize`,e),window.visualViewport?.removeEventListener(`resize`,e),document.removeEventListener(`keydown`,t)}},[n,r,i,a]),(0,Y.useEffect)(()=>{if(!s)return;let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;let t=document.documentElement,n=t.style.overflow,r=t.style.scrollbarGutter;getComputedStyle(t).scrollbarGutter===`auto`&&(t.style.scrollbarGutter=`stable`),t.style.overflow=`hidden`;let i=requestAnimationFrame(()=>h.current?.focus({preventScroll:!0})),a=e=>{if(e.key!==`Tab`||e.ctrlKey||e.metaKey||e.altKey)return;let t=[...s.querySelectorAll(`button,a[href],input,select,textarea,[tabindex]`)].filter(e=>e.tabIndex>=0&&!e.matches(`:disabled,[aria-hidden="true"]`)&&e.getClientRects().length&&getComputedStyle(e).visibility!==`hidden`),n=s.activeElement;for(;n?.shadowRoot?.activeElement;)n=n.shadowRoot.activeElement;t.length?(!n||!s.contains(n)||n===h.current||(e.shiftKey?n===t[0]:n===t.at(-1)))&&(e.preventDefault(),(e.shiftKey?t.at(-1):t[0])?.focus()):(e.preventDefault(),h.current?.focus())};return document.addEventListener(`keydown`,a,!0),()=>{cancelAnimationFrame(i),document.removeEventListener(`keydown`,a,!0),t.style.overflow=n,t.style.scrollbarGutter=r,e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},[s]);let _=Tg(l,t,d);return{portalRoot:s,dialogRef:h,placement:_,dragging:p,headerProps:{onPointerDown:e=>{e.button!==0||e.target instanceof Element&&e.target.closest(`button,a,input,select,textarea,[role="button"]`)||(e.preventDefault(),g.current={pointer:e.pointerId,x:e.clientX,y:e.clientY,offset:{x:_.left-(l.width-_.width)/2,y:_.top-(l.height-_.height)/2}},e.currentTarget.setPointerCapture(e.pointerId),m(!0))},onPointerMove:e=>{let t=g.current;t&&t.pointer===e.pointerId&&f({x:t.offset.x+e.clientX-t.x,y:t.offset.y+e.clientY-t.y})},onPointerUp:e=>{g.current?.pointer===e.pointerId&&(g.current=null,m(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},onLostPointerCapture:()=>{g.current=null,m(!1)},onKeyDown:e=>{if(e.target!==e.currentTarget)return;let t=e.shiftKey?20:8,n={ArrowLeft:[-t,0],ArrowRight:[t,0],ArrowUp:[0,-t],ArrowDown:[0,t]};if(e.key!==`Home`&&!n[e.key])return;e.preventDefault(),e.stopPropagation();let[r,i]=n[e.key]??[0,0];f(e.key===`Home`?{x:0,y:0}:{x:_.left-(l.width-_.width)/2+r,y:_.top-(l.height-_.height)/2+i})}}}}function Dg(e){return Array.isArray(e)?e.map(e=>Dg(e)).join(`,`):e==null?``:String(e)}var Og=new Map;function kg(e,t){let n=JSON.stringify({locale:Dg(e),options:t}),r=Og.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return Og.set(n,i),i}function Ag(e,t,n){return e==null?``:kg(t,n).format(e)}function jg(e,t,n){return(e-t)*100/(n-t)}var Mg=Y.createContext(void 0);function Ng(){let e=Y.useContext(Mg);if(e===void 0)throw Error(ge(51));return e}var Pg=`data-complete`,Fg=`data-indeterminate`,Ig=`data-progressing`,Lg={status(e){return e===`progressing`?{[Ig]:``}:e===`complete`?{[Pg]:``}:e===`indeterminate`?{[Fg]:``}:null}},Rg=Y.forwardRef(function(e,t){let{format:n,getAriaValueText:r,locale:i,max:a=100,min:o=0,value:s,render:c,className:l,children:u,style:d,...f}=e,[p,m]=Y.useState(),h=`indeterminate`,g=null,_=null,v=``,y=`indeterminate progress`;if(s!=null&&Number.isFinite(s)){let e=jg(s,o,a);g=fh(Number.isNaN(e)?0:e,0,100),_=fh(s,o,a),h=_===a?`complete`:`progressing`,v=n?Ag(_,i,n):Ag(g/100,i,{style:`percent`}),y=v}let b=Y.useMemo(()=>({status:h}),[h]),x={"aria-labelledby":p,"aria-valuemax":a,"aria-valuemin":o,"aria-valuenow":_??void 0,"aria-valuetext":r?r(v,s):y,role:`progressbar`,children:(0,X.jsxs)(Y.Fragment,{children:[u,(0,X.jsx)(`span`,{role:`presentation`,style:ts,children:`x`})]})},S=Y.useMemo(()=>({formattedValue:v,percentageValue:g,setLabelId:m,state:b,value:s}),[v,g,m,b,s]),C=q(`div`,e,{state:b,ref:t,props:[x,f],stateAttributesMapping:Lg});return(0,X.jsx)(Mg.Provider,{value:S,children:C})}),zg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Ng();return q(`div`,e,{state:o,ref:t,props:a,stateAttributesMapping:Lg})}),Bg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{percentageValue:o,state:s}=Ng(),c=o==null?{}:{insetInlineStart:0,height:`inherit`,width:`${o}%`};return q(`div`,e,{state:s,ref:t,props:[{style:c},a],stateAttributesMapping:Lg})}),Vg=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,{value:s,formattedValue:c,state:l}=Ng(),u=l.status===`indeterminate`;return q(`span`,e,{state:l,ref:t,props:[{"aria-hidden":!0,children:typeof i==`function`?i(u?`indeterminate`:c,s):u?null:c},o],stateAttributesMapping:Lg})}),Hg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s,state:c}=Ng(),l=Ua(a,s);return q(`span`,e,{state:c,ref:t,props:[{id:l,role:`presentation`},o],stateAttributesMapping:Lg})});function Ug({className:e,children:t,value:n,...r}){return(0,X.jsxs)(Rg,{value:n,"data-slot":`progress`,className:K(`flex flex-wrap gap-3`,e),...r,children:[t,(0,X.jsx)(Wg,{children:(0,X.jsx)(Gg,{})})]})}function Wg({className:e,...t}){return(0,X.jsx)(zg,{className:K(`relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted`,e),"data-slot":`progress-track`,...t})}function Gg({className:e,...t}){return(0,X.jsx)(Bg,{"data-slot":`progress-indicator`,className:K(`h-full bg-primary transition-all`,e),...t})}function Kg({className:e,...t}){return(0,X.jsx)(Hg,{className:K(`text-sm font-medium`,e),"data-slot":`progress-label`,...t})}function qg({className:e,...t}){return(0,X.jsx)(Vg,{className:K(`ml-auto text-sm text-muted-foreground tabular-nums`,e),"data-slot":`progress-value`,...t})}function Jg({preset:e,presets:t,tools:n,options:r,allowEditing:i,onSelectPreset:a,onSavePreset:o,onEdit:s}){let c=(0,Y.useRef)(null),[l,u]=(0,Y.useState)(``),f=(0,Y.useRef)(i);f.current=i;let p=(0,Y.useRef)(!0);(0,Y.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=Math.max(0,t.findIndex(t=>t.id===e.id)),g=e=>{let n=t[Math.max(0,Math.min(t.length-1,e))];n&&a(n)},v=async e=>{if(e&&f.current){try{let n=h(JSON.parse(await e.text()));if(!p.current||!f.current)return;d(n.id)&&t.some(e=>e.id===n.id)&&(n={..._(n),name:n.name}),o(n),u(``)}catch(e){if(!p.current)return;u(e instanceof Error?e.message:`Could not import vehicle.`)}c.current&&(c.current.value=``)}};return(0,X.jsxs)(`section`,{className:`joy-pause-vehicle-panel min-h-full px-3 py-2.5 text-sm max-[560px]:p-[9px]`,children:[(0,X.jsx)(Lp,{preset:e,enabledTools:n.map(e=>e.id),masterVolume:r.masterVolume}),(0,X.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,X.jsx)(De,{variant:`outline`,size:`icon-sm`,onClick:()=>g(m-1),disabled:m===0,"aria-label":`Previous vehicle`,children:(0,X.jsx)(dt,{})}),(0,X.jsxs)(`div`,{className:`min-w-0 text-center`,children:[(0,X.jsx)(`strong`,{className:`block`,children:e.name}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:[e.make,e.year].filter(Boolean).join(` · `)||`Joy Ride`})]}),(0,X.jsx)(De,{variant:`outline`,size:`icon-sm`,onClick:()=>g(m+1),disabled:m===t.length-1,"aria-label":`Next vehicle`,children:(0,X.jsx)(ft,{})})]}),i&&(0,X.jsxs)(`div`,{className:`joy-pause-vehicle-tools`,children:[(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>{s(!1)},children:[(0,X.jsx)(wt,{}),` Edit vehicle`]}),(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>{s(!0)},children:[(0,X.jsx)(Tt,{}),` New vehicle`]}),(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>c.current?.click(),children:[(0,X.jsx)(Ot,{}),` Import JSON`]}),(0,X.jsx)(`input`,{ref:c,type:`file`,accept:`.json,application/json`,hidden:!0,onChange:e=>void v(e.target.files?.[0])})]}),i&&l&&(0,X.jsx)(`p`,{role:`alert`,className:`mt-1 text-center text-xs text-destructive`,children:l}),(0,X.jsx)(`div`,{className:`joy-pause-vehicle-stats`,children:Le(e,t).map(e=>(0,X.jsxs)(Ug,{value:e.value,className:`gap-1.5`,children:[(0,X.jsx)(Kg,{className:`text-xs text-muted-foreground`,children:e.label}),(0,X.jsx)(qg,{className:`text-xs`})]},e.label))})]})}var Yg=Y.createContext(void 0);function Xg(){let e=Y.useContext(Yg);if(e===void 0)throw Error(ge(63));return e}var Zg=`data-checked`,Qg=`data-unchecked`,$g={..._r,checked(e){return e?{[Zg]:``}:{[Qg]:``}}},e_=Y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...y}=e,{clearErrors:b}=Sr(),{state:x,setTouched:S,setDirty:C,validityData:w,setFilled:T,validationMode:E,disabled:D,name:O,validation:k}=br(),{labelId:A}=Ar(),j=D||m,M=O??l,N=Y.useRef(null),P=be(N,c,k.inputRef),F=Y.useRef(null),I=so(j,F),L=Or(),R=Pr({id:s}),z=u?void 0:R,[B,V]=Df({controlled:n,default:!!i,name:`Switch`,state:`checked`});co(F,L,B,void 0,!j,l),J(()=>{T(B)},[B,T]),lo(B,()=>{b(M),C(B!==w.initialValue),k.change(B)});let{getButtonProps:H,buttonRef:ee}=Oe({disabled:j,native:u}),te=jr(a,A,N,!u,z,y[`aria-label`]),U={id:u?R:L,role:`switch`,"aria-checked":B,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":te,onFocus(){I(!0)},onBlur(){let e=N.current;e&&!j&&(S(!0),I(!1),E===`onBlur`&&k.commit(e.checked))},onClick(e){if(f||j)return;e.preventDefault();let t=N.current;t&&Ee(t,e)}},ne={...k.getValidationProps(j),checked:B,disabled:j,form:o,id:z,name:M,required:p,style:M?ns:ts,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:P,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=Q(fo,e.nativeEvent);d?.(t,n),!n.isCanceled&&V(t)},onClick(e){e.stopPropagation()},onFocus(){F.current?.focus()},..._===void 0?Te:{value:_}},re=Y.useMemo(()=>({...x,checked:B,disabled:j,readOnly:f,required:p}),[x,B,j,f,p]),ie=q(`span`,e,{state:re,ref:[t,F,ee],props:[U,y,H,e=>k.getValidationProps(j,e)],stateAttributesMapping:$g});return(0,X.jsxs)(Yg.Provider,{value:re,children:[ie,!B&&M&&g!==void 0&&(0,X.jsx)(`input`,{type:`hidden`,form:o,name:M,value:g,disabled:j}),(0,X.jsx)(`input`,{...ne,suppressHydrationWarning:!0})]})}),t_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Xg();return q(`span`,e,{state:o,ref:t,stateAttributesMapping:$g,props:a})});function n_({className:e,...t}){return(0,X.jsx)(e_,{"data-slot":`switch`,className:K(`inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input transition-colors outline-none data-checked:bg-primary focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,X.jsx)(t_,{"data-slot":`switch-thumb`,className:`pointer-events-none block size-4 translate-x-0.5 rounded-full bg-background shadow-sm transition-transform data-checked:translate-x-4 data-checked:bg-primary-foreground`})})}function r_(e,t){return e-t}function i_(e,t,n,r,i,a){let o=fh(e,n,r);if(!i)return o;let s=a.slice();return s[t]=fh(o,a[t-1]??-1/0,a[t+1]??1/0),s.sort(r_)}function a_(e,t,n){if(!Array.isArray(e))return!0;let r=t*n;for(let t=0;t<e.length-1;t+=1)if(!(Math.abs(e[t]-e[t+1])>=r))return!1;return!0}var o_=()=>null,s_={activeThumbIndex:o_,max:o_,min:o_,minStepsBetweenValues:o_,step:o_,values:o_,..._r},c_=Y.createContext(void 0);function l_(){let e=Y.useContext(c_);if(e===void 0)throw Error(ge(62));return e}function u_(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&Km(e,t)}var d_=Y.forwardRef(function(e,t){let{"aria-labelledby":n,className:r,defaultValue:i,disabled:a=!1,id:o,format:s,largeStep:c=10,locale:l,render:u,max:d=100,min:f=0,minStepsBetweenValues:p=0,form:m,name:h,onValueChange:g,onValueCommitted:_,orientation:v=`horizontal`,step:y=1,thumbCollisionBehavior:b=`push`,thumbAlignment:x=`center`,value:S,style:C,...w}=e,T=Or(o),E=gh(T),D=G(g),O=G(_),{clearErrors:k}=Sr(),{state:A,disabled:j,name:M,setTouched:N,setDirty:P,validityData:F,validation:I}=br(),{labelId:L}=Ar(),[R,z]=Y.useState(),B=n??_h(L,R),V=j||a,H=M??h,[ee,te]=Df({controlled:S,default:i??f,name:`Slider`}),U=Y.useRef(null),ne=Y.useRef(null),re=Y.useRef([]),ie=Y.useRef(null),ae=Y.useRef(-1),oe=Y.useRef(null),se=Y.useRef(fo),[ce,le]=Y.useState(-1),[ue,de]=Y.useState(-1),[fe,W]=Y.useState(!1),[pe,me]=Y.useState(()=>new Map),[he,ge]=Y.useState([void 0,void 0]),_e=G(e=>{le(e),e!==-1&&de(e)}),ve=G(e=>{e&&(ne.current=e)}),ye=Array.isArray(ee),be=Y.useMemo(()=>ye?ee.map(e=>fh(e,f,d)).sort(r_):[fh(ee,f,d)],[d,f,ye,ee]),xe=ye?be:be[0];co(I.inputRef,T,xe,void 0,!V,h),lo(xe,()=>{k(H),I.change(xe);let e=F.initialValue,t;t=Array.isArray(xe)&&Array.isArray(e)?!Km(xe,e):xe!==e,P(t)});let Se=G((e,t)=>{if(Number.isNaN(e)||u_(e,ee))return!1;let n=t.event,r=n.constructor,i=new r(n.type,n);return Object.defineProperty(i,"target",{writable:!0,value:{value:e,name:H}}),t.event=i,D(e,t),!t.isCanceled&&(se.current=t.reason,te(e),!0)}),K=G((e,t,n)=>{let r=i_(e,t,f,d,ye,be);if(a_(r,y,p)){let e=`key`in n?wo:bo,i=Se(r,Q(e,n.nativeEvent,void 0,{activeThumbIndex:t}));N(!0),i&&O(r,uo(e,n.nativeEvent))}});J(()=>{if(!V)return;let e=Yr(Re(U.current));Z(U.current,e)&&e.blur(),ce!==-1&&_e(-1)},[ce,V,_e]);let Ce=Y.useMemo(()=>({...A,activeThumbIndex:ce,disabled:V,dragging:fe,orientation:v,max:d,min:f,minStepsBetweenValues:p,step:y,values:be}),[A,ce,V,fe,d,f,p,v,y,be]),we=Y.useMemo(()=>({active:ce,controlRef:ne,disabled:V,dragging:fe,validation:I,format:s,handleInputChange:K,indicatorPosition:he,inset:x!==`center`,isArrayValue:ye,labelId:B,rootLabelId:E,largeStep:c,lastUsedThumbIndex:ue,lastChangeReasonRef:se,form:m,locale:l,max:d,min:f,minStepsBetweenValues:p,name:H,onValueCommitted:O,orientation:v,pressedThumbCenterOffsetRef:ie,pressedThumbIndexRef:ae,pressedValuesRef:oe,registerFieldControlRef:ve,renderBeforeHydration:x===`edge`,setActive:_e,setDragging:W,setIndicatorPosition:ge,setLabelId:z,setValue:Se,state:Ce,step:y,thumbCollisionBehavior:b,thumbMap:pe,thumbRefs:re,values:be}),[ce,B,E,V,fe,I,s,K,he,c,ue,m,l,d,f,p,H,O,v,ye,ve,_e,Se,Ce,y,b,x,pe,be]),Te=q(`div`,e,{state:Ce,ref:[t,U],props:[{"aria-labelledby":B,id:T,role:`group`},w,e=>I.getValidationProps(V,e)],stateAttributesMapping:s_});return(0,X.jsx)(c_.Provider,{value:we,children:(0,X.jsx)(Wf,{elementsRef:re,onMapChange:me,children:Te})})});function f_(e){return e===`touch`||e===`pen`}function p_(e,t){let n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function m_(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function h_(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(m_(t),m_(n))))}function g_(e,t,n,r,i,a,o,s){let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=fh(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=fh(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=fh(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function __(e,t,n,r,i,a,o,s,c,l){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;if(e===`push`)return{value:g_(u,i,a,o,s,c,l),thumbIndex:i,didSwap:!1};let p=u.slice(),m=p[i-1],h=p[i+1],g=m==null?o:m+f,_=h==null?s:h-f,v=Number(fh(a,g,_).toFixed(12));switch(p[i]=v,e){case`swap`:{let e=u[i],t=1e-7,n=a>e,r=a<e,g=n&&h!=null&&a>=h-t,_=r&&m!=null&&a<=m+t;if(!g&&!_)return{value:p,thumbIndex:i,didSwap:!1};let y=g?i+1:i-1,b=p.map((e,t)=>t===i?v:d[t]??u[t]),x=a;x=g?Math.max(a,p[y]):Math.min(a,p[y]);let S=g_(p,y,x,o,s,c,l,b),C=g?y-1:y+1,w=S[C-1],T=S[C+1],E=w==null?o:w+f;E=Math.max(E,o+C*f);let D=T==null?s:T-f;D=Math.min(D,s-(S.length-1-C)*f);let O=fh(v,E,D);return S[C]=Number(O.toFixed(12)),{value:S,thumbIndex:y,didSwap:!0}}default:return{value:p,thumbIndex:i,didSwap:!1}}}var v_=2;function y_(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function b_(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var x_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{disabled:o,dragging:s,inset:c,isArrayValue:l,lastChangeReasonRef:u,max:d,min:f,minStepsBetweenValues:p,onValueCommitted:m,orientation:h,pressedThumbCenterOffsetRef:g,pressedThumbIndexRef:_,pressedValuesRef:v,registerFieldControlRef:y,renderBeforeHydration:b,setActive:x,setDragging:S,setValue:C,state:w,step:T,thumbCollisionBehavior:E,thumbRefs:D,values:O}=l_(),k=Id(),A=O.length>1,j=h===`vertical`,M=Y.useRef(null),N=Y.useRef(null),P=G(e=>{e&&N.current==null&&(N.current=Ce(e).getComputedStyle(e))}),F=Y.useRef(null),I=Y.useRef(0),L=Y.useRef(0),R=Y.useRef(null),z=Y.useRef(!1),B=Qo(O);function V(e){return e?.querySelector(`input[type="range"]`)}function H(e){_.current=e,D.current[e]||(g.current=null)}function ee(){_.current=-1,g.current=null}function te(e){return ue(e)?D.current.some(t=>!ue(t)||!Z(t,e)?!1:V(t)?.disabled===!0):!1}function U(e){let t=M.current,n=_.current;if(!t||n<0||n>=O.length)return n>=O.length&&(R.current=null),null;let{width:r,height:i,bottom:a,left:o,right:s}=t.getBoundingClientRect(),c=y_(N.current,j),u=L.current,m=(j?i:r)-c.start-c.end-u*2,h=g.current??0,y=e.x-h,b=e.y-h,x=fh(((j?a-b-c.end:(k===`rtl`?s-y:y-o)-c.start)-u)/m,0,1),S=(d-f)*x+f;return S=h_(S,T,f),S=fh(S,f,d),A?__(E,O,B.current,v.current,n,S,f,d,T,p):{value:l?[S]:S,thumbIndex:n,didSwap:!1}}function ne(e){v.current=A?O.slice():null,R.current=null,B.current=O;let t=_.current,n=t;if(t>-1&&t<O.length){if(O[t]===d){let e=t;for(;e>0&&O[e-1]===d;)--e;n=e}}else{let t=j?`y`:`x`,r;n=-1;for(let i=0;i<D.current.length;i+=1){let a=D.current[i];if(ue(a)&&!V(a)?.disabled){let o=p_(a,j),s=Math.abs(e[t]-o);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&H(n),c){let e=D.current[n];if(ue(e)){let t=e.getBoundingClientRect();L.current=t[j?`height`:`width`]/2}}}function re(e){let t=V(D.current?.[e]);t&&t.focus({preventScroll:!0,focusVisible:!1})}function ie(e,t,n){let r=C(e.value,Q(t,n,void 0,{activeThumbIndex:e.thumbIndex}));return r&&(R.current=e.value,B.current=Array.isArray(e.value)?e.value:[e.value],e.didSwap&&(H(e.thumbIndex),re(e.thumbIndex))),r}let ae=G(e=>{let t=b_(e,F);if(t==null)return;if(I.current+=1,e.type===`pointermove`&&e.buttons===0){oe(e);return}let n=U(t);n!=null&&a_(n.value,T,p)&&(!s&&I.current>v_&&S(!0),ie(n,To,e))}),oe=G(e=>{if(b_(e,F)==null)return;x(-1),S(!1),g.current=null;let t=R.current;if(Array.isArray(t)&&t.length!==O.length&&(R.current=null),R.current!=null){let t=u.current;m(R.current,uo(t,e))}`pointerType`in e&&M.current?.hasPointerCapture(e.pointerId)&&M.current?.releasePointerCapture(e.pointerId),_.current=-1,le()}),se=G(e=>{F.current??oe(e)}),ce=G(e=>{let t=z.current;if(z.current=!1,o)return;if(te(Zr(e))){ee();return}let n=e.changedTouches[0];if(n==null)return;if(F.current=n.identifier,!t){let t={x:n.clientX,y:n.clientY};ne(t);let r=U(t);if(r==null)return;re(r.thumbIndex),ie(r,yo,e),I.current=0}let r=Re(M.current);r.addEventListener(`touchmove`,ae,{passive:!0}),r.addEventListener(`touchend`,oe,{passive:!0}),r.addEventListener(`touchcancel`,oe,{passive:!0})}),le=G(()=>{let e=Re(M.current);e.removeEventListener(`pointermove`,ae),e.removeEventListener(`pointerup`,oe),e.removeEventListener(`pointercancel`,se),e.removeEventListener(`touchmove`,ae),e.removeEventListener(`touchend`,oe),e.removeEventListener(`touchcancel`,oe),F.current=null,v.current=null,R.current=null,z.current=!1}),de=$a();return Y.useEffect(()=>{let e=M.current;if(!e)return()=>le();let t=Xo(e,`touchstart`,ce,{passive:!0});return()=>{t(),de.cancel(),le()}},[le,ce,M,de]),Y.useEffect(()=>{o&&le()},[o,le]),q(`div`,e,{state:w,ref:[t,y,M,P],props:[{"data-base-ui-slider-control":b?``:void 0,onPointerDown(e){z.current=!1;let t=M.current,n=Zr(e.nativeEvent);if(!t||o||e.defaultPrevented||!ue(n)||e.button!==0)return;if(te(n)){ee();return}let r={x:e.clientX,y:e.clientY};ne(r);let i=U(r);if(i==null)return;Z(D.current[i.thumbIndex],Yr(Re(t)))?e.preventDefault():de.request(()=>{re(i.thumbIndex)}),S(!0),g.current??ie(i,yo,e.nativeEvent),e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),I.current=0,z.current=f_(e.pointerType);let a=Re(t);a.addEventListener(`pointermove`,ae,{passive:!0}),a.addEventListener(`pointerup`,oe,{once:!0}),a.addEventListener(`pointercancel`,se,{once:!0})}},a],stateAttributesMapping:s_})}),S_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=l_();return q(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:s_})}),C_=`data-index`,w_,T_=new Set([...Eu,wu,Tu]);function E_(e,t,n,r){if(!(t<0))return e.length===2?`${Ag(e[t],r,n)} ${t===0?`start`:`end`} range`:n?Ag(e[t],r,n):void 0}function D_(e,t,n,r,i){let a=e+t*n;return fh(Number(a.toFixed(Math.max(m_(e),m_(t),m_(r)))),r,i)}var O_=Y.forwardRef(function(e,t){let{render:n,children:r,className:i,"aria-describedby":a,"aria-label":o,"aria-labelledby":s,"aria-valuetext":c,disabled:l=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:m,onBlur:h,onFocus:g,onKeyDown:_,tabIndex:v,style:y,...b}=e,x=Or(f),{active:S,lastUsedThumbIndex:C,controlRef:w,disabled:T,validation:E,format:D,handleInputChange:O,inset:k,isArrayValue:A,labelId:j,largeStep:M,locale:N,max:P,min:F,minStepsBetweenValues:I,form:L,name:R,orientation:z,pressedThumbCenterOffsetRef:B,pressedThumbIndexRef:V,renderBeforeHydration:H,setActive:ee,setIndicatorPosition:te,state:U,step:ne,thumbRefs:re,values:ie}=l_(),ae=Id(),oe=l||T,se=ie.length>1,ce=z===`vertical`,le=ae===`rtl`,{setTouched:ue,validationMode:de}=br(),fe=Y.useRef(null),W=Y.useRef(null),pe=so(oe,W),me=Y.useRef(!1),he=G(e=>{me.current||g?.(e)}),ge=G(e=>{me.current||h?.(e)}),_e=Or(),ve=Pr(),ye=se?_e:ve,{ref:xe,index:Se}=ap({metadata:Y.useMemo(()=>({inputId:ye}),[ye])}),K=se?p??Se:0,we=K===ie.length-1,Te=ie[K],Ee=jg(Te,F,P),[De,Oe]=Y.useState(),ke=gp(),Ae=C>=0&&C<ie.length?C:-1,je=G(()=>{let e=w.current,t=fe.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=ce?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*Ee/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;Oe(s),K===0?te(e=>[s,e[1]]):we&&te(e=>[e[0],s])});J(()=>{k&&queueMicrotask(je)},[je,k]),J(()=>{k&&je()},[je,k,Ee]),J(()=>{if(!k)return;let e=w.current,t=fe.current;if(!e||!t)return;let n=Ce(e).ResizeObserver;if(typeof n!=`function`)return;let r=new n(je);return r.observe(e),r.observe(t),()=>{r.disconnect()}},[w,je,k]);let Me=ce?`bottom`:`insetInlineStart`,Pe=ce?`left`:`top`,Fe;se?S===K?Fe=2:Ae===K&&(Fe=1):S===K&&(Fe=1);let Ie;Ie=!k&&!Number.isFinite(Ee)?ts:{position:`absolute`,[Me]:k?`var(--position)`:`${Ee}%`,[Pe]:`50%`,translate:`${(ce||!le?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:Fe,...k&&{"--position":`${De??0}%`,visibility:H&&ke||De===void 0?`hidden`:void 0}};let Le;ce&&(Le=le?`vertical-rl`:`vertical-lr`);let Re=typeof u==`function`?u(K):o,ze=Ne({"aria-label":Re,"aria-labelledby":s??(Re==null?j:void 0),"aria-describedby":a,"aria-orientation":z,"aria-valuenow":Te,"aria-valuetext":typeof d==`function`?d(Ag(Te,N,D),Te,K):c??E_(ie,K,D,N),disabled:oe,form:L,id:ye,max:P,min:F,name:R,onChange(e){O(e.currentTarget.valueAsNumber,K,e)},onFocus(e){let t=me.current;me.current=!1,ee(K),pe(!0),t&&e.stopPropagation()},onBlur(e){me.current?e.stopPropagation():(ee(-1),!re.current.some(t=>Z(t,e.relatedTarget))&&(ue(!0),pe(!1),de===`onBlur`&&E.commit(i_(Te,K,F,P,A,ie))))},onKeyDown(e){if(e.defaultPrevented||!T_.has(e.key))return;Eu.has(e.key)&&e.stopPropagation();let t=null,n=0,r=e.shiftKey?M:ne,i=h_(Te,ne,F);switch(e.key){case yu:n=1;break;case Su:n=le?-1:1;break;case bu:n=-1;break;case xu:n=le?1:-1;break;case wu:r=M,n=1;break;case Tu:r=M,n=-1;break;case`End`:t=se&&Number.isFinite(ie[K+1])?ie[K+1]-ne*I:P;break;case Cu:t=se&&Number.isFinite(ie[K-1])?ie[K-1]+ne*I:F}if(n!==0&&(t=D_(i,r,n,F,P)),t!==null){let n=e.currentTarget;Ai(n)||(me.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),O(t,K,e),e.preventDefault()}},step:ne,style:{...ts,width:`100%`,height:`100%`,writingMode:Le},tabIndex:v,type:`range`,value:Te??``},e=>E.getValidationProps(oe,e),{onFocus:he,onBlur:ge,onKeyDown:_}),Be=be(W,E.inputRef,m);return q(`div`,e,{state:U,ref:[t,xe,fe],props:[{[C_]:K,children:(0,X.jsxs)(Y.Fragment,{children:[r,(0,X.jsx)(`input`,{ref:Be,...ze,suppressHydrationWarning:!0}),k&&we&&H&&(w_||=(0,X.jsx)(bp,{script:``}))]}),id:x,onPointerDown(e){if(oe)return;V.current=K;let t=p_(e.currentTarget,ce);B.current=(ce?e.clientY:e.clientX)-t},style:Ie,suppressHydrationWarning:H||void 0},b],stateAttributesMapping:s_})});function k_(e,t,n,r,i,a){let o={visibility:a||n&&(r===void 0||t&&i===void 0)?`hidden`:void 0,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`},s=`${r??0}%`,c=`${(i??0)-(r??0)}%`;return n&&(o[`--start-position`]=s,s=`var(--start-position)`,t&&(o[`--relative-size`]=c,c=`var(--relative-size)`)),o[e?`bottom`:`insetInlineStart`]=t?s:0,o[e?`height`:`width`]=t?c:s,o}var A_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=l_(),m=gp(),h=k_(u===`vertical`,p.length>1,s,s?o[0]:jg(p[0],l,c),s?o[1]:jg(p[p.length-1],l,c),s&&d&&m);return q(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:h,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:s_})});function j_({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=Array.isArray(n)?n:Array.isArray(t)?t:[r,i];return(0,X.jsx)(d_,{className:K(`data-horizontal:w-full data-vertical:h-full`,e),"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,thumbAlignment:`edge`,...a,children:(0,X.jsxs)(x_,{className:`relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col`,children:[(0,X.jsx)(S_,{"data-slot":`slider-track`,className:`relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1`,children:(0,X.jsx)(A_,{"data-slot":`slider-range`,className:`bg-primary select-none data-horizontal:h-full data-vertical:w-full`})}),Array.from({length:o.length},(e,t)=>(0,X.jsx)(O_,{"data-slot":`slider-thumb`,className:`relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50`},t))]})})}function M_({options:e,onChange:t,portalRoot:n}){let r=Math.round(e.masterVolume*100),i=x(e.lighting),a=e=>t({lighting:{...i,...e}});return(0,X.jsxs)(`section`,{className:`min-h-full space-y-3 px-3 py-2.5 text-xs`,children:[(0,X.jsxs)(`section`,{"aria-label":`Rendering and sound`,className:`joy-pause-settings-main`,children:[(0,X.jsxs)(`label`,{children:[`Quality`,(0,X.jsx)(N_,{container:n,value:e.quality,onChange:e=>t({quality:e}),choices:[`high`,`medium`,`low`]})]}),(0,X.jsxs)(`label`,{children:[`Smoke`,(0,X.jsx)(N_,{container:n,value:e.smokeTint,onChange:e=>t({smokeTint:e}),choices:[`natural`,`cyan`,`magenta`]})]}),(0,X.jsxs)(`label`,{children:[`Surface`,(0,X.jsx)(N_,{container:n,value:e.surfaceTone,onChange:e=>t({surfaceTone:e}),choices:[`auto`,`light`,`dark`]})]}),(0,X.jsxs)(`label`,{children:[`Speed zoom`,(0,X.jsx)(N_,{container:n,value:String(e.speedZoom),onChange:e=>t({speedZoom:e===`auto`?`auto`:e===`true`}),choices:[`auto`,`true`,`false`],labels:{true:`On`,false:`Off`}})]}),(0,X.jsxs)(`label`,{children:[`Viewport`,(0,X.jsx)(N_,{container:n,value:e.viewportMode,onChange:e=>t({viewportMode:e}),choices:[`fixed`,`absolute`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Audio`,className:`joy-pause-audio`,children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Audio`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(j_,{"aria-label":`Volume`,value:[r],onValueChange:e=>t({masterVolume:Number(Array.isArray(e)?e[0]:e)/100}),min:0,max:100}),(0,X.jsxs)(`output`,{children:[r,`%`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Vehicle effects`,className:`space-y-1.5`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`Effects`}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-2.5 gap-y-1.5 [&_label]:flex [&_label]:items-center [&_label]:gap-1.5 [&_label]:text-muted-foreground`,children:[(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.idleSound,onCheckedChange:e=>t({idleSound:e})}),`Idle sound`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.sparks,onCheckedChange:e=>t({sparks:e})}),`Collision sparks`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.screenShake,onCheckedChange:e=>t({screenShake:e})}),`Screen shake`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.deform,onCheckedChange:e=>t({deform:e})}),`Deformation`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.showVehicleMarkers,onCheckedChange:e=>t({showVehicleMarkers:e})}),`Vehicle markers`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.weaponCooldown,onCheckedChange:e=>t({weaponCooldown:e})}),`Tool cooldown`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`World settings`,className:`space-y-1.5`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`World`}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-2.5 gap-y-1.5 [&_label]:flex [&_label]:items-center [&_label]:gap-1.5 [&_label]:text-muted-foreground`,children:[(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.viewportWalls,onCheckedChange:e=>t({viewportWalls:e})}),`Viewport walls`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.debug,onCheckedChange:e=>t({debug:e})}),`Diagnostics`]})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5 py-1`,children:[(0,X.jsxs)(`label`,{className:`flex items-center justify-between gap-3 font-medium`,children:[`Auto paint`,(0,X.jsx)(n_,{"aria-label":`Auto paint`,checked:e.autoPaint??!1,onCheckedChange:e=>t({autoPaint:e})})]}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`Pick up paint from small, colored backgrounds. Neutral shades, images, and large containers are excluded.`})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Experiments`,className:`space-y-3`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Experiments`}),(0,X.jsxs)(`label`,{className:`flex items-center justify-between font-semibold`,children:[`Show HUD`,(0,X.jsx)(n_,{checked:e.showHud,onCheckedChange:e=>t({showHud:e}),"aria-label":`Show HUD`})]}),(0,X.jsxs)(`div`,{className:`grid gap-2 text-muted-foreground`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(zf,{checked:e.showTotalPoints,onCheckedChange:e=>t({showTotalPoints:e})}),`Show total points`]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-2 has-disabled:opacity-50`,children:[(0,X.jsx)(zf,{disabled:e.showHud,checked:!e.showHud&&e.showHealthBars,onCheckedChange:e=>t({showHealthBars:e})}),`Show mini health bar`]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-2 has-disabled:opacity-50`,children:[(0,X.jsx)(zf,{disabled:e.showHud,checked:!e.showHud&&e.showWeaponBar,onCheckedChange:e=>t({showWeaponBar:e})}),`Show mini ammo bar`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Vehicle lights`,className:`space-y-2`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`Lights`}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,X.jsx)(zf,{checked:i.underglow,onCheckedChange:e=>a({underglow:e})}),`Underglow `,(0,X.jsx)(`kbd`,{className:`ml-auto`,children:`U`})]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[`Colour`,(0,X.jsx)(Po,{type:`color`,"aria-label":`Underglow colour`,value:i.underglowColor,onInput:e=>a({underglowColor:e.currentTarget.value}),onChange:e=>a({underglowColor:e.target.value}),className:`h-6 w-10 p-0.5`})]}),(0,X.jsxs)(`label`,{className:`col-span-2 grid gap-1 text-muted-foreground`,children:[`Glow opacity · `,Math.round(i.underglowOpacity*100),`%`,(0,X.jsx)(j_,{"aria-label":`Underglow opacity`,min:0,max:100,value:[Math.round(i.underglowOpacity*100)],onValueChange:e=>a({underglowOpacity:Number(Array.isArray(e)?e[0]:e)/100})})]})]}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`Headlights work automatically on dark surfaces. Brake lights work in daylight, too.`})]})]})}function N_({value:e,onChange:t,choices:n,labels:r,container:i}){return(0,X.jsxs)(cg,{value:e,onValueChange:e=>t(String(e)),children:[(0,X.jsx)(ug,{className:`w-full text-sm`,children:(0,X.jsx)(lg,{children:r?.[e]??e[0].toUpperCase()+e.slice(1)})}),(0,X.jsx)(dg,{container:i,children:n.map(e=>(0,X.jsx)(fg,{value:e,children:r?.[e]??e[0].toUpperCase()+e.slice(1)},e))})]})}function P_({tools:e}){return(0,X.jsx)(`section`,{className:`min-h-full px-4 py-3 text-sm`,children:(0,X.jsxs)(Ap,{defaultValue:`keyboard`,className:`gap-3`,children:[(0,X.jsxs)(Mp,{className:`w-full`,"aria-label":`Input device`,children:[(0,X.jsx)(Np,{value:`keyboard`,className:`text-sm`,children:`Keyboard`}),(0,X.jsx)(Np,{value:`gamepad`,disabled:!0,className:`text-sm`,children:`Gamepad`})]}),(0,X.jsx)(Pp,{value:`keyboard`,className:`grid grid-cols-1 gap-x-5 gap-y-2 min-[601px]:grid-cols-2`,children:C.filter(t=>!r.some(e=>e.id===t.id)||e.some(e=>e.id===t.id)).map(e=>(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2 border-b border-border/60 py-1`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,X.jsx)(`kbd`,{className:`shrink-0 font-mono text-xs font-semibold text-foreground`,children:e.keys.join(` / `)})]},e.id))})]})})}function F_({tools:e,allowEditing:t}){return(0,X.jsxs)(`section`,{className:`min-h-full space-y-3 px-3 py-2.5 text-xs`,children:[(0,X.jsx)(`h2`,{className:`font-mono text-xs font-semibold uppercase`,children:`Tools`}),(0,X.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Hold a shortcut while driving.`,t&&` Tool settings are in the vehicle editor.`]}),(0,X.jsx)(`div`,{className:`grid gap-1.5`,children:e.map(e=>(0,X.jsxs)(`div`,{className:`joy-pause-tool flex items-center gap-2 rounded-sm border border-border px-2 py-1.5`,children:[(0,X.jsx)(`kbd`,{className:`grid h-6 min-w-6 place-items-center rounded-sm bg-muted px-1 font-mono font-semibold`,children:e.keys.join(` / `)}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline justify-between gap-2`,children:[(0,X.jsx)(`span`,{className:`font-semibold`,children:e.label}),(0,X.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e.description})]})]},e.id))}),!e.length&&(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`No tools are enabled for this world.`})]})}var I_=Object.freeze([]),L_=()=>I_,R_=()=>()=>{};function z_({objects:e,onReveal:t,onDriveTo:n,onReset:r}){let i=(0,Y.useSyncExternalStore)(e?.subscribe??R_,e?.getSnapshot??L_,L_),[a,o]=(0,Y.useState)(``),[s,c]=(0,Y.useState)(`all`),[l,u]=(0,Y.useState)(``),d=[...new Set([...i.flatMap(e=>e.capabilities),...s===`all`?[]:[s]])].sort(),f=a.trim().toLowerCase(),p=i.filter(e=>(s===`all`||e.capabilities.includes(s))&&[e.name,e.id,e.element,...e.capabilities].join(` `).toLowerCase().includes(f)),m=n=>{e?.getTarget(n.id)?(t(),requestAnimationFrame(()=>e.reveal(n.id))):u(`That object is no longer available.`)},h=t=>{let r=e?.getTarget(t.id);r?n?.(r):u(`That object is no longer available.`)};return(0,X.jsxs)(`section`,{"aria-label":`Scene objects`,className:`min-h-full space-y-4 px-3 py-3 text-xs`,children:[(0,X.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`h2`,{className:`text-sm font-semibold`,children:[i.length,` active `,i.length===1?`object`:`objects`]}),(0,X.jsx)(`p`,{className:`mt-1.5 leading-relaxed text-muted-foreground`,children:`Show highlights an object on the page. Drive to makes a short skid toward it. Reset restores that object; remove leaves the HTML in place.`})]}),(0,X.jsx)(De,{variant:`ghost`,size:`sm`,className:`shrink-0 text-[11px]`,onClick:()=>{r(),u(`Scene reset.`)},children:`Reset scene`})]}),(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[(0,X.jsx)(Po,{"aria-label":`Search scene objects`,placeholder:`Find an object…`,value:a,onChange:e=>{o(e.target.value),u(``)},className:`h-8 min-w-0 flex-1 text-xs`}),(0,X.jsxs)(Bf,{"aria-label":`Object type`,size:`sm`,value:s,onChange:e=>{c(e.target.value),u(``)},children:[(0,X.jsx)(Vf,{value:`all`,children:`All types`}),d.map(e=>(0,X.jsx)(Vf,{value:e,children:e},e))]})]}),(0,X.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:`min-h-4 text-[10px] text-muted-foreground`,children:l||(a||s!==`all`?`${p.length} of ${i.length} objects`:`Live objects from this simulation`)}),p.length?(0,X.jsx)(`ul`,{"aria-label":`Active scene objects`,className:`divide-y divide-border`,children:p.map(t=>(0,X.jsxs)(`li`,{"data-object-id":t.id,className:`flex items-center gap-2 py-3`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,X.jsx)(`span`,{className:`relative flex size-12 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted/40`,style:{backgroundColor:t.preview.image&&!t.preview.image.startsWith(`data:image/svg+xml`)?`#e4e7e9`:t.preview.image?void 0:t.preview.color},children:t.preview.image?(0,X.jsx)(`img`,{src:t.preview.image,alt:``,loading:`lazy`,className:`size-full object-contain p-1`,onError:e=>{e.currentTarget.style.visibility=`hidden`}}):t.preview.text?(0,X.jsx)(`span`,{className:`px-1 text-center text-[9px] font-semibold leading-tight text-foreground [text-shadow:0_0_3px_var(--background)]`,children:t.preview.text}):(0,X.jsx)(vt,{size:19,className:`text-muted-foreground`})}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`span`,{className:`flex items-center gap-1.5`,children:(0,X.jsx)(`strong`,{className:`truncate text-xs font-semibold`,children:t.name})}),(0,X.jsxs)(`span`,{className:`mt-1 flex flex-wrap gap-x-2 gap-y-1 text-[9px] text-muted-foreground`,title:t.id,children:[(0,X.jsx)(`code`,{children:t.element}),t.state!==`Active`&&(0,X.jsx)(`span`,{children:t.state})]}),(0,X.jsx)(`span`,{className:`mt-1.5 flex flex-wrap gap-1`,children:t.capabilities.map(e=>(0,X.jsx)(`span`,{className:`rounded-sm bg-muted px-1.5 py-0.5 text-[9px] text-muted-foreground`,children:e},e))})]})]}),(0,X.jsxs)(`div`,{className:`flex shrink-0 gap-0.5`,children:[(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,"aria-label":`Show ${t.name} (${t.id})`,title:`Show object`,onClick:()=>m(t),children:(0,X.jsx)(B,{size:15})}),n&&(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,"aria-label":`Drive to ${t.name} (${t.id})`,title:`Drive to object`,onClick:()=>h(t),children:(0,X.jsx)(lt,{size:15})}),(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,disabled:!t.resettable,"aria-label":`Reset ${t.name} (${t.id})`,title:`Reset object`,onClick:()=>u(e?.reset(t.id)?`Reset ${t.name}.`:`That object is no longer available.`),children:(0,X.jsx)(st,{size:15})}),(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove ${t.name} (${t.id}) from simulation`,title:`Remove from simulation`,onClick:()=>u(e?.remove(t.id)?`Removed ${t.name} from the simulation.`:`That object is no longer available.`),children:(0,X.jsx)(z,{size:15})})]})]},t.id))}):(0,X.jsxs)(`div`,{className:`rounded-lg border border-dashed p-8 text-center leading-relaxed text-muted-foreground`,children:[(0,X.jsx)(vt,{size:24,className:`mx-auto mb-3 opacity-50`}),i.length?`No objects match those filters.`:e?`No active objects in this scene yet.`:`Start a playground to inspect its objects here.`]})]})}var B_={audio:[{key:`masterVolume`,label:`Master volume`,kind:`number`,min:0,max:1,step:.05},{key:`idleSound`,label:`Engine idle audio`,kind:`toggle`}],rendering:[{key:`quality`,label:`Fluid quality`,kind:`select`,choices:[`low`,`medium`,`high`]},{key:`smokeTint`,label:`Smoke tint`,kind:`select`,choices:[`natural`,`cyan`,`magenta`]},{key:`surfaceTone`,label:`Surface tone`,kind:`select`,choices:[`auto`,`light`,`dark`]},{key:`sparks`,label:`Sparks`,kind:`toggle`},{key:`deform`,label:`Deformation`,kind:`toggle`},{key:`screenShake`,label:`Screen shake`,kind:`toggle`},{key:`debug`,label:`Debug overlay`,kind:`toggle`}],policy:[{key:`weaponCooldown`,label:`Tool cooldown`,kind:`toggle`},{key:`vehicleDestructible`,label:`Vehicle damage`,kind:`toggle`},{key:`weaponsEnabled`,label:`Action tools`,kind:`toggle`},{key:`rocketBlastStrength`,label:`Rocket blast strength`,kind:`number`,min:0,max:10,step:.1}],ui:[{key:`showHud`,label:`HUD`,kind:`toggle`},{key:`showTotalPoints`,label:`Total points`,kind:`toggle`},{key:`showHealthBars`,label:`Health bars`,kind:`toggle`},{key:`showVehicleMarkers`,label:`Offscreen car pointer`,kind:`toggle`},{key:`showWeaponBar`,label:`Tool reserve bar`,kind:`toggle`},{key:`showLogo`,label:`Joy Ride logo`,kind:`toggle`},{key:`showGithub`,label:`GitHub link`,kind:`toggle`},{key:`allowVehicleEditing`,label:`Vehicle editing`,kind:`toggle`},{key:`brandName`,label:`Brand name`,kind:`text`},{key:`brandColor`,label:`Brand color`,kind:`text`}],camera:[{key:`viewportWalls`,label:`Viewport walls`,kind:`toggle`},{key:`viewportMode`,label:`Canvas placement`,kind:`select`,choices:[`fixed`,`absolute`]},{key:`speedZoom`,label:`Speed zoom`,kind:`select`,choices:[`auto`,`on`,`off`]}],lighting:[{key:`underglow`,label:`Underglow`,kind:`toggle`},{key:`underglowColor`,label:`Underglow color`,kind:`color`},{key:`underglowOpacity`,label:`Underglow opacity`,kind:`number`,min:0,max:1,step:.05},{key:`headlights`,label:`Headlights`,kind:`toggle`},{key:`taillights`,label:`Taillights`,kind:`toggle`},{key:`brakeLights`,label:`Brake lights`,kind:`toggle`}]};function V_({value:e,onChange:t}){let n=b(l(o,e)),i=(e,t)=>n[e][t],s=(n,r,i)=>t({...e,[n]:{...e[n],[r]:i}});return(0,X.jsxs)(`section`,{"aria-label":`Embed options`,className:`space-y-3 py-3 text-xs`,children:[(0,X.jsx)(`p`,{className:`text-muted-foreground leading-relaxed`,children:`These options control the embedded ride. Choose a starting point, then customize it.`}),(0,X.jsx)(`button`,{type:`button`,className:`rounded border px-2 py-1`,onClick:()=>t({...e,policy:{...e.policy,...a.policy},ui:{...e.ui,...a.ui}}),children:`Use safe for work defaults`}),(0,X.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[`Auto paint`,(0,X.jsx)(n_,{checked:n.autoPaint,onCheckedChange:n=>t({...e,autoPaint:n})})]}),Object.keys(B_).map(e=>(0,X.jsxs)(`details`,{className:`rounded border px-2 py-2`,children:[(0,X.jsx)(`summary`,{className:`cursor-pointer font-medium capitalize`,children:e}),(0,X.jsxs)(`div`,{className:`space-y-2 pt-3`,children:[B_[e].map(t=>{let n=i(e,t.key);return(0,X.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[t.label,t.kind===`toggle`?(0,X.jsx)(n_,{checked:!!n,onCheckedChange:n=>s(e,t.key,n)}):t.kind===`select`?(0,X.jsx)(`select`,{"aria-label":t.label,className:`rounded border bg-background px-2 py-1`,value:t.key===`speedZoom`&&n!==`auto`?n?`on`:`off`:String(n),onChange:n=>s(e,t.key,t.key===`speedZoom`?n.target.value===`auto`?`auto`:n.target.value===`on`:n.target.value),children:t.choices?.map(e=>(0,X.jsx)(`option`,{value:e,children:e},e))}):(0,X.jsx)(`input`,{"aria-label":t.label,className:`w-28 rounded border bg-background px-2 py-1`,type:t.kind,min:t.min,max:t.max,step:t.step,value:String(n??``),onChange:n=>s(e,t.key,t.kind===`number`?Number(n.target.value):n.target.value)})]},t.key)}),e===`policy`&&(0,X.jsxs)(`fieldset`,{children:[(0,X.jsx)(`legend`,{className:`font-medium`,children:`Available tools`}),(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-1`,children:r.map(t=>(0,X.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(zf,{checked:n.policy.enabledTools?.includes(t.id)??!1,onCheckedChange:r=>s(e,`enabledTools`,r?[...n.policy.enabledTools??[],t.id]:n.policy.enabledTools?.filter(e=>e!==t.id))}),t.label]},t.id))})]}),e===`ui`&&(0,X.jsxs)(`fieldset`,{children:[(0,X.jsx)(`legend`,{className:`font-medium`,children:`Visible tabs`}),(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-1`,children:u.map(t=>(0,X.jsxs)(`label`,{className:`flex items-center gap-2 capitalize`,children:[(0,X.jsx)(zf,{checked:n.ui.vehicleTabs.includes(t),onCheckedChange:r=>s(e,`vehicleTabs`,r?[...n.ui.vehicleTabs,t]:n.ui.vehicleTabs.filter(e=>e!==t))}),t===`weapons`?`Tools`:t]},t))})]})]})]},e))]})}function H_({embed:e}){let[t,n]=(0,Y.useState)(`html`),r={html:{code:e.html,language:`html`,title:`HTML embed`},async:{code:e.async,language:`javascript`,title:`Async CDN`},npm:{code:e.npm,language:`javascript`,title:`npm module`},bookmarklet:{code:e.bookmarklet,language:`javascript`,title:`Bookmarklet URL`}}[t];return(0,X.jsxs)(`section`,{className:`min-h-full px-3 py-2.5 text-sm`,children:[e.configuration&&e.onConfigure&&(0,X.jsx)(V_,{value:e.configuration,onChange:e.onConfigure}),e.error?(0,X.jsx)(`p`,{role:`alert`,children:e.error}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ap,{value:t,onValueChange:e=>n(e),className:`my-2.5 gap-0`,children:(0,X.jsxs)(Mp,{className:`w-full`,"aria-label":`Embed format`,children:[(0,X.jsx)(Np,{value:`html`,className:`text-sm`,children:`HTML`}),(0,X.jsx)(Np,{value:`async`,className:`text-sm`,children:`Async CDN`}),(0,X.jsx)(Np,{value:`npm`,className:`text-sm`,children:`npm`}),(0,X.jsx)(Np,{value:`bookmarklet`,className:`text-sm`,children:`Bookmarklet`})]})}),(0,X.jsx)(lr,{code:r.code,language:r.language,title:r.title,compact:!0,maxHeight:210,wrap:t===`bookmarklet`})]})]})}var U_=`${T(M)}\n${bg}\n${xg}\n${Sg}`,W_=(0,Y.lazy)(()=>F(()=>import(`./Documentation-BLhgtEUK.js`).then(e=>({default:e.Documentation})),__vite__mapDeps([0,1,2]),import.meta.url));function G_({color:e}){return(0,X.jsxs)(`svg`,{viewBox:`0 0 180 74`,"aria-hidden":`true`,children:[(0,X.jsx)(`rect`,{x:`15`,y:`9`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`15`,y:`55`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`136`,y:`9`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`136`,y:`55`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`11`,y:`13`,width:`158`,height:`48`,rx:`19`,fill:e}),(0,X.jsx)(`rect`,{x:`58`,y:`18`,width:`69`,height:`38`,rx:`12`,fill:`#35454a`})]})}function K_({children:e,...t}){return(0,X.jsx)(`div`,{...t,children:e})}var q_={vehicle:{title:`Vehicle`,icon:lt,description:`Choose your ride.`},objects:{title:`Objects`,icon:vt,description:`Everything in this playground. Find it, reset it, or take it out.`},ai:{title:`AI`,icon:Et,description:`Give the other cars a brain.`},weapons:{title:`Tools`,icon:_t,description:`A few ways to make a mess.`},settings:{title:`Settings`,icon:bt,description:`Tune your ride.`},controls:{title:`Controls`,icon:St,description:`Get to know the controls.`},embed:{title:`Embed`,icon:ht,description:`Choose your embed options, then copy the code.`},documentation:{title:`Documentation`,icon:ct,description:`The complete API reference. Start small, build anything.`}};function J_({muted:e}){return e?(0,X.jsx)(D,{"aria-hidden":`true`}):(0,X.jsx)(N,{"aria-hidden":`true`})}function Y_(e){return(0,X.jsx)(X_,{...e,appearance:c(e)})}function X_({appearance:e,frame:t,preset:n,slots:r,presets:i,options:a,onSelectPreset:o,onSavePreset:c,onDeletePreset:l,onChange:d,onClose:f,onQuit:p,onReset:m,initialTab:h=`vehicle`,embed:g,recording:_,ai:v,objects:y,onDriveToObject:b}){let x=t??K_,[S,C]=(0,Y.useState)(h),[w,T]=(0,Y.useState)({chapter:``,anchor:``}),[E,D]=(0,Y.useState)(!1),O=e.allowVehicleEditing&&E,k=(0,Y.useRef)(e.allowVehicleEditing);k.current=e.allowVehicleEditing,(0,Y.useEffect)(()=>{e.allowVehicleEditing||D(!1)},[e.allowVehicleEditing]);let[A,j]=(0,Y.useState)(!1),[M,N]=(0,Y.useState)(!1),P=(0,Y.useRef)(a.masterVolume||1),F=u.filter(t=>e.vehicleTabs.includes(t)&&(t!==`ai`||!!v)&&(t!==`embed`||!!g)),L=F.includes(S)?S:F[0]??`vehicle`,{portalRoot:R,dialogRef:z,placement:B,dragging:V,headerProps:H}=Eg({styles:U_,size:O?{width:960,height:620}:L===`documentation`?{width:1040,height:720}:{width:760,height:600},onEscape:()=>{O?D(!1):f()},onReset:m,onRecordShortcut:_.onRecordShortcut,shortcutsEnabled:L!==`documentation`}),te=s(a.enabledTools??e.enabledTools,a.weaponsEnabled??e.weaponsEnabled,r),U=Math.round(a.masterVolume*100),ne=v?.cars.find(e=>e.id===v.selectedId),re=L===`ai`&&ne?ne.name||`AI ${ne.id.split(`-`).at(-1)}`:n.name;(0,Y.useEffect)(()=>{a.masterVolume>0&&(P.current=a.masterVolume)},[a.masterVolume]),(0,Y.useEffect)(()=>C(h),[h]);let ie={...B,pointerEvents:`auto`,...e.brandColor?{"--joy-ride-brand-color":e.brandColor}:{}},ae=()=>d({masterVolume:a.masterVolume>0?0:P.current});return R?(0,X.jsxs)(X.Fragment,{children:[(0,kt.createPortal)((0,X.jsx)(`div`,{"data-jr-ui":``,"aria-hidden":`true`,onClick:e=>{e.stopPropagation(),f()},style:{position:`fixed`,inset:0,zIndex:ee(`backdrop`),pointerEvents:`auto`,background:`#11182766`,backdropFilter:`blur(5px)`}}),document.body),(0,kt.createPortal)((0,X.jsx)(X.Fragment,{children:(0,X.jsx)(`div`,{ref:z,"data-jr-ui":``,className:`joy-pause-menu`,"data-documentation":L===`documentation`&&!O||void 0,role:`dialog`,"aria-label":`${e.brandName??`Joy Ride pause menu`} — ${re}`,"aria-modal":`true`,tabIndex:-1,style:ie,onPointerEnter:()=>N(!0),onPointerLeave:()=>N(!1),children:(0,X.jsx)(x,{className:`joy-pause-frame rounded-xl`,children:(0,X.jsxs)(_f,{keyboardShortcut:!1,className:`joy-pause-layout`,style:{"--sidebar-width":`var(--pause-sidebar-width)`},children:[(0,X.jsxs)(vf,{collapsible:`none`,className:`joy-pause-sidebar`,children:[(0,X.jsx)(yf,{className:`joy-pause-brand`,children:e.showLogo?(0,X.jsx)(`div`,{className:`joy-pause-logo-backing`,children:(0,X.jsx)(vg,{className:`joy-pause-logo`,hovered:M})}):(0,X.jsx)(`strong`,{className:`joy-pause-brand-name`,children:e.brandName??`Vehicle settings`})}),(0,X.jsx)(xf,{children:(0,X.jsx)(Sf,{children:(0,X.jsx)(`nav`,{"aria-label":`Vehicle configuration`,children:(0,X.jsx)(Cf,{children:F.map(e=>{let t=q_[e].icon;return(0,X.jsx)(wf,{children:(0,X.jsxs)(Ef,{size:`default`,isActive:L===e&&!O,"aria-current":L===e&&!O?`page`:void 0,title:q_[e].title,onClick:()=>{C(e),D(!1)},children:[(0,X.jsx)(t,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:q_[e].title})]})},e)})})})})}),(0,X.jsxs)(bf,{className:`joy-pause-sidebar-footer`,children:[(0,X.jsxs)(`div`,{className:`joy-pause-selected-vehicle`,"aria-label":`Selected vehicle: ${n.name}`,children:[n.image?(0,X.jsx)(`div`,{className:`joy-pause-selected-image`,children:(0,X.jsx)(`img`,{src:n.image.src,alt:``})}):(0,X.jsx)(G_,{color:n.visual?.color??`#838c8f`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`strong`,{children:n.name}),(0,X.jsx)(`span`,{children:[n.make,n.year].filter(Boolean).join(` · `)})]})]}),e.showGithub&&(0,X.jsx)(yg,{})]})]}),(0,X.jsxs)(`div`,{className:`joy-pause-workspace`,children:[(0,X.jsxs)(`header`,{className:`joy-pause-header`,"data-unbranded":e.showLogo?void 0:``,role:`group`,tabIndex:0,"aria-label":`Move pause menu. Drag or use arrow keys; Home centers it.`,"data-dragging":V||void 0,...H,children:[(0,X.jsxs)(`div`,{className:`joy-pause-heading`,children:[(0,X.jsx)(`h1`,{children:O?A?`New vehicle`:`Edit vehicle`:q_[L].title}),(0,X.jsx)(`p`,{children:O?n.name:q_[L].description})]}),(0,X.jsxs)(`div`,{className:`joy-pause-header-actions`,children:[(0,X.jsx)(De,{variant:`outline`,size:`icon`,onClick:ae,"aria-label":a.masterVolume?`Mute audio`:`Unmute audio`,title:`${a.masterVolume?`Mute`:`Unmute`} audio (${U}%)`,children:(0,X.jsx)(J_,{muted:!a.masterVolume})}),(0,X.jsx)(De,{variant:`outline`,size:`icon`,onClick:O?()=>D(!1):f,"aria-label":`Close vehicle settings`,children:(0,X.jsx)(I,{})})]})]}),(0,X.jsxs)(`div`,{className:`joy-pause-content`,children:[O?(0,X.jsx)(Rm,{enabledTools:te.map(e=>e.id),preset:n,createNew:A,garage:i,onSave:e=>{k.current&&(c(e),D(!1))},onDelete:e=>{k.current&&(l(e),D(!1))},onClose:()=>D(!1)},`${n.id}:${A}`):(0,X.jsx)(`div`,{className:`joy-pause-body min-h-0 flex-1`,children:(0,X.jsxs)(`div`,{className:`joy-pause-panels min-h-0 flex-1 overflow-auto`,"data-documentation":L===`documentation`||void 0,children:[L===`documentation`&&(0,X.jsx)(Y.Suspense,{fallback:(0,X.jsx)(`p`,{role:`status`,className:`p-5 text-muted-foreground`,children:`Loading API reference…`}),children:(0,X.jsx)(W_,{location:w,onNavigate:T})}),L===`vehicle`&&(0,X.jsx)(Jg,{preset:n,presets:i,options:a,tools:te,allowEditing:e.allowVehicleEditing,onSelectPreset:o,onSavePreset:c,onEdit:e=>{j(e),D(!0)}}),L===`objects`&&(0,X.jsx)(z_,{objects:y,onReveal:f,onDriveTo:b,onReset:m}),v&&L===`ai`&&(0,X.jsx)(`section`,{className:`min-h-full`,children:(0,X.jsx)(_g,{state:v,presets:i,defaultPresetId:n.id,portalRoot:R})}),L===`settings`&&(0,X.jsx)(M_,{options:a,onChange:d,portalRoot:R}),L===`controls`&&(0,X.jsx)(P_,{tools:te}),L===`weapons`&&(0,X.jsx)(F_,{tools:te,allowEditing:e.allowVehicleEditing}),g&&L===`embed`&&(0,X.jsx)(H_,{embed:g})]})}),!O&&(0,X.jsx)(`footer`,{className:`joy-pause-footer`,children:(0,X.jsxs)(`div`,{className:`joy-pause-footer-actions`,children:[(0,X.jsx)(De,{type:`button`,variant:`outline`,onClick:p,children:`Quit`}),(0,X.jsx)(De,{type:`button`,onClick:f,children:`Close`})]})})]})]})]})})})}),R)]}):null}export{Y_ as VehiclePopover,ut as n,lr as t};
|
|
21
|
+
`:null]},t)):e})}),(0,X.jsx)(`span`,{className:`joy-code-status`,role:`status`,"data-error":g||void 0,children:g?`Copy unavailable. Select the code to copy it.`:_?`Code copied.`:``})]})}function ur(e){return q(e.defaultTagName??`div`,e,e)}var dr=768;function fr(){let[e,t]=Y.useState(void 0);return Y.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<dr)};return e.addEventListener(`change`,n),t(window.innerWidth<dr),()=>e.removeEventListener(`change`,n)},[]),!!e}var pr=`data-valid`,mr=`data-invalid`,hr={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},gr={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},_r={valid(e){return e===null?null:e?{[pr]:``}:{[mr]:``}}},vr={invalid:void 0,name:void 0,validityData:{state:hr,errors:[],error:``,value:``,initialValue:null},setValidityData:Me,disabled:void 0,setTouched:Me,setDirty:Me,setFilled:Me,setFocused:Me,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:gr,registerFieldControl:Me,validation:{getValidationProps:(e,t=Te)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Me,getInputControl:()=>null,commit:async()=>{},change:Me}},yr=Y.createContext(vr);function br(e=!0){let t=Y.useContext(yr);if(t.setValidityData===Me&&!e)throw Error(ge(28));return t}var xr=Y.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:`onSubmit`,submitCountRef:{current:0}});function Sr(){return Y.useContext(xr)}function Cr(){let[,e]=Y.useState({});return Y.useCallback(()=>{e({})},[])}var wr=0;function Tr(e,t=`mui`){let n=Y.useRef(void 0),r=Cr(),i=e??n.current;return Y.useEffect(()=>{n.current??(wr+=1,n.current=`${t}-${wr}`,e??r())},[e,t,r]),i}var Er=pe.useId;function Dr(e,t){if(Er!==void 0){let n=Er();return e??(t?`${t}-${n}`:n)}return Tr(e,t)}function Or(e){return Dr(e,`base-ui`)}var kr=Y.createContext({controlId:void 0,registerControlId:Me,resetControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});function Ar(){return Y.useContext(kr)}function jr(e,t,n,r=!0,i,a){let[o,s]=Y.useState(),c=Or(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return J(()=>{let i=e||t||l||!r?void 0:Mr(n.current,c);o!==i&&s(i)}),u}function Mr(e,t){let n=Nr(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Nr(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function Pr(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Ar(),o=Or(),s=Fe(()=>Symbol()),c=Y.useRef(!1),l=Y.useRef(!1),u=G(()=>{c.current&&i!==Me&&(c.current=!1,i(s.current,void 0))});return J(()=>{if(!n||i===Me){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),J(()=>u,[u]),(n?r:void 0)??t??o}function Fr(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Ir,platform:Lr,maxTouchPoints:Rr}=Fr(),zr=Ir.toLowerCase(),Br=Lr.toLowerCase(),Vr=/^i(os$|p)/.test(Br)||Br===`macintel`&&Rr>1,Hr=`android`,Ur=Br===Hr||zr.includes(Hr),Wr=!Vr&&Br.startsWith(`mac`);Br.startsWith(`win`),!Ur&&/^(linux|chrome os)/.test(Br);var Gr=Wr||Vr,Kr=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Kr&&zr.includes(`firefox`),!Kr&&zr.includes(`chrom`);var qr=Gr,Jr=/jsdom|happydom/.test(zr);function Yr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&W(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Xr(e,t){let n=e;for(;n;){if(ue(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(W(n)?n.host:null)}return null}function Zr(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Qr=`data-base-ui-focusable`,$r=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ei=`ArrowLeft`,ti=`ArrowRight`,ni=`ArrowUp`,ri=`ArrowDown`,ii=`data-starting-style`,ai=`data-ending-style`,oi={[ii]:``},si={[ai]:``},ci={transitionStatus(e){return e===`starting`?oi:e===`ending`?si:null}},li=`data-open`,ui=`data-closed`,di=`data-anchor-hidden`,fi=`data-popup-open`,pi=`data-pressed`,mi={[fi]:``},hi={[fi]:``,[pi]:``},gi={[li]:``},_i={[ui]:``},vi={[di]:``},yi={open(e){return e?mi:null}},bi={open(e){return e?hi:null}},xi={open(e){return e?gi:_i},anchorHidden(e){return e?vi:null}},Si={...xi,...ci},Ci=`data-trigger-disabled`;function wi(e,t){if(!ue(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Ci);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(Ci);return!1}function Ti(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ei(e){return e.matches(`html,body`)}function Di(e){return fe(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Oi(e){return Xr(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${$r}`)!=null}function ki(e){return e?e.getAttribute(`role`)===`combobox`&&Di(e):!1}function Ai(e){if(!e||Jr)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ji(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Mi(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Mi(e,t.id,n)])}function Ni(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Pi(e){e.preventDefault(),e.stopPropagation()}function Fi(e){return`nativeEvent`in e}function Ii(e){return e.pointerType===``&&e.isTrusted?!0:Ur&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Li(e){return Jr?!1:!Ur&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ur||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Ri(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function zi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Bi=Math.min,Vi=Math.max,Hi=Math.round,Ui=Math.floor,Wi=e=>({x:e,y:e}),Gi={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ki(e,t,n){return Vi(e,Bi(t,n))}function qi(e,t){return typeof e==`function`?e(t):e}function Ji(e){return e.split(`-`)[0]}function Yi(e){return e.split(`-`)[1]}function Xi(e){return e===`x`?`y`:`x`}function Zi(e){return e===`y`?`height`:`width`}function Qi(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $i(e){return Xi(Qi(e))}function ea(e,t,n){n===void 0&&(n=!1);let r=Yi(e),i=$i(e),a=Zi(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=la(o)),[o,la(o)]}function ta(e){let t=la(e);return[na(e),t,na(t)]}function na(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ra=[`left`,`right`],ia=[`right`,`left`],aa=[`top`,`bottom`],oa=[`bottom`,`top`];function sa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ia:ra:t?ra:ia;case`left`:case`right`:return t?aa:oa;default:return[]}}function ca(e,t,n,r){let i=Yi(e),a=sa(Ji(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(na)))),a}function la(e){let t=Ji(e);return Gi[t]+e.slice(t.length)}function ua(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function da(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ua(e)}function fa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pa(e,t){return t<0||t>=e.length}function ma(e,t){return _a(e.current,{disabledIndices:t})}function ha(e,t){return _a(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ga(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>_a(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:pa(e,u)?-1:u,wrapped:d}}function _a(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&va(e,a,r));return a}function va(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!ba(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function ya(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ba(e,t=e?ne(e):null){return!e||!e.isConnected||!t||ya(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var xa=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Sa(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return W(n)?n.host:null}function Ca(e){for(let t of Array.from(e.children))if(re(t)===`summary`)return t;return null}function wa(e,t){let n=Ca(t);return!!n&&(e===n||Z(n,e))}function Ta(e){let t=e?re(e):``;return e!=null&&e.matches(xa)&&(t!==`summary`||e.parentElement!=null&&re(e.parentElement)===`details`&&Ca(e.parentElement)===e)&&(t!==`details`||Ca(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ea(e){if(!Ta(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Sa(t)){let n=t!==e,r=re(t)===`slot`;if(t.hasAttribute(`inert`)||n&&re(t)===`details`&&!t.open&&!wa(e,t)||t.hasAttribute(`hidden`)||!r&&!Da(t,n))return!1}return!0}function Da(e,t){let n=ne(e);return t?n.display!==`none`:ba(e,n)}function Oa(e){let t=e.tabIndex;if(t<0){let t=re(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return t}function ka(e){if(re(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Aa(e,t){let n=ka(e);if(!n)return!0;let r=t.find(e=>{let t=ka(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=ka(e);return t?.name===n.name&&t.form===n.form})===n}function ja(e){if(fe(e)&&re(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ma(e,t){ja(e).forEach(e=>{Ta(e)&&t.push(e),Ma(e,t)})}function Na(e,t,n){ja(e).forEach(e=>{fe(e)&&e.matches(t)&&n.push(e),Na(e,t,n)})}function Pa(e){return Ea(e)&&Oa(e)>=0}function Fa(e){let t=[];return Ma(e,t),t.filter(Ea)}function Ia(e){let t=Fa(e);return t.filter(e=>Oa(e)>=0&&Aa(e,t))}function La(e,t){let n=Ia(e),r=n.length;if(r===0)return;let i=Yr(Re(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ra(e){return La(Re(e).body,1)||e}function za(e){return La(Re(e).body,-1)||e}function Ba(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function Va(e){Ia(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Ha(e){let t=[];Na(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Ua(e,t){let n=Or(e);return J(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}function Wa(e){Y.useEffect(e,ve)}var Ga=0,Ka=class e{static create(){return new e}currentId=Ga;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ga,t()},e)}isStarted(){return this.currentId!==Ga}clear=()=>{this.currentId!==Ga&&(clearTimeout(this.currentId),this.currentId=Ga)};disposeEffect=()=>this.clear};function qa(){let e=Fe(Ka.create).current;return Wa(e.disposeEffect),e}var Ja=Y.createContext({disabled:!1});function Ya(){return Y.useContext(Ja)}var Xa=null;globalThis.requestAnimationFrame;var Za=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Qa=class e{static create(){return new e}static request(e){return Za.request(e)}static cancel(e){return Za.cancel(e)}currentId=Xa;request(e){this.cancel(),this.currentId=Za.request(()=>{this.currentId=Xa,e()})}cancel=()=>{this.currentId!==Xa&&(Za.cancel(this.currentId),this.currentId=Xa)};disposeEffect=()=>this.cancel};function $a(){let e=Fe(Qa.create).current;return Wa(e.disposeEffect),e}function eo(e){return e==null?e:`current`in e?e.current:e}function to(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var no=null;function ro(e){if(!no){let e=[];no=e,queueMicrotask(()=>{no=null,kt.flushSync(()=>{for(let t of e)t()})})}no.push(e)}function io(e,t=!1,n=!1){let r=$a();return G((i,a=null)=>{r.cancel();let o=eo(e);if(o==null)return;let s=o,c=()=>{n?ro(()=>{a?.aborted||i()}):kt.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(to(s).map(e=>e.finished.then(Me))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(to(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ii;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function ao(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=G(a),s=io(r,n,i);Y.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function oo(e,t=!1,n=!1,r=!1){let[i,a]=Y.useState(e&&t?`idle`:void 0),[o,s]=Y.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),J(()=>{if(!e&&o&&i!==`ending`&&n){let e=Qa.request(()=>{a(`ending`)});return()=>{Qa.cancel(e)}}},[e,o,i,n]),J(()=>{if(!e||t||i===void 0)return;let n=Qa.request(()=>{a(void 0)});return()=>{Qa.cancel(n)}},[t,e,i]),J(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Qa.request(()=>{a(`idle`)});return()=>{Qa.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function so(e,t,n){let{setFocused:r,focusOwnerRef:i}=br(),a=G(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return J(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function co(e,t,n,r,i=!0,a){let{registerFieldControl:o}=br(),s=Fe(()=>Symbol());J(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),J(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function lo(e,t){let n=Y.useRef(e),r=G(t);J(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Q(e,t,n,r){let i=!1,a=!1,o=r??Te;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function uo(e,t,n){let r=n??Te;return{reason:e,event:t??new Event(`base-ui`),...r}}var fo=`none`,po=`trigger-press`,mo=`trigger-hover`,ho=`trigger-focus`,go=`outside-press`,_o=`item-press`,vo=`close-press`,yo=`track-press`,bo=`input-change`,xo=`focus-out`,So=`escape-key`,Co=`list-navigation`,wo=`keyboard`,To=`drag`,Eo=`cancel-open`,Do=`disabled`,Oo=`missing`,ko=`initial`,Ao=`imperative-action`,jo=`window-resize`,Mo=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=br(),{clearErrors:S,elementRef:C,submitCountRef:w}=Sr(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=Ar(),k=Pr({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=G(()=>x.inputRef.current?.value);co(x.inputRef,k,j,M,!T,a),J(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),lo(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=Y.useRef(null),P=so(T,N),F=qa();return q(`input`,e,{ref:[t,N],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Q(fo,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:_r})}),No=Y.forwardRef(function(e,t){return(0,X.jsx)(Mo,{ref:t,...e})});function Po({className:e,type:t,...n}){return(0,X.jsx)(No,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}var Fo=Y.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return q(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Io({className:e,orientation:t=`horizontal`,...n}){return(0,X.jsx)(Fo,{"data-slot":`separator`,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}var Lo=Y.createContext(void 0);function Ro(e){let t=Y.useContext(Lo);if(!e&&t===void 0)throw Error(ge(27));return t}var zo=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Ro(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return q(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:Si,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Bo=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Ro(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Oe({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Q(vo,e.nativeEvent))}return q(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Vo=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Ro(),c=Or(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),q(`p`,e,{ref:t,props:[{id:c},o]})});function Ho(e,t){return t!=null&&!Ri(t)?0:typeof e==`function`?e():e}function Uo(e,t,n){let r=Ho(e,n);return typeof r==`number`?r:r?.[t]}function Wo(e){return typeof e==`function`?e():e}function Go(e,t){return t||e===`click`||e===`mousedown`}function Ko(e){return e?.includes(`mouse`)&&e!==`mousedown`}var qo=Y.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ka,currentIdRef:{current:null},currentContextRef:{current:null}});function Jo(e,t){e.current=t.current}function Yo(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=Y.useContext(qo),[d,f]=Y.useState(!1),p=Y.useRef(n);return J(()=>{p.current=n},[n]),J(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),J(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:Uo(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Q(fo))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),J(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,Jo(a,s),u.clear()}},[c,i,a,r,s,u]),Y.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function Xo(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Zo(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Qo(e){let t=Fe($o,e).current;return t.next=e,J(t.effect),t}function $o(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var es={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ts={...es,position:`fixed`,margin:0,top:0,left:0},ns={...es,position:`absolute`},rs=Y.forwardRef(function(e,t){let[n,r]=Y.useState();J(()=>{qr&&Kr&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,X.jsx)(`span`,{...e,ref:t,style:ts,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function is(e){return`data-base-ui-${e}`}var as=0;function os(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(as);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Me;let o=requestAnimationFrame(a);return as=o,()=>{as===o&&(cancelAnimationFrame(o),as=0)}}var ss=`data-base-ui-inert`,cs=new WeakMap,ls=new WeakSet,us=new WeakMap,ds=0;function fs(e){return e?W(e)?e.host:fs(e.parentNode):null}var ps=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=fs(t);return e.contains(n)?n:null}).filter(e=>e!=null),ms=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},hs=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{re(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function gs(e,t,n,{mark:r=!0}){let i=ps(t,e),a=r?hs(t,ms(i),new Set(i)):[],o=[],s=[];if(n){let e=ps(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);hs(t,ms(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(cs.get(e)||0)+1;cs.set(e,r),o.push(e),r===1&&n&&ls.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(us.get(e)||0)+1;us.set(e,t),s.push(e),t===1&&e.setAttribute(ss,``)}),ds+=1,()=>{o.forEach(e=>{let t=(cs.get(e)||0)-1;cs.set(e,t),t||(ls.has(e)||e.removeAttribute(`aria-hidden`),ls.delete(e))}),r&&s.forEach(e=>{let t=(us.get(e)||0)-1;us.set(e,t),t||e.removeAttribute(ss)}),--ds,ds||(cs=new WeakMap,ls=new WeakSet,us=new WeakMap)}}function _s(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Re(e[0]).body;return gs(e,i,n,{mark:r})}var vs={style:{transition:`none`}},ys={fallbackAxisSide:`none`},bs={fallbackAxisSide:`end`},xs={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ss=Y.createContext(null),Cs=()=>Y.useContext(Ss),ws=is(`portal`);function Ts(e={}){let{ref:t,container:n,componentProps:r=Te,elementProps:i}=e,a=Dr(),o=Cs()?.portalNode,[s,c]=Y.useState(null),[l,u]=Y.useState(null),d=G(e=>{e!==null&&u(e)}),f=Y.useRef(null);J(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(se(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=q(`div`,r,{ref:[t,d],props:[{id:a,[ws]:``},i]}),m=s&&p?kt.createPortal(p,s):null;return{node:l,nodeId:Y.isValidElement(p)?p.props.id:void 0,subtree:m}}var Es=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ts({container:o,ref:t,componentProps:e,elementProps:c}),f=Y.useRef(null),p=Y.useRef(null),m=Y.useRef(null),h=Y.useRef(null),[g,_]=Y.useState(null),v=Y.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;Y.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Ba(e)&&(e.type===`focusin`?v.current&&=(Ha(l),!1):(Va(l),v.current=!0))}return Zo(Xo(l,`focusin`,e,!0),Xo(l,`focusout`,e,!0))},[l,y]),J(()=>{l&&b===!0&&v.current&&(Ha(l),v.current=!1)},[b,l]);let S=Y.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,X.jsxs)(Y.Fragment,{children:[d,(0,X.jsxs)(Ss.Provider,{value:S,children:[x&&l&&(0,X.jsx)(rs,{"data-type":`outside`,ref:f,onFocus:e=>{Ba(e,l)?m.current?.focus():za(g?g.domReference:null)?.focus()}}),x&&l&&(0,X.jsx)(`span`,{role:s,"aria-owns":u,style:xs}),l&&kt.createPortal(a,l),x&&l&&(0,X.jsx)(rs,{"data-type":`outside`,ref:p,onFocus:e=>{Ba(e,l)?h.current?.focus():(Ra(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Q(`focus-out`,e.nativeEvent)))}})]})]})});function Ds(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Os=Y.createContext(null),ks=Y.createContext(null),As=()=>Y.useContext(Os)?.id||null,js=e=>{let t=Y.useContext(ks);return e??t};function Ms(e,t){let n=Ce(Zr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ii(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Ns=20,Ps=[];function Fs(){Ps=Ps.filter(e=>e.deref()?.isConnected)}function Is(e){Fs(),e&&re(e)!==`body`&&(Ps.push(new WeakRef(e)),Ps.length>Ns&&(Ps=Ps.slice(-20)))}function Ls(){return Fs(),Ps[Ps.length-1]?.deref()}function Rs(e){return e?Pa(e)?e:Ia(e)[0]||e:null}function zs(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Fa(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Pa(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Bs(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=G(()=>b.current.floatingContext?.nodeId),S=i===!1,C=ki(_)&&S,w=Qo(i),T=Qo(a),E=Qo(o),D=Qo(u),O=Qo(g),k=js(m),A=Cs(),j=Y.useRef(!1),M=Y.useRef(!1),N=Y.useRef(!1),P=Y.useRef(null),F=Y.useRef(``),I=Y.useRef(``),L=Y.useRef(null),R=Y.useRef(null),z=be(L,p,A?.beforeInsideRef),B=be(R,A?.afterInsideRef),V=qa(),H=qa(),ee=$a(),te=A!=null,U=ji(v),ne=G((e=U)=>e?Ia(e):[]),ie=G(()=>h?.().filter(e=>e!=null)??[]);Y.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(U,Yr(Re(U)))&&ne().length===0&&!C&&Pi(e)}return Xo(Re(U),`keydown`,e)},[r,U,c,C,ne]),Y.useEffect(()=>{if(r||!g)return;let e=Re(U);function t(){N.current=!1}function n(e){let t=Zr(e),n=ie(),r=Z(v,t)||Z(_,t)||Z(A?.portalNode,t)||n.some(e=>e===t||Z(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,Xr(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,H.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return Zo(Xo(e,`pointerdown`,n,!0),Xo(e,`pointerup`,t,!0),Xo(e,`pointercancel`,t,!0),Xo(e,`keydown`,i,!0),t)},[r,v,_,U,g,A,H,ie]),Y.useEffect(()=>{if(r||!l)return;let e=Re(U);function n(){M.current=!0,H.start(0,()=>{M.current=!1})}function i(e){let t=Zr(e);Pa(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Zr(n);c&&r==null&&a!=null&&Z(v,a)&&Is(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ie(),p=r?.hasAttribute(is(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,eo(f),eo(d)].includes(r),m=!(Z(_,r)||Z(v,r)||Z(r,v)||Z(A?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||p||k&&(Mi(k.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Ni(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,ji(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&U&&zs(U),s&&i!==_&&!ba(a)&&Yr(e)===e.body){if(fe(U)&&(U.focus(),s===`popup`)){ee.request(()=>{U.focus()});return}let e=ne(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||U;fe(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!c)&&r&&m&&!M.current&&(C||r!==Ls())&&(j.current=!0,t.setOpen(!1,Q(xo,n)))})}function o(){N.current||(b.current.insideReactTree=!0,V.start(0,()=>{b.current.insideReactTree=!1}))}let u=fe(_)?_:null;if(v||u)return Zo(u&&Xo(u,`focusout`,a),u&&Xo(u,`pointerdown`,n),v&&Xo(v,`focusin`,i),v&&Xo(v,`focusout`,a),v&&A&&Xo(v,`focusout`,o,!0))},[r,_,v,U,c,k,A,t,l,s,ne,C,x,b,V,H,ee,d,f,ie]),Y.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${is(`portal`)}]`)||[]),t=(k?Ni(k.nodesRef.current,x()):[]).find(e=>ki(e.context?.elements.domReference||null))?.context?.elements.domReference,n=_s([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ie(),t,eo(f),eo(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=_s([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ie]),J(()=>{if(!g||r||!fe(U))return;F.current=``,I.current=``;let e=Re(U),t=Yr(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Z(U,t))return;let i=null,a=()=>(i??=ne(U),i[0]||U),o;o=r===!0||r===null?a():eo(r),o||=a();let s=Z(U,Yr(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&Ii(c);os(o,{sync:l,preventScroll:o===U,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Yr(e);return!(t!==o&&Z(U,t))}})})},[r,g,U,ne,w,D,O,b]);let ae=Y.useRef(null);J(()=>{if(r||!U){ae.current=null;return}ae.current&&=(ae.current.cancelled=!0,null);let e=Re(U),t=Yr(e),n=D.current==null;Is(t);function i(e){if(e.open||(F.current=Ms(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(is(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(Ii(e.nativeEvent)||Li(e.nativeEvent))j.current=!1;else{let e=!1;Re(U).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&re(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Ls()||null,typeof i==`boolean`?s:eo(i)||s||null}return()=>{y.off(`openchange`,i);let t=Yr(e),n=ie(),r=Z(v,t)||n.some(e=>e===t||Z(e,t))||k&&Mi(k.nodesRef.current,x(),!1).some(e=>Z(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};ae.current=l,queueMicrotask(()=>{ae.current===l&&(ae.current=null);let n=Rs(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&fe(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,U,T,E,D,y,k,_,x,ie]),J(()=>{if(!Kr||g||!v)return;let e=Yr(Re(v));fe(e)&&Di(e)&&Z(v,e)&&e.blur()},[g,v]),J(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),J(()=>{if(!r&&U)return zs(U),()=>{queueMicrotask(Fs)}},[r,U]);let oe=!r&&(!c||!C)&&(te||c);return(0,X.jsxs)(Y.Fragment,{children:[oe&&(0,X.jsx)(rs,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=ne();os(e[e.length-1])}else A?.portalNode&&(j.current=!1,Ba(e,A.portalNode)?Ra(_)?.focus():eo(f??A.beforeOutsideRef)?.focus())}}),n,oe&&(0,X.jsx)(rs,{"data-type":`inside`,ref:B,onFocus:e=>{c?os(ne()[0]):A?.portalNode&&(l&&(j.current=!0),Ba(e,A.portalNode)?za(_)?.focus():eo(d??A.afterOutsideRef)?.focus())}})]})}function Vs(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=po}=t,l=e.context.dataRef,u=Y.useRef(void 0),d=$a(),f=qa(),p=Y.useMemo(()=>{function t(t,n,r,i){let a=Q(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=Ri(e.pointerType,!0)&&Li(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Ri(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Zr(s),p=Di(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:Ri(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return Y.useMemo(()=>n?{reference:p}:Te,[n,p])}function Hs(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Us(e){return e!=null&&e.clientX!=null}function Ws(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=Y.useRef(!1),l=Y.useRef(null),[u,d]=Y.useState(),[f,p]=Y.useState([]),m=G(t=>{e.set(`positionReference`,t)}),h=G((t,n,i)=>{c.current||(!s.current.openEvent||Us(s.current.openEvent))&&e.set(`positionReference`,Hs(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=G(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=Ri(u)?a:i;Y.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Ce(a);function r(t){let n=Zr(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Us(s.current.openEvent)?l.current=Xo(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),Y.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),Y.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),Y.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=Y.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return Y.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function Gs(){return!1}function Ks(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function qs(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Gs,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=js(c),m=G(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=G(()=>a),{escapeKey:v,outsidePress:y}=Ks(s),b=Y.useRef(!1),x=Y.useRef(!1),S=Y.useRef(!1),C=Y.useRef(!1),w=Y.useRef(!1),T=Y.useRef(``),E=Y.useRef(null),D=qa(),O=qa(),k=qa(),A=G(()=>{O.clear(),d.current.insideReactTree=!1}),j=G(e=>{let t=d.current.floatingContext?.nodeId;return(p?Mi(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=G(t=>Ti(t,e.select(`floatingElement`))||Ti(t,e.select(`domReferenceElement`))),N=G(t=>{o()&&e.setOpen(!1,Q(po,t.nativeEvent))}),P=G(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Fi(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Q(So,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=G(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=G(t=>{if(!l||!n||t.button!==0)return;let r=Zr(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=G(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});Y.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),Y.useEffect(()=>A,[A]),Y.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new Ka,i=Re(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(Kr?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&Mi(p.nodesRef.current,t).some(t=>Ti(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=Zr(n),i=`[${is(`inert`)}]`,a=ue(r)?r.getRootNode():null,o=Array.from((W(a)?a:Re(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=ue(r)?r:null;for(;c&&!ae(c);){let e=te(c);if(ae(e)||!ue(e))break;c=e}if(!(o.length&&ue(r)&&!Ei(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(fe(r)&&!(`touches`in n)){let e=ae(r),t=ne(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!Ii(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Q(go,n)),A())}}}function F(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Zr(e);if(!n)return;let r=Xo(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function z(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function B(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():O(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,A())))}function V(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function H(e){L(e,V)}function ee(e){f()===`sloppy`&&E.current&&!M(e)&&(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function U(e){L(e,ee)}let re=Zo(r&&Zo(Xo(i,`keydown`,P),Xo(i,`compositionstart`,a),Xo(i,`compositionend`,o)),g&&Zo(Xo(i,`click`,z,!0),Xo(i,`pointerdown`,z,!0),Xo(i,`pointerup`,B,!0),Xo(i,`pointercancel`,B,!0),Xo(i,`mousedown`,z,!0),Xo(i,`mouseup`,B,!0),Xo(i,`touchstart`,R,{capture:!0,passive:!0}),Xo(i,`touchmove`,H,{capture:!0,passive:!0}),Xo(i,`touchend`,U,{capture:!0,passive:!0})));return()=>{re(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=Y.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),z=Y.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return Y.useMemo(()=>n?{reference:R,floating:z,trigger:R}:{},[n,R,z])}function Js(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),J(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};ue(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Ys(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=G(i),{mounted:c,setMounted:l,transitionStatus:u}=oo(t,!1,!1,o),d=!t&&r;J(()=>{t&&s(!1)},[t,s]);let f=Y.useRef(c),p=Y.useRef(!1),m=Cr(),h=()=>{f.current=!1,l(!1),a()};J(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=G(()=>{f.current&&(t?(p.current=!0,m()):h())});return ao({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Xs={tabIndex:-1,[Qr]:``};function Zs(e){return t=>t!==`touch`||e.current}function Qs(e,t=!1){let n=Dr(),r=As()!=null,i=Fe(()=>e(n,r)).current;return Js({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function $s({handle:e,store:t}){return J(()=>e.attachStore(t),[e,t]),null}function ec(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function tc(e,t){let n=Y.useRef(null);return G(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),ec(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),ec(t))})}function nc(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function rc(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function ic(e,t,n,r={}){let i=n.reason,a=i===mo,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=rc(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=nc(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?kt.flushSync(l):l()}function ac(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=tc(e,n),o=G(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=G(e=>{a(e),e&&o(e)});return J(()=>(s(t.current),()=>s(null)),[s,t,n,e]),J(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function oc(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=Y.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);J(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Q(fo);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function sc(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Ys({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Fe(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function cc(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:Te,inactiveTriggerProps:Te,popupProps:Te})},[e])}function lc(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var uc=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},dc=n((e=>{var t=oe();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),fc=n(((e,t)=>{t.exports=dc()})),pc=n((e=>{var t=oe(),n=fc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),mc=n(((e,t)=>{t.exports=pc()})),hc=[],gc=void 0;function _c(){return gc}function vc(e){hc.push(e)}function yc(e){let t=(t,n)=>{let r=Fe(xc).current,i;try{gc=r;for(let e of hc)e.before(r);i=e(t,n);for(let e of hc)e.after(r);r.didInitialize=!0}finally{gc=void 0}return i};return t.displayName=e.displayName||e.name,t}function bc(e){return Y.forwardRef(yc(e))}function xc(){return{didInitialize:!1}}var Sc=fc(),Cc=mc(),wc=ye(19)?Dc:Oc;function Tc(e,t,n,r,i){return wc(e,t,n,r,i)}function Ec(e,t,n,r,i){let a=Y.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Sc.useSyncExternalStore)(e.subscribe,a,a)}vc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Sc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Dc(e,t,n,r,i){let a=_c();if(!a)return Ec(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Oc(e,t,n,r,i){return(0,Cc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var kc=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Tc(this,e,t,n,r)}},Ac=class extends kc{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){Y.useDebugValue(e);let n=this;J(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;J(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);J(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){Y.useDebugValue(e);let n=this,r=t!==void 0;J(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return Y.useDebugValue(e),Tc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){Y.useDebugValue(e);let n=G(t??Me);this.context[e]=n}useStateSetter(e){let t=Y.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jc={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Mc=class extends Ac{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ds(),nested:n,triggerElements:i},jc),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&zi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Nc(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Mc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Te,inactiveTriggerProps:Te,popupProps:Te}}var Pc=e=>e.triggerIdProp??e.activeTriggerId,Fc=e=>e.openProp??e.open,Ic=e=>(e.popupElement?.id??e.floatingId)||void 0;function Lc(e,t){return t!==void 0&&Fc(e)&&Pc(e)===t}function Rc(e,t){return Lc(e,t)?!0:t!==void 0&&Fc(e)&&Pc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var zc={open:Fc,mounted:e=>e.mounted,transitionStatus:e=>Fc(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Pc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Ic,isTriggerActive:(e,t)=>t!==void 0&&Pc(e)===t,isOpenedByTrigger:(e,t)=>Lc(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Pc(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Rc(e,t)?Ic(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Bc(e){let t=Y.useCallback(t=>e===void 0?Me:e.subscribeStore(t),[e]),n=Y.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Sc.useSyncExternalStore)(t,n,()=>e?.serverStore)}function Vc(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Dr(),a=As()!=null,o=Fe(()=>new Mc({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new uc,floatingId:i,syncOnly:!1,nested:a})).current;return J(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ue(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var Hc=Wr&&Kr;function Uc(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=Y.useRef(!1),s=Y.useRef(null),c=Y.useRef(!0),l=qa();Y.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ce(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&fe(t)&&t===Yr(Re(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Zo(Xo(r,`blur`,i),Hc&&Xo(r,`keydown`,a,!0),Hc&&Xo(r,`pointerdown`,l,!0))},[e,n]),Y.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);ue(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=Y.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=Zr(n.nativeEvent);if(ue(a)){if(Hc&&!n.relatedTarget){if(!c.current&&!Di(a))return}else if(!Ai(a))return}let u=wi(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Q(ho,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Q(ho,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=ue(r)&&r.hasAttribute(is(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Yr(Re(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||wi(r??n,e.context.triggerElements)||e.setOpen(!1,Q(ho,i))})}}},[a,r,e,l]);return Y.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Wc=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Ka;restTimeout=new Ka;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Gc=new WeakMap;function Kc(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Gc.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Gc.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function qc(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Gc.get(n);a&&a!==e&&Kc(a),Kc(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Gc.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Jc(e){let t=e.context.dataRef.current,n=Fe(()=>t.hoverInteractionState??Wc.create()).current;return t.hoverInteractionState||=n,Wa(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Yc(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=js(),u=As(),d=Jc(e),f=qa(),p=G(()=>Go(c.current.openEvent?.type,d.interactedInside)),m=G(()=>Ko(c.current.openEvent?.type)),h=G(()=>{Kc(d)});J(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),Y.useEffect(()=>h,[h]),J(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&ue(s)&&o){let e=s,t=o,n=Re(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??Xr(e,`[data-rootownerid]`)??n.body;return qc(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),Y.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Mi(l.nodesRef.current,u).length>0)}function a(t){let n=Uo(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Q(mo,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Zr(e);Oi(t)?d.interactedInside=Xr(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(wi(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&ue(o)&&Mi(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Q(mo,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Zo(y&&Xo(y,`mouseenter`,g),y&&Xo(y,`mouseleave`,_),y&&Xo(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Xc={current:null};function Zc(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Xc,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=js(l),v=Jc(e),y=Y.useRef(!1),b=Qo(i),x=Qo(r),S=Qo(o),C=Qo(n),w=Qo(p),T=Qo(f),E=G(()=>Go(h.current.openEvent?.type,v.interactedInside)),D=G(()=>w.current?.()!==!1),O=G((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!ue(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),k=G(()=>{v.handler&&=(Re(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=G(()=>{Kc(v)});return u&&(v.handleCloseOptions=i?.__options),Y.useEffect(()=>k,[k]),Y.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===mo,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),Y.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Uo(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Q(mo,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Q(mo,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!ue(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Ri(v.pointerType))return;let n=Wo(S.current),r=Uo(x.current,`open`,v.pointerType),i=Zr(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(ue(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}ue(o)&&ue(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&ue(c)&&ue(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,Q(mo,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Q(mo,t,c))}):g&&D()&&e.setOpen(!0,Q(mo,t,c)))}function o(n){if(E()){A();return}k();let r=Re(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!wi(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&Z(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Z(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?Xo(r,`mouseout`,l):void 0;return s?Zo(Xo(r,`mousemove`,i,{once:!0}),Xo(r,`mouseenter`,i),Xo(r,`mouseleave`,o),f):Zo(Xo(r,`mouseenter`,i),Xo(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),Y.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!Ri(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;qc(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Wo(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Q(mo,n,r))}v.pointerType===`touch`?kt.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function Qc(e){return Kr&&e.movementX===0&&e.movementY===0}function $c(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function el(e,t){return $c(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function tl(e,t,n){return $c(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function nl(e,t,n){return $c(t,n?e===ei:e===ti,e===ri)}function rl(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:$c(t,n?e===ti:e===ei,e===ni)}function il(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=ji(E),A=ki(D),j=Qo(k),M=As(),N=js(x),P=Y.useRef(f),F=Y.useRef(o??-1),I=Y.useRef(null),L=Y.useRef(!0),R=G(e=>{i(F.current===-1?null:F.current,e)}),z=Y.useRef(!!E),B=Y.useRef(T),V=Y.useRef(!1),H=Y.useRef(!1),ee=Y.useRef(null),te=Qo(h),U=Qo(T),ne=Qo(o),re=Qo(b),ie=$a(),ae=$a(),oe=G(()=>{ie.cancel();function e(e){d||(ee.current=os(e,{sync:V.current,preventScroll:!0}))}let t=n.current[F.current],r=H.current;t&&e(t),(V.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),W&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});J(()=>{O.current.orientation=g},[O,g]),J(()=>{T||(I.current=null),T&&f===`auto`||(P.current=f)},[T,f]),J(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(H.current=!0,R())):z.current&&(F.current=-1,R()))},[a,T,E,o,R]),J(()=>{if(a){if(!T)V.current=!1;else if(E){if(r==null){if(V.current=!1,ne.current!=null)return;if(z.current&&(F.current=-1,oe()),(!B.current||!z.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||tl(I.current,_,u)||l?ma(n):ha(n),I.current=null,R())};t()}}else pa(n.current,r)||(F.current=r,oe(),H.current=!1)}}},[a,T,E,r,ne,l,n,_,u,R,oe,ae]),J(()=>{if(!a||E||!N||d||!z.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=Yr(Re(D??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),J(()=>{B.current=T,z.current=!!E});let se=r!=null,ce=G(e=>{if(!U.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),le=G(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),ue=G(()=>ma(n,te.current)),de=G(t=>{if(L.current=!1,V.current=!0,t.which===229||!U.current&&t.currentTarget===j.current)return;if(l&&rl(t.key,g,u,w)){el(t.key,le())||Pi(t),e.setOpen(!1,Q(Co,t.nativeEvent));let n=S?.current??D;fe(n)&&n.focus();return}r!=null&&r!==F.current&&!pa(n.current,r)&&(F.current=r);let i=F.current,a=ma(n,h),o=ha(n,h);if(A||(t.key===`Home`&&(Pi(t),F.current=a,R(t)),t.key===`End`&&(Pi(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(el(t.key,g)){Pi(t);let e=Yr(t.currentTarget.ownerDocument);if(T&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){F.current=tl(t.key,g,u)?a:o,R(t),r===F.current&&oe();return}let{index:l,wrapped:f}=ga(n.current,i,{decrement:!tl(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(V.current=!1),F.current=l,R(t)}}),W=Y.useMemo(()=>({onFocus(e){V.current=!0,ce(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Qc(e)||(V.current=!0,H.current=!1,p&&ce(e))},onPointerLeave(e){if(!U.current||!L.current||e.pointerType===`touch`)return;V.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,F.current=-1,R(e),!d)){let e=j.current,t=Yr(Re(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[ce,U,j,p,n,R,re,d]),pe=Y.useMemo(()=>d&&T&&se&&{"aria-activedescendant":`${y}-${r}`},[d,T,se,y,r]),me=Y.useMemo(()=>({...A?{}:pe,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=Zr(t.nativeEvent);if(n&&!Z(j.current,n))return;Pi(t);let r=Q(xo,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&fe(i)&&i.focus()}else de(t)},onPointerMove(e){Qc(e)||(L.current=!0)}}),[pe,de,j,A,e,T,d,D,S]),he=Y.useMemo(()=>{function t(t){e.setOpen(!0,Q(Co,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Ii(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&Li(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=nl(n.key,le(),u),o=el(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Di(n.currentTarget)))return de(n);if(r||m||!i){if(s){let e=el(n.key,le());I.current=l&&e?null:n.key}l?a&&(Pi(n),r?(F.current=ue(),R(n),d&&j.current?.focus()):t(n)):o&&(ne.current!=null&&(F.current=ne.current),Pi(n),!r&&m?t(n):de(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[de,f,ue,l,R,e,m,g,_,le,u,ne,d,j]),ge=Y.useMemo(()=>({...pe,...he}),[pe,he]);return Y.useMemo(()=>a?{reference:ge,floating:me,item:W,trigger:he}:{},[a,ge,me,he,W])}function al(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=G(s),f=e.useState(`open`),p=qa(),m=Y.useRef(``),h=Y.useRef(u??i??-1),g=Y.useRef(null),_=G(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!ba(n)||n?.matches(`:disabled`)?!1:o==null||!va(ve,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Pi(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Pi(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=G(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Z(r,n)||Z(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});J(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=Y.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Y.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var ol=.1,sl=ol*ol,cl=.5;function ll(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ul(e,t,n,r,i,a,o,s,c,l){let u=!1;return ll(e,t,n,r,i,a)&&(u=!u),ll(e,t,i,a,o,s)&&(u=!u),ll(e,t,o,s,c,l)&&(u=!u),ll(e,t,c,l,n,r)&&(u=!u),u}function dl(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function fl(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function pl(e={}){let{blockPointerEvents:t=!1}=e,n=new Ka,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*sl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Zr(r),g=r.type===`mouseleave`,_=Z(u,h),v=Z(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ue(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Mi(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=fl(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=fl(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=fl(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=fl(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!dl(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?cl/2:cl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+cl+1,o=C||T?S.bottom-cl:S.top,s=C?T?S.bottom-cl:S.top:S.bottom-cl;M=ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?cl/2:cl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-cl,o=C||T?S.top+cl:S.bottom,s=C?T?S.top+cl:S.bottom:S.top+cl;M=ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?cl/2:cl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+cl+1,o=w||E?S.right-cl:S.left,s=w?E?S.right-cl:S.left:S.right-cl;M=ul(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?cl/2:cl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-cl,o=w||E?S.left+cl:S.right,s=w?E?S.left+cl:S.right:S.left+cl;M=ul(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function ml(e,t,n){let{reference:r,floating:i}=e,a=Qi(t),o=$i(t),s=Zi(o),c=Ji(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Yi(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function hl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=qi(t,e),p=da(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=fa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var gl=50,_l=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:hl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ml(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<gl&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ml(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},vl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=qi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ji(r),_=Qi(o),v=Ji(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[la(o)]:ta(o)),x=p!==`none`;!d&&x&&b.push(...ca(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ea(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Qi(t)||T.every(e=>Qi(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Qi(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},yl=new Set([`left`,`top`]);async function bl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ji(n),s=Yi(n),c=Qi(n)===`y`,l=yl.has(o)?-1:1,u=a&&c?-1:1,d=qi(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var xl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await bl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Sl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=qi(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Qi(i),p=Xi(f),m=u[p],h=u[f],g=(e,t)=>Ki(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Cl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=qi(e,t),u={x:n,y:r},d=Qi(i),f=Xi(d),p=u[f],m=u[d],h=qi(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=yl.has(Ji(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},wl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=qi(e,t),c=await i.detectOverflow(t,s),l=Ji(n),u=Yi(n),d=Qi(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Bi(p-c[m],g),y=Bi(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Vi(c.left,c.right):S=p-2*Vi(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Tl(e){let t=ne(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=fe(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Hi(n)!==a||Hi(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function El(e){return ue(e)?e:e.contextElement}function Dl(e){let t=El(e);if(!fe(t))return Wi(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Tl(t),o=(a?Hi(n.width):n.width)/r,s=(a?Hi(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ol=Wi(0);function kl(e){let t=Ce(e);return!he()||!t.visualViewport?Ol:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Al(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ce(e)}function jl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=El(e),o=Wi(1);t&&(r?ue(r)&&(o=Dl(r)):o=Dl(e));let s=Al(a,n,r)?kl(a):Wi(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ce(a),t=ue(r)?Ce(r):r,n=e,i=ie(n);for(;i&&t!==n;){let e=Dl(i),t=i.getBoundingClientRect(),r=ne(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ce(i),i=ie(n)}}return fa({width:u,height:d,x:c,y:l})}function Ml(e,t){let n=de(e).scrollLeft;return t?t.left+n:jl(me(e)).left+n}function Nl(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ml(e,n),y:n.top+t.scrollTop}}function Pl(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=me(r),s=t?U(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wi(1),u=Wi(0),d=fe(r);if((d||!a)&&((re(r)!==`body`||ce(o))&&(c=de(r)),d)){let e=jl(r);l=Dl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Nl(o,c):Wi(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Fl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Il(e){let t=de(e),n=e.ownerDocument.body,r=Vi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Vi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ml(e),o=-t.scrollTop;return ne(n).direction===`rtl`&&(a+=Vi(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ll=25;function Rl(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ce(e),a=me(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!he()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ml(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ll&&(s-=o)}return{width:s,height:c,x:l,y:u}}function zl(e,t){let n=jl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Dl(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Bl(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Rl(e,n,t);else if(t===`document`)r=Il(me(e));else if(ue(t))r=zl(t,n);else{let n=kl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fa(r)}function Vl(e,t){let n=t.get(e);if(n)return n;let r=we(e,[],!1).filter(e=>ue(e)&&re(e)!==`body`),i=null,a=ne(e).position===`fixed`,o=a?te(e):e;for(;ue(o)&&!ae(o);){let e=ne(o),t=le(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=te(o)}return t.set(e,r),r}function Hl(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?U(t)?[]:Vl(t,this._c):[].concat(n),r],o=Bl(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Bl(t,a[e],i);s=Vi(n.top,s),c=Bi(n.right,c),l=Bi(n.bottom,l),u=Vi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ul(e){let{width:t,height:n}=Tl(e);return{width:t,height:n}}function Wl(e,t,n){let r=fe(t),i=me(t),a=n===`fixed`,o=jl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Wi(0);if((r||!a)&&((re(t)!==`body`||ce(i))&&(s=de(t)),r)){let e=jl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ml(i));let l=i&&!r&&!a?Nl(i,s):Wi(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Gl(e){return ne(e).position===`static`}function Kl(e,t){if(!fe(e)||ne(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return me(e)===n&&(n=n.ownerDocument.body),n}function ql(e,t){let n=Ce(e);if(U(e))return n;if(!fe(e)){let t=te(e);for(;t&&!ae(t);){if(ue(t)&&!Gl(t))return t;t=te(t)}return n}let r=Kl(e,t);for(;r&&Ie(r)&&Gl(r);)r=Kl(r,t);return r&&ae(r)&&Gl(r)&&!le(r)?n:r||Pe(e)||n}var Jl=async function(e){let t=this.getOffsetParent||ql,n=this.getDimensions,r=await n(e.floating);return{reference:Wl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Yl(e){return ne(e).direction===`rtl`}var Xl={convertOffsetParentRelativeRectToViewportRelativeRect:Pl,getDocumentElement:me,getClippingRect:Hl,getOffsetParent:ql,getElementRects:Jl,getClientRects:Fl,getDimensions:Ul,getScale:Dl,isElement:ue,isRTL:Yl};function Zl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ql(e,t,n){let r=null,i,a=me(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Ui(d),h=Ui(a.clientWidth-(u+f)),g=Ui(a.clientHeight-(d+p)),_=Ui(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Vi(0,Bi(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Zl(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ce(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function $l(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=El(e),u=i||a?[...l?we(l):[],...t?we(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ql(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?jl(e):null;c&&g();function g(){let t=jl(e);h&&!Zl(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var eu=xl,tu=Sl,nu=vl,ru=wl,iu=Cl,au=(e,t,n)=>{let r=new Map,i=n??{},a={...Xl,...i.platform,_c:r};return _l(e,t,{...i,platform:a})},ou=typeof document<`u`?Y.useLayoutEffect:function(){};function su(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!su(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!su(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function cu(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lu(e,t){let n=cu(e);return Math.round(t*n)/n}function uu(e){let t=Y.useRef(e);return ou(()=>{t.current=e}),t}function du(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);su(f,r)||p(r);let[m,h]=Y.useState(null),[g,_]=Y.useState(null),v=Y.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=Y.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=Y.useRef(null),C=Y.useRef(null),w=Y.useRef(u),T=c!=null,E=uu(c),D=uu(i),O=uu(l),k=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),au(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!su(w.current,t)&&(w.current=t,kt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);ou(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Y.useRef(!1);ou(()=>(A.current=!0,()=>{A.current=!1}),[]),ou(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=Y.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=Y.useMemo(()=>({reference:b,floating:x}),[b,x]),N=Y.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=lu(M.floating,u.x),r=lu(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...cu(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return Y.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var fu=(e,t)=>{let n=eu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pu=(e,t)=>{let n=tu(e);return{name:n.name,fn:n.fn,options:[e,t]}},mu=(e,t)=>({fn:iu(e).fn,options:[e,t]}),hu=(e,t)=>{let n=nu(e);return{name:n.name,fn:n.fn,options:[e,t]}},gu=(e,t)=>{let n=ru(e);return{name:n.name,fn:n.fn,options:[e,t]}},_u=Y.createContext(void 0);function vu(){let e=Y.useContext(_u);if(e===void 0)throw Error(ge(26));return e}var yu=`ArrowUp`,bu=`ArrowDown`,xu=`ArrowLeft`,Su=`ArrowRight`,Cu=`Home`,wu=`PageUp`,Tu=`PageDown`,Eu=new Set([yu,bu,xu,Su,Cu,`End`]),Du=[`Shift`,`Control`,`Alt`,`Meta`];function Ou(e){return fe(e)&&e.tagName===`INPUT`}function ku(e){return!!(Ou(e)&&e.selectionStart!=null||fe(e)&&e.tagName===`TEXTAREA`)}function Au(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=ju(e,t,`left`),a=Mu(e),o=Mu(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=ju(e,t,`top`),r=Mu(e),i=Mu(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function ju(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Mu(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Nu=`--nested-dialogs`,Pu=`data-nested-dialog-open`,Fu={...xi,...ci,nestedDialogOpen(e){return e?{[Pu]:``}:null}},Iu=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Ro(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);vu(),ao({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Zs(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=q(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Xs,hidden:!m,onKeyDown(e){Eu.has(e.key)&&e.stopPropagation()},style:{[Nu]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:Fu});return(0,X.jsx)(Bs,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})});function Lu(e){return ye(19)?e:e?`true`:void 0}var Ru=Y.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,X.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),zu=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Ro(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,X.jsx)(_u.Provider,{value:n,children:(0,X.jsxs)(Es,{ref:t,...r,children:[a&&o===!0&&(0,X.jsx)(Ru,{ref:i.context.internalBackdropRef,inert:Lu(!s)}),e.children]})}):null}),Bu={},Vu={},Hu=``;function Uu(e,t){return ce(e)?e:t}function Wu(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Uu(t,n)).overflowY)}function Gu(e){if(typeof document>`u`)return!1;let t=Re(e);return Ce(t).innerWidth-t.documentElement.clientWidth>0}function Ku(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Re(e),n=t.documentElement,r=t.body,i=Uu(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function qu(e){let t=Re(e),n=t.documentElement,r=t.body,i=Uu(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ju(e){let t=Re(e),n=t.documentElement,r=t.body,i=Ce(n),a=0,o=0,s=!1,c=Qa.create();if(Kr&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Bu={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Hu=n.style.scrollBehavior,Vu={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Uu(n,r);s=Ku(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Bu),Object.assign(r.style,Vu),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Hu)}function d(){u(),c.request(l)}l();let f=Xo(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Yu=new class{lockCount=0;restore=null;timeoutLock=Ka.create();timeoutUnlock=Ka.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Re(e),n=t.documentElement,r=t.body,i=Ce(n);if(Wu(i,n,r)){let t=new i.MutationObserver(()=>{Wu(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Vr||!Gu(e);this.restore=a?qu(e):Ju(e)}};function Xu(e=!0,t=null){J(()=>{if(e)return Yu.acquire(t)},[e,t])}function Zu({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=Y.useState(0),[d,f]=Y.useState(0),p=l===0,m=qs(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Zr(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Z(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return Xu(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),J(()=>{!r&&!i&&(u(0),f(0))},[r,i]),J(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),cc(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Qu={...zc,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},$u=class extends Ac{constructor(e,t,n){let r=new uc,i=ed(e,r,t,n);super(i,td(r),Qu)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(nc(this.state,e,t.trigger)))}};function ed(e,t,n,r=!1){return{...Nc(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function td(e){return{popupRef:Y.createRef(),backdropRef:Y.createRef(),internalBackdropRef:Y.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function nd(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Ro(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=Qs((e,t)=>new $u({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);lc(b,x),oc(b);let{forceUnmount:w}=sc(x,b);Y.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,Q(Ao))}),[w,b]);let T=x||S||u!=null;return(0,X.jsxs)(Lo.Provider,{value:b,children:[u&&(0,X.jsx)($s,{handle:u,store:b}),T&&(0,X.jsx)(Zu,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var rd=yc(function(e){return nd(`dialog`,e)}),id=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Ro(),c=Or(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),q(`h2`,e,{ref:t,props:[{id:c},o]})});function ad(e){let t=Y.useRef(``),n=Y.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Y.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function od(e,t){let{onClick:n,onPointerDown:r}=ad(G((n,r)=>{(typeof e==`function`?e():e)||t(r||(Vr?`touch`:``))}));return Y.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function sd(e){let[t,n]=Y.useState(null),r=od(e,n);return lo(e,t=>{t&&!e&&n(null)}),Y.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function cd({...e}){return(0,X.jsx)(rd,{"data-slot":`sheet`,...e})}function ld({...e}){return(0,X.jsx)(zu,{"data-slot":`sheet-portal`,...e})}function ud({className:e,...t}){return(0,X.jsx)(zo,{"data-slot":`sheet-overlay`,className:K(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function dd({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,X.jsxs)(ld,{children:[(0,X.jsx)(ud,{}),(0,X.jsxs)(Iu,{"data-slot":`sheet-content`,"data-side":n,className:K(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,X.jsxs)(Bo,{"data-slot":`sheet-close`,render:(0,X.jsx)(De,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,X.jsx)(I,{}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function fd({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sheet-header`,className:K(`flex flex-col gap-0.5 p-4`,e),...t})}function pd({className:e,...t}){return(0,X.jsx)(id,{"data-slot":`sheet-title`,className:K(`cn-font-heading text-base font-medium text-foreground`,e),...t})}function md({className:e,...t}){return(0,X.jsx)(Vo,{"data-slot":`sheet-description`,className:K(`text-sm text-muted-foreground`,e),...t})}var hd=Y.createContext(void 0);function gd(e){let t=Y.useContext(hd);if(t===void 0&&!e)throw Error(ge(72));return t}var _d={...zc,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},vd=class extends Ac{constructor(e,t,n){let r=new uc;super(yd(e,r,t,n),bd(r),_d)}setOpen=(e,t)=>{ic(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Q(po,e))}};function yd(e,t,n,r=!1){return{...Nc(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function bd(e){return{popupRef:Y.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var xd=yc(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Qs((e,t)=>new vd({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),oc(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=sc(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=Y.useRef(null);J(()=>{m&&t&&p.setOpen(!1,Q(Do))},[m,t,p]),J(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),J(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),Y.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Q(Ao))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,X.jsxs)(hd.Provider,{value:p,children:[l&&(0,X.jsx)($s,{handle:l,store:p}),T&&(0,X.jsx)(Sd,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Sd({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=qs(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Ws(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=Y.useMemo(()=>Ne(a.reference,i.reference),[a.reference,i.reference]);return cc(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Te}),null}var Cd=Y.createContext(void 0);function wd(){return Y.useContext(Cd)}var Td=`data-base-ui-tooltip-trigger`;function Ed(e){let t=Zr(e);return ue(t)?t:null}var Dd=bc(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=gd(!0),m=Bc(a)??p;if(!m)throw Error(ge(82));let h=Or(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=Y.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=ac(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=wd(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=Yo(v,{open:_}),O=Jc(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=Qo(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=Y.useRef(!1),F=qa(),I=Y.useRef(void 0);function L(){return D&&w.current!=null?0:c??C??600}function R(e){let t=y.current;if(!t||!e)return!1;let n=Xr(e,`[${Td}]`);return n!==null&&n!==t&&Z(t,n)}function z(e){let t=R(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let B=Zc(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?pl():null,restMs:L,delay(){return u==null&&D?{close:Uo(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),V=Uc(v,{enabled:!A}).reference,H=e=>{let t=P.current,n=Ed(e),r=z(n),i=y.current,a=i&&n&&Z(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,Q(mo,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Ri(I.current)){let t=()=>{P.current||j.current||m.select(`open`)||m.setOpen(!0,Q(mo,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},ee=m.useState(`appliedTriggerProps`,S||M!==`none`);return q(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,V,ee,{onMouseOver(e){H(e.nativeEvent)},onFocus(e){R(Ed(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Ci]:A?``:void 0,[Td]:A?void 0:``},f],stateAttributesMapping:yi})}),Od=Y.createContext(void 0);function kd(){let e=Y.useContext(Od);if(e===void 0)throw Error(ge(70));return e}var Ad=Y.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ts({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,X.jsxs)(Y.Fragment,{children:[l,c&&kt.createPortal(n,c)]})}),jd=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return gd().useState(`mounted`)||n?(0,X.jsx)(Od.Provider,{value:n,children:(0,X.jsx)(Ad,{ref:t,...r})}):null}),Md=Y.createContext(void 0);function Nd(){let e=Y.useContext(Md);if(e===void 0)throw Error(ge(71));return e}function Pd(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=Y.useState(null),d=Y.useRef(null),f=js(n),p=Y.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=du({...e,elements:{...p,...l&&{reference:l}}}),h=Y.useCallback(e=>{let t=ue(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=Y.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=Y.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=Y.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return J(()=>{o&&(d.current=o)},[o]),J(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),Y.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var Fd=Y.createContext(void 0);function Id(){return Y.useContext(Fd)?.direction??`ltr`}var Ld=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=qi(e,t)||{};if(l==null)return{};let d=da(u),f={x:n,y:r},p=$i(i),m=Zi(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Ki(D,k,O),j=!c.arrow&&Yi(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Rd=(e,t)=>{let{name:n,fn:r}=Ld(e);return{name:n,fn:r,options:[e,t]}},zd={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Bd={sideX:`left`,sideY:`top`},Vd=`--available-width`,Hd=`--available-height`,Ud=`--anchor-width`,Wd=`--anchor-height`,Gd=`--transform-origin`,Kd=Vd,qd=Hd;function Jd(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Yd(e,t,n){let{rects:r,placement:i}=e;return{side:Jd(t,Ji(i),n),align:Yi(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Xd(e){return Zd(e,Pd)}function Zd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=G(O),A=O?k:n,j=Qo(n),M=Qo(g),N=Id()===`rtl`,[P,F]=Y.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?Ji(P):null,R=P&&I?Yi(P)||`center`:null,z=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],B=R||o,V=B===`center`?z:`${z}-${B}`,H=l;typeof H==`number`?H={top:H,right:H,bottom:H,left:H}:H&&={top:H.top||0,right:H.right||0,bottom:H.bottom||0,left:H.left||0};let ee=+(i===`bottom`),te=+(i===`top`),U=+(i===`right`),ne=+(i===`left`),re={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:H},ie=Y.useRef(null),ae=Qo(a),oe=Qo(s),se=typeof a==`function`?0:a,ce=typeof s==`function`?0:s,le=[];p&&le.push(p),le.push(fu(e=>{let t=Yd(e,i,N),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof oe.current==`function`?oe.current(t):oe.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[se,ce,N,i]));let ue=w===`none`&&C!==`shift`,de=!ue&&(u||E||C===`shift`),fe=C===`none`?null:hu({...re,padding:{top:H.top+1+ee,right:H.right+1+ne,bottom:H.bottom+1+te,left:H.left+1+U},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),W=ue?null:pu({...re,rootBoundary:D,mainAxis:w!==`none`,crossAxis:de,limiter:u||E?void 0:mu(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=Qi(Ji(e.placement)),i=r===`y`?t:n,a=r===`y`?H.left+H.right:H.top+H.bottom;return{offset:i/2+a/2}})},[re,u,E,D,H,w]);C===`shift`||w===`shift`||B===`center`?le.push(W,fe):le.push(fe,W),le.push(gu({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(Kd,`${t}px`),i.setProperty(qd,`${n}px`);let a=Ce(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Ud,`${u}px`),i.setProperty(Wd,`${d}px`)}}),Rd(e=>({element:ie.current||Re(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Ji(r),u=Yi(r),d=Qi(l)===`y`,f=ie.current,p=typeof a==`function`?a(Yd(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return de&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Gd,d?`${m} ${h}`:`${h} ${m}`),{}}},zd,b),J(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let pe=Y.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:me,elements:he,x:ge,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:K}=t({rootContext:h,open:m?g:void 0,placement:V,middleware:le,strategy:r,whileElementsMounted:m?void 0:(...e)=>$l(...e,pe),nodeId:y,externalTree:S}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||Bd,Ee=Se?r:`fixed`,De=Y.useMemo(()=>{let e;return e=Se?b?{position:Ee,[we]:ge,[Te]:_e}:{...K,position:Ee}:{position:Ee,top:0,left:0},e[Kd]=`100vw`,e[qd]=`100vh`,Se||(e.opacity=0),e},[b,Ee,we,ge,Te,_e,K,Se]),q=Y.useRef(null);J(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(Qd(t)?t.current:t)||null;n!==q.current&&(me.setPositionReference(n),q.current=n)},[g,me,A,j]),Y.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&Qd(e)&&e.current!==q.current&&(me.setPositionReference(e.current),q.current=e.current)},[g,me,A,j]),Y.useEffect(()=>{if(m&&g&&he.reference&&he.floating)return $l(he.reference,he.floating,ye,pe)},[m,g,he,ye,pe]);let Oe=Ji(be),ke=Jd(i,Oe,N),Ae=Yi(be)||`center`,je=!!ve.hide?.referenceHidden;J(()=>{x&&g&&Se&&(Oe!==z||I&&Ae!==B)&&F(be)},[x,I,g,Se,be,Oe,Ae,z,B]);let Me=Y.useMemo(()=>({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Ne=ve.arrow?.centerOffset!==0;return Y.useMemo(()=>({positionerStyles:De,arrowStyles:Me,arrowRef:ie,arrowUncentered:Ne,side:ke,align:Ae,physicalSide:Oe,anchorHidden:je,refs:me,context:xe,isPositioned:Se,update:ye}),[De,Me,ie,Ne,ke,Ae,Oe,je,me,xe,Se,ye])}function Qd(e){return e!=null&&`current`in e}function $d(e){return e===`starting`?vs:Te}function ef(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),q(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},$d(r),i],stateAttributesMapping:xi})}var tf=Y.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=bs,style:g,..._}=e,v=gd(),y=kd(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Xd({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=ef(e,Y.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,X.jsx)(Md.Provider,{value:D,children:O})}),nf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=gd(),{side:s,align:c}=Nd(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);ao({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Yc(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return q(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Xs,f,$d(d),a],stateAttributesMapping:Si})}),rf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=gd(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Nd(),f={open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)};return q(`div`,e,{state:f,ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:xi})});function af(e){let[t,n]=Y.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function of({...e}){return(0,X.jsx)(xd,{"data-slot":`tooltip`,...e})}function sf({...e}){return(0,X.jsx)(Dd,{"data-slot":`tooltip-trigger`,...e})}function cf({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,X.jsx)(jd,{children:(0,X.jsx)(tf,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,X.jsxs)(nf,{"data-slot":`tooltip-content`,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,X.jsx)(rf,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var lf=`sidebar_state`,uf=604800,df=`16rem`,ff=`18rem`,pf=`3rem`,mf=`b`,hf=Y.createContext(null);function gf(){let e=Y.useContext(hf);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function _f({defaultOpen:e=!0,keyboardShortcut:t=!0,open:n,onOpenChange:r,className:i,style:a,children:o,...s}){let c=fr(),[l,u]=Y.useState(!1),[d,f]=Y.useState(e),p=n??d,m=Y.useCallback(e=>{let t=typeof e==`function`?e(p):e;r?r(t):f(t),document.cookie=`${lf}=${t}; path=/; max-age=${uf}`},[r,p]),h=Y.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);Y.useEffect(()=>{let e=e=>{t&&e.key===mf&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,t]);let g=p?`expanded`:`collapsed`,_=Y.useMemo(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,X.jsx)(hf.Provider,{value:_,children:(0,X.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":df,"--sidebar-width-icon":pf,...a},className:K(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,i),...s,children:o})})}function vf({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=gf();return n===`none`?(0,X.jsx)(`div`,{"data-slot":`sidebar`,className:K(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,X.jsx)(cd,{open:l,onOpenChange:u,...o,children:(0,X.jsxs)(dd,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":ff},side:e,children:[(0,X.jsxs)(fd,{className:`sr-only`,children:[(0,X.jsx)(pd,{children:`Sidebar`}),(0,X.jsx)(md,{children:`Displays the mobile sidebar.`})]}),(0,X.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,X.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,X.jsx)(`div`,{"data-slot":`sidebar-gap`,className:K(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,X.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:K(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,X.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function yf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function bf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function xf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:K(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Sf({className:e,...t}){return(0,X.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:K(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Cf({className:e,...t}){return(0,X.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:K(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function wf({className:e,...t}){return(0,X.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:K(`group/menu-item relative`,e),...t})}var Tf=_e(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Ef({render:e,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let{isMobile:s,state:c}=gf(),l=ur({defaultTagName:`button`,props:Ne({className:K(Tf({variant:n,size:r}),a)},o),render:i?(0,X.jsx)(sf,{render:e}):e,state:{slot:`sidebar-menu-button`,sidebar:`menu-button`,size:r,active:t}});return i?(typeof i==`string`&&(i={children:i}),(0,X.jsxs)(of,{children:[l,(0,X.jsx)(cf,{side:`right`,align:`center`,hidden:c!==`collapsed`||s,...i})]})):l}function Df({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=Y.useRef(e!==void 0),[a,o]=Y.useState(()=>t);return[i&&e!==void 0?e:a,Y.useCallback(e=>{i||o(e)},[])]}function Of(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var kf=`data-checked`,Af=`data-unchecked`;function jf(e){return{checked(t){return e.indeterminate?{}:t?{[kf]:``}:{[Af]:``}},..._r}}var Mf=Y.createContext(void 0);function Nf(){return Y.useContext(Mf)}var Pf=Y.createContext(void 0);function Ff(){let e=Y.useContext(Pf);if(e===void 0)throw Error(ge(14));return e}var If=`data-parent`,Lf=Y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=Sr(),{disabled:C,name:w,setDirty:T,setFilled:E,setTouched:D,state:O,validationMode:k,validityData:A,validation:j}=br(),M=Ya(),{labelId:N,registerControlId:P,getDescriptionProps:F}=Ar(),I=Nf(),L=I?.allValues===void 0?void 0:I.parent,R=L!==void 0,z=C||M.disabled||I?.disabled||o,B=w??d,V=v??B,H=Or(),ee=I?.registerControlId!==P,te=Pr({id:c||void 0,enabled:ee}),U=y?te:H,ne={};R&&(p?ne=L.getParentProps():V!==void 0&&(ne=L.getChildProps(V)));let{checked:re=n,indeterminate:ie=l,onCheckedChange:ae,...oe}=ne,se=I?.value,ce=Y.useRef(null),le=so(z,ce),{getButtonProps:ue,buttonRef:de}=Oe({disabled:z,native:y}),fe=I?.validation??j,[W,pe]=Df({controlled:V!==void 0&&se!==void 0&&!p?se.includes(V):re,default:i,name:`Checkbox`,state:`checked`}),me=R?!!re:W,he=R&&ie||l;co(ce,H,W,void 0,!I&&!z,d);let ge=L?.registerChildId,_e=Y.useRef(null),G=fe.registerInput,ve=I?V:void 0,ye=Y.useCallback(e=>G(e,{controlRef:ce,value:ve}),[G,ve]),xe=be(u,_e,p?void 0:ye),Se=jr(a,N,_e,!y,te,x[`aria-label`]);J(()=>{_e.current&&(_e.current.indeterminate=he),I||E(W)},[W,he,I,E]),lo(W,()=>{I||(S(B),T(W!==A.initialValue),fe.change(W))});let K=Ne({checked:W,disabled:z,form:s,name:p?void 0:B,id:y?void 0:te,required:g,ref:xe,style:B?ns:ts,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Q(fo,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(ae?.(t,n),!n.isCanceled&&(pe(t),V!==void 0&&I!==void 0&&!p&&!R))){let e=t?[...I.value,V]:I.value.filter(e=>e!==V);I.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){ce.current?.focus()}},v===void 0?Te:{value:(I?W&&v:v)||``},F,e=>fe.getValidationProps(z,e));Y.useEffect(()=>{if(!L||V===void 0)return;let e=L.disabledStatesRef.current;return e.set(V,z),()=>{e.delete(V)}},[L,z,V]);let we=Y.useMemo(()=>({...O,checked:me,disabled:z,readOnly:m,required:g,indeterminate:he}),[O,me,z,m,g,he]),De=jf(we),ke=q(`span`,e,{state:we,ref:[de,ce,t],props:[{id:U,role:`checkbox`,"aria-checked":he?`mixed`:me,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Se,[If]:p?``:void 0,onFocus(){le(!0)},onBlur(){let e=_e.current;e&&(D(!0),le(!1),k===`onBlur`&&fe.commit(I?se:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=_e.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Ce(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||Of(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=_e.current;t&&Ee(t,e)}},x,oe,ue,F,e=>fe.getValidationProps(z,e)],stateAttributesMapping:De}),Ae=ke.props.id;return J(()=>{if(ge&&!p&&V!==void 0&&Ae!==void 0)return ge(V,Ae)},[ge,p,V,Ae]),(0,X.jsxs)(Pf.Provider,{value:we,children:[ke,!W&&!I&&B&&!p&&_!==void 0&&(0,X.jsx)(`input`,{type:`hidden`,form:s,name:B,value:_,disabled:z}),(0,X.jsx)(`input`,{...K,suppressHydrationWarning:!0})]})}),Rf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Ff(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=oo(c),f=Y.useRef(null),p={...s,transitionStatus:u};ao({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...jf(s),...ci},h=a||l,g=q(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function zf({className:e,...t}){return(0,X.jsx)(Lf,{"data-slot":`checkbox`,className:K(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary`,e),...t,children:(0,X.jsx)(Rf,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,X.jsx)(mt,{})})})}function Bf({className:e,size:t=`default`,...n}){return(0,X.jsxs)(`div`,{className:K(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":t,children:[(0,X.jsx)(`select`,{"data-slot":`native-select`,"data-size":t,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...n}),(0,X.jsx)(ut,{className:`pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function Vf({className:e,...t}){return(0,X.jsx)(`option`,{"data-slot":`native-select-option`,className:K(`bg-[Canvas] text-[CanvasText]`,e),...t})}var Hf=Y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Uf(){return Y.useContext(Hf)}function Wf(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=G(i),[,o]=Y.useState(0),s=Fe(Kf).current,c=Fe(Gf).current,l=Y.useRef(0),u=Y.useRef(!0),d=Y.useRef(null),f=Y.useRef(null),p=G(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=G((e,t)=>{c.set(e,t),p()}),h=G(e=>{c.delete(e),p()}),g=G(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Yf(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Xf(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Jf(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=G(()=>{let[e,t]=qf(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});J(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),J(()=>{u.current&&v()}),J(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=G(e=>(s.add(e),()=>{s.delete(e)})),b=Y.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,X.jsx)(Hf.Provider,{value:b,children:t})}function Gf(){return new Map}function Kf(){return new Set}function qf(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Xf(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Jf(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Yf(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Xf(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var Zf=Y.createContext(void 0);function Qf(){let e=Y.useContext(Zf);if(e===void 0)throw Error(ge(64));return e}var $f=`data-activation-direction`,ep={tabActivationDirection:e=>({[$f]:e})},tp=Y.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=Y.useRef([]),[f,p]=Y.useState(()=>new Map),[m,h]=Df({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=Y.useState(()=>new Map),y=Y.useRef(void 0),b=Y.useCallback(e=>np(_,e),[_]),[x,S]=Y.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==m&&(T=rp(C,m,a,_),E=C!=null&&m!=null&&b(m)==null);let D=E?C:m,O=C!==D||w!==T;J(()=>{O&&S({previousValue:D,tabActivationDirection:T})},[D,O,T]);let k=G((e,t)=>{t.activationDirection=rp(m,e,a,_),i?.(e,t),!t.isCanceled&&h(()=>e)}),A=G((e,t)=>{i?.(e,Q(t,void 0,void 0,{activationDirection:`none`}))}),j=G((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),M=Y.useCallback(e=>f.get(e),[f]),N=Y.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),P=Y.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:N,getTabPanelIdByValue:M,onValueChange:k,orientation:a,registerMountedTabPanel:j,setTabMap:v,tabActivationDirection:T,value:m}),[b,N,M,k,a,j,v,T,m]),F=Y.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),I=Y.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),L=Y.useRef(!u),R=Y.useRef(r),z=Y.useRef(u),B=Y.useRef(!1);J(()=>{if(g)return;function e(e,t){h(()=>e),S({previousValue:e,tabActivationDirection:`none`}),A(e,t),L.current=!1}if(_.size===0){B.current&&m!==null&&!y.current?.isConnected&&e(null,Oo);return}B.current=!0,y.current=_.keys().next().value;let t=F?.disabled,n=F==null&&m!==null;if(!t&&m===R.current&&(z.current=!1),z.current&&t&&m===R.current)return;let r=L.current;if(t||n){let n=I??null;if(m===n){L.current=!1;return}let i=Oo;r?i=ko:t&&(i=Do),e(n,i)}else r&&F!=null&&(A(m,ko),L.current=!1)},[I,g,A,F,h,_,m]);let V=q(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:ep});return(0,X.jsx)(Zf.Provider,{value:P,children:(0,X.jsx)(Wf,{elementsRef:d,children:V})})});function np(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function rp(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=np(r,e),c=np(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var ip=`data-composite-item-active`;function ap(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Uf(),u=Y.useRef(-1),[d,f]=Y.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=Y.useRef(null),h=Y.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return J(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function op(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=xe(),{ref:i,index:a}=ap(e),o=n===a,s=Y.useRef(null),c=be(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}var sp=Y.createContext(void 0);function cp(){let e=Y.useContext(sp);if(e===void 0)throw Error(ge(65));return e}var lp=Y.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=Qf(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=cp(),{highlightedIndex:v,onHighlightedIndexChange:y}=xe(),b=Or(o),{compositeProps:x,compositeRef:S,index:C}=op({metadata:Y.useMemo(()=>({disabled:r,id:b,value:a}),[r,b,a])}),w=a===u,T=Y.useRef(!1),E=Y.useRef(null),D=G(e=>{E.current?.(),E.current=e?g(e):null});J(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&v!==C))return;let e=_;if(e!=null){let t=Yr(Re(e));if(t&&Z(e,t))return}r||y(C)},[w,C,v,y,r,_]);let{getButtonProps:O,buttonRef:k}=Oe({disabled:r,native:s,focusableWhenDisabled:!0}),A=d(a),j=Y.useRef(!1),M=Y.useRef(!1);function N(e){f(a,Q(fo,e.nativeEvent,void 0,{activationDirection:`none`}))}function P(e){w||r||N(e)}function F(e){w||r||h&&(!j.current||M.current)&&N(e)}function I(e){if(w||r)return;j.current=!0,M.current=e.button===0;let t=Re(e.currentTarget);function n(){j.current=!1,M.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return q(`button`,e,{state:{disabled:r,active:w,orientation:p,tabActivationDirection:m},ref:[t,k,S,D],props:[x,{role:`tab`,"aria-controls":A,"aria-selected":w,id:b,onClick:P,onFocus:F,onPointerDown:I,[ip]:w?``:void 0,onKeyDownCapture(){T.current=!0}},l,O],stateAttributesMapping:ep})}),up=()=>()=>{},dp=()=>!0,fp=()=>!1;function pp(){return(0,Sc.useSyncExternalStore)(up,dp,fp)}function mp(){let[e,t]=Y.useState(!1);return Y.useEffect(()=>{t(!0)},[]),e}var hp=ye(18)?pp:mp;function gp(){return!hp()}var _p=Y.createContext(void 0),vp={disableStyleElements:!1};function yp(){return Y.useContext(_p)??vp}function bp(e){let{script:t}=e,{nonce:n}=yp();return gp()?(0,X.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var xp=`data-index`,Sp={...ep,...ci},Cp=Y.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=Qf(),p=Or(),{ref:m,index:h}=ap(),g=r===c,{mounted:_,transitionStatus:v,setMounted:y}=oo(g),b=!_,x=l(r),S={hidden:b,orientation:u,tabActivationDirection:d,transitionStatus:v},C=Y.useRef(null),w=q(`div`,e,{state:S,ref:[t,m,C],props:[{"aria-labelledby":x,hidden:b,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:Lu(!g),[xp]:h},s],stateAttributesMapping:Sp});return ao({open:g,ref:C,onComplete(){g||y(!1)}}),J(()=>{if(!(p==null||b&&!a))return f(r,p)},[b,a,r,p,f]),a||_?w:null});function wp(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function Tp(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=ve}=e,[p,m]=Y.useState(0),h=r!=null,g=Y.useRef(null),_=be(g,c),v=Y.useRef([]),y=Y.useRef(!1),b=Y.useRef(null),x=o??p,S=G((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Au(g.current,t,a,n)}}),C=G(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(b.current);if(t===-1){let t=e[x];!t||va(e,x,d)?S(Ep(e,d)):b.current=t}else t!==x&&S(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)S(i);else if(va(t,x,d)){let e=_a(t,{disabledIndices:d});pa(t,e)||S(e)}Au(g.current,r,a,n)});J(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(va(e,x,d)){let t=_a(e,{disabledIndices:d});pa(e,t)||S(t)}},[d,o,x,v,S]);let w=G((e,t,n)=>i?i(e,t,n,v):n),T=G(e=>{let o=e.key===`Home`||e.key===`End`;if(!Eu.has(e.key)||!l&&o||Dp(e,f)||!g.current)return;let s=a===`rtl`,c=s?xu:Su,p=s?Su:xu,m=n===`vertical`?bu:c,_=n===`vertical`?yu:p,y=Zr(e.nativeEvent);if(y!=null&&ku(y)&&!wp(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=x,C=ma(v,d),T=ha(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:x,loopFocus:t,maxIndex:T,minIndex:C,onLoop:w,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=C:e.key===`End`&&(b=T)),b===x&&(E||D)&&(t&&b===T&&E?(b=C,i&&(b=i(e,x,b,v))):t&&b===C&&D?(b=T,i&&(b=i(e,x,b,v))):b=_a(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!pa(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=Zr(e.nativeEvent);t&&n!=null&&ku(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function Ep(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!va(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Dp(e,t){for(let n of Du)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Op(e){let{render:t,className:n,style:r,refs:i=ve,props:a=ve,state:o=Te,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:O}=Tp({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:Id(),disabledIndices:v,modifierKeys:y}),k=q(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),A=Y.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,X.jsx)(Se.Provider,{value:A,children:(0,X.jsx)(Wf,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:k})})}var kp=Y.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=Qf(),[d,f]=Y.useState(0),[p,m]=Y.useState(null),h=Y.useRef(new Set),g=Y.useRef(new Set),_=Y.useRef(null);J(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=G(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=G(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),b={orientation:c,tabActivationDirection:u},x={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},S=Y.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,X.jsx)(sp.Provider,{value:S,children:(0,X.jsx)(Op,{render:a,className:r,style:o,state:b,refs:[t,m],props:[x,s],stateAttributesMapping:ep,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:ve})})});function Ap({className:e,orientation:t=`horizontal`,...n}){return(0,X.jsx)(tp,{"data-slot":`tabs`,"data-orientation":t,className:K(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var jp=_e(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Mp({className:e,variant:t=`default`,...n}){return(0,X.jsx)(kp,{"data-slot":`tabs-list`,"data-variant":t,className:K(jp({variant:t}),e),...n})}function Np({className:e,...t}){return(0,X.jsx)(lp,{"data-slot":`tabs-trigger`,className:K(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Pp({className:e,...t}){return(0,X.jsx)(Cp,{"data-slot":`tabs-content`,className:K(`flex-1 text-sm outline-none`,e),...t})}function Fp(e,t){return{throttle:+!!e,steer:0,action:t&&!e,boost:!1}}var Ip=class{sim=new S;constructor(e){this.reset(e)}reset(e){this.sim.setMode(`car`),this.sim.setPreset(e),this.sim.barrier=!1,this.sim.body.position={x:0,y:0},this.sim.body.velocity={x:0,y:0},this.sim.body.angle=0,this.sim.body.spin=0}step(e,t,n=!1){let r=Fp(t===`engine`,!1);n&&t===`engine`&&(this.sim.body.velocity.x+=(24-this.sim.body.velocity.x)*(1-Math.exp(-e*5))),this.sim.tick(r,e);let a=i(this.sim.body.velocity);return{controls:r,speedMps:a,active:t!==null||a>.45}}};function Lp({preset:e,point:t=null,onPlace:n,enabledTools:r,masterVolume:a=1}){let o=(0,Y.useRef)(null),s=(0,Y.useRef)(null),[c,l]=(0,Y.useState)(()=>typeof document<`u`&&document.documentElement.classList.contains(`dark`)),[u,d]=(0,Y.useState)(`idle`),[m,h]=(0,Y.useState)(null),[g,_]=(0,Y.useState)(0),v=(0,Y.useRef)(``),b=a>0?a:.65,x=u===`boosting`&&!r.includes(`boost`)||u===`firing`&&!r.includes(`machineGun`)||u===`rocket`&&!r.includes(`rocket`)?`idle`:u,C=(0,Y.useRef)({preset:e,point:t,dark:c,state:u,held:m,masterVolume:a});C.current={preset:e,point:t,dark:c,state:x,held:m,masterVolume:b};let T=()=>{h(null),s.current?.sound?.setHorn(!1)};(0,Y.useEffect)(()=>{let e=o.current;if(!e)return;let t=new S;t.setMode(`car`),t.setPreset(C.current.preset),t.barrier=!1;let n=new f(`preview`,t),r=new V(e,!1,`high`,!0);r.speedZoom=!1,r.deadZone=!1,r.cameraSmoothing=0,r.setTireSmokeEnabled(!1),r.setScreenShakeEnabled(!1);let a=new Ip(C.current.preset);s.current={renderer:r,vehicle:n,sound:null,audioMotion:a};let c=0,l=0,u=0,d=0,m=o=>{if(c=requestAnimationFrame(m),document.hidden||!e.clientWidth||!e.clientHeight){l=o;return}let f=Math.min(1/30,Math.max(0,(o-(l||o))/1e3));l=o;let h=C.current,g=s.current?.sound,v=h.state===`boosting`||h.held===`engine`,b=Fp(v,h.dark);v?h.state===`boosting`&&(t.body.velocity={x:t.body.velocity.x+(24-t.body.velocity.x)*(1-Math.exp(-f*5)),y:0}):t.body.velocity={x:0,y:0},t.tick(b,f,g?.rpm);let x=i(t.body.velocity);o-u>=100&&(_(Math.round(x*2.236936)),u=o),t.body.angle=0,t.body.spin=0;let S=a.step(f,h.held,h.state===`boosting`);g?.setActive(S.active),g?.setMasterVolume(h.masterVolume),g?.setHorn(h.held===`horn`),g?.update(f,S.controls,S.speedMps),g&&r.queueExhaustPops(g.takeExhaustPops()),t.lastInput={...b,machineGun:h.state===`firing`},n.weapons.rocket.previewOpen=h.state===`rocket`,d+=f,h.state===`boosting`&&!h.preset.sound.electric&&d>=.08&&(r.queueExhaustPops([.95]),d=0),r.setSurfaceTone(h.dark?`dark`:`light`);let w=Math.min(e.clientWidth/(28*Math.max(6.8,h.preset.geometry.lengthM+2.4)),e.clientHeight/(28*Math.max(4.8,h.preset.geometry.widthM+2.6)));if(r.setCanvasWorldScale(w,4),r.advanceEffects(n,f,{driven:!1}),r.render(n,o),h.point){let n=e.getContext(`2d`),i=h.preset.geometry,a=p(h.preset),o,s,c=h.point;c===`front`||c===`rear`?(o=c===`front`?i.frontAxleXM??i.wheelbaseM/2:i.rearAxleXM??-i.wheelbaseM/2,s=(c===`front`?i.frontTrackWidthM??i.trackWidthM:i.rearTrackWidthM??i.trackWidthM)/2):c===`headlights`||c===`taillights`?{xM:o,yM:s}=a[c]:c===`door`?(o=y(h.preset).xM,s=i.widthM*.43):{xM:o,yM:s}=h.preset.roofRocket,n.save(),n.setTransform(e.width/e.clientWidth,0,0,e.height/e.clientHeight,0,0);for(let e of c===`roof`?[1]:[-1,1]){let i=r.viewportFromDocument(r.documentPoint(t.body.world({x:o,y:s*e})));n.beginPath(),n.arc(i.x,i.y,7,0,Math.PI*2),n.fillStyle=`#fff`,n.fill(),n.strokeStyle=`#18181b`,n.lineWidth=2,n.stroke(),n.beginPath(),n.arc(i.x,i.y,12,0,Math.PI*2),n.strokeStyle=h.dark?`#fff9`:`#18181b88`,n.lineWidth=1,n.stroke()}n.restore()}};c=requestAnimationFrame(m);let g=()=>{h(null),s.current?.sound?.setHorn(!1)},v=()=>{g(),a.reset(C.current.preset),s.current?.sound?.setActive(!1)};return window.addEventListener(`blur`,v),document.addEventListener(`visibilitychange`,v),window.addEventListener(`pointerup`,g),window.addEventListener(`pointercancel`,g),()=>{cancelAnimationFrame(c),window.removeEventListener(`blur`,v),window.removeEventListener(`pointerup`,g),window.removeEventListener(`pointercancel`,g),document.removeEventListener(`visibilitychange`,v),s.current?.sound?.dispose(),r.dispose(),n.dispose(),s.current=null}},[]),(0,Y.useEffect)(()=>{T();let t=s.current;if(!t)return;t.vehicle.setPreset(e),t.audioMotion.reset(e),t.sound?.setActive(!1);let n=JSON.stringify(e.sound);v.current!==n&&(t.sound?.setPreset(e),v.current=n)},[e]);let E=t=>{let n=s.current;n&&(n.sound||=new w(e,{idleSound:!1,masterVolume:b}),n.sound.setActive(!0),n.sound.start(),n.sound.setHorn(t===`horn`),h(t))},D=e=>({onPointerDown:t=>{t.button===0&&(t.currentTarget.setPointerCapture(t.pointerId),E(e))},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:T,onBlur:T,onKeyDown:t=>{(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),t.repeat||E(e))},onKeyUp:e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),T())},"aria-pressed":m===e});return(0,X.jsxs)(`div`,{className:`grid min-w-0 gap-3`,children:[(0,X.jsx)(Ap,{value:x,onValueChange:e=>{T(),d(e)},children:(0,X.jsxs)(Mp,{className:`w-full`,"aria-label":`Vehicle preview state`,children:[(0,X.jsx)(Np,{value:`idle`,children:`Idle`}),r.includes(`boost`)&&(0,X.jsx)(Np,{value:`boosting`,children:`Boosting`}),r.includes(`machineGun`)&&(0,X.jsx)(Np,{value:`firing`,children:`Firing`}),r.includes(`rocket`)&&(0,X.jsx)(Np,{value:`rocket`,children:`Rocket open`})]})}),(0,X.jsxs)(`div`,{className:`relative overflow-hidden rounded-xl border border-border`,style:{colorScheme:c?`dark`:`light`,backgroundColor:c?`#171b1d`:`#fafbfc`},children:[(0,X.jsx)(`canvas`,{ref:o,className:`block h-[220px] w-full max-sm:h-[190px] ${n&&t?`cursor-crosshair`:``}`,role:`img`,"aria-label":`${e.name} ${u} preview${t?`; place ${t}`:``}`,onClick:r=>{if(!n||!t||!s.current)return;let i=r.currentTarget.getBoundingClientRect(),a=s.current.renderer,o=a.worldFromDocument(a.documentFromViewport({x:(r.clientX-i.left)/i.width*r.currentTarget.clientWidth,y:(r.clientY-i.top)/i.height*r.currentTarget.clientHeight})),c=e.geometry,l=s.current.vehicle.sim.body,u=o.x-l.position.x,d=o.y-l.position.y;Math.abs(u)<=c.lengthM/2&&Math.abs(d)<=c.widthM/2&&n(u,d)}}),(0,X.jsx)(De,{variant:`outline`,size:`icon-sm`,className:`absolute right-3 top-3 bg-background text-foreground`,onClick:()=>l(!c),"aria-label":c?`Use light preview surface`:`Use dark preview surface`,children:c?(0,X.jsx)(Dt,{}):(0,X.jsx)(Ct,{})}),(0,X.jsx)(`span`,{className:`pointer-events-none absolute bottom-3 left-3 text-[10px]`,style:{color:c?`#aaa`:`#737373`},children:c?`Night · lights auto`:`Day · lights auto`}),(x===`boosting`||m===`engine`)&&(0,X.jsxs)(`output`,{"aria-label":`Simulated speed`,className:`pointer-events-none absolute bottom-3 right-3 text-[10px] tabular-nums`,style:{color:c?`#aaa`:`#737373`},children:[g,` mph`]})]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsxs)(De,{variant:`outline`,size:`sm`,className:`touch-none select-none`,...D(`engine`),children:[(0,X.jsx)(yt,{}),` Engine`]}),(0,X.jsxs)(De,{variant:`outline`,size:`sm`,className:`touch-none select-none`,...D(`horn`),children:[(0,X.jsx)(N,{}),` Horn`]}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Press and hold to listen`})]})]})}function Rp(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Df({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=oo(a,!0,!0),u=Or(),[d,f]=Y.useState(),p=d===null?void 0:d??u,m=G(e=>{let t=!a,n=Q(po,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return Y.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var zp=Y.createContext(void 0);function Bp(){let e=Y.useContext(zp);if(e===void 0)throw Error(ge(15));return e}var Vp=`data-open`,Hp=`data-closed`,Up=ii,Wp=`data-panel-open`,Gp={[Vp]:``},Kp={[Hp]:``},qp={open(e){return e?{[Wp]:``}:null}},Jp={open(e){return e?Gp:Kp}},Yp={...Jp,...ci},Xp=Y.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=G(o),d=Rp({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=Y.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=Y.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=q(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:Yp});return(0,X.jsx)(zp.Provider,{value:p,children:m})}),Zp={...qp,...ci},Qp=Y.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Bp(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=Oe({disabled:c,native:u});return q(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:Zp})}),$p={height:void 0,width:void 0};function em(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=Y.useRef(null),f=Y.useRef(null),[p,m]=Y.useState($p),h=Y.useRef($p),g=Y.useRef(!1),_=Y.useRef(s),v=Y.useRef(!1),[y,b]=Y.useState(!1),x=Y.useRef(null),S=be(t,d),C=Qo(s),w=io(d),T=!s&&!a,E=y?`idle`:u,D=s&&(_.current||v.current),O=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,k=n&&T&&f.current!==`css-animation`,A=G((e,t=!0)=>{t&&(h.current=e),m(e)}),j=G(()=>{x.current?.(),x.current=null}),M=G(e=>{j(),x.current=()=>{x.current=null,e()}}),N=G(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});J(()=>{y&&u!==`starting`&&b(!1)},[y,u]),Y.useEffect(()=>()=>{N(),j()},[N,j]),J(()=>{s||(_.current=!1,v.current=!1);let e=d.current;if(!e)return;!s&&x.current&&j();let t=nm(e,D);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=tm(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){A(tm(e)),b(!0);return}if(t===`css-transition`){let t=am(e);if(A(tm(e)),!n)return t;let r=im(e,`transition-duration`,`0s`);return M(r),b(!0),t}A(tm(e));let r=im(e,`animation-name`,`none`);if(!n){r();return}let i=im(e,`animation-duration`,`0s`);r(),M(i),b(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){A($p,!1),c(!1);return}A(tm(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=tm(e);n.height>0||n.width>0?(A(n),t===`css-animation`&&im(e,`animation-name`,`none`)()):c(!1)},[a,s,j,A,c,M,D,u]),ao({enabled:s&&a&&E===`idle`,open:!0,ref:d,onComplete(){s&&A($p,!1)}}),Y.useEffect(()=>{if(s||!a||E!==`ending`)return;if(!d.current){c(!1),A($p,!1);return}let e=new AbortController,t=-1;function n(){C.current||(c(!1),A($p,!1))}return t=Qa.request(()=>{w(n,e.signal)}),()=>{Qa.cancel(t),e.abort()}},[C,a,s,E,w,A,c]),J(()=>{let e=d.current;e&&n&&T&&e.setAttribute(`hidden`,`until-found`)},[T,n]),Y.useEffect(function(){let e=d.current;if(!e)return;let t=Ka.create(),n=-1,r=(r,i)=>{t.start(0,()=>{C.current||(n=Qa.request(()=>{C.current||(r&&(g.current=!1),i&&e.setAttribute(Up,``),e.setAttribute(`hidden`,`until-found`))}))})},i=Xo(e,`beforematch`,t=>{let n=Q(fo,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}g.current=!0;let i=e.hasAttribute(Up);e.removeAttribute(Up),l(!0),r(!0,i)});return()=>{t.clear(),Qa.cancel(n),i()}},[C,o,l]);let P=i||n||a||s;return{height:O.height,props:{...k?{[Up]:``}:void 0,hidden:T,id:r},ref:S,shouldPreventOpenAnimation:D,shouldRender:P,transitionStatus:E,width:O.width}}function tm(e){return{height:e.scrollHeight,width:e.scrollWidth}}function nm(e,t){let n=Ce(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&rm(n.animationDuration),i=rm(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function rm(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function im(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function am(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=Qa.request(n);return()=>{Qa.cancel(r),n()}}var om=`--collapsible-panel-height`,sm=`--collapsible-panel-width`,cm=Y.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=Bp(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;J(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=em({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=Ae(s,k),j=q(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[om]:S===void 0?`auto`:`${S}px`,[sm]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Yp});return E?j:null});function lm({...e}){return(0,X.jsx)(Xp,{"data-slot":`collapsible`,...e})}function um({...e}){return(0,X.jsx)(Qp,{"data-slot":`collapsible-trigger`,...e})}function dm({...e}){return(0,X.jsx)(cm,{"data-slot":`collapsible-content`,...e})}var fm=Y.createContext(void 0);function pm(){let e=Y.useContext(fm);if(e===void 0)throw Error(ge(10));return e}var mm={value:()=>null},hm=Y.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,hiddenUntilFound:a,keepMounted:o,loopFocus:s,onValueChange:c,multiple:l=!1,orientation:u=`vertical`,value:d,defaultValue:f,style:p,...m}=e,h=f??ve,g=Y.useRef([]),[_,v]=Df({controlled:d,default:h,name:`Accordion`,state:`value`}),y=G((e,t,n)=>{let r;r=l?t?[..._,e]:_.filter(t=>t!==e):_[0]===e?[]:[e],c?.(r,n),!n.isCanceled&&v(r)}),b=Y.useMemo(()=>({value:_,disabled:i,orientation:u}),[_,i,u]),x=Y.useMemo(()=>({disabled:i,handleValueChange:y,hiddenUntilFound:a??!1,keepMounted:o??!1,state:b,value:_}),[i,y,a,o,b,_]),S=q(`div`,e,{state:b,ref:t,props:m,stateAttributesMapping:mm});return(0,X.jsx)(fm.Provider,{value:x,children:(0,X.jsx)(Wf,{elementsRef:g,children:S})})}),gm=Y.createContext(void 0);function _m(){let e=Y.useContext(gm);if(e===void 0)throw Error(ge(9));return e}var vm=`data-index`,ym={...Jp,index:e=>({[vm]:String(e)}),...ci,value:()=>null},bm=Y.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:i,render:a,value:o,style:s,...c}=e,{ref:l,index:u}=ap(),{disabled:d,handleValueChange:f,state:p,value:m}=pm(),h=Or(),g=o??h,_=r||d,v=m.includes(g),y=G((e,t)=>{i?.(e,t),!t.isCanceled&&f(g,e,t)}),b=Rp({open:v,onOpenChange:y,disabled:_}),x=Y.useMemo(()=>({...b,onOpenChange:y,state:{open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}}),[b,y]),S=Y.useMemo(()=>({...p,hidden:!v&&!b.mounted,index:u,disabled:_,open:v}),[b.mounted,_,u,v,p]),C=Or(),[w,T]=Y.useState(),E=w===null?void 0:w??C,D=Y.useMemo(()=>({defaultTriggerId:C,open:v,state:S,setTriggerId:T,triggerId:E}),[C,v,S,T,E]),O=q(`div`,e,{state:S,ref:[t,l],props:c,stateAttributesMapping:ym});return(0,X.jsx)(zp.Provider,{value:x,children:(0,X.jsx)(gm.Provider,{value:D,children:O})})}),xm=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=_m();return q(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:ym})}),Sm={...ym,...qp},Cm=Y.forwardRef(function(e,t){let{disabled:n,className:r,id:i,render:a,nativeButton:o=!0,style:s,...c}=e,{panelId:l,open:u,handleTrigger:d,disabled:f}=Bp(),{getButtonProps:p,buttonRef:m}=Oe({disabled:n||f,native:o}),{defaultTriggerId:h,state:g,setTriggerId:_}=_m(),v=i||void 0,y=v??h;return J(()=>(_(e=>v??(e===null?void 0:e)),()=>{_(e=>e===v?null:e)}),[v,_]),q(`button`,e,{state:g,ref:[t,m],props:[{"aria-controls":u?l:void 0,"aria-expanded":u,id:y,onClick:d},c,p],stateAttributesMapping:Sm})}),wm=`--accordion-panel-height`,Tm=`--accordion-panel-width`,Em=Y.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,id:a,render:o,style:s,...c}=e,{hiddenUntilFound:l,keepMounted:u}=pm(),{defaultPanelId:d,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:g,setPanelIdState:_,transitionStatus:v}=Bp(),y=r??l,b=i??u,x=a||void 0,S=a??d;J(()=>(_(e=>x??(e===null?void 0:e)),()=>{_(e=>e===x?null:e)}),[x,_]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:O,width:k}=em({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:g,transitionStatus:v}),{state:A,triggerId:j}=_m(),M={...A,transitionStatus:O},N=Ae(s,M),P=q(`div`,{...e,style:void 0},{state:M,ref:T,props:[w,{"aria-labelledby":j,role:`region`,style:{[wm]:C===void 0?`auto`:`${C}px`,[Tm]:k===void 0?`auto`:`${k}px`}},c,N?{style:N}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:ym});return D?P:null});function Dm({className:e,...t}){return(0,X.jsx)(hm,{"data-slot":`accordion`,className:K(`flex w-full flex-col`,e),...t})}function Om({className:e,...t}){return(0,X.jsx)(bm,{"data-slot":`accordion-item`,className:K(`not-last:border-b`,e),...t})}function km({className:e,children:t,...n}){return(0,X.jsx)(xm,{className:`flex`,children:(0,X.jsxs)(Cm,{"data-slot":`accordion-trigger`,className:K(`group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground`,e),...n,children:[t,(0,X.jsx)(ut,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden`}),(0,X.jsx)(pt,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline`})]})})}function Am({className:e,children:t,...n}){return(0,X.jsx)(Em,{"data-slot":`accordion-content`,className:`overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up`,...n,children:(0,X.jsx)(`div`,{className:K(`h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),children:t})})}var $=(e,t,n,r,i=.01)=>({path:e,label:t,min:n,max:r,step:i}),jm={handling:[$(`corneringAccelerationMps2`,`Cornering · m/s²`,1,100),$(`lateralResistance`,`Lateral resistance`,1,1e4,1),$(`maxSteerAngleRad`,`Max steer · rad`,.05,1.4),$(`handbrakeStrength`,`Handbrake strength`,0,2),$(`handbrakeDecelerationMps2`,`Handbrake decel · m/s²`,0,30),$(`serviceBrakeDecelerationMps2`,`Service brake · m/s²`,0,30),$(`drift.entrySpeedMps`,`Drift entry · m/s`,.2,30),$(`drift.slipAngleRad`,`Drift slip · rad`,.05,1.2)],power:[$(`engineForceN`,`Engine force · N`,100,1e5,10),$(`reversePowerRatio`,`Reverse power ratio`,.05,2),$(`maxReverseSpeedMps`,`Reverse limit · m/s`,1,30),$(`rollingResistance`,`Rolling resistance`,.1,1e4),$(`coastDecelerationMps2`,`Coast decel · m/s²`,0,30),$(`launch.minRpm`,`Launch RPM`,0,12e3,10),$(`launch.boostMps`,`Launch gain · m/s`,0,20),$(`launch.boostedBoostMps`,`Boosted launch · m/s`,0,30),$(`launch.assistDurationSeconds`,`Launch assist · s`,.05,10),$(`launch.burnoutRampSeconds`,`Burnout ramp · s`,.1,10),$(`launch.chargedSpinSeconds`,`Charged tire spin · s`,0,20),$(`launch.fireLifetimeSeconds`,`Fire lifetime · s`,0,30)],weapons:[$(`driveBoost.gainMps`,`Boost gain · m/s`,0,30),$(`driveBoost.durationSeconds`,`Boost capacity · s`,.05,10),$(`driveBoost.cooldownSeconds`,`Boost refill · s`,0,30),$(`roofRocket.xM`,`Roof hatch X · m`,-5,5),$(`roofRocket.yM`,`Roof hatch Y · m`,-2,2),$(`roofRocket.sizeM`,`Roof hatch size · m`,.1,2),$(`machineGuns.xM`,`Door / guns X · m`,-5,5),$(`machineGuns.revealM`,`Panel reveal · m`,.12,.5),$(`machineGuns.roundsPerSecond`,`Bullets per second`,2,20),$(`machineGuns.bulletSpeedMps`,`Bullet speed · m/s`,20,150),$(`machineGuns.bulletLifetimeSeconds`,`Bullet lifetime · s`,.25,3),$(`flamethrower.rangeM`,`Flame range · m`,1,12),$(`flamethrower.ignitionSeconds`,`Ignition · s`,.1,10),$(`flamethrower.spreadSeconds`,`Fire spread · s`,.5,30),$(`flamethrower.spreadRadiusPx`,`Fire spread gap · px`,0,96),$(`flamethrower.burnSeconds`,`Burn duration · s`,.5,30),$(`flamethrower.smokePerSecond`,`Smoke output`,0,50),$(`flamethrower.jetWidthM`,`Flame width · m`,.2,.9),$(`flamethrower.flowRate`,`Flame flow`,.2,2),$(`rockets.roundsPerSecond`,`Rockets per second`,.25,5),$(`rockets.launchSpeedMps`,`Rocket launch · m/s`,5,60),$(`rockets.accelerationMps2`,`Rocket acceleration`,0,100),$(`rockets.maxSpeedMps`,`Rocket max speed · m/s`,10,100),$(`rockets.lifetimeSeconds`,`Rocket lifetime · s`,.5,8),$(`rockets.smokePerSecond`,`Rocket smoke output`,0,60)],sound:[$(`sound.horn.lowHz`,`Horn low · Hz`,80,1200,1),$(`sound.horn.highHz`,`Horn high · Hz`,80,1600,1),$(`sound.horn.level`,`Horn level`,0,2)]},Mm=[$(`sound.electric.fadeStartMps`,`Warning fade start · m/s`,0,100),$(`sound.electric.fadeEndMps`,`Warning fade end · m/s`,0,100),$(`sound.electric.motorFadeStartMps`,`Motor fade start · m/s`,0,200),$(`sound.electric.motorFadeEndMps`,`Motor fade end · m/s`,0,200)];function Nm(e,t){return t.startsWith(`lights.`)&&(e={...e,lights:p(e)}),t.split(`.`).reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,e)}function Pm(e,t,n){let r=structuredClone(e);t.startsWith(`lights.`)&&(r.lights=p(e));let i=t.split(`.`),a=r;for(let e of i.slice(0,-1))a[e]&&typeof a[e]==`object`||(a[e]={}),a=a[e];return a[i.at(-1)]=n,r}var Fm=(e,t,n)=>Math.max(t,Math.min(n,e));async function Im(e,t){if(![`image/png`,`image/jpeg`,`image/webp`].includes(e.type)||e.size>15e6)throw Error(`Choose a PNG, JPEG, or WebP image under 15 MB.`);let n=URL.createObjectURL(e);try{let e=new Image;e.src=n,await e.decode();let r=document.createElement(`canvas`);r.width=1200,r.height=600;let i=r.getContext(`2d`);if(!i)throw Error(`Could not process this image.`);let a=Math.min(r.width/e.naturalWidth,r.height/e.naturalHeight),o=e.naturalWidth*a,s=e.naturalHeight*a;i.drawImage(e,(r.width-o)/2,(r.height-s)/2,o,s);let c=r.toDataURL(`image/webp`,.86);if(c.length>25e5)throw Error(`This image is too large for browser storage.`);return E(t,c,r.width,r.height,i.getImageData(0,0,r.width,r.height).data)}finally{URL.revokeObjectURL(n)}}async function Lm(e){if(!e.image||e.image.src.startsWith(`data:`))return e;let t=await fetch(e.image.src);if(!t.ok)throw Error(`Could not include the vehicle image in the JSON file.`);let n=await t.blob();if(n.size>2e6)throw Error(`This vehicle image is too large for browser storage.`);return Pm(e,`image.src`,await new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(String(r.result)),r.onerror=()=>t(Error(`Could not include the vehicle image.`)),r.readAsDataURL(n)}))}function Rm({preset:e,createNew:t=!1,garage:n,onSave:i,onDelete:a,onClose:o,enabledTools:s=r.map(e=>e.id)}){let c=s.includes(`machineGun`),l=s.includes(`flamethrower`),u=s.includes(`rocket`),[f,g]=(0,Y.useState)(()=>t?_(e):structuredClone(e)),[y,b]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{(y===`roof`&&!u||y===`door`&&!c&&!l)&&b(null)},[y,u,c,l]);let[C,w]=(0,Y.useState)(``),T=(0,Y.useRef)(null),E=(0,Y.useRef)(null),D=(e,t)=>g(n=>Pm(n,e,t)),k=(e,t)=>g(n=>{if(!y)return n;let r=structuredClone(n),i=r.geometry,a=i.lengthM/2;if(y===`front`||y===`rear`){let n=y===`front`,r=n?i.rearAxleXM??-i.wheelbaseM/2:i.frontAxleXM??i.wheelbaseM/2,o=n?Fm(e,r+.5,a-.1):Fm(e,-a+.1,r-.5),s=Fm(Math.abs(t)*2,.3,i.widthM);n?(i.frontAxleXM=o,i.frontTrackWidthM=s):(i.rearAxleXM=o,i.rearTrackWidthM=s),i.wheelbaseM=(i.frontAxleXM??i.wheelbaseM/2)-(i.rearAxleXM??-i.wheelbaseM/2)}else y===`headlights`||y===`taillights`?r.lights={...p(r),[y]:{xM:Fm(e,-a,a),yM:Fm(Math.abs(t),0,i.widthM/2)}}:y===`door`?r.machineGuns={...r.machineGuns,xM:Fm(e,-a+.5,a-.5)}:r.roofRocket={...r.roofRocket,xM:Fm(e,-a+.1,a-.1),yM:Fm(t,-i.widthM/2+.1,i.widthM/2-.1)};return r}),A=async e=>{if(e){try{let t=await Im(e,f);g(t),w(``)}catch(e){w(e instanceof Error?e.message:`Image upload failed.`)}T.current&&(T.current.value=``)}},j=async e=>{if(e){try{g(h(JSON.parse(await e.text()))),w(``)}catch(e){w(e instanceof Error?e.message:`Invalid vehicle file.`)}E.current&&(E.current.value=``)}},M=async()=>{try{let e=await Lm(h(f)),t=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:`application/json`})),n=document.createElement(`a`);n.href=t,n.download=`${f.name.toLowerCase().replace(/[^a-z0-9]+/g,`-`)||`vehicle`}.json`,n.click(),setTimeout(()=>URL.revokeObjectURL(t),1e3),w(``)}catch(e){w(e instanceof Error?e.message:`Export failed.`)}},N=async()=>{try{await i(await Lm(h(f))),w(``)}catch(e){w(e instanceof Error?e.message:`Could not save vehicle.`)}},P=e=>(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:[...jm[e],...e===`sound`&&f.sound.electric?Mm:[]].filter(({path:e})=>e.startsWith(`roofRocket.`)||e.startsWith(`rockets.`)?u:e.startsWith(`machineGuns.`)?c||l&&[`machineGuns.xM`,`machineGuns.revealM`].includes(e):e.startsWith(`flamethrower.`)?l:!e.startsWith(`driveBoost.`)||s.includes(`boost`)).map(({path:e,label:t,min:n,max:r,step:i})=>(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground`,children:[e===`machineGuns.xM`&&!c?`Side tool X · m`:t,(0,X.jsx)(Po,{type:`number`,min:n,max:r,step:i,value:typeof Nm(f,e)==`number`?Nm(f,e):e===`health`?100:e===`serviceBrakeDecelerationMps2`?m(f):``,onChange:t=>{t.target.value!==``&&D(e,Fm(Number(t.target.value),n,r))}})]},e))}),F={front:`Front wheels`,rear:`Rear wheels`,door:`Side panels`,roof:`Rocket hatch`,headlights:`Headlights`,taillights:`Taillights`};return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col text-sm`,children:[(0,X.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:(0,X.jsxs)(`div`,{className:`grid items-start gap-4 p-4 md:grid-cols-[minmax(0,1.35fr)_minmax(230px,.8fr)]`,children:[(0,X.jsxs)(`section`,{className:`grid min-w-0 gap-4`,children:[(0,X.jsx)(Lp,{preset:f,point:x??y,onPlace:y?k:void 0,enabledTools:s}),(0,X.jsx)(Dm,{onValueChange:e=>{e.includes(`points`)||(b(null),S(null))},children:(0,X.jsxs)(Om,{value:`points`,children:[(0,X.jsx)(km,{children:`Place vehicle points`}),(0,X.jsxs)(Am,{className:`grid gap-3`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Select a part, then click its position on the car. Paired points mirror automatically.`}),(0,X.jsx)(`div`,{className:`flex flex-wrap gap-2`,onMouseLeave:()=>S(null),children:[`front`,`rear`,`headlights`,`taillights`,`door`,`roof`].filter(e=>(e!==`roof`||u)&&(e!==`door`||c||l)).map(e=>(0,X.jsx)(De,{variant:y===e?`secondary`:`outline`,size:`sm`,"aria-pressed":y===e,onMouseEnter:()=>S(e),onFocus:()=>S(e),onBlur:()=>S(null),onClick:()=>b(y===e?null:e),children:F[e]},e))}),y&&(0,X.jsxs)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:[`Click to place `,F[y].toLowerCase(),`.`,` `,(0,X.jsx)(De,{variant:`link`,size:`sm`,onClick:()=>{b(null),S(null)},children:`Done`})]}),(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs text-muted-foreground`,children:[`Exhaust placement`,(0,X.jsxs)(Bf,{value:f.exhaust.layout,onChange:e=>D(`exhaust.layout`,e.target.value),children:[(0,X.jsx)(Vf,{value:`left`,children:`Left`}),(0,X.jsx)(Vf,{value:`right`,children:`Right`}),(0,X.jsx)(Vf,{value:`center`,children:`Center`}),(0,X.jsx)(Vf,{value:`left-right`,children:`Left and right`})]})]})]})]})}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsxs)(De,{size:`sm`,variant:`outline`,onClick:()=>T.current?.click(),children:[(0,X.jsx)(Ot,{}),` Replace image`]}),(0,X.jsx)(De,{size:`sm`,variant:`ghost`,onClick:()=>E.current?.click(),children:`Import JSON`}),(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>void M(),children:[(0,X.jsx)(O,{}),` Export JSON`]}),(0,X.jsx)(`input`,{ref:T,type:`file`,accept:`image/png,image/jpeg,image/webp`,hidden:!0,onChange:e=>void A(e.target.files?.[0])}),(0,X.jsx)(`input`,{ref:E,type:`file`,accept:`.json,application/json`,hidden:!0,onChange:e=>void j(e.target.files?.[0])})]}),(0,X.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`Top-down image, nose facing right. Body size comes from the cutout.`})]}),(0,X.jsxs)(`section`,{className:`grid min-w-0 gap-5`,children:[(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:[`name`,`make`,`model`,`year`].map(e=>(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground ${e===`name`?`col-span-2`:``}`,children:[e===`name`?`Display name`:e[0].toUpperCase()+e.slice(1),(0,X.jsx)(Po,{value:f[e]??``,onChange:t=>D(e,t.target.value)})]},e))}),(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground`,children:[`Engine sound`,(0,X.jsx)(Bf,{value:f.sound.engineId,onChange:e=>{let t=n.find(t=>t.sound.engineId===e.target.value);t&&D(`sound`,{...structuredClone(t.sound),horn:f.sound.horn})},children:Array.from(new Map([...n,f].map(e=>[e.sound.engineId,e])).values()).map(e=>(0,X.jsx)(Vf,{value:e.sound.engineId,children:e.sound.engineLabel},e.sound.engineId))})]}),(0,X.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-muted-foreground`,children:[`Horn`,(0,X.jsxs)(Bf,{value:f.sound.horn.tone,onChange:e=>D(`sound.horn.tone`,e.target.value),children:[(0,X.jsx)(Vf,{value:`disc`,children:`Disc`}),(0,X.jsx)(Vf,{value:`trumpet`,children:`Trumpet`}),(0,X.jsx)(Vf,{value:`electronic`,children:`Electronic`})]})]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,X.jsx)(zf,{checked:!!f.sound.turbo,onCheckedChange:e=>D(`sound.turbo`,e)}),` `,`Turbo`]}),(0,X.jsxs)(lm,{className:`grid gap-3`,children:[(0,X.jsxs)(um,{render:(0,X.jsx)(De,{variant:`ghost`,className:`justify-between px-0`}),children:[`Advanced tuning `,(0,X.jsx)(`span`,{"aria-hidden":`true`,children:`⌄`})]}),(0,X.jsx)(dm,{children:(0,X.jsxs)(Ap,{defaultValue:`handling`,children:[(0,X.jsxs)(Mp,{className:`w-full`,children:[(0,X.jsx)(Np,{value:`handling`,children:`Handling`}),(0,X.jsx)(Np,{value:`power`,children:`Power`}),(0,X.jsx)(Np,{value:`weapons`,children:`Tools`}),(0,X.jsx)(Np,{value:`sound`,children:`Sound`})]}),Object.keys(jm).map(e=>(0,X.jsx)(Pp,{value:e,children:P(e)},e))]})})]})]})]})}),(0,X.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-t border-border p-4`,children:[(0,X.jsx)(`span`,{role:`status`,className:`min-w-0 flex-1 text-xs text-destructive`,children:C}),!t&&(d(e.id)||v(e.id))&&(0,X.jsx)(De,{variant:`ghost`,size:`sm`,onClick:()=>a(e.id),children:d(e.id)?`Delete vehicle`:`Restore original`}),(0,X.jsx)(De,{variant:`outline`,size:`sm`,onClick:o,children:`Cancel`}),(0,X.jsx)(De,{size:`sm`,onClick:()=>void N(),children:`Save vehicle`})]})]})}var zm=_e(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function Bm({className:e,variant:t=`default`,render:n,...r}){return ur({defaultTagName:`span`,props:Ne({className:K(zm({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}function Vm(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var Hm=Y.createContext(void 0),Um=Y.createContext(void 0);function Wm(){let e=Y.useContext(Hm);if(e===void 0)throw Error(ge(60));return e}function Gm(){let e=Y.useContext(Um);if(e===void 0)throw Error(ge(61));return e}function Km(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var qm=(e,t)=>Object.is(e,t);function Jm(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Ym(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Km(e,t,(e,t)=>Jm(e,t,n)):e!==t}function Xm(e,t,n){return e?e.some(e=>e!==void 0&&Jm(t,e,n)):!1}function Zm(e,t,n){return e?e.findIndex(e=>e!==void 0&&Jm(e,t,n)):-1}function Qm(e,t){if(t!==qm)return n=>Xm(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function $m(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(Qm(t,n)):Zm(e,t,n);return i===-1?null:i}function eh(e,t,n,r,i,a){return Xm(r,t,i)?a!=null&&e>a&&Xm(r,n[a],i)?a:e:e===a?$m(n,r,i,!0):a}function th(e,t,n){return e.filter(e=>!Jm(t,e,n))}function nh(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function rh(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function ih(e){return rh(e?.[0])}function ah(e){return ih(e)?e.flatMap(e=>e.items):e}function oh(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(ih(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function sh(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return nh(e)}function ch(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?nh(e.value):nh(e)}function lh(e,t,n){function r(){return sh(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=ah(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function uh(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,X.jsx)(Y.Fragment,{children:lh(r,t,n)},i)),e),[])}var dh={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ch(t,r)!==``},hasNullItemLabel:(e,t)=>t?oh(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>Jm(t,e,n)):Jm(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function fh(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function ph(e,t){return Math.max(0,e-t)}function mh(e,t){if(t<=0)return 0;let n=fh(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function hh(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=qm,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=Sr(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=br(),F=Pr({id:t}),I=M||d,L=j??c,[R,z]=Df({controlled:n,default:y?r??ve:r,name:`Select`,state:`value`}),[B,V]=Df({controlled:a,default:o,name:`Select`,state:`open`}),H=Y.useRef([]),ee=Y.useRef([]),te=Y.useRef(null),U=Y.useRef(null),ne=Y.useRef(0),re=Y.useRef(null),ie=Y.useRef([]),ae=Y.useRef(!1),oe=Y.useRef(null),se=Y.useRef(null),ce=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),le=Y.useRef(!1),ue=Y.useRef(R),{openMethod:de,triggerProps:fe}=sd(B),W=Fe(()=>new Ac({id:F,labelId:void 0,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:B,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Te,triggerProps:Te,itemRoot:{props:Te,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Me,setOpen:Me,handleScrollArrowVisibility:Me,onOpenChangeComplete:Me,listRef:H,popupRef:te,scrollHandlerRef:U,scrollArrowsMountedCountRef:ne,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:ce,firstItemTextRef:oe,selectedItemTextRef:se,alignItemWithTriggerActiveRef:le,initialValueRef:ue},dh)).current,[pe,me]=Y.useState(!1),{mounted:he,transitionStatus:ge,forceUnmount:_e}=Ys({open:B,ref:te,preventUnmountOnClose:pe,setPreventUnmountOnClose:me,onUnmount(){W.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),ye=W.useState(`activeIndex`),xe=W.useState(`selectedIndex`),Se=W.useState(`triggerElement`),K=W.useState(`positionerElement`),Ce=af(de),we=de??Ce,Ee=Y.useMemo(()=>y?``:ch(R,x),[y,R,x]),De=Y.useMemo(()=>y&&Array.isArray(R)?R.map(e=>ch(e,x)):ch(R,x),[y,R,x]);co(Qo(Se),F,R,G(()=>De),!I,c);let q=y?Array.isArray(R)&&R.length>0:R!=null&&Ee!==``;J(()=>{A(q)},[q,A]),J(function(){let e=$m(ie.current,R,S,y);e===null&&(se.current=null),!B&&W.set(`selectedIndex`,e)},[y,B,R,S,W]),lo(R,()=>{T(L),E(Ym(R,k.initialValue,S)),N.change(R)});let Oe=G((e,t)=>{let n=t,r=rc(n);s?.(e,n),!t.isCanceled&&(e||me(r()),V(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(D(!0),O(!1),P===`onBlur`&&N.commit(R)))});Y.useImperativeHandle(h,()=>({unmount:_e,close:()=>{W.state.open&&Oe(!1,Q(Ao))}}),[_e,Oe,W]);let ke=G((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),Ae=G(e=>{let t=ph(e.scrollHeight,e.clientHeight),n=mh(e.scrollTop,t),r=n>0,i=n<t;W.set(`scrollUpArrowVisible`,r),W.set(`scrollDownArrowVisible`,i)}),je=Vc({open:B,onOpenChange:Oe,elements:{reference:Se,floating:K}}),Pe=Vs(je,{enabled:!I,event:`mousedown`}),Ie=qs(je),Le=il(je,{enabled:!I,listRef:H,activeIndex:ye,selectedIndex:xe,disabledIndices:ve,onNavigate(e){(e!==null||B)&&W.set(`activeIndex`,e)},focusItemOnHover:C}),Re=al(je,{enabled:!I&&(B||!f&&!y),listRef:ee,activeIndex:ye,selectedIndex:xe,disabledIndices:e=>wp(H.current[e]),onMatch(e){B?W.set(`activeIndex`,e):ke(ie.current[e],Q(fo))},onTyping(e){ae.current=e}}),ze=Y.useMemo(()=>Ne(Re.reference,Le.reference,Ie.reference,Pe.reference,fe),[Pe.reference,Re.reference,Le.reference,Ie.reference,fe]),Be=Y.useMemo(()=>Ne(Xs,Re.floating,Le.floating,Ie.floating),[Re.floating,Le.floating,Ie.floating]),Ve=Le.item??Te,He=Y.useMemo(()=>({props:Ve,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S}),[Ve,y,I,f,S]);W.useContextCallback(`setValue`,ke),W.useContextCallback(`setOpen`,Oe),W.useContextCallback(`handleScrollArrowVisibility`,Ae),W.useContextCallback(`onOpenChangeComplete`,_),Vm(()=>{W.update({popupProps:Be,triggerProps:ze,itemRoot:He})}),W.useSyncedValues({id:F,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,value:R,open:B,mounted:he,transitionStatus:ge,popupProps:Be,triggerProps:ze,itemRoot:He,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:we});let Ue=be(g,N.inputRef),We=y?void 0:L,Ge=Y.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=ch(e,x);return(0,X.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,X.jsxs)(Hm.Provider,{value:W,children:[(0,X.jsx)(Um.Provider,{value:je,children:w}),(0,X.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){W.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=Q(fo,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=ie.current.findIndex(t=>ch(t,x).toLowerCase()===e||sh(t,b).toLowerCase()===e);r===-1&&(r=ie.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=ie.current[r];i!=null&&ke(i,n)}W.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&We==null?`${F}-hidden-input`:void 0,form:l,name:We,autoComplete:u,value:Ee,disabled:I,required:p&&!(y&&q),readOnly:f,ref:Ue,style:L?ns:ts,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ge]})}function gh(e){return e==null?void 0:`${e}-label`}function _h(e,t){return e??t}var vh=5;function yh(e,t){let n=bh(t);return e.clientX>=n.left-vh&&e.clientX<=n.right+vh&&e.clientY>=n.top-vh&&e.clientY<=n.bottom+vh}function bh(e){let t=e.getBoundingClientRect(),n=Ce(e);if(Jr)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var xh=`data-popup-side`,Sh=400,Ch={...bi,..._r,popupSide:e=>e?{[xh]:e}:null,value:()=>null},wh=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=br(),{labelId:m}=Ar(),h=Wm(),g=h.useState(`readOnly`),_=h.useState(`required`),v=h.useState(`disabled`),y=p||v||a,b=h.useState(`open`),x=h.useState(`mounted`),S=h.useState(`value`),C=h.useState(`triggerProps`),w=h.useState(`positionerElement`),T=h.useState(`listElement`),E=h.useState(`popupSide`),D=h.useState(`id`),O=h.useState(`labelId`),k=h.useState(`hasSelectedValue`),A=x&&w?E:null,j=i??D,M=_h(m,O);Pr({id:i});let N=Qo(w),P=Y.useRef(null),F=so(y,P),{getButtonProps:I,buttonRef:L}=Oe({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=qa(),B=qa(),V=qa();Y.useEffect(()=>{if(b)return V.start(Sh,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{V.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[b,h,B,V]);let H=Ne(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??ji(w)?.id:void 0,"aria-labelledby":M,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){F(!0),b&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,Q(fo,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Z(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=Re(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Z(P.current,t)||Z(N.current,t)||yh(e,P.current)||h.context.setOpen(!1,Q(Eo,e))}B.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,I),ee=d.getValidationProps(y,H);ee.role=`combobox`;let te={...f,open:b,disabled:y,value:S,readOnly:g,popupSide:A,placeholder:!k};return q(`button`,e,{ref:[t,P,L,R],state:te,stateAttributesMapping:Ch,props:ee})}),Th={value:()=>null},Eh=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Wm(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?uh(l,u,d):lh(l,u,d)),q(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:Th})}),Dh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o={open:Wm().useState(`open`)};return q(`span`,e,{state:o,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:yi})}),Oh=Y.forwardRef(function(e,t){let n=Wm(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,X.jsx)(Es,{ref:t,...e}):null}),kh=Y.createContext(void 0);function Ah(){let e=Y.useContext(kh);if(!e)throw Error(ge(59));return e}function jh(e,t){e&&Object.assign(e.style,t)}var Mh={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Nh=20;function Ph(e,t,n,r){let[i,a]=Y.useState(!1);J(()=>{if(!e||!t||n==null){a(!1);return}let r=Re(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Nh)},[e,t,n]),Xu(e&&(!t||i),r)}var Fh={position:`fixed`},Ih=Y.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=ys,style:_,...v}=e,y=Wm(),b=Gm(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`modal`),w=y.useState(`value`),T=y.useState(`openMethod`),E=y.useState(`positionerElement`),D=y.useState(`triggerElement`),O=y.useState(`isItemEqualToValue`),k=y.useState(`transitionStatus`),A=Y.useRef(null),j=Y.useRef(null),[M,N]=Y.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),Y.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),Ph((P||C)&&x,T===`touch`,E,D);let F=Xd({anchor:n,floatingRootContext:b,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??P,collisionAvoidance:g,keepMounted:!0}),I=P?`none`:F.side,L=P?Fh:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};J(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=ef(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=Y.useRef(0),V=G(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=Q(fo);if(t!==0&&!y.state.multiple&&w!==null&&Zm(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&Zm(y.context.valuesRef.current,e,O)!==-1?e:null;y.context.setValue(t,n),t===null&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(w)){let e=w.filter(e=>Zm(y.context.valuesRef.current,e,O)!==-1);e.length!==w.length&&(y.context.setValue(e,n),e.length===0&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null))}if(x&&P){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};jh(E,e),jh(y.context.popupRef.current,e)}}),H=Y.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,X.jsx)(Wf,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:V,children:(0,X.jsxs)(kh.Provider,{value:H,children:[S&&C&&(0,X.jsx)(Ru,{inert:Lu(!x),cutout:D}),z]})})}),Lh=`base-ui-disable-scrollbar`,Rh={className:Lh,getElement(e){return(0,X.jsx)(`style`,{nonce:e,href:Lh,precedence:`base-ui:low`,children:`.${Lh}{scrollbar-width:none}.${Lh}::-webkit-scrollbar{display:none}`})}},zh=Y.createContext(void 0);function Bh(e){let t=Y.useContext(zh);if(t===void 0&&!e)throw Error(ge(69));return t}var Vh=`--transform-origin`,Hh={...xi,...ci},Uh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=Wm(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=Gm(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=Ah(),_=Bh(!0)!=null,v=Id(),{nonce:y,disableStyleElements:b}=yp(),x=s.useState(`id`),S=s.useState(`open`),C=s.useState(`openMethod`),w=s.useState(`mounted`),T=s.useState(`popupProps`),E=s.useState(`transitionStatus`),D=s.useState(`triggerElement`),O=s.useState(`positionerElement`),k=s.useState(`listElement`),A=Y.useRef(!1),j=Y.useRef(!1),M=Y.useRef({}),N=$a(),P=G(e=>{if(!O||!s.context.popupRef.current||!j.current)return;let t=O.style.top===`0px`,n=O.style.bottom===`0px`;if(A.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=Kh(O),i=qh(O.getBoundingClientRect().height,`y`,r),a=Re(O),o=Ce(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=Wh(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=Gh(e),g=null,_=e=>{O.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=fh(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(A.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=fh(g,0,Gh(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(A.current=!0),s.context.handleScrollArrowVisibility(e)});Y.useImperativeHandle(s.context.scrollHandlerRef,()=>P,[P]),ao({open:S,ref:s.context.popupRef,onComplete(){S&&s.context.onOpenChangeComplete(!0)}});let F={open:S,transitionStatus:E,side:f,align:p};J(()=>{O&&s.context.popupRef.current&&!Object.keys(M.current).length&&(M.current={top:O.style.top||`0`,left:O.style.left||`0`,right:O.style.right,height:O.style.height,bottom:O.style.bottom,minHeight:O.style.minHeight,maxHeight:O.style.maxHeight,marginTop:O.style.marginTop,marginBottom:O.style.marginBottom})},[s,O]),J(()=>{S||m||(j.current=!1,A.current=!1,jh(O,M.current))},[S,m,O]),J(()=>{let e=s.context.popupRef.current;if(!S||!D||!O||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(j.current=!0,e.style.removeProperty(Vh),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=Xh(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=Ce(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=Re(D),c=Kh(D),l=Jh(D.getBoundingClientRect(),c),d=Jh(O.getBoundingClientRect(),c),f=l.height,p=k||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=Wh(a),S=o.documentElement.clientHeight-_-y,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=v===`rtl`?l.right-d.width:l.left,j=0;if(t&&n){let e=Jh(n.getBoundingClientRect(),c);T=Jh(t.getBoundingClientRect(),c),E=d.left+(v===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;j=T.top-d.top+T.height/2-r}let N=w+j+y+h,P=Math.min(S,N),F=S-_-y,I=N-P,L=C-5;O.style.left=`${fh(E,5,L-d.width)}px`,O.style.height=`${P}px`,O.style.maxHeight=`none`,O.style.marginTop=`${_}px`,O.style.marginBottom=`${y}px`,e.style.height=`100%`;let R=Gh(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&Kr;if(B||V){jh(O,M.current),g(!1);return}let H=Math.max(b,P);if(z){let e=Math.max(0,S-N);O.style.top=d.height>=F?`0`:`${e}px`,O.style.height=`${P}px`,p.scrollTop=Gh(p)}else O.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=fh(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(Vh,`50% ${i}%`)}(H===S||P>=x)&&(A.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,S,O,D,m,g,N,k,u,v,h]),Y.useEffect(()=>{if(!m||!O||!S)return;let e=Ce(O);function t(e){s.context.setOpen(!1,Q(jo,e))}return Xo(e,`resize`,t)},[s,m,O,S]);let I={...k?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${x}-list`},onKeyDown(e){_&&Eu.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:Mh},className:!k&&m?Rh.className:void 0},L=q(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:Hh,props:[T,I,$d(E),o]});return(0,X.jsxs)(Y.Fragment,{children:[!b&&Rh.getElement(y),(0,X.jsx)(Bs,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function Wh(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Gh(e){return ph(e.scrollHeight,e.clientHeight)}function Kh(e){return Xl.getScale(e)}function qh(e,t,n){return e/n[t]}function Jh(e,t){return fa({x:qh(e.x,`x`,t),y:qh(e.y,`y`,t),width:qh(e.width,`x`,t),height:qh(e.height,`y`,t)})}var Yh=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Xh(e){let{style:t}=e,n={};for(let[e,r]of Yh)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Yh){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Zh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Wm(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=Ah(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:Mh},className:u&&d!==`touch`?Rh.className:void 0},p=o.useStateSetter(`listElement`);return q(`div`,e,{ref:[t,p],props:[f,a]})}),Qh=Y.createContext(void 0);function $h(){let e=Y.useContext(Qh);if(!e)throw Error(ge(57));return e}var eg=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=Y.useRef(null),d=ap({guess:!0,label:o,textRef:u}),f=Wm(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=d.index,w=Y.useRef(null);J(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),J(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=eh(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&Jm(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=Y.useRef(`mouse`),E=Y.useRef(!1),{getButtonProps:D,buttonRef:O}=Oe({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),k={disabled:v,selected:x,highlighted:y};function A(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?th(n,a,_):[...n,a];f.context.setValue(r,Q(_o,e))}else f.context.setValue(a,Q(_o,e)),f.context.setOpen(!1,Q(_o,e))}function j(){f.context.selectionRef.current.dragY=0}let M={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,C),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=T.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Ii(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!E.current;E.current=!1,!(v||i)&&A(e.nativeEvent)},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,E.current=!0,j()},onMouseUp(){if(j(),v||T.current===`touch`||E.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(E.current=!0,w.current?.click(),E.current=!1)}},N=q(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=Y.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,X.jsx)(Qh.Provider,{value:P,children:N})})),tg=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=Y.useRef(null),{transitionStatus:l,setMounted:u}=oo(o),d=q(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:ci});return ao({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),ng=Y.forwardRef(function(e,t){let{selected:n}=$h();return e.keepMounted||n?(0,X.jsx)(tg,{...e,selected:n,ref:t}):null}),rg=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=$h(),a=Wm(),{render:o,className:s,style:c,...l}=e,u=Y.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]);return q(`div`,e,{ref:[u,t,r],props:l})})),ig=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=Wm(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=Ah(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=qa(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=oo(g);J(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),ao({open:g,ref:v,onComplete(){g||x(!1)}});let S=q(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=ph(e.scrollHeight,e.clientHeight),r=mh(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=ag(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:ci});return y||o?S:null});function ag(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?mh(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?mh(l.offsetTop+l.offsetHeight-r+i,a):a}var og=Y.forwardRef(function(e,t){return(0,X.jsx)(ig,{...e,ref:t,direction:`down`})}),sg=Y.forwardRef(function(e,t){return(0,X.jsx)(ig,{...e,ref:t,direction:`up`})}),cg=hh;function lg({className:e,...t}){return(0,X.jsx)(Eh,{"data-slot":`select-value`,className:K(`flex flex-1 text-left`,e),...t})}function ug({className:e,size:t=`default`,children:n,...r}){return(0,X.jsxs)(wh,{"data-slot":`select-trigger`,"data-size":t,className:K(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,X.jsx)(Dh,{render:(0,X.jsx)(ut,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function dg({className:e,children:t,container:n,side:r=`bottom`,sideOffset:i=4,align:a=`center`,alignOffset:o=0,alignItemWithTrigger:s=!0,...c}){return(0,X.jsx)(Oh,{container:n,children:(0,X.jsx)(Ih,{side:r,sideOffset:i,align:a,alignOffset:o,alignItemWithTrigger:s,className:`pointer-events-auto isolate z-50`,children:(0,X.jsxs)(Uh,{"data-slot":`select-content`,"data-align-trigger":s,className:K(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...c,children:[(0,X.jsx)(pg,{}),(0,X.jsx)(Zh,{children:t}),(0,X.jsx)(mg,{})]})})})}function fg({className:e,children:t,...n}){return(0,X.jsxs)(eg,{"data-slot":`select-item`,className:K(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,X.jsx)(rg,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,X.jsx)(ng,{render:(0,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,X.jsx)(mt,{className:`pointer-events-none`})})]})}function pg({className:e,...t}){return(0,X.jsx)(sg,{"data-slot":`select-scroll-up-button`,className:K(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,X.jsx)(pt,{})})}function mg({className:e,...t}){return(0,X.jsx)(og,{"data-slot":`select-scroll-down-button`,className:K(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,X.jsx)(ut,{})})}function hg(e){return e.name||`AI ${e.id.split(`-`).at(-1)}`}function gg({label:e,value:t,options:n,container:r,onChange:i}){return(0,X.jsxs)(`label`,{className:`grid min-w-0 gap-1 text-[10px] font-semibold text-muted-foreground`,children:[e,(0,X.jsxs)(cg,{value:t,onValueChange:e=>i(String(e)),children:[(0,X.jsx)(ug,{"aria-label":e,className:`h-[27px] w-full rounded-sm text-[11px] text-foreground`,children:(0,X.jsx)(lg,{children:n.find(e=>e.value===t)?.label??t})}),(0,X.jsx)(dg,{container:r,children:n.map(e=>(0,X.jsx)(fg,{value:e.value,children:e.label},e.value))})]})]})}function _g({state:e,presets:t,defaultPresetId:n,portalRoot:r}){let[i,a]=(0,Y.useState)(``),[o,s]=(0,Y.useState)(`follow`),[c,l]=(0,Y.useState)(`default`),u=e.cars.find(t=>t.id===e.selectedId),d=t.map(e=>({value:e.id,label:e.name})),f=[{value:`idle`,label:`Idle`},{value:`follow`,label:`Follow`},{value:`flee`,label:`Flee`},{value:`pursue`,label:`Pursue`}],p=t=>[{value:`default`,label:`Player / focus`},...e.cars.filter(e=>e.id!==t).map(e=>({value:e.id,label:hg(e)}))];return(0,X.jsxs)(`section`,{"aria-label":`AI cars`,className:`space-y-2.5 px-3 py-2.5 text-[11px]`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h2`,{className:`font-semibold`,children:`AI cars`}),(0,X.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`Choose how each car drives.`})]}),(0,X.jsx)(Bm,{variant:`secondary`,className:`rounded-sm text-[10px]`,children:e.cars.length})]}),e.cars.length>0&&(0,X.jsx)(`div`,{role:`list`,"aria-label":`Spawned AI cars`,className:`max-h-32 space-y-1 overflow-auto`,children:e.cars.map(n=>(0,X.jsx)(`div`,{role:`listitem`,children:(0,X.jsxs)(De,{variant:n.id===u?.id?`secondary`:`outline`,size:`sm`,className:`h-9 w-full justify-between rounded-sm px-2 text-left`,onClick:()=>e.onSelect(n.id),"aria-label":`Edit ${hg(n)}`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 truncate`,children:[(0,X.jsx)(`strong`,{children:hg(n)}),(0,X.jsx)(`span`,{className:`min-w-0 truncate font-normal text-muted-foreground`,children:t.find(e=>e.id===n.presetId)?.name??`Vehicle`})]}),(0,X.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground`,children:f.find(e=>e.value===n.mode)?.label})]})},n.id))}),(0,X.jsx)(Io,{}),u?(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,X.jsx)(`strong`,{children:hg(u)}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(De,{variant:`ghost`,size:`xs`,onClick:()=>e.onSelect(null),children:`New car`}),(0,X.jsxs)(De,{variant:`destructive`,size:`xs`,className:`rounded-sm`,onClick:()=>e.onRemove(u.id),children:[(0,X.jsx)(z,{}),` Remove`]})]})]}),(0,X.jsxs)(`label`,{className:`grid gap-1 text-[10px] font-semibold text-muted-foreground`,children:[`Name`,(0,X.jsx)(Po,{value:u.name,placeholder:hg(u),maxLength:32,onChange:t=>e.onUpdate(u.id,{name:t.target.value})})]}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,X.jsx)(gg,{label:`Vehicle`,value:u.presetId,options:d,container:r,onChange:n=>{let r=t.find(e=>e.id===n);r&&e.onUpdate(u.id,{preset:r})}}),(0,X.jsx)(gg,{label:`Mode`,value:u.mode,options:f,container:r,onChange:t=>e.onUpdate(u.id,{mode:t})})]}),(0,X.jsx)(gg,{label:`Target`,value:u.targetId??`default`,options:p(u.id),container:r,onChange:t=>e.onUpdate(u.id,{targetId:t==="default"?null:t})})]}):(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsxs)(`label`,{className:`grid gap-1 text-[10px] font-semibold text-muted-foreground`,children:[(0,X.jsxs)(`span`,{children:[`Name `,(0,X.jsx)(`span`,{className:`font-normal`,children:`(optional)`})]}),(0,X.jsx)(Po,{value:i,placeholder:`Automatic name`,maxLength:32,onChange:e=>a(e.target.value)})]}),(0,X.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`A random vehicle, different from your ride.`}),(0,X.jsx)(`div`,{className:`grid gap-2`,children:(0,X.jsx)(gg,{label:`Mode`,value:o,options:f,container:r,onChange:e=>s(e)})}),(0,X.jsx)(gg,{label:`Target`,value:c,options:p(),container:r,onChange:l}),(0,X.jsxs)(De,{size:`sm`,className:`w-full rounded-sm`,disabled:!t.some(e=>e.id!==n),onClick:()=>{let r=A(t,n);r&&(e.onSpawn(r,o,i,c==="default"?void 0:c),a(``))},children:[(0,X.jsx)(Tt,{}),` Spawn car`]})]})]})}function vg({hovered:e,breakable:t=!1,animateOnEnter:n=!1,...r}){let i=(0,Y.useRef)(null),[a,o]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(n),l=(e??a)||s;return(0,Y.useEffect)(()=>{if(c(n),!n)return;let e=window.setTimeout(()=>c(!1),1e3);return()=>window.clearTimeout(e)},[n]),(0,Y.useEffect)(()=>{let e=i.current;if(!e||!l)return;let t=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=Math.floor(Math.random()*4294967296),r=performance.now(),a,o=()=>{if(clearTimeout(a),t.matches){e.style.removeProperty(`transform`);return}let i=performance.now()-r,s=i%1e3,c=P(s,n+Math.floor(i/1e3));c&&(e.style.transform=`translate(${c.x*.28}px, ${c.y*.28}px) rotate(${c.rotation}rad)`);let l=L.find(e=>e>s)??1e3;a=setTimeout(o,Math.max(1,l-s))};return o(),t.addEventListener(`change`,o),()=>{clearTimeout(a),e.style.removeProperty(`transform`),t.removeEventListener(`change`,o)}},[l]),(0,X.jsxs)(`svg`,{...r,ref:i,viewBox:k.viewBox,role:r.role??`img`,"aria-label":r[`aria-label`]??`Joy Ride`,"data-jr-breakable":t||void 0,"data-jr-combustible":t||void 0,style:{overflow:`visible`,transformOrigin:`center`,...r.style},onPointerEnter:e=>{o(!0),r.onPointerEnter?.(e)},onPointerLeave:e=>{o(!1),r.onPointerLeave?.(e)},children:[(0,X.jsx)(`path`,{d:k.wordmarkPath,fill:`currentColor`,fillRule:`evenodd`}),(0,X.jsx)(`path`,{d:k.crownPath,fill:`var(--joy-logo-accent, var(--drive-accent, #d63228))`,fillRule:`evenodd`})]})}function yg(){return(0,X.jsxs)(De,{variant:`outline`,size:`sm`,nativeButton:!1,render:(0,X.jsx)(`a`,{href:`https://github.com/jakiestfu/joy-ride`,target:`_blank`,rel:`noreferrer`}),children:[(0,X.jsx)(xt,{"aria-hidden":`true`}),`GitHub`]})}var bg=`.joy-code-block{--code-bg:#f5f5f5;--code-header:transparent;--code-ink:#171717;--code-muted:#737373;--code-line:#e5e5e5;--code-accent:#171717;--sh-class:#8f3c2e;--sh-identifier:var(--code-ink);--sh-sign:#72695f;--sh-property:#8f3c2e;--sh-entity:#b32d25;--sh-jsxliterals:#8f3c2e;--sh-string:#775b43;--sh-keyword:#b32d25;--sh-comment:#797267;--sh-space:inherit;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;border:1px solid var(--code-line);border-radius:var(--radius-lg,8px);background:var(--code-bg);min-width:0;color:var(--code-ink);text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}:where(.dark,[data-jr-theme=dark],[data-theme=dark]) .joy-code-block:not([data-code-theme=light]),:host(.dark) .joy-code-block:not([data-code-theme=light]),.joy-code-block[data-code-theme=dark]{--code-bg:#1c1c1c;--code-header:transparent;--code-ink:#fafafa;--code-muted:#a3a3a3;--code-line:#333;--code-accent:#fafafa;--sh-class:#e6b49b;--sh-sign:#b5a99b;--sh-property:#e6b49b;--sh-entity:#ff998a;--sh-jsxliterals:#e6b49b;--sh-string:#d4c3aa;--sh-keyword:#ff998a;--sh-comment:#9a9389;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.joy-code-block .joy-code-header{border-bottom:1px solid var(--code-line);background:var(--code-header);align-items:center;gap:10px;min-height:43px;padding:0 16px;display:flex}.joy-code-block .joy-code-heading{flex:1;align-items:center;gap:12px;min-width:0;display:flex}.joy-code-block .joy-code-title{color:var(--code-ink);letter-spacing:0;text-overflow:ellipsis;white-space:nowrap;font:600 11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden}.joy-code-block .joy-code-language{color:var(--code-muted);font:9px ui-monospace,SFMono-Regular,Menlo,monospace}.joy-code-block button{min-height:32px;color:var(--code-muted);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:0;justify-content:center;align-items:center;gap:6px;padding:4px 6px;font:500 10px -apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;display:inline-flex}.joy-code-block button:hover{color:var(--code-ink);text-underline-offset:4px;text-decoration:underline}.joy-code-block .joy-code-copy{flex:none;margin-left:auto}.joy-code-block .joy-code-copy>span{text-align:left;min-width:36px}.joy-code-block .joy-code-copy svg{flex:none;width:13px;height:13px}.joy-code-block :is(button,pre):focus-visible{outline:2px solid var(--code-accent);outline-offset:-3px}.joy-code-block .joy-code-tabs{flex:1;min-width:0}.joy-code-block [role=tablist]{flex-wrap:wrap;gap:2px;display:flex}.joy-code-block button[role=tab]{text-transform:uppercase;letter-spacing:.06em;border-bottom:2px solid #0000;border-radius:0;min-height:42px;padding-inline:8px;font-weight:700}.joy-code-block button[aria-selected=true]{border-bottom-color:var(--code-accent);color:var(--code-ink)}.joy-code-block .joy-code-pre{min-width:0;max-width:100%;color:var(--code-ink);text-align:left;white-space:pre;overflow-wrap:normal;font-variant-ligatures:none;tab-size:2;-webkit-overflow-scrolling:touch;background:0 0;border:0;border-radius:0;margin:0;padding:18px;font:11.5px/1.85 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;display:block;overflow:auto}.joy-code-block code{font:inherit;color:inherit;background:0 0;padding:0}.joy-code-block .sh__line{display:inline}.joy-code-block .sh__token--comment{font-style:italic}.joy-code-block[data-wrap] .joy-code-pre{white-space:pre-wrap;overflow-wrap:anywhere}.joy-code-block[data-compact] .joy-code-header{min-height:35px;padding-inline:10px}.joy-code-block[data-compact] .joy-code-pre{padding:12px;font-size:10.5px;line-height:1.75}.joy-code-block .joy-code-status{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.joy-code-block .joy-code-status[data-error]{clip-path:none;width:auto;height:auto;color:var(--code-accent);padding:10px 14px;font-size:11px;display:block;position:static}@media (width<=480px){.joy-code-block .joy-code-header{gap:6px;padding-inline:9px}.joy-code-block .joy-code-language{display:none}.joy-code-block .joy-code-pre{padding:14px;font-size:11px}.joy-code-block button[role=tab]{padding-inline:5px;font-size:9px}}`,xg=`.joy-pause-menu{--pause-accent:var(--joy-ride-brand-color,var(--primary));--joy-logo-accent:var(--pause-accent);--pause-inset:20px;--text-xs:10px;--text-sm:12px;--text-base:13px;z-index:2;pointer-events:auto;color:var(--foreground);outline:none;font-size:12px;position:fixed}.joy-pause-frame{border:1px solid var(--border);background:var(--background);width:100%;height:100%;display:flex;overflow:hidden;box-shadow:0 24px 80px #0005}.joy-pause-layout{--pause-sidebar-width:160px;align-items:stretch;height:100%;min-height:0}.joy-pause-sidebar{border-right:1px solid var(--sidebar-border);flex-shrink:0}.joy-pause-brand{justify-content:center;align-items:center;min-height:102px;padding:18px 12px 8px}.joy-pause-logo-backing{isolation:isolate;place-items:center;width:138px;height:76px;display:grid;position:relative}.joy-pause-logo-backing:before{content:"";z-index:-1;background:var(--sidebar);pointer-events:none;position:absolute;inset:-8px;-webkit-mask:url(`+new URL(`../embed-assets/logo-backing-DQNUb3C2.svg`,import.meta.url).href+`) 50%/100% 100% no-repeat;mask:url(`+new URL(`../embed-assets/logo-backing-DQNUb3C2.svg`,import.meta.url).href+`) 50%/100% 100% no-repeat}.joy-pause-logo{width:124px;height:76px;display:block;overflow:visible}.joy-pause-brand-name{overflow-wrap:anywhere;font-size:15px;line-height:1.4}.joy-pause-sidebar [data-slot=sidebar-menu]{gap:3px}.joy-pause-sidebar-footer{gap:14px;padding:14px 12px}.joy-pause-selected-vehicle{align-items:center;gap:10px;min-width:0;display:flex}.joy-pause-selected-image,.joy-pause-selected-vehicle>svg{object-fit:contain;flex:none;width:34px;height:48px}.joy-pause-selected-image{place-items:center;display:grid}.joy-pause-selected-image img{object-fit:contain;width:48px;max-width:none;height:34px;transform:rotate(-90deg)}.joy-pause-selected-vehicle>div:not(.joy-pause-selected-image){gap:5px;min-width:0;display:grid}.joy-pause-selected-vehicle strong{text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:600;line-height:1.4;overflow:hidden}.joy-pause-selected-vehicle span{color:var(--muted-foreground);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.4;overflow:hidden}.joy-pause-workspace{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.joy-pause-header{padding:18px var(--pause-inset) 16px;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.joy-pause-header[data-dragging]{cursor:grabbing}.joy-pause-header:focus-visible{outline:2px solid var(--ring);outline-offset:-3px}.joy-pause-heading{min-width:0}.joy-pause-heading h1{letter-spacing:-.04em;margin:0;font-size:22px;font-weight:650;line-height:1.25}.joy-pause-heading p{color:var(--muted-foreground);margin:4px 0 0;font-size:12px;line-height:1.5}.joy-pause-header-actions{flex:none;align-items:center;gap:8px;display:flex}.joy-pause-content,.joy-pause-body{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.joy-pause-panels{min-width:0}.joy-pause-panels>section{padding:2px var(--pause-inset) 16px}.joy-pause-panels>section>section+section{margin-top:16px}.joy-pause-settings-main>label{grid-template-columns:minmax(110px,.8fr) minmax(0,1fr);align-items:center;gap:20px;font-size:12px;font-weight:500;display:grid}.joy-pause-settings-main>label+label{margin-top:14px}.joy-pause-audio{grid-template-columns:minmax(110px,.8fr) minmax(0,1fr);align-items:center;gap:20px;display:grid}.joy-pause-audio>div{align-items:center;gap:14px;display:flex}.joy-pause-audio [data-slot=slider]{flex:1;min-width:0}.joy-pause-audio output{text-align:right;min-width:3ch;color:var(--muted-foreground);font-size:12px}.joy-pause-tool{border-radius:var(--radius-lg);border:0;padding:8px 0}.joy-pause-vehicle-image{place-items:center;height:160px;display:grid}.joy-pause-vehicle-image img{object-fit:contain;max-width:220px;max-height:140px}.joy-pause-vehicle-image svg{width:180px}.joy-pause-vehicle-name{margin:6px 0;font-size:17px;font-weight:600;line-height:1.4;display:block}.joy-pause-vehicle-tools{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin-top:12px;display:flex}.joy-pause-vehicle-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin-top:16px;display:grid}.joy-pause-vehicle-stats>div>span{color:var(--muted-foreground);font-size:11px}.joy-pause-footer{padding:12px var(--pause-inset) 16px;flex-shrink:0;justify-content:flex-end;display:flex}.joy-pause-footer-actions{gap:10px;display:flex}@media (width<=600px){.joy-pause-menu{--pause-inset:16px}.joy-pause-layout{--pause-sidebar-width:62px}.joy-pause-brand{min-height:86px;padding:16px 5px}.joy-pause-logo-backing{width:52px;height:42px}.joy-pause-logo{width:50px;height:40px}.joy-pause-brand-name{font-size:10px}.joy-pause-sidebar [data-slot=sidebar-group]{padding-inline:8px}.joy-pause-sidebar [data-slot=sidebar-menu-button]{justify-content:center;height:40px;padding:8px}.joy-pause-sidebar [data-slot=sidebar-menu-button]>span,.joy-pause-selected-vehicle>div:not(.joy-pause-selected-image){clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.joy-pause-sidebar-footer{align-items:center;gap:16px;padding:12px 6px}.joy-pause-selected-image,.joy-pause-selected-vehicle>svg{width:34px;height:44px}.joy-pause-sidebar-footer [data-slot=button]{gap:0;width:36px;padding:0;font-size:0}.joy-pause-header{gap:8px;padding-top:14px;padding-bottom:14px}.joy-pause-heading h1{font-size:21px}.joy-pause-heading p{font-size:11px}.joy-pause-header-actions{gap:4px}.joy-pause-settings-main>label,.joy-pause-audio{grid-template-columns:minmax(0,1fr);gap:8px}.joy-pause-vehicle-image img{max-width:165px}.joy-pause-vehicle-image{height:135px}.joy-pause-vehicle-tools{justify-content:flex-start}.joy-pause-vehicle-stats{grid-template-columns:minmax(0,1fr)}}@media (height<=600px){.joy-pause-header{padding-block:16px}.joy-pause-footer{padding-block:12px}.joy-pause-brand{min-height:90px}}`,Sg=`.joy-docs{grid-template-columns:190px minmax(0,1fr);height:100%;min-height:0;display:grid;position:relative;overflow:clip}.joy-docs-navigation{min-width:0;padding:6px var(--pause-inset,20px) 24px;font-size:12px;overflow:auto}.joy-docs-nav-label{color:var(--muted-foreground);margin:0 0 14px;font-size:11px;font-weight:500}.joy-docs-navigation ul{margin:0;padding:0;list-style:none}.joy-docs-chapters>li+li{margin-top:3px}.joy-docs-navigation a{color:var(--muted-foreground);line-height:1.5;text-decoration:none;transition:color .12s;display:block;position:relative}.joy-docs-chapter{padding:6px 0}.joy-docs-navigation a:hover,.joy-docs-navigation a[aria-current]{color:var(--foreground)}.joy-docs-chapter[aria-current=page]{font-weight:600}.joy-docs-navigation .joy-docs-sections{margin:4px 0 14px;padding-left:14px;font-size:11px}.joy-docs-section{padding:5px 0}.joy-docs-section[aria-current=location]{font-weight:500}.joy-docs-navigation a:focus-visible,.joy-docs-prose a:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.joy-docs-article{overscroll-behavior:contain;min-width:0;min-height:0;padding:2px 24px 24px;overflow:auto}.joy-docs-prose{color:var(--muted-foreground);overflow-wrap:anywhere;font-size:13px;line-height:1.75}.joy-docs-prose :is(h2,h3,h4){color:var(--foreground);letter-spacing:-.025em;scroll-margin-top:20px;font-weight:600;line-height:1.35}.joy-docs-prose h2{margin:0 0 12px;font-size:24px}.joy-docs-prose h3{border-top:1px solid var(--border);margin:32px 0 12px;padding-top:20px;font-size:16px}.joy-docs-prose h4{margin:24px 0 8px;font-size:13px}.joy-docs-prose :is(h2,h3,h4):focus{outline:none}.joy-docs-prose :is(h2,h3,h4):focus-visible{outline:2px solid var(--ring);outline-offset:4px}.joy-docs-prose p{margin:12px 0}.joy-docs-prose :is(ul,ol){margin:14px 0;padding-left:22px}.joy-docs-prose ul{list-style:outside}.joy-docs-prose ol{list-style:decimal}.joy-docs-prose li{margin-block:5px}.joy-docs-prose strong{color:var(--foreground);font-weight:600}.joy-docs-prose a{color:var(--foreground);text-underline-offset:3px;text-decoration:underline}.joy-docs-prose :not(pre)>code{color:var(--foreground);background:var(--muted);border-radius:var(--radius-sm);padding:2px 4px;font-family:ui-monospace,monospace;font-size:.9em}.joy-docs-prose blockquote{border-left:2px solid var(--border);color:var(--muted-foreground);margin:18px 0;padding:4px 16px}.joy-docs-prose .joy-code-block{max-width:100%;margin-block:16px}.joy-docs-table{border:1px solid var(--border);border-radius:var(--radius-lg);margin-block:18px;overflow-x:auto}.joy-docs-table table{border-collapse:collapse;width:100%;font-size:11px;line-height:1.65}.joy-docs-table :is(th,td){text-align:left;vertical-align:top;border-bottom:1px solid var(--border);padding:10px 12px}.joy-docs-table th{color:var(--foreground);background:var(--muted);white-space:nowrap;font-weight:600}.joy-docs-table tr:last-child td{border-bottom:0}.joy-docs-next{border-top:1px solid var(--border);margin-top:28px;padding-top:20px}.joy-docs-browse{display:none}.joy-pause-panels[data-documentation]{overflow:clip}.joy-pause-menu[data-documentation] .joy-pause-footer{padding-block:8px}@media (width<=800px){.joy-docs{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);padding-top:4px}.joy-docs-browse{width:fit-content;margin:0 16px 12px;display:flex}.joy-docs-navigation{background:var(--popover);border:1px solid var(--border);border-radius:var(--radius-lg);z-index:2;max-height:min(360px,65%);padding:12px;display:none;position:absolute;top:44px;left:16px;right:16px;box-shadow:0 8px 24px #0003}.joy-docs-navigation[data-open=true]{display:block}.joy-docs-article{padding-inline:16px}.joy-docs-prose{font-size:12px}.joy-docs-prose h2{font-size:21px}}`,Cg=14,wg=(e,t,n)=>Math.max(t,Math.min(n,e));function Tg(e,t={width:480,height:560},n={x:0,y:0}){let r=Math.min(Cg,e.width/2,e.height/2),i=Math.min(t.width,Math.max(0,e.width-r*2)),a=Math.min(t.height,Math.max(0,e.height-r*2));return{width:i,height:a,left:wg((e.width-i)/2+n.x,r,e.width-r-i),top:wg((e.height-a)/2+n.y,r,e.height-r-a)}}function Eg({styles:e,size:t,onEscape:n,onReset:r,onRecordShortcut:i,shortcutsEnabled:a}){let o=(0,Y.useRef)(e),[s,c]=(0,Y.useState)(null),[l,u]=(0,Y.useState)(()=>({width:window.innerWidth,height:Math.min(window.innerHeight,window.visualViewport?.height??window.innerHeight)})),[d,f]=(0,Y.useState)({x:0,y:0}),[p,m]=(0,Y.useState)(!1),h=(0,Y.useRef)(null),g=(0,Y.useRef)(null);(0,Y.useLayoutEffect)(()=>{let e=document.createElement(`div`);e.dataset.jrUi=``,e.dataset.jrPopoverHost=``,e.style.cssText=`position:fixed;inset:0;z-index:${ee(`controls`)};pointer-events:none`;let t=e.attachShadow({mode:`open`}),n=document.createElement(`style`);n.dataset.jrDialogStyles=``,n.textContent=o.current,t.append(n);let r=R(e);return document.body.append(e),c(t),()=>{r(),e.remove()}},[]),(0,Y.useLayoutEffect)(()=>{let t=s?.querySelector(`style`);t&&(t.textContent=e)},[s,e]),(0,Y.useEffect)(()=>{let e=()=>u({width:window.innerWidth,height:Math.min(window.innerHeight,window.visualViewport?.height??window.innerHeight)});window.addEventListener(`resize`,e),window.visualViewport?.addEventListener(`resize`,e);let t=e=>{e.defaultPrevented||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),n()):e.repeat||e.metaKey||e.ctrlKey||e.altKey||H(e)||a&&(e.code===`KeyR`&&(e.preventDefault(),e.stopPropagation(),i()),e.code===`KeyC`&&(e.preventDefault(),e.stopPropagation(),r())))};return document.addEventListener(`keydown`,t),()=>{window.removeEventListener(`resize`,e),window.visualViewport?.removeEventListener(`resize`,e),document.removeEventListener(`keydown`,t)}},[n,r,i,a]),(0,Y.useEffect)(()=>{if(!s)return;let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;let t=document.documentElement,n=t.style.overflow,r=t.style.scrollbarGutter;getComputedStyle(t).scrollbarGutter===`auto`&&(t.style.scrollbarGutter=`stable`),t.style.overflow=`hidden`;let i=requestAnimationFrame(()=>h.current?.focus({preventScroll:!0})),a=e=>{if(e.key!==`Tab`||e.ctrlKey||e.metaKey||e.altKey)return;let t=[...s.querySelectorAll(`button,a[href],input,select,textarea,[tabindex]`)].filter(e=>e.tabIndex>=0&&!e.matches(`:disabled,[aria-hidden="true"]`)&&e.getClientRects().length&&getComputedStyle(e).visibility!==`hidden`),n=s.activeElement;for(;n?.shadowRoot?.activeElement;)n=n.shadowRoot.activeElement;t.length?(!n||!s.contains(n)||n===h.current||(e.shiftKey?n===t[0]:n===t.at(-1)))&&(e.preventDefault(),(e.shiftKey?t.at(-1):t[0])?.focus()):(e.preventDefault(),h.current?.focus())};return document.addEventListener(`keydown`,a,!0),()=>{cancelAnimationFrame(i),document.removeEventListener(`keydown`,a,!0),t.style.overflow=n,t.style.scrollbarGutter=r,e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},[s]);let _=Tg(l,t,d);return{portalRoot:s,dialogRef:h,placement:_,dragging:p,headerProps:{onPointerDown:e=>{e.button!==0||e.target instanceof Element&&e.target.closest(`button,a,input,select,textarea,[role="button"]`)||(e.preventDefault(),g.current={pointer:e.pointerId,x:e.clientX,y:e.clientY,offset:{x:_.left-(l.width-_.width)/2,y:_.top-(l.height-_.height)/2}},e.currentTarget.setPointerCapture(e.pointerId),m(!0))},onPointerMove:e=>{let t=g.current;t&&t.pointer===e.pointerId&&f({x:t.offset.x+e.clientX-t.x,y:t.offset.y+e.clientY-t.y})},onPointerUp:e=>{g.current?.pointer===e.pointerId&&(g.current=null,m(!1),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},onLostPointerCapture:()=>{g.current=null,m(!1)},onKeyDown:e=>{if(e.target!==e.currentTarget)return;let t=e.shiftKey?20:8,n={ArrowLeft:[-t,0],ArrowRight:[t,0],ArrowUp:[0,-t],ArrowDown:[0,t]};if(e.key!==`Home`&&!n[e.key])return;e.preventDefault(),e.stopPropagation();let[r,i]=n[e.key]??[0,0];f(e.key===`Home`?{x:0,y:0}:{x:_.left-(l.width-_.width)/2+r,y:_.top-(l.height-_.height)/2+i})}}}}function Dg(e){return Array.isArray(e)?e.map(e=>Dg(e)).join(`,`):e==null?``:String(e)}var Og=new Map;function kg(e,t){let n=JSON.stringify({locale:Dg(e),options:t}),r=Og.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return Og.set(n,i),i}function Ag(e,t,n){return e==null?``:kg(t,n).format(e)}function jg(e,t,n){return(e-t)*100/(n-t)}var Mg=Y.createContext(void 0);function Ng(){let e=Y.useContext(Mg);if(e===void 0)throw Error(ge(51));return e}var Pg=`data-complete`,Fg=`data-indeterminate`,Ig=`data-progressing`,Lg={status(e){return e===`progressing`?{[Ig]:``}:e===`complete`?{[Pg]:``}:e===`indeterminate`?{[Fg]:``}:null}},Rg=Y.forwardRef(function(e,t){let{format:n,getAriaValueText:r,locale:i,max:a=100,min:o=0,value:s,render:c,className:l,children:u,style:d,...f}=e,[p,m]=Y.useState(),h=`indeterminate`,g=null,_=null,v=``,y=`indeterminate progress`;if(s!=null&&Number.isFinite(s)){let e=jg(s,o,a);g=fh(Number.isNaN(e)?0:e,0,100),_=fh(s,o,a),h=_===a?`complete`:`progressing`,v=n?Ag(_,i,n):Ag(g/100,i,{style:`percent`}),y=v}let b=Y.useMemo(()=>({status:h}),[h]),x={"aria-labelledby":p,"aria-valuemax":a,"aria-valuemin":o,"aria-valuenow":_??void 0,"aria-valuetext":r?r(v,s):y,role:`progressbar`,children:(0,X.jsxs)(Y.Fragment,{children:[u,(0,X.jsx)(`span`,{role:`presentation`,style:ts,children:`x`})]})},S=Y.useMemo(()=>({formattedValue:v,percentageValue:g,setLabelId:m,state:b,value:s}),[v,g,m,b,s]),C=q(`div`,e,{state:b,ref:t,props:[x,f],stateAttributesMapping:Lg});return(0,X.jsx)(Mg.Provider,{value:S,children:C})}),zg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Ng();return q(`div`,e,{state:o,ref:t,props:a,stateAttributesMapping:Lg})}),Bg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{percentageValue:o,state:s}=Ng(),c=o==null?{}:{insetInlineStart:0,height:`inherit`,width:`${o}%`};return q(`div`,e,{state:s,ref:t,props:[{style:c},a],stateAttributesMapping:Lg})}),Vg=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,{value:s,formattedValue:c,state:l}=Ng(),u=l.status===`indeterminate`;return q(`span`,e,{state:l,ref:t,props:[{"aria-hidden":!0,children:typeof i==`function`?i(u?`indeterminate`:c,s):u?null:c},o],stateAttributesMapping:Lg})}),Hg=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s,state:c}=Ng(),l=Ua(a,s);return q(`span`,e,{state:c,ref:t,props:[{id:l,role:`presentation`},o],stateAttributesMapping:Lg})});function Ug({className:e,children:t,value:n,...r}){return(0,X.jsxs)(Rg,{value:n,"data-slot":`progress`,className:K(`flex flex-wrap gap-3`,e),...r,children:[t,(0,X.jsx)(Wg,{children:(0,X.jsx)(Gg,{})})]})}function Wg({className:e,...t}){return(0,X.jsx)(zg,{className:K(`relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted`,e),"data-slot":`progress-track`,...t})}function Gg({className:e,...t}){return(0,X.jsx)(Bg,{"data-slot":`progress-indicator`,className:K(`h-full bg-primary transition-all`,e),...t})}function Kg({className:e,...t}){return(0,X.jsx)(Hg,{className:K(`text-sm font-medium`,e),"data-slot":`progress-label`,...t})}function qg({className:e,...t}){return(0,X.jsx)(Vg,{className:K(`ml-auto text-sm text-muted-foreground tabular-nums`,e),"data-slot":`progress-value`,...t})}function Jg({preset:e,presets:t,tools:n,options:r,allowEditing:i,onSelectPreset:a,onSavePreset:o,onEdit:s}){let c=(0,Y.useRef)(null),[l,u]=(0,Y.useState)(``),f=(0,Y.useRef)(i);f.current=i;let p=(0,Y.useRef)(!0);(0,Y.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=Math.max(0,t.findIndex(t=>t.id===e.id)),g=e=>{let n=t[Math.max(0,Math.min(t.length-1,e))];n&&a(n)},v=async e=>{if(e&&f.current){try{let n=h(JSON.parse(await e.text()));if(!p.current||!f.current)return;d(n.id)&&t.some(e=>e.id===n.id)&&(n={..._(n),name:n.name}),o(n),u(``)}catch(e){if(!p.current)return;u(e instanceof Error?e.message:`Could not import vehicle.`)}c.current&&(c.current.value=``)}};return(0,X.jsxs)(`section`,{className:`joy-pause-vehicle-panel min-h-full px-3 py-2.5 text-sm max-[560px]:p-[9px]`,children:[(0,X.jsx)(Lp,{preset:e,enabledTools:n.map(e=>e.id),masterVolume:r.masterVolume}),(0,X.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,X.jsx)(De,{variant:`outline`,size:`icon-sm`,onClick:()=>g(m-1),disabled:m===0,"aria-label":`Previous vehicle`,children:(0,X.jsx)(dt,{})}),(0,X.jsxs)(`div`,{className:`min-w-0 text-center`,children:[(0,X.jsx)(`strong`,{className:`block`,children:e.name}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:[e.make,e.year].filter(Boolean).join(` · `)||`Joy Ride`})]}),(0,X.jsx)(De,{variant:`outline`,size:`icon-sm`,onClick:()=>g(m+1),disabled:m===t.length-1,"aria-label":`Next vehicle`,children:(0,X.jsx)(ft,{})})]}),i&&(0,X.jsxs)(`div`,{className:`joy-pause-vehicle-tools`,children:[(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>{s(!1)},children:[(0,X.jsx)(wt,{}),` Edit vehicle`]}),(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>{s(!0)},children:[(0,X.jsx)(Tt,{}),` New vehicle`]}),(0,X.jsxs)(De,{size:`sm`,variant:`ghost`,onClick:()=>c.current?.click(),children:[(0,X.jsx)(Ot,{}),` Import JSON`]}),(0,X.jsx)(`input`,{ref:c,type:`file`,accept:`.json,application/json`,hidden:!0,onChange:e=>void v(e.target.files?.[0])})]}),i&&l&&(0,X.jsx)(`p`,{role:`alert`,className:`mt-1 text-center text-xs text-destructive`,children:l}),(0,X.jsx)(`div`,{className:`joy-pause-vehicle-stats`,children:Le(e,t).map(e=>(0,X.jsxs)(Ug,{value:e.value,className:`gap-1.5`,children:[(0,X.jsx)(Kg,{className:`text-xs text-muted-foreground`,children:e.label}),(0,X.jsx)(qg,{className:`text-xs`})]},e.label))})]})}var Yg=Y.createContext(void 0);function Xg(){let e=Y.useContext(Yg);if(e===void 0)throw Error(ge(63));return e}var Zg=`data-checked`,Qg=`data-unchecked`,$g={..._r,checked(e){return e?{[Zg]:``}:{[Qg]:``}}},e_=Y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...y}=e,{clearErrors:b}=Sr(),{state:x,setTouched:S,setDirty:C,validityData:w,setFilled:T,validationMode:E,disabled:D,name:O,validation:k}=br(),{labelId:A}=Ar(),j=D||m,M=O??l,N=Y.useRef(null),P=be(N,c,k.inputRef),F=Y.useRef(null),I=so(j,F),L=Or(),R=Pr({id:s}),z=u?void 0:R,[B,V]=Df({controlled:n,default:!!i,name:`Switch`,state:`checked`});co(F,L,B,void 0,!j,l),J(()=>{T(B)},[B,T]),lo(B,()=>{b(M),C(B!==w.initialValue),k.change(B)});let{getButtonProps:H,buttonRef:ee}=Oe({disabled:j,native:u}),te=jr(a,A,N,!u,z,y[`aria-label`]),U={id:u?R:L,role:`switch`,"aria-checked":B,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":te,onFocus(){I(!0)},onBlur(){let e=N.current;e&&!j&&(S(!0),I(!1),E===`onBlur`&&k.commit(e.checked))},onClick(e){if(f||j)return;e.preventDefault();let t=N.current;t&&Ee(t,e)}},ne={...k.getValidationProps(j),checked:B,disabled:j,form:o,id:z,name:M,required:p,style:M?ns:ts,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:P,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=Q(fo,e.nativeEvent);d?.(t,n),!n.isCanceled&&V(t)},onClick(e){e.stopPropagation()},onFocus(){F.current?.focus()},..._===void 0?Te:{value:_}},re=Y.useMemo(()=>({...x,checked:B,disabled:j,readOnly:f,required:p}),[x,B,j,f,p]),ie=q(`span`,e,{state:re,ref:[t,F,ee],props:[U,y,H,e=>k.getValidationProps(j,e)],stateAttributesMapping:$g});return(0,X.jsxs)(Yg.Provider,{value:re,children:[ie,!B&&M&&g!==void 0&&(0,X.jsx)(`input`,{type:`hidden`,form:o,name:M,value:g,disabled:j}),(0,X.jsx)(`input`,{...ne,suppressHydrationWarning:!0})]})}),t_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Xg();return q(`span`,e,{state:o,ref:t,stateAttributesMapping:$g,props:a})});function n_({className:e,...t}){return(0,X.jsx)(e_,{"data-slot":`switch`,className:K(`inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input transition-colors outline-none data-checked:bg-primary focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,X.jsx)(t_,{"data-slot":`switch-thumb`,className:`pointer-events-none block size-4 translate-x-0.5 rounded-full bg-background shadow-sm transition-transform data-checked:translate-x-4 data-checked:bg-primary-foreground`})})}function r_(e,t){return e-t}function i_(e,t,n,r,i,a){let o=fh(e,n,r);if(!i)return o;let s=a.slice();return s[t]=fh(o,a[t-1]??-1/0,a[t+1]??1/0),s.sort(r_)}function a_(e,t,n){if(!Array.isArray(e))return!0;let r=t*n;for(let t=0;t<e.length-1;t+=1)if(!(Math.abs(e[t]-e[t+1])>=r))return!1;return!0}var o_=()=>null,s_={activeThumbIndex:o_,max:o_,min:o_,minStepsBetweenValues:o_,step:o_,values:o_,..._r},c_=Y.createContext(void 0);function l_(){let e=Y.useContext(c_);if(e===void 0)throw Error(ge(62));return e}function u_(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&Km(e,t)}var d_=Y.forwardRef(function(e,t){let{"aria-labelledby":n,className:r,defaultValue:i,disabled:a=!1,id:o,format:s,largeStep:c=10,locale:l,render:u,max:d=100,min:f=0,minStepsBetweenValues:p=0,form:m,name:h,onValueChange:g,onValueCommitted:_,orientation:v=`horizontal`,step:y=1,thumbCollisionBehavior:b=`push`,thumbAlignment:x=`center`,value:S,style:C,...w}=e,T=Or(o),E=gh(T),D=G(g),O=G(_),{clearErrors:k}=Sr(),{state:A,disabled:j,name:M,setTouched:N,setDirty:P,validityData:F,validation:I}=br(),{labelId:L}=Ar(),[R,z]=Y.useState(),B=n??_h(L,R),V=j||a,H=M??h,[ee,te]=Df({controlled:S,default:i??f,name:`Slider`}),U=Y.useRef(null),ne=Y.useRef(null),re=Y.useRef([]),ie=Y.useRef(null),ae=Y.useRef(-1),oe=Y.useRef(null),se=Y.useRef(fo),[ce,le]=Y.useState(-1),[ue,de]=Y.useState(-1),[fe,W]=Y.useState(!1),[pe,me]=Y.useState(()=>new Map),[he,ge]=Y.useState([void 0,void 0]),_e=G(e=>{le(e),e!==-1&&de(e)}),ve=G(e=>{e&&(ne.current=e)}),ye=Array.isArray(ee),be=Y.useMemo(()=>ye?ee.map(e=>fh(e,f,d)).sort(r_):[fh(ee,f,d)],[d,f,ye,ee]),xe=ye?be:be[0];co(I.inputRef,T,xe,void 0,!V,h),lo(xe,()=>{k(H),I.change(xe);let e=F.initialValue,t;t=Array.isArray(xe)&&Array.isArray(e)?!Km(xe,e):xe!==e,P(t)});let Se=G((e,t)=>{if(Number.isNaN(e)||u_(e,ee))return!1;let n=t.event,r=n.constructor,i=new r(n.type,n);return Object.defineProperty(i,"target",{writable:!0,value:{value:e,name:H}}),t.event=i,D(e,t),!t.isCanceled&&(se.current=t.reason,te(e),!0)}),K=G((e,t,n)=>{let r=i_(e,t,f,d,ye,be);if(a_(r,y,p)){let e=`key`in n?wo:bo,i=Se(r,Q(e,n.nativeEvent,void 0,{activeThumbIndex:t}));N(!0),i&&O(r,uo(e,n.nativeEvent))}});J(()=>{if(!V)return;let e=Yr(Re(U.current));Z(U.current,e)&&e.blur(),ce!==-1&&_e(-1)},[ce,V,_e]);let Ce=Y.useMemo(()=>({...A,activeThumbIndex:ce,disabled:V,dragging:fe,orientation:v,max:d,min:f,minStepsBetweenValues:p,step:y,values:be}),[A,ce,V,fe,d,f,p,v,y,be]),we=Y.useMemo(()=>({active:ce,controlRef:ne,disabled:V,dragging:fe,validation:I,format:s,handleInputChange:K,indicatorPosition:he,inset:x!==`center`,isArrayValue:ye,labelId:B,rootLabelId:E,largeStep:c,lastUsedThumbIndex:ue,lastChangeReasonRef:se,form:m,locale:l,max:d,min:f,minStepsBetweenValues:p,name:H,onValueCommitted:O,orientation:v,pressedThumbCenterOffsetRef:ie,pressedThumbIndexRef:ae,pressedValuesRef:oe,registerFieldControlRef:ve,renderBeforeHydration:x===`edge`,setActive:_e,setDragging:W,setIndicatorPosition:ge,setLabelId:z,setValue:Se,state:Ce,step:y,thumbCollisionBehavior:b,thumbMap:pe,thumbRefs:re,values:be}),[ce,B,E,V,fe,I,s,K,he,c,ue,m,l,d,f,p,H,O,v,ye,ve,_e,Se,Ce,y,b,x,pe,be]),Te=q(`div`,e,{state:Ce,ref:[t,U],props:[{"aria-labelledby":B,id:T,role:`group`},w,e=>I.getValidationProps(V,e)],stateAttributesMapping:s_});return(0,X.jsx)(c_.Provider,{value:we,children:(0,X.jsx)(Wf,{elementsRef:re,onMapChange:me,children:Te})})});function f_(e){return e===`touch`||e===`pen`}function p_(e,t){let n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function m_(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function h_(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(m_(t),m_(n))))}function g_(e,t,n,r,i,a,o,s){let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=fh(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=fh(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=fh(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function __(e,t,n,r,i,a,o,s,c,l){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;if(e===`push`)return{value:g_(u,i,a,o,s,c,l),thumbIndex:i,didSwap:!1};let p=u.slice(),m=p[i-1],h=p[i+1],g=m==null?o:m+f,_=h==null?s:h-f,v=Number(fh(a,g,_).toFixed(12));switch(p[i]=v,e){case`swap`:{let e=u[i],t=1e-7,n=a>e,r=a<e,g=n&&h!=null&&a>=h-t,_=r&&m!=null&&a<=m+t;if(!g&&!_)return{value:p,thumbIndex:i,didSwap:!1};let y=g?i+1:i-1,b=p.map((e,t)=>t===i?v:d[t]??u[t]),x=a;x=g?Math.max(a,p[y]):Math.min(a,p[y]);let S=g_(p,y,x,o,s,c,l,b),C=g?y-1:y+1,w=S[C-1],T=S[C+1],E=w==null?o:w+f;E=Math.max(E,o+C*f);let D=T==null?s:T-f;D=Math.min(D,s-(S.length-1-C)*f);let O=fh(v,E,D);return S[C]=Number(O.toFixed(12)),{value:S,thumbIndex:y,didSwap:!0}}default:return{value:p,thumbIndex:i,didSwap:!1}}}var v_=2;function y_(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function b_(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var x_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{disabled:o,dragging:s,inset:c,isArrayValue:l,lastChangeReasonRef:u,max:d,min:f,minStepsBetweenValues:p,onValueCommitted:m,orientation:h,pressedThumbCenterOffsetRef:g,pressedThumbIndexRef:_,pressedValuesRef:v,registerFieldControlRef:y,renderBeforeHydration:b,setActive:x,setDragging:S,setValue:C,state:w,step:T,thumbCollisionBehavior:E,thumbRefs:D,values:O}=l_(),k=Id(),A=O.length>1,j=h===`vertical`,M=Y.useRef(null),N=Y.useRef(null),P=G(e=>{e&&N.current==null&&(N.current=Ce(e).getComputedStyle(e))}),F=Y.useRef(null),I=Y.useRef(0),L=Y.useRef(0),R=Y.useRef(null),z=Y.useRef(!1),B=Qo(O);function V(e){return e?.querySelector(`input[type="range"]`)}function H(e){_.current=e,D.current[e]||(g.current=null)}function ee(){_.current=-1,g.current=null}function te(e){return ue(e)?D.current.some(t=>!ue(t)||!Z(t,e)?!1:V(t)?.disabled===!0):!1}function U(e){let t=M.current,n=_.current;if(!t||n<0||n>=O.length)return n>=O.length&&(R.current=null),null;let{width:r,height:i,bottom:a,left:o,right:s}=t.getBoundingClientRect(),c=y_(N.current,j),u=L.current,m=(j?i:r)-c.start-c.end-u*2,h=g.current??0,y=e.x-h,b=e.y-h,x=fh(((j?a-b-c.end:(k===`rtl`?s-y:y-o)-c.start)-u)/m,0,1),S=(d-f)*x+f;return S=h_(S,T,f),S=fh(S,f,d),A?__(E,O,B.current,v.current,n,S,f,d,T,p):{value:l?[S]:S,thumbIndex:n,didSwap:!1}}function ne(e){v.current=A?O.slice():null,R.current=null,B.current=O;let t=_.current,n=t;if(t>-1&&t<O.length){if(O[t]===d){let e=t;for(;e>0&&O[e-1]===d;)--e;n=e}}else{let t=j?`y`:`x`,r;n=-1;for(let i=0;i<D.current.length;i+=1){let a=D.current[i];if(ue(a)&&!V(a)?.disabled){let o=p_(a,j),s=Math.abs(e[t]-o);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&H(n),c){let e=D.current[n];if(ue(e)){let t=e.getBoundingClientRect();L.current=t[j?`height`:`width`]/2}}}function re(e){let t=V(D.current?.[e]);t&&t.focus({preventScroll:!0,focusVisible:!1})}function ie(e,t,n){let r=C(e.value,Q(t,n,void 0,{activeThumbIndex:e.thumbIndex}));return r&&(R.current=e.value,B.current=Array.isArray(e.value)?e.value:[e.value],e.didSwap&&(H(e.thumbIndex),re(e.thumbIndex))),r}let ae=G(e=>{let t=b_(e,F);if(t==null)return;if(I.current+=1,e.type===`pointermove`&&e.buttons===0){oe(e);return}let n=U(t);n!=null&&a_(n.value,T,p)&&(!s&&I.current>v_&&S(!0),ie(n,To,e))}),oe=G(e=>{if(b_(e,F)==null)return;x(-1),S(!1),g.current=null;let t=R.current;if(Array.isArray(t)&&t.length!==O.length&&(R.current=null),R.current!=null){let t=u.current;m(R.current,uo(t,e))}`pointerType`in e&&M.current?.hasPointerCapture(e.pointerId)&&M.current?.releasePointerCapture(e.pointerId),_.current=-1,le()}),se=G(e=>{F.current??oe(e)}),ce=G(e=>{let t=z.current;if(z.current=!1,o)return;if(te(Zr(e))){ee();return}let n=e.changedTouches[0];if(n==null)return;if(F.current=n.identifier,!t){let t={x:n.clientX,y:n.clientY};ne(t);let r=U(t);if(r==null)return;re(r.thumbIndex),ie(r,yo,e),I.current=0}let r=Re(M.current);r.addEventListener(`touchmove`,ae,{passive:!0}),r.addEventListener(`touchend`,oe,{passive:!0}),r.addEventListener(`touchcancel`,oe,{passive:!0})}),le=G(()=>{let e=Re(M.current);e.removeEventListener(`pointermove`,ae),e.removeEventListener(`pointerup`,oe),e.removeEventListener(`pointercancel`,se),e.removeEventListener(`touchmove`,ae),e.removeEventListener(`touchend`,oe),e.removeEventListener(`touchcancel`,oe),F.current=null,v.current=null,R.current=null,z.current=!1}),de=$a();return Y.useEffect(()=>{let e=M.current;if(!e)return()=>le();let t=Xo(e,`touchstart`,ce,{passive:!0});return()=>{t(),de.cancel(),le()}},[le,ce,M,de]),Y.useEffect(()=>{o&&le()},[o,le]),q(`div`,e,{state:w,ref:[t,y,M,P],props:[{"data-base-ui-slider-control":b?``:void 0,onPointerDown(e){z.current=!1;let t=M.current,n=Zr(e.nativeEvent);if(!t||o||e.defaultPrevented||!ue(n)||e.button!==0)return;if(te(n)){ee();return}let r={x:e.clientX,y:e.clientY};ne(r);let i=U(r);if(i==null)return;Z(D.current[i.thumbIndex],Yr(Re(t)))?e.preventDefault():de.request(()=>{re(i.thumbIndex)}),S(!0),g.current??ie(i,yo,e.nativeEvent),e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),I.current=0,z.current=f_(e.pointerType);let a=Re(t);a.addEventListener(`pointermove`,ae,{passive:!0}),a.addEventListener(`pointerup`,oe,{once:!0}),a.addEventListener(`pointercancel`,se,{once:!0})}},a],stateAttributesMapping:s_})}),S_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=l_();return q(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:s_})}),C_=`data-index`,w_,T_=new Set([...Eu,wu,Tu]);function E_(e,t,n,r){if(!(t<0))return e.length===2?`${Ag(e[t],r,n)} ${t===0?`start`:`end`} range`:n?Ag(e[t],r,n):void 0}function D_(e,t,n,r,i){let a=e+t*n;return fh(Number(a.toFixed(Math.max(m_(e),m_(t),m_(r)))),r,i)}var O_=Y.forwardRef(function(e,t){let{render:n,children:r,className:i,"aria-describedby":a,"aria-label":o,"aria-labelledby":s,"aria-valuetext":c,disabled:l=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:m,onBlur:h,onFocus:g,onKeyDown:_,tabIndex:v,style:y,...b}=e,x=Or(f),{active:S,lastUsedThumbIndex:C,controlRef:w,disabled:T,validation:E,format:D,handleInputChange:O,inset:k,isArrayValue:A,labelId:j,largeStep:M,locale:N,max:P,min:F,minStepsBetweenValues:I,form:L,name:R,orientation:z,pressedThumbCenterOffsetRef:B,pressedThumbIndexRef:V,renderBeforeHydration:H,setActive:ee,setIndicatorPosition:te,state:U,step:ne,thumbRefs:re,values:ie}=l_(),ae=Id(),oe=l||T,se=ie.length>1,ce=z===`vertical`,le=ae===`rtl`,{setTouched:ue,validationMode:de}=br(),fe=Y.useRef(null),W=Y.useRef(null),pe=so(oe,W),me=Y.useRef(!1),he=G(e=>{me.current||g?.(e)}),ge=G(e=>{me.current||h?.(e)}),_e=Or(),ve=Pr(),ye=se?_e:ve,{ref:xe,index:Se}=ap({metadata:Y.useMemo(()=>({inputId:ye}),[ye])}),K=se?p??Se:0,we=K===ie.length-1,Te=ie[K],Ee=jg(Te,F,P),[De,Oe]=Y.useState(),ke=gp(),Ae=C>=0&&C<ie.length?C:-1,je=G(()=>{let e=w.current,t=fe.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=ce?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*Ee/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;Oe(s),K===0?te(e=>[s,e[1]]):we&&te(e=>[e[0],s])});J(()=>{k&&queueMicrotask(je)},[je,k]),J(()=>{k&&je()},[je,k,Ee]),J(()=>{if(!k)return;let e=w.current,t=fe.current;if(!e||!t)return;let n=Ce(e).ResizeObserver;if(typeof n!=`function`)return;let r=new n(je);return r.observe(e),r.observe(t),()=>{r.disconnect()}},[w,je,k]);let Me=ce?`bottom`:`insetInlineStart`,Pe=ce?`left`:`top`,Fe;se?S===K?Fe=2:Ae===K&&(Fe=1):S===K&&(Fe=1);let Ie;Ie=!k&&!Number.isFinite(Ee)?ts:{position:`absolute`,[Me]:k?`var(--position)`:`${Ee}%`,[Pe]:`50%`,translate:`${(ce||!le?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:Fe,...k&&{"--position":`${De??0}%`,visibility:H&&ke||De===void 0?`hidden`:void 0}};let Le;ce&&(Le=le?`vertical-rl`:`vertical-lr`);let Re=typeof u==`function`?u(K):o,ze=Ne({"aria-label":Re,"aria-labelledby":s??(Re==null?j:void 0),"aria-describedby":a,"aria-orientation":z,"aria-valuenow":Te,"aria-valuetext":typeof d==`function`?d(Ag(Te,N,D),Te,K):c??E_(ie,K,D,N),disabled:oe,form:L,id:ye,max:P,min:F,name:R,onChange(e){O(e.currentTarget.valueAsNumber,K,e)},onFocus(e){let t=me.current;me.current=!1,ee(K),pe(!0),t&&e.stopPropagation()},onBlur(e){me.current?e.stopPropagation():(ee(-1),!re.current.some(t=>Z(t,e.relatedTarget))&&(ue(!0),pe(!1),de===`onBlur`&&E.commit(i_(Te,K,F,P,A,ie))))},onKeyDown(e){if(e.defaultPrevented||!T_.has(e.key))return;Eu.has(e.key)&&e.stopPropagation();let t=null,n=0,r=e.shiftKey?M:ne,i=h_(Te,ne,F);switch(e.key){case yu:n=1;break;case Su:n=le?-1:1;break;case bu:n=-1;break;case xu:n=le?1:-1;break;case wu:r=M,n=1;break;case Tu:r=M,n=-1;break;case`End`:t=se&&Number.isFinite(ie[K+1])?ie[K+1]-ne*I:P;break;case Cu:t=se&&Number.isFinite(ie[K-1])?ie[K-1]+ne*I:F}if(n!==0&&(t=D_(i,r,n,F,P)),t!==null){let n=e.currentTarget;Ai(n)||(me.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),O(t,K,e),e.preventDefault()}},step:ne,style:{...ts,width:`100%`,height:`100%`,writingMode:Le},tabIndex:v,type:`range`,value:Te??``},e=>E.getValidationProps(oe,e),{onFocus:he,onBlur:ge,onKeyDown:_}),Be=be(W,E.inputRef,m);return q(`div`,e,{state:U,ref:[t,xe,fe],props:[{[C_]:K,children:(0,X.jsxs)(Y.Fragment,{children:[r,(0,X.jsx)(`input`,{ref:Be,...ze,suppressHydrationWarning:!0}),k&&we&&H&&(w_||=(0,X.jsx)(bp,{script:``}))]}),id:x,onPointerDown(e){if(oe)return;V.current=K;let t=p_(e.currentTarget,ce);B.current=(ce?e.clientY:e.clientX)-t},style:Ie,suppressHydrationWarning:H||void 0},b],stateAttributesMapping:s_})});function k_(e,t,n,r,i,a){let o={visibility:a||n&&(r===void 0||t&&i===void 0)?`hidden`:void 0,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`},s=`${r??0}%`,c=`${(i??0)-(r??0)}%`;return n&&(o[`--start-position`]=s,s=`var(--start-position)`,t&&(o[`--relative-size`]=c,c=`var(--relative-size)`)),o[e?`bottom`:`insetInlineStart`]=t?s:0,o[e?`height`:`width`]=t?c:s,o}var A_=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=l_(),m=gp(),h=k_(u===`vertical`,p.length>1,s,s?o[0]:jg(p[0],l,c),s?o[1]:jg(p[p.length-1],l,c),s&&d&&m);return q(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:h,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:s_})});function j_({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=Array.isArray(n)?n:Array.isArray(t)?t:[r,i];return(0,X.jsx)(d_,{className:K(`data-horizontal:w-full data-vertical:h-full`,e),"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,thumbAlignment:`edge`,...a,children:(0,X.jsxs)(x_,{className:`relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col`,children:[(0,X.jsx)(S_,{"data-slot":`slider-track`,className:`relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1`,children:(0,X.jsx)(A_,{"data-slot":`slider-range`,className:`bg-primary select-none data-horizontal:h-full data-vertical:w-full`})}),Array.from({length:o.length},(e,t)=>(0,X.jsx)(O_,{"data-slot":`slider-thumb`,className:`relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50`},t))]})})}function M_({options:e,onChange:t,portalRoot:n}){let r=Math.round(e.masterVolume*100),i=x(e.lighting),a=e=>t({lighting:{...i,...e}});return(0,X.jsxs)(`section`,{className:`min-h-full space-y-3 px-3 py-2.5 text-xs`,children:[(0,X.jsxs)(`section`,{"aria-label":`Rendering and sound`,className:`joy-pause-settings-main`,children:[(0,X.jsxs)(`label`,{children:[`Quality`,(0,X.jsx)(N_,{container:n,value:e.quality,onChange:e=>t({quality:e}),choices:[`high`,`medium`,`low`]})]}),(0,X.jsxs)(`label`,{children:[`Smoke`,(0,X.jsx)(N_,{container:n,value:e.smokeTint,onChange:e=>t({smokeTint:e}),choices:[`natural`,`cyan`,`magenta`]})]}),(0,X.jsxs)(`label`,{children:[`Surface`,(0,X.jsx)(N_,{container:n,value:e.surfaceTone,onChange:e=>t({surfaceTone:e}),choices:[`auto`,`light`,`dark`]})]}),(0,X.jsxs)(`label`,{children:[`Speed zoom`,(0,X.jsx)(N_,{container:n,value:String(e.speedZoom),onChange:e=>t({speedZoom:e===`auto`?`auto`:e===`true`}),choices:[`auto`,`true`,`false`],labels:{true:`On`,false:`Off`}})]}),(0,X.jsxs)(`label`,{children:[`Viewport`,(0,X.jsx)(N_,{container:n,value:e.viewportMode,onChange:e=>t({viewportMode:e}),choices:[`fixed`,`absolute`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Audio`,className:`joy-pause-audio`,children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Audio`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(j_,{"aria-label":`Volume`,value:[r],onValueChange:e=>t({masterVolume:Number(Array.isArray(e)?e[0]:e)/100}),min:0,max:100}),(0,X.jsxs)(`output`,{children:[r,`%`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Vehicle effects`,className:`space-y-1.5`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`Effects`}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-2.5 gap-y-1.5 [&_label]:flex [&_label]:items-center [&_label]:gap-1.5 [&_label]:text-muted-foreground`,children:[(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.idleSound,onCheckedChange:e=>t({idleSound:e})}),`Idle sound`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.sparks,onCheckedChange:e=>t({sparks:e})}),`Collision sparks`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.screenShake,onCheckedChange:e=>t({screenShake:e})}),`Screen shake`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.deform,onCheckedChange:e=>t({deform:e})}),`Deformation`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.showVehicleMarkers,onCheckedChange:e=>t({showVehicleMarkers:e})}),`Vehicle markers`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.weaponCooldown,onCheckedChange:e=>t({weaponCooldown:e})}),`Tool cooldown`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`World settings`,className:`space-y-1.5`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`World`}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-2.5 gap-y-1.5 [&_label]:flex [&_label]:items-center [&_label]:gap-1.5 [&_label]:text-muted-foreground`,children:[(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.viewportWalls,onCheckedChange:e=>t({viewportWalls:e})}),`Viewport walls`]}),(0,X.jsxs)(`label`,{children:[(0,X.jsx)(zf,{checked:e.debug,onCheckedChange:e=>t({debug:e})}),`Diagnostics`]})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5 py-1`,children:[(0,X.jsxs)(`label`,{className:`flex items-center justify-between gap-3 font-medium`,children:[`Auto paint`,(0,X.jsx)(n_,{"aria-label":`Auto paint`,checked:e.autoPaint??!1,onCheckedChange:e=>t({autoPaint:e})})]}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`Pick up paint from small, colored backgrounds. Neutral shades, images, and large containers are excluded.`})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Experiments`,className:`space-y-3`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold`,children:`Experiments`}),(0,X.jsxs)(`label`,{className:`flex items-center justify-between font-semibold`,children:[`Show HUD`,(0,X.jsx)(n_,{checked:e.showHud,onCheckedChange:e=>t({showHud:e}),"aria-label":`Show HUD`})]}),(0,X.jsxs)(`div`,{className:`grid gap-2 text-muted-foreground`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(zf,{checked:e.showTotalPoints,onCheckedChange:e=>t({showTotalPoints:e})}),`Show total points`]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-2 has-disabled:opacity-50`,children:[(0,X.jsx)(zf,{disabled:e.showHud,checked:!e.showHud&&e.showHealthBars,onCheckedChange:e=>t({showHealthBars:e})}),`Show mini health bar`]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-2 has-disabled:opacity-50`,children:[(0,X.jsx)(zf,{disabled:e.showHud,checked:!e.showHud&&e.showWeaponBar,onCheckedChange:e=>t({showWeaponBar:e})}),`Show mini ammo bar`]})]})]}),(0,X.jsxs)(`section`,{"aria-label":`Vehicle lights`,className:`space-y-2`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`Lights`}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,X.jsx)(zf,{checked:i.underglow,onCheckedChange:e=>a({underglow:e})}),`Underglow `,(0,X.jsx)(`kbd`,{className:`ml-auto`,children:`U`})]}),(0,X.jsxs)(`label`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[`Colour`,(0,X.jsx)(Po,{type:`color`,"aria-label":`Underglow colour`,value:i.underglowColor,onInput:e=>a({underglowColor:e.currentTarget.value}),onChange:e=>a({underglowColor:e.target.value}),className:`h-6 w-10 p-0.5`})]}),(0,X.jsxs)(`label`,{className:`col-span-2 grid gap-1 text-muted-foreground`,children:[`Glow opacity · `,Math.round(i.underglowOpacity*100),`%`,(0,X.jsx)(j_,{"aria-label":`Underglow opacity`,min:0,max:100,value:[Math.round(i.underglowOpacity*100)],onValueChange:e=>a({underglowOpacity:Number(Array.isArray(e)?e[0]:e)/100})})]})]}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`Headlights work automatically on dark surfaces. Brake lights work in daylight, too.`})]})]})}function N_({value:e,onChange:t,choices:n,labels:r,container:i}){return(0,X.jsxs)(cg,{value:e,onValueChange:e=>t(String(e)),children:[(0,X.jsx)(ug,{className:`w-full text-sm`,children:(0,X.jsx)(lg,{children:r?.[e]??e[0].toUpperCase()+e.slice(1)})}),(0,X.jsx)(dg,{container:i,children:n.map(e=>(0,X.jsx)(fg,{value:e,children:r?.[e]??e[0].toUpperCase()+e.slice(1)},e))})]})}function P_({tools:e}){return(0,X.jsx)(`section`,{className:`min-h-full px-4 py-3 text-sm`,children:(0,X.jsxs)(Ap,{defaultValue:`keyboard`,className:`gap-3`,children:[(0,X.jsxs)(Mp,{className:`w-full`,"aria-label":`Input device`,children:[(0,X.jsx)(Np,{value:`keyboard`,className:`text-sm`,children:`Keyboard`}),(0,X.jsx)(Np,{value:`gamepad`,disabled:!0,className:`text-sm`,children:`Gamepad`})]}),(0,X.jsx)(Pp,{value:`keyboard`,className:`grid grid-cols-1 gap-x-5 gap-y-2 min-[601px]:grid-cols-2`,children:C.filter(t=>!r.some(e=>e.id===t.id)||e.some(e=>e.id===t.id)).map(e=>(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2 border-b border-border/60 py-1`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,X.jsx)(`kbd`,{className:`shrink-0 font-mono text-xs font-semibold text-foreground`,children:e.keys.join(` / `)})]},e.id))})]})})}function F_({tools:e,allowEditing:t}){return(0,X.jsxs)(`section`,{className:`min-h-full space-y-3 px-3 py-2.5 text-xs`,children:[(0,X.jsx)(`h2`,{className:`font-mono text-xs font-semibold uppercase`,children:`Tools`}),(0,X.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Hold a shortcut while driving.`,t&&` Tool settings are in the vehicle editor.`]}),(0,X.jsx)(`div`,{className:`grid gap-1.5`,children:e.map(e=>(0,X.jsxs)(`div`,{className:`joy-pause-tool flex items-center gap-2 rounded-sm border border-border px-2 py-1.5`,children:[(0,X.jsx)(`kbd`,{className:`grid h-6 min-w-6 place-items-center rounded-sm bg-muted px-1 font-mono font-semibold`,children:e.keys.join(` / `)}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline justify-between gap-2`,children:[(0,X.jsx)(`span`,{className:`font-semibold`,children:e.label}),(0,X.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e.description})]})]},e.id))}),!e.length&&(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`No tools are enabled for this world.`})]})}var I_=Object.freeze([]),L_=()=>I_,R_=()=>()=>{};function z_({objects:e,onReveal:t,onDriveTo:n,onReset:r}){let i=(0,Y.useSyncExternalStore)(e?.subscribe??R_,e?.getSnapshot??L_,L_),[a,o]=(0,Y.useState)(``),[s,c]=(0,Y.useState)(`all`),[l,u]=(0,Y.useState)(``),d=[...new Set([...i.flatMap(e=>e.capabilities),...s===`all`?[]:[s]])].sort(),f=a.trim().toLowerCase(),p=i.filter(e=>(s===`all`||e.capabilities.includes(s))&&[e.name,e.id,e.element,...e.capabilities].join(` `).toLowerCase().includes(f)),m=n=>{e?.getTarget(n.id)?(t(),requestAnimationFrame(()=>e.reveal(n.id))):u(`That object is no longer available.`)},h=t=>{let r=e?.getTarget(t.id);r?n?.(r):u(`That object is no longer available.`)};return(0,X.jsxs)(`section`,{"aria-label":`Scene objects`,className:`min-h-full space-y-4 px-3 py-3 text-xs`,children:[(0,X.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`h2`,{className:`text-sm font-semibold`,children:[i.length,` active `,i.length===1?`object`:`objects`]}),(0,X.jsx)(`p`,{className:`mt-1.5 leading-relaxed text-muted-foreground`,children:`Show highlights an object on the page. Drive to makes a short skid toward it. Reset restores that object; remove leaves the HTML in place.`})]}),(0,X.jsx)(De,{variant:`ghost`,size:`sm`,className:`shrink-0 text-[11px]`,onClick:()=>{r(),u(`Scene reset.`)},children:`Reset scene`})]}),(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[(0,X.jsx)(Po,{"aria-label":`Search scene objects`,placeholder:`Find an object…`,value:a,onChange:e=>{o(e.target.value),u(``)},className:`h-8 min-w-0 flex-1 text-xs`}),(0,X.jsxs)(Bf,{"aria-label":`Object type`,size:`sm`,value:s,onChange:e=>{c(e.target.value),u(``)},children:[(0,X.jsx)(Vf,{value:`all`,children:`All types`}),d.map(e=>(0,X.jsx)(Vf,{value:e,children:e},e))]})]}),(0,X.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:`min-h-4 text-[10px] text-muted-foreground`,children:l||(a||s!==`all`?`${p.length} of ${i.length} objects`:`Live objects from this simulation`)}),p.length?(0,X.jsx)(`ul`,{"aria-label":`Active scene objects`,className:`divide-y divide-border`,children:p.map(t=>(0,X.jsxs)(`li`,{"data-object-id":t.id,className:`flex items-center gap-2 py-3`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,X.jsx)(`span`,{className:`relative flex size-12 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted/40`,style:{backgroundColor:t.preview.image&&!t.preview.image.startsWith(`data:image/svg+xml`)?`#e4e7e9`:t.preview.image?void 0:t.preview.color},children:t.preview.image?(0,X.jsx)(`img`,{src:t.preview.image,alt:``,loading:`lazy`,className:`size-full object-contain p-1`,onError:e=>{e.currentTarget.style.visibility=`hidden`}}):t.preview.text?(0,X.jsx)(`span`,{className:`px-1 text-center text-[9px] font-semibold leading-tight text-foreground [text-shadow:0_0_3px_var(--background)]`,children:t.preview.text}):(0,X.jsx)(vt,{size:19,className:`text-muted-foreground`})}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`span`,{className:`flex items-center gap-1.5`,children:(0,X.jsx)(`strong`,{className:`truncate text-xs font-semibold`,children:t.name})}),(0,X.jsxs)(`span`,{className:`mt-1 flex flex-wrap gap-x-2 gap-y-1 text-[9px] text-muted-foreground`,title:t.id,children:[(0,X.jsx)(`code`,{children:t.element}),t.state!==`Active`&&(0,X.jsx)(`span`,{children:t.state})]}),(0,X.jsx)(`span`,{className:`mt-1.5 flex flex-wrap gap-1`,children:t.capabilities.map(e=>(0,X.jsx)(`span`,{className:`rounded-sm bg-muted px-1.5 py-0.5 text-[9px] text-muted-foreground`,children:e},e))})]})]}),(0,X.jsxs)(`div`,{className:`flex shrink-0 gap-0.5`,children:[(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,"aria-label":`Show ${t.name} (${t.id})`,title:`Show object`,onClick:()=>m(t),children:(0,X.jsx)(B,{size:15})}),n&&(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,"aria-label":`Drive to ${t.name} (${t.id})`,title:`Drive to object`,onClick:()=>h(t),children:(0,X.jsx)(lt,{size:15})}),(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,disabled:!t.resettable,"aria-label":`Reset ${t.name} (${t.id})`,title:`Reset object`,onClick:()=>u(e?.reset(t.id)?`Reset ${t.name}.`:`That object is no longer available.`),children:(0,X.jsx)(st,{size:15})}),(0,X.jsx)(De,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove ${t.name} (${t.id}) from simulation`,title:`Remove from simulation`,onClick:()=>u(e?.remove(t.id)?`Removed ${t.name} from the simulation.`:`That object is no longer available.`),children:(0,X.jsx)(z,{size:15})})]})]},t.id))}):(0,X.jsxs)(`div`,{className:`rounded-lg border border-dashed p-8 text-center leading-relaxed text-muted-foreground`,children:[(0,X.jsx)(vt,{size:24,className:`mx-auto mb-3 opacity-50`}),i.length?`No objects match those filters.`:e?`No active objects in this scene yet.`:`Start a playground to inspect its objects here.`]})]})}var B_={audio:[{key:`masterVolume`,label:`Master volume`,kind:`number`,min:0,max:1,step:.05},{key:`idleSound`,label:`Engine idle audio`,kind:`toggle`}],rendering:[{key:`quality`,label:`Fluid quality`,kind:`select`,choices:[`low`,`medium`,`high`]},{key:`smokeTint`,label:`Smoke tint`,kind:`select`,choices:[`natural`,`cyan`,`magenta`]},{key:`surfaceTone`,label:`Surface tone`,kind:`select`,choices:[`auto`,`light`,`dark`]},{key:`sparks`,label:`Sparks`,kind:`toggle`},{key:`deform`,label:`Deformation`,kind:`toggle`},{key:`screenShake`,label:`Screen shake`,kind:`toggle`},{key:`debug`,label:`Debug overlay`,kind:`toggle`}],policy:[{key:`weaponCooldown`,label:`Tool cooldown`,kind:`toggle`},{key:`vehicleDestructible`,label:`Vehicle damage`,kind:`toggle`},{key:`weaponsEnabled`,label:`Action tools`,kind:`toggle`},{key:`rocketBlastStrength`,label:`Rocket blast strength`,kind:`number`,min:0,max:10,step:.1}],ui:[{key:`showHud`,label:`HUD`,kind:`toggle`},{key:`showTotalPoints`,label:`Total points`,kind:`toggle`},{key:`showHealthBars`,label:`Health bars`,kind:`toggle`},{key:`showVehicleMarkers`,label:`Offscreen car pointer`,kind:`toggle`},{key:`showWeaponBar`,label:`Tool reserve bar`,kind:`toggle`},{key:`showLogo`,label:`Joy Ride logo`,kind:`toggle`},{key:`showGithub`,label:`GitHub link`,kind:`toggle`},{key:`allowVehicleEditing`,label:`Vehicle editing`,kind:`toggle`},{key:`brandName`,label:`Brand name`,kind:`text`},{key:`brandColor`,label:`Brand color`,kind:`text`}],camera:[{key:`viewportWalls`,label:`Viewport walls`,kind:`toggle`},{key:`viewportMode`,label:`Canvas placement`,kind:`select`,choices:[`fixed`,`absolute`]},{key:`speedZoom`,label:`Speed zoom`,kind:`select`,choices:[`auto`,`on`,`off`]}],lighting:[{key:`underglow`,label:`Underglow`,kind:`toggle`},{key:`underglowColor`,label:`Underglow color`,kind:`color`},{key:`underglowOpacity`,label:`Underglow opacity`,kind:`number`,min:0,max:1,step:.05},{key:`headlights`,label:`Headlights`,kind:`toggle`},{key:`taillights`,label:`Taillights`,kind:`toggle`},{key:`brakeLights`,label:`Brake lights`,kind:`toggle`}]};function V_({value:e,onChange:t}){let n=b(l(o,e)),i=(e,t)=>n[e][t],s=(n,r,i)=>t({...e,[n]:{...e[n],[r]:i}});return(0,X.jsxs)(`section`,{"aria-label":`Embed options`,className:`space-y-3 py-3 text-xs`,children:[(0,X.jsx)(`p`,{className:`text-muted-foreground leading-relaxed`,children:`These options control the embedded ride. Choose a starting point, then customize it.`}),(0,X.jsx)(`button`,{type:`button`,className:`rounded border px-2 py-1`,onClick:()=>t({...e,policy:{...e.policy,...a.policy},ui:{...e.ui,...a.ui}}),children:`Use safe for work defaults`}),(0,X.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[`Auto paint`,(0,X.jsx)(n_,{checked:n.autoPaint,onCheckedChange:n=>t({...e,autoPaint:n})})]}),Object.keys(B_).map(e=>(0,X.jsxs)(`details`,{className:`rounded border px-2 py-2`,children:[(0,X.jsx)(`summary`,{className:`cursor-pointer font-medium capitalize`,children:e}),(0,X.jsxs)(`div`,{className:`space-y-2 pt-3`,children:[B_[e].map(t=>{let n=i(e,t.key);return(0,X.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[t.label,t.kind===`toggle`?(0,X.jsx)(n_,{checked:!!n,onCheckedChange:n=>s(e,t.key,n)}):t.kind===`select`?(0,X.jsx)(`select`,{"aria-label":t.label,className:`rounded border bg-background px-2 py-1`,value:t.key===`speedZoom`&&n!==`auto`?n?`on`:`off`:String(n),onChange:n=>s(e,t.key,t.key===`speedZoom`?n.target.value===`auto`?`auto`:n.target.value===`on`:n.target.value),children:t.choices?.map(e=>(0,X.jsx)(`option`,{value:e,children:e},e))}):(0,X.jsx)(`input`,{"aria-label":t.label,className:`w-28 rounded border bg-background px-2 py-1`,type:t.kind,min:t.min,max:t.max,step:t.step,value:String(n??``),onChange:n=>s(e,t.key,t.kind===`number`?Number(n.target.value):n.target.value)})]},t.key)}),e===`policy`&&(0,X.jsxs)(`fieldset`,{children:[(0,X.jsx)(`legend`,{className:`font-medium`,children:`Available tools`}),(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-1`,children:r.map(t=>(0,X.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(zf,{checked:n.policy.enabledTools?.includes(t.id)??!1,onCheckedChange:r=>s(e,`enabledTools`,r?[...n.policy.enabledTools??[],t.id]:n.policy.enabledTools?.filter(e=>e!==t.id))}),t.label]},t.id))})]}),e===`ui`&&(0,X.jsxs)(`fieldset`,{children:[(0,X.jsx)(`legend`,{className:`font-medium`,children:`Visible tabs`}),(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-1`,children:u.map(t=>(0,X.jsxs)(`label`,{className:`flex items-center gap-2 capitalize`,children:[(0,X.jsx)(zf,{checked:n.ui.vehicleTabs.includes(t),onCheckedChange:r=>s(e,`vehicleTabs`,r?[...n.ui.vehicleTabs,t]:n.ui.vehicleTabs.filter(e=>e!==t))}),t===`weapons`?`Tools`:t]},t))})]})]})]},e))]})}function H_({embed:e}){let[t,n]=(0,Y.useState)(`html`),r={html:{code:e.html,language:`html`,title:`HTML embed`},async:{code:e.async,language:`javascript`,title:`Async CDN`},npm:{code:e.npm,language:`javascript`,title:`npm module`},bookmarklet:{code:e.bookmarklet,language:`javascript`,title:`Bookmarklet URL`}}[t];return(0,X.jsxs)(`section`,{className:`min-h-full px-3 py-2.5 text-sm`,children:[e.configuration&&e.onConfigure&&(0,X.jsx)(V_,{value:e.configuration,onChange:e.onConfigure}),e.error?(0,X.jsx)(`p`,{role:`alert`,children:e.error}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ap,{value:t,onValueChange:e=>n(e),className:`my-2.5 gap-0`,children:(0,X.jsxs)(Mp,{className:`w-full`,"aria-label":`Embed format`,children:[(0,X.jsx)(Np,{value:`html`,className:`text-sm`,children:`HTML`}),(0,X.jsx)(Np,{value:`async`,className:`text-sm`,children:`Async CDN`}),(0,X.jsx)(Np,{value:`npm`,className:`text-sm`,children:`npm`}),(0,X.jsx)(Np,{value:`bookmarklet`,className:`text-sm`,children:`Bookmarklet`})]})}),(0,X.jsx)(lr,{code:r.code,language:r.language,title:r.title,compact:!0,maxHeight:210,wrap:t===`bookmarklet`})]})]})}var U_=`${T(M)}\n${bg}\n${xg}\n${Sg}`,W_=(0,Y.lazy)(()=>F(()=>import(`./Documentation-COD3aHk0.js`).then(e=>({default:e.Documentation})),__vite__mapDeps([0,1,2]),import.meta.url));function G_({color:e}){return(0,X.jsxs)(`svg`,{viewBox:`0 0 180 74`,"aria-hidden":`true`,children:[(0,X.jsx)(`rect`,{x:`15`,y:`9`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`15`,y:`55`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`136`,y:`9`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`136`,y:`55`,width:`29`,height:`10`,rx:`3`,fill:`#202326`}),(0,X.jsx)(`rect`,{x:`11`,y:`13`,width:`158`,height:`48`,rx:`19`,fill:e}),(0,X.jsx)(`rect`,{x:`58`,y:`18`,width:`69`,height:`38`,rx:`12`,fill:`#35454a`})]})}function K_({children:e,...t}){return(0,X.jsx)(`div`,{...t,children:e})}var q_={vehicle:{title:`Vehicle`,icon:lt,description:`Choose your ride.`},objects:{title:`Objects`,icon:vt,description:`Everything in this playground. Find it, reset it, or take it out.`},ai:{title:`AI`,icon:Et,description:`Give the other cars a brain.`},weapons:{title:`Tools`,icon:_t,description:`A few ways to make a mess.`},settings:{title:`Settings`,icon:bt,description:`Tune your ride.`},controls:{title:`Controls`,icon:St,description:`Get to know the controls.`},embed:{title:`Embed`,icon:ht,description:`Choose your embed options, then copy the code.`},documentation:{title:`Documentation`,icon:ct,description:`The complete API reference. Start small, build anything.`}};function J_({muted:e}){return e?(0,X.jsx)(D,{"aria-hidden":`true`}):(0,X.jsx)(N,{"aria-hidden":`true`})}function Y_(e){return(0,X.jsx)(X_,{...e,appearance:c(e)})}function X_({appearance:e,frame:t,preset:n,slots:r,presets:i,options:a,onSelectPreset:o,onSavePreset:c,onDeletePreset:l,onChange:d,onClose:f,onQuit:p,onReset:m,initialTab:h=`vehicle`,embed:g,recording:_,ai:v,objects:y,onDriveToObject:b}){let x=t??K_,[S,C]=(0,Y.useState)(h),[w,T]=(0,Y.useState)({chapter:``,anchor:``}),[E,D]=(0,Y.useState)(!1),O=e.allowVehicleEditing&&E,k=(0,Y.useRef)(e.allowVehicleEditing);k.current=e.allowVehicleEditing,(0,Y.useEffect)(()=>{e.allowVehicleEditing||D(!1)},[e.allowVehicleEditing]);let[A,j]=(0,Y.useState)(!1),[M,N]=(0,Y.useState)(!1),P=(0,Y.useRef)(a.masterVolume||1),F=u.filter(t=>e.vehicleTabs.includes(t)&&(t!==`ai`||!!v)&&(t!==`embed`||!!g)),L=F.includes(S)?S:F[0]??`vehicle`,{portalRoot:R,dialogRef:z,placement:B,dragging:V,headerProps:H}=Eg({styles:U_,size:O?{width:960,height:620}:L===`documentation`?{width:1040,height:720}:{width:760,height:600},onEscape:()=>{O?D(!1):f()},onReset:m,onRecordShortcut:_.onRecordShortcut,shortcutsEnabled:L!==`documentation`}),te=s(a.enabledTools??e.enabledTools,a.weaponsEnabled??e.weaponsEnabled,r),U=Math.round(a.masterVolume*100),ne=v?.cars.find(e=>e.id===v.selectedId),re=L===`ai`&&ne?ne.name||`AI ${ne.id.split(`-`).at(-1)}`:n.name;(0,Y.useEffect)(()=>{a.masterVolume>0&&(P.current=a.masterVolume)},[a.masterVolume]),(0,Y.useEffect)(()=>C(h),[h]);let ie={...B,pointerEvents:`auto`,...e.brandColor?{"--joy-ride-brand-color":e.brandColor}:{}},ae=()=>d({masterVolume:a.masterVolume>0?0:P.current});return R?(0,X.jsxs)(X.Fragment,{children:[(0,kt.createPortal)((0,X.jsx)(`div`,{"data-jr-ui":``,"aria-hidden":`true`,onClick:e=>{e.stopPropagation(),f()},style:{position:`fixed`,inset:0,zIndex:ee(`backdrop`),pointerEvents:`auto`,background:`#11182766`,backdropFilter:`blur(5px)`}}),document.body),(0,kt.createPortal)((0,X.jsx)(X.Fragment,{children:(0,X.jsx)(`div`,{ref:z,"data-jr-ui":``,className:`joy-pause-menu`,"data-documentation":L===`documentation`&&!O||void 0,role:`dialog`,"aria-label":`${e.brandName??`Joy Ride pause menu`} — ${re}`,"aria-modal":`true`,tabIndex:-1,style:ie,onPointerEnter:()=>N(!0),onPointerLeave:()=>N(!1),children:(0,X.jsx)(x,{className:`joy-pause-frame rounded-xl`,children:(0,X.jsxs)(_f,{keyboardShortcut:!1,className:`joy-pause-layout`,style:{"--sidebar-width":`var(--pause-sidebar-width)`},children:[(0,X.jsxs)(vf,{collapsible:`none`,className:`joy-pause-sidebar`,children:[(0,X.jsx)(yf,{className:`joy-pause-brand`,children:e.showLogo?(0,X.jsx)(`div`,{className:`joy-pause-logo-backing`,children:(0,X.jsx)(vg,{className:`joy-pause-logo`,hovered:M})}):(0,X.jsx)(`strong`,{className:`joy-pause-brand-name`,children:e.brandName??`Vehicle settings`})}),(0,X.jsx)(xf,{children:(0,X.jsx)(Sf,{children:(0,X.jsx)(`nav`,{"aria-label":`Vehicle configuration`,children:(0,X.jsx)(Cf,{children:F.map(e=>{let t=q_[e].icon;return(0,X.jsx)(wf,{children:(0,X.jsxs)(Ef,{size:`default`,isActive:L===e&&!O,"aria-current":L===e&&!O?`page`:void 0,title:q_[e].title,onClick:()=>{C(e),D(!1)},children:[(0,X.jsx)(t,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:q_[e].title})]})},e)})})})})}),(0,X.jsxs)(bf,{className:`joy-pause-sidebar-footer`,children:[(0,X.jsxs)(`div`,{className:`joy-pause-selected-vehicle`,"aria-label":`Selected vehicle: ${n.name}`,children:[n.image?(0,X.jsx)(`div`,{className:`joy-pause-selected-image`,children:(0,X.jsx)(`img`,{src:n.image.src,alt:``})}):(0,X.jsx)(G_,{color:n.visual?.color??`#838c8f`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`strong`,{children:n.name}),(0,X.jsx)(`span`,{children:[n.make,n.year].filter(Boolean).join(` · `)})]})]}),e.showGithub&&(0,X.jsx)(yg,{})]})]}),(0,X.jsxs)(`div`,{className:`joy-pause-workspace`,children:[(0,X.jsxs)(`header`,{className:`joy-pause-header`,"data-unbranded":e.showLogo?void 0:``,role:`group`,tabIndex:0,"aria-label":`Move pause menu. Drag or use arrow keys; Home centers it.`,"data-dragging":V||void 0,...H,children:[(0,X.jsxs)(`div`,{className:`joy-pause-heading`,children:[(0,X.jsx)(`h1`,{children:O?A?`New vehicle`:`Edit vehicle`:q_[L].title}),(0,X.jsx)(`p`,{children:O?n.name:q_[L].description})]}),(0,X.jsxs)(`div`,{className:`joy-pause-header-actions`,children:[(0,X.jsx)(De,{variant:`outline`,size:`icon`,onClick:ae,"aria-label":a.masterVolume?`Mute audio`:`Unmute audio`,title:`${a.masterVolume?`Mute`:`Unmute`} audio (${U}%)`,children:(0,X.jsx)(J_,{muted:!a.masterVolume})}),(0,X.jsx)(De,{variant:`outline`,size:`icon`,onClick:O?()=>D(!1):f,"aria-label":`Close vehicle settings`,children:(0,X.jsx)(I,{})})]})]}),(0,X.jsxs)(`div`,{className:`joy-pause-content`,children:[O?(0,X.jsx)(Rm,{enabledTools:te.map(e=>e.id),preset:n,createNew:A,garage:i,onSave:e=>{k.current&&(c(e),D(!1))},onDelete:e=>{k.current&&(l(e),D(!1))},onClose:()=>D(!1)},`${n.id}:${A}`):(0,X.jsx)(`div`,{className:`joy-pause-body min-h-0 flex-1`,children:(0,X.jsxs)(`div`,{className:`joy-pause-panels min-h-0 flex-1 overflow-auto`,"data-documentation":L===`documentation`||void 0,children:[L===`documentation`&&(0,X.jsx)(Y.Suspense,{fallback:(0,X.jsx)(`p`,{role:`status`,className:`p-5 text-muted-foreground`,children:`Loading API reference…`}),children:(0,X.jsx)(W_,{location:w,onNavigate:T})}),L===`vehicle`&&(0,X.jsx)(Jg,{preset:n,presets:i,options:a,tools:te,allowEditing:e.allowVehicleEditing,onSelectPreset:o,onSavePreset:c,onEdit:e=>{j(e),D(!0)}}),L===`objects`&&(0,X.jsx)(z_,{objects:y,onReveal:f,onDriveTo:b,onReset:m}),v&&L===`ai`&&(0,X.jsx)(`section`,{className:`min-h-full`,children:(0,X.jsx)(_g,{state:v,presets:i,defaultPresetId:n.id,portalRoot:R})}),L===`settings`&&(0,X.jsx)(M_,{options:a,onChange:d,portalRoot:R}),L===`controls`&&(0,X.jsx)(P_,{tools:te}),L===`weapons`&&(0,X.jsx)(F_,{tools:te,allowEditing:e.allowVehicleEditing}),g&&L===`embed`&&(0,X.jsx)(H_,{embed:g})]})}),!O&&(0,X.jsx)(`footer`,{className:`joy-pause-footer`,children:(0,X.jsxs)(`div`,{className:`joy-pause-footer-actions`,children:[(0,X.jsx)(De,{type:`button`,variant:`outline`,onClick:p,children:`Quit`}),(0,X.jsx)(De,{type:`button`,onClick:f,children:`Close`})]})})]})]})]})})})}),R)]}):null}export{Y_ as VehiclePopover,ut as n,lr as t};
|