jynko-kit 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +110 -2
  2. package/dist/components/atoms/AAvatar/AAvatar.d.ts +12 -0
  3. package/dist/components/atoms/AAvatar/AAvatar.d.ts.map +1 -0
  4. package/dist/components/atoms/AAvatar/AAvatar.styles.d.ts +7 -0
  5. package/dist/components/atoms/AAvatar/AAvatar.styles.d.ts.map +1 -0
  6. package/dist/components/atoms/AAvatar/index.d.ts +3 -0
  7. package/dist/components/atoms/AAvatar/index.d.ts.map +1 -0
  8. package/dist/components/atoms/AAvatar/types.d.ts +2 -0
  9. package/dist/components/atoms/AAvatar/types.d.ts.map +1 -0
  10. package/dist/components/atoms/ABadge/ABadge.d.ts +10 -0
  11. package/dist/components/atoms/ABadge/ABadge.d.ts.map +1 -0
  12. package/dist/components/atoms/ABadge/ABadge.styles.d.ts +8 -0
  13. package/dist/components/atoms/ABadge/ABadge.styles.d.ts.map +1 -0
  14. package/dist/components/atoms/ABadge/index.d.ts +3 -0
  15. package/dist/components/atoms/ABadge/index.d.ts.map +1 -0
  16. package/dist/components/atoms/ABadge/types.d.ts +3 -0
  17. package/dist/components/atoms/ABadge/types.d.ts.map +1 -0
  18. package/dist/components/atoms/AButton/AButton.d.ts +10 -0
  19. package/dist/components/atoms/AButton/AButton.d.ts.map +1 -0
  20. package/dist/components/atoms/AButton/AButton.styles.d.ts +15 -0
  21. package/dist/components/atoms/AButton/AButton.styles.d.ts.map +1 -0
  22. package/dist/components/atoms/AButton/index.d.ts +3 -0
  23. package/dist/components/atoms/AButton/index.d.ts.map +1 -0
  24. package/dist/components/atoms/AButton/types.d.ts +2 -0
  25. package/dist/components/atoms/AButton/types.d.ts.map +1 -0
  26. package/dist/components/atoms/AIcon/AIcon.d.ts +12 -0
  27. package/dist/components/atoms/AIcon/AIcon.d.ts.map +1 -0
  28. package/dist/components/atoms/AIcon/AIcon.styles.d.ts +8 -0
  29. package/dist/components/atoms/AIcon/AIcon.styles.d.ts.map +1 -0
  30. package/dist/components/atoms/AIcon/index.d.ts +3 -0
  31. package/dist/components/atoms/AIcon/index.d.ts.map +1 -0
  32. package/dist/components/atoms/AIconButton/AIconButton.d.ts +17 -0
  33. package/dist/components/atoms/AIconButton/AIconButton.d.ts.map +1 -0
  34. package/dist/components/atoms/AIconButton/AIconButton.styles.d.ts +11 -0
  35. package/dist/components/atoms/AIconButton/AIconButton.styles.d.ts.map +1 -0
  36. package/dist/components/atoms/AIconButton/index.d.ts +3 -0
  37. package/dist/components/atoms/AIconButton/index.d.ts.map +1 -0
  38. package/dist/components/atoms/AIconLink/AIconLink.d.ts +17 -0
  39. package/dist/components/atoms/AIconLink/AIconLink.d.ts.map +1 -0
  40. package/dist/components/atoms/AIconLink/AIconLink.styles.d.ts +11 -0
  41. package/dist/components/atoms/AIconLink/AIconLink.styles.d.ts.map +1 -0
  42. package/dist/components/atoms/AIconLink/index.d.ts +3 -0
  43. package/dist/components/atoms/AIconLink/index.d.ts.map +1 -0
  44. package/dist/components/atoms/AInput/AInput.d.ts +11 -0
  45. package/dist/components/atoms/AInput/AInput.d.ts.map +1 -0
  46. package/dist/components/atoms/AInput/AInput.styles.d.ts +26 -0
  47. package/dist/components/atoms/AInput/AInput.styles.d.ts.map +1 -0
  48. package/dist/components/atoms/AInput/index.d.ts +3 -0
  49. package/dist/components/atoms/AInput/index.d.ts.map +1 -0
  50. package/dist/components/atoms/ALink/ALink.d.ts +11 -0
  51. package/dist/components/atoms/ALink/ALink.d.ts.map +1 -0
  52. package/dist/components/atoms/ALink/ALink.styles.d.ts +8 -0
  53. package/dist/components/atoms/ALink/ALink.styles.d.ts.map +1 -0
  54. package/dist/components/atoms/ALink/index.d.ts +3 -0
  55. package/dist/components/atoms/ALink/index.d.ts.map +1 -0
  56. package/dist/components/atoms/ALogo/ALogo.d.ts +4 -0
  57. package/dist/components/atoms/ALogo/ALogo.d.ts.map +1 -0
  58. package/dist/components/atoms/ALogo/ALogo.styles.d.ts +9 -0
  59. package/dist/components/atoms/ALogo/ALogo.styles.d.ts.map +1 -0
  60. package/dist/components/atoms/ALogo/index.d.ts +3 -0
  61. package/dist/components/atoms/ALogo/index.d.ts.map +1 -0
  62. package/dist/components/atoms/ALogo/types.d.ts +8 -0
  63. package/dist/components/atoms/ALogo/types.d.ts.map +1 -0
  64. package/dist/components/atoms/ASearchInput/ASearchInput.d.ts +16 -0
  65. package/dist/components/atoms/ASearchInput/ASearchInput.d.ts.map +1 -0
  66. package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts +22 -0
  67. package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts.map +1 -0
  68. package/dist/components/atoms/ASearchInput/index.d.ts +3 -0
  69. package/dist/components/atoms/ASearchInput/index.d.ts.map +1 -0
  70. package/dist/components/atoms/ASection/ASection.d.ts +6 -0
  71. package/dist/components/atoms/ASection/ASection.d.ts.map +1 -0
  72. package/dist/components/atoms/ASection/ASection.styles.d.ts +6 -0
  73. package/dist/components/atoms/ASection/ASection.styles.d.ts.map +1 -0
  74. package/dist/components/atoms/ASection/index.d.ts +3 -0
  75. package/dist/components/atoms/ASection/index.d.ts.map +1 -0
  76. package/dist/components/atoms/ASelect/ASelect.d.ts +19 -0
  77. package/dist/components/atoms/ASelect/ASelect.d.ts.map +1 -0
  78. package/dist/components/atoms/ASelect/ASelect.styles.d.ts +38 -0
  79. package/dist/components/atoms/ASelect/ASelect.styles.d.ts.map +1 -0
  80. package/dist/components/atoms/ASelect/index.d.ts +3 -0
  81. package/dist/components/atoms/ASelect/index.d.ts.map +1 -0
  82. package/dist/components/atoms/ATextarea/ATextarea.d.ts +11 -0
  83. package/dist/components/atoms/ATextarea/ATextarea.d.ts.map +1 -0
  84. package/dist/components/atoms/ATextarea/ATextarea.styles.d.ts +20 -0
  85. package/dist/components/atoms/ATextarea/ATextarea.styles.d.ts.map +1 -0
  86. package/dist/components/atoms/ATextarea/index.d.ts +3 -0
  87. package/dist/components/atoms/ATextarea/index.d.ts.map +1 -0
  88. package/dist/components/atoms/ATypography/ATypography.d.ts +8 -0
  89. package/dist/components/atoms/ATypography/ATypography.d.ts.map +1 -0
  90. package/dist/components/atoms/ATypography/ATypography.styles.d.ts +8 -0
  91. package/dist/components/atoms/ATypography/ATypography.styles.d.ts.map +1 -0
  92. package/dist/components/atoms/ATypography/index.d.ts +3 -0
  93. package/dist/components/atoms/ATypography/index.d.ts.map +1 -0
  94. package/dist/components/atoms/index.d.ts +29 -0
  95. package/dist/components/atoms/index.d.ts.map +1 -0
  96. package/dist/components/index.d.ts +7 -0
  97. package/dist/components/index.d.ts.map +1 -0
  98. package/dist/components/molecules/MModal/MModal.d.ts +4 -0
  99. package/dist/components/molecules/MModal/MModal.d.ts.map +1 -0
  100. package/dist/components/molecules/MModal/MModal.styles.d.ts +19 -0
  101. package/dist/components/molecules/MModal/MModal.styles.d.ts.map +1 -0
  102. package/dist/components/molecules/MModal/index.d.ts +3 -0
  103. package/dist/components/molecules/MModal/index.d.ts.map +1 -0
  104. package/dist/components/molecules/MModal/types.d.ts +10 -0
  105. package/dist/components/molecules/MModal/types.d.ts.map +1 -0
  106. package/dist/components/molecules/MNavLinks/MNavLinks.d.ts +8 -0
  107. package/dist/components/molecules/MNavLinks/MNavLinks.d.ts.map +1 -0
  108. package/dist/components/molecules/MNavLinks/MNavLinks.styles.d.ts +7 -0
  109. package/dist/components/molecules/MNavLinks/MNavLinks.styles.d.ts.map +1 -0
  110. package/dist/components/molecules/MNavLinks/index.d.ts +3 -0
  111. package/dist/components/molecules/MNavLinks/index.d.ts.map +1 -0
  112. package/dist/components/molecules/MNavLinks/types.d.ts +22 -0
  113. package/dist/components/molecules/MNavLinks/types.d.ts.map +1 -0
  114. package/dist/components/molecules/MUserBadge/MUserBadge.d.ts +4 -0
  115. package/dist/components/molecules/MUserBadge/MUserBadge.d.ts.map +1 -0
  116. package/dist/components/molecules/MUserBadge/MUserBadge.styles.d.ts +4 -0
  117. package/dist/components/molecules/MUserBadge/MUserBadge.styles.d.ts.map +1 -0
  118. package/dist/components/molecules/MUserBadge/index.d.ts +3 -0
  119. package/dist/components/molecules/MUserBadge/index.d.ts.map +1 -0
  120. package/dist/components/molecules/MUserBadge/types.d.ts +11 -0
  121. package/dist/components/molecules/MUserBadge/types.d.ts.map +1 -0
  122. package/dist/components/molecules/index.d.ts +7 -0
  123. package/dist/components/molecules/index.d.ts.map +1 -0
  124. package/dist/components/organisms/OSidebar/OSidebar.d.ts +13 -0
  125. package/dist/components/organisms/OSidebar/OSidebar.d.ts.map +1 -0
  126. package/dist/components/organisms/OSidebar/OSidebar.styles.d.ts +22 -0
  127. package/dist/components/organisms/OSidebar/OSidebar.styles.d.ts.map +1 -0
  128. package/dist/components/organisms/OSidebar/index.d.ts +3 -0
  129. package/dist/components/organisms/OSidebar/index.d.ts.map +1 -0
  130. package/dist/components/organisms/OSidebar/types.d.ts +9 -0
  131. package/dist/components/organisms/OSidebar/types.d.ts.map +1 -0
  132. package/dist/components/organisms/OUserCamera/OUserCamera.d.ts +4 -0
  133. package/dist/components/organisms/OUserCamera/OUserCamera.d.ts.map +1 -0
  134. package/dist/components/organisms/OUserCamera/OUserCamera.styles.d.ts +20 -0
  135. package/dist/components/organisms/OUserCamera/OUserCamera.styles.d.ts.map +1 -0
  136. package/dist/components/organisms/OUserCamera/index.d.ts +3 -0
  137. package/dist/components/organisms/OUserCamera/index.d.ts.map +1 -0
  138. package/dist/components/organisms/OUserCamera/types.d.ts +12 -0
  139. package/dist/components/organisms/OUserCamera/types.d.ts.map +1 -0
  140. package/dist/components/organisms/index.d.ts +5 -0
  141. package/dist/components/organisms/index.d.ts.map +1 -0
  142. package/dist/index.cjs +932 -0
  143. package/dist/index.cjs.map +1 -0
  144. package/dist/index.d.ts +7 -0
  145. package/dist/index.d.ts.map +1 -0
  146. package/dist/index.js +3234 -0
  147. package/dist/index.js.map +1 -0
  148. package/dist/providers/JynkoProvider/JynkoProvider.d.ts +8 -0
  149. package/dist/providers/JynkoProvider/JynkoProvider.d.ts.map +1 -0
  150. package/dist/providers/JynkoProvider/index.d.ts +3 -0
  151. package/dist/providers/JynkoProvider/index.d.ts.map +1 -0
  152. package/dist/providers/index.d.ts +3 -0
  153. package/dist/providers/index.d.ts.map +1 -0
  154. package/dist/shared/hooks/index.d.ts +2 -0
  155. package/dist/shared/hooks/index.d.ts.map +1 -0
  156. package/dist/shared/hooks/usePressState.d.ts +19 -0
  157. package/dist/shared/hooks/usePressState.d.ts.map +1 -0
  158. package/dist/shared/index.d.ts +6 -0
  159. package/dist/shared/index.d.ts.map +1 -0
  160. package/dist/shared/styles/GlobalStyles.d.ts +2 -0
  161. package/dist/shared/styles/GlobalStyles.d.ts.map +1 -0
  162. package/dist/shared/styles/componentMetrics.d.ts +11 -0
  163. package/dist/shared/styles/componentMetrics.d.ts.map +1 -0
  164. package/dist/shared/styles/index.d.ts +4 -0
  165. package/dist/shared/styles/index.d.ts.map +1 -0
  166. package/dist/shared/styles/theme.d.ts +254 -0
  167. package/dist/shared/styles/theme.d.ts.map +1 -0
  168. package/dist/shared/types/button.d.ts +3 -0
  169. package/dist/shared/types/button.d.ts.map +1 -0
  170. package/dist/shared/types/index.d.ts +2 -0
  171. package/dist/shared/types/index.d.ts.map +1 -0
  172. package/dist/shared/types/link.d.ts +3 -0
  173. package/dist/shared/types/link.d.ts.map +1 -0
  174. package/dist/shared/utils/color.d.ts +2 -0
  175. package/dist/shared/utils/color.d.ts.map +1 -0
  176. package/dist/shared/utils/index.d.ts +3 -0
  177. package/dist/shared/utils/index.d.ts.map +1 -0
  178. package/dist/shared/utils/tokens.d.ts +3 -0
  179. package/dist/shared/utils/tokens.d.ts.map +1 -0
  180. package/package.json +116 -4
