@cfxjs/sirius-next-common 0.2.19 → 0.2.21-fix-error-publish

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 (208) hide show
  1. package/dist/{chunk-CMOP3BKX.js → chunk-225VMTCA.js} +3 -3
  2. package/dist/{chunk-LCIBOT5P.js → chunk-3JIAKQ23.js} +2 -2
  3. package/dist/{chunk-C7OIVXE3.js → chunk-4B7BV62E.js} +3 -3
  4. package/dist/chunk-4BS66NNM.js +29 -0
  5. package/dist/chunk-4BS66NNM.js.map +1 -0
  6. package/dist/{chunk-S7M6UTND.js → chunk-4M53GHPD.js} +6 -6
  7. package/dist/{chunk-GHHUAWSG.js → chunk-524EB4WC.js} +3 -3
  8. package/dist/chunk-5AM5HM3B.js +10 -0
  9. package/dist/chunk-5AM5HM3B.js.map +1 -0
  10. package/dist/{chunk-XZL5CZFT.js → chunk-5MJZWIYI.js} +4 -4
  11. package/dist/chunk-6C5NQACS.js +202 -0
  12. package/dist/chunk-6C5NQACS.js.map +1 -0
  13. package/dist/{chunk-H5ZJBRIK.js → chunk-6PKWA444.js} +4 -4
  14. package/dist/{chunk-C3E5EA6J.js → chunk-734CQOS7.js} +10 -10
  15. package/dist/{chunk-C3E5EA6J.js.map → chunk-734CQOS7.js.map} +1 -1
  16. package/dist/chunk-7RLNWQIR.js +192 -0
  17. package/dist/chunk-7RLNWQIR.js.map +1 -0
  18. package/dist/{chunk-RUU22F7R.js → chunk-7VFOHX3W.js} +2 -2
  19. package/dist/{chunk-BEI5TWJL.js → chunk-7WDLTRBN.js} +2 -2
  20. package/dist/{chunk-AYCHKB2Y.js → chunk-A3IT7RYO.js} +2 -2
  21. package/dist/{chunk-UF5BN4QN.js → chunk-A3VPSWVX.js} +2 -2
  22. package/dist/chunk-A46LVI25.js +82 -0
  23. package/dist/chunk-A46LVI25.js.map +1 -0
  24. package/dist/chunk-A6B5V6XY.js +140 -0
  25. package/dist/chunk-A6B5V6XY.js.map +1 -0
  26. package/dist/{chunk-ELF2EOGF.js → chunk-AQFNXW4W.js} +2 -2
  27. package/dist/chunk-ASS6TOFE.js +72 -0
  28. package/dist/chunk-ASS6TOFE.js.map +1 -0
  29. package/dist/{chunk-NM3BMITL.js → chunk-B5JCHBO3.js} +2 -2
  30. package/dist/{chunk-DCQANK66.js → chunk-BGNBKP5R.js} +2 -2
  31. package/dist/{chunk-6L4ZEJQI.js → chunk-BN3ATGHU.js} +2 -2
  32. package/dist/chunk-C6GUZVQ2.js +130 -0
  33. package/dist/chunk-C6GUZVQ2.js.map +1 -0
  34. package/dist/chunk-CNXGYDZG.js +146 -0
  35. package/dist/chunk-CNXGYDZG.js.map +1 -0
  36. package/dist/chunk-DASMAZXS.js +71 -0
  37. package/dist/{chunk-GPQN2P32.js → chunk-DO6PJAZB.js} +5 -5
  38. package/dist/chunk-E7FB4S3X.js +276 -0
  39. package/dist/chunk-E7FB4S3X.js.map +1 -0
  40. package/dist/{chunk-BHAXBHVC.js → chunk-EHRGH3HS.js} +4 -4
  41. package/dist/chunk-EOSVUB2G.js +51 -0
  42. package/dist/chunk-EOSVUB2G.js.map +1 -0
  43. package/dist/chunk-FGPRA3A4.js +80 -0
  44. package/dist/chunk-FGPRA3A4.js.map +1 -0
  45. package/dist/{chunk-UZALXR3J.js → chunk-FJMV3UA7.js} +4 -4
  46. package/dist/{chunk-YVV32ON3.js → chunk-FSYB23NA.js} +2 -2
  47. package/dist/{chunk-TC4445WV.js → chunk-FTAFV6RE.js} +5 -5
  48. package/dist/chunk-FW5ON36S.js +212 -0
  49. package/dist/chunk-FW5ON36S.js.map +1 -0
  50. package/dist/chunk-HCEXWKMZ.js +90 -0
  51. package/dist/chunk-HCEXWKMZ.js.map +1 -0
  52. package/dist/chunk-HW5VD7EO.js +17 -0
  53. package/dist/chunk-HW5VD7EO.js.map +1 -0
  54. package/dist/{chunk-GQRCW7WX.js → chunk-J536GL5G.js} +2 -2
  55. package/dist/{chunk-DYNSSHD5.js → chunk-J7UQ2R3H.js} +7 -7
  56. package/dist/{chunk-YEAWH772.js → chunk-JBCKAHH7.js} +2 -2
  57. package/dist/{chunk-7VQL3G7K.js → chunk-JKFT4JUY.js} +4 -4
  58. package/dist/chunk-L7RD6ZPE.js +534 -0
  59. package/dist/chunk-L7RD6ZPE.js.map +1 -0
  60. package/dist/{chunk-W64AF7LA.js → chunk-MFCMTOYM.js} +5 -5
  61. package/dist/chunk-MQY7EQPG.js +284 -0
  62. package/dist/chunk-MQY7EQPG.js.map +1 -0
  63. package/dist/chunk-MWSXXVVL.js +157 -0
  64. package/dist/chunk-MWSXXVVL.js.map +1 -0
  65. package/dist/chunk-O6BP54O6.js +63 -0
  66. package/dist/chunk-O6BP54O6.js.map +1 -0
  67. package/dist/chunk-OFAM2QTT.js +17 -0
  68. package/dist/chunk-OFAM2QTT.js.map +1 -0
  69. package/dist/{chunk-2WEBXRNL.js → chunk-OSPPP5W5.js} +2 -2
  70. package/dist/chunk-OT252GGM.js +66 -0
  71. package/dist/chunk-OT252GGM.js.map +1 -0
  72. package/dist/{chunk-WZIT54AU.js → chunk-OTSNM4CR.js} +2 -2
  73. package/dist/chunk-OTSNM4CR.js.map +1 -0
  74. package/dist/chunk-QX7AGYA5.js +2149 -0
  75. package/dist/chunk-QX7AGYA5.js.map +1 -0
  76. package/dist/chunk-R62HRSIY.js +145 -0
  77. package/dist/chunk-R62HRSIY.js.map +1 -0
  78. package/dist/{chunk-OT7NZ4PK.js → chunk-RLA5XZT2.js} +3 -3
  79. package/dist/chunk-RLA5XZT2.js.map +1 -0
  80. package/dist/{chunk-MUW5KBWU.js → chunk-RWTNG7SM.js} +8 -4
  81. package/dist/chunk-RWTNG7SM.js.map +1 -0
  82. package/dist/chunk-SIZYE6WH.js +3616 -0
  83. package/dist/chunk-SIZYE6WH.js.map +1 -0
  84. package/dist/chunk-SNUPCZY7.js +812 -0
  85. package/dist/chunk-SNUPCZY7.js.map +1 -0
  86. package/dist/{chunk-VGYNHJFT.js → chunk-SYWQ2T57.js} +8 -7
  87. package/dist/chunk-SYWQ2T57.js.map +1 -0
  88. package/dist/chunk-TGWQSVFC.js +26 -0
  89. package/dist/chunk-TGWQSVFC.js.map +1 -0
  90. package/dist/chunk-UVRMLFMC.js +21 -0
  91. package/dist/chunk-UVRMLFMC.js.map +1 -0
  92. package/dist/chunk-UX6IRX2M.js +146 -0
  93. package/dist/chunk-UX6IRX2M.js.map +1 -0
  94. package/dist/chunk-VD73ULXJ.js +107 -0
  95. package/dist/chunk-VD73ULXJ.js.map +1 -0
  96. package/dist/chunk-VEK5DLFI.js +23 -0
  97. package/dist/chunk-VEK5DLFI.js.map +1 -0
  98. package/dist/chunk-VTHVXZOP.js +112 -0
  99. package/dist/chunk-VTHVXZOP.js.map +1 -0
  100. package/dist/chunk-WY3RJ3A6.js +51 -0
  101. package/dist/chunk-XI5WO2NW.js +37 -0
  102. package/dist/chunk-XI5WO2NW.js.map +1 -0
  103. package/dist/{chunk-C6CGZ6KN.js → chunk-YOCMEOLX.js} +2 -2
  104. package/dist/chunk-YOVNVFY2.js +105 -0
  105. package/dist/chunk-YOVNVFY2.js.map +1 -0
  106. package/dist/{chunk-7AVQOIDM.js → chunk-Z64Z5HLJ.js} +2 -2
  107. package/dist/components/AAFailedReason/index.d.ts +11 -0
  108. package/dist/components/AAFailedReason/index.js +41 -0
  109. package/dist/components/AAFailedReason/index.js.map +1 -0
  110. package/dist/components/AceEditor/index.js +4 -4
  111. package/dist/components/AddressContainer/CoreAddressContainer.js +10 -10
  112. package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
  113. package/dist/components/AddressContainer/addressSwitcher.js +7 -7
  114. package/dist/components/AddressContainer/addressView.js +6 -6
  115. package/dist/components/AddressContainer/label.js +3 -3
  116. package/dist/components/AddressContainer/utils.js +3 -3
  117. package/dist/components/Age/index.js +4 -4
  118. package/dist/components/AutoComplete/index.js +3 -3
  119. package/dist/components/Charts/PreviewChartTemplate.js +1 -1
  120. package/dist/components/Charts/StockChartTemplate.js +1 -1
  121. package/dist/components/CopyButton/index.js +3 -3
  122. package/dist/components/DecimalsSelect/index.js +3 -3
  123. package/dist/components/DownloadCSV/index.js +4 -4
  124. package/dist/components/GasPriceDropdown/index.js +2 -2
  125. package/dist/components/IncreasePercent/index.js +2 -2
  126. package/dist/components/InfoIconWithTooltip/index.js +4 -4
  127. package/dist/components/InputData/AddressLabel.js +8 -8
  128. package/dist/components/InputData/ContractDetail.js +3 -3
  129. package/dist/components/InputData/JsonDecode.js +5 -5
  130. package/dist/components/InputData/OptimizationDecode.js +10 -10
  131. package/dist/components/InputData/UTF8.js +3 -3
  132. package/dist/components/InputData/index.js +14 -14
  133. package/dist/components/Modal/index.js +3 -3
  134. package/dist/components/NetworkIcon/index.js +2 -2
  135. package/dist/components/OutputData/ErrorDecode.js +13 -13
  136. package/dist/components/OutputData/index.js +15 -15
  137. package/dist/components/PhishingAddressContainer/index.js +4 -4
  138. package/dist/components/Popover/index.js +3 -3
  139. package/dist/components/Price/index.js +3 -3
  140. package/dist/components/ProxyContractAddress/index.js +6 -6
  141. package/dist/components/Radio/index.js +2 -2
  142. package/dist/components/SearchInput/index.js +4 -4
  143. package/dist/components/Select/index.js +4 -4
  144. package/dist/components/Select/select.js +3 -3
  145. package/dist/components/SmartAccountAddress/index.d.ts +11 -0
  146. package/dist/components/SmartAccountAddress/index.js +94 -0
  147. package/dist/components/SmartAccountAddress/index.js.map +1 -0
  148. package/dist/components/Text/index.js +4 -4
  149. package/dist/components/Tooltip/index.js +3 -3
  150. package/dist/components/TransactionAction/coreTransactionAction.js +23 -18
  151. package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
  152. package/dist/components/TransactionAction/evmTransactionAction.js +22 -17
  153. package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
  154. package/dist/components/TransactionTrace/TraceDetail.js +23 -23
  155. package/dist/components/TransactionTrace/TreeTraceTable.js +24 -24
  156. package/dist/components/TransactionTrace/index.js +24 -24
  157. package/dist/utils/address.js +2 -2
  158. package/dist/utils/contractManagerTool.js +2 -2
  159. package/dist/utils/hooks/useAddressLabel.js +3 -3
  160. package/dist/utils/hooks/useAddressNameMap.d.ts +7 -2
  161. package/dist/utils/hooks/useAddressNameMap.js +4 -2
  162. package/dist/utils/hooks/useAutoSetHolderFilterParams.js +2 -2
  163. package/dist/utils/hooks/useContractDetail.js +2 -2
  164. package/dist/utils/hooks/useDecodeFunctionData.js +5 -5
  165. package/dist/utils/hooks/useDecodeFunctionError.js +3 -3
  166. package/dist/utils/hooks/useENS.js +3 -3
  167. package/dist/utils/hooks/useEnhanceDataWithNameMap.d.ts +1 -4
  168. package/dist/utils/hooks/useEnhanceDataWithNameMap.js +3 -6
  169. package/dist/utils/hooks/useEnhanceDataWithNameMap.js.map +1 -1
  170. package/dist/utils/hooks/useMethodAbi.js +2 -2
  171. package/dist/utils/hooks/useTableData.js +1 -1
  172. package/dist/utils/hooks/useTxTrace.js +3 -3
  173. package/dist/utils/index.js +2 -2
  174. package/dist/utils/request.d.ts +1 -0
  175. package/dist/utils/request.js +1 -1
  176. package/package.json +17 -17
  177. package/dist/chunk-MUW5KBWU.js.map +0 -1
  178. package/dist/chunk-VGYNHJFT.js.map +0 -1
  179. /package/dist/{chunk-CMOP3BKX.js.map → chunk-225VMTCA.js.map} +0 -0
  180. /package/dist/{chunk-LCIBOT5P.js.map → chunk-3JIAKQ23.js.map} +0 -0
  181. /package/dist/{chunk-C7OIVXE3.js.map → chunk-4B7BV62E.js.map} +0 -0
  182. /package/dist/{chunk-S7M6UTND.js.map → chunk-4M53GHPD.js.map} +0 -0
  183. /package/dist/{chunk-GHHUAWSG.js.map → chunk-524EB4WC.js.map} +0 -0
  184. /package/dist/{chunk-XZL5CZFT.js.map → chunk-5MJZWIYI.js.map} +0 -0
  185. /package/dist/{chunk-H5ZJBRIK.js.map → chunk-6PKWA444.js.map} +0 -0
  186. /package/dist/{chunk-RUU22F7R.js.map → chunk-7VFOHX3W.js.map} +0 -0
  187. /package/dist/{chunk-BEI5TWJL.js.map → chunk-7WDLTRBN.js.map} +0 -0
  188. /package/dist/{chunk-AYCHKB2Y.js.map → chunk-A3IT7RYO.js.map} +0 -0
  189. /package/dist/{chunk-UF5BN4QN.js.map → chunk-A3VPSWVX.js.map} +0 -0
  190. /package/dist/{chunk-ELF2EOGF.js.map → chunk-AQFNXW4W.js.map} +0 -0
  191. /package/dist/{chunk-NM3BMITL.js.map → chunk-B5JCHBO3.js.map} +0 -0
  192. /package/dist/{chunk-DCQANK66.js.map → chunk-BGNBKP5R.js.map} +0 -0
  193. /package/dist/{chunk-6L4ZEJQI.js.map → chunk-BN3ATGHU.js.map} +0 -0
  194. /package/dist/{chunk-OT7NZ4PK.js.map → chunk-DASMAZXS.js.map} +0 -0
  195. /package/dist/{chunk-GPQN2P32.js.map → chunk-DO6PJAZB.js.map} +0 -0
  196. /package/dist/{chunk-BHAXBHVC.js.map → chunk-EHRGH3HS.js.map} +0 -0
  197. /package/dist/{chunk-UZALXR3J.js.map → chunk-FJMV3UA7.js.map} +0 -0
  198. /package/dist/{chunk-YVV32ON3.js.map → chunk-FSYB23NA.js.map} +0 -0
  199. /package/dist/{chunk-TC4445WV.js.map → chunk-FTAFV6RE.js.map} +0 -0
  200. /package/dist/{chunk-GQRCW7WX.js.map → chunk-J536GL5G.js.map} +0 -0
  201. /package/dist/{chunk-DYNSSHD5.js.map → chunk-J7UQ2R3H.js.map} +0 -0
  202. /package/dist/{chunk-YEAWH772.js.map → chunk-JBCKAHH7.js.map} +0 -0
  203. /package/dist/{chunk-7VQL3G7K.js.map → chunk-JKFT4JUY.js.map} +0 -0
  204. /package/dist/{chunk-W64AF7LA.js.map → chunk-MFCMTOYM.js.map} +0 -0
  205. /package/dist/{chunk-2WEBXRNL.js.map → chunk-OSPPP5W5.js.map} +0 -0
  206. /package/dist/{chunk-WZIT54AU.js.map → chunk-WY3RJ3A6.js.map} +0 -0
  207. /package/dist/{chunk-C6CGZ6KN.js.map → chunk-YOCMEOLX.js.map} +0 -0
  208. /package/dist/{chunk-7AVQOIDM.js.map → chunk-Z64Z5HLJ.js.map} +0 -0
@@ -0,0 +1,3616 @@
1
+ import {
2
+ _extends
3
+ } from "./chunk-NWVSTRCG.js";
4
+ import {
5
+ arrow,
6
+ autoUpdate,
7
+ computePosition,
8
+ flip,
9
+ hide,
10
+ limitShift,
11
+ offset,
12
+ shift,
13
+ size
14
+ } from "./chunk-LRCAKRPK.js";
15
+ import {
16
+ cn
17
+ } from "./chunk-SNUPCZY7.js";
18
+
19
+ // src/components/Select/select.tsx
20
+ import * as React9 from "react";
21
+
22
+ // ../../node_modules/.pnpm/@radix-ui+react-select@2.0.0_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.mjs
23
+ import { useState as $01b9c$useState, useRef as $01b9c$useRef, createElement as $01b9c$createElement, useCallback as $01b9c$useCallback, forwardRef as $01b9c$forwardRef, Fragment as $01b9c$Fragment, useEffect as $01b9c$useEffect, useMemo as $01b9c$useMemo } from "react";
24
+ import { createPortal as $01b9c$createPortal } from "react-dom";
25
+
26
+ // ../../node_modules/.pnpm/@radix-ui+number@1.0.1/node_modules/@radix-ui/number/dist/index.mjs
27
+ function $ae6933e535247d3d$export$7d15b64cf5a3a4c4(value, [min, max]) {
28
+ return Math.min(max, Math.max(min, value));
29
+ }
30
+
31
+ // ../../node_modules/.pnpm/@radix-ui+primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs
32
+ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
33
+ return function handleEvent(event) {
34
+ originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
35
+ if (checkForDefaultPrevented === false || !event.defaultPrevented)
36
+ return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
37
+ };
38
+ }
39
+
40
+ // ../../node_modules/.pnpm/@radix-ui+react-collection@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2_j7spzduairohywsflm43c32xhi/node_modules/@radix-ui/react-collection/dist/index.mjs
41
+ import $6vYhU$react from "react";
42
+
43
+ // ../../node_modules/.pnpm/@radix-ui+react-context@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs
44
+ import { createContext as $3bkAK$createContext, useMemo as $3bkAK$useMemo, createElement as $3bkAK$createElement, useContext as $3bkAK$useContext } from "react";
45
+ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
46
+ let defaultContexts = [];
47
+ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
48
+ const BaseContext = /* @__PURE__ */ $3bkAK$createContext(defaultContext);
49
+ const index2 = defaultContexts.length;
50
+ defaultContexts = [
51
+ ...defaultContexts,
52
+ defaultContext
53
+ ];
54
+ function Provider(props) {
55
+ const { scope, children, ...context } = props;
56
+ const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index2]) || BaseContext;
57
+ const value = $3bkAK$useMemo(
58
+ () => context,
59
+ Object.values(context)
60
+ );
61
+ return /* @__PURE__ */ $3bkAK$createElement(Context.Provider, {
62
+ value
63
+ }, children);
64
+ }
65
+ function useContext(consumerName, scope) {
66
+ const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index2]) || BaseContext;
67
+ const context = $3bkAK$useContext(Context);
68
+ if (context)
69
+ return context;
70
+ if (defaultContext !== void 0)
71
+ return defaultContext;
72
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
73
+ }
74
+ Provider.displayName = rootComponentName + "Provider";
75
+ return [
76
+ Provider,
77
+ useContext
78
+ ];
79
+ }
80
+ const createScope = () => {
81
+ const scopeContexts = defaultContexts.map((defaultContext) => {
82
+ return /* @__PURE__ */ $3bkAK$createContext(defaultContext);
83
+ });
84
+ return function useScope(scope) {
85
+ const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
86
+ return $3bkAK$useMemo(
87
+ () => ({
88
+ [`__scope${scopeName}`]: {
89
+ ...scope,
90
+ [scopeName]: contexts
91
+ }
92
+ }),
93
+ [
94
+ scope,
95
+ contexts
96
+ ]
97
+ );
98
+ };
99
+ };
100
+ createScope.scopeName = scopeName;
101
+ return [
102
+ $c512c27ab02ef895$export$fd42f52fd3ae1109,
103
+ $c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
104
+ ];
105
+ }
106
+ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
107
+ const baseScope = scopes[0];
108
+ if (scopes.length === 1)
109
+ return baseScope;
110
+ const createScope1 = () => {
111
+ const scopeHooks = scopes.map(
112
+ (createScope) => ({
113
+ useScope: createScope(),
114
+ scopeName: createScope.scopeName
115
+ })
116
+ );
117
+ return function useComposedScopes(overrideScopes) {
118
+ const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {
119
+ const scopeProps = useScope(overrideScopes);
120
+ const currentScope = scopeProps[`__scope${scopeName}`];
121
+ return {
122
+ ...nextScopes,
123
+ ...currentScope
124
+ };
125
+ }, {});
126
+ return $3bkAK$useMemo(
127
+ () => ({
128
+ [`__scope${baseScope.scopeName}`]: nextScopes1
129
+ }),
130
+ [
131
+ nextScopes1
132
+ ]
133
+ );
134
+ };
135
+ };
136
+ createScope1.scopeName = baseScope.scopeName;
137
+ return createScope1;
138
+ }
139
+
140
+ // ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
141
+ import { useCallback as $3vqmr$useCallback } from "react";
142
+ function $6ed0406888f73fc4$var$setRef(ref, value) {
143
+ if (typeof ref === "function")
144
+ ref(value);
145
+ else if (ref !== null && ref !== void 0)
146
+ ref.current = value;
147
+ }
148
+ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
149
+ return (node) => refs.forEach(
150
+ (ref) => $6ed0406888f73fc4$var$setRef(ref, node)
151
+ );
152
+ }
153
+ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
154
+ return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
155
+ }
156
+
157
+ // ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
158
+ import { forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment } from "react";
159
+ var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ $9IrjX$forwardRef((props, forwardedRef) => {
160
+ const { children, ...slotProps } = props;
161
+ const childrenArray = $9IrjX$Children.toArray(children);
162
+ const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
163
+ if (slottable) {
164
+ const newElement = slottable.props.children;
165
+ const newChildren = childrenArray.map((child) => {
166
+ if (child === slottable) {
167
+ if ($9IrjX$Children.count(newElement) > 1)
168
+ return $9IrjX$Children.only(null);
169
+ return /* @__PURE__ */ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;
170
+ } else
171
+ return child;
172
+ });
173
+ return /* @__PURE__ */ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
174
+ ref: forwardedRef
175
+ }), /* @__PURE__ */ $9IrjX$isValidElement(newElement) ? /* @__PURE__ */ $9IrjX$cloneElement(newElement, void 0, newChildren) : null);
176
+ }
177
+ return /* @__PURE__ */ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
178
+ ref: forwardedRef
179
+ }), children);
180
+ });
181
+ $5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
182
+ var $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ $9IrjX$forwardRef((props, forwardedRef) => {
183
+ const { children, ...slotProps } = props;
184
+ if (/* @__PURE__ */ $9IrjX$isValidElement(children))
185
+ return /* @__PURE__ */ $9IrjX$cloneElement(children, {
186
+ ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
187
+ ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
188
+ });
189
+ return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;
190
+ });
191
+ $5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
192
+ var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
193
+ return /* @__PURE__ */ $9IrjX$createElement($9IrjX$Fragment, null, children);
194
+ };
195
+ function $5e63c961fc1ce211$var$isSlottable(child) {
196
+ return /* @__PURE__ */ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
197
+ }
198
+ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
199
+ const overrideProps = {
200
+ ...childProps
201
+ };
202
+ for (const propName in childProps) {
203
+ const slotPropValue = slotProps[propName];
204
+ const childPropValue = childProps[propName];
205
+ const isHandler = /^on[A-Z]/.test(propName);
206
+ if (isHandler) {
207
+ if (slotPropValue && childPropValue)
208
+ overrideProps[propName] = (...args) => {
209
+ childPropValue(...args);
210
+ slotPropValue(...args);
211
+ };
212
+ else if (slotPropValue)
213
+ overrideProps[propName] = slotPropValue;
214
+ } else if (propName === "style")
215
+ overrideProps[propName] = {
216
+ ...slotPropValue,
217
+ ...childPropValue
218
+ };
219
+ else if (propName === "className")
220
+ overrideProps[propName] = [
221
+ slotPropValue,
222
+ childPropValue
223
+ ].filter(Boolean).join(" ");
224
+ }
225
+ return {
226
+ ...slotProps,
227
+ ...overrideProps
228
+ };
229
+ }
230
+
231
+ // ../../node_modules/.pnpm/@radix-ui+react-collection@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2_j7spzduairohywsflm43c32xhi/node_modules/@radix-ui/react-collection/dist/index.mjs
232
+ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
233
+ const PROVIDER_NAME = name + "CollectionProvider";
234
+ const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
235
+ const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
236
+ collectionRef: {
237
+ current: null
238
+ },
239
+ itemMap: /* @__PURE__ */ new Map()
240
+ });
241
+ const CollectionProvider = (props) => {
242
+ const { scope, children } = props;
243
+ const ref = $6vYhU$react.useRef(null);
244
+ const itemMap = $6vYhU$react.useRef(/* @__PURE__ */ new Map()).current;
245
+ return /* @__PURE__ */ $6vYhU$react.createElement(CollectionProviderImpl, {
246
+ scope,
247
+ itemMap,
248
+ collectionRef: ref
249
+ }, children);
250
+ };
251
+ /* @__PURE__ */ Object.assign(CollectionProvider, {
252
+ displayName: PROVIDER_NAME
253
+ });
254
+ const COLLECTION_SLOT_NAME = name + "CollectionSlot";
255
+ const CollectionSlot = /* @__PURE__ */ $6vYhU$react.forwardRef((props, forwardedRef) => {
256
+ const { scope, children } = props;
257
+ const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
258
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
259
+ return /* @__PURE__ */ $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
260
+ ref: composedRefs
261
+ }, children);
262
+ });
263
+ /* @__PURE__ */ Object.assign(CollectionSlot, {
264
+ displayName: COLLECTION_SLOT_NAME
265
+ });
266
+ const ITEM_SLOT_NAME = name + "CollectionItemSlot";
267
+ const ITEM_DATA_ATTR = "data-radix-collection-item";
268
+ const CollectionItemSlot = /* @__PURE__ */ $6vYhU$react.forwardRef((props, forwardedRef) => {
269
+ const { scope, children, ...itemData } = props;
270
+ const ref = $6vYhU$react.useRef(null);
271
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
272
+ const context = useCollectionContext(ITEM_SLOT_NAME, scope);
273
+ $6vYhU$react.useEffect(() => {
274
+ context.itemMap.set(ref, {
275
+ ref,
276
+ ...itemData
277
+ });
278
+ return () => void context.itemMap.delete(ref);
279
+ });
280
+ return /* @__PURE__ */ $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
281
+ [ITEM_DATA_ATTR]: "",
282
+ ref: composedRefs
283
+ }, children);
284
+ });
285
+ /* @__PURE__ */ Object.assign(CollectionItemSlot, {
286
+ displayName: ITEM_SLOT_NAME
287
+ });
288
+ function useCollection(scope) {
289
+ const context = useCollectionContext(name + "CollectionConsumer", scope);
290
+ const getItems = $6vYhU$react.useCallback(() => {
291
+ const collectionNode = context.collectionRef.current;
292
+ if (!collectionNode)
293
+ return [];
294
+ const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
295
+ const items = Array.from(context.itemMap.values());
296
+ const orderedItems = items.sort(
297
+ (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
298
+ );
299
+ return orderedItems;
300
+ }, [
301
+ context.collectionRef,
302
+ context.itemMap
303
+ ]);
304
+ return getItems;
305
+ }
306
+ return [
307
+ {
308
+ Provider: CollectionProvider,
309
+ Slot: CollectionSlot,
310
+ ItemSlot: CollectionItemSlot
311
+ },
312
+ useCollection,
313
+ createCollectionScope
314
+ ];
315
+ }
316
+
317
+ // ../../node_modules/.pnpm/@radix-ui+react-direction@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs
318
+ import { createContext as $7Gjcd$createContext, createElement as $7Gjcd$createElement, useContext as $7Gjcd$useContext } from "react";
319
+ var $f631663db3294ace$var$DirectionContext = /* @__PURE__ */ $7Gjcd$createContext(void 0);
320
+ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
321
+ const globalDir = $7Gjcd$useContext($f631663db3294ace$var$DirectionContext);
322
+ return localDir || globalDir || "ltr";
323
+ }
324
+
325
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.5_@types+react-dom@18.2.22_@types+react@18.2.67_react-d_eutoambuxax2hyuqgqqitkytki/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
326
+ import { createContext as $kqwpH$createContext, forwardRef as $kqwpH$forwardRef, useContext as $kqwpH$useContext, useState as $kqwpH$useState, useEffect as $kqwpH$useEffect, createElement as $kqwpH$createElement, useRef as $kqwpH$useRef } from "react";
327
+
328
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2._pcssahmctkg3uinjzyzzxugzuq/node_modules/@radix-ui/react-primitive/dist/index.mjs
329
+ import { forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement } from "react";
330
+ import { flushSync as $4q5Fq$flushSync } from "react-dom";
331
+ var $8927f6f2acc4f386$var$NODES = [
332
+ "a",
333
+ "button",
334
+ "div",
335
+ "form",
336
+ "h2",
337
+ "h3",
338
+ "img",
339
+ "input",
340
+ "label",
341
+ "li",
342
+ "nav",
343
+ "ol",
344
+ "p",
345
+ "span",
346
+ "svg",
347
+ "ul"
348
+ ];
349
+ var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node) => {
350
+ const Node = /* @__PURE__ */ $4q5Fq$forwardRef((props, forwardedRef) => {
351
+ const { asChild, ...primitiveProps } = props;
352
+ const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
353
+ $4q5Fq$useEffect(() => {
354
+ window[Symbol.for("radix-ui")] = true;
355
+ }, []);
356
+ return /* @__PURE__ */ $4q5Fq$createElement(Comp, _extends({}, primitiveProps, {
357
+ ref: forwardedRef
358
+ }));
359
+ });
360
+ Node.displayName = `Primitive.${node}`;
361
+ return {
362
+ ...primitive,
363
+ [node]: Node
364
+ };
365
+ }, {});
366
+ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
367
+ if (target)
368
+ $4q5Fq$flushSync(
369
+ () => target.dispatchEvent(event)
370
+ );
371
+ }
372
+
373
+ // ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
374
+ import { useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo } from "react";
375
+ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
376
+ const callbackRef = $lwiWj$useRef(callback);
377
+ $lwiWj$useEffect(() => {
378
+ callbackRef.current = callback;
379
+ });
380
+ return $lwiWj$useMemo(
381
+ () => (...args) => {
382
+ var _callbackRef$current;
383
+ return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
384
+ },
385
+ []
386
+ );
387
+ }
388
+
389
+ // ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.0.3_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
390
+ import { useEffect as $hPSQ5$useEffect } from "react";
391
+ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
392
+ const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
393
+ $hPSQ5$useEffect(() => {
394
+ const handleKeyDown = (event) => {
395
+ if (event.key === "Escape")
396
+ onEscapeKeyDown(event);
397
+ };
398
+ ownerDocument.addEventListener("keydown", handleKeyDown);
399
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown);
400
+ }, [
401
+ onEscapeKeyDown,
402
+ ownerDocument
403
+ ]);
404
+ }
405
+
406
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.5_@types+react-dom@18.2.22_@types+react@18.2.67_react-d_eutoambuxax2hyuqgqqitkytki/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
407
+ var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
408
+ var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
409
+ var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
410
+ var $5cb92bef7577960e$var$originalBodyPointerEvents;
411
+ var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ $kqwpH$createContext({
412
+ layers: /* @__PURE__ */ new Set(),
413
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
414
+ branches: /* @__PURE__ */ new Set()
415
+ });
416
+ var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ $kqwpH$forwardRef((props, forwardedRef) => {
417
+ var _node$ownerDocument;
418
+ const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
419
+ const context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);
420
+ const [node1, setNode] = $kqwpH$useState(null);
421
+ const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
422
+ const [, force] = $kqwpH$useState({});
423
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
424
+ forwardedRef,
425
+ (node) => setNode(node)
426
+ );
427
+ const layers = Array.from(context.layers);
428
+ const [highestLayerWithOutsidePointerEventsDisabled] = [
429
+ ...context.layersWithOutsidePointerEventsDisabled
430
+ ].slice(-1);
431
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
432
+ const index2 = node1 ? layers.indexOf(node1) : -1;
433
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
434
+ const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
435
+ const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event) => {
436
+ const target = event.target;
437
+ const isPointerDownOnBranch = [
438
+ ...context.branches
439
+ ].some(
440
+ (branch) => branch.contains(target)
441
+ );
442
+ if (!isPointerEventsEnabled || isPointerDownOnBranch)
443
+ return;
444
+ onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
445
+ onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
446
+ if (!event.defaultPrevented)
447
+ onDismiss === null || onDismiss === void 0 || onDismiss();
448
+ }, ownerDocument);
449
+ const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event) => {
450
+ const target = event.target;
451
+ const isFocusInBranch = [
452
+ ...context.branches
453
+ ].some(
454
+ (branch) => branch.contains(target)
455
+ );
456
+ if (isFocusInBranch)
457
+ return;
458
+ onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
459
+ onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
460
+ if (!event.defaultPrevented)
461
+ onDismiss === null || onDismiss === void 0 || onDismiss();
462
+ }, ownerDocument);
463
+ $addc16e1bbe58fd0$export$3a72a57244d6e765((event) => {
464
+ const isHighestLayer = index2 === context.layers.size - 1;
465
+ if (!isHighestLayer)
466
+ return;
467
+ onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
468
+ if (!event.defaultPrevented && onDismiss) {
469
+ event.preventDefault();
470
+ onDismiss();
471
+ }
472
+ }, ownerDocument);
473
+ $kqwpH$useEffect(() => {
474
+ if (!node1)
475
+ return;
476
+ if (disableOutsidePointerEvents) {
477
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
478
+ $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
479
+ ownerDocument.body.style.pointerEvents = "none";
480
+ }
481
+ context.layersWithOutsidePointerEventsDisabled.add(node1);
482
+ }
483
+ context.layers.add(node1);
484
+ $5cb92bef7577960e$var$dispatchUpdate();
485
+ return () => {
486
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1)
487
+ ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
488
+ };
489
+ }, [
490
+ node1,
491
+ ownerDocument,
492
+ disableOutsidePointerEvents,
493
+ context
494
+ ]);
495
+ $kqwpH$useEffect(() => {
496
+ return () => {
497
+ if (!node1)
498
+ return;
499
+ context.layers.delete(node1);
500
+ context.layersWithOutsidePointerEventsDisabled.delete(node1);
501
+ $5cb92bef7577960e$var$dispatchUpdate();
502
+ };
503
+ }, [
504
+ node1,
505
+ context
506
+ ]);
507
+ $kqwpH$useEffect(() => {
508
+ const handleUpdate = () => force({});
509
+ document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
510
+ return () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
511
+ }, []);
512
+ return /* @__PURE__ */ $kqwpH$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
513
+ ref: composedRefs,
514
+ style: {
515
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
516
+ ...props.style
517
+ },
518
+ onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
519
+ onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
520
+ onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
521
+ }));
522
+ });
523
+ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
524
+ const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
525
+ const isPointerInsideReactTreeRef = $kqwpH$useRef(false);
526
+ const handleClickRef = $kqwpH$useRef(() => {
527
+ });
528
+ $kqwpH$useEffect(() => {
529
+ const handlePointerDown = (event) => {
530
+ if (event.target && !isPointerInsideReactTreeRef.current) {
531
+ let handleAndDispatchPointerDownOutsideEvent = function() {
532
+ $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
533
+ discrete: true
534
+ });
535
+ };
536
+ const eventDetail = {
537
+ originalEvent: event
538
+ };
539
+ if (event.pointerType === "touch") {
540
+ ownerDocument.removeEventListener("click", handleClickRef.current);
541
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
542
+ ownerDocument.addEventListener("click", handleClickRef.current, {
543
+ once: true
544
+ });
545
+ } else
546
+ handleAndDispatchPointerDownOutsideEvent();
547
+ } else
548
+ ownerDocument.removeEventListener("click", handleClickRef.current);
549
+ isPointerInsideReactTreeRef.current = false;
550
+ };
551
+ const timerId = window.setTimeout(() => {
552
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
553
+ }, 0);
554
+ return () => {
555
+ window.clearTimeout(timerId);
556
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
557
+ ownerDocument.removeEventListener("click", handleClickRef.current);
558
+ };
559
+ }, [
560
+ ownerDocument,
561
+ handlePointerDownOutside
562
+ ]);
563
+ return {
564
+ // ensures we check React component tree (not just DOM tree)
565
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
566
+ };
567
+ }
568
+ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
569
+ const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
570
+ const isFocusInsideReactTreeRef = $kqwpH$useRef(false);
571
+ $kqwpH$useEffect(() => {
572
+ const handleFocus = (event) => {
573
+ if (event.target && !isFocusInsideReactTreeRef.current) {
574
+ const eventDetail = {
575
+ originalEvent: event
576
+ };
577
+ $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
578
+ discrete: false
579
+ });
580
+ }
581
+ };
582
+ ownerDocument.addEventListener("focusin", handleFocus);
583
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
584
+ }, [
585
+ ownerDocument,
586
+ handleFocusOutside
587
+ ]);
588
+ return {
589
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
590
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
591
+ };
592
+ }
593
+ function $5cb92bef7577960e$var$dispatchUpdate() {
594
+ const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
595
+ document.dispatchEvent(event);
596
+ }
597
+ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
598
+ const target = detail.originalEvent.target;
599
+ const event = new CustomEvent(name, {
600
+ bubbles: false,
601
+ cancelable: true,
602
+ detail
603
+ });
604
+ if (handler)
605
+ target.addEventListener(name, handler, {
606
+ once: true
607
+ });
608
+ if (discrete)
609
+ $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
610
+ else
611
+ target.dispatchEvent(event);
612
+ }
613
+
614
+ // ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
615
+ import { useEffect as $1wErz$useEffect } from "react";
616
+ var $3db38b7d1fb3fe6a$var$count = 0;
617
+ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
618
+ $1wErz$useEffect(() => {
619
+ var _edgeGuards$, _edgeGuards$2;
620
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
621
+ document.body.insertAdjacentElement("afterbegin", (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
622
+ document.body.insertAdjacentElement("beforeend", (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
623
+ $3db38b7d1fb3fe6a$var$count++;
624
+ return () => {
625
+ if ($3db38b7d1fb3fe6a$var$count === 1)
626
+ document.querySelectorAll("[data-radix-focus-guard]").forEach(
627
+ (node) => node.remove()
628
+ );
629
+ $3db38b7d1fb3fe6a$var$count--;
630
+ };
631
+ }, []);
632
+ }
633
+ function $3db38b7d1fb3fe6a$var$createFocusGuard() {
634
+ const element = document.createElement("span");
635
+ element.setAttribute("data-radix-focus-guard", "");
636
+ element.tabIndex = 0;
637
+ element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
638
+ return element;
639
+ }
640
+
641
+ // ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.0.4_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18._w4zudsi4g6vfciwftrylaqpdnm/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
642
+ import { forwardRef as $45QHv$forwardRef, useState as $45QHv$useState, useRef as $45QHv$useRef, useEffect as $45QHv$useEffect, useCallback as $45QHv$useCallback, createElement as $45QHv$createElement } from "react";
643
+ var $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
644
+ var $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
645
+ var $d3863c46a17e8a28$var$EVENT_OPTIONS = {
646
+ bubbles: false,
647
+ cancelable: true
648
+ };
649
+ var $d3863c46a17e8a28$export$20e40289641fbbb6 = /* @__PURE__ */ $45QHv$forwardRef((props, forwardedRef) => {
650
+ const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
651
+ const [container1, setContainer] = $45QHv$useState(null);
652
+ const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
653
+ const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
654
+ const lastFocusedElementRef = $45QHv$useRef(null);
655
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
656
+ forwardedRef,
657
+ (node) => setContainer(node)
658
+ );
659
+ const focusScope = $45QHv$useRef({
660
+ paused: false,
661
+ pause() {
662
+ this.paused = true;
663
+ },
664
+ resume() {
665
+ this.paused = false;
666
+ }
667
+ }).current;
668
+ $45QHv$useEffect(() => {
669
+ if (trapped) {
670
+ let handleFocusIn = function(event) {
671
+ if (focusScope.paused || !container1)
672
+ return;
673
+ const target = event.target;
674
+ if (container1.contains(target))
675
+ lastFocusedElementRef.current = target;
676
+ else
677
+ $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
678
+ select: true
679
+ });
680
+ }, handleFocusOut = function(event) {
681
+ if (focusScope.paused || !container1)
682
+ return;
683
+ const relatedTarget = event.relatedTarget;
684
+ if (relatedTarget === null)
685
+ return;
686
+ if (!container1.contains(relatedTarget))
687
+ $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
688
+ select: true
689
+ });
690
+ }, handleMutations = function(mutations) {
691
+ const focusedElement = document.activeElement;
692
+ if (focusedElement !== document.body)
693
+ return;
694
+ for (const mutation of mutations)
695
+ if (mutation.removedNodes.length > 0)
696
+ $d3863c46a17e8a28$var$focus(container1);
697
+ };
698
+ document.addEventListener("focusin", handleFocusIn);
699
+ document.addEventListener("focusout", handleFocusOut);
700
+ const mutationObserver = new MutationObserver(handleMutations);
701
+ if (container1)
702
+ mutationObserver.observe(container1, {
703
+ childList: true,
704
+ subtree: true
705
+ });
706
+ return () => {
707
+ document.removeEventListener("focusin", handleFocusIn);
708
+ document.removeEventListener("focusout", handleFocusOut);
709
+ mutationObserver.disconnect();
710
+ };
711
+ }
712
+ }, [
713
+ trapped,
714
+ container1,
715
+ focusScope.paused
716
+ ]);
717
+ $45QHv$useEffect(() => {
718
+ if (container1) {
719
+ $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
720
+ const previouslyFocusedElement = document.activeElement;
721
+ const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
722
+ if (!hasFocusedCandidate) {
723
+ const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
724
+ container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
725
+ container1.dispatchEvent(mountEvent);
726
+ if (!mountEvent.defaultPrevented) {
727
+ $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
728
+ select: true
729
+ });
730
+ if (document.activeElement === previouslyFocusedElement)
731
+ $d3863c46a17e8a28$var$focus(container1);
732
+ }
733
+ }
734
+ return () => {
735
+ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
736
+ setTimeout(() => {
737
+ const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
738
+ container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
739
+ container1.dispatchEvent(unmountEvent);
740
+ if (!unmountEvent.defaultPrevented)
741
+ $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
742
+ select: true
743
+ });
744
+ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
745
+ $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
746
+ }, 0);
747
+ };
748
+ }
749
+ }, [
750
+ container1,
751
+ onMountAutoFocus,
752
+ onUnmountAutoFocus,
753
+ focusScope
754
+ ]);
755
+ const handleKeyDown = $45QHv$useCallback((event) => {
756
+ if (!loop && !trapped)
757
+ return;
758
+ if (focusScope.paused)
759
+ return;
760
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
761
+ const focusedElement = document.activeElement;
762
+ if (isTabKey && focusedElement) {
763
+ const container = event.currentTarget;
764
+ const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
765
+ const hasTabbableElementsInside = first && last;
766
+ if (!hasTabbableElementsInside) {
767
+ if (focusedElement === container)
768
+ event.preventDefault();
769
+ } else {
770
+ if (!event.shiftKey && focusedElement === last) {
771
+ event.preventDefault();
772
+ if (loop)
773
+ $d3863c46a17e8a28$var$focus(first, {
774
+ select: true
775
+ });
776
+ } else if (event.shiftKey && focusedElement === first) {
777
+ event.preventDefault();
778
+ if (loop)
779
+ $d3863c46a17e8a28$var$focus(last, {
780
+ select: true
781
+ });
782
+ }
783
+ }
784
+ }
785
+ }, [
786
+ loop,
787
+ trapped,
788
+ focusScope.paused
789
+ ]);
790
+ return /* @__PURE__ */ $45QHv$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
791
+ tabIndex: -1
792
+ }, scopeProps, {
793
+ ref: composedRefs,
794
+ onKeyDown: handleKeyDown
795
+ }));
796
+ });
797
+ function $d3863c46a17e8a28$var$focusFirst(candidates, { select = false } = {}) {
798
+ const previouslyFocusedElement = document.activeElement;
799
+ for (const candidate of candidates) {
800
+ $d3863c46a17e8a28$var$focus(candidate, {
801
+ select
802
+ });
803
+ if (document.activeElement !== previouslyFocusedElement)
804
+ return;
805
+ }
806
+ }
807
+ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
808
+ const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
809
+ const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
810
+ const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
811
+ return [
812
+ first,
813
+ last
814
+ ];
815
+ }
816
+ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
817
+ const nodes = [];
818
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
819
+ acceptNode: (node) => {
820
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
821
+ if (node.disabled || node.hidden || isHiddenInput)
822
+ return NodeFilter.FILTER_SKIP;
823
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
824
+ }
825
+ });
826
+ while (walker.nextNode())
827
+ nodes.push(walker.currentNode);
828
+ return nodes;
829
+ }
830
+ function $d3863c46a17e8a28$var$findVisible(elements, container) {
831
+ for (const element of elements) {
832
+ if (!$d3863c46a17e8a28$var$isHidden(element, {
833
+ upTo: container
834
+ }))
835
+ return element;
836
+ }
837
+ }
838
+ function $d3863c46a17e8a28$var$isHidden(node, { upTo }) {
839
+ if (getComputedStyle(node).visibility === "hidden")
840
+ return true;
841
+ while (node) {
842
+ if (upTo !== void 0 && node === upTo)
843
+ return false;
844
+ if (getComputedStyle(node).display === "none")
845
+ return true;
846
+ node = node.parentElement;
847
+ }
848
+ return false;
849
+ }
850
+ function $d3863c46a17e8a28$var$isSelectableInput(element) {
851
+ return element instanceof HTMLInputElement && "select" in element;
852
+ }
853
+ function $d3863c46a17e8a28$var$focus(element, { select = false } = {}) {
854
+ if (element && element.focus) {
855
+ const previouslyFocusedElement = document.activeElement;
856
+ element.focus({
857
+ preventScroll: true
858
+ });
859
+ if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select)
860
+ element.select();
861
+ }
862
+ }
863
+ var $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
864
+ function $d3863c46a17e8a28$var$createFocusScopesStack() {
865
+ let stack = [];
866
+ return {
867
+ add(focusScope) {
868
+ const activeFocusScope = stack[0];
869
+ if (focusScope !== activeFocusScope)
870
+ activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
871
+ stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
872
+ stack.unshift(focusScope);
873
+ },
874
+ remove(focusScope) {
875
+ var _stack$;
876
+ stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
877
+ (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
878
+ }
879
+ };
880
+ }
881
+ function $d3863c46a17e8a28$var$arrayRemove(array, item) {
882
+ const updatedArray = [
883
+ ...array
884
+ ];
885
+ const index2 = updatedArray.indexOf(item);
886
+ if (index2 !== -1)
887
+ updatedArray.splice(index2, 1);
888
+ return updatedArray;
889
+ }
890
+ function $d3863c46a17e8a28$var$removeLinks(items) {
891
+ return items.filter(
892
+ (item) => item.tagName !== "A"
893
+ );
894
+ }
895
+
896
+ // ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
897
+ import * as $2AODx$react from "react";
898
+
899
+ // ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
900
+ import { useLayoutEffect as $dxlwH$useLayoutEffect } from "react";
901
+ var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? $dxlwH$useLayoutEffect : () => {
902
+ };
903
+
904
+ // ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
905
+ var $1746a345f3d73bb7$var$useReactId = $2AODx$react["useId".toString()] || (() => void 0);
906
+ var $1746a345f3d73bb7$var$count = 0;
907
+ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
908
+ const [id, setId] = $2AODx$react.useState($1746a345f3d73bb7$var$useReactId());
909
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
910
+ if (!deterministicId)
911
+ setId(
912
+ (reactId) => reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
913
+ );
914
+ }, [
915
+ deterministicId
916
+ ]);
917
+ return deterministicId || (id ? `radix-${id}` : "");
918
+ }
919
+
920
+ // ../../node_modules/.pnpm/@radix-ui+react-popper@1.1.3_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popper/dist/index.mjs
921
+ import { useState as $kY93V$useState, createElement as $kY93V$createElement, forwardRef as $kY93V$forwardRef, useRef as $kY93V$useRef, useEffect as $kY93V$useEffect } from "react";
922
+
923
+ // ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.0_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
924
+ import * as React from "react";
925
+ import { useLayoutEffect, useEffect } from "react";
926
+ import * as ReactDOM from "react-dom";
927
+ var index = typeof document !== "undefined" ? useLayoutEffect : useEffect;
928
+ function deepEqual(a, b) {
929
+ if (a === b) {
930
+ return true;
931
+ }
932
+ if (typeof a !== typeof b) {
933
+ return false;
934
+ }
935
+ if (typeof a === "function" && a.toString() === b.toString()) {
936
+ return true;
937
+ }
938
+ let length;
939
+ let i;
940
+ let keys;
941
+ if (a && b && typeof a === "object") {
942
+ if (Array.isArray(a)) {
943
+ length = a.length;
944
+ if (length !== b.length)
945
+ return false;
946
+ for (i = length; i-- !== 0; ) {
947
+ if (!deepEqual(a[i], b[i])) {
948
+ return false;
949
+ }
950
+ }
951
+ return true;
952
+ }
953
+ keys = Object.keys(a);
954
+ length = keys.length;
955
+ if (length !== Object.keys(b).length) {
956
+ return false;
957
+ }
958
+ for (i = length; i-- !== 0; ) {
959
+ if (!{}.hasOwnProperty.call(b, keys[i])) {
960
+ return false;
961
+ }
962
+ }
963
+ for (i = length; i-- !== 0; ) {
964
+ const key = keys[i];
965
+ if (key === "_owner" && a.$$typeof) {
966
+ continue;
967
+ }
968
+ if (!deepEqual(a[key], b[key])) {
969
+ return false;
970
+ }
971
+ }
972
+ return true;
973
+ }
974
+ return a !== a && b !== b;
975
+ }
976
+ function getDPR(element) {
977
+ if (typeof window === "undefined") {
978
+ return 1;
979
+ }
980
+ const win = element.ownerDocument.defaultView || window;
981
+ return win.devicePixelRatio || 1;
982
+ }
983
+ function roundByDPR(element, value) {
984
+ const dpr = getDPR(element);
985
+ return Math.round(value * dpr) / dpr;
986
+ }
987
+ function useLatestRef(value) {
988
+ const ref = React.useRef(value);
989
+ index(() => {
990
+ ref.current = value;
991
+ });
992
+ return ref;
993
+ }
994
+ function useFloating(options) {
995
+ if (options === void 0) {
996
+ options = {};
997
+ }
998
+ const {
999
+ placement = "bottom",
1000
+ strategy = "absolute",
1001
+ middleware = [],
1002
+ platform: platform2,
1003
+ elements: {
1004
+ reference: externalReference,
1005
+ floating: externalFloating
1006
+ } = {},
1007
+ transform = true,
1008
+ whileElementsMounted,
1009
+ open
1010
+ } = options;
1011
+ const [data, setData] = React.useState({
1012
+ x: 0,
1013
+ y: 0,
1014
+ strategy,
1015
+ placement,
1016
+ middlewareData: {},
1017
+ isPositioned: false
1018
+ });
1019
+ const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
1020
+ if (!deepEqual(latestMiddleware, middleware)) {
1021
+ setLatestMiddleware(middleware);
1022
+ }
1023
+ const [_reference, _setReference] = React.useState(null);
1024
+ const [_floating, _setFloating] = React.useState(null);
1025
+ const setReference = React.useCallback((node) => {
1026
+ if (node !== referenceRef.current) {
1027
+ referenceRef.current = node;
1028
+ _setReference(node);
1029
+ }
1030
+ }, []);
1031
+ const setFloating = React.useCallback((node) => {
1032
+ if (node !== floatingRef.current) {
1033
+ floatingRef.current = node;
1034
+ _setFloating(node);
1035
+ }
1036
+ }, []);
1037
+ const referenceEl = externalReference || _reference;
1038
+ const floatingEl = externalFloating || _floating;
1039
+ const referenceRef = React.useRef(null);
1040
+ const floatingRef = React.useRef(null);
1041
+ const dataRef = React.useRef(data);
1042
+ const hasWhileElementsMounted = whileElementsMounted != null;
1043
+ const whileElementsMountedRef = useLatestRef(whileElementsMounted);
1044
+ const platformRef = useLatestRef(platform2);
1045
+ const update = React.useCallback(() => {
1046
+ if (!referenceRef.current || !floatingRef.current) {
1047
+ return;
1048
+ }
1049
+ const config = {
1050
+ placement,
1051
+ strategy,
1052
+ middleware: latestMiddleware
1053
+ };
1054
+ if (platformRef.current) {
1055
+ config.platform = platformRef.current;
1056
+ }
1057
+ computePosition(referenceRef.current, floatingRef.current, config).then((data2) => {
1058
+ const fullData = {
1059
+ ...data2,
1060
+ isPositioned: true
1061
+ };
1062
+ if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
1063
+ dataRef.current = fullData;
1064
+ ReactDOM.flushSync(() => {
1065
+ setData(fullData);
1066
+ });
1067
+ }
1068
+ });
1069
+ }, [latestMiddleware, placement, strategy, platformRef]);
1070
+ index(() => {
1071
+ if (open === false && dataRef.current.isPositioned) {
1072
+ dataRef.current.isPositioned = false;
1073
+ setData((data2) => ({
1074
+ ...data2,
1075
+ isPositioned: false
1076
+ }));
1077
+ }
1078
+ }, [open]);
1079
+ const isMountedRef = React.useRef(false);
1080
+ index(() => {
1081
+ isMountedRef.current = true;
1082
+ return () => {
1083
+ isMountedRef.current = false;
1084
+ };
1085
+ }, []);
1086
+ index(() => {
1087
+ if (referenceEl)
1088
+ referenceRef.current = referenceEl;
1089
+ if (floatingEl)
1090
+ floatingRef.current = floatingEl;
1091
+ if (referenceEl && floatingEl) {
1092
+ if (whileElementsMountedRef.current) {
1093
+ return whileElementsMountedRef.current(referenceEl, floatingEl, update);
1094
+ }
1095
+ update();
1096
+ }
1097
+ }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
1098
+ const refs = React.useMemo(() => ({
1099
+ reference: referenceRef,
1100
+ floating: floatingRef,
1101
+ setReference,
1102
+ setFloating
1103
+ }), [setReference, setFloating]);
1104
+ const elements = React.useMemo(() => ({
1105
+ reference: referenceEl,
1106
+ floating: floatingEl
1107
+ }), [referenceEl, floatingEl]);
1108
+ const floatingStyles = React.useMemo(() => {
1109
+ const initialStyles = {
1110
+ position: strategy,
1111
+ left: 0,
1112
+ top: 0
1113
+ };
1114
+ if (!elements.floating) {
1115
+ return initialStyles;
1116
+ }
1117
+ const x = roundByDPR(elements.floating, data.x);
1118
+ const y = roundByDPR(elements.floating, data.y);
1119
+ if (transform) {
1120
+ return {
1121
+ ...initialStyles,
1122
+ transform: "translate(" + x + "px, " + y + "px)",
1123
+ ...getDPR(elements.floating) >= 1.5 && {
1124
+ willChange: "transform"
1125
+ }
1126
+ };
1127
+ }
1128
+ return {
1129
+ position: strategy,
1130
+ left: x,
1131
+ top: y
1132
+ };
1133
+ }, [strategy, transform, elements.floating, data.x, data.y]);
1134
+ return React.useMemo(() => ({
1135
+ ...data,
1136
+ update,
1137
+ refs,
1138
+ elements,
1139
+ floatingStyles
1140
+ }), [data, update, refs, elements, floatingStyles]);
1141
+ }
1142
+ var arrow$1 = (options) => {
1143
+ function isRef(value) {
1144
+ return {}.hasOwnProperty.call(value, "current");
1145
+ }
1146
+ return {
1147
+ name: "arrow",
1148
+ options,
1149
+ fn(state) {
1150
+ const {
1151
+ element,
1152
+ padding
1153
+ } = typeof options === "function" ? options(state) : options;
1154
+ if (element && isRef(element)) {
1155
+ if (element.current != null) {
1156
+ return arrow({
1157
+ element: element.current,
1158
+ padding
1159
+ }).fn(state);
1160
+ }
1161
+ return {};
1162
+ }
1163
+ if (element) {
1164
+ return arrow({
1165
+ element,
1166
+ padding
1167
+ }).fn(state);
1168
+ }
1169
+ return {};
1170
+ }
1171
+ };
1172
+ };
1173
+ var offset2 = (options, deps) => ({
1174
+ ...offset(options),
1175
+ options: [options, deps]
1176
+ });
1177
+ var shift2 = (options, deps) => ({
1178
+ ...shift(options),
1179
+ options: [options, deps]
1180
+ });
1181
+ var limitShift2 = (options, deps) => ({
1182
+ ...limitShift(options),
1183
+ options: [options, deps]
1184
+ });
1185
+ var flip2 = (options, deps) => ({
1186
+ ...flip(options),
1187
+ options: [options, deps]
1188
+ });
1189
+ var size2 = (options, deps) => ({
1190
+ ...size(options),
1191
+ options: [options, deps]
1192
+ });
1193
+ var hide2 = (options, deps) => ({
1194
+ ...hide(options),
1195
+ options: [options, deps]
1196
+ });
1197
+ var arrow2 = (options, deps) => ({
1198
+ ...arrow$1(options),
1199
+ options: [options, deps]
1200
+ });
1201
+
1202
+ // ../../node_modules/.pnpm/@radix-ui+react-use-size@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs
1203
+ import { useState as $9gyGR$useState } from "react";
1204
+ function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
1205
+ const [size3, setSize] = $9gyGR$useState(void 0);
1206
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
1207
+ if (element) {
1208
+ setSize({
1209
+ width: element.offsetWidth,
1210
+ height: element.offsetHeight
1211
+ });
1212
+ const resizeObserver = new ResizeObserver((entries) => {
1213
+ if (!Array.isArray(entries))
1214
+ return;
1215
+ if (!entries.length)
1216
+ return;
1217
+ const entry = entries[0];
1218
+ let width;
1219
+ let height;
1220
+ if ("borderBoxSize" in entry) {
1221
+ const borderSizeEntry = entry["borderBoxSize"];
1222
+ const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
1223
+ width = borderSize["inlineSize"];
1224
+ height = borderSize["blockSize"];
1225
+ } else {
1226
+ width = element.offsetWidth;
1227
+ height = element.offsetHeight;
1228
+ }
1229
+ setSize({
1230
+ width,
1231
+ height
1232
+ });
1233
+ });
1234
+ resizeObserver.observe(element, {
1235
+ box: "border-box"
1236
+ });
1237
+ return () => resizeObserver.unobserve(element);
1238
+ } else
1239
+ setSize(void 0);
1240
+ }, [
1241
+ element
1242
+ ]);
1243
+ return size3;
1244
+ }
1245
+
1246
+ // ../../node_modules/.pnpm/@radix-ui+react-popper@1.1.3_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popper/dist/index.mjs
1247
+ var $cf1ac5d9fe0e8206$var$POPPER_NAME = "Popper";
1248
+ var [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME);
1249
+ var [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME);
1250
+ var $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props) => {
1251
+ const { __scopePopper, children } = props;
1252
+ const [anchor, setAnchor] = $kY93V$useState(null);
1253
+ return /* @__PURE__ */ $kY93V$createElement($cf1ac5d9fe0e8206$var$PopperProvider, {
1254
+ scope: __scopePopper,
1255
+ anchor,
1256
+ onAnchorChange: setAnchor
1257
+ }, children);
1258
+ };
1259
+ var $cf1ac5d9fe0e8206$var$ANCHOR_NAME = "PopperAnchor";
1260
+ var $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /* @__PURE__ */ $kY93V$forwardRef((props, forwardedRef) => {
1261
+ const { __scopePopper, virtualRef, ...anchorProps } = props;
1262
+ const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, __scopePopper);
1263
+ const ref = $kY93V$useRef(null);
1264
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
1265
+ $kY93V$useEffect(() => {
1266
+ context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
1267
+ });
1268
+ return virtualRef ? null : /* @__PURE__ */ $kY93V$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, anchorProps, {
1269
+ ref: composedRefs
1270
+ }));
1271
+ });
1272
+ var $cf1ac5d9fe0e8206$var$CONTENT_NAME = "PopperContent";
1273
+ var [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME);
1274
+ var $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /* @__PURE__ */ $kY93V$forwardRef((props, forwardedRef) => {
1275
+ var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;
1276
+ const { __scopePopper, side = "bottom", sideOffset = 0, align = "center", alignOffset = 0, arrowPadding = 0, avoidCollisions = true, collisionBoundary = [], collisionPadding: collisionPaddingProp = 0, sticky = "partial", hideWhenDetached = false, updatePositionStrategy = "optimized", onPlaced, ...contentProps } = props;
1277
+ const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);
1278
+ const [content, setContent] = $kY93V$useState(null);
1279
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
1280
+ forwardedRef,
1281
+ (node) => setContent(node)
1282
+ );
1283
+ const [arrow3, setArrow] = $kY93V$useState(null);
1284
+ const arrowSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(arrow3);
1285
+ const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
1286
+ const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
1287
+ const desiredPlacement = side + (align !== "center" ? "-" + align : "");
1288
+ const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : {
1289
+ top: 0,
1290
+ right: 0,
1291
+ bottom: 0,
1292
+ left: 0,
1293
+ ...collisionPaddingProp
1294
+ };
1295
+ const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [
1296
+ collisionBoundary
1297
+ ];
1298
+ const hasExplicitBoundaries = boundary.length > 0;
1299
+ const detectOverflowOptions = {
1300
+ padding: collisionPadding,
1301
+ boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull),
1302
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1303
+ altBoundary: hasExplicitBoundaries
1304
+ };
1305
+ const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
1306
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1307
+ strategy: "fixed",
1308
+ placement: desiredPlacement,
1309
+ whileElementsMounted: (...args) => {
1310
+ const cleanup = autoUpdate(...args, {
1311
+ animationFrame: updatePositionStrategy === "always"
1312
+ });
1313
+ return cleanup;
1314
+ },
1315
+ elements: {
1316
+ reference: context.anchor
1317
+ },
1318
+ middleware: [
1319
+ offset2({
1320
+ mainAxis: sideOffset + arrowHeight,
1321
+ alignmentAxis: alignOffset
1322
+ }),
1323
+ avoidCollisions && shift2({
1324
+ mainAxis: true,
1325
+ crossAxis: false,
1326
+ limiter: sticky === "partial" ? limitShift2() : void 0,
1327
+ ...detectOverflowOptions
1328
+ }),
1329
+ avoidCollisions && flip2({
1330
+ ...detectOverflowOptions
1331
+ }),
1332
+ size2({
1333
+ ...detectOverflowOptions,
1334
+ apply: ({ elements, rects, availableWidth, availableHeight }) => {
1335
+ const { width: anchorWidth, height: anchorHeight } = rects.reference;
1336
+ const contentStyle = elements.floating.style;
1337
+ contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
1338
+ contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
1339
+ contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
1340
+ contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
1341
+ }
1342
+ }),
1343
+ arrow3 && arrow2({
1344
+ element: arrow3,
1345
+ padding: arrowPadding
1346
+ }),
1347
+ $cf1ac5d9fe0e8206$var$transformOrigin({
1348
+ arrowWidth,
1349
+ arrowHeight
1350
+ }),
1351
+ hideWhenDetached && hide2({
1352
+ strategy: "referenceHidden",
1353
+ ...detectOverflowOptions
1354
+ })
1355
+ ]
1356
+ });
1357
+ const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
1358
+ const handlePlaced = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPlaced);
1359
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
1360
+ if (isPositioned)
1361
+ handlePlaced === null || handlePlaced === void 0 || handlePlaced();
1362
+ }, [
1363
+ isPositioned,
1364
+ handlePlaced
1365
+ ]);
1366
+ const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;
1367
+ const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
1368
+ const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
1369
+ const [contentZIndex, setContentZIndex] = $kY93V$useState();
1370
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
1371
+ if (content)
1372
+ setContentZIndex(window.getComputedStyle(content).zIndex);
1373
+ }, [
1374
+ content
1375
+ ]);
1376
+ return /* @__PURE__ */ $kY93V$createElement("div", {
1377
+ ref: refs.setFloating,
1378
+ "data-radix-popper-content-wrapper": "",
1379
+ style: {
1380
+ ...floatingStyles,
1381
+ transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
1382
+ // keep off the page when measuring
1383
+ minWidth: "max-content",
1384
+ zIndex: contentZIndex,
1385
+ ["--radix-popper-transform-origin"]: [
1386
+ (_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x,
1387
+ (_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y
1388
+ ].join(" ")
1389
+ },
1390
+ dir: props.dir
1391
+ }, /* @__PURE__ */ $kY93V$createElement($cf1ac5d9fe0e8206$var$PopperContentProvider, {
1392
+ scope: __scopePopper,
1393
+ placedSide,
1394
+ onArrowChange: setArrow,
1395
+ arrowX,
1396
+ arrowY,
1397
+ shouldHideArrow: cannotCenterArrow
1398
+ }, /* @__PURE__ */ $kY93V$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
1399
+ "data-side": placedSide,
1400
+ "data-align": placedAlign
1401
+ }, contentProps, {
1402
+ ref: composedRefs,
1403
+ style: {
1404
+ ...contentProps.style,
1405
+ // if the PopperContent hasn't been placed yet (not all measurements done)
1406
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
1407
+ animation: !isPositioned ? "none" : void 0,
1408
+ // hide the content if using the hide middleware and should be hidden
1409
+ opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : void 0
1410
+ }
1411
+ }))));
1412
+ });
1413
+ function $cf1ac5d9fe0e8206$var$isNotNull(value) {
1414
+ return value !== null;
1415
+ }
1416
+ var $cf1ac5d9fe0e8206$var$transformOrigin = (options) => ({
1417
+ name: "transformOrigin",
1418
+ options,
1419
+ fn(data) {
1420
+ var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;
1421
+ const { placement, rects, middlewareData } = data;
1422
+ const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;
1423
+ const isArrowHidden = cannotCenterArrow;
1424
+ const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
1425
+ const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
1426
+ const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);
1427
+ const noArrowAlign = {
1428
+ start: "0%",
1429
+ center: "50%",
1430
+ end: "100%"
1431
+ }[placedAlign];
1432
+ const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;
1433
+ const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;
1434
+ let x = "";
1435
+ let y = "";
1436
+ if (placedSide === "bottom") {
1437
+ x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
1438
+ y = `${-arrowHeight}px`;
1439
+ } else if (placedSide === "top") {
1440
+ x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
1441
+ y = `${rects.floating.height + arrowHeight}px`;
1442
+ } else if (placedSide === "right") {
1443
+ x = `${-arrowHeight}px`;
1444
+ y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
1445
+ } else if (placedSide === "left") {
1446
+ x = `${rects.floating.width + arrowHeight}px`;
1447
+ y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
1448
+ }
1449
+ return {
1450
+ data: {
1451
+ x,
1452
+ y
1453
+ }
1454
+ };
1455
+ }
1456
+ });
1457
+ function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement) {
1458
+ const [side, align = "center"] = placement.split("-");
1459
+ return [
1460
+ side,
1461
+ align
1462
+ ];
1463
+ }
1464
+ var $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9;
1465
+ var $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;
1466
+ var $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;
1467
+
1468
+ // ../../node_modules/.pnpm/@radix-ui+react-portal@1.0.4_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.mjs
1469
+ import { forwardRef as $7SXl2$forwardRef, createElement as $7SXl2$createElement } from "react";
1470
+ import $7SXl2$reactdom from "react-dom";
1471
+ var $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ $7SXl2$forwardRef((props, forwardedRef) => {
1472
+ var _globalThis$document;
1473
+ const { container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body, ...portalProps } = props;
1474
+ return container ? /* @__PURE__ */ $7SXl2$reactdom.createPortal(/* @__PURE__ */ $7SXl2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
1475
+ ref: forwardedRef
1476
+ })), container) : null;
1477
+ });
1478
+
1479
+ // ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1480
+ import { useCallback as $bnPw9$useCallback, useState as $bnPw9$useState, useRef as $bnPw9$useRef, useEffect as $bnPw9$useEffect } from "react";
1481
+ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop, defaultProp, onChange = () => {
1482
+ } }) {
1483
+ const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
1484
+ defaultProp,
1485
+ onChange
1486
+ });
1487
+ const isControlled = prop !== void 0;
1488
+ const value1 = isControlled ? prop : uncontrolledProp;
1489
+ const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
1490
+ const setValue = $bnPw9$useCallback((nextValue) => {
1491
+ if (isControlled) {
1492
+ const setter = nextValue;
1493
+ const value = typeof nextValue === "function" ? setter(prop) : nextValue;
1494
+ if (value !== prop)
1495
+ handleChange(value);
1496
+ } else
1497
+ setUncontrolledProp(nextValue);
1498
+ }, [
1499
+ isControlled,
1500
+ prop,
1501
+ setUncontrolledProp,
1502
+ handleChange
1503
+ ]);
1504
+ return [
1505
+ value1,
1506
+ setValue
1507
+ ];
1508
+ }
1509
+ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
1510
+ const uncontrolledState = $bnPw9$useState(defaultProp);
1511
+ const [value] = uncontrolledState;
1512
+ const prevValueRef = $bnPw9$useRef(value);
1513
+ const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
1514
+ $bnPw9$useEffect(() => {
1515
+ if (prevValueRef.current !== value) {
1516
+ handleChange(value);
1517
+ prevValueRef.current = value;
1518
+ }
1519
+ }, [
1520
+ value,
1521
+ prevValueRef,
1522
+ handleChange
1523
+ ]);
1524
+ return uncontrolledState;
1525
+ }
1526
+
1527
+ // ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.0.1_@types+react@18.2.67_react@18.2.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
1528
+ import { useRef as $8LvvK$useRef, useMemo as $8LvvK$useMemo } from "react";
1529
+ function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
1530
+ const ref = $8LvvK$useRef({
1531
+ value,
1532
+ previous: value
1533
+ });
1534
+ return $8LvvK$useMemo(() => {
1535
+ if (ref.current.value !== value) {
1536
+ ref.current.previous = ref.current.value;
1537
+ ref.current.value = value;
1538
+ }
1539
+ return ref.current.previous;
1540
+ }, [
1541
+ value
1542
+ ]);
1543
+ }
1544
+
1545
+ // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom_4x3fnmulqnvu7mroxgohhoaryu/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
1546
+ import { forwardRef as $kVwnw$forwardRef, createElement as $kVwnw$createElement } from "react";
1547
+ var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ $kVwnw$forwardRef((props, forwardedRef) => {
1548
+ return /* @__PURE__ */ $kVwnw$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
1549
+ ref: forwardedRef,
1550
+ style: {
1551
+ // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
1552
+ position: "absolute",
1553
+ border: 0,
1554
+ width: 1,
1555
+ height: 1,
1556
+ padding: 0,
1557
+ margin: -1,
1558
+ overflow: "hidden",
1559
+ clip: "rect(0, 0, 0, 0)",
1560
+ whiteSpace: "nowrap",
1561
+ wordWrap: "normal",
1562
+ ...props.style
1563
+ }
1564
+ }));
1565
+ });
1566
+
1567
+ // ../../node_modules/.pnpm/aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.js
1568
+ var getDefaultParent = function(originalTarget) {
1569
+ if (typeof document === "undefined") {
1570
+ return null;
1571
+ }
1572
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
1573
+ return sampleTarget.ownerDocument.body;
1574
+ };
1575
+ var counterMap = /* @__PURE__ */ new WeakMap();
1576
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1577
+ var markerMap = {};
1578
+ var lockCount = 0;
1579
+ var unwrapHost = function(node) {
1580
+ return node && (node.host || unwrapHost(node.parentNode));
1581
+ };
1582
+ var correctTargets = function(parent, targets) {
1583
+ return targets.map(function(target) {
1584
+ if (parent.contains(target)) {
1585
+ return target;
1586
+ }
1587
+ var correctedTarget = unwrapHost(target);
1588
+ if (correctedTarget && parent.contains(correctedTarget)) {
1589
+ return correctedTarget;
1590
+ }
1591
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1592
+ return null;
1593
+ }).filter(function(x) {
1594
+ return Boolean(x);
1595
+ });
1596
+ };
1597
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1598
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1599
+ if (!markerMap[markerName]) {
1600
+ markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1601
+ }
1602
+ var markerCounter = markerMap[markerName];
1603
+ var hiddenNodes = [];
1604
+ var elementsToKeep = /* @__PURE__ */ new Set();
1605
+ var elementsToStop = new Set(targets);
1606
+ var keep = function(el) {
1607
+ if (!el || elementsToKeep.has(el)) {
1608
+ return;
1609
+ }
1610
+ elementsToKeep.add(el);
1611
+ keep(el.parentNode);
1612
+ };
1613
+ targets.forEach(keep);
1614
+ var deep = function(parent) {
1615
+ if (!parent || elementsToStop.has(parent)) {
1616
+ return;
1617
+ }
1618
+ Array.prototype.forEach.call(parent.children, function(node) {
1619
+ if (elementsToKeep.has(node)) {
1620
+ deep(node);
1621
+ } else {
1622
+ try {
1623
+ var attr = node.getAttribute(controlAttribute);
1624
+ var alreadyHidden = attr !== null && attr !== "false";
1625
+ var counterValue = (counterMap.get(node) || 0) + 1;
1626
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1627
+ counterMap.set(node, counterValue);
1628
+ markerCounter.set(node, markerValue);
1629
+ hiddenNodes.push(node);
1630
+ if (counterValue === 1 && alreadyHidden) {
1631
+ uncontrolledNodes.set(node, true);
1632
+ }
1633
+ if (markerValue === 1) {
1634
+ node.setAttribute(markerName, "true");
1635
+ }
1636
+ if (!alreadyHidden) {
1637
+ node.setAttribute(controlAttribute, "true");
1638
+ }
1639
+ } catch (e) {
1640
+ console.error("aria-hidden: cannot operate on ", node, e);
1641
+ }
1642
+ }
1643
+ });
1644
+ };
1645
+ deep(parentNode);
1646
+ elementsToKeep.clear();
1647
+ lockCount++;
1648
+ return function() {
1649
+ hiddenNodes.forEach(function(node) {
1650
+ var counterValue = counterMap.get(node) - 1;
1651
+ var markerValue = markerCounter.get(node) - 1;
1652
+ counterMap.set(node, counterValue);
1653
+ markerCounter.set(node, markerValue);
1654
+ if (!counterValue) {
1655
+ if (!uncontrolledNodes.has(node)) {
1656
+ node.removeAttribute(controlAttribute);
1657
+ }
1658
+ uncontrolledNodes.delete(node);
1659
+ }
1660
+ if (!markerValue) {
1661
+ node.removeAttribute(markerName);
1662
+ }
1663
+ });
1664
+ lockCount--;
1665
+ if (!lockCount) {
1666
+ counterMap = /* @__PURE__ */ new WeakMap();
1667
+ counterMap = /* @__PURE__ */ new WeakMap();
1668
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1669
+ markerMap = {};
1670
+ }
1671
+ };
1672
+ };
1673
+ var hideOthers = function(originalTarget, parentNode, markerName) {
1674
+ if (markerName === void 0) {
1675
+ markerName = "data-aria-hidden";
1676
+ }
1677
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1678
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
1679
+ if (!activeParentNode) {
1680
+ return function() {
1681
+ return null;
1682
+ };
1683
+ }
1684
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live]")));
1685
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1686
+ };
1687
+
1688
+ // ../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
1689
+ var __assign = function() {
1690
+ __assign = Object.assign || function __assign2(t) {
1691
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1692
+ s = arguments[i];
1693
+ for (var p in s)
1694
+ if (Object.prototype.hasOwnProperty.call(s, p))
1695
+ t[p] = s[p];
1696
+ }
1697
+ return t;
1698
+ };
1699
+ return __assign.apply(this, arguments);
1700
+ };
1701
+ function __rest(s, e) {
1702
+ var t = {};
1703
+ for (var p in s)
1704
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1705
+ t[p] = s[p];
1706
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1707
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1708
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1709
+ t[p[i]] = s[p[i]];
1710
+ }
1711
+ return t;
1712
+ }
1713
+ function __spreadArray(to, from, pack) {
1714
+ if (pack || arguments.length === 2)
1715
+ for (var i = 0, l = from.length, ar; i < l; i++) {
1716
+ if (ar || !(i in from)) {
1717
+ if (!ar)
1718
+ ar = Array.prototype.slice.call(from, 0, i);
1719
+ ar[i] = from[i];
1720
+ }
1721
+ }
1722
+ return to.concat(ar || Array.prototype.slice.call(from));
1723
+ }
1724
+
1725
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
1726
+ import * as React8 from "react";
1727
+
1728
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js
1729
+ import * as React4 from "react";
1730
+
1731
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.6_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1732
+ var zeroRightClassName = "right-scroll-bar-position";
1733
+ var fullWidthClassName = "width-before-scroll-bar";
1734
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
1735
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
1736
+
1737
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.2_@types+react@18.2.67_react@18.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.js
1738
+ function assignRef(ref, value) {
1739
+ if (typeof ref === "function") {
1740
+ ref(value);
1741
+ } else if (ref) {
1742
+ ref.current = value;
1743
+ }
1744
+ return ref;
1745
+ }
1746
+
1747
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.2_@types+react@18.2.67_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useRef.js
1748
+ import { useState as useState3 } from "react";
1749
+ function useCallbackRef(initialValue, callback) {
1750
+ var ref = useState3(function() {
1751
+ return {
1752
+ // value
1753
+ value: initialValue,
1754
+ // last callback
1755
+ callback,
1756
+ // "memoized" public interface
1757
+ facade: {
1758
+ get current() {
1759
+ return ref.value;
1760
+ },
1761
+ set current(value) {
1762
+ var last = ref.value;
1763
+ if (last !== value) {
1764
+ ref.value = value;
1765
+ ref.callback(value, last);
1766
+ }
1767
+ }
1768
+ }
1769
+ };
1770
+ })[0];
1771
+ ref.callback = callback;
1772
+ return ref.facade;
1773
+ }
1774
+
1775
+ // ../../node_modules/.pnpm/use-callback-ref@1.3.2_@types+react@18.2.67_react@18.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1776
+ import * as React2 from "react";
1777
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React2.useLayoutEffect : React2.useEffect;
1778
+ var currentValues = /* @__PURE__ */ new WeakMap();
1779
+ function useMergeRefs(refs, defaultValue) {
1780
+ var callbackRef = useCallbackRef(defaultValue || null, function(newValue) {
1781
+ return refs.forEach(function(ref) {
1782
+ return assignRef(ref, newValue);
1783
+ });
1784
+ });
1785
+ useIsomorphicLayoutEffect(function() {
1786
+ var oldValue = currentValues.get(callbackRef);
1787
+ if (oldValue) {
1788
+ var prevRefs_1 = new Set(oldValue);
1789
+ var nextRefs_1 = new Set(refs);
1790
+ var current_1 = callbackRef.current;
1791
+ prevRefs_1.forEach(function(ref) {
1792
+ if (!nextRefs_1.has(ref)) {
1793
+ assignRef(ref, null);
1794
+ }
1795
+ });
1796
+ nextRefs_1.forEach(function(ref) {
1797
+ if (!prevRefs_1.has(ref)) {
1798
+ assignRef(ref, current_1);
1799
+ }
1800
+ });
1801
+ }
1802
+ currentValues.set(callbackRef, refs);
1803
+ }, [refs]);
1804
+ return callbackRef;
1805
+ }
1806
+
1807
+ // ../../node_modules/.pnpm/use-sidecar@1.1.2_@types+react@18.2.67_react@18.2.0/node_modules/use-sidecar/dist/es2015/medium.js
1808
+ function ItoI(a) {
1809
+ return a;
1810
+ }
1811
+ function innerCreateMedium(defaults, middleware) {
1812
+ if (middleware === void 0) {
1813
+ middleware = ItoI;
1814
+ }
1815
+ var buffer = [];
1816
+ var assigned = false;
1817
+ var medium = {
1818
+ read: function() {
1819
+ if (assigned) {
1820
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1821
+ }
1822
+ if (buffer.length) {
1823
+ return buffer[buffer.length - 1];
1824
+ }
1825
+ return defaults;
1826
+ },
1827
+ useMedium: function(data) {
1828
+ var item = middleware(data, assigned);
1829
+ buffer.push(item);
1830
+ return function() {
1831
+ buffer = buffer.filter(function(x) {
1832
+ return x !== item;
1833
+ });
1834
+ };
1835
+ },
1836
+ assignSyncMedium: function(cb) {
1837
+ assigned = true;
1838
+ while (buffer.length) {
1839
+ var cbs = buffer;
1840
+ buffer = [];
1841
+ cbs.forEach(cb);
1842
+ }
1843
+ buffer = {
1844
+ push: function(x) {
1845
+ return cb(x);
1846
+ },
1847
+ filter: function() {
1848
+ return buffer;
1849
+ }
1850
+ };
1851
+ },
1852
+ assignMedium: function(cb) {
1853
+ assigned = true;
1854
+ var pendingQueue = [];
1855
+ if (buffer.length) {
1856
+ var cbs = buffer;
1857
+ buffer = [];
1858
+ cbs.forEach(cb);
1859
+ pendingQueue = buffer;
1860
+ }
1861
+ var executeQueue = function() {
1862
+ var cbs2 = pendingQueue;
1863
+ pendingQueue = [];
1864
+ cbs2.forEach(cb);
1865
+ };
1866
+ var cycle = function() {
1867
+ return Promise.resolve().then(executeQueue);
1868
+ };
1869
+ cycle();
1870
+ buffer = {
1871
+ push: function(x) {
1872
+ pendingQueue.push(x);
1873
+ cycle();
1874
+ },
1875
+ filter: function(filter) {
1876
+ pendingQueue = pendingQueue.filter(filter);
1877
+ return buffer;
1878
+ }
1879
+ };
1880
+ }
1881
+ };
1882
+ return medium;
1883
+ }
1884
+ function createSidecarMedium(options) {
1885
+ if (options === void 0) {
1886
+ options = {};
1887
+ }
1888
+ var medium = innerCreateMedium(null);
1889
+ medium.options = __assign({ async: true, ssr: false }, options);
1890
+ return medium;
1891
+ }
1892
+
1893
+ // ../../node_modules/.pnpm/use-sidecar@1.1.2_@types+react@18.2.67_react@18.2.0/node_modules/use-sidecar/dist/es2015/exports.js
1894
+ import * as React3 from "react";
1895
+ var SideCar = function(_a) {
1896
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1897
+ if (!sideCar) {
1898
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1899
+ }
1900
+ var Target = sideCar.read();
1901
+ if (!Target) {
1902
+ throw new Error("Sidecar medium not found");
1903
+ }
1904
+ return React3.createElement(Target, __assign({}, rest));
1905
+ };
1906
+ SideCar.isSideCarExport = true;
1907
+ function exportSidecar(medium, exported) {
1908
+ medium.useMedium(exported);
1909
+ return SideCar;
1910
+ }
1911
+
1912
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js
1913
+ var effectCar = createSidecarMedium();
1914
+
1915
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js
1916
+ var nothing = function() {
1917
+ return;
1918
+ };
1919
+ var RemoveScroll = React4.forwardRef(function(props, parentRef) {
1920
+ var ref = React4.useRef(null);
1921
+ var _a = React4.useState({
1922
+ onScrollCapture: nothing,
1923
+ onWheelCapture: nothing,
1924
+ onTouchMoveCapture: nothing
1925
+ }), callbacks = _a[0], setCallbacks = _a[1];
1926
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
1927
+ var SideCar2 = sideCar;
1928
+ var containerRef = useMergeRefs([ref, parentRef]);
1929
+ var containerProps = __assign(__assign({}, rest), callbacks);
1930
+ return React4.createElement(
1931
+ React4.Fragment,
1932
+ null,
1933
+ enabled && React4.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref }),
1934
+ forwardProps ? React4.cloneElement(React4.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React4.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1935
+ );
1936
+ });
1937
+ RemoveScroll.defaultProps = {
1938
+ enabled: true,
1939
+ removeScrollBar: true,
1940
+ inert: false
1941
+ };
1942
+ RemoveScroll.classNames = {
1943
+ fullWidth: fullWidthClassName,
1944
+ zeroRight: zeroRightClassName
1945
+ };
1946
+
1947
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1948
+ import * as React7 from "react";
1949
+
1950
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.6_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
1951
+ import * as React6 from "react";
1952
+
1953
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.1_@types+react@18.2.67_react@18.2.0/node_modules/react-style-singleton/dist/es2015/hook.js
1954
+ import * as React5 from "react";
1955
+
1956
+ // ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
1957
+ var currentNonce;
1958
+ var getNonce = function() {
1959
+ if (currentNonce) {
1960
+ return currentNonce;
1961
+ }
1962
+ if (typeof __webpack_nonce__ !== "undefined") {
1963
+ return __webpack_nonce__;
1964
+ }
1965
+ return void 0;
1966
+ };
1967
+
1968
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.1_@types+react@18.2.67_react@18.2.0/node_modules/react-style-singleton/dist/es2015/singleton.js
1969
+ function makeStyleTag() {
1970
+ if (!document)
1971
+ return null;
1972
+ var tag = document.createElement("style");
1973
+ tag.type = "text/css";
1974
+ var nonce = getNonce();
1975
+ if (nonce) {
1976
+ tag.setAttribute("nonce", nonce);
1977
+ }
1978
+ return tag;
1979
+ }
1980
+ function injectStyles(tag, css) {
1981
+ if (tag.styleSheet) {
1982
+ tag.styleSheet.cssText = css;
1983
+ } else {
1984
+ tag.appendChild(document.createTextNode(css));
1985
+ }
1986
+ }
1987
+ function insertStyleTag(tag) {
1988
+ var head = document.head || document.getElementsByTagName("head")[0];
1989
+ head.appendChild(tag);
1990
+ }
1991
+ var stylesheetSingleton = function() {
1992
+ var counter = 0;
1993
+ var stylesheet = null;
1994
+ return {
1995
+ add: function(style) {
1996
+ if (counter == 0) {
1997
+ if (stylesheet = makeStyleTag()) {
1998
+ injectStyles(stylesheet, style);
1999
+ insertStyleTag(stylesheet);
2000
+ }
2001
+ }
2002
+ counter++;
2003
+ },
2004
+ remove: function() {
2005
+ counter--;
2006
+ if (!counter && stylesheet) {
2007
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
2008
+ stylesheet = null;
2009
+ }
2010
+ }
2011
+ };
2012
+ };
2013
+
2014
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.1_@types+react@18.2.67_react@18.2.0/node_modules/react-style-singleton/dist/es2015/hook.js
2015
+ var styleHookSingleton = function() {
2016
+ var sheet = stylesheetSingleton();
2017
+ return function(styles, isDynamic) {
2018
+ React5.useEffect(function() {
2019
+ sheet.add(styles);
2020
+ return function() {
2021
+ sheet.remove();
2022
+ };
2023
+ }, [styles && isDynamic]);
2024
+ };
2025
+ };
2026
+
2027
+ // ../../node_modules/.pnpm/react-style-singleton@2.2.1_@types+react@18.2.67_react@18.2.0/node_modules/react-style-singleton/dist/es2015/component.js
2028
+ var styleSingleton = function() {
2029
+ var useStyle = styleHookSingleton();
2030
+ var Sheet = function(_a) {
2031
+ var styles = _a.styles, dynamic = _a.dynamic;
2032
+ useStyle(styles, dynamic);
2033
+ return null;
2034
+ };
2035
+ return Sheet;
2036
+ };
2037
+
2038
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.6_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
2039
+ var zeroGap = {
2040
+ left: 0,
2041
+ top: 0,
2042
+ right: 0,
2043
+ gap: 0
2044
+ };
2045
+ var parse = function(x) {
2046
+ return parseInt(x || "", 10) || 0;
2047
+ };
2048
+ var getOffset = function(gapMode) {
2049
+ var cs = window.getComputedStyle(document.body);
2050
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
2051
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
2052
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
2053
+ return [parse(left), parse(top), parse(right)];
2054
+ };
2055
+ var getGapWidth = function(gapMode) {
2056
+ if (gapMode === void 0) {
2057
+ gapMode = "margin";
2058
+ }
2059
+ if (typeof window === "undefined") {
2060
+ return zeroGap;
2061
+ }
2062
+ var offsets = getOffset(gapMode);
2063
+ var documentWidth = document.documentElement.clientWidth;
2064
+ var windowWidth = window.innerWidth;
2065
+ return {
2066
+ left: offsets[0],
2067
+ top: offsets[1],
2068
+ right: offsets[2],
2069
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
2070
+ };
2071
+ };
2072
+
2073
+ // ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.6_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
2074
+ var Style = styleSingleton();
2075
+ var lockAttribute = "data-scroll-locked";
2076
+ var getStyles = function(_a, allowRelative, gapMode, important) {
2077
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
2078
+ if (gapMode === void 0) {
2079
+ gapMode = "margin";
2080
+ }
2081
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
2082
+ allowRelative && "position: relative ".concat(important, ";"),
2083
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
2084
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
2085
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
2086
+ };
2087
+ var getCurrentUseCounter = function() {
2088
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
2089
+ return isFinite(counter) ? counter : 0;
2090
+ };
2091
+ var useLockAttribute = function() {
2092
+ React6.useEffect(function() {
2093
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
2094
+ return function() {
2095
+ var newCounter = getCurrentUseCounter() - 1;
2096
+ if (newCounter <= 0) {
2097
+ document.body.removeAttribute(lockAttribute);
2098
+ } else {
2099
+ document.body.setAttribute(lockAttribute, newCounter.toString());
2100
+ }
2101
+ };
2102
+ }, []);
2103
+ };
2104
+ var RemoveScrollBar = function(_a) {
2105
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
2106
+ useLockAttribute();
2107
+ var gap = React6.useMemo(function() {
2108
+ return getGapWidth(gapMode);
2109
+ }, [gapMode]);
2110
+ return React6.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
2111
+ };
2112
+
2113
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
2114
+ var passiveSupported = false;
2115
+ if (typeof window !== "undefined") {
2116
+ try {
2117
+ options = Object.defineProperty({}, "passive", {
2118
+ get: function() {
2119
+ passiveSupported = true;
2120
+ return true;
2121
+ }
2122
+ });
2123
+ window.addEventListener("test", options, options);
2124
+ window.removeEventListener("test", options, options);
2125
+ } catch (err) {
2126
+ passiveSupported = false;
2127
+ }
2128
+ }
2129
+ var options;
2130
+ var nonPassive = passiveSupported ? { passive: false } : false;
2131
+
2132
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
2133
+ var alwaysContainsScroll = function(node) {
2134
+ return node.tagName === "TEXTAREA";
2135
+ };
2136
+ var elementCanBeScrolled = function(node, overflow) {
2137
+ var styles = window.getComputedStyle(node);
2138
+ return (
2139
+ // not-not-scrollable
2140
+ styles[overflow] !== "hidden" && // contains scroll inside self
2141
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
2142
+ );
2143
+ };
2144
+ var elementCouldBeVScrolled = function(node) {
2145
+ return elementCanBeScrolled(node, "overflowY");
2146
+ };
2147
+ var elementCouldBeHScrolled = function(node) {
2148
+ return elementCanBeScrolled(node, "overflowX");
2149
+ };
2150
+ var locationCouldBeScrolled = function(axis, node) {
2151
+ var current = node;
2152
+ do {
2153
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
2154
+ current = current.host;
2155
+ }
2156
+ var isScrollable = elementCouldBeScrolled(axis, current);
2157
+ if (isScrollable) {
2158
+ var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
2159
+ if (s > d) {
2160
+ return true;
2161
+ }
2162
+ }
2163
+ current = current.parentNode;
2164
+ } while (current && current !== document.body);
2165
+ return false;
2166
+ };
2167
+ var getVScrollVariables = function(_a) {
2168
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
2169
+ return [
2170
+ scrollTop,
2171
+ scrollHeight,
2172
+ clientHeight
2173
+ ];
2174
+ };
2175
+ var getHScrollVariables = function(_a) {
2176
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
2177
+ return [
2178
+ scrollLeft,
2179
+ scrollWidth,
2180
+ clientWidth
2181
+ ];
2182
+ };
2183
+ var elementCouldBeScrolled = function(axis, node) {
2184
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
2185
+ };
2186
+ var getScrollVariables = function(axis, node) {
2187
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
2188
+ };
2189
+ var getDirectionFactor = function(axis, direction) {
2190
+ return axis === "h" && direction === "rtl" ? -1 : 1;
2191
+ };
2192
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
2193
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
2194
+ var delta = directionFactor * sourceDelta;
2195
+ var target = event.target;
2196
+ var targetInLock = endTarget.contains(target);
2197
+ var shouldCancelScroll = false;
2198
+ var isDeltaPositive = delta > 0;
2199
+ var availableScroll = 0;
2200
+ var availableScrollTop = 0;
2201
+ do {
2202
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
2203
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
2204
+ if (position || elementScroll) {
2205
+ if (elementCouldBeScrolled(axis, target)) {
2206
+ availableScroll += elementScroll;
2207
+ availableScrollTop += position;
2208
+ }
2209
+ }
2210
+ target = target.parentNode;
2211
+ } while (
2212
+ // portaled content
2213
+ !targetInLock && target !== document.body || // self content
2214
+ targetInLock && (endTarget.contains(target) || endTarget === target)
2215
+ );
2216
+ if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) {
2217
+ shouldCancelScroll = true;
2218
+ } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) {
2219
+ shouldCancelScroll = true;
2220
+ }
2221
+ return shouldCancelScroll;
2222
+ };
2223
+
2224
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
2225
+ var getTouchXY = function(event) {
2226
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
2227
+ };
2228
+ var getDeltaXY = function(event) {
2229
+ return [event.deltaX, event.deltaY];
2230
+ };
2231
+ var extractRef = function(ref) {
2232
+ return ref && "current" in ref ? ref.current : ref;
2233
+ };
2234
+ var deltaCompare = function(x, y) {
2235
+ return x[0] === y[0] && x[1] === y[1];
2236
+ };
2237
+ var generateStyle = function(id) {
2238
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
2239
+ };
2240
+ var idCounter = 0;
2241
+ var lockStack = [];
2242
+ function RemoveScrollSideCar(props) {
2243
+ var shouldPreventQueue = React7.useRef([]);
2244
+ var touchStartRef = React7.useRef([0, 0]);
2245
+ var activeAxis = React7.useRef();
2246
+ var id = React7.useState(idCounter++)[0];
2247
+ var Style2 = React7.useState(function() {
2248
+ return styleSingleton();
2249
+ })[0];
2250
+ var lastProps = React7.useRef(props);
2251
+ React7.useEffect(function() {
2252
+ lastProps.current = props;
2253
+ }, [props]);
2254
+ React7.useEffect(function() {
2255
+ if (props.inert) {
2256
+ document.body.classList.add("block-interactivity-".concat(id));
2257
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
2258
+ allow_1.forEach(function(el) {
2259
+ return el.classList.add("allow-interactivity-".concat(id));
2260
+ });
2261
+ return function() {
2262
+ document.body.classList.remove("block-interactivity-".concat(id));
2263
+ allow_1.forEach(function(el) {
2264
+ return el.classList.remove("allow-interactivity-".concat(id));
2265
+ });
2266
+ };
2267
+ }
2268
+ return;
2269
+ }, [props.inert, props.lockRef.current, props.shards]);
2270
+ var shouldCancelEvent = React7.useCallback(function(event, parent) {
2271
+ if ("touches" in event && event.touches.length === 2) {
2272
+ return !lastProps.current.allowPinchZoom;
2273
+ }
2274
+ var touch = getTouchXY(event);
2275
+ var touchStart = touchStartRef.current;
2276
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
2277
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
2278
+ var currentAxis;
2279
+ var target = event.target;
2280
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
2281
+ if ("touches" in event && moveDirection === "h" && target.type === "range") {
2282
+ return false;
2283
+ }
2284
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2285
+ if (!canBeScrolledInMainDirection) {
2286
+ return true;
2287
+ }
2288
+ if (canBeScrolledInMainDirection) {
2289
+ currentAxis = moveDirection;
2290
+ } else {
2291
+ currentAxis = moveDirection === "v" ? "h" : "v";
2292
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2293
+ }
2294
+ if (!canBeScrolledInMainDirection) {
2295
+ return false;
2296
+ }
2297
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
2298
+ activeAxis.current = currentAxis;
2299
+ }
2300
+ if (!currentAxis) {
2301
+ return true;
2302
+ }
2303
+ var cancelingAxis = activeAxis.current || currentAxis;
2304
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
2305
+ }, []);
2306
+ var shouldPrevent = React7.useCallback(function(_event) {
2307
+ var event = _event;
2308
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
2309
+ return;
2310
+ }
2311
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
2312
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
2313
+ return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);
2314
+ })[0];
2315
+ if (sourceEvent && sourceEvent.should) {
2316
+ if (event.cancelable) {
2317
+ event.preventDefault();
2318
+ }
2319
+ return;
2320
+ }
2321
+ if (!sourceEvent) {
2322
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
2323
+ return node.contains(event.target);
2324
+ });
2325
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
2326
+ if (shouldStop) {
2327
+ if (event.cancelable) {
2328
+ event.preventDefault();
2329
+ }
2330
+ }
2331
+ }
2332
+ }, []);
2333
+ var shouldCancel = React7.useCallback(function(name, delta, target, should) {
2334
+ var event = { name, delta, target, should };
2335
+ shouldPreventQueue.current.push(event);
2336
+ setTimeout(function() {
2337
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
2338
+ return e !== event;
2339
+ });
2340
+ }, 1);
2341
+ }, []);
2342
+ var scrollTouchStart = React7.useCallback(function(event) {
2343
+ touchStartRef.current = getTouchXY(event);
2344
+ activeAxis.current = void 0;
2345
+ }, []);
2346
+ var scrollWheel = React7.useCallback(function(event) {
2347
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2348
+ }, []);
2349
+ var scrollTouchMove = React7.useCallback(function(event) {
2350
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2351
+ }, []);
2352
+ React7.useEffect(function() {
2353
+ lockStack.push(Style2);
2354
+ props.setCallbacks({
2355
+ onScrollCapture: scrollWheel,
2356
+ onWheelCapture: scrollWheel,
2357
+ onTouchMoveCapture: scrollTouchMove
2358
+ });
2359
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
2360
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
2361
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
2362
+ return function() {
2363
+ lockStack = lockStack.filter(function(inst) {
2364
+ return inst !== Style2;
2365
+ });
2366
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
2367
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
2368
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
2369
+ };
2370
+ }, []);
2371
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
2372
+ return React7.createElement(
2373
+ React7.Fragment,
2374
+ null,
2375
+ inert ? React7.createElement(Style2, { styles: generateStyle(id) }) : null,
2376
+ removeScrollBar ? React7.createElement(RemoveScrollBar, { gapMode: "margin" }) : null
2377
+ );
2378
+ }
2379
+
2380
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
2381
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
2382
+
2383
+ // ../../node_modules/.pnpm/react-remove-scroll@2.5.5_@types+react@18.2.67_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
2384
+ var ReactRemoveScroll = React8.forwardRef(function(props, ref) {
2385
+ return React8.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
2386
+ });
2387
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
2388
+ var Combination_default = ReactRemoveScroll;
2389
+
2390
+ // ../../node_modules/.pnpm/@radix-ui+react-select@2.0.0_@types+react-dom@18.2.22_@types+react@18.2.67_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-select/dist/index.mjs
2391
+ var $cc7e05a45900e73f$var$OPEN_KEYS = [
2392
+ " ",
2393
+ "Enter",
2394
+ "ArrowUp",
2395
+ "ArrowDown"
2396
+ ];
2397
+ var $cc7e05a45900e73f$var$SELECTION_KEYS = [
2398
+ " ",
2399
+ "Enter"
2400
+ ];
2401
+ var $cc7e05a45900e73f$var$SELECT_NAME = "Select";
2402
+ var [$cc7e05a45900e73f$var$Collection, $cc7e05a45900e73f$var$useCollection, $cc7e05a45900e73f$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($cc7e05a45900e73f$var$SELECT_NAME);
2403
+ var [$cc7e05a45900e73f$var$createSelectContext, $cc7e05a45900e73f$export$286727a75dc039bd] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cc7e05a45900e73f$var$SELECT_NAME, [
2404
+ $cc7e05a45900e73f$var$createCollectionScope,
2405
+ $cf1ac5d9fe0e8206$export$722aac194ae923
2406
+ ]);
2407
+ var $cc7e05a45900e73f$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923();
2408
+ var [$cc7e05a45900e73f$var$SelectProvider, $cc7e05a45900e73f$var$useSelectContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);
2409
+ var [$cc7e05a45900e73f$var$SelectNativeOptionsProvider, $cc7e05a45900e73f$var$useSelectNativeOptionsContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);
2410
+ var $cc7e05a45900e73f$export$ef9b1a59e592288f = (props) => {
2411
+ const { __scopeSelect, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, dir, name, autoComplete, disabled, required } = props;
2412
+ const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);
2413
+ const [trigger, setTrigger] = $01b9c$useState(null);
2414
+ const [valueNode, setValueNode] = $01b9c$useState(null);
2415
+ const [valueNodeHasChildren, setValueNodeHasChildren] = $01b9c$useState(false);
2416
+ const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
2417
+ const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
2418
+ prop: openProp,
2419
+ defaultProp: defaultOpen,
2420
+ onChange: onOpenChange
2421
+ });
2422
+ const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
2423
+ prop: valueProp,
2424
+ defaultProp: defaultValue,
2425
+ onChange: onValueChange
2426
+ });
2427
+ const triggerPointerDownPosRef = $01b9c$useRef(null);
2428
+ const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
2429
+ const [nativeOptionsSet, setNativeOptionsSet] = $01b9c$useState(/* @__PURE__ */ new Set());
2430
+ const nativeSelectKey = Array.from(nativeOptionsSet).map(
2431
+ (option) => option.props.value
2432
+ ).join(";");
2433
+ return /* @__PURE__ */ $01b9c$createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9, popperScope, /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectProvider, {
2434
+ required,
2435
+ scope: __scopeSelect,
2436
+ trigger,
2437
+ onTriggerChange: setTrigger,
2438
+ valueNode,
2439
+ onValueNodeChange: setValueNode,
2440
+ valueNodeHasChildren,
2441
+ onValueNodeHasChildrenChange: setValueNodeHasChildren,
2442
+ contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
2443
+ value,
2444
+ onValueChange: setValue,
2445
+ open,
2446
+ onOpenChange: setOpen,
2447
+ dir: direction,
2448
+ triggerPointerDownPosRef,
2449
+ disabled
2450
+ }, /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$Collection.Provider, {
2451
+ scope: __scopeSelect
2452
+ }, /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectNativeOptionsProvider, {
2453
+ scope: props.__scopeSelect,
2454
+ onNativeOptionAdd: $01b9c$useCallback((option) => {
2455
+ setNativeOptionsSet(
2456
+ (prev) => new Set(prev).add(option)
2457
+ );
2458
+ }, []),
2459
+ onNativeOptionRemove: $01b9c$useCallback((option) => {
2460
+ setNativeOptionsSet((prev) => {
2461
+ const optionsSet = new Set(prev);
2462
+ optionsSet.delete(option);
2463
+ return optionsSet;
2464
+ });
2465
+ }, [])
2466
+ }, children)), isFormControl ? /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$BubbleSelect, {
2467
+ key: nativeSelectKey,
2468
+ "aria-hidden": true,
2469
+ required,
2470
+ tabIndex: -1,
2471
+ name,
2472
+ autoComplete,
2473
+ value,
2474
+ onChange: (event) => setValue(event.target.value),
2475
+ disabled
2476
+ }, value === void 0 ? /* @__PURE__ */ $01b9c$createElement("option", {
2477
+ value: ""
2478
+ }) : null, Array.from(nativeOptionsSet)) : null));
2479
+ };
2480
+ var $cc7e05a45900e73f$var$TRIGGER_NAME = "SelectTrigger";
2481
+ var $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
2482
+ const { __scopeSelect, disabled = false, ...triggerProps } = props;
2483
+ const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);
2484
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$TRIGGER_NAME, __scopeSelect);
2485
+ const isDisabled = context.disabled || disabled;
2486
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onTriggerChange);
2487
+ const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
2488
+ const [searchRef, handleTypeaheadSearch, resetTypeahead] = $cc7e05a45900e73f$var$useTypeaheadSearch((search) => {
2489
+ const enabledItems = getItems().filter(
2490
+ (item) => !item.disabled
2491
+ );
2492
+ const currentItem = enabledItems.find(
2493
+ (item) => item.value === context.value
2494
+ );
2495
+ const nextItem = $cc7e05a45900e73f$var$findNextItem(enabledItems, search, currentItem);
2496
+ if (nextItem !== void 0)
2497
+ context.onValueChange(nextItem.value);
2498
+ });
2499
+ const handleOpen = () => {
2500
+ if (!isDisabled) {
2501
+ context.onOpenChange(true);
2502
+ resetTypeahead();
2503
+ }
2504
+ };
2505
+ return /* @__PURE__ */ $01b9c$createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7, _extends({
2506
+ asChild: true
2507
+ }, popperScope), /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
2508
+ type: "button",
2509
+ role: "combobox",
2510
+ "aria-controls": context.contentId,
2511
+ "aria-expanded": context.open,
2512
+ "aria-required": context.required,
2513
+ "aria-autocomplete": "none",
2514
+ dir: context.dir,
2515
+ "data-state": context.open ? "open" : "closed",
2516
+ disabled: isDisabled,
2517
+ "data-disabled": isDisabled ? "" : void 0,
2518
+ "data-placeholder": $cc7e05a45900e73f$var$shouldShowPlaceholder(context.value) ? "" : void 0
2519
+ }, triggerProps, {
2520
+ ref: composedRefs,
2521
+ onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(triggerProps.onClick, (event) => {
2522
+ event.currentTarget.focus();
2523
+ }),
2524
+ onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(triggerProps.onPointerDown, (event) => {
2525
+ const target = event.target;
2526
+ if (target.hasPointerCapture(event.pointerId))
2527
+ target.releasePointerCapture(event.pointerId);
2528
+ if (event.button === 0 && event.ctrlKey === false) {
2529
+ handleOpen();
2530
+ context.triggerPointerDownPosRef.current = {
2531
+ x: Math.round(event.pageX),
2532
+ y: Math.round(event.pageY)
2533
+ };
2534
+ event.preventDefault();
2535
+ }
2536
+ }),
2537
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(triggerProps.onKeyDown, (event) => {
2538
+ const isTypingAhead = searchRef.current !== "";
2539
+ const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
2540
+ if (!isModifierKey && event.key.length === 1)
2541
+ handleTypeaheadSearch(event.key);
2542
+ if (isTypingAhead && event.key === " ")
2543
+ return;
2544
+ if ($cc7e05a45900e73f$var$OPEN_KEYS.includes(event.key)) {
2545
+ handleOpen();
2546
+ event.preventDefault();
2547
+ }
2548
+ })
2549
+ })));
2550
+ });
2551
+ var $cc7e05a45900e73f$var$VALUE_NAME = "SelectValue";
2552
+ var $cc7e05a45900e73f$export$e288731fd71264f0 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
2553
+ const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
2554
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$VALUE_NAME, __scopeSelect);
2555
+ const { onValueNodeHasChildrenChange } = context;
2556
+ const hasChildren = children !== void 0;
2557
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onValueNodeChange);
2558
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
2559
+ onValueNodeHasChildrenChange(hasChildren);
2560
+ }, [
2561
+ onValueNodeHasChildrenChange,
2562
+ hasChildren
2563
+ ]);
2564
+ return /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, valueProps, {
2565
+ ref: composedRefs,
2566
+ style: {
2567
+ pointerEvents: "none"
2568
+ }
2569
+ }), $cc7e05a45900e73f$var$shouldShowPlaceholder(context.value) ? /* @__PURE__ */ $01b9c$createElement($01b9c$Fragment, null, placeholder) : children);
2570
+ });
2571
+ var $cc7e05a45900e73f$export$99b400cabb58c515 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
2572
+ const { __scopeSelect, children, ...iconProps } = props;
2573
+ return /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
2574
+ "aria-hidden": true
2575
+ }, iconProps, {
2576
+ ref: forwardedRef
2577
+ }), children || "\u25BC");
2578
+ });
2579
+ var $cc7e05a45900e73f$export$b2af6c9944296213 = (props) => {
2580
+ return /* @__PURE__ */ $01b9c$createElement($f1701beae083dbae$export$602eac185826482c, _extends({
2581
+ asChild: true
2582
+ }, props));
2583
+ };
2584
+ var $cc7e05a45900e73f$var$CONTENT_NAME = "SelectContent";
2585
+ var $cc7e05a45900e73f$export$c973a4b3cb86a03d = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
2586
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, props.__scopeSelect);
2587
+ const [fragment, setFragment] = $01b9c$useState();
2588
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
2589
+ setFragment(new DocumentFragment());
2590
+ }, []);
2591
+ if (!context.open) {
2592
+ const frag = fragment;
2593
+ return frag ? /* @__PURE__ */ $01b9c$createPortal(/* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectContentProvider, {
2594
+ scope: props.__scopeSelect
2595
+ }, /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$Collection.Slot, {
2596
+ scope: props.__scopeSelect
2597
+ }, /* @__PURE__ */ $01b9c$createElement("div", null, props.children))), frag) : null;
2598
+ }
2599
+ return /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectContentImpl, _extends({}, props, {
2600
+ ref: forwardedRef
2601
+ }));
2602
+ });
2603
+ var $cc7e05a45900e73f$var$CONTENT_MARGIN = 10;
2604
+ var [$cc7e05a45900e73f$var$SelectContentProvider, $cc7e05a45900e73f$var$useSelectContentContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME);
2605
+ var $cc7e05a45900e73f$var$SelectContentImpl = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
2606
+ const {
2607
+ __scopeSelect,
2608
+ position = "item-aligned",
2609
+ onCloseAutoFocus,
2610
+ onEscapeKeyDown,
2611
+ onPointerDownOutside,
2612
+ side,
2613
+ sideOffset,
2614
+ align,
2615
+ alignOffset,
2616
+ arrowPadding,
2617
+ collisionBoundary,
2618
+ collisionPadding,
2619
+ sticky,
2620
+ hideWhenDetached,
2621
+ avoidCollisions,
2622
+ //
2623
+ ...contentProps
2624
+ } = props;
2625
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);
2626
+ const [content, setContent] = $01b9c$useState(null);
2627
+ const [viewport, setViewport] = $01b9c$useState(null);
2628
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
2629
+ forwardedRef,
2630
+ (node) => setContent(node)
2631
+ );
2632
+ const [selectedItem, setSelectedItem] = $01b9c$useState(null);
2633
+ const [selectedItemText, setSelectedItemText] = $01b9c$useState(null);
2634
+ const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
2635
+ const [isPositioned, setIsPositioned] = $01b9c$useState(false);
2636
+ const firstValidItemFoundRef = $01b9c$useRef(false);
2637
+ $01b9c$useEffect(() => {
2638
+ if (content)
2639
+ return hideOthers(content);
2640
+ }, [
2641
+ content
2642
+ ]);
2643
+ $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
2644
+ const focusFirst = $01b9c$useCallback((candidates) => {
2645
+ const [firstItem, ...restItems] = getItems().map(
2646
+ (item) => item.ref.current
2647
+ );
2648
+ const [lastItem] = restItems.slice(-1);
2649
+ const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
2650
+ for (const candidate of candidates) {
2651
+ if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)
2652
+ return;
2653
+ candidate === null || candidate === void 0 || candidate.scrollIntoView({
2654
+ block: "nearest"
2655
+ });
2656
+ if (candidate === firstItem && viewport)
2657
+ viewport.scrollTop = 0;
2658
+ if (candidate === lastItem && viewport)
2659
+ viewport.scrollTop = viewport.scrollHeight;
2660
+ candidate === null || candidate === void 0 || candidate.focus();
2661
+ if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)
2662
+ return;
2663
+ }
2664
+ }, [
2665
+ getItems,
2666
+ viewport
2667
+ ]);
2668
+ const focusSelectedItem = $01b9c$useCallback(
2669
+ () => focusFirst([
2670
+ selectedItem,
2671
+ content
2672
+ ]),
2673
+ [
2674
+ focusFirst,
2675
+ selectedItem,
2676
+ content
2677
+ ]
2678
+ );
2679
+ $01b9c$useEffect(() => {
2680
+ if (isPositioned)
2681
+ focusSelectedItem();
2682
+ }, [
2683
+ isPositioned,
2684
+ focusSelectedItem
2685
+ ]);
2686
+ const { onOpenChange, triggerPointerDownPosRef } = context;
2687
+ $01b9c$useEffect(() => {
2688
+ if (content) {
2689
+ let pointerMoveDelta = {
2690
+ x: 0,
2691
+ y: 0
2692
+ };
2693
+ const handlePointerMove = (event) => {
2694
+ var _triggerPointerDownPo, _triggerPointerDownPo2, _triggerPointerDownPo3, _triggerPointerDownPo4;
2695
+ pointerMoveDelta = {
2696
+ x: Math.abs(Math.round(event.pageX) - ((_triggerPointerDownPo = (_triggerPointerDownPo2 = triggerPointerDownPosRef.current) === null || _triggerPointerDownPo2 === void 0 ? void 0 : _triggerPointerDownPo2.x) !== null && _triggerPointerDownPo !== void 0 ? _triggerPointerDownPo : 0)),
2697
+ y: Math.abs(Math.round(event.pageY) - ((_triggerPointerDownPo3 = (_triggerPointerDownPo4 = triggerPointerDownPosRef.current) === null || _triggerPointerDownPo4 === void 0 ? void 0 : _triggerPointerDownPo4.y) !== null && _triggerPointerDownPo3 !== void 0 ? _triggerPointerDownPo3 : 0))
2698
+ };
2699
+ };
2700
+ const handlePointerUp = (event) => {
2701
+ if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10)
2702
+ event.preventDefault();
2703
+ else if (!content.contains(event.target))
2704
+ onOpenChange(false);
2705
+ document.removeEventListener("pointermove", handlePointerMove);
2706
+ triggerPointerDownPosRef.current = null;
2707
+ };
2708
+ if (triggerPointerDownPosRef.current !== null) {
2709
+ document.addEventListener("pointermove", handlePointerMove);
2710
+ document.addEventListener("pointerup", handlePointerUp, {
2711
+ capture: true,
2712
+ once: true
2713
+ });
2714
+ }
2715
+ return () => {
2716
+ document.removeEventListener("pointermove", handlePointerMove);
2717
+ document.removeEventListener("pointerup", handlePointerUp, {
2718
+ capture: true
2719
+ });
2720
+ };
2721
+ }
2722
+ }, [
2723
+ content,
2724
+ onOpenChange,
2725
+ triggerPointerDownPosRef
2726
+ ]);
2727
+ $01b9c$useEffect(() => {
2728
+ const close = () => onOpenChange(false);
2729
+ window.addEventListener("blur", close);
2730
+ window.addEventListener("resize", close);
2731
+ return () => {
2732
+ window.removeEventListener("blur", close);
2733
+ window.removeEventListener("resize", close);
2734
+ };
2735
+ }, [
2736
+ onOpenChange
2737
+ ]);
2738
+ const [searchRef, handleTypeaheadSearch] = $cc7e05a45900e73f$var$useTypeaheadSearch((search) => {
2739
+ const enabledItems = getItems().filter(
2740
+ (item) => !item.disabled
2741
+ );
2742
+ const currentItem = enabledItems.find(
2743
+ (item) => item.ref.current === document.activeElement
2744
+ );
2745
+ const nextItem = $cc7e05a45900e73f$var$findNextItem(enabledItems, search, currentItem);
2746
+ if (nextItem)
2747
+ setTimeout(
2748
+ () => nextItem.ref.current.focus()
2749
+ );
2750
+ });
2751
+ const itemRefCallback = $01b9c$useCallback((node, value, disabled) => {
2752
+ const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
2753
+ const isSelectedItem = context.value !== void 0 && context.value === value;
2754
+ if (isSelectedItem || isFirstValidItem) {
2755
+ setSelectedItem(node);
2756
+ if (isFirstValidItem)
2757
+ firstValidItemFoundRef.current = true;
2758
+ }
2759
+ }, [
2760
+ context.value
2761
+ ]);
2762
+ const handleItemLeave = $01b9c$useCallback(
2763
+ () => content === null || content === void 0 ? void 0 : content.focus(),
2764
+ [
2765
+ content
2766
+ ]
2767
+ );
2768
+ const itemTextRefCallback = $01b9c$useCallback((node, value, disabled) => {
2769
+ const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
2770
+ const isSelectedItem = context.value !== void 0 && context.value === value;
2771
+ if (isSelectedItem || isFirstValidItem)
2772
+ setSelectedItemText(node);
2773
+ }, [
2774
+ context.value
2775
+ ]);
2776
+ const SelectPosition = position === "popper" ? $cc7e05a45900e73f$var$SelectPopperPosition : $cc7e05a45900e73f$var$SelectItemAlignedPosition;
2777
+ const popperContentProps = SelectPosition === $cc7e05a45900e73f$var$SelectPopperPosition ? {
2778
+ side,
2779
+ sideOffset,
2780
+ align,
2781
+ alignOffset,
2782
+ arrowPadding,
2783
+ collisionBoundary,
2784
+ collisionPadding,
2785
+ sticky,
2786
+ hideWhenDetached,
2787
+ avoidCollisions
2788
+ } : {};
2789
+ return /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectContentProvider, {
2790
+ scope: __scopeSelect,
2791
+ content,
2792
+ viewport,
2793
+ onViewportChange: setViewport,
2794
+ itemRefCallback,
2795
+ selectedItem,
2796
+ onItemLeave: handleItemLeave,
2797
+ itemTextRefCallback,
2798
+ focusSelectedItem,
2799
+ selectedItemText,
2800
+ position,
2801
+ isPositioned,
2802
+ searchRef
2803
+ }, /* @__PURE__ */ $01b9c$createElement(Combination_default, {
2804
+ as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
2805
+ allowPinchZoom: true
2806
+ }, /* @__PURE__ */ $01b9c$createElement($d3863c46a17e8a28$export$20e40289641fbbb6, {
2807
+ asChild: true,
2808
+ trapped: context.open,
2809
+ onMountAutoFocus: (event) => {
2810
+ event.preventDefault();
2811
+ },
2812
+ onUnmountAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(onCloseAutoFocus, (event) => {
2813
+ var _context$trigger;
2814
+ (_context$trigger = context.trigger) === null || _context$trigger === void 0 || _context$trigger.focus({
2815
+ preventScroll: true
2816
+ });
2817
+ event.preventDefault();
2818
+ })
2819
+ }, /* @__PURE__ */ $01b9c$createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, {
2820
+ asChild: true,
2821
+ disableOutsidePointerEvents: true,
2822
+ onEscapeKeyDown,
2823
+ onPointerDownOutside,
2824
+ onFocusOutside: (event) => event.preventDefault(),
2825
+ onDismiss: () => context.onOpenChange(false)
2826
+ }, /* @__PURE__ */ $01b9c$createElement(SelectPosition, _extends({
2827
+ role: "listbox",
2828
+ id: context.contentId,
2829
+ "data-state": context.open ? "open" : "closed",
2830
+ dir: context.dir,
2831
+ onContextMenu: (event) => event.preventDefault()
2832
+ }, contentProps, popperContentProps, {
2833
+ onPlaced: () => setIsPositioned(true),
2834
+ ref: composedRefs,
2835
+ style: {
2836
+ // flex layout so we can place the scroll buttons properly
2837
+ display: "flex",
2838
+ flexDirection: "column",
2839
+ // reset the outline by default as the content MAY get focused
2840
+ outline: "none",
2841
+ ...contentProps.style
2842
+ },
2843
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(contentProps.onKeyDown, (event) => {
2844
+ const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
2845
+ if (event.key === "Tab")
2846
+ event.preventDefault();
2847
+ if (!isModifierKey && event.key.length === 1)
2848
+ handleTypeaheadSearch(event.key);
2849
+ if ([
2850
+ "ArrowUp",
2851
+ "ArrowDown",
2852
+ "Home",
2853
+ "End"
2854
+ ].includes(event.key)) {
2855
+ const items = getItems().filter(
2856
+ (item) => !item.disabled
2857
+ );
2858
+ let candidateNodes = items.map(
2859
+ (item) => item.ref.current
2860
+ );
2861
+ if ([
2862
+ "ArrowUp",
2863
+ "End"
2864
+ ].includes(event.key))
2865
+ candidateNodes = candidateNodes.slice().reverse();
2866
+ if ([
2867
+ "ArrowUp",
2868
+ "ArrowDown"
2869
+ ].includes(event.key)) {
2870
+ const currentElement = event.target;
2871
+ const currentIndex = candidateNodes.indexOf(currentElement);
2872
+ candidateNodes = candidateNodes.slice(currentIndex + 1);
2873
+ }
2874
+ setTimeout(
2875
+ () => focusFirst(candidateNodes)
2876
+ );
2877
+ event.preventDefault();
2878
+ }
2879
+ })
2880
+ }))))));
2881
+ });
2882
+ var $cc7e05a45900e73f$var$SelectItemAlignedPosition = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
2883
+ const { __scopeSelect, onPlaced, ...popperProps } = props;
2884
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);
2885
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);
2886
+ const [contentWrapper, setContentWrapper] = $01b9c$useState(null);
2887
+ const [content, setContent] = $01b9c$useState(null);
2888
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
2889
+ forwardedRef,
2890
+ (node) => setContent(node)
2891
+ );
2892
+ const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
2893
+ const shouldExpandOnScrollRef = $01b9c$useRef(false);
2894
+ const shouldRepositionRef = $01b9c$useRef(true);
2895
+ const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
2896
+ const position = $01b9c$useCallback(() => {
2897
+ if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
2898
+ const triggerRect = context.trigger.getBoundingClientRect();
2899
+ const contentRect = content.getBoundingClientRect();
2900
+ const valueNodeRect = context.valueNode.getBoundingClientRect();
2901
+ const itemTextRect = selectedItemText.getBoundingClientRect();
2902
+ if (context.dir !== "rtl") {
2903
+ const itemTextOffset = itemTextRect.left - contentRect.left;
2904
+ const left = valueNodeRect.left - itemTextOffset;
2905
+ const leftDelta = triggerRect.left - left;
2906
+ const minContentWidth = triggerRect.width + leftDelta;
2907
+ const contentWidth = Math.max(minContentWidth, contentRect.width);
2908
+ const rightEdge = window.innerWidth - $cc7e05a45900e73f$var$CONTENT_MARGIN;
2909
+ const clampedLeft = $ae6933e535247d3d$export$7d15b64cf5a3a4c4(left, [
2910
+ $cc7e05a45900e73f$var$CONTENT_MARGIN,
2911
+ rightEdge - contentWidth
2912
+ ]);
2913
+ contentWrapper.style.minWidth = minContentWidth + "px";
2914
+ contentWrapper.style.left = clampedLeft + "px";
2915
+ } else {
2916
+ const itemTextOffset = contentRect.right - itemTextRect.right;
2917
+ const right = window.innerWidth - valueNodeRect.right - itemTextOffset;
2918
+ const rightDelta = window.innerWidth - triggerRect.right - right;
2919
+ const minContentWidth = triggerRect.width + rightDelta;
2920
+ const contentWidth = Math.max(minContentWidth, contentRect.width);
2921
+ const leftEdge = window.innerWidth - $cc7e05a45900e73f$var$CONTENT_MARGIN;
2922
+ const clampedRight = $ae6933e535247d3d$export$7d15b64cf5a3a4c4(right, [
2923
+ $cc7e05a45900e73f$var$CONTENT_MARGIN,
2924
+ leftEdge - contentWidth
2925
+ ]);
2926
+ contentWrapper.style.minWidth = minContentWidth + "px";
2927
+ contentWrapper.style.right = clampedRight + "px";
2928
+ }
2929
+ const items = getItems();
2930
+ const availableHeight = window.innerHeight - $cc7e05a45900e73f$var$CONTENT_MARGIN * 2;
2931
+ const itemsHeight = viewport.scrollHeight;
2932
+ const contentStyles = window.getComputedStyle(content);
2933
+ const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
2934
+ const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
2935
+ const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
2936
+ const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);
2937
+ const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;
2938
+ const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);
2939
+ const viewportStyles = window.getComputedStyle(viewport);
2940
+ const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);
2941
+ const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);
2942
+ const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - $cc7e05a45900e73f$var$CONTENT_MARGIN;
2943
+ const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;
2944
+ const selectedItemHalfHeight = selectedItem.offsetHeight / 2;
2945
+ const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;
2946
+ const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;
2947
+ const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;
2948
+ const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;
2949
+ if (willAlignWithoutTopOverflow) {
2950
+ const isLastItem = selectedItem === items[items.length - 1].ref.current;
2951
+ contentWrapper.style.bottom = "0px";
2952
+ const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;
2953
+ const clampedTriggerMiddleToBottomEdge = Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);
2954
+ const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;
2955
+ contentWrapper.style.height = height + "px";
2956
+ } else {
2957
+ const isFirstItem = selectedItem === items[0].ref.current;
2958
+ contentWrapper.style.top = "0px";
2959
+ const clampedTopEdgeToTriggerMiddle = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight);
2960
+ const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;
2961
+ contentWrapper.style.height = height + "px";
2962
+ viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;
2963
+ }
2964
+ contentWrapper.style.margin = `${$cc7e05a45900e73f$var$CONTENT_MARGIN}px 0`;
2965
+ contentWrapper.style.minHeight = minContentHeight + "px";
2966
+ contentWrapper.style.maxHeight = availableHeight + "px";
2967
+ onPlaced === null || onPlaced === void 0 || onPlaced();
2968
+ requestAnimationFrame(
2969
+ () => shouldExpandOnScrollRef.current = true
2970
+ );
2971
+ }
2972
+ }, [
2973
+ getItems,
2974
+ context.trigger,
2975
+ context.valueNode,
2976
+ contentWrapper,
2977
+ content,
2978
+ viewport,
2979
+ selectedItem,
2980
+ selectedItemText,
2981
+ context.dir,
2982
+ onPlaced
2983
+ ]);
2984
+ $9f79659886946c16$export$e5c5a5f917a5871c(
2985
+ () => position(),
2986
+ [
2987
+ position
2988
+ ]
2989
+ );
2990
+ const [contentZIndex, setContentZIndex] = $01b9c$useState();
2991
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
2992
+ if (content)
2993
+ setContentZIndex(window.getComputedStyle(content).zIndex);
2994
+ }, [
2995
+ content
2996
+ ]);
2997
+ const handleScrollButtonChange = $01b9c$useCallback((node) => {
2998
+ if (node && shouldRepositionRef.current === true) {
2999
+ position();
3000
+ focusSelectedItem === null || focusSelectedItem === void 0 || focusSelectedItem();
3001
+ shouldRepositionRef.current = false;
3002
+ }
3003
+ }, [
3004
+ position,
3005
+ focusSelectedItem
3006
+ ]);
3007
+ return /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectViewportProvider, {
3008
+ scope: __scopeSelect,
3009
+ contentWrapper,
3010
+ shouldExpandOnScrollRef,
3011
+ onScrollButtonChange: handleScrollButtonChange
3012
+ }, /* @__PURE__ */ $01b9c$createElement("div", {
3013
+ ref: setContentWrapper,
3014
+ style: {
3015
+ display: "flex",
3016
+ flexDirection: "column",
3017
+ position: "fixed",
3018
+ zIndex: contentZIndex
3019
+ }
3020
+ }, /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, popperProps, {
3021
+ ref: composedRefs,
3022
+ style: {
3023
+ // When we get the height of the content, it includes borders. If we were to set
3024
+ // the height without having `boxSizing: 'border-box'` it would be too big.
3025
+ boxSizing: "border-box",
3026
+ // We need to ensure the content doesn't get taller than the wrapper
3027
+ maxHeight: "100%",
3028
+ ...popperProps.style
3029
+ }
3030
+ }))));
3031
+ });
3032
+ var $cc7e05a45900e73f$var$SelectPopperPosition = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3033
+ const { __scopeSelect, align = "start", collisionPadding = $cc7e05a45900e73f$var$CONTENT_MARGIN, ...popperProps } = props;
3034
+ const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);
3035
+ return /* @__PURE__ */ $01b9c$createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2, _extends({}, popperScope, popperProps, {
3036
+ ref: forwardedRef,
3037
+ align,
3038
+ collisionPadding,
3039
+ style: {
3040
+ // Ensure border-box for floating-ui calculations
3041
+ boxSizing: "border-box",
3042
+ ...popperProps.style,
3043
+ "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
3044
+ "--radix-select-content-available-width": "var(--radix-popper-available-width)",
3045
+ "--radix-select-content-available-height": "var(--radix-popper-available-height)",
3046
+ "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
3047
+ "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
3048
+ }
3049
+ }));
3050
+ });
3051
+ var [$cc7e05a45900e73f$var$SelectViewportProvider, $cc7e05a45900e73f$var$useSelectViewportContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, {});
3052
+ var $cc7e05a45900e73f$var$VIEWPORT_NAME = "SelectViewport";
3053
+ var $cc7e05a45900e73f$export$9ed6e7b40248d36d = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3054
+ const { __scopeSelect, ...viewportProps } = props;
3055
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);
3056
+ const viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);
3057
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentContext.onViewportChange);
3058
+ const prevScrollTopRef = $01b9c$useRef(0);
3059
+ return /* @__PURE__ */ $01b9c$createElement($01b9c$Fragment, null, /* @__PURE__ */ $01b9c$createElement("style", {
3060
+ dangerouslySetInnerHTML: {
3061
+ __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
3062
+ }
3063
+ }), /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$Collection.Slot, {
3064
+ scope: __scopeSelect
3065
+ }, /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
3066
+ "data-radix-select-viewport": "",
3067
+ role: "presentation"
3068
+ }, viewportProps, {
3069
+ ref: composedRefs,
3070
+ style: {
3071
+ // we use position: 'relative' here on the `viewport` so that when we call
3072
+ // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
3073
+ // (independent of the scrollUpButton).
3074
+ position: "relative",
3075
+ flex: 1,
3076
+ overflow: "auto",
3077
+ ...viewportProps.style
3078
+ },
3079
+ onScroll: $e42e1063c40fb3ef$export$b9ecd428b558ff10(viewportProps.onScroll, (event) => {
3080
+ const viewport = event.currentTarget;
3081
+ const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
3082
+ if (shouldExpandOnScrollRef !== null && shouldExpandOnScrollRef !== void 0 && shouldExpandOnScrollRef.current && contentWrapper) {
3083
+ const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);
3084
+ if (scrolledBy > 0) {
3085
+ const availableHeight = window.innerHeight - $cc7e05a45900e73f$var$CONTENT_MARGIN * 2;
3086
+ const cssMinHeight = parseFloat(contentWrapper.style.minHeight);
3087
+ const cssHeight = parseFloat(contentWrapper.style.height);
3088
+ const prevHeight = Math.max(cssMinHeight, cssHeight);
3089
+ if (prevHeight < availableHeight) {
3090
+ const nextHeight = prevHeight + scrolledBy;
3091
+ const clampedNextHeight = Math.min(availableHeight, nextHeight);
3092
+ const heightDiff = nextHeight - clampedNextHeight;
3093
+ contentWrapper.style.height = clampedNextHeight + "px";
3094
+ if (contentWrapper.style.bottom === "0px") {
3095
+ viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;
3096
+ contentWrapper.style.justifyContent = "flex-end";
3097
+ }
3098
+ }
3099
+ }
3100
+ }
3101
+ prevScrollTopRef.current = viewport.scrollTop;
3102
+ })
3103
+ }))));
3104
+ });
3105
+ var $cc7e05a45900e73f$var$GROUP_NAME = "SelectGroup";
3106
+ var [$cc7e05a45900e73f$var$SelectGroupContextProvider, $cc7e05a45900e73f$var$useSelectGroupContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$GROUP_NAME);
3107
+ var $cc7e05a45900e73f$export$ee25a334c55de1f4 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3108
+ const { __scopeSelect, ...groupProps } = props;
3109
+ const groupId = $1746a345f3d73bb7$export$f680877a34711e37();
3110
+ return /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectGroupContextProvider, {
3111
+ scope: __scopeSelect,
3112
+ id: groupId
3113
+ }, /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
3114
+ role: "group",
3115
+ "aria-labelledby": groupId
3116
+ }, groupProps, {
3117
+ ref: forwardedRef
3118
+ })));
3119
+ });
3120
+ var $cc7e05a45900e73f$var$LABEL_NAME = "SelectLabel";
3121
+ var $cc7e05a45900e73f$export$f67338d29bd972f8 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3122
+ const { __scopeSelect, ...labelProps } = props;
3123
+ const groupContext = $cc7e05a45900e73f$var$useSelectGroupContext($cc7e05a45900e73f$var$LABEL_NAME, __scopeSelect);
3124
+ return /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
3125
+ id: groupContext.id
3126
+ }, labelProps, {
3127
+ ref: forwardedRef
3128
+ }));
3129
+ });
3130
+ var $cc7e05a45900e73f$var$ITEM_NAME = "SelectItem";
3131
+ var [$cc7e05a45900e73f$var$SelectItemContextProvider, $cc7e05a45900e73f$var$useSelectItemContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$ITEM_NAME);
3132
+ var $cc7e05a45900e73f$export$13ef48a934230896 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3133
+ const { __scopeSelect, value, disabled = false, textValue: textValueProp, ...itemProps } = props;
3134
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);
3135
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);
3136
+ const isSelected = context.value === value;
3137
+ const [textValue, setTextValue] = $01b9c$useState(textValueProp !== null && textValueProp !== void 0 ? textValueProp : "");
3138
+ const [isFocused, setIsFocused] = $01b9c$useState(false);
3139
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node) => {
3140
+ var _contentContext$itemR;
3141
+ return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled);
3142
+ });
3143
+ const textId = $1746a345f3d73bb7$export$f680877a34711e37();
3144
+ const handleSelect = () => {
3145
+ if (!disabled) {
3146
+ context.onValueChange(value);
3147
+ context.onOpenChange(false);
3148
+ }
3149
+ };
3150
+ if (value === "")
3151
+ throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
3152
+ return /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectItemContextProvider, {
3153
+ scope: __scopeSelect,
3154
+ value,
3155
+ disabled,
3156
+ textId,
3157
+ isSelected,
3158
+ onItemTextChange: $01b9c$useCallback((node) => {
3159
+ setTextValue((prevTextValue) => {
3160
+ var _node$textContent;
3161
+ return prevTextValue || ((_node$textContent = node === null || node === void 0 ? void 0 : node.textContent) !== null && _node$textContent !== void 0 ? _node$textContent : "").trim();
3162
+ });
3163
+ }, [])
3164
+ }, /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$Collection.ItemSlot, {
3165
+ scope: __scopeSelect,
3166
+ value,
3167
+ disabled,
3168
+ textValue
3169
+ }, /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
3170
+ role: "option",
3171
+ "aria-labelledby": textId,
3172
+ "data-highlighted": isFocused ? "" : void 0,
3173
+ "aria-selected": isSelected && isFocused,
3174
+ "data-state": isSelected ? "checked" : "unchecked",
3175
+ "aria-disabled": disabled || void 0,
3176
+ "data-disabled": disabled ? "" : void 0,
3177
+ tabIndex: disabled ? void 0 : -1
3178
+ }, itemProps, {
3179
+ ref: composedRefs,
3180
+ onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(
3181
+ itemProps.onFocus,
3182
+ () => setIsFocused(true)
3183
+ ),
3184
+ onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(
3185
+ itemProps.onBlur,
3186
+ () => setIsFocused(false)
3187
+ ),
3188
+ onPointerUp: $e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onPointerUp, handleSelect),
3189
+ onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onPointerMove, (event) => {
3190
+ if (disabled) {
3191
+ var _contentContext$onIte;
3192
+ (_contentContext$onIte = contentContext.onItemLeave) === null || _contentContext$onIte === void 0 || _contentContext$onIte.call(contentContext);
3193
+ } else
3194
+ event.currentTarget.focus({
3195
+ preventScroll: true
3196
+ });
3197
+ }),
3198
+ onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onPointerLeave, (event) => {
3199
+ if (event.currentTarget === document.activeElement) {
3200
+ var _contentContext$onIte2;
3201
+ (_contentContext$onIte2 = contentContext.onItemLeave) === null || _contentContext$onIte2 === void 0 || _contentContext$onIte2.call(contentContext);
3202
+ }
3203
+ }),
3204
+ onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onKeyDown, (event) => {
3205
+ var _contentContext$searc;
3206
+ const isTypingAhead = ((_contentContext$searc = contentContext.searchRef) === null || _contentContext$searc === void 0 ? void 0 : _contentContext$searc.current) !== "";
3207
+ if (isTypingAhead && event.key === " ")
3208
+ return;
3209
+ if ($cc7e05a45900e73f$var$SELECTION_KEYS.includes(event.key))
3210
+ handleSelect();
3211
+ if (event.key === " ")
3212
+ event.preventDefault();
3213
+ })
3214
+ }))));
3215
+ });
3216
+ var $cc7e05a45900e73f$var$ITEM_TEXT_NAME = "SelectItemText";
3217
+ var $cc7e05a45900e73f$export$3572fb0fb821ff49 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3218
+ const { __scopeSelect, className, style, ...itemTextProps } = props;
3219
+ const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
3220
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
3221
+ const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
3222
+ const nativeOptionsContext = $cc7e05a45900e73f$var$useSelectNativeOptionsContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);
3223
+ const [itemTextNode, setItemTextNode] = $01b9c$useState(null);
3224
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
3225
+ forwardedRef,
3226
+ (node) => setItemTextNode(node),
3227
+ itemContext.onItemTextChange,
3228
+ (node) => {
3229
+ var _contentContext$itemT;
3230
+ return (_contentContext$itemT = contentContext.itemTextRefCallback) === null || _contentContext$itemT === void 0 ? void 0 : _contentContext$itemT.call(contentContext, node, itemContext.value, itemContext.disabled);
3231
+ }
3232
+ );
3233
+ const textContent = itemTextNode === null || itemTextNode === void 0 ? void 0 : itemTextNode.textContent;
3234
+ const nativeOption = $01b9c$useMemo(
3235
+ () => /* @__PURE__ */ $01b9c$createElement("option", {
3236
+ key: itemContext.value,
3237
+ value: itemContext.value,
3238
+ disabled: itemContext.disabled
3239
+ }, textContent),
3240
+ [
3241
+ itemContext.disabled,
3242
+ itemContext.value,
3243
+ textContent
3244
+ ]
3245
+ );
3246
+ const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
3247
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
3248
+ onNativeOptionAdd(nativeOption);
3249
+ return () => onNativeOptionRemove(nativeOption);
3250
+ }, [
3251
+ onNativeOptionAdd,
3252
+ onNativeOptionRemove,
3253
+ nativeOption
3254
+ ]);
3255
+ return /* @__PURE__ */ $01b9c$createElement($01b9c$Fragment, null, /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
3256
+ id: itemContext.textId
3257
+ }, itemTextProps, {
3258
+ ref: composedRefs
3259
+ })), itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? /* @__PURE__ */ $01b9c$createPortal(itemTextProps.children, context.valueNode) : null);
3260
+ });
3261
+ var $cc7e05a45900e73f$var$ITEM_INDICATOR_NAME = "SelectItemIndicator";
3262
+ var $cc7e05a45900e73f$export$6b9198de19accfe6 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3263
+ const { __scopeSelect, ...itemIndicatorProps } = props;
3264
+ const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_INDICATOR_NAME, __scopeSelect);
3265
+ return itemContext.isSelected ? /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
3266
+ "aria-hidden": true
3267
+ }, itemIndicatorProps, {
3268
+ ref: forwardedRef
3269
+ })) : null;
3270
+ });
3271
+ var $cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
3272
+ var $cc7e05a45900e73f$export$d8117927658af6d7 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3273
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
3274
+ const viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
3275
+ const [canScrollUp1, setCanScrollUp] = $01b9c$useState(false);
3276
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, viewportContext.onScrollButtonChange);
3277
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
3278
+ if (contentContext.viewport && contentContext.isPositioned) {
3279
+ let handleScroll2 = function() {
3280
+ const canScrollUp = viewport.scrollTop > 0;
3281
+ setCanScrollUp(canScrollUp);
3282
+ };
3283
+ const viewport = contentContext.viewport;
3284
+ handleScroll2();
3285
+ viewport.addEventListener("scroll", handleScroll2);
3286
+ return () => viewport.removeEventListener("scroll", handleScroll2);
3287
+ }
3288
+ }, [
3289
+ contentContext.viewport,
3290
+ contentContext.isPositioned
3291
+ ]);
3292
+ return canScrollUp1 ? /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, _extends({}, props, {
3293
+ ref: composedRefs,
3294
+ onAutoScroll: () => {
3295
+ const { viewport, selectedItem } = contentContext;
3296
+ if (viewport && selectedItem)
3297
+ viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;
3298
+ }
3299
+ })) : null;
3300
+ });
3301
+ var $cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
3302
+ var $cc7e05a45900e73f$export$ff951e476c12189 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3303
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
3304
+ const viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
3305
+ const [canScrollDown1, setCanScrollDown] = $01b9c$useState(false);
3306
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, viewportContext.onScrollButtonChange);
3307
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
3308
+ if (contentContext.viewport && contentContext.isPositioned) {
3309
+ let handleScroll2 = function() {
3310
+ const maxScroll = viewport.scrollHeight - viewport.clientHeight;
3311
+ const canScrollDown = Math.ceil(viewport.scrollTop) < maxScroll;
3312
+ setCanScrollDown(canScrollDown);
3313
+ };
3314
+ const viewport = contentContext.viewport;
3315
+ handleScroll2();
3316
+ viewport.addEventListener("scroll", handleScroll2);
3317
+ return () => viewport.removeEventListener("scroll", handleScroll2);
3318
+ }
3319
+ }, [
3320
+ contentContext.viewport,
3321
+ contentContext.isPositioned
3322
+ ]);
3323
+ return canScrollDown1 ? /* @__PURE__ */ $01b9c$createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, _extends({}, props, {
3324
+ ref: composedRefs,
3325
+ onAutoScroll: () => {
3326
+ const { viewport, selectedItem } = contentContext;
3327
+ if (viewport && selectedItem)
3328
+ viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;
3329
+ }
3330
+ })) : null;
3331
+ });
3332
+ var $cc7e05a45900e73f$var$SelectScrollButtonImpl = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3333
+ const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
3334
+ const contentContext = $cc7e05a45900e73f$var$useSelectContentContext("SelectScrollButton", __scopeSelect);
3335
+ const autoScrollTimerRef = $01b9c$useRef(null);
3336
+ const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
3337
+ const clearAutoScrollTimer = $01b9c$useCallback(() => {
3338
+ if (autoScrollTimerRef.current !== null) {
3339
+ window.clearInterval(autoScrollTimerRef.current);
3340
+ autoScrollTimerRef.current = null;
3341
+ }
3342
+ }, []);
3343
+ $01b9c$useEffect(() => {
3344
+ return () => clearAutoScrollTimer();
3345
+ }, [
3346
+ clearAutoScrollTimer
3347
+ ]);
3348
+ $9f79659886946c16$export$e5c5a5f917a5871c(() => {
3349
+ var _activeItem$ref$curre;
3350
+ const activeItem = getItems().find(
3351
+ (item) => item.ref.current === document.activeElement
3352
+ );
3353
+ activeItem === null || activeItem === void 0 || (_activeItem$ref$curre = activeItem.ref.current) === null || _activeItem$ref$curre === void 0 || _activeItem$ref$curre.scrollIntoView({
3354
+ block: "nearest"
3355
+ });
3356
+ }, [
3357
+ getItems
3358
+ ]);
3359
+ return /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
3360
+ "aria-hidden": true
3361
+ }, scrollIndicatorProps, {
3362
+ ref: forwardedRef,
3363
+ style: {
3364
+ flexShrink: 0,
3365
+ ...scrollIndicatorProps.style
3366
+ },
3367
+ onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(scrollIndicatorProps.onPointerDown, () => {
3368
+ if (autoScrollTimerRef.current === null)
3369
+ autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
3370
+ }),
3371
+ onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(scrollIndicatorProps.onPointerMove, () => {
3372
+ var _contentContext$onIte3;
3373
+ (_contentContext$onIte3 = contentContext.onItemLeave) === null || _contentContext$onIte3 === void 0 || _contentContext$onIte3.call(contentContext);
3374
+ if (autoScrollTimerRef.current === null)
3375
+ autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
3376
+ }),
3377
+ onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(scrollIndicatorProps.onPointerLeave, () => {
3378
+ clearAutoScrollTimer();
3379
+ })
3380
+ }));
3381
+ });
3382
+ var $cc7e05a45900e73f$export$eba4b1df07cb1d3 = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3383
+ const { __scopeSelect, ...separatorProps } = props;
3384
+ return /* @__PURE__ */ $01b9c$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
3385
+ "aria-hidden": true
3386
+ }, separatorProps, {
3387
+ ref: forwardedRef
3388
+ }));
3389
+ });
3390
+ function $cc7e05a45900e73f$var$shouldShowPlaceholder(value) {
3391
+ return value === "" || value === void 0;
3392
+ }
3393
+ var $cc7e05a45900e73f$var$BubbleSelect = /* @__PURE__ */ $01b9c$forwardRef((props, forwardedRef) => {
3394
+ const { value, ...selectProps } = props;
3395
+ const ref = $01b9c$useRef(null);
3396
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
3397
+ const prevValue = $010c2913dbd2fe3d$export$5cae361ad82dce8b(value);
3398
+ $01b9c$useEffect(() => {
3399
+ const select = ref.current;
3400
+ const selectProto = window.HTMLSelectElement.prototype;
3401
+ const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
3402
+ const setValue = descriptor.set;
3403
+ if (prevValue !== value && setValue) {
3404
+ const event = new Event("change", {
3405
+ bubbles: true
3406
+ });
3407
+ setValue.call(select, value);
3408
+ select.dispatchEvent(event);
3409
+ }
3410
+ }, [
3411
+ prevValue,
3412
+ value
3413
+ ]);
3414
+ return /* @__PURE__ */ $01b9c$createElement($ea1ef594cf570d83$export$439d29a4e110a164, {
3415
+ asChild: true
3416
+ }, /* @__PURE__ */ $01b9c$createElement("select", _extends({}, selectProps, {
3417
+ ref: composedRefs,
3418
+ defaultValue: value
3419
+ })));
3420
+ });
3421
+ $cc7e05a45900e73f$var$BubbleSelect.displayName = "BubbleSelect";
3422
+ function $cc7e05a45900e73f$var$useTypeaheadSearch(onSearchChange) {
3423
+ const handleSearchChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onSearchChange);
3424
+ const searchRef = $01b9c$useRef("");
3425
+ const timerRef = $01b9c$useRef(0);
3426
+ const handleTypeaheadSearch = $01b9c$useCallback((key) => {
3427
+ const search = searchRef.current + key;
3428
+ handleSearchChange(search);
3429
+ (function updateSearch(value) {
3430
+ searchRef.current = value;
3431
+ window.clearTimeout(timerRef.current);
3432
+ if (value !== "")
3433
+ timerRef.current = window.setTimeout(
3434
+ () => updateSearch(""),
3435
+ 1e3
3436
+ );
3437
+ })(search);
3438
+ }, [
3439
+ handleSearchChange
3440
+ ]);
3441
+ const resetTypeahead = $01b9c$useCallback(() => {
3442
+ searchRef.current = "";
3443
+ window.clearTimeout(timerRef.current);
3444
+ }, []);
3445
+ $01b9c$useEffect(() => {
3446
+ return () => window.clearTimeout(timerRef.current);
3447
+ }, []);
3448
+ return [
3449
+ searchRef,
3450
+ handleTypeaheadSearch,
3451
+ resetTypeahead
3452
+ ];
3453
+ }
3454
+ function $cc7e05a45900e73f$var$findNextItem(items, search, currentItem) {
3455
+ const isRepeated = search.length > 1 && Array.from(search).every(
3456
+ (char) => char === search[0]
3457
+ );
3458
+ const normalizedSearch = isRepeated ? search[0] : search;
3459
+ const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
3460
+ let wrappedItems = $cc7e05a45900e73f$var$wrapArray(items, Math.max(currentItemIndex, 0));
3461
+ const excludeCurrentItem = normalizedSearch.length === 1;
3462
+ if (excludeCurrentItem)
3463
+ wrappedItems = wrappedItems.filter(
3464
+ (v) => v !== currentItem
3465
+ );
3466
+ const nextItem = wrappedItems.find(
3467
+ (item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase())
3468
+ );
3469
+ return nextItem !== currentItem ? nextItem : void 0;
3470
+ }
3471
+ function $cc7e05a45900e73f$var$wrapArray(array, startIndex) {
3472
+ return array.map(
3473
+ (_, index2) => array[(startIndex + index2) % array.length]
3474
+ );
3475
+ }
3476
+ var $cc7e05a45900e73f$export$be92b6f5f03c0fe9 = $cc7e05a45900e73f$export$ef9b1a59e592288f;
3477
+ var $cc7e05a45900e73f$export$41fb9f06171c75f4 = $cc7e05a45900e73f$export$3ac1e88a1c0b9f1;
3478
+ var $cc7e05a45900e73f$export$4c8d1a57a761ef94 = $cc7e05a45900e73f$export$e288731fd71264f0;
3479
+ var $cc7e05a45900e73f$export$f04a61298a47a40f = $cc7e05a45900e73f$export$99b400cabb58c515;
3480
+ var $cc7e05a45900e73f$export$602eac185826482c = $cc7e05a45900e73f$export$b2af6c9944296213;
3481
+ var $cc7e05a45900e73f$export$7c6e2c02157bb7d2 = $cc7e05a45900e73f$export$c973a4b3cb86a03d;
3482
+ var $cc7e05a45900e73f$export$d5c6c08dc2d3ca7 = $cc7e05a45900e73f$export$9ed6e7b40248d36d;
3483
+ var $cc7e05a45900e73f$export$eb2fcfdbd7ba97d4 = $cc7e05a45900e73f$export$ee25a334c55de1f4;
3484
+ var $cc7e05a45900e73f$export$b04be29aa201d4f5 = $cc7e05a45900e73f$export$f67338d29bd972f8;
3485
+ var $cc7e05a45900e73f$export$6d08773d2e66f8f2 = $cc7e05a45900e73f$export$13ef48a934230896;
3486
+ var $cc7e05a45900e73f$export$d6e5bf9c43ea9319 = $cc7e05a45900e73f$export$3572fb0fb821ff49;
3487
+ var $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b9198de19accfe6;
3488
+ var $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;
3489
+ var $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;
3490
+ var $cc7e05a45900e73f$export$1ff3c3f08ae963c0 = $cc7e05a45900e73f$export$eba4b1df07cb1d3;
3491
+
3492
+ // src/components/Select/select.tsx
3493
+ import { Check, ChevronDown, ChevronUp } from "lucide-react";
3494
+ import { jsx, jsxs } from "react/jsx-runtime";
3495
+ var Select = $cc7e05a45900e73f$export$be92b6f5f03c0fe9;
3496
+ var SelectGroup = $cc7e05a45900e73f$export$eb2fcfdbd7ba97d4;
3497
+ var SelectValue = $cc7e05a45900e73f$export$4c8d1a57a761ef94;
3498
+ var SelectTrigger = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3499
+ $cc7e05a45900e73f$export$41fb9f06171c75f4,
3500
+ {
3501
+ ref,
3502
+ className: cn(
3503
+ "flex h-9 w-full items-center justify-between rounded-md border-0 px-4 py-2 text-base placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
3504
+ className
3505
+ ),
3506
+ ...props,
3507
+ children: [
3508
+ children,
3509
+ /* @__PURE__ */ jsx($cc7e05a45900e73f$export$f04a61298a47a40f, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50 ml-2" }) })
3510
+ ]
3511
+ }
3512
+ ));
3513
+ SelectTrigger.displayName = $cc7e05a45900e73f$export$41fb9f06171c75f4.displayName;
3514
+ var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3515
+ $cc7e05a45900e73f$export$2f60d3ec9ad468f2,
3516
+ {
3517
+ ref,
3518
+ className: cn(
3519
+ "flex cursor-default items-center justify-center py-1",
3520
+ className
3521
+ ),
3522
+ ...props,
3523
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
3524
+ }
3525
+ ));
3526
+ SelectScrollUpButton.displayName = $cc7e05a45900e73f$export$2f60d3ec9ad468f2.displayName;
3527
+ var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3528
+ $cc7e05a45900e73f$export$bf1aedc3039c8d63,
3529
+ {
3530
+ ref,
3531
+ className: cn(
3532
+ "flex cursor-default items-center justify-center py-1 data-[highlighted]:bg-[#f1f3f5] data-[highlighted]:text-[#AFE9D2]",
3533
+ className
3534
+ ),
3535
+ ...props,
3536
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
3537
+ }
3538
+ ));
3539
+ SelectScrollDownButton.displayName = $cc7e05a45900e73f$export$bf1aedc3039c8d63.displayName;
3540
+ var SelectContent = React9.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx($cc7e05a45900e73f$export$602eac185826482c, { children: /* @__PURE__ */ jsxs(
3541
+ $cc7e05a45900e73f$export$7c6e2c02157bb7d2,
3542
+ {
3543
+ ref,
3544
+ className: cn(
3545
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3546
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
3547
+ className
3548
+ ),
3549
+ position,
3550
+ ...props,
3551
+ children: [
3552
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
3553
+ /* @__PURE__ */ jsx(
3554
+ $cc7e05a45900e73f$export$d5c6c08dc2d3ca7,
3555
+ {
3556
+ className: cn(
3557
+ "p-1",
3558
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
3559
+ ),
3560
+ children
3561
+ }
3562
+ ),
3563
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
3564
+ ]
3565
+ }
3566
+ ) }));
3567
+ SelectContent.displayName = $cc7e05a45900e73f$export$7c6e2c02157bb7d2.displayName;
3568
+ var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3569
+ $cc7e05a45900e73f$export$b04be29aa201d4f5,
3570
+ {
3571
+ ref,
3572
+ className: cn("text-sm font-semibold", className),
3573
+ ...props
3574
+ }
3575
+ ));
3576
+ SelectLabel.displayName = $cc7e05a45900e73f$export$b04be29aa201d4f5.displayName;
3577
+ var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => {
3578
+ return /* @__PURE__ */ jsxs(
3579
+ $cc7e05a45900e73f$export$6d08773d2e66f8f2,
3580
+ {
3581
+ ref,
3582
+ className: cn(
3583
+ "h-[2.14rem] p-[1.14rem] relative flex items-center bg-[#FFF] text-[#444] text-[12px] data-[highlighted]:bg-[#7789D3] data-[highlighted]:text-[#fff]",
3584
+ className
3585
+ ),
3586
+ ...props,
3587
+ children: [
3588
+ /* @__PURE__ */ jsx($cc7e05a45900e73f$export$d6e5bf9c43ea9319, { children }),
3589
+ /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 right-3 transform -translate-y-1/2 flex items-center justify-center", children: /* @__PURE__ */ jsx($cc7e05a45900e73f$export$c3468e2714d175fa, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) })
3590
+ ]
3591
+ }
3592
+ );
3593
+ });
3594
+ SelectItem.displayName = $cc7e05a45900e73f$export$6d08773d2e66f8f2.displayName;
3595
+ var SelectSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3596
+ $cc7e05a45900e73f$export$1ff3c3f08ae963c0,
3597
+ {
3598
+ ref,
3599
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
3600
+ ...props
3601
+ }
3602
+ ));
3603
+ SelectSeparator.displayName = $cc7e05a45900e73f$export$1ff3c3f08ae963c0.displayName;
3604
+
3605
+ export {
3606
+ Select,
3607
+ SelectGroup,
3608
+ SelectValue,
3609
+ SelectTrigger,
3610
+ SelectScrollDownButton,
3611
+ SelectContent,
3612
+ SelectLabel,
3613
+ SelectItem,
3614
+ SelectSeparator
3615
+ };
3616
+ //# sourceMappingURL=chunk-SIZYE6WH.js.map