package/dist/index.cjs ADDED
@@ -0,0 +1,932 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react");c=s(c,1);let l=require("styled-components"),u=require("react/jsx-runtime"),d=require("react-dom");function f(e,t){return`color-mix(in srgb, ${e} 88%, ${t})`}var p={bg:`#0f172a`,surface:`#1e293b`,background:`#edf7f6`,text:`#0f172a`,muted:`#94a3b8`,primary:`#38bdf8`,primaryHover:`#7dd3fc`,primaryText:`#0f172a`,secondary:`#334155`,secondaryHover:`#475569`,ink:`#000000`,error:`#dc2626`,success:`#16a34a`,warning:`#d97706`},m=`30px`,h={width:`3px`,offset:`2px`,colorMix:`45%`},g={regular:400,semibold:600,bold:700},_={colors:p,opacity:{disabled:.6,disabledButton:.55},radius:{sm:`6px`,md:`10px`,lg:`16px`,full:`9999px`},space:{xs:`0.25rem`,sm:`0.5rem`,md:`0.75rem`,lg:`1rem`,inset:`10px`,components:{button:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},badge:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},link:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},iconButton:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`},iconLink:{sm:`0.25rem`,md:`0.5rem`,lg:`0.75rem`}}},font:{sans:`'Segoe UI', system-ui, -apple-system, sans-serif`,weight:g},typography:{fallback:`1rem`,h1:`2.5rem`,h2:`2rem`,h3:`1.75rem`,h4:`1.5rem`,h5:`1.25rem`,h6:`1.125rem`,small:`0.875rem`,sub:`0.75rem`,sup:`0.75rem`},avatar:{border:`2px solid ${p.ink}`,borderRadius:`50%`,fontWeight:g.semibold,sizes:{sm:{diameter:`32px`,fontSize:`12px`},md:{diameter:`40px`,fontSize:`14px`},lg:{diameter:`48px`,fontSize:`16px`}}},icon:{sizes:{sm:`1rem`,md:`1.25rem`,lg:`1.5rem`}},logo:{size:`36px`,fontSize:`1rem`,fontWeight:g.bold,whiteSpace:`nowrap`},sidebar:{width:{compact:`64px`,extended:`240px`},height:{fallback:`100vh`,dynamic:`100dvh`},border:`2px solid ${p.ink}`,borderRadius:`16px`},camera:{border:`2px solid ${p.ink}`,borderRadius:`12px`,nameBorderRadius:`4px`,nameMaxWidthOffset:`64px`,fallbackFontSize:`clamp(2rem, 8vw, 5rem)`,fallbackFontWeight:g.bold},shadow:{offsetX:`2px`,offsetY:`3px`,button:`2px 3px 0 0 ${p.ink}`,link:`2px 3px 0 0 ${p.ink}`,navLinks:`2px 3px 0 0 ${p.ink}`,section:`3px 5px 0 0 ${p.ink}`,modal:`3px 5px 0 0 ${p.ink}`,sidebar:`3px 5px 0 0 ${p.ink}`},button:{border:`2px solid ${p.ink}`,borderRadius:`8px`,focus:h,padding:`16px`,fontSize:`14px`,textDecoration:`none`,textTransform:`uppercase`},iconButton:{border:`2px solid ${p.ink}`,borderRadius:`8px`,focus:h},iconLink:{border:`2px solid ${p.ink}`,borderRadius:`8px`,focus:h},badge:{border:`2px solid ${p.ink}`,borderRadius:`8px`,fontSize:`14px`,textTransform:`uppercase`},link:{border:`2px solid ${p.ink}`,borderRadius:`8px`,focus:h,padding:`16px`,fontSize:`14px`,textDecoration:`none`,textTransform:`uppercase`},navLinks:{border:`2px solid ${p.ink}`,borderRadius:`8px`,focus:h,padding:`0`,fontSize:`14px`,textDecoration:`none`,textTransform:`uppercase`,itemPadding:`16px`},formControl:{border:`2px solid ${p.ink}`,borderRadius:`8px`,padding:`16px`,height:`3.5rem`,textareaHeight:`3rem`,dropdownBorder:`2px solid ${p.ink}`,optionListMaxHeight:`16rem`,focus:h,trailingActionPadding:`3.25rem`,fontSize:`14px`,optionTextTransform:`none`},userBadge:{focus:h,textDecoration:`none`},section:{border:`2px solid ${p.ink}`,borderRadius:`16px`,padding:m},modal:{padding:m,maxWidth:`720px`,maxHeight:`80vh`,border:`2px solid ${p.ink}`,borderRadius:`16px`,title:{fontSize:`1.25rem`,fontWeight:g.semibold},body:{fontSize:`1rem`}}};function v(e){return e?.colors?e:_}var y=l.styled.span`
2
+ display: inline-flex;
3
+ flex: 0 0 auto;
4
+ align-items: center;
5
+ justify-content: center;
6
+ overflow: hidden;
7
+ border: ${({theme:e})=>v(e).avatar.border};
8
+ border-radius: ${({theme:e})=>v(e).avatar.borderRadius};
9
+ background: ${({theme:e})=>v(e).colors.secondary};
10
+ color: ${({theme:e})=>v(e).colors.text};
11
+ font-family: ${({theme:e})=>v(e).font.sans};
12
+ font-weight: ${({theme:e})=>v(e).avatar.fontWeight};
13
+ width: ${({$size:e,theme:t})=>v(t).avatar.sizes[e].diameter};
14
+ height: ${({$size:e,theme:t})=>v(t).avatar.sizes[e].diameter};
15
+ font-size: ${({$size:e,theme:t})=>v(t).avatar.sizes[e].fontSize};
16
+
17
+ & > img {
18
+ width: 100%;
19
+ height: 100%;
20
+ object-fit: cover;
21
+ }
22
+ `;function b({firstName:e,lastName:t,src:n,alt:r,size:i=`md`,...a}){let[o,s]=(0,c.useState)(),l=`${e} ${t}`.trim(),d=r??l,f=`${e.charAt(0)}${t.charAt(0)}`.toUpperCase(),p=!!(n&&o!==n);return(0,u.jsx)(y,{$size:i,role:p?void 0:`img`,"aria-label":p?void 0:d,...a,children:p?(0,u.jsx)(`img`,{src:n,alt:d,onError:()=>{s(n)}}):f})}var x=l.css`
23
+ display: grid;
24
+ gap: ${({theme:e})=>v(e).space.sm};
25
+ width: 100%;
26
+ `,S=e=>({sm:l.css`
27
+ padding: ${({theme:t})=>v(t).space.components[e].sm};
28
+ `,md:l.css`
29
+ padding: ${({theme:t})=>v(t).space.components[e].md};
30
+ `,lg:l.css`
31
+ padding: ${({theme:t})=>v(t).space.components[e].lg};
32
+ `}),C=l.css`
33
+ padding: ${({theme:e})=>`${v(e).space.md} ${v(e).space.lg}`};
34
+ `,w=e=>l.css`
35
+ &:focus-visible {
36
+ outline: ${({theme:t})=>`${v(t)[e].focus.width} solid color-mix(in srgb, ${v(t).colors.primary} ${v(t)[e].focus.colorMix}, transparent)`};
37
+ outline-offset: ${({theme:t})=>v(t)[e].focus.offset};
38
+ }
39
+ `,T=S(`badge`),E={default:l.css`
40
+ background: ${({theme:e})=>v(e).colors.secondary};
41
+ color: ${({theme:e})=>v(e).colors.text};
42
+ `,info:l.css`
43
+ background: ${({theme:e})=>v(e).colors.primary};
44
+ color: ${({theme:e})=>v(e).colors.primaryText};
45
+ `,success:l.css`
46
+ background: ${({theme:e})=>v(e).colors.success};
47
+ color: ${({theme:e})=>v(e).colors.text};
48
+ `,warning:l.css`
49
+ background: ${({theme:e})=>v(e).colors.warning};
50
+ color: ${({theme:e})=>v(e).colors.text};
51
+ `,error:l.css`
52
+ background: ${({theme:e})=>v(e).colors.error};
53
+ color: ${({theme:e})=>v(e).colors.text};
54
+ `},D=l.styled.span`
55
+ display: inline-flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ gap: ${({theme:e})=>v(e).space.sm};
59
+ border: ${({theme:e})=>v(e).badge.border};
60
+ border-radius: ${({theme:e})=>v(e).badge.borderRadius};
61
+ font-family: ${({theme:e})=>v(e).font.sans};
62
+ font-size: ${({theme:e})=>v(e).badge.fontSize};
63
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
64
+ text-transform: ${({theme:e})=>v(e).badge.textTransform};
65
+
66
+ ${({$size:e})=>T[e]}
67
+ ${({$variant:e})=>E[e]}
68
+ `;function O({children:e,size:t=`md`,variant:n=`default`,...r}){return(0,u.jsx)(D,{$size:t,$variant:n,...r,children:e})}var k=150;function A({disabled:e,onPointerDown:t,onPointerUp:n,onPointerCancel:r,onLostPointerCapture:i}){let[a,o]=(0,c.useState)(!1),s=(0,c.useRef)(0),l=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]);let u=()=>{l.current&&clearTimeout(l.current)},d=()=>{if(!s.current)return;let e=performance.now()-s.current,t=Math.max(0,k-e);u(),l.current=setTimeout(()=>{o(!1),s.current=0,l.current=null},t)};return{pressed:a,pressHandlers:{onPointerDown:n=>{t?.(n),n.defaultPrevented||e||n.button!==0||(n.currentTarget.setPointerCapture(n.pointerId),u(),s.current=performance.now(),o(!0))},onPointerUp:e=>{n?.(e),d()},onPointerCancel:e=>{r?.(e),d()},onLostPointerCapture:e=>{i?.(e),d()}}}}var j=S(`button`),M={primary:l.css`
69
+ background: ${({theme:e})=>v(e).colors.primary};
70
+ color: ${({theme:e})=>v(e).colors.primaryText};
71
+
72
+ &:hover:not(:disabled) {
73
+ background: ${({theme:e})=>f(v(e).colors.primary,v(e).colors.ink)};
74
+ }
75
+ `,secondary:l.css`
76
+ background: ${({theme:e})=>v(e).colors.secondary};
77
+ color: ${({theme:e})=>v(e).colors.text};
78
+
79
+ &:hover:not(:disabled) {
80
+ background: ${({theme:e})=>f(v(e).colors.secondary,v(e).colors.ink)};
81
+ }
82
+ `},N=l.css`
83
+ display: inline-flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ gap: ${({theme:e})=>v(e).space.sm};
87
+ font-family: ${({theme:e})=>v(e).font.sans};
88
+ font-size: ${({theme:e})=>v(e).button.fontSize};
89
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
90
+ text-transform: ${({theme:e})=>v(e).button.textTransform};
91
+ cursor: pointer;
92
+ transition:
93
+ background-color 0.15s ease,
94
+ transform 0.15s ease,
95
+ box-shadow 0.15s ease;
96
+ white-space: nowrap;
97
+
98
+ ${w(`button`)}
99
+
100
+ &:disabled {
101
+ opacity: ${({theme:e})=>v(e).opacity.disabledButton};
102
+ cursor: not-allowed;
103
+ }
104
+ `,P=l.css`
105
+ border: ${({theme:e})=>v(e).button.border};
106
+ box-shadow: ${({theme:e})=>v(e).shadow.button};
107
+
108
+ &:active:not(:disabled),
109
+ &[data-pressed='true']:not(:disabled),
110
+ &:disabled {
111
+ transform: ${({theme:e})=>`translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
112
+ box-shadow: none;
113
+ }
114
+ `,ee=l.css`
115
+ border-radius: ${({theme:e})=>v(e).button.borderRadius};
116
+ `,te=l.css`
117
+ padding: ${({theme:e})=>v(e).button.padding};
118
+ `,ne=l.styled.button`
119
+ ${N}
120
+ ${P}
121
+ ${ee}
122
+ ${te}
123
+ ${({$variant:e})=>M[e]}
124
+ ${({$size:e})=>j[e]}
125
+ `;function re({children:e,variant:t=`primary`,size:n=`md`,type:r=`button`,disabled:i,onPointerDown:a,onPointerUp:o,onPointerCancel:s,onLostPointerCapture:c,...l}){let{pressed:d,pressHandlers:f}=A({disabled:i,onPointerDown:a,onPointerUp:o,onPointerCancel:s,onLostPointerCapture:c});return(0,u.jsx)(ne,{$size:n,$variant:t,type:r,disabled:i,"data-pressed":d?`true`:void 0,...l,...f,children:e})}var ie={default:e=>v(e).colors.text,error:e=>v(e).colors.error,success:e=>v(e).colors.success,warning:e=>v(e).colors.warning},ae=l.styled.span`
126
+ display: inline-flex;
127
+ width: ${({$size:e,theme:t})=>v(t).icon.sizes[e]};
128
+ height: ${({$size:e,theme:t})=>v(t).icon.sizes[e]};
129
+ flex: 0 0 auto;
130
+ align-items: center;
131
+ justify-content: center;
132
+ color: ${({$type:e,theme:t})=>ie[e](t)};
133
+
134
+ & > svg {
135
+ display: block;
136
+ width: 100%;
137
+ height: 100%;
138
+ }
139
+ `;function F({children:e,size:t=`md`,type:n=`default`,title:r,"aria-label":i,...a}){let o=r??i;return(0,u.jsx)(ae,{$size:t,$type:n,"aria-hidden":!o||void 0,"aria-label":o,role:o?`img`:void 0,title:r,...a,children:e})}var oe=S(`iconButton`),se={primary:l.css`
140
+ background: ${({theme:e})=>v(e).colors.primary};
141
+ color: ${({theme:e})=>v(e).colors.primaryText};
142
+
143
+ &:hover:not(:disabled) {
144
+ background: ${({theme:e})=>f(v(e).colors.primary,v(e).colors.ink)};
145
+ }
146
+ `,secondary:l.css`
147
+ background: ${({theme:e})=>v(e).colors.secondary};
148
+ color: ${({theme:e})=>v(e).colors.text};
149
+
150
+ &:hover:not(:disabled) {
151
+ background: ${({theme:e})=>f(v(e).colors.secondary,v(e).colors.ink)};
152
+ }
153
+ `},ce=l.css`
154
+ display: inline-flex;
155
+ align-items: center;
156
+ justify-content: center;
157
+ gap: ${({theme:e})=>v(e).space.sm};
158
+ font-family: ${({theme:e})=>v(e).font.sans};
159
+ font-size: ${({theme:e})=>v(e).button.fontSize};
160
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
161
+ text-transform: ${({theme:e})=>v(e).button.textTransform};
162
+ cursor: pointer;
163
+ transition:
164
+ background-color 0.15s ease,
165
+ transform 0.15s ease,
166
+ box-shadow 0.15s ease;
167
+
168
+ ${w(`iconButton`)}
169
+
170
+ &:disabled {
171
+ opacity: ${({theme:e})=>v(e).opacity.disabledButton};
172
+ cursor: not-allowed;
173
+ }
174
+ `,le=l.css`
175
+ border: ${({theme:e})=>v(e).iconButton.border};
176
+ box-shadow: ${({theme:e})=>v(e).shadow.button};
177
+
178
+ &:active:not(:disabled),
179
+ &[data-pressed='true']:not(:disabled),
180
+ &:disabled {
181
+ transform: ${({theme:e})=>`translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
182
+ box-shadow: none;
183
+ }
184
+ `,ue={square:l.css`
185
+ border-radius: ${({theme:e})=>v(e).iconButton.borderRadius};
186
+ `,rounded:l.css`
187
+ border-radius: ${({theme:e})=>v(e).radius.full};
188
+ `},de=l.css`
189
+ background: transparent;
190
+ border: none;
191
+ box-shadow: none;
192
+ transform: none;
193
+
194
+ &:active:not(:disabled),
195
+ &[data-pressed='true']:not(:disabled) {
196
+ transform: none;
197
+ box-shadow: none;
198
+ }
199
+ `;function I(e,t){return`color-mix(in srgb, ${e} ${t}, transparent)`}var fe={primary:l.css`
200
+ color: ${({theme:e})=>v(e).colors.primary};
201
+
202
+ &:hover:not(:disabled) {
203
+ background: ${({theme:e})=>I(v(e).colors.primary,`18%`)};
204
+ }
205
+
206
+ &:active:not(:disabled),
207
+ &[data-pressed='true']:not(:disabled) {
208
+ background: ${({theme:e})=>f(I(v(e).colors.primary,`18%`),v(e).colors.ink)};
209
+ }
210
+ `,secondary:l.css`
211
+ color: ${({theme:e})=>v(e).colors.text};
212
+
213
+ &:hover:not(:disabled) {
214
+ background: ${({theme:e})=>I(v(e).colors.text,`12%`)};
215
+ }
216
+
217
+ &:active:not(:disabled),
218
+ &[data-pressed='true']:not(:disabled) {
219
+ background: ${({theme:e})=>f(I(v(e).colors.text,`12%`),v(e).colors.ink)};
220
+ }
221
+ `},pe=l.styled.button`
222
+ ${ce}
223
+ padding: 0;
224
+ flex-shrink: 0;
225
+
226
+ ${({$size:e})=>oe[e]}
227
+ ${({$shape:e})=>ue[e]}
228
+ ${({$ghost:e,$variant:t})=>e?l.css`
229
+ ${de}
230
+ ${fe[t]}
231
+ `:l.css`
232
+ ${le}
233
+ ${se[t]}
234
+ `}
235
+ `;function L({children:e,variant:t=`primary`,size:n=`md`,shape:r=`square`,ghost:i=!1,type:a=`button`,disabled:o,ref:s,onPointerDown:c,onPointerUp:l,onPointerCancel:d,onLostPointerCapture:f,...p}){let{pressed:m,pressHandlers:h}=A({disabled:o,onPointerDown:c,onPointerUp:l,onPointerCancel:d,onLostPointerCapture:f});return(0,u.jsx)(pe,{$ghost:i,$shape:r,$size:n,$variant:t,type:a,disabled:o,"data-pressed":m?`true`:void 0,ref:s,...p,...h,children:(0,u.jsx)(F,{size:n,style:{color:`inherit`},children:e})})}var me=S(`iconLink`),he={primary:l.css`
236
+ background: ${({theme:e})=>v(e).colors.primary};
237
+ color: ${({theme:e})=>v(e).colors.primaryText};
238
+
239
+ &:hover {
240
+ background: ${({theme:e})=>f(v(e).colors.primary,v(e).colors.ink)};
241
+ }
242
+ `,secondary:l.css`
243
+ background: ${({theme:e})=>v(e).colors.secondary};
244
+ color: ${({theme:e})=>v(e).colors.text};
245
+
246
+ &:hover {
247
+ background: ${({theme:e})=>f(v(e).colors.secondary,v(e).colors.ink)};
248
+ }
249
+ `},ge={square:l.css`
250
+ border-radius: ${({theme:e})=>v(e).iconLink.borderRadius};
251
+ `,rounded:l.css`
252
+ border-radius: ${({theme:e})=>v(e).radius.full};
253
+ `},_e=l.css`
254
+ background: transparent;
255
+ border: none;
256
+ box-shadow: none;
257
+ transform: none;
258
+
259
+ &:active,
260
+ &[data-pressed='true'] {
261
+ transform: none;
262
+ box-shadow: none;
263
+ }
264
+ `;function ve(e,t){return`color-mix(in srgb, ${e} ${t}, transparent)`}var ye={primary:l.css`
265
+ color: ${({theme:e})=>v(e).colors.primary};
266
+
267
+ &:hover {
268
+ background: ${({theme:e})=>ve(v(e).colors.primary,`18%`)};
269
+ }
270
+
271
+ &:active,
272
+ &[data-pressed='true'] {
273
+ background: ${({theme:e})=>f(ve(v(e).colors.primary,`18%`),v(e).colors.ink)};
274
+ }
275
+ `,secondary:l.css`
276
+ color: ${({theme:e})=>v(e).colors.text};
277
+
278
+ &:hover {
279
+ background: ${({theme:e})=>ve(v(e).colors.text,`12%`)};
280
+ }
281
+
282
+ &:active,
283
+ &[data-pressed='true'] {
284
+ background: ${({theme:e})=>f(ve(v(e).colors.text,`12%`),v(e).colors.ink)};
285
+ }
286
+ `},be=l.styled.a`
287
+ display: inline-flex;
288
+ align-items: center;
289
+ justify-content: center;
290
+ gap: ${({theme:e})=>v(e).space.sm};
291
+ font-family: ${({theme:e})=>v(e).font.sans};
292
+ font-size: ${({theme:e})=>v(e).button.fontSize};
293
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
294
+ text-transform: ${({theme:e})=>v(e).button.textTransform};
295
+ text-decoration: ${({theme:e})=>v(e).button.textDecoration};
296
+ cursor: pointer;
297
+ transition:
298
+ background-color 0.15s ease,
299
+ transform 0.15s ease,
300
+ box-shadow 0.15s ease;
301
+
302
+ ${w(`iconLink`)}
303
+
304
+ border: ${({theme:e})=>v(e).iconLink.border};
305
+ box-shadow: ${({theme:e})=>v(e).shadow.button};
306
+
307
+ &:active,
308
+ &[data-pressed='true'] {
309
+ transform: ${({theme:e})=>`translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
310
+ box-shadow: none;
311
+ }
312
+
313
+ ${({$size:e})=>me[e]}
314
+ ${({$shape:e})=>ge[e]}
315
+ ${({$ghost:e,$variant:t})=>e?l.css`
316
+ ${_e}
317
+ ${ye[t]}
318
+ `:he[t]}
319
+ `;function xe({children:e,variant:t=`primary`,size:n=`md`,shape:r=`square`,ghost:i=!1,onPointerDown:a,onPointerUp:o,onPointerCancel:s,onLostPointerCapture:c,...l}){let{pressed:d,pressHandlers:f}=A({onPointerDown:a,onPointerUp:o,onPointerCancel:s,onLostPointerCapture:c});return(0,u.jsx)(be,{$ghost:i,$shape:r,$size:n,$variant:t,"data-pressed":d?`true`:void 0,...l,...f,children:(0,u.jsx)(F,{size:n,style:{color:`inherit`},children:e})})}var Se=l.css`
320
+ color: ${({theme:e})=>v(e).colors.text};
321
+ font-size: ${({theme:e})=>v(e).typography.small};
322
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
323
+ `,Ce=l.css`
324
+ box-sizing: border-box;
325
+ width: 100%;
326
+ height: ${({theme:e})=>v(e).formControl.height};
327
+ border: ${({theme:e})=>v(e).formControl.border};
328
+ border-radius: ${({theme:e})=>v(e).formControl.borderRadius};
329
+ padding: ${({theme:e,$hasTrailingAction:t})=>t?`${v(e).formControl.padding} ${v(e).formControl.trailingActionPadding} ${v(e).formControl.padding} ${v(e).formControl.padding}`:v(e).formControl.padding};
330
+ background: ${({theme:e})=>v(e).colors.background};
331
+ color: ${({theme:e})=>v(e).colors.text};
332
+ font: inherit;
333
+ font-size: ${({theme:e})=>v(e).formControl.fontSize};
334
+
335
+ ${w(`formControl`)}
336
+
337
+ &:disabled {
338
+ cursor: not-allowed;
339
+ opacity: ${({theme:e})=>v(e).opacity.disabled};
340
+ }
341
+
342
+ ${({$invalid:e,theme:t})=>e&&l.css`
343
+ border-color: ${v(t).colors.error};
344
+ `}
345
+
346
+ ${({$invalid:e,$warning:t,theme:n})=>!e&&t&&l.css`
347
+ border-color: ${v(n).colors.warning};
348
+ `}
349
+ `,we=l.css`
350
+ color: ${({theme:e,$type:t})=>v(e).colors[t]};
351
+ font-size: ${({theme:e})=>v(e).typography.small};
352
+ `,Te=l.styled.div`
353
+ ${x}
354
+ `,Ee=l.styled.label`
355
+ ${Se}
356
+ `,De=l.styled.div`
357
+ position: relative;
358
+ `,Oe=l.styled.input`
359
+ ${Ce}
360
+
361
+ &:focus,
362
+ &:focus-visible {
363
+ ${({$invalid:e,$warning:t,theme:n})=>e?l.css`
364
+ border-color: ${v(n).colors.error};
365
+ `:t?l.css`
366
+ border-color: ${v(n).colors.warning};
367
+ `:``}
368
+ /* TODO: This prevents the outline from appearing when navigating with the Tab key */
369
+ outline: none;
370
+ }
371
+ `,ke=(0,l.styled)(L)`
372
+ position: absolute;
373
+ top: 50%;
374
+ right: ${({theme:e})=>v(e).space.md};
375
+ translate: 0 -50%;
376
+ `,Ae=l.styled.div`
377
+ ${we}
378
+ `;function je({visible:e}){return(0,u.jsxs)(`svg`,{fill:`none`,viewBox:`0 0 24 24`,children:[(0,u.jsx)(`path`,{d:`M2.5 12s3.25-6 9.5-6 9.5 6 9.5 6-3.25 6-9.5 6-9.5-6-9.5-6Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`}),e?(0,u.jsx)(`path`,{d:`m3 3 18 18M10.6 10.6a2 2 0 0 0 2.8 2.8`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.8`}):(0,u.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.5`,stroke:`currentColor`,strokeWidth:`1.8`})]})}function Me({type:e=`text`,id:t,label:n,error:r,warning:i,disabled:a,ref:o,"aria-describedby":s,"aria-invalid":l,...d}){let f=(0,c.useId)(),p=t??f,m=`${p}-error`,h=`${p}-warning`,[g,_]=(0,c.useState)(!1),v=!!r||l===!0||l===`true`,y=[s,r?m:void 0,i?h:void 0].filter(Boolean).join(` `)||void 0;return(0,u.jsxs)(Te,{children:[n?(0,u.jsx)(Ee,{htmlFor:p,children:n}):null,(0,u.jsxs)(De,{children:[(0,u.jsx)(Oe,{...d,$hasTrailingAction:e===`password`,$invalid:v,$warning:!!i,"aria-describedby":y,"aria-invalid":v||void 0,disabled:a,id:p,ref:o,type:e===`password`&&g?`text`:e}),e===`password`?(0,u.jsx)(ke,{"aria-label":g?`Hide password`:`Show password`,"aria-pressed":g,disabled:a,ghost:!0,onClick:()=>{_(e=>!e)},shape:`rounded`,size:`md`,type:`button`,variant:`primary`,children:(0,u.jsx)(F,{size:`md`,style:{color:`inherit`},title:g?`Hide password`:`Show password`,children:(0,u.jsx)(je,{visible:g})})}):null]}),r?(0,u.jsx)(Ae,{$type:`error`,id:m,role:`alert`,children:r}):null,i?(0,u.jsx)(Ae,{$type:`warning`,id:h,role:`status`,children:i}):null]})}var Ne=S(`link`),Pe={primary:l.css`
379
+ background: ${({theme:e})=>v(e).colors.primary};
380
+ color: ${({theme:e})=>v(e).colors.primaryText};
381
+
382
+ &:hover:not(:disabled) {
383
+ background: ${({theme:e})=>f(v(e).colors.primary,v(e).colors.ink)};
384
+ }
385
+ `,secondary:l.css`
386
+ background: ${({theme:e})=>v(e).colors.secondary};
387
+ color: ${({theme:e})=>v(e).colors.text};
388
+
389
+ &:hover:not(:disabled) {
390
+ background: ${({theme:e})=>f(v(e).colors.secondary,v(e).colors.ink)};
391
+ }
392
+ `},Fe=l.styled.a`
393
+ display: inline-flex;
394
+ align-items: center;
395
+ justify-content: center;
396
+ gap: ${({theme:e})=>v(e).space.sm};
397
+ font-family: ${({theme:e})=>v(e).font.sans};
398
+ font-size: ${({theme:e})=>v(e).link.fontSize};
399
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
400
+ text-transform: ${({theme:e})=>v(e).link.textTransform};
401
+ text-decoration: ${({theme:e})=>v(e).link.textDecoration};
402
+ cursor: pointer;
403
+ transition:
404
+ background-color 0.15s ease,
405
+ transform 0.15s ease,
406
+ box-shadow 0.15s ease;
407
+
408
+ ${w(`link`)}
409
+
410
+ border: ${({theme:e})=>v(e).link.border};
411
+ box-shadow: ${({theme:e})=>v(e).shadow.link};
412
+ border-radius: ${({theme:e})=>v(e).link.borderRadius};
413
+ padding: ${({theme:e})=>v(e).link.padding};
414
+
415
+ white-space: nowrap;
416
+
417
+ &:active,
418
+ &[data-pressed='true'] {
419
+ transform: ${({theme:e})=>`translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
420
+ box-shadow: none;
421
+ }
422
+
423
+ ${({$variant:e})=>Pe[e]}
424
+ ${({$size:e})=>Ne[e]}
425
+ `;function Ie({children:e,variant:t=`primary`,size:n=`md`,onPointerDown:r,onPointerUp:i,onPointerCancel:a,onLostPointerCapture:o,...s}){let{pressed:c,pressHandlers:l}=A({onPointerDown:r,onPointerUp:i,onPointerCancel:a,onLostPointerCapture:o});return(0,u.jsx)(Fe,{$size:n,$variant:t,"data-pressed":c?`true`:void 0,...s,...l,children:e})}var Le=l.styled.div`
426
+ --logo-size: ${({theme:e})=>v(e).logo.size};
427
+
428
+ display: inline-flex;
429
+ align-items: center;
430
+ justify-content: center;
431
+ gap: ${({theme:e})=>v(e).space.sm};
432
+ min-width: 0;
433
+ color: ${({theme:e})=>v(e).colors.text};
434
+ font-family: ${({theme:e})=>v(e).font.sans};
435
+ font-size: ${({theme:e})=>v(e).logo.fontSize};
436
+ font-weight: ${({theme:e})=>v(e).logo.fontWeight};
437
+ white-space: ${({theme:e})=>v(e).logo.whiteSpace};
438
+
439
+ & > span:first-child > svg,
440
+ & > span:first-child img {
441
+ display: block;
442
+ width: var(--logo-size);
443
+ height: var(--logo-size);
444
+ flex: 0 0 var(--logo-size);
445
+ object-fit: contain;
446
+ }
447
+
448
+ ${({$variant:e,theme:t})=>e===`icon`&&l.css`
449
+ width: ${v(t).logo.size};
450
+ height: ${v(t).logo.size};
451
+ `}
452
+ `,Re=l.styled.span`
453
+ overflow: hidden;
454
+ text-overflow: ellipsis;
455
+ `;function ze({logo:e,name:t,variant:n=`full`,...r}){return(0,u.jsxs)(Le,{...r,$variant:n,role:n===`icon`?`img`:void 0,"aria-label":n===`icon`?t:r[`aria-label`],children:[(0,u.jsx)(`span`,{"aria-hidden":`true`,children:e}),n===`full`?(0,u.jsx)(Re,{children:t}):null]})}var Be=l.css`
456
+ box-sizing: border-box;
457
+ width: 100%;
458
+ height: ${({theme:e})=>v(e).formControl.height};
459
+ border: ${({theme:e})=>v(e).formControl.border};
460
+ border-radius: ${({theme:e})=>v(e).formControl.borderRadius};
461
+ padding: ${({theme:e})=>v(e).formControl.padding};
462
+ background: ${({theme:e})=>v(e).colors.background};
463
+ color: ${({theme:e})=>v(e).colors.text};
464
+ font: inherit;
465
+ font-size: ${({theme:e})=>v(e).formControl.fontSize};
466
+ `,Ve=l.styled.div`
467
+ ${x}
468
+ `,He=l.styled.div`
469
+ position: relative;
470
+ `,Ue=l.styled.input`
471
+ ${Be}
472
+ padding-right: ${({theme:e})=>v(e).formControl.trailingActionPadding};
473
+
474
+ /* TODO: Outline styles should be implemented for each form ui elements */
475
+
476
+ &:disabled {
477
+ cursor: not-allowed;
478
+ opacity: ${({theme:e})=>v(e).opacity.disabled};
479
+ }
480
+ `,We=(0,l.styled)(L)`
481
+ position: absolute;
482
+ top: 50%;
483
+ right: ${({theme:e})=>v(e).space.md};
484
+ translate: 0 -50%;
485
+ `,Ge=l.styled.ul`
486
+ position: absolute;
487
+ z-index: 10;
488
+ top: 100%;
489
+ right: 0;
490
+ left: 0;
491
+ max-height: ${({theme:e})=>v(e).formControl.optionListMaxHeight};
492
+ margin: 0;
493
+ padding: 0;
494
+ overflow: auto;
495
+ border: ${({theme:e})=>v(e).formControl.dropdownBorder};
496
+ border-radius: ${({theme:e})=>v(e).formControl.borderRadius};
497
+ background: ${({theme:e})=>v(e).colors.background};
498
+ list-style: none;
499
+ `,Ke=l.styled.li`
500
+ ${C}
501
+ background: ${({theme:e,$active:t})=>t?v(e).colors.secondaryHover:`transparent`};
502
+ color: ${({theme:e})=>v(e).colors.text};
503
+ cursor: pointer;
504
+ `;function qe(){return(0,u.jsxs)(`svg`,{fill:`none`,viewBox:`0 0 24 24`,children:[(0,u.jsx)(`circle`,{cx:`10.8`,cy:`10.8`,r:`6.3`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,u.jsx)(`path`,{d:`m15.5 15.5 4 4`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.8`})]})}function Je({options:e,value:t,defaultValue:n=``,debounceMs:r=300,onSearch:i,onSelect:a,onChange:o,onFocus:s,onBlur:l,id:d,disabled:f,ref:p,...m}){let h=(0,c.useId)(),g=d??h,_=`${g}-options`,v=(0,c.useRef)(null),y=(0,c.useRef)(!1),b=(0,c.useRef)(null),[x,S]=(0,c.useState)(n),[C,w]=(0,c.useState)(!1),[T,E]=(0,c.useState)(-1),D=t??x,O=t!==void 0,k=D.trim().toLocaleLowerCase(),A=k?e.filter(e=>e.label.toLocaleLowerCase().includes(k)||String(e.value).toLocaleLowerCase().includes(k)):[],j=C&&A.length>0;(0,c.useEffect)(()=>{if(!y.current){y.current=!0;return}if(!i)return;let e=setTimeout(()=>{b.current=null,i(D)},r);return b.current=e,()=>{clearTimeout(e),b.current===e&&(b.current=null)}},[r,i,D]);let M=e=>{O||S(e.currentTarget.value),E(-1),o?.(e)},N=e=>{e.relatedTarget instanceof Node&&v.current?.querySelector(`[role="listbox"]`)?.contains(e.relatedTarget)||(w(!1),E(-1),l?.(e))},P=e=>{O||S(e.label),a?.(e),w(!1)},ee=e=>{e.key===`ArrowDown`&&A.length>0?(e.preventDefault(),w(!0),E(e=>(e+1)%A.length)):e.key===`ArrowUp`&&A.length>0?(e.preventDefault(),w(!0),E(e=>e<=0?A.length-1:e-1)):e.key===`Enter`&&j&&A[T]?(e.preventDefault(),P(A[T])):e.key===`Escape`&&(w(!1),E(-1)),m.onKeyDown?.(e)};return(0,u.jsx)(Ve,{ref:v,children:(0,u.jsxs)(He,{children:[(0,u.jsx)(Ue,{...m,"aria-activedescendant":j&&T>=0?`${_}-option-${String(T)}`:void 0,"aria-autocomplete":`list`,"aria-controls":j?_:void 0,"aria-expanded":j,"aria-haspopup":`listbox`,autoComplete:`off`,disabled:f,id:g,onBlur:N,onChange:M,onFocus:e=>{w(!0),s&&s(e)},onKeyDown:ee,ref:p,role:`combobox`,value:D}),(0,u.jsx)(We,{"aria-label":`Search`,disabled:f,ghost:!0,onClick:()=>{b.current&&=(clearTimeout(b.current),null),i?.(D)},shape:`rounded`,size:`md`,type:`button`,variant:`primary`,children:(0,u.jsx)(F,{size:`md`,style:{color:`inherit`},title:`Search`,children:(0,u.jsx)(qe,{})})}),j?(0,u.jsx)(Ge,{id:_,role:`listbox`,children:A.map((e,t)=>(0,u.jsx)(Ke,{"aria-selected":t===T,id:`${_}-option-${String(t)}`,onClick:()=>{P(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,$active:t===T,children:e.label},`${String(e.value)}-${e.label}`))}):null]})})}var Ye=l.styled.section`
505
+ border: ${({theme:e})=>v(e).section.border};
506
+ border-radius: ${({theme:e})=>v(e).section.borderRadius};
507
+ padding: ${({theme:e})=>v(e).section.padding};
508
+ background-color: ${({theme:e})=>v(e).colors.surface};
509
+ box-shadow: ${({$shadow:e,theme:t})=>e?v(t).shadow.section:`none`};
510
+ `;function Xe({children:e,shadow:t=!1,...n}){return(0,u.jsx)(Ye,{$shadow:t,...n,children:e})}var Ze=l.css`
511
+ color: ${({theme:e})=>v(e).colors.text};
512
+ font-size: ${({theme:e})=>v(e).typography.small};
513
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
514
+ `,Qe=l.css`
515
+ box-sizing: border-box;
516
+ width: 100%;
517
+ height: ${({theme:e})=>v(e).formControl.height};
518
+ border: ${({theme:e})=>v(e).formControl.border};
519
+ border-radius: ${({theme:e})=>v(e).formControl.borderRadius};
520
+ padding: ${({theme:e,$hasTrailingAction:t})=>t?`${v(e).formControl.padding} ${v(e).formControl.trailingActionPadding} ${v(e).formControl.padding} ${v(e).formControl.padding}`:v(e).formControl.padding};
521
+ background: ${({theme:e})=>v(e).colors.background};
522
+ color: ${({theme:e})=>v(e).colors.text};
523
+ font: inherit;
524
+ font-size: ${({theme:e})=>v(e).formControl.fontSize};
525
+
526
+ ${w(`formControl`)}
527
+
528
+ &:disabled {
529
+ cursor: not-allowed;
530
+ opacity: ${({theme:e})=>v(e).opacity.disabled};
531
+ }
532
+
533
+ ${({$invalid:e,theme:t})=>e&&l.css`
534
+ border-color: ${v(t).colors.error};
535
+ `}
536
+
537
+ ${({$invalid:e,$warning:t,theme:n})=>!e&&t&&l.css`
538
+ border-color: ${v(n).colors.warning};
539
+ `}
540
+ `,$e=l.css`
541
+ color: ${({theme:e,$type:t})=>v(e).colors[t]};
542
+ font-size: ${({theme:e})=>v(e).typography.small};
543
+ `,et=l.styled.div`
544
+ ${x}
545
+ `,tt=l.styled.div`
546
+ position: relative;
547
+ `,nt=l.styled.label`
548
+ ${Ze}
549
+ `,rt=l.styled.div`
550
+ ${Qe}
551
+ display: flex;
552
+ align-items: center;
553
+ justify-content: space-between;
554
+ gap: ${({theme:e})=>v(e).space.lg};
555
+ text-align: left;
556
+ cursor: ${({$disabled:e})=>e?`not-allowed`:`pointer`};
557
+
558
+ ${({$disabled:e})=>e&&l.css`
559
+ opacity: ${({theme:e})=>v(e).opacity.disabled};
560
+ `}
561
+ `,it=l.styled.div`
562
+ position: absolute;
563
+ z-index: 10;
564
+ top: 100%;
565
+ right: 0;
566
+ left: 0;
567
+ max-height: ${({theme:e})=>v(e).formControl.optionListMaxHeight};
568
+ overflow: auto;
569
+ border: ${({theme:e})=>v(e).formControl.dropdownBorder};
570
+ border-radius: ${({theme:e})=>v(e).formControl.borderRadius};
571
+ background: ${({theme:e})=>v(e).colors.background};
572
+ `,at=l.styled.button`
573
+ display: block;
574
+ width: 100%;
575
+ ${C}
576
+ border: 0;
577
+ border-radius: 0;
578
+ background: ${({theme:e,$selected:t})=>t?v(e).colors.secondary:`transparent`};
579
+ color: ${({theme:e})=>v(e).colors.text};
580
+ font: inherit;
581
+ text-align: left;
582
+ text-transform: ${({theme:e})=>v(e).formControl.optionTextTransform};
583
+ cursor: pointer;
584
+
585
+ &:hover,
586
+ &:focus-visible {
587
+ background: ${({theme:e})=>v(e).colors.secondaryHover};
588
+ outline: none;
589
+ }
590
+ `,ot=l.styled.select`
591
+ position: absolute;
592
+ width: 1px;
593
+ height: 1px;
594
+ padding: 0;
595
+ overflow: hidden;
596
+ clip: rect(0, 0, 0, 0);
597
+ white-space: nowrap;
598
+ border: 0;
599
+ `,st=l.styled.span`
600
+ overflow: hidden;
601
+ color: ${({theme:e,$placeholder:t})=>t?v(e).colors.muted:`inherit`};
602
+ text-overflow: ellipsis;
603
+ white-space: nowrap;
604
+ `,ct=l.styled.div`
605
+ ${$e}
606
+ `;function lt({options:e,value:t,defaultValue:n,onChange:r,onValueChange:i,onBlur:a,id:o,name:s,label:l,placeholder:d=`Select an option`,error:f,warning:p,disabled:m,required:h,ref:g,"aria-describedby":_,"aria-invalid":v,...y}){let b=(0,c.useId)(),x=o??b,S=`${x}-options`,C=`${x}-error`,w=`${x}-warning`,T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(null),[O,k]=(0,c.useState)(n),[A,j]=(0,c.useState)(!1),M=t??O,N=e.find(e=>String(e.value)===String(M)),P=!!f||v===!0||v===`true`,ee=[_,f?C:void 0,p?w:void 0].filter(Boolean).join(` `)||void 0,te=e=>{r?.(e)};(0,c.useEffect)(()=>{if(!A)return;let e=e=>{e.target instanceof Node&&T.current?.contains(e.target)||j(!1)};return document.addEventListener(`pointerdown`,e),()=>{document.removeEventListener(`pointerdown`,e)}},[A]),(0,c.useEffect)(()=>{A&&(T.current?.querySelector(`[role="option"][aria-selected="true"]`)??T.current?.querySelector(`[role="option"]`))?.focus()},[A]);let ne=e=>{t===void 0&&k(e),i?.(e);let n=E.current;n&&(n.value=String(e),n.dispatchEvent(new Event(`change`,{bubbles:!0})))},re=e=>{T.current?.contains(e.relatedTarget)||(j(!1),E.current?.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0})))},ie=(t,n)=>{let r;t.key===`ArrowDown`&&(r=(n+1)%e.length),t.key===`ArrowUp`&&(r=(n-1+e.length)%e.length),t.key===`Home`&&(r=0),t.key===`End`&&(r=e.length-1),t.key===`Escape`?(t.preventDefault(),j(!1),D.current?.focus()):r!==void 0&&(t.preventDefault(),T.current?.querySelectorAll(`[role="option"]`)[r]?.focus())};return(0,u.jsxs)(et,{ref:T,children:[l?(0,u.jsx)(nt,{htmlFor:x,children:l}):null,(0,u.jsxs)(tt,{children:[(0,u.jsxs)(ot,{...y,"aria-hidden":`true`,"aria-invalid":P||void 0,disabled:m,id:`${x}-native`,name:s,onBlur:a,onChange:te,ref:e=>{E.current=e,typeof g==`function`?g(e):g&&(g.current=e)},required:h,tabIndex:-1,value:M===void 0?``:String(M),children:[(0,u.jsx)(`option`,{value:``,children:d}),e.map(e=>(0,u.jsx)(`option`,{value:String(e.value),children:e.label},String(e.value)))]}),(0,u.jsxs)(rt,{onClick:()=>{m||j(e=>!e)},$disabled:!!m,$invalid:P,$warning:!!p,children:[(0,u.jsx)(st,{$placeholder:!N,children:N?.label??d}),(0,u.jsx)(L,{"aria-controls":S,"aria-describedby":ee,"aria-expanded":A,"aria-haspopup":`listbox`,"aria-invalid":P||void 0,"aria-label":l??d,disabled:m,ghost:!0,id:x,onBlur:re,onClick:e=>{e.stopPropagation(),j(e=>!e)},onKeyDown:e=>{e.key===`Escape`?j(!1):A||e.key!==`ArrowDown`&&e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),j(!0))},ref:D,shape:`rounded`,size:`md`,type:`button`,variant:`primary`,children:(0,u.jsx)(`svg`,{fill:`none`,style:{transform:A?`rotate(180deg)`:`rotate(0)`,transition:`transform 120ms ease`},viewBox:`0 0 24 24`,children:(0,u.jsx)(`path`,{d:`m6 9 6 6 6-6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`})})})]}),A?(0,u.jsx)(it,{id:S,role:`listbox`,"aria-label":l,children:e.map((e,t)=>{let n=String(e.value)===String(M??``);return(0,u.jsx)(at,{"aria-selected":n,onClick:()=>{ne(e.value),j(!1),D.current?.focus()},onBlur:re,onKeyDown:e=>{ie(e,t)},role:`option`,tabIndex:-1,type:`button`,$selected:n,children:e.label},String(e.value))})}):null]}),f?(0,u.jsx)(ct,{$type:`error`,id:C,role:`alert`,children:f}):null,p?(0,u.jsx)(ct,{$type:`warning`,id:w,role:`status`,children:p}):null]})}var ut=l.styled.div`
607
+ ${x}
608
+ `,dt=l.styled.label`
609
+ color: ${({theme:e})=>v(e).colors.text};
610
+ font-size: ${({theme:e})=>v(e).typography.small};
611
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
612
+ `,ft=l.styled.textarea`
613
+ box-sizing: border-box;
614
+ width: 100%;
615
+ height: ${({$height:e,theme:t})=>e==null?v(t).formControl.textareaHeight:typeof e==`number`?`${e.toString()}px`:e};
616
+ min-height: ${({theme:e})=>v(e).formControl.textareaHeight};
617
+ border: ${({theme:e})=>v(e).formControl.border};
618
+ border-radius: ${({theme:e})=>v(e).formControl.borderRadius};
619
+ padding: ${({theme:e})=>v(e).formControl.padding};
620
+ background: ${({theme:e})=>v(e).colors.background};
621
+ color: ${({theme:e})=>v(e).colors.text};
622
+ font: inherit;
623
+ font-size: ${({theme:e})=>v(e).formControl.fontSize};
624
+ resize: ${({$resizable:e})=>e?`vertical`:`none`};
625
+
626
+ ${w(`formControl`)}
627
+
628
+ &:disabled {
629
+ cursor: not-allowed;
630
+ opacity: ${({theme:e})=>v(e).opacity.disabled};
631
+ }
632
+
633
+ ${({$invalid:e,theme:t})=>e&&l.css`
634
+ border-color: ${v(t).colors.error};
635
+ `}
636
+
637
+ ${({$invalid:e,$warning:t,theme:n})=>!e&&t&&l.css`
638
+ border-color: ${v(n).colors.warning};
639
+ `}
640
+
641
+ &:focus,
642
+ &:focus-visible {
643
+ ${({$invalid:e,$warning:t,theme:n})=>e?l.css`
644
+ border-color: ${v(n).colors.error};
645
+ `:t?l.css`
646
+ border-color: ${v(n).colors.warning};
647
+ `:``}
648
+ outline: none;
649
+ }
650
+ `,pt=l.styled.div`
651
+ color: ${({theme:e,$type:t})=>v(e).colors[t]};
652
+ font-size: ${({theme:e})=>v(e).typography.small};
653
+ `;function mt({id:e,label:t,error:n,warning:r,height:i,resizable:a=!1,ref:o,"aria-describedby":s,"aria-invalid":l,...d}){let f=(0,c.useId)(),p=e??f,m=`${p}-error`,h=`${p}-warning`,g=!!n||l===!0||l===`true`,_=[s,n?m:void 0,r?h:void 0].filter(Boolean).join(` `)||void 0;return(0,u.jsxs)(ut,{children:[t?(0,u.jsx)(dt,{htmlFor:p,children:t}):null,(0,u.jsx)(ft,{...d,$height:i,$invalid:g,$resizable:a,$warning:!!r,"aria-describedby":_,"aria-invalid":g||void 0,id:p,ref:o}),n?(0,u.jsx)(pt,{$type:`error`,id:m,role:`alert`,children:n}):null,r?(0,u.jsx)(pt,{$type:`warning`,id:h,role:`status`,children:r}):null]})}var ht=l.styled.p`
654
+ color: ${({theme:e})=>v(e).colors.text};
655
+ font-family: ${({theme:e})=>v(e).font.sans};
656
+ font-size: ${({theme:e,$fontSize:t,$tag:n})=>{if(t!==void 0)return t;let r=v(e).typography;return n&&Object.hasOwn(r,n)?r[n]:r.fallback}};
657
+ `;function gt({tag:e,as:t,fontSize:n,...r}){let i=e??t??`p`;return(0,u.jsx)(ht,{$tag:typeof i==`string`?i:void 0,$fontSize:n,as:i,...r})}var _t=l.css`
658
+ position: fixed;
659
+ inset: 0;
660
+ z-index: 1000;
661
+ display: flex;
662
+ align-items: center;
663
+ justify-content: center;
664
+ padding: ${({theme:e})=>v(e).space.lg};
665
+ `,vt=l.css`
666
+ position: absolute;
667
+ inset: 0;
668
+ border: none;
669
+ padding: 0;
670
+ cursor: pointer;
671
+ background: color-mix(
672
+ in srgb,
673
+ ${({theme:e})=>v(e).colors.bg} 25%,
674
+ transparent
675
+ );
676
+ `,yt=l.css`
677
+ position: relative;
678
+ z-index: 1;
679
+ box-sizing: border-box;
680
+ display: flex;
681
+ flex-direction: column;
682
+ width: 100%;
683
+ max-width: ${({theme:e})=>v(e).modal.maxWidth};
684
+ max-height: ${({theme:e})=>v(e).modal.maxHeight};
685
+ padding: ${({theme:e})=>v(e).modal.padding};
686
+ overflow: hidden;
687
+ background-color: ${({theme:e})=>v(e).colors.surface};
688
+ border: ${({theme:e})=>v(e).modal.border};
689
+ border-radius: ${({theme:e})=>v(e).modal.borderRadius};
690
+ box-shadow: ${({theme:e})=>v(e).shadow.modal};
691
+ `,bt=l.css`
692
+ display: flex;
693
+ align-items: center;
694
+ justify-content: space-between;
695
+ gap: ${({theme:e})=>v(e).space.md};
696
+ flex-shrink: 0;
697
+ `,xt=l.css`
698
+ margin: 0;
699
+ min-width: 0;
700
+ flex: 1;
701
+ font-family: ${({theme:e})=>v(e).font.sans};
702
+ font-size: ${({theme:e})=>v(e).modal.title.fontSize};
703
+ font-weight: ${({theme:e})=>v(e).modal.title.fontWeight};
704
+ color: ${({theme:e})=>v(e).colors.text};
705
+ `,St=l.css`
706
+ flex: 1;
707
+ min-height: 0;
708
+ margin-top: ${({theme:e})=>v(e).space.lg};
709
+ overflow-x: hidden;
710
+ overflow-y: auto;
711
+ font-family: ${({theme:e})=>v(e).font.sans};
712
+ font-size: ${({theme:e})=>v(e).modal.body.fontSize};
713
+ color: ${({theme:e})=>v(e).colors.text};
714
+ `,Ct=l.styled.div`
715
+ ${_t}
716
+ `,wt=l.styled.button`
717
+ ${vt}
718
+ `,Tt=l.styled.div`
719
+ ${yt}
720
+ `,Et=l.styled.div`
721
+ ${bt}
722
+ `,Dt=l.styled.h2`
723
+ ${xt}
724
+ `,Ot=l.styled.div`
725
+ ${St}
726
+ `;function kt(){return(0,u.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,u.jsx)(`path`,{fill:`currentColor`,d:`M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z`})})}function At({open:e,onClose:t,title:n,children:r,closeLabel:i=`Close`}){let a=(0,c.useId)(),o=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!e)return;o.current?.focus();let n=document.body.style.overflow;document.body.style.overflow=`hidden`;let r=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,r),()=>{document.body.style.overflow=n,document.removeEventListener(`keydown`,r)}},[e,t]),!e||typeof document>`u`?null:(0,d.createPortal)((0,u.jsxs)(Ct,{children:[(0,u.jsx)(wt,{type:`button`,"aria-label":`Close overlay`,onClick:t}),(0,u.jsxs)(Tt,{ref:o,role:`dialog`,"aria-modal":`true`,"aria-labelledby":a,tabIndex:-1,children:[(0,u.jsxs)(Et,{children:[(0,u.jsx)(Dt,{id:a,children:n}),(0,u.jsx)(L,{"aria-label":i,ghost:!0,onClick:t,shape:`rounded`,size:`md`,variant:`primary`,children:(0,u.jsx)(kt,{})})]}),r==null?null:(0,u.jsx)(Ot,{children:r})]})]}),document.body)}var jt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Mt=/^[\\/]{2}/;function Nt(e,t){return t+e.replace(/\\/g,`/`)}function R(e,t){if(e===!1||e==null)throw Error(t)}function z(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function B({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function V(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Pt(e,t,n=`/`){return Ft(e,t,n,!1)}function Ft(e,t,n,r,i){let a=U((typeof t==`string`?V(t):t).pathname||`/`,n);if(a==null)return null;let o=i??It(e),s=null,c=Qt(a);for(let e=0;s==null&&e<o.length;++e)s=Yt(o[e],c,r);return s}function It(e){let t=Lt(e);return zt(t),t}function Lt(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;R(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=W([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(R(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Lt(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:qt(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Zt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Rt(e.path))a(e,t,!0,n)}),t}function Rt(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Rt(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function zt(e){e.sort((e,t)=>e.score===t.score?Jt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Bt=/^:[\w-]+$/,Vt=3,Ht=2,Ut=1,Wt=10,Gt=-2,Kt=e=>e===`*`;function qt(e,t){let n=e.split(`/`),r=n.length;return n.some(Kt)&&(r+=Gt),t&&(r+=Ht),n.filter(e=>!Kt(e)).reduce((e,t)=>e+(Bt.test(t)?Vt:t===``?Ut:Wt),r)}function Jt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Yt(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Xt(u,l,s.matcher,s.compiledParams):H(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:W([a,d.pathname]),pathnameBase:sn(W([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=W([a,d.pathnameBase]))}return o}function H(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Zt(e.path,e.caseSensitive,e.end);return Xt(e,t,n,r)}function Xt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=G(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=G(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Zt(e,t=!1,n=!0){z(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Qt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return z(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function $t(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?V(e):e,a;return n?(n=on(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?en(n.substring(1),`/`):en(n,t)):a=t,{pathname:a,search:cn(r),hash:ln(i)}}function en(e,t){let n=G(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function tn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function rn(e){let t=nn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function an(e,t,n,r=!1){let i;typeof e==`string`?i=V(e):(i={...e},R(!i.pathname||!i.pathname.includes(`?`),tn(`?`,`pathname`,`search`,i)),R(!i.pathname||!i.pathname.includes(`#`),tn(`#`,`pathname`,`hash`,i)),R(!i.search||!i.search.includes(`#`),tn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=$t(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var on=e=>e.replace(/[\\/]{2,}/g,`/`),W=e=>on(e.join(`/`));function G(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var sn=e=>G(e).replace(/^\/*/,`/`),cn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ln=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,un=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function dn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function fn(e){return W(e.map(e=>e.route.path).filter(Boolean))||`/`}var pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function mn(e,t){let n=e;if(typeof n!=`string`||!jt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(pn)try{let e=new URL(window.location.href),r=Mt.test(n)?new URL(Nt(n,e.protocol)):new URL(n),a=U(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{z(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var hn=new URL(`http://localhost`);function gn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),hn)}catch{return hn}}function _n(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function vn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function yn(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!_n(i,n),s=!_n(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!vn(e,i)||!_n(i,a)))throw Error(`External navigation is not allowed`)}var bn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(bn);var xn=[`GET`,...bn];new Set(xn);var Sn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Cn(e){try{return Sn.includes(new URL(e).protocol)}catch{return!1}}var K=c.createContext(null);K.displayName=`DataRouter`;var wn=c.createContext(null);wn.displayName=`DataRouterState`;var Tn=c.createContext(!1);function En(){return c.useContext(Tn)}var Dn=c.createContext({isTransitioning:!1});Dn.displayName=`ViewTransition`;var On=c.createContext(new Map);On.displayName=`Fetchers`;var kn=c.createContext(null);kn.displayName=`Await`;var q=c.createContext(null);q.displayName=`Navigation`;var An=c.createContext(null);An.displayName=`Location`;var J=c.createContext({outlet:null,matches:[],isDataRoute:!1});J.displayName=`Route`;var jn=c.createContext(null);jn.displayName=`RouteError`;var Mn=`REACT_ROUTER_ERROR`,Nn=`REDIRECT`,Pn=`ROUTE_ERROR_RESPONSE`;function Fn(e){if(e.startsWith(`${Mn}:${Nn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function In(e){if(e.startsWith(`${Mn}:${Pn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new un(t.status,t.statusText,t.data)}catch{}}function Ln(e,{relative:t}={}){R(Rn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=c.useContext(q),{hash:i,pathname:a,search:o}=X(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:W([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Rn(){return c.useContext(An)!=null}function Y(){return R(Rn(),`useLocation() may be used only in the context of a <Router> component.`),c.useContext(An).location}var zn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Bn(e){c.useContext(q).static||c.useLayoutEffect(e)}function Vn(){let{isDataRoute:e}=c.useContext(J);return e?ir():Hn()}function Hn(){R(Rn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=c.useContext(K),{basename:t,navigator:n}=c.useContext(q),{matches:r}=c.useContext(J),{pathname:i}=Y(),a=JSON.stringify(rn(r)),o=c.useRef(!1);return Bn(()=>{o.current=!0}),c.useCallback((r,s={})=>{if(z(o.current,zn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=an(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:W([t,c.pathname])),yn(typeof r==`string`?r:B(r),n.createHref(c),gn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}c.createContext(null);function X(e,{relative:t}={}){let{matches:n}=c.useContext(J),{pathname:r}=Y(),i=JSON.stringify(rn(n));return c.useMemo(()=>an(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Un(e,t,n){R(Rn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=c.useContext(q),{matches:i}=c.useContext(J),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,l=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;or(s,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
727
+
728
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=Y(),f;if(t){let e=typeof t==`string`?V(t):t;R(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Pt(e,{pathname:m});z(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),z(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Xn(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:W([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:W([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?c.createElement(An.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Wn(){let e=rr(),t=dn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=c.createElement(c.Fragment,null,c.createElement(`p`,null,`💿 Hey developer 👋`),c.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,c.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,c.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),c.createElement(c.Fragment,null,c.createElement(`h2`,null,`Unexpected Application Error!`),c.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?c.createElement(`pre`,{style:i},n):null,o)}var Gn=c.createElement(Wn,null),Kn=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=In(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:c.createElement(J.Provider,{value:this.props.routeContext},c.createElement(jn.Provider,{value:e,children:this.props.component}));return this.context?c.createElement(Jn,{error:e},t):t}};Kn.contextType=Tn;var qn=new WeakMap;function Jn({children:e,error:t}){let{basename:n,navigator:r}=c.useContext(q);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Fn(t.digest);if(e){let i=qn.get(t);if(i)throw i;let a=mn(e.location,n),o=a.absoluteURL||a.to;if(yn(e.location,o,gn(r),`allow-explicit`),Cn(o))throw Error(`Invalid redirect location`);if(pn&&!qn.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw qn.set(t,n),n}}return c.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Yn({routeContext:e,match:t,children:n}){let r=c.useContext(K);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(J.Provider,{value:e},n)}function Xn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:fn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Gn,o&&(s<0&&l===0?(or(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?c.createElement(n.route.Component,null):n.route.element?n.route.element:e,c.createElement(Yn,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?c.createElement(Kn,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qn(e){let t=c.useContext(K);return R(t,Zn(e)),t}function $n(e){let t=c.useContext(wn);return R(t,Zn(e)),t}function er(e){let t=c.useContext(J);return R(t,Zn(e)),t}function tr(e){let t=er(e),n=t.matches[t.matches.length-1];return R(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function nr(){return tr(`useRouteId`)}function rr(){let e=c.useContext(jn),t=$n(`useRouteError`),n=tr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ir(){let{router:e}=Qn(`useNavigate`),t=tr(`useNavigate`),n=c.useRef(!1);return Bn(()=>{n.current=!0}),c.useCallback(async(r,i={})=>{z(n.current,zn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ar={};function or(e,t,n){!t&&!ar[e]&&(ar[e]=!0,z(!1,n))}c.memo(sr);function sr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Un(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}c.Component;var cr=`get`,lr=`application/x-www-form-urlencoded`;function ur(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function dr(e){return ur(e)&&e.tagName.toLowerCase()===`button`}function fr(e){return ur(e)&&e.tagName.toLowerCase()===`form`}function pr(e){return ur(e)&&e.tagName.toLowerCase()===`input`}function mr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hr(e,t){return e.button===0&&(!t||t===`_self`)&&!mr(e)}var Z=null;function gr(){if(Z===null)try{new FormData(document.createElement(`form`),0),Z=!1}catch{Z=!0}return Z}var _r=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function vr(e){return e!=null&&!_r.has(e)?(z(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lr}"`),null):e}function yr(e,t){let n,r,i,a,o;if(fr(e)){let o=e.getAttribute(`action`);r=o?U(o,t):null,n=e.getAttribute(`method`)||cr,i=vr(e.getAttribute(`enctype`))||lr,a=new FormData(e)}else if(dr(e)||pr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?U(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||cr,i=vr(e.getAttribute(`formenctype`))||vr(o.getAttribute(`enctype`))||lr,a=new FormData(o,e),!gr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ur(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=cr,r=null,i=lr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function br(e,t){if(e===!1||e==null)throw Error(t)}function xr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&U(i.pathname,t)===`/`?`${G(t)}/_root.${r}`:`${G(i.pathname)}.${r}`,i}async function Sr(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Cr(e){return e!=null&&typeof e.page==`string`}function wr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Tr(e,t,n){return Ar((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Sr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(wr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Er(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Dr(e,t,{includeHydrateFallback:n}={}){return Or(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Or(e){return[...new Set(e)]}function kr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ar(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Cr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(kr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function jr(){let e=c.useContext(K);return br(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Mr(){let e=c.useContext(wn);return br(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Nr=c.createContext(void 0);Nr.displayName=`FrameworkContext`;function Q(){let e=c.useContext(Nr);return br(e,`You must render this element inside a <HydratedRouter> element`),e}function Pr(e,t){let n=c.useContext(Nr),[r,i]=c.useState(!1),[a,o]=c.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=c.useRef(null);c.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),c.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:$(s,m),onBlur:$(l,h),onMouseEnter:$(u,m),onMouseLeave:$(d,h),onTouchStart:$(f,m)}]:[a,p,{}]:[!1,p,{}]}function $(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Fr({page:e,...t}){let n=En(),{nonce:r}=Q(),{router:i}=jr(),a=c.useMemo(()=>Pt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?c.createElement(Lr,{page:e,matches:a,...t}):c.createElement(Rr,{page:e,matches:a,...t})):null}function Ir(e){let{manifest:t,routeModules:n}=Q(),[r,i]=c.useState([]);return c.useEffect(()=>{let r=!1;return Tr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Lr({page:e,matches:t,...n}){let r=Y(),{future:i}=Q(),{basename:a}=jr(),o=c.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=xr(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return c.createElement(c.Fragment,null,o.map(e=>c.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Rr({page:e,matches:t,...n}){let r=Y(),{future:i,manifest:a,routeModules:o}=Q(),{basename:s}=jr(),{loaderData:l,matches:u}=Mr(),d=c.useMemo(()=>Er(e,t,u,a,r,`data`),[e,t,u,a,r]),f=c.useMemo(()=>Er(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=c.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,c=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?c=!0:n.add(e.route.id))}),n.size===0)return[];let u=xr(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return c&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[s,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,o]),m=c.useMemo(()=>Dr(f,a),[f,a]),h=Ir(f);return c.createElement(c.Fragment,null,p.map(e=>c.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>c.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>c.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function zr(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}c.Component;var Br=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Br&&(window.__reactRouterVersion=`7.18.5`)}catch{}var Vr=c.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=c.useContext(q),y=typeof u==`string`&&jt.test(u),b=mn(u,g);u=b.to;let x=Ln(u,{relative:r}),S=Y(),C=null;if(o){let e=an(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:W([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Pr(n,m),D=Kr(u,{replace:a,mask:o,state:s,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=c.createElement(`a`,{...m,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:zr(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?c.createElement(c.Fragment,null,A,c.createElement(Fr,{page:x})):A});Vr.displayName=`Link`;var Hr=c.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...l},u){let d=X(a,{relative:l.relative}),f=Y(),p=c.useContext(wn),{navigator:m,basename:h}=c.useContext(q),g=p!=null&&Zr(d)&&o===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=U(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return c.createElement(Vr,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Hr.displayName=`NavLink`;var Ur=c.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=cr,action:s,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=c.useContext(q),_=Yr(),v=Xr(s,{relative:u}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&jt.test(s);return c.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?c.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Ur.displayName=`Form`;function Wr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gr(e){let t=c.useContext(K);return R(t,Wr(e)),t}function Kr(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Vn(),f=Y(),p=X(e,{relative:o});return c.useCallback(m=>{if(hr(m,t)){m.preventDefault();let t=n===void 0?B(f)===B(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:l});u?c.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,l,u])}var qr=0,Jr=()=>`__${String(++qr)}__`;function Yr(){let{router:e}=Gr(`useSubmit`),{basename:t}=c.useContext(q),n=nr(),r=e.fetch,i=e.navigate;return c.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=yr(e,t);if(a.navigate===!1){let e=a.fetcherKey||Jr();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Xr(e,{relative:t}={}){let{basename:n}=c.useContext(q),r=c.useContext(J);R(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...X(e||`.`,{relative:t})},o=Y();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:W([n,a.pathname])),B(a)}function Zr(e,{relative:t}={}){let n=c.useContext(Dn);R(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Gr(`useViewTransitionState`),i=X(e,{relative:t});if(!n.isTransitioning)return!1;let a=U(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=U(n.nextLocation.pathname,r)||n.nextLocation.pathname;return H(i.pathname,o)!=null||H(i.pathname,a)!=null}var Qr=l.css`
729
+ display: inline-flex;
730
+ align-items: center;
731
+ justify-content: center;
732
+ border: 0;
733
+ padding: ${({theme:e})=>v(e).navLinks.itemPadding};
734
+ box-shadow: ${({theme:e})=>v(e).shadow.link};
735
+ background: ${({theme:e})=>v(e).colors.primary};
736
+ color: ${({theme:e})=>v(e).colors.primaryText};
737
+ font-family: ${({theme:e})=>v(e).font.sans};
738
+ font-size: ${({theme:e})=>v(e).navLinks.fontSize};
739
+ font-weight: ${({theme:e})=>v(e).font.weight.semibold};
740
+ text-decoration: ${({theme:e})=>v(e).navLinks.textDecoration};
741
+ text-transform: ${({theme:e})=>v(e).navLinks.textTransform};
742
+ cursor: pointer;
743
+ position: relative;
744
+ z-index: 1;
745
+ transition:
746
+ background-color 0.15s ease,
747
+ box-shadow 0.15s ease,
748
+ color 0.15s ease,
749
+ transform 0.15s ease;
750
+
751
+ &:hover:not(:disabled) {
752
+ background: ${({theme:e})=>f(v(e).colors.primary,v(e).colors.ink)};
753
+ }
754
+
755
+ &:first-child {
756
+ border-top-left-radius: ${({theme:e})=>v(e).navLinks.borderRadius};
757
+ border-bottom-left-radius: ${({theme:e})=>v(e).navLinks.borderRadius};
758
+ }
759
+
760
+ &:last-child {
761
+ border-top-right-radius: ${({theme:e})=>v(e).navLinks.borderRadius};
762
+ border-bottom-right-radius: ${({theme:e})=>v(e).navLinks.borderRadius};
763
+ }
764
+
765
+ ${w(`navLinks`)}
766
+
767
+ &:disabled {
768
+ opacity: ${({theme:e})=>v(e).opacity.disabledButton};
769
+ cursor: not-allowed;
770
+ }
771
+ `,$r=l.styled.nav`
772
+ display: inline-flex;
773
+ align-items: center;
774
+ border-radius: ${({theme:e})=>v(e).navLinks.borderRadius};
775
+ padding: 0;
776
+ box-shadow: ${({theme:e})=>v(e).shadow.navLinks};
777
+ font-family: ${({theme:e})=>v(e).font.sans};
778
+ font-size: ${({theme:e})=>v(e).navLinks.fontSize};
779
+ text-transform: ${({theme:e})=>v(e).navLinks.textTransform};
780
+
781
+ & > a {
782
+ ${Qr}
783
+
784
+ border: ${({theme:e})=>v(e).navLinks.border};
785
+
786
+ &:active,
787
+ &[aria-current='page'] {
788
+ z-index: 0;
789
+ box-shadow: none;
790
+ transform: translate(
791
+ calc(0px + ${({theme:e})=>v(e).shadow.offsetX}),
792
+ ${({theme:e})=>v(e).shadow.offsetY}
793
+ );
794
+ }
795
+ }
796
+ `,ei=l.styled.button`
797
+ ${Qr}
798
+ `;function ti({links:e,...t}){return(0,u.jsx)($r,{...t,children:e.map(e=>`href`in e&&e.href!==void 0?(0,u.jsx)(Hr,{to:e.href,className:e.className,style:e.style,end:e.end,caseSensitive:e.caseSensitive,children:e.label},e.id):(0,u.jsx)(ei,{type:`button`,disabled:e.disabled,onClick:e.onClick,children:e.label},e.id))})}var ni=l.styled.a`
799
+ display: inline-flex;
800
+ align-items: center;
801
+ gap: ${({theme:e})=>v(e).space.sm};
802
+ color: inherit;
803
+ font-family: ${({theme:e})=>v(e).font.sans};
804
+ text-decoration: ${({theme:e})=>v(e).userBadge.textDecoration};
805
+
806
+ ${w(`userBadge`)}
807
+ `;function ri({to:e,firstName:t,lastName:n,avatarSrc:r,size:i=`md`,showName:a=!0,...o}){let s=`${t} ${n}`.trim();return(0,u.jsxs)(ni,{as:Vr,to:e,...o,children:[(0,u.jsx)(b,{firstName:t,lastName:n,src:r,alt:a?``:s,size:i,"aria-hidden":a?!0:void 0}),a?(0,u.jsx)(`span`,{children:s}):null]})}var ii=l.styled.aside`
808
+ box-sizing: border-box;
809
+ display: flex;
810
+ flex: 0 0
811
+ ${({$extended:e,theme:t})=>e?v(t).sidebar.width.extended:v(t).sidebar.width.compact};
812
+ flex-direction: column;
813
+ gap: ${({theme:e})=>v(e).space.sm};
814
+ width: ${({$extended:e,theme:t})=>e?v(t).sidebar.width.extended:v(t).sidebar.width.compact};
815
+ height: ${({theme:e})=>v(e).sidebar.height.fallback};
816
+ height: ${({theme:e})=>v(e).sidebar.height.dynamic};
817
+ min-height: 0;
818
+ overflow: hidden;
819
+ padding: ${({theme:e})=>v(e).space.inset};
820
+ border: ${({theme:e})=>v(e).sidebar.border};
821
+ border-radius: ${({theme:e})=>v(e).sidebar.borderRadius};
822
+ background: ${({theme:e})=>v(e).colors.surface};
823
+ box-shadow: ${({theme:e})=>v(e).shadow.sidebar};
824
+ transition:
825
+ width 0.2s ease,
826
+ flex-basis 0.2s ease;
827
+ `,ai=l.styled.div`
828
+ display: flex;
829
+ flex-direction: column;
830
+ align-items: center;
831
+ gap: ${({theme:e})=>v(e).space.sm};
832
+ align-items: ${({$extended:e})=>e?`flex-end`:`center`};
833
+ `,oi=l.styled.nav`
834
+ display: flex;
835
+ min-height: 0;
836
+ flex: 1;
837
+ flex-direction: column;
838
+ align-items: stretch;
839
+ gap: ${({theme:e})=>v(e).space.sm};
840
+ margin-inline: ${({theme:e})=>`-${v(e).space.xs}`};
841
+ padding-inline: ${({theme:e})=>v(e).space.xs};
842
+ overflow-y: auto;
843
+ overflow-x: hidden;
844
+ `,si=l.styled.div`
845
+ display: flex;
846
+ width: 100%;
847
+ min-width: 0;
848
+
849
+ & > a {
850
+ box-sizing: border-box;
851
+ width: 100%;
852
+ min-width: 0;
853
+ justify-content: ${({$extended:e})=>e?`flex-start`:`center`};
854
+ }
855
+ `,ci=l.styled.div`
856
+ display: flex;
857
+ flex-direction: column;
858
+ gap: ${({theme:e})=>v(e).space.sm};
859
+ `;function li({extended:e}){return(0,u.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:e?(0,u.jsx)(`path`,{d:`m15 18-6-6 6-6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}):(0,u.jsx)(`path`,{d:`m9 18 6-6-6-6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ui({links:e,logout:t,extended:n,defaultExtended:r=!1,onExtendedChange:i,navigationLabel:a=`Primary navigation`,"aria-label":o=`Application sidebar`,...s}){let[l,d]=(0,c.useState)(r),f=n??l,[p,m]=(0,c.useState)(f);function h(){let e=!f;e||m(!0),n===void 0&&d(e),i?.(e)}function g(e){e.target===e.currentTarget&&e.propertyName===`width`&&m(f)}function _(e){return(0,u.jsx)(si,{$extended:p,children:p?(0,u.jsxs)(Ie,{href:e.href,children:[(0,u.jsx)(F,{size:`md`,style:{color:`inherit`},children:e.icon}),e.label]}):(0,u.jsx)(xe,{href:e.href,"aria-label":e.label,title:e.label,children:e.icon})},e.id)}return(0,u.jsxs)(ii,{...s,$extended:f,"aria-label":o,"data-extended":f,onTransitionEnd:g,children:[(0,u.jsx)(ai,{$extended:f,children:(0,u.jsx)(L,{"aria-label":f?`Collapse sidebar`:`Expand sidebar`,"aria-expanded":f,onClick:h,size:`sm`,ghost:!0,children:(0,u.jsx)(li,{extended:f})})}),(0,u.jsx)(oi,{"aria-label":a,children:e.map(e=>_(e))}),(0,u.jsx)(ci,{children:_(t)})]})}var di=l.styled.div`
860
+ position: relative;
861
+ display: block;
862
+ width: 100%;
863
+ min-width: 0;
864
+ aspect-ratio: ${({$aspectRatio:e})=>e};
865
+ box-sizing: border-box;
866
+ overflow: hidden;
867
+ padding: ${({theme:e})=>v(e).space.inset};
868
+ border: ${({theme:e})=>v(e).camera.border};
869
+ border-radius: ${({theme:e})=>v(e).camera.borderRadius};
870
+ background: ${({theme:e})=>v(e).colors.surface};
871
+ color: ${({theme:e})=>v(e).colors.text};
872
+ `,fi=l.styled.video`
873
+ position: absolute;
874
+ inset: 0;
875
+ width: 100%;
876
+ height: 100%;
877
+ object-fit: cover;
878
+ `,pi=l.styled.div`
879
+ position: absolute;
880
+ inset: 0;
881
+ display: flex;
882
+ align-items: center;
883
+ justify-content: center;
884
+ background: ${({theme:e})=>v(e).colors.secondary};
885
+ color: ${({theme:e})=>v(e).colors.primary};
886
+ font-family: ${({theme:e})=>v(e).font.sans};
887
+ font-size: ${({theme:e})=>v(e).camera.fallbackFontSize};
888
+ font-weight: ${({theme:e})=>v(e).camera.fallbackFontWeight};
889
+ `,mi=l.styled.div`
890
+ position: absolute;
891
+ z-index: 1;
892
+ ${({$placement:e})=>e===`top-right`?l.css`
893
+ top: ${({theme:e})=>v(e).space.inset};
894
+ right: ${({theme:e})=>v(e).space.inset};
895
+ `:l.css`
896
+ right: ${({theme:e})=>v(e).space.inset};
897
+ bottom: ${({theme:e})=>v(e).space.inset};
898
+ `}
899
+ `,hi=l.styled.span`
900
+ position: absolute;
901
+ z-index: 1;
902
+ bottom: ${({theme:e})=>v(e).space.inset};
903
+ left: ${({theme:e})=>v(e).space.inset};
904
+ max-width: ${({theme:e})=>`calc(100% - ${v(e).camera.nameMaxWidthOffset})`};
905
+ overflow: hidden;
906
+ padding: ${({theme:e})=>`${v(e).space.xs} ${v(e).space.sm}`};
907
+ border-radius: ${({theme:e})=>v(e).camera.nameBorderRadius};
908
+ background: ${({theme:e})=>`color-mix(in srgb, ${v(e).colors.ink} 65%, transparent)`};
909
+ color: ${({theme:e})=>v(e).colors.muted};
910
+ font-family: ${({theme:e})=>v(e).font.sans};
911
+ font-size: ${({theme:e})=>v(e).typography.small};
912
+ text-overflow: ellipsis;
913
+ white-space: nowrap;
914
+ `;function gi({disabled:e}){return(0,u.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,u.jsx)(`path`,{d:`M4 7.5h11.5A1.5 1.5 0 0 1 17 9v1.5l4-2.5v8l-4-2.5V15a1.5 1.5 0 0 1-1.5 1.5H5.5A1.5 1.5 0 0 1 4 15V7.5Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),e?(0,u.jsx)(`path`,{d:`m3 3 18 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}):null]})}function _i({disabled:e}){return(0,u.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,u.jsx)(`path`,{d:`M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm0 0v5m-4 0h8m-11-8a7 7 0 0 0 14 0`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),e?(0,u.jsx)(`path`,{d:`m3 3 18 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}):null]})}function vi({firstName:e,lastName:t,stream:n,cameraEnabled:r,audioEnabled:i,onCameraToggle:a,onAudioToggle:o,aspectRatio:s=16/9,...l}){let d=(0,c.useRef)(null),f=`${e} ${t}`.trim(),p=`${e.charAt(0)}${t.charAt(0)}`.toUpperCase(),m=r&&!!n;return(0,c.useEffect)(()=>{let e=d.current;if(e)return e.srcObject=m?n??null:null,()=>{e.srcObject=null}},[m,n]),(0,u.jsxs)(di,{...l,$aspectRatio:Number.isFinite(s)&&s>0?s:16/9,role:`group`,"aria-label":`${f} camera`,children:[m?(0,u.jsx)(fi,{ref:d,autoPlay:!0,muted:!0,playsInline:!0}):(0,u.jsx)(pi,{"aria-hidden":`true`,children:p}),(0,u.jsx)(mi,{$placement:`top-right`,children:(0,u.jsx)(L,{"aria-label":`Turn camera ${r?`off`:`on`}`,"aria-pressed":r,variant:`primary`,size:`md`,shape:`rounded`,ghost:!0,onClick:a,children:(0,u.jsx)(gi,{disabled:!r})})}),(0,u.jsx)(mi,{$placement:`bottom-right`,children:(0,u.jsx)(L,{"aria-label":`Turn audio ${i?`off`:`on`}`,"aria-pressed":i,variant:`primary`,size:`md`,shape:`rounded`,ghost:!0,onClick:o,children:(0,u.jsx)(_i,{disabled:!i})})}),(0,u.jsx)(hi,{children:f})]})}var yi=l.createGlobalStyle`
915
+ :root {
916
+ --jynko-shadow-solid: ${({theme:e})=>v(e).shadow.button};
917
+ --jynko-modal-padding: ${({theme:e})=>v(e).modal.padding};
918
+ --jynko-modal-max-width: ${({theme:e})=>v(e).modal.maxWidth};
919
+ --jynko-modal-max-height: ${({theme:e})=>v(e).modal.maxHeight};
920
+ --jynko-modal-border-radius: ${({theme:e})=>v(e).modal.borderRadius};
921
+ --jynko-modal-box-shadow: ${({theme:e})=>v(e).shadow.modal};
922
+ }
923
+
924
+ button {
925
+ border: ${({theme:e})=>v(e).button.border};
926
+ border-radius: ${({theme:e})=>v(e).button.borderRadius};
927
+ padding: ${({theme:e})=>v(e).button.padding};
928
+ font-size: ${({theme:e})=>v(e).button.fontSize};
929
+ text-transform: ${({theme:e})=>v(e).button.textTransform};
930
+ }
931
+ `;function bi({children:e,theme:t=_}){return(0,u.jsxs)(l.ThemeProvider,{theme:t,children:[(0,u.jsx)(yi,{}),e]})}exports.AAvatar=b,exports.ABadge=O,exports.AButton=re,exports.AIcon=F,exports.AIconButton=L,exports.AIconLink=xe,exports.AInput=Me,exports.ALink=Ie,exports.ALogo=ze,exports.ASearchInput=Je,exports.ASection=Xe,exports.ASelect=lt,exports.ATextarea=mt,exports.ATypography=gt,exports.JynkoProvider=bi,exports.MModal=At,exports.MNavLinks=ti,exports.MUserBadge=ri,exports.OSidebar=ui,exports.OUserCamera=vi,exports.theme=_;
932
+ //# sourceMappingURL=index.cjs.map