@envive-ai/react-widgets 0.1.2 → 0.1.3

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 (278) hide show
  1. package/dist/SearchResults/SearchResults.cjs +86 -0
  2. package/dist/SearchResults/SearchResults.js +84 -0
  3. package/dist/SearchResults/SearchResultsWidget.cjs +34 -0
  4. package/dist/SearchResults/SearchResultsWidget.js +33 -0
  5. package/dist/SearchResults/index.cjs +2 -122
  6. package/dist/SearchResults/index.d.cts +2 -0
  7. package/dist/SearchResults/index.d.ts +2 -0
  8. package/dist/SearchResults/index.js +1 -119
  9. package/dist/SearchResults/withSearchResults.cjs +18 -0
  10. package/dist/SearchResults/withSearchResults.js +17 -0
  11. package/dist/SearchZeroState/SearchIcon.cjs +48 -0
  12. package/dist/SearchZeroState/SearchIcon.js +45 -0
  13. package/dist/SearchZeroState/SearchOverlay.cjs +42 -0
  14. package/dist/SearchZeroState/SearchOverlay.js +39 -0
  15. package/dist/SearchZeroState/SearchZeroState.cjs +173 -0
  16. package/dist/SearchZeroState/SearchZeroState.d.cts +7 -0
  17. package/dist/SearchZeroState/SearchZeroState.d.ts +7 -0
  18. package/dist/SearchZeroState/SearchZeroState.js +171 -0
  19. package/dist/SearchZeroState/SearchZeroStateWidget.cjs +23 -0
  20. package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +15 -0
  21. package/dist/SearchZeroState/SearchZeroStateWidget.d.ts +15 -0
  22. package/dist/SearchZeroState/SearchZeroStateWidget.js +22 -0
  23. package/dist/SearchZeroState/components/RecommendedProducts.cjs +74 -0
  24. package/dist/SearchZeroState/components/RecommendedProducts.js +72 -0
  25. package/dist/SearchZeroState/index.cjs +4 -3070
  26. package/dist/SearchZeroState/index.d.cts +4 -0
  27. package/dist/SearchZeroState/index.d.ts +4 -0
  28. package/dist/SearchZeroState/index.js +2 -3065
  29. package/dist/SearchZeroState/overlay/overlayHostLocator.cjs +21 -0
  30. package/dist/SearchZeroState/overlay/overlayHostLocator.js +20 -0
  31. package/dist/SearchZeroState/types.d.cts +10 -0
  32. package/dist/SearchZeroState/types.d.ts +10 -0
  33. package/dist/SearchZeroState/zeroStateSearchVariants.cjs +21 -0
  34. package/dist/SearchZeroState/zeroStateSearchVariants.js +20 -0
  35. package/dist/SuggestionBar/SuggestionBar.cjs +74 -0
  36. package/dist/SuggestionBar/{index-DZU9kbWS.d.cts → SuggestionBar.d.cts} +4 -9
  37. package/dist/SuggestionBar/{index-DyXd4-b7.d.ts → SuggestionBar.d.ts} +6 -11
  38. package/dist/{SuggestionBar-BHAXhgcd.js → SuggestionBar/SuggestionBar.js} +7 -59
  39. package/dist/SuggestionBar/index.cjs +3 -3
  40. package/dist/SuggestionBar/index.d.cts +3 -0
  41. package/dist/SuggestionBar/index.d.ts +3 -0
  42. package/dist/SuggestionBar/index.js +2 -2
  43. package/dist/SuggestionBar/types.cjs +10 -0
  44. package/dist/SuggestionBar/types.d.cts +7 -0
  45. package/dist/SuggestionBar/types.d.ts +7 -0
  46. package/dist/SuggestionBar/types.js +9 -0
  47. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +76 -0
  48. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +6 -0
  49. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +6 -0
  50. package/dist/{SuggestionButtonContainer-s2e9YGW_.js → SuggestionButtonContainer/SuggestionButtonContainer.js} +6 -98
  51. package/dist/SuggestionButtonContainer/index.cjs +1 -1
  52. package/dist/SuggestionButtonContainer/index.d.cts +3 -0
  53. package/dist/SuggestionButtonContainer/index.d.ts +3 -0
  54. package/dist/SuggestionButtonContainer/index.js +1 -1
  55. package/dist/SuggestionButtonContainer/{index-B_X537jw.d.cts → types.d.cts} +1 -4
  56. package/dist/SuggestionButtonContainer/{index-vwelzDzM.d.ts → types.d.ts} +1 -4
  57. package/dist/{chunk-DSlc6foC.cjs → _virtual/rolldown_runtime.cjs} +2 -12
  58. package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
  59. package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
  60. package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
  61. package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
  62. package/dist/node_modules/react-icons/md/index.cjs +35 -0
  63. package/dist/node_modules/react-icons/md/index.js +35 -0
  64. package/dist/{SuggestionBar-CK5aU2bb.cjs → node_modules/react-indiana-drag-scroll/dist/index.cjs} +6 -132
  65. package/dist/node_modules/uuid/dist/native.js +6 -0
  66. package/dist/node_modules/uuid/dist/rng.js +13 -0
  67. package/dist/node_modules/uuid/dist/stringify.js +9 -0
  68. package/dist/node_modules/uuid/dist/v4.js +27 -0
  69. package/dist/node_modules/uuid/dist-node/native.cjs +8 -0
  70. package/dist/node_modules/uuid/dist-node/rng.cjs +16 -0
  71. package/dist/node_modules/uuid/dist-node/stringify.cjs +10 -0
  72. package/dist/node_modules/uuid/dist-node/v4.cjs +27 -0
  73. package/dist/packages/components/dist/components/Accordion/Accordion.cjs +80 -0
  74. package/dist/packages/components/dist/components/Accordion/Accordion.js +78 -0
  75. package/dist/packages/components/dist/components/Accordion/index.cjs +1 -0
  76. package/dist/packages/components/dist/components/Accordion/index.js +1 -0
  77. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.cjs +30 -0
  78. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.js +29 -0
  79. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.cjs +56 -0
  80. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.js +54 -0
  81. package/dist/packages/components/dist/components/ButtonBase/index.cjs +2 -0
  82. package/dist/packages/components/dist/components/ButtonBase/index.js +2 -0
  83. package/dist/packages/components/dist/components/ButtonBase/types.cjs +11 -0
  84. package/dist/packages/components/dist/components/ButtonBase/types.js +10 -0
  85. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.cjs +45 -0
  86. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.js +42 -0
  87. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +33 -0
  88. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +30 -0
  89. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.cjs +45 -0
  90. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.js +42 -0
  91. package/dist/packages/components/dist/components/ImageWithFallback/index.cjs +1 -0
  92. package/dist/packages/components/dist/components/ImageWithFallback/index.js +1 -0
  93. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.cjs +30 -0
  94. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.js +29 -0
  95. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.cjs +26 -0
  96. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.js +24 -0
  97. package/dist/packages/components/dist/components/ModalSheet/desktop/index.cjs +122 -0
  98. package/dist/packages/components/dist/components/ModalSheet/desktop/index.js +120 -0
  99. package/dist/packages/components/dist/components/ModalSheet/index.cjs +1 -0
  100. package/dist/packages/components/dist/components/ModalSheet/index.js +1 -0
  101. package/dist/packages/components/dist/components/ModalSheet/mobile/index.cjs +116 -0
  102. package/dist/packages/components/dist/components/ModalSheet/mobile/index.js +114 -0
  103. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.cjs +38 -0
  104. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.js +36 -0
  105. package/dist/packages/components/dist/components/ProductCard/ProductCard.cjs +153 -0
  106. package/dist/packages/components/dist/components/ProductCard/ProductCard.js +149 -0
  107. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.cjs +33 -0
  108. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.js +31 -0
  109. package/dist/packages/components/dist/components/ProductCard/index.cjs +4 -0
  110. package/dist/packages/components/dist/components/ProductCard/index.js +4 -0
  111. package/dist/packages/components/dist/components/ProductCard/productCardVariants.cjs +49 -0
  112. package/dist/packages/components/dist/components/ProductCard/productCardVariants.js +45 -0
  113. package/dist/packages/components/dist/components/ProductCard/types.cjs +10 -0
  114. package/dist/packages/components/dist/components/ProductCard/types.js +9 -0
  115. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.cjs +43 -0
  116. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.js +41 -0
  117. package/dist/packages/components/dist/components/ProductGrid/index.cjs +2 -0
  118. package/dist/packages/components/dist/components/ProductGrid/index.js +2 -0
  119. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.cjs +21 -0
  120. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.js +20 -0
  121. package/dist/packages/components/dist/components/RadioButton/RadioButton.cjs +74 -0
  122. package/dist/packages/components/dist/components/RadioButton/RadioButton.js +72 -0
  123. package/dist/packages/components/dist/components/RadioButton/index.cjs +1 -0
  124. package/dist/packages/components/dist/components/RadioButton/index.js +1 -0
  125. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.cjs +42 -0
  126. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.js +39 -0
  127. package/dist/packages/components/dist/components/RadioButtonGroup/index.cjs +1 -0
  128. package/dist/packages/components/dist/components/RadioButtonGroup/index.js +1 -0
  129. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.cjs +53 -0
  130. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.js +51 -0
  131. package/dist/packages/components/dist/components/RecommendedProducts/index.cjs +3 -0
  132. package/dist/packages/components/dist/components/RecommendedProducts/index.js +3 -0
  133. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +72 -0
  134. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.js +69 -0
  135. package/dist/packages/components/dist/components/SearchAutocomplete/index.cjs +1 -0
  136. package/dist/packages/components/dist/components/SearchAutocomplete/index.js +1 -0
  137. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.cjs +134 -0
  138. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.js +132 -0
  139. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.cjs +48 -0
  140. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.js +46 -0
  141. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.cjs +42 -0
  142. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.js +40 -0
  143. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.cjs +6 -0
  144. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.js +4 -0
  145. package/dist/packages/components/dist/components/SearchFilter/index.cjs +5 -0
  146. package/dist/packages/components/dist/components/SearchFilter/index.js +5 -0
  147. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.cjs +27 -0
  148. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.js +26 -0
  149. package/dist/packages/components/dist/components/SearchFilter/utils.cjs +11 -0
  150. package/dist/packages/components/dist/components/SearchFilter/utils.js +9 -0
  151. package/dist/packages/components/dist/components/SearchInput/SearchInput.cjs +81 -0
  152. package/dist/packages/components/dist/components/SearchInput/SearchInput.js +78 -0
  153. package/dist/packages/components/dist/components/SearchInput/index.cjs +2 -0
  154. package/dist/packages/components/dist/components/SearchInput/index.js +2 -0
  155. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.cjs +15 -0
  156. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.js +15 -0
  157. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.cjs +57 -0
  158. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.js +55 -0
  159. package/dist/packages/components/dist/components/SearchInputForm/index.cjs +1 -0
  160. package/dist/packages/components/dist/components/SearchInputForm/index.js +1 -0
  161. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
  162. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
  163. package/dist/packages/components/dist/components/SearchResultsContent/index.cjs +1 -0
  164. package/dist/packages/components/dist/components/SearchResultsContent/index.js +1 -0
  165. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +24 -0
  166. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +23 -0
  167. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.cjs +3 -0
  168. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.js +3 -0
  169. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
  170. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
  171. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.cjs +3 -0
  172. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.js +3 -0
  173. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +9 -0
  174. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.js +9 -0
  175. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.cjs +2 -0
  176. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.js +2 -0
  177. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs +34 -0
  178. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +34 -0
  179. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +56 -0
  180. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.js +54 -0
  181. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.cjs +53 -0
  182. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.js +51 -0
  183. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
  184. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +51 -0
  185. package/dist/packages/components/dist/components/SearchResultsStates/index.cjs +3 -0
  186. package/dist/packages/components/dist/components/SearchResultsStates/index.js +3 -0
  187. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
  188. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
  189. package/dist/packages/components/dist/components/SearchResultsToolbar/index.cjs +3 -0
  190. package/dist/packages/components/dist/components/SearchResultsToolbar/index.js +3 -0
  191. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.cjs +77 -0
  192. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.js +75 -0
  193. package/dist/packages/components/dist/components/SparkleAnimation/index.cjs +2 -0
  194. package/dist/packages/components/dist/components/SparkleAnimation/index.js +2 -0
  195. package/dist/packages/components/dist/components/SparkleAnimation/types.cjs +12 -0
  196. package/dist/packages/components/dist/components/SparkleAnimation/types.js +11 -0
  197. package/dist/packages/components/dist/components/Spinner/Spinner.cjs +40 -0
  198. package/dist/packages/components/dist/components/Spinner/Spinner.js +38 -0
  199. package/dist/packages/components/dist/components/Spinner/index.cjs +1 -0
  200. package/dist/packages/components/dist/components/Spinner/index.js +1 -0
  201. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.cjs +193 -0
  202. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.js +188 -0
  203. package/dist/packages/components/dist/components/SuggestionButton/index.cjs +1 -0
  204. package/dist/packages/components/dist/components/SuggestionButton/index.js +1 -0
  205. package/dist/packages/components/dist/components/TextInput/TextInput.cjs +34 -0
  206. package/dist/packages/components/dist/components/TextInput/TextInput.js +31 -0
  207. package/dist/packages/components/dist/components/TextInput/index.cjs +1 -0
  208. package/dist/packages/components/dist/components/TextInput/index.js +1 -0
  209. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.cjs +63 -0
  210. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.js +61 -0
  211. package/dist/packages/components/dist/components/ToggleButton/index.cjs +1 -0
  212. package/dist/packages/components/dist/components/ToggleButton/index.js +1 -0
  213. package/dist/packages/components/dist/components/Typography/Typography.cjs +53 -0
  214. package/dist/packages/components/dist/components/Typography/Typography.js +50 -0
  215. package/dist/packages/components/dist/components/Typography/index.cjs +2 -0
  216. package/dist/packages/components/dist/components/Typography/index.js +2 -0
  217. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.cjs +99 -0
  218. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.js +96 -0
  219. package/dist/packages/components/dist/components/Typography/util.cjs +10 -0
  220. package/dist/packages/components/dist/components/Typography/util.js +10 -0
  221. package/dist/packages/components/dist/logging/logger.cjs +20 -0
  222. package/dist/packages/components/dist/logging/logger.js +19 -0
  223. package/dist/packages/components/dist/models/colorsConfig.cjs +28 -0
  224. package/dist/packages/components/dist/models/colorsConfig.js +26 -0
  225. package/dist/packages/components/dist/util/formatPrice.cjs +14 -0
  226. package/dist/packages/components/dist/util/formatPrice.js +13 -0
  227. package/dist/packages/components/dist/util/index.cjs +3 -0
  228. package/dist/packages/components/dist/util/index.js +3 -0
  229. package/dist/packages/components/dist/util/useScrollDirection.cjs +39 -0
  230. package/dist/packages/components/dist/util/useScrollDirection.js +38 -0
  231. package/dist/packages/components/dist/util/useStickyVisibility.cjs +38 -0
  232. package/dist/packages/components/dist/util/useStickyVisibility.js +37 -0
  233. package/dist/packages/icons/dist/AiSearchBold.cjs +38 -0
  234. package/dist/packages/icons/dist/AiSearchBold.js +38 -0
  235. package/dist/packages/icons/dist/AiSearchThin.cjs +35 -0
  236. package/dist/packages/icons/dist/AiSearchThin.js +35 -0
  237. package/dist/packages/icons/dist/ChevronDown.cjs +23 -0
  238. package/dist/packages/icons/dist/ChevronDown.js +23 -0
  239. package/dist/packages/icons/dist/FourPointStar.cjs +22 -0
  240. package/dist/packages/icons/dist/FourPointStar.js +22 -0
  241. package/dist/packages/icons/dist/IconClose.cjs +26 -0
  242. package/dist/packages/icons/dist/IconClose.js +26 -0
  243. package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
  244. package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
  245. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.cjs +39 -0
  246. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.js +39 -0
  247. package/dist/packages/icons/dist/OutlinedStar.cjs +22 -0
  248. package/dist/packages/icons/dist/OutlinedStar.js +22 -0
  249. package/dist/packages/icons/dist/SettingsVariant.cjs +72 -0
  250. package/dist/packages/icons/dist/SettingsVariant.js +72 -0
  251. package/dist/packages/icons/dist/Sparkles.cjs +43 -0
  252. package/dist/packages/icons/dist/Sparkles.js +43 -0
  253. package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +29 -0
  254. package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +27 -0
  255. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
  256. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
  257. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
  258. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
  259. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
  260. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
  261. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
  262. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
  263. package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
  264. package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
  265. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
  266. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
  267. package/dist/util/useHorizontalScrollAnimation.cjs +88 -0
  268. package/dist/util/useHorizontalScrollAnimation.js +87 -0
  269. package/dist/util/useReducedMotionWithOverride.cjs +15 -0
  270. package/dist/util/useReducedMotionWithOverride.js +14 -0
  271. package/package.json +3 -5
  272. package/src/SearchZeroState/SearchZeroState.tsx +1 -1
  273. package/src/SuggestionBar/SuggestionBar.tsx +2 -2
  274. package/dist/SearchZeroState/index-DSFtalZR.d.ts +0 -27
  275. package/dist/SearchZeroState/index-bEcxYOSF.d.cts +0 -27
  276. package/dist/SuggestionButtonContainer-Dm38gJiJ.cjs +0 -173
  277. /package/dist/SearchResults/{index-DCTxvwmv.d.cts → SearchResultsWidget.d.cts} +0 -0
  278. /package/dist/SearchResults/{index-CYPV3XE0.d.ts → SearchResultsWidget.d.ts} +0 -0
@@ -1,3067 +1,4 @@
1
- import { t as SuggestionBar } from "../SuggestionBar-BHAXhgcd.js";
2
- import "../SuggestionButtonContainer-s2e9YGW_.js";
3
- import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
- import { useNewOrgConfig } from "@envive-ai/react-hooks/hooks/NewOrgConfig";
5
- import classNames from "classnames";
6
- import { useSearch } from "@envive-ai/react-hooks/hooks/Search";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { AnimatePresence, motion } from "framer-motion";
9
- import { useAmplitudeTracking } from "@envive-ai/react-hooks/hooks/AmplitudeOperations";
10
- import { SuggestionBarLocationForMetrics } from "@envive-ai/react-hooks/types";
11
- import { ChatElementDisplayLocation, MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
12
- import { SpiffyMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
13
- import { SearchInputForm } from "@envive-ai/react-toolkit/SearchInputForm";
14
- import { SearchInput, searchInputVariantClasses } from "@envive-ai/react-toolkit/SearchInput";
15
- import { Typography } from "@envive-ai/react-toolkit/Typography";
16
- import { createPortal } from "react-dom";
17
- import { ColorNames, colorVar } from "@envive-ai/react-hooks/contexts/types";
18
- import { ProductGrid } from "@envive-ai/react-toolkit/ProductGrid";
1
+ import { SearchZeroState } from "./SearchZeroState.js";
2
+ import { SearchZeroStateWidget } from "./SearchZeroStateWidget.js";
19
3
 
20
- //#region ../icons/dist/jsx-runtime-X3VJvQR_.js
21
- var __create = Object.create;
22
- var __defProp = Object.defineProperty;
23
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
24
- var __getOwnPropNames = Object.getOwnPropertyNames;
25
- var __getProtoOf = Object.getPrototypeOf;
26
- var __hasOwnProp = Object.prototype.hasOwnProperty;
27
- var __commonJS = (cb, mod) => function() {
28
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
29
- };
30
- var __copyProps = (to, from, except, desc) => {
31
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n$2 = keys.length, key; i < n$2; i++) {
32
- key = keys[i];
33
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
34
- get: ((k$1) => from[k$1]).bind(null, key),
35
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
36
- });
37
- }
38
- return to;
39
- };
40
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
41
- value: mod,
42
- enumerable: true
43
- }) : target, mod));
44
- /**
45
- * @license React
46
- * react.production.min.js
47
- *
48
- * Copyright (c) Facebook, Inc. and its affiliates.
49
- *
50
- * This source code is licensed under the MIT license found in the
51
- * LICENSE file in the root directory of this source tree.
52
- */
53
- var require_react_production_min = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react.production.min.js": ((exports) => {
54
- var l$1 = Symbol.for("react.element"), n$1 = Symbol.for("react.portal"), p$1 = Symbol.for("react.fragment"), q$1 = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator;
55
- function A(a) {
56
- if (null === a || "object" !== typeof a) return null;
57
- a = z && a[z] || a["@@iterator"];
58
- return "function" === typeof a ? a : null;
59
- }
60
- var B = {
61
- isMounted: function() {
62
- return !1;
63
- },
64
- enqueueForceUpdate: function() {},
65
- enqueueReplaceState: function() {},
66
- enqueueSetState: function() {}
67
- }, C = Object.assign, D = {};
68
- function E(a, b, e) {
69
- this.props = a;
70
- this.context = b;
71
- this.refs = D;
72
- this.updater = e || B;
73
- }
74
- E.prototype.isReactComponent = {};
75
- E.prototype.setState = function(a, b) {
76
- if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
77
- this.updater.enqueueSetState(this, a, b, "setState");
78
- };
79
- E.prototype.forceUpdate = function(a) {
80
- this.updater.enqueueForceUpdate(this, a, "forceUpdate");
81
- };
82
- function F() {}
83
- F.prototype = E.prototype;
84
- function G(a, b, e) {
85
- this.props = a;
86
- this.context = b;
87
- this.refs = D;
88
- this.updater = e || B;
89
- }
90
- var H = G.prototype = new F();
91
- H.constructor = G;
92
- C(H, E.prototype);
93
- H.isPureReactComponent = !0;
94
- var I = Array.isArray, J = Object.prototype.hasOwnProperty, K = { current: null }, L = {
95
- key: !0,
96
- ref: !0,
97
- __self: !0,
98
- __source: !0
99
- };
100
- function M(a, b, e) {
101
- var d, c = {}, k$1 = null, h = null;
102
- if (null != b) for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k$1 = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
103
- var g = arguments.length - 2;
104
- if (1 === g) c.children = e;
105
- else if (1 < g) {
106
- for (var f$1 = Array(g), m$1 = 0; m$1 < g; m$1++) f$1[m$1] = arguments[m$1 + 2];
107
- c.children = f$1;
108
- }
109
- if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
110
- return {
111
- $$typeof: l$1,
112
- type: a,
113
- key: k$1,
114
- ref: h,
115
- props: c,
116
- _owner: K.current
117
- };
118
- }
119
- function N(a, b) {
120
- return {
121
- $$typeof: l$1,
122
- type: a.type,
123
- key: b,
124
- ref: a.ref,
125
- props: a.props,
126
- _owner: a._owner
127
- };
128
- }
129
- function O(a) {
130
- return "object" === typeof a && null !== a && a.$$typeof === l$1;
131
- }
132
- function escape(a) {
133
- var b = {
134
- "=": "=0",
135
- ":": "=2"
136
- };
137
- return "$" + a.replace(/[=:]/g, function(a$1) {
138
- return b[a$1];
139
- });
140
- }
141
- var P = /\/+/g;
142
- function Q(a, b) {
143
- return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
144
- }
145
- function R(a, b, e, d, c) {
146
- var k$1 = typeof a;
147
- if ("undefined" === k$1 || "boolean" === k$1) a = null;
148
- var h = !1;
149
- if (null === a) h = !0;
150
- else switch (k$1) {
151
- case "string":
152
- case "number":
153
- h = !0;
154
- break;
155
- case "object": switch (a.$$typeof) {
156
- case l$1:
157
- case n$1: h = !0;
158
- }
159
- }
160
- if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a$1) {
161
- return a$1;
162
- })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
163
- h = 0;
164
- d = "" === d ? "." : d + ":";
165
- if (I(a)) for (var g = 0; g < a.length; g++) {
166
- k$1 = a[g];
167
- var f$1 = d + Q(k$1, g);
168
- h += R(k$1, b, e, f$1, c);
169
- }
170
- else if (f$1 = A(a), "function" === typeof f$1) for (a = f$1.call(a), g = 0; !(k$1 = a.next()).done;) k$1 = k$1.value, f$1 = d + Q(k$1, g++), h += R(k$1, b, e, f$1, c);
171
- else if ("object" === k$1) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
172
- return h;
173
- }
174
- function S(a, b, e) {
175
- if (null == a) return a;
176
- var d = [], c = 0;
177
- R(a, d, "", "", function(a$1) {
178
- return b.call(e, a$1, c++);
179
- });
180
- return d;
181
- }
182
- function T(a) {
183
- if (-1 === a._status) {
184
- var b = a._result;
185
- b = b();
186
- b.then(function(b$1) {
187
- if (0 === a._status || -1 === a._status) a._status = 1, a._result = b$1;
188
- }, function(b$1) {
189
- if (0 === a._status || -1 === a._status) a._status = 2, a._result = b$1;
190
- });
191
- -1 === a._status && (a._status = 0, a._result = b);
192
- }
193
- if (1 === a._status) return a._result.default;
194
- throw a._result;
195
- }
196
- var U = { current: null }, V = { transition: null }, W = {
197
- ReactCurrentDispatcher: U,
198
- ReactCurrentBatchConfig: V,
199
- ReactCurrentOwner: K
200
- };
201
- function X() {
202
- throw Error("act(...) is not supported in production builds of React.");
203
- }
204
- exports.Children = {
205
- map: S,
206
- forEach: function(a, b, e) {
207
- S(a, function() {
208
- b.apply(this, arguments);
209
- }, e);
210
- },
211
- count: function(a) {
212
- var b = 0;
213
- S(a, function() {
214
- b++;
215
- });
216
- return b;
217
- },
218
- toArray: function(a) {
219
- return S(a, function(a$1) {
220
- return a$1;
221
- }) || [];
222
- },
223
- only: function(a) {
224
- if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
225
- return a;
226
- }
227
- };
228
- exports.Component = E;
229
- exports.Fragment = p$1;
230
- exports.Profiler = r;
231
- exports.PureComponent = G;
232
- exports.StrictMode = q$1;
233
- exports.Suspense = w;
234
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
235
- exports.act = X;
236
- exports.cloneElement = function(a, b, e) {
237
- if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
238
- var d = C({}, a.props), c = a.key, k$1 = a.ref, h = a._owner;
239
- if (null != b) {
240
- void 0 !== b.ref && (k$1 = b.ref, h = K.current);
241
- void 0 !== b.key && (c = "" + b.key);
242
- if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
243
- for (f$1 in b) J.call(b, f$1) && !L.hasOwnProperty(f$1) && (d[f$1] = void 0 === b[f$1] && void 0 !== g ? g[f$1] : b[f$1]);
244
- }
245
- var f$1 = arguments.length - 2;
246
- if (1 === f$1) d.children = e;
247
- else if (1 < f$1) {
248
- g = Array(f$1);
249
- for (var m$1 = 0; m$1 < f$1; m$1++) g[m$1] = arguments[m$1 + 2];
250
- d.children = g;
251
- }
252
- return {
253
- $$typeof: l$1,
254
- type: a.type,
255
- key: c,
256
- ref: k$1,
257
- props: d,
258
- _owner: h
259
- };
260
- };
261
- exports.createContext = function(a) {
262
- a = {
263
- $$typeof: u,
264
- _currentValue: a,
265
- _currentValue2: a,
266
- _threadCount: 0,
267
- Provider: null,
268
- Consumer: null,
269
- _defaultValue: null,
270
- _globalName: null
271
- };
272
- a.Provider = {
273
- $$typeof: t,
274
- _context: a
275
- };
276
- return a.Consumer = a;
277
- };
278
- exports.createElement = M;
279
- exports.createFactory = function(a) {
280
- var b = M.bind(null, a);
281
- b.type = a;
282
- return b;
283
- };
284
- exports.createRef = function() {
285
- return { current: null };
286
- };
287
- exports.forwardRef = function(a) {
288
- return {
289
- $$typeof: v,
290
- render: a
291
- };
292
- };
293
- exports.isValidElement = O;
294
- exports.lazy = function(a) {
295
- return {
296
- $$typeof: y,
297
- _payload: {
298
- _status: -1,
299
- _result: a
300
- },
301
- _init: T
302
- };
303
- };
304
- exports.memo = function(a, b) {
305
- return {
306
- $$typeof: x,
307
- type: a,
308
- compare: void 0 === b ? null : b
309
- };
310
- };
311
- exports.startTransition = function(a) {
312
- var b = V.transition;
313
- V.transition = {};
314
- try {
315
- a();
316
- } finally {
317
- V.transition = b;
318
- }
319
- };
320
- exports.unstable_act = X;
321
- exports.useCallback = function(a, b) {
322
- return U.current.useCallback(a, b);
323
- };
324
- exports.useContext = function(a) {
325
- return U.current.useContext(a);
326
- };
327
- exports.useDebugValue = function() {};
328
- exports.useDeferredValue = function(a) {
329
- return U.current.useDeferredValue(a);
330
- };
331
- exports.useEffect = function(a, b) {
332
- return U.current.useEffect(a, b);
333
- };
334
- exports.useId = function() {
335
- return U.current.useId();
336
- };
337
- exports.useImperativeHandle = function(a, b, e) {
338
- return U.current.useImperativeHandle(a, b, e);
339
- };
340
- exports.useInsertionEffect = function(a, b) {
341
- return U.current.useInsertionEffect(a, b);
342
- };
343
- exports.useLayoutEffect = function(a, b) {
344
- return U.current.useLayoutEffect(a, b);
345
- };
346
- exports.useMemo = function(a, b) {
347
- return U.current.useMemo(a, b);
348
- };
349
- exports.useReducer = function(a, b, e) {
350
- return U.current.useReducer(a, b, e);
351
- };
352
- exports.useRef = function(a) {
353
- return U.current.useRef(a);
354
- };
355
- exports.useState = function(a) {
356
- return U.current.useState(a);
357
- };
358
- exports.useSyncExternalStore = function(a, b, e) {
359
- return U.current.useSyncExternalStore(a, b, e);
360
- };
361
- exports.useTransition = function() {
362
- return U.current.useTransition();
363
- };
364
- exports.version = "18.3.1";
365
- }) });
366
- /**
367
- * @license React
368
- * react.development.js
369
- *
370
- * Copyright (c) Facebook, Inc. and its affiliates.
371
- *
372
- * This source code is licensed under the MIT license found in the
373
- * LICENSE file in the root directory of this source tree.
374
- */
375
- var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react.development.js": ((exports, module) => {
376
- if (process.env.NODE_ENV !== "production") (function() {
377
- "use strict";
378
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */ new Error());
379
- var ReactVersion = "18.3.1";
380
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
381
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
382
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
383
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
384
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
385
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
386
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
387
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
388
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
389
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
390
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
391
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
392
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
393
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
394
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
395
- function getIteratorFn(maybeIterable) {
396
- if (maybeIterable === null || typeof maybeIterable !== "object") return null;
397
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
398
- if (typeof maybeIterator === "function") return maybeIterator;
399
- return null;
400
- }
401
- /**
402
- * Keeps track of the current dispatcher.
403
- */
404
- var ReactCurrentDispatcher = { current: null };
405
- /**
406
- * Keeps track of the current batch's configuration such as how long an update
407
- * should suspend for if it needs to.
408
- */
409
- var ReactCurrentBatchConfig = { transition: null };
410
- var ReactCurrentActQueue = {
411
- current: null,
412
- isBatchingLegacy: false,
413
- didScheduleLegacyUpdate: false
414
- };
415
- /**
416
- * Keeps track of the current owner.
417
- *
418
- * The current owner is the component who should own any components that are
419
- * currently being constructed.
420
- */
421
- var ReactCurrentOwner = { current: null };
422
- var ReactDebugCurrentFrame = {};
423
- var currentExtraStackFrame = null;
424
- function setExtraStackFrame(stack) {
425
- currentExtraStackFrame = stack;
426
- }
427
- ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
428
- currentExtraStackFrame = stack;
429
- };
430
- ReactDebugCurrentFrame.getCurrentStack = null;
431
- ReactDebugCurrentFrame.getStackAddendum = function() {
432
- var stack = "";
433
- if (currentExtraStackFrame) stack += currentExtraStackFrame;
434
- var impl = ReactDebugCurrentFrame.getCurrentStack;
435
- if (impl) stack += impl() || "";
436
- return stack;
437
- };
438
- var enableScopeAPI = false;
439
- var enableCacheElement = false;
440
- var enableTransitionTracing = false;
441
- var enableLegacyHidden = false;
442
- var enableDebugTracing = false;
443
- var ReactSharedInternals = {
444
- ReactCurrentDispatcher,
445
- ReactCurrentBatchConfig,
446
- ReactCurrentOwner
447
- };
448
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
449
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
450
- function warn(format) {
451
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
452
- printWarning("warn", format, args);
453
- }
454
- function error(format) {
455
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
456
- printWarning("error", format, args);
457
- }
458
- function printWarning(level, format, args) {
459
- var stack = ReactSharedInternals.ReactDebugCurrentFrame.getStackAddendum();
460
- if (stack !== "") {
461
- format += "%s";
462
- args = args.concat([stack]);
463
- }
464
- var argsWithFormat = args.map(function(item) {
465
- return String(item);
466
- });
467
- argsWithFormat.unshift("Warning: " + format);
468
- Function.prototype.apply.call(console[level], console, argsWithFormat);
469
- }
470
- var didWarnStateUpdateForUnmountedComponent = {};
471
- function warnNoop(publicInstance, callerName) {
472
- var _constructor = publicInstance.constructor;
473
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
474
- var warningKey = componentName + "." + callerName;
475
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) return;
476
- error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
477
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
478
- }
479
- /**
480
- * This is the abstract API for an update queue.
481
- */
482
- var ReactNoopUpdateQueue = {
483
- isMounted: function(publicInstance) {
484
- return false;
485
- },
486
- enqueueForceUpdate: function(publicInstance, callback, callerName) {
487
- warnNoop(publicInstance, "forceUpdate");
488
- },
489
- enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
490
- warnNoop(publicInstance, "replaceState");
491
- },
492
- enqueueSetState: function(publicInstance, partialState, callback, callerName) {
493
- warnNoop(publicInstance, "setState");
494
- }
495
- };
496
- var assign = Object.assign;
497
- var emptyObject = {};
498
- Object.freeze(emptyObject);
499
- /**
500
- * Base class helpers for the updating state of a component.
501
- */
502
- function Component(props, context, updater) {
503
- this.props = props;
504
- this.context = context;
505
- this.refs = emptyObject;
506
- this.updater = updater || ReactNoopUpdateQueue;
507
- }
508
- Component.prototype.isReactComponent = {};
509
- /**
510
- * Sets a subset of the state. Always use this to mutate
511
- * state. You should treat `this.state` as immutable.
512
- *
513
- * There is no guarantee that `this.state` will be immediately updated, so
514
- * accessing `this.state` after calling this method may return the old value.
515
- *
516
- * There is no guarantee that calls to `setState` will run synchronously,
517
- * as they may eventually be batched together. You can provide an optional
518
- * callback that will be executed when the call to setState is actually
519
- * completed.
520
- *
521
- * When a function is provided to setState, it will be called at some point in
522
- * the future (not synchronously). It will be called with the up to date
523
- * component arguments (state, props, context). These values can be different
524
- * from this.* because your function may be called after receiveProps but before
525
- * shouldComponentUpdate, and this new state, props, and context will not yet be
526
- * assigned to this.
527
- *
528
- * @param {object|function} partialState Next partial state or function to
529
- * produce next partial state to be merged with current state.
530
- * @param {?function} callback Called after state is updated.
531
- * @final
532
- * @protected
533
- */
534
- Component.prototype.setState = function(partialState, callback) {
535
- if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
536
- this.updater.enqueueSetState(this, partialState, callback, "setState");
537
- };
538
- /**
539
- * Forces an update. This should only be invoked when it is known with
540
- * certainty that we are **not** in a DOM transaction.
541
- *
542
- * You may want to call this when you know that some deeper aspect of the
543
- * component's state has changed but `setState` was not called.
544
- *
545
- * This will not invoke `shouldComponentUpdate`, but it will invoke
546
- * `componentWillUpdate` and `componentDidUpdate`.
547
- *
548
- * @param {?function} callback Called after update is complete.
549
- * @final
550
- * @protected
551
- */
552
- Component.prototype.forceUpdate = function(callback) {
553
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
554
- };
555
- var deprecatedAPIs = {
556
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
557
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
558
- };
559
- var defineDeprecationWarning = function(methodName, info) {
560
- Object.defineProperty(Component.prototype, methodName, { get: function() {
561
- warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
562
- } });
563
- };
564
- for (var fnName in deprecatedAPIs) if (deprecatedAPIs.hasOwnProperty(fnName)) defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
565
- function ComponentDummy() {}
566
- ComponentDummy.prototype = Component.prototype;
567
- /**
568
- * Convenience component with default shallow equality check for sCU.
569
- */
570
- function PureComponent(props, context, updater) {
571
- this.props = props;
572
- this.context = context;
573
- this.refs = emptyObject;
574
- this.updater = updater || ReactNoopUpdateQueue;
575
- }
576
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
577
- pureComponentPrototype.constructor = PureComponent;
578
- assign(pureComponentPrototype, Component.prototype);
579
- pureComponentPrototype.isPureReactComponent = true;
580
- function createRef() {
581
- var refObject = { current: null };
582
- Object.seal(refObject);
583
- return refObject;
584
- }
585
- var isArrayImpl = Array.isArray;
586
- function isArray(a) {
587
- return isArrayImpl(a);
588
- }
589
- function typeName(value) {
590
- return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
591
- }
592
- function willCoercionThrow(value) {
593
- try {
594
- testStringCoercion(value);
595
- return false;
596
- } catch (e) {
597
- return true;
598
- }
599
- }
600
- function testStringCoercion(value) {
601
- return "" + value;
602
- }
603
- function checkKeyStringCoercion(value) {
604
- if (willCoercionThrow(value)) {
605
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
606
- return testStringCoercion(value);
607
- }
608
- }
609
- function getWrappedName(outerType, innerType, wrapperName) {
610
- var displayName = outerType.displayName;
611
- if (displayName) return displayName;
612
- var functionName = innerType.displayName || innerType.name || "";
613
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
614
- }
615
- function getContextName(type) {
616
- return type.displayName || "Context";
617
- }
618
- function getComponentNameFromType(type) {
619
- if (type == null) return null;
620
- if (typeof type.tag === "number") error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
621
- if (typeof type === "function") return type.displayName || type.name || null;
622
- if (typeof type === "string") return type;
623
- switch (type) {
624
- case REACT_FRAGMENT_TYPE: return "Fragment";
625
- case REACT_PORTAL_TYPE: return "Portal";
626
- case REACT_PROFILER_TYPE: return "Profiler";
627
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
628
- case REACT_SUSPENSE_TYPE: return "Suspense";
629
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
630
- }
631
- if (typeof type === "object") switch (type.$$typeof) {
632
- case REACT_CONTEXT_TYPE: return getContextName(type) + ".Consumer";
633
- case REACT_PROVIDER_TYPE: return getContextName(type._context) + ".Provider";
634
- case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef");
635
- case REACT_MEMO_TYPE:
636
- var outerName = type.displayName || null;
637
- if (outerName !== null) return outerName;
638
- return getComponentNameFromType(type.type) || "Memo";
639
- case REACT_LAZY_TYPE:
640
- var lazyComponent = type;
641
- var payload = lazyComponent._payload;
642
- var init = lazyComponent._init;
643
- try {
644
- return getComponentNameFromType(init(payload));
645
- } catch (x$1) {
646
- return null;
647
- }
648
- }
649
- return null;
650
- }
651
- var hasOwnProperty = Object.prototype.hasOwnProperty;
652
- var RESERVED_PROPS = {
653
- key: true,
654
- ref: true,
655
- __self: true,
656
- __source: true
657
- };
658
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs = {};
659
- function hasValidRef(config) {
660
- if (hasOwnProperty.call(config, "ref")) {
661
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
662
- if (getter && getter.isReactWarning) return false;
663
- }
664
- return config.ref !== void 0;
665
- }
666
- function hasValidKey(config) {
667
- if (hasOwnProperty.call(config, "key")) {
668
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
669
- if (getter && getter.isReactWarning) return false;
670
- }
671
- return config.key !== void 0;
672
- }
673
- function defineKeyPropWarningGetter(props, displayName) {
674
- var warnAboutAccessingKey = function() {
675
- if (!specialPropKeyWarningShown) {
676
- specialPropKeyWarningShown = true;
677
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
678
- }
679
- };
680
- warnAboutAccessingKey.isReactWarning = true;
681
- Object.defineProperty(props, "key", {
682
- get: warnAboutAccessingKey,
683
- configurable: true
684
- });
685
- }
686
- function defineRefPropWarningGetter(props, displayName) {
687
- var warnAboutAccessingRef = function() {
688
- if (!specialPropRefWarningShown) {
689
- specialPropRefWarningShown = true;
690
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
691
- }
692
- };
693
- warnAboutAccessingRef.isReactWarning = true;
694
- Object.defineProperty(props, "ref", {
695
- get: warnAboutAccessingRef,
696
- configurable: true
697
- });
698
- }
699
- function warnIfStringRefCannotBeAutoConverted(config) {
700
- if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
701
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
702
- if (!didWarnAboutStringRefs[componentName]) {
703
- error("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", componentName, config.ref);
704
- didWarnAboutStringRefs[componentName] = true;
705
- }
706
- }
707
- }
708
- /**
709
- * Factory method to create a new React element. This no longer adheres to
710
- * the class pattern, so do not use new to call it. Also, instanceof check
711
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
712
- * if something is a React Element.
713
- *
714
- * @param {*} type
715
- * @param {*} props
716
- * @param {*} key
717
- * @param {string|object} ref
718
- * @param {*} owner
719
- * @param {*} self A *temporary* helper to detect places where `this` is
720
- * different from the `owner` when React.createElement is called, so that we
721
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
722
- * functions, and as long as `this` and owner are the same, there will be no
723
- * change in behavior.
724
- * @param {*} source An annotation object (added by a transpiler or otherwise)
725
- * indicating filename, line number, and/or other information.
726
- * @internal
727
- */
728
- var ReactElement = function(type, key, ref, self, source, owner, props) {
729
- var element = {
730
- $$typeof: REACT_ELEMENT_TYPE,
731
- type,
732
- key,
733
- ref,
734
- props,
735
- _owner: owner
736
- };
737
- element._store = {};
738
- Object.defineProperty(element._store, "validated", {
739
- configurable: false,
740
- enumerable: false,
741
- writable: true,
742
- value: false
743
- });
744
- Object.defineProperty(element, "_self", {
745
- configurable: false,
746
- enumerable: false,
747
- writable: false,
748
- value: self
749
- });
750
- Object.defineProperty(element, "_source", {
751
- configurable: false,
752
- enumerable: false,
753
- writable: false,
754
- value: source
755
- });
756
- if (Object.freeze) {
757
- Object.freeze(element.props);
758
- Object.freeze(element);
759
- }
760
- return element;
761
- };
762
- /**
763
- * Create and return a new ReactElement of the given type.
764
- * See https://reactjs.org/docs/react-api.html#createelement
765
- */
766
- function createElement(type, config, children) {
767
- var propName;
768
- var props = {};
769
- var key = null;
770
- var ref = null;
771
- var self = null;
772
- var source = null;
773
- if (config != null) {
774
- if (hasValidRef(config)) {
775
- ref = config.ref;
776
- warnIfStringRefCannotBeAutoConverted(config);
777
- }
778
- if (hasValidKey(config)) {
779
- checkKeyStringCoercion(config.key);
780
- key = "" + config.key;
781
- }
782
- self = config.__self === void 0 ? null : config.__self;
783
- source = config.__source === void 0 ? null : config.__source;
784
- for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];
785
- }
786
- var childrenLength = arguments.length - 2;
787
- if (childrenLength === 1) props.children = children;
788
- else if (childrenLength > 1) {
789
- var childArray = Array(childrenLength);
790
- for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
791
- if (Object.freeze) Object.freeze(childArray);
792
- props.children = childArray;
793
- }
794
- if (type && type.defaultProps) {
795
- var defaultProps = type.defaultProps;
796
- for (propName in defaultProps) if (props[propName] === void 0) props[propName] = defaultProps[propName];
797
- }
798
- if (key || ref) {
799
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
800
- if (key) defineKeyPropWarningGetter(props, displayName);
801
- if (ref) defineRefPropWarningGetter(props, displayName);
802
- }
803
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
804
- }
805
- function cloneAndReplaceKey(oldElement, newKey) {
806
- return ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
807
- }
808
- /**
809
- * Clone and return a new ReactElement using element as the starting point.
810
- * See https://reactjs.org/docs/react-api.html#cloneelement
811
- */
812
- function cloneElement(element, config, children) {
813
- if (element === null || element === void 0) throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
814
- var propName;
815
- var props = assign({}, element.props);
816
- var key = element.key;
817
- var ref = element.ref;
818
- var self = element._self;
819
- var source = element._source;
820
- var owner = element._owner;
821
- if (config != null) {
822
- if (hasValidRef(config)) {
823
- ref = config.ref;
824
- owner = ReactCurrentOwner.current;
825
- }
826
- if (hasValidKey(config)) {
827
- checkKeyStringCoercion(config.key);
828
- key = "" + config.key;
829
- }
830
- var defaultProps;
831
- if (element.type && element.type.defaultProps) defaultProps = element.type.defaultProps;
832
- for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) if (config[propName] === void 0 && defaultProps !== void 0) props[propName] = defaultProps[propName];
833
- else props[propName] = config[propName];
834
- }
835
- var childrenLength = arguments.length - 2;
836
- if (childrenLength === 1) props.children = children;
837
- else if (childrenLength > 1) {
838
- var childArray = Array(childrenLength);
839
- for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
840
- props.children = childArray;
841
- }
842
- return ReactElement(element.type, key, ref, self, source, owner, props);
843
- }
844
- /**
845
- * Verifies the object is a ReactElement.
846
- * See https://reactjs.org/docs/react-api.html#isvalidelement
847
- * @param {?object} object
848
- * @return {boolean} True if `object` is a ReactElement.
849
- * @final
850
- */
851
- function isValidElement(object) {
852
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
853
- }
854
- var SEPARATOR = ".";
855
- var SUBSEPARATOR = ":";
856
- /**
857
- * Escape and wrap key so it is safe to use as a reactid
858
- *
859
- * @param {string} key to be escaped.
860
- * @return {string} the escaped key.
861
- */
862
- function escape$1(key) {
863
- var escapeRegex = /[=:]/g;
864
- var escaperLookup = {
865
- "=": "=0",
866
- ":": "=2"
867
- };
868
- return "$" + key.replace(escapeRegex, function(match) {
869
- return escaperLookup[match];
870
- });
871
- }
872
- /**
873
- * TODO: Test that a single child and an array with one item have the same key
874
- * pattern.
875
- */
876
- var didWarnAboutMaps = false;
877
- var userProvidedKeyEscapeRegex = /\/+/g;
878
- function escapeUserProvidedKey(text) {
879
- return text.replace(userProvidedKeyEscapeRegex, "$&/");
880
- }
881
- /**
882
- * Generate a key string that identifies a element within a set.
883
- *
884
- * @param {*} element A element that could contain a manual key.
885
- * @param {number} index Index that is used if a manual key is not provided.
886
- * @return {string}
887
- */
888
- function getElementKey(element, index) {
889
- if (typeof element === "object" && element !== null && element.key != null) {
890
- checkKeyStringCoercion(element.key);
891
- return escape$1("" + element.key);
892
- }
893
- return index.toString(36);
894
- }
895
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
896
- var type = typeof children;
897
- if (type === "undefined" || type === "boolean") children = null;
898
- var invokeCallback = false;
899
- if (children === null) invokeCallback = true;
900
- else switch (type) {
901
- case "string":
902
- case "number":
903
- invokeCallback = true;
904
- break;
905
- case "object": switch (children.$$typeof) {
906
- case REACT_ELEMENT_TYPE:
907
- case REACT_PORTAL_TYPE: invokeCallback = true;
908
- }
909
- }
910
- if (invokeCallback) {
911
- var _child = children;
912
- var mappedChild = callback(_child);
913
- var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
914
- if (isArray(mappedChild)) {
915
- var escapedChildKey = "";
916
- if (childKey != null) escapedChildKey = escapeUserProvidedKey(childKey) + "/";
917
- mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
918
- return c;
919
- });
920
- } else if (mappedChild != null) {
921
- if (isValidElement(mappedChild)) {
922
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) checkKeyStringCoercion(mappedChild.key);
923
- mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey);
924
- }
925
- array.push(mappedChild);
926
- }
927
- return 1;
928
- }
929
- var child;
930
- var nextName;
931
- var subtreeCount = 0;
932
- var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
933
- if (isArray(children)) for (var i = 0; i < children.length; i++) {
934
- child = children[i];
935
- nextName = nextNamePrefix + getElementKey(child, i);
936
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
937
- }
938
- else {
939
- var iteratorFn = getIteratorFn(children);
940
- if (typeof iteratorFn === "function") {
941
- var iterableChildren = children;
942
- if (iteratorFn === iterableChildren.entries) {
943
- if (!didWarnAboutMaps) warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
944
- didWarnAboutMaps = true;
945
- }
946
- var iterator = iteratorFn.call(iterableChildren);
947
- var step;
948
- var ii = 0;
949
- while (!(step = iterator.next()).done) {
950
- child = step.value;
951
- nextName = nextNamePrefix + getElementKey(child, ii++);
952
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
953
- }
954
- } else if (type === "object") {
955
- var childrenString = String(children);
956
- throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
957
- }
958
- }
959
- return subtreeCount;
960
- }
961
- /**
962
- * Maps children that are typically specified as `props.children`.
963
- *
964
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
965
- *
966
- * The provided mapFunction(child, index) will be called for each
967
- * leaf child.
968
- *
969
- * @param {?*} children Children tree container.
970
- * @param {function(*, int)} func The map function.
971
- * @param {*} context Context for mapFunction.
972
- * @return {object} Object containing the ordered map of results.
973
- */
974
- function mapChildren(children, func, context) {
975
- if (children == null) return children;
976
- var result = [];
977
- var count = 0;
978
- mapIntoArray(children, result, "", "", function(child) {
979
- return func.call(context, child, count++);
980
- });
981
- return result;
982
- }
983
- /**
984
- * Count the number of children that are typically specified as
985
- * `props.children`.
986
- *
987
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
988
- *
989
- * @param {?*} children Children tree container.
990
- * @return {number} The number of children.
991
- */
992
- function countChildren(children) {
993
- var n$2 = 0;
994
- mapChildren(children, function() {
995
- n$2++;
996
- });
997
- return n$2;
998
- }
999
- /**
1000
- * Iterates through children that are typically specified as `props.children`.
1001
- *
1002
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1003
- *
1004
- * The provided forEachFunc(child, index) will be called for each
1005
- * leaf child.
1006
- *
1007
- * @param {?*} children Children tree container.
1008
- * @param {function(*, int)} forEachFunc
1009
- * @param {*} forEachContext Context for forEachContext.
1010
- */
1011
- function forEachChildren(children, forEachFunc, forEachContext) {
1012
- mapChildren(children, function() {
1013
- forEachFunc.apply(this, arguments);
1014
- }, forEachContext);
1015
- }
1016
- /**
1017
- * Flatten a children object (typically specified as `props.children`) and
1018
- * return an array with appropriately re-keyed children.
1019
- *
1020
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1021
- */
1022
- function toArray(children) {
1023
- return mapChildren(children, function(child) {
1024
- return child;
1025
- }) || [];
1026
- }
1027
- /**
1028
- * Returns the first child in a collection of children and verifies that there
1029
- * is only one child in the collection.
1030
- *
1031
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1032
- *
1033
- * The current implementation of this function assumes that a single child gets
1034
- * passed without a wrapper, but the purpose of this helper function is to
1035
- * abstract away the particular structure of children.
1036
- *
1037
- * @param {?object} children Child collection structure.
1038
- * @return {ReactElement} The first and only `ReactElement` contained in the
1039
- * structure.
1040
- */
1041
- function onlyChild(children) {
1042
- if (!isValidElement(children)) throw new Error("React.Children.only expected to receive a single React element child.");
1043
- return children;
1044
- }
1045
- function createContext(defaultValue) {
1046
- var context = {
1047
- $$typeof: REACT_CONTEXT_TYPE,
1048
- _currentValue: defaultValue,
1049
- _currentValue2: defaultValue,
1050
- _threadCount: 0,
1051
- Provider: null,
1052
- Consumer: null,
1053
- _defaultValue: null,
1054
- _globalName: null
1055
- };
1056
- context.Provider = {
1057
- $$typeof: REACT_PROVIDER_TYPE,
1058
- _context: context
1059
- };
1060
- var hasWarnedAboutUsingNestedContextConsumers = false;
1061
- var hasWarnedAboutUsingConsumerProvider = false;
1062
- var hasWarnedAboutDisplayNameOnConsumer = false;
1063
- var Consumer = {
1064
- $$typeof: REACT_CONTEXT_TYPE,
1065
- _context: context
1066
- };
1067
- Object.defineProperties(Consumer, {
1068
- Provider: {
1069
- get: function() {
1070
- if (!hasWarnedAboutUsingConsumerProvider) {
1071
- hasWarnedAboutUsingConsumerProvider = true;
1072
- error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
1073
- }
1074
- return context.Provider;
1075
- },
1076
- set: function(_Provider) {
1077
- context.Provider = _Provider;
1078
- }
1079
- },
1080
- _currentValue: {
1081
- get: function() {
1082
- return context._currentValue;
1083
- },
1084
- set: function(_currentValue) {
1085
- context._currentValue = _currentValue;
1086
- }
1087
- },
1088
- _currentValue2: {
1089
- get: function() {
1090
- return context._currentValue2;
1091
- },
1092
- set: function(_currentValue2) {
1093
- context._currentValue2 = _currentValue2;
1094
- }
1095
- },
1096
- _threadCount: {
1097
- get: function() {
1098
- return context._threadCount;
1099
- },
1100
- set: function(_threadCount) {
1101
- context._threadCount = _threadCount;
1102
- }
1103
- },
1104
- Consumer: { get: function() {
1105
- if (!hasWarnedAboutUsingNestedContextConsumers) {
1106
- hasWarnedAboutUsingNestedContextConsumers = true;
1107
- error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
1108
- }
1109
- return context.Consumer;
1110
- } },
1111
- displayName: {
1112
- get: function() {
1113
- return context.displayName;
1114
- },
1115
- set: function(displayName) {
1116
- if (!hasWarnedAboutDisplayNameOnConsumer) {
1117
- warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
1118
- hasWarnedAboutDisplayNameOnConsumer = true;
1119
- }
1120
- }
1121
- }
1122
- });
1123
- context.Consumer = Consumer;
1124
- context._currentRenderer = null;
1125
- context._currentRenderer2 = null;
1126
- return context;
1127
- }
1128
- var Uninitialized = -1;
1129
- var Pending = 0;
1130
- var Resolved = 1;
1131
- var Rejected = 2;
1132
- function lazyInitializer(payload) {
1133
- if (payload._status === Uninitialized) {
1134
- var ctor = payload._result;
1135
- var thenable = ctor();
1136
- thenable.then(function(moduleObject$1) {
1137
- if (payload._status === Pending || payload._status === Uninitialized) {
1138
- var resolved = payload;
1139
- resolved._status = Resolved;
1140
- resolved._result = moduleObject$1;
1141
- }
1142
- }, function(error$1) {
1143
- if (payload._status === Pending || payload._status === Uninitialized) {
1144
- var rejected = payload;
1145
- rejected._status = Rejected;
1146
- rejected._result = error$1;
1147
- }
1148
- });
1149
- if (payload._status === Uninitialized) {
1150
- var pending = payload;
1151
- pending._status = Pending;
1152
- pending._result = thenable;
1153
- }
1154
- }
1155
- if (payload._status === Resolved) {
1156
- var moduleObject = payload._result;
1157
- if (moduleObject === void 0) error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
1158
- if (!("default" in moduleObject)) error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
1159
- return moduleObject.default;
1160
- } else throw payload._result;
1161
- }
1162
- function lazy(ctor) {
1163
- var lazyType = {
1164
- $$typeof: REACT_LAZY_TYPE,
1165
- _payload: {
1166
- _status: Uninitialized,
1167
- _result: ctor
1168
- },
1169
- _init: lazyInitializer
1170
- };
1171
- var defaultProps;
1172
- var propTypes;
1173
- Object.defineProperties(lazyType, {
1174
- defaultProps: {
1175
- configurable: true,
1176
- get: function() {
1177
- return defaultProps;
1178
- },
1179
- set: function(newDefaultProps) {
1180
- error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
1181
- defaultProps = newDefaultProps;
1182
- Object.defineProperty(lazyType, "defaultProps", { enumerable: true });
1183
- }
1184
- },
1185
- propTypes: {
1186
- configurable: true,
1187
- get: function() {
1188
- return propTypes;
1189
- },
1190
- set: function(newPropTypes) {
1191
- error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
1192
- propTypes = newPropTypes;
1193
- Object.defineProperty(lazyType, "propTypes", { enumerable: true });
1194
- }
1195
- }
1196
- });
1197
- return lazyType;
1198
- }
1199
- function forwardRef(render) {
1200
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
1201
- else if (typeof render !== "function") error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
1202
- else if (render.length !== 0 && render.length !== 2) error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
1203
- if (render != null) {
1204
- if (render.defaultProps != null || render.propTypes != null) error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
1205
- }
1206
- var elementType = {
1207
- $$typeof: REACT_FORWARD_REF_TYPE,
1208
- render
1209
- };
1210
- var ownName;
1211
- Object.defineProperty(elementType, "displayName", {
1212
- enumerable: false,
1213
- configurable: true,
1214
- get: function() {
1215
- return ownName;
1216
- },
1217
- set: function(name) {
1218
- ownName = name;
1219
- if (!render.name && !render.displayName) render.displayName = name;
1220
- }
1221
- });
1222
- return elementType;
1223
- }
1224
- var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1225
- function isValidElementType(type) {
1226
- if (typeof type === "string" || typeof type === "function") return true;
1227
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) return true;
1228
- if (typeof type === "object" && type !== null) {
1229
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) return true;
1230
- }
1231
- return false;
1232
- }
1233
- function memo(type, compare) {
1234
- if (!isValidElementType(type)) error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1235
- var elementType = {
1236
- $$typeof: REACT_MEMO_TYPE,
1237
- type,
1238
- compare: compare === void 0 ? null : compare
1239
- };
1240
- var ownName;
1241
- Object.defineProperty(elementType, "displayName", {
1242
- enumerable: false,
1243
- configurable: true,
1244
- get: function() {
1245
- return ownName;
1246
- },
1247
- set: function(name) {
1248
- ownName = name;
1249
- if (!type.name && !type.displayName) type.displayName = name;
1250
- }
1251
- });
1252
- return elementType;
1253
- }
1254
- function resolveDispatcher() {
1255
- var dispatcher = ReactCurrentDispatcher.current;
1256
- if (dispatcher === null) error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1257
- return dispatcher;
1258
- }
1259
- function useContext(Context) {
1260
- var dispatcher = resolveDispatcher();
1261
- if (Context._context !== void 0) {
1262
- var realContext = Context._context;
1263
- if (realContext.Consumer === Context) error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
1264
- else if (realContext.Provider === Context) error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1265
- }
1266
- return dispatcher.useContext(Context);
1267
- }
1268
- function useState$1(initialState) {
1269
- return resolveDispatcher().useState(initialState);
1270
- }
1271
- function useReducer(reducer, initialArg, init) {
1272
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1273
- }
1274
- function useRef$1(initialValue) {
1275
- return resolveDispatcher().useRef(initialValue);
1276
- }
1277
- function useEffect$1(create, deps) {
1278
- return resolveDispatcher().useEffect(create, deps);
1279
- }
1280
- function useInsertionEffect(create, deps) {
1281
- return resolveDispatcher().useInsertionEffect(create, deps);
1282
- }
1283
- function useLayoutEffect(create, deps) {
1284
- return resolveDispatcher().useLayoutEffect(create, deps);
1285
- }
1286
- function useCallback$1(callback, deps) {
1287
- return resolveDispatcher().useCallback(callback, deps);
1288
- }
1289
- function useMemo$1(create, deps) {
1290
- return resolveDispatcher().useMemo(create, deps);
1291
- }
1292
- function useImperativeHandle(ref, create, deps) {
1293
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1294
- }
1295
- function useDebugValue(value, formatterFn) {
1296
- return resolveDispatcher().useDebugValue(value, formatterFn);
1297
- }
1298
- function useTransition() {
1299
- return resolveDispatcher().useTransition();
1300
- }
1301
- function useDeferredValue(value) {
1302
- return resolveDispatcher().useDeferredValue(value);
1303
- }
1304
- function useId() {
1305
- return resolveDispatcher().useId();
1306
- }
1307
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1308
- return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1309
- }
1310
- var disabledDepth = 0;
1311
- var prevLog;
1312
- var prevInfo;
1313
- var prevWarn;
1314
- var prevError;
1315
- var prevGroup;
1316
- var prevGroupCollapsed;
1317
- var prevGroupEnd;
1318
- function disabledLog() {}
1319
- disabledLog.__reactDisabledLog = true;
1320
- function disableLogs() {
1321
- if (disabledDepth === 0) {
1322
- prevLog = console.log;
1323
- prevInfo = console.info;
1324
- prevWarn = console.warn;
1325
- prevError = console.error;
1326
- prevGroup = console.group;
1327
- prevGroupCollapsed = console.groupCollapsed;
1328
- prevGroupEnd = console.groupEnd;
1329
- var props = {
1330
- configurable: true,
1331
- enumerable: true,
1332
- value: disabledLog,
1333
- writable: true
1334
- };
1335
- Object.defineProperties(console, {
1336
- info: props,
1337
- log: props,
1338
- warn: props,
1339
- error: props,
1340
- group: props,
1341
- groupCollapsed: props,
1342
- groupEnd: props
1343
- });
1344
- }
1345
- disabledDepth++;
1346
- }
1347
- function reenableLogs() {
1348
- disabledDepth--;
1349
- if (disabledDepth === 0) {
1350
- var props = {
1351
- configurable: true,
1352
- enumerable: true,
1353
- writable: true
1354
- };
1355
- Object.defineProperties(console, {
1356
- log: assign({}, props, { value: prevLog }),
1357
- info: assign({}, props, { value: prevInfo }),
1358
- warn: assign({}, props, { value: prevWarn }),
1359
- error: assign({}, props, { value: prevError }),
1360
- group: assign({}, props, { value: prevGroup }),
1361
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1362
- groupEnd: assign({}, props, { value: prevGroupEnd })
1363
- });
1364
- }
1365
- if (disabledDepth < 0) error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1366
- }
1367
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1368
- var prefix;
1369
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1370
- if (prefix === void 0) try {
1371
- throw Error();
1372
- } catch (x$1) {
1373
- var match = x$1.stack.trim().match(/\n( *(at )?)/);
1374
- prefix = match && match[1] || "";
1375
- }
1376
- return "\n" + prefix + name;
1377
- }
1378
- var reentry = false;
1379
- var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map)();
1380
- function describeNativeComponentFrame(fn, construct) {
1381
- if (!fn || reentry) return "";
1382
- var frame = componentFrameCache.get(fn);
1383
- if (frame !== void 0) return frame;
1384
- var control;
1385
- reentry = true;
1386
- var previousPrepareStackTrace = Error.prepareStackTrace;
1387
- Error.prepareStackTrace = void 0;
1388
- var previousDispatcher = ReactCurrentDispatcher$1.current;
1389
- ReactCurrentDispatcher$1.current = null;
1390
- disableLogs();
1391
- try {
1392
- if (construct) {
1393
- var Fake = function() {
1394
- throw Error();
1395
- };
1396
- Object.defineProperty(Fake.prototype, "props", { set: function() {
1397
- throw Error();
1398
- } });
1399
- if (typeof Reflect === "object" && Reflect.construct) {
1400
- try {
1401
- Reflect.construct(Fake, []);
1402
- } catch (x$1) {
1403
- control = x$1;
1404
- }
1405
- Reflect.construct(fn, [], Fake);
1406
- } else {
1407
- try {
1408
- Fake.call();
1409
- } catch (x$1) {
1410
- control = x$1;
1411
- }
1412
- fn.call(Fake.prototype);
1413
- }
1414
- } else {
1415
- try {
1416
- throw Error();
1417
- } catch (x$1) {
1418
- control = x$1;
1419
- }
1420
- fn();
1421
- }
1422
- } catch (sample) {
1423
- if (sample && control && typeof sample.stack === "string") {
1424
- var sampleLines = sample.stack.split("\n");
1425
- var controlLines = control.stack.split("\n");
1426
- var s = sampleLines.length - 1;
1427
- var c = controlLines.length - 1;
1428
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) c--;
1429
- for (; s >= 1 && c >= 0; s--, c--) if (sampleLines[s] !== controlLines[c]) {
1430
- if (s !== 1 || c !== 1) do {
1431
- s--;
1432
- c--;
1433
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1434
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1435
- if (fn.displayName && _frame.includes("<anonymous>")) _frame = _frame.replace("<anonymous>", fn.displayName);
1436
- if (typeof fn === "function") componentFrameCache.set(fn, _frame);
1437
- return _frame;
1438
- }
1439
- } while (s >= 1 && c >= 0);
1440
- break;
1441
- }
1442
- }
1443
- } finally {
1444
- reentry = false;
1445
- ReactCurrentDispatcher$1.current = previousDispatcher;
1446
- reenableLogs();
1447
- Error.prepareStackTrace = previousPrepareStackTrace;
1448
- }
1449
- var name = fn ? fn.displayName || fn.name : "";
1450
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1451
- if (typeof fn === "function") componentFrameCache.set(fn, syntheticFrame);
1452
- return syntheticFrame;
1453
- }
1454
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1455
- return describeNativeComponentFrame(fn, false);
1456
- }
1457
- function shouldConstruct(Component$1) {
1458
- var prototype = Component$1.prototype;
1459
- return !!(prototype && prototype.isReactComponent);
1460
- }
1461
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1462
- if (type == null) return "";
1463
- if (typeof type === "function") return describeNativeComponentFrame(type, shouldConstruct(type));
1464
- if (typeof type === "string") return describeBuiltInComponentFrame(type);
1465
- switch (type) {
1466
- case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense");
1467
- case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList");
1468
- }
1469
- if (typeof type === "object") switch (type.$$typeof) {
1470
- case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render);
1471
- case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1472
- case REACT_LAZY_TYPE:
1473
- var lazyComponent = type;
1474
- var payload = lazyComponent._payload;
1475
- var init = lazyComponent._init;
1476
- try {
1477
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1478
- } catch (x$1) {}
1479
- }
1480
- return "";
1481
- }
1482
- var loggedTypeFailures = {};
1483
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1484
- function setCurrentlyValidatingElement(element) {
1485
- if (element) {
1486
- var owner = element._owner;
1487
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1488
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1489
- } else ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1490
- }
1491
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
1492
- var has = Function.call.bind(hasOwnProperty);
1493
- for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
1494
- var error$1 = void 0;
1495
- try {
1496
- if (typeof typeSpecs[typeSpecName] !== "function") {
1497
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1498
- err.name = "Invariant Violation";
1499
- throw err;
1500
- }
1501
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1502
- } catch (ex) {
1503
- error$1 = ex;
1504
- }
1505
- if (error$1 && !(error$1 instanceof Error)) {
1506
- setCurrentlyValidatingElement(element);
1507
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
1508
- setCurrentlyValidatingElement(null);
1509
- }
1510
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1511
- loggedTypeFailures[error$1.message] = true;
1512
- setCurrentlyValidatingElement(element);
1513
- error("Failed %s type: %s", location, error$1.message);
1514
- setCurrentlyValidatingElement(null);
1515
- }
1516
- }
1517
- }
1518
- function setCurrentlyValidatingElement$1(element) {
1519
- if (element) {
1520
- var owner = element._owner;
1521
- setExtraStackFrame(describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null));
1522
- } else setExtraStackFrame(null);
1523
- }
1524
- var propTypesMisspellWarningShown = false;
1525
- function getDeclarationErrorAddendum() {
1526
- if (ReactCurrentOwner.current) {
1527
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1528
- if (name) return "\n\nCheck the render method of `" + name + "`.";
1529
- }
1530
- return "";
1531
- }
1532
- function getSourceInfoErrorAddendum(source) {
1533
- if (source !== void 0) {
1534
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1535
- var lineNumber = source.lineNumber;
1536
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1537
- }
1538
- return "";
1539
- }
1540
- function getSourceInfoErrorAddendumForProps(elementProps) {
1541
- if (elementProps !== null && elementProps !== void 0) return getSourceInfoErrorAddendum(elementProps.__source);
1542
- return "";
1543
- }
1544
- /**
1545
- * Warn if there's no key explicitly set on dynamic arrays of children or
1546
- * object keys are not valid. This allows us to keep track of children between
1547
- * updates.
1548
- */
1549
- var ownerHasKeyUseWarning = {};
1550
- function getCurrentComponentErrorInfo(parentType) {
1551
- var info = getDeclarationErrorAddendum();
1552
- if (!info) {
1553
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1554
- if (parentName) info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1555
- }
1556
- return info;
1557
- }
1558
- /**
1559
- * Warn if the element doesn't have an explicit key assigned to it.
1560
- * This element is in an array. The array could grow and shrink or be
1561
- * reordered. All children that haven't already been validated are required to
1562
- * have a "key" property assigned to it. Error statuses are cached so a warning
1563
- * will only be shown once.
1564
- *
1565
- * @internal
1566
- * @param {ReactElement} element Element that requires a key.
1567
- * @param {*} parentType element's parent's type.
1568
- */
1569
- function validateExplicitKey(element, parentType) {
1570
- if (!element._store || element._store.validated || element.key != null) return;
1571
- element._store.validated = true;
1572
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1573
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) return;
1574
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1575
- var childOwner = "";
1576
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1577
- setCurrentlyValidatingElement$1(element);
1578
- error("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", currentComponentErrorInfo, childOwner);
1579
- setCurrentlyValidatingElement$1(null);
1580
- }
1581
- /**
1582
- * Ensure that every element either is passed in a static location, in an
1583
- * array with an explicit keys property defined, or in an object literal
1584
- * with valid key property.
1585
- *
1586
- * @internal
1587
- * @param {ReactNode} node Statically passed child of any type.
1588
- * @param {*} parentType node's parent's type.
1589
- */
1590
- function validateChildKeys(node, parentType) {
1591
- if (typeof node !== "object") return;
1592
- if (isArray(node)) for (var i = 0; i < node.length; i++) {
1593
- var child = node[i];
1594
- if (isValidElement(child)) validateExplicitKey(child, parentType);
1595
- }
1596
- else if (isValidElement(node)) {
1597
- if (node._store) node._store.validated = true;
1598
- } else if (node) {
1599
- var iteratorFn = getIteratorFn(node);
1600
- if (typeof iteratorFn === "function") {
1601
- if (iteratorFn !== node.entries) {
1602
- var iterator = iteratorFn.call(node);
1603
- var step;
1604
- while (!(step = iterator.next()).done) if (isValidElement(step.value)) validateExplicitKey(step.value, parentType);
1605
- }
1606
- }
1607
- }
1608
- }
1609
- /**
1610
- * Given an element, validate that its props follow the propTypes definition,
1611
- * provided by the type.
1612
- *
1613
- * @param {ReactElement} element
1614
- */
1615
- function validatePropTypes(element) {
1616
- var type = element.type;
1617
- if (type === null || type === void 0 || typeof type === "string") return;
1618
- var propTypes;
1619
- if (typeof type === "function") propTypes = type.propTypes;
1620
- else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) propTypes = type.propTypes;
1621
- else return;
1622
- if (propTypes) {
1623
- var name = getComponentNameFromType(type);
1624
- checkPropTypes(propTypes, element.props, "prop", name, element);
1625
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1626
- propTypesMisspellWarningShown = true;
1627
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", getComponentNameFromType(type) || "Unknown");
1628
- }
1629
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1630
- }
1631
- /**
1632
- * Given a fragment, validate that it can only be provided with fragment props
1633
- * @param {ReactElement} fragment
1634
- */
1635
- function validateFragmentProps(fragment) {
1636
- var keys = Object.keys(fragment.props);
1637
- for (var i = 0; i < keys.length; i++) {
1638
- var key = keys[i];
1639
- if (key !== "children" && key !== "key") {
1640
- setCurrentlyValidatingElement$1(fragment);
1641
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1642
- setCurrentlyValidatingElement$1(null);
1643
- break;
1644
- }
1645
- }
1646
- if (fragment.ref !== null) {
1647
- setCurrentlyValidatingElement$1(fragment);
1648
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
1649
- setCurrentlyValidatingElement$1(null);
1650
- }
1651
- }
1652
- function createElementWithValidation(type, props, children) {
1653
- var validType = isValidElementType(type);
1654
- if (!validType) {
1655
- var info = "";
1656
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
1657
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1658
- if (sourceInfo) info += sourceInfo;
1659
- else info += getDeclarationErrorAddendum();
1660
- var typeString;
1661
- if (type === null) typeString = "null";
1662
- else if (isArray(type)) typeString = "array";
1663
- else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1664
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1665
- info = " Did you accidentally export a JSX literal instead of a component?";
1666
- } else typeString = typeof type;
1667
- error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1668
- }
1669
- var element = createElement.apply(this, arguments);
1670
- if (element == null) return element;
1671
- if (validType) for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i], type);
1672
- if (type === REACT_FRAGMENT_TYPE) validateFragmentProps(element);
1673
- else validatePropTypes(element);
1674
- return element;
1675
- }
1676
- var didWarnAboutDeprecatedCreateFactory = false;
1677
- function createFactoryWithValidation(type) {
1678
- var validatedFactory = createElementWithValidation.bind(null, type);
1679
- validatedFactory.type = type;
1680
- if (!didWarnAboutDeprecatedCreateFactory) {
1681
- didWarnAboutDeprecatedCreateFactory = true;
1682
- warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1683
- }
1684
- Object.defineProperty(validatedFactory, "type", {
1685
- enumerable: false,
1686
- get: function() {
1687
- warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1688
- Object.defineProperty(this, "type", { value: type });
1689
- return type;
1690
- }
1691
- });
1692
- return validatedFactory;
1693
- }
1694
- function cloneElementWithValidation(element, props, children) {
1695
- var newElement = cloneElement.apply(this, arguments);
1696
- for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i], newElement.type);
1697
- validatePropTypes(newElement);
1698
- return newElement;
1699
- }
1700
- function startTransition(scope, options) {
1701
- var prevTransition = ReactCurrentBatchConfig.transition;
1702
- ReactCurrentBatchConfig.transition = {};
1703
- var currentTransition = ReactCurrentBatchConfig.transition;
1704
- ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1705
- try {
1706
- scope();
1707
- } finally {
1708
- ReactCurrentBatchConfig.transition = prevTransition;
1709
- if (prevTransition === null && currentTransition._updatedFibers) {
1710
- if (currentTransition._updatedFibers.size > 10) warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
1711
- currentTransition._updatedFibers.clear();
1712
- }
1713
- }
1714
- }
1715
- var didWarnAboutMessageChannel = false;
1716
- var enqueueTaskImpl = null;
1717
- function enqueueTask(task) {
1718
- if (enqueueTaskImpl === null) try {
1719
- var requireString = ("require" + Math.random()).slice(0, 7);
1720
- enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
1721
- } catch (_err) {
1722
- enqueueTaskImpl = function(callback) {
1723
- if (didWarnAboutMessageChannel === false) {
1724
- didWarnAboutMessageChannel = true;
1725
- if (typeof MessageChannel === "undefined") error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
1726
- }
1727
- var channel = new MessageChannel();
1728
- channel.port1.onmessage = callback;
1729
- channel.port2.postMessage(void 0);
1730
- };
1731
- }
1732
- return enqueueTaskImpl(task);
1733
- }
1734
- var actScopeDepth = 0;
1735
- var didWarnNoAwaitAct = false;
1736
- function act(callback) {
1737
- var prevActScopeDepth = actScopeDepth;
1738
- actScopeDepth++;
1739
- if (ReactCurrentActQueue.current === null) ReactCurrentActQueue.current = [];
1740
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1741
- var result;
1742
- try {
1743
- ReactCurrentActQueue.isBatchingLegacy = true;
1744
- result = callback();
1745
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1746
- var queue = ReactCurrentActQueue.current;
1747
- if (queue !== null) {
1748
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1749
- flushActQueue(queue);
1750
- }
1751
- }
1752
- } catch (error$1) {
1753
- popActScope(prevActScopeDepth);
1754
- throw error$1;
1755
- } finally {
1756
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1757
- }
1758
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
1759
- var thenableResult = result;
1760
- var wasAwaited = false;
1761
- var thenable = { then: function(resolve, reject) {
1762
- wasAwaited = true;
1763
- thenableResult.then(function(returnValue$1) {
1764
- popActScope(prevActScopeDepth);
1765
- if (actScopeDepth === 0) recursivelyFlushAsyncActWork(returnValue$1, resolve, reject);
1766
- else resolve(returnValue$1);
1767
- }, function(error$1) {
1768
- popActScope(prevActScopeDepth);
1769
- reject(error$1);
1770
- });
1771
- } };
1772
- if (!didWarnNoAwaitAct && typeof Promise !== "undefined") Promise.resolve().then(function() {}).then(function() {
1773
- if (!wasAwaited) {
1774
- didWarnNoAwaitAct = true;
1775
- error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
1776
- }
1777
- });
1778
- return thenable;
1779
- } else {
1780
- var returnValue = result;
1781
- popActScope(prevActScopeDepth);
1782
- if (actScopeDepth === 0) {
1783
- var _queue = ReactCurrentActQueue.current;
1784
- if (_queue !== null) {
1785
- flushActQueue(_queue);
1786
- ReactCurrentActQueue.current = null;
1787
- }
1788
- return { then: function(resolve, reject) {
1789
- if (ReactCurrentActQueue.current === null) {
1790
- ReactCurrentActQueue.current = [];
1791
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1792
- } else resolve(returnValue);
1793
- } };
1794
- } else return { then: function(resolve, reject) {
1795
- resolve(returnValue);
1796
- } };
1797
- }
1798
- }
1799
- function popActScope(prevActScopeDepth) {
1800
- if (prevActScopeDepth !== actScopeDepth - 1) error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
1801
- actScopeDepth = prevActScopeDepth;
1802
- }
1803
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1804
- var queue = ReactCurrentActQueue.current;
1805
- if (queue !== null) try {
1806
- flushActQueue(queue);
1807
- enqueueTask(function() {
1808
- if (queue.length === 0) {
1809
- ReactCurrentActQueue.current = null;
1810
- resolve(returnValue);
1811
- } else recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1812
- });
1813
- } catch (error$1) {
1814
- reject(error$1);
1815
- }
1816
- else resolve(returnValue);
1817
- }
1818
- var isFlushing = false;
1819
- function flushActQueue(queue) {
1820
- if (!isFlushing) {
1821
- isFlushing = true;
1822
- var i = 0;
1823
- try {
1824
- for (; i < queue.length; i++) {
1825
- var callback = queue[i];
1826
- do
1827
- callback = callback(true);
1828
- while (callback !== null);
1829
- }
1830
- queue.length = 0;
1831
- } catch (error$1) {
1832
- queue = queue.slice(i + 1);
1833
- throw error$1;
1834
- } finally {
1835
- isFlushing = false;
1836
- }
1837
- }
1838
- }
1839
- var createElement$1 = createElementWithValidation;
1840
- var cloneElement$1 = cloneElementWithValidation;
1841
- var createFactory = createFactoryWithValidation;
1842
- exports.Children = {
1843
- map: mapChildren,
1844
- forEach: forEachChildren,
1845
- count: countChildren,
1846
- toArray,
1847
- only: onlyChild
1848
- };
1849
- exports.Component = Component;
1850
- exports.Fragment = REACT_FRAGMENT_TYPE;
1851
- exports.Profiler = REACT_PROFILER_TYPE;
1852
- exports.PureComponent = PureComponent;
1853
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
1854
- exports.Suspense = REACT_SUSPENSE_TYPE;
1855
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
1856
- exports.act = act;
1857
- exports.cloneElement = cloneElement$1;
1858
- exports.createContext = createContext;
1859
- exports.createElement = createElement$1;
1860
- exports.createFactory = createFactory;
1861
- exports.createRef = createRef;
1862
- exports.forwardRef = forwardRef;
1863
- exports.isValidElement = isValidElement;
1864
- exports.lazy = lazy;
1865
- exports.memo = memo;
1866
- exports.startTransition = startTransition;
1867
- exports.unstable_act = act;
1868
- exports.useCallback = useCallback$1;
1869
- exports.useContext = useContext;
1870
- exports.useDebugValue = useDebugValue;
1871
- exports.useDeferredValue = useDeferredValue;
1872
- exports.useEffect = useEffect$1;
1873
- exports.useId = useId;
1874
- exports.useImperativeHandle = useImperativeHandle;
1875
- exports.useInsertionEffect = useInsertionEffect;
1876
- exports.useLayoutEffect = useLayoutEffect;
1877
- exports.useMemo = useMemo$1;
1878
- exports.useReducer = useReducer;
1879
- exports.useRef = useRef$1;
1880
- exports.useState = useState$1;
1881
- exports.useSyncExternalStore = useSyncExternalStore;
1882
- exports.useTransition = useTransition;
1883
- exports.version = ReactVersion;
1884
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */ new Error());
1885
- })();
1886
- }) });
1887
- var require_react = /* @__PURE__ */ __commonJS({ "../../node_modules/react/index.js": ((exports, module) => {
1888
- if (process.env.NODE_ENV === "production") module.exports = require_react_production_min();
1889
- else module.exports = require_react_development();
1890
- }) });
1891
- /**
1892
- * @license React
1893
- * react-jsx-runtime.production.min.js
1894
- *
1895
- * Copyright (c) Facebook, Inc. and its affiliates.
1896
- *
1897
- * This source code is licensed under the MIT license found in the
1898
- * LICENSE file in the root directory of this source tree.
1899
- */
1900
- var require_react_jsx_runtime_production_min = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react-jsx-runtime.production.min.js": ((exports) => {
1901
- var f = require_react(), k = Symbol.for("react.element"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = {
1902
- key: !0,
1903
- ref: !0,
1904
- __self: !0,
1905
- __source: !0
1906
- };
1907
- function q(c, a, g) {
1908
- var b, d = {}, e = null, h = null;
1909
- void 0 !== g && (e = "" + g);
1910
- void 0 !== a.key && (e = "" + a.key);
1911
- void 0 !== a.ref && (h = a.ref);
1912
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
1913
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
1914
- return {
1915
- $$typeof: k,
1916
- type: c,
1917
- key: e,
1918
- ref: h,
1919
- props: d,
1920
- _owner: n.current
1921
- };
1922
- }
1923
- exports.jsx = q;
1924
- exports.jsxs = q;
1925
- }) });
1926
- /**
1927
- * @license React
1928
- * react-jsx-runtime.development.js
1929
- *
1930
- * Copyright (c) Facebook, Inc. and its affiliates.
1931
- *
1932
- * This source code is licensed under the MIT license found in the
1933
- * LICENSE file in the root directory of this source tree.
1934
- */
1935
- var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react-jsx-runtime.development.js": ((exports) => {
1936
- if (process.env.NODE_ENV !== "production") (function() {
1937
- "use strict";
1938
- var React$1 = require_react();
1939
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
1940
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
1941
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1942
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
1943
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1944
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
1945
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
1946
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
1947
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
1948
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
1949
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
1950
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1951
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
1952
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1953
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
1954
- function getIteratorFn(maybeIterable) {
1955
- if (maybeIterable === null || typeof maybeIterable !== "object") return null;
1956
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
1957
- if (typeof maybeIterator === "function") return maybeIterator;
1958
- return null;
1959
- }
1960
- var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1961
- function error(format) {
1962
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
1963
- printWarning("error", format, args);
1964
- }
1965
- function printWarning(level, format, args) {
1966
- var stack = ReactSharedInternals.ReactDebugCurrentFrame.getStackAddendum();
1967
- if (stack !== "") {
1968
- format += "%s";
1969
- args = args.concat([stack]);
1970
- }
1971
- var argsWithFormat = args.map(function(item) {
1972
- return String(item);
1973
- });
1974
- argsWithFormat.unshift("Warning: " + format);
1975
- Function.prototype.apply.call(console[level], console, argsWithFormat);
1976
- }
1977
- var enableScopeAPI = false;
1978
- var enableCacheElement = false;
1979
- var enableTransitionTracing = false;
1980
- var enableLegacyHidden = false;
1981
- var enableDebugTracing = false;
1982
- var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1983
- function isValidElementType(type) {
1984
- if (typeof type === "string" || typeof type === "function") return true;
1985
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) return true;
1986
- if (typeof type === "object" && type !== null) {
1987
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) return true;
1988
- }
1989
- return false;
1990
- }
1991
- function getWrappedName(outerType, innerType, wrapperName) {
1992
- var displayName = outerType.displayName;
1993
- if (displayName) return displayName;
1994
- var functionName = innerType.displayName || innerType.name || "";
1995
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
1996
- }
1997
- function getContextName(type) {
1998
- return type.displayName || "Context";
1999
- }
2000
- function getComponentNameFromType(type) {
2001
- if (type == null) return null;
2002
- if (typeof type.tag === "number") error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
2003
- if (typeof type === "function") return type.displayName || type.name || null;
2004
- if (typeof type === "string") return type;
2005
- switch (type) {
2006
- case REACT_FRAGMENT_TYPE: return "Fragment";
2007
- case REACT_PORTAL_TYPE: return "Portal";
2008
- case REACT_PROFILER_TYPE: return "Profiler";
2009
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
2010
- case REACT_SUSPENSE_TYPE: return "Suspense";
2011
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
2012
- }
2013
- if (typeof type === "object") switch (type.$$typeof) {
2014
- case REACT_CONTEXT_TYPE: return getContextName(type) + ".Consumer";
2015
- case REACT_PROVIDER_TYPE: return getContextName(type._context) + ".Provider";
2016
- case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef");
2017
- case REACT_MEMO_TYPE:
2018
- var outerName = type.displayName || null;
2019
- if (outerName !== null) return outerName;
2020
- return getComponentNameFromType(type.type) || "Memo";
2021
- case REACT_LAZY_TYPE:
2022
- var lazyComponent = type;
2023
- var payload = lazyComponent._payload;
2024
- var init = lazyComponent._init;
2025
- try {
2026
- return getComponentNameFromType(init(payload));
2027
- } catch (x$1) {
2028
- return null;
2029
- }
2030
- }
2031
- return null;
2032
- }
2033
- var assign = Object.assign;
2034
- var disabledDepth = 0;
2035
- var prevLog;
2036
- var prevInfo;
2037
- var prevWarn;
2038
- var prevError;
2039
- var prevGroup;
2040
- var prevGroupCollapsed;
2041
- var prevGroupEnd;
2042
- function disabledLog() {}
2043
- disabledLog.__reactDisabledLog = true;
2044
- function disableLogs() {
2045
- if (disabledDepth === 0) {
2046
- prevLog = console.log;
2047
- prevInfo = console.info;
2048
- prevWarn = console.warn;
2049
- prevError = console.error;
2050
- prevGroup = console.group;
2051
- prevGroupCollapsed = console.groupCollapsed;
2052
- prevGroupEnd = console.groupEnd;
2053
- var props = {
2054
- configurable: true,
2055
- enumerable: true,
2056
- value: disabledLog,
2057
- writable: true
2058
- };
2059
- Object.defineProperties(console, {
2060
- info: props,
2061
- log: props,
2062
- warn: props,
2063
- error: props,
2064
- group: props,
2065
- groupCollapsed: props,
2066
- groupEnd: props
2067
- });
2068
- }
2069
- disabledDepth++;
2070
- }
2071
- function reenableLogs() {
2072
- disabledDepth--;
2073
- if (disabledDepth === 0) {
2074
- var props = {
2075
- configurable: true,
2076
- enumerable: true,
2077
- writable: true
2078
- };
2079
- Object.defineProperties(console, {
2080
- log: assign({}, props, { value: prevLog }),
2081
- info: assign({}, props, { value: prevInfo }),
2082
- warn: assign({}, props, { value: prevWarn }),
2083
- error: assign({}, props, { value: prevError }),
2084
- group: assign({}, props, { value: prevGroup }),
2085
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
2086
- groupEnd: assign({}, props, { value: prevGroupEnd })
2087
- });
2088
- }
2089
- if (disabledDepth < 0) error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2090
- }
2091
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2092
- var prefix;
2093
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2094
- if (prefix === void 0) try {
2095
- throw Error();
2096
- } catch (x$1) {
2097
- var match = x$1.stack.trim().match(/\n( *(at )?)/);
2098
- prefix = match && match[1] || "";
2099
- }
2100
- return "\n" + prefix + name;
2101
- }
2102
- var reentry = false;
2103
- var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map)();
2104
- function describeNativeComponentFrame(fn, construct) {
2105
- if (!fn || reentry) return "";
2106
- var frame = componentFrameCache.get(fn);
2107
- if (frame !== void 0) return frame;
2108
- var control;
2109
- reentry = true;
2110
- var previousPrepareStackTrace = Error.prepareStackTrace;
2111
- Error.prepareStackTrace = void 0;
2112
- var previousDispatcher = ReactCurrentDispatcher.current;
2113
- ReactCurrentDispatcher.current = null;
2114
- disableLogs();
2115
- try {
2116
- if (construct) {
2117
- var Fake = function() {
2118
- throw Error();
2119
- };
2120
- Object.defineProperty(Fake.prototype, "props", { set: function() {
2121
- throw Error();
2122
- } });
2123
- if (typeof Reflect === "object" && Reflect.construct) {
2124
- try {
2125
- Reflect.construct(Fake, []);
2126
- } catch (x$1) {
2127
- control = x$1;
2128
- }
2129
- Reflect.construct(fn, [], Fake);
2130
- } else {
2131
- try {
2132
- Fake.call();
2133
- } catch (x$1) {
2134
- control = x$1;
2135
- }
2136
- fn.call(Fake.prototype);
2137
- }
2138
- } else {
2139
- try {
2140
- throw Error();
2141
- } catch (x$1) {
2142
- control = x$1;
2143
- }
2144
- fn();
2145
- }
2146
- } catch (sample) {
2147
- if (sample && control && typeof sample.stack === "string") {
2148
- var sampleLines = sample.stack.split("\n");
2149
- var controlLines = control.stack.split("\n");
2150
- var s = sampleLines.length - 1;
2151
- var c = controlLines.length - 1;
2152
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) c--;
2153
- for (; s >= 1 && c >= 0; s--, c--) if (sampleLines[s] !== controlLines[c]) {
2154
- if (s !== 1 || c !== 1) do {
2155
- s--;
2156
- c--;
2157
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2158
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2159
- if (fn.displayName && _frame.includes("<anonymous>")) _frame = _frame.replace("<anonymous>", fn.displayName);
2160
- if (typeof fn === "function") componentFrameCache.set(fn, _frame);
2161
- return _frame;
2162
- }
2163
- } while (s >= 1 && c >= 0);
2164
- break;
2165
- }
2166
- }
2167
- } finally {
2168
- reentry = false;
2169
- ReactCurrentDispatcher.current = previousDispatcher;
2170
- reenableLogs();
2171
- Error.prepareStackTrace = previousPrepareStackTrace;
2172
- }
2173
- var name = fn ? fn.displayName || fn.name : "";
2174
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2175
- if (typeof fn === "function") componentFrameCache.set(fn, syntheticFrame);
2176
- return syntheticFrame;
2177
- }
2178
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2179
- return describeNativeComponentFrame(fn, false);
2180
- }
2181
- function shouldConstruct(Component) {
2182
- var prototype = Component.prototype;
2183
- return !!(prototype && prototype.isReactComponent);
2184
- }
2185
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2186
- if (type == null) return "";
2187
- if (typeof type === "function") return describeNativeComponentFrame(type, shouldConstruct(type));
2188
- if (typeof type === "string") return describeBuiltInComponentFrame(type);
2189
- switch (type) {
2190
- case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense");
2191
- case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList");
2192
- }
2193
- if (typeof type === "object") switch (type.$$typeof) {
2194
- case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render);
2195
- case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2196
- case REACT_LAZY_TYPE:
2197
- var lazyComponent = type;
2198
- var payload = lazyComponent._payload;
2199
- var init = lazyComponent._init;
2200
- try {
2201
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2202
- } catch (x$1) {}
2203
- }
2204
- return "";
2205
- }
2206
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2207
- var loggedTypeFailures = {};
2208
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2209
- function setCurrentlyValidatingElement(element) {
2210
- if (element) {
2211
- var owner = element._owner;
2212
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2213
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2214
- } else ReactDebugCurrentFrame.setExtraStackFrame(null);
2215
- }
2216
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2217
- var has = Function.call.bind(hasOwnProperty);
2218
- for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
2219
- var error$1 = void 0;
2220
- try {
2221
- if (typeof typeSpecs[typeSpecName] !== "function") {
2222
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
2223
- err.name = "Invariant Violation";
2224
- throw err;
2225
- }
2226
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2227
- } catch (ex) {
2228
- error$1 = ex;
2229
- }
2230
- if (error$1 && !(error$1 instanceof Error)) {
2231
- setCurrentlyValidatingElement(element);
2232
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
2233
- setCurrentlyValidatingElement(null);
2234
- }
2235
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2236
- loggedTypeFailures[error$1.message] = true;
2237
- setCurrentlyValidatingElement(element);
2238
- error("Failed %s type: %s", location, error$1.message);
2239
- setCurrentlyValidatingElement(null);
2240
- }
2241
- }
2242
- }
2243
- var isArrayImpl = Array.isArray;
2244
- function isArray(a) {
2245
- return isArrayImpl(a);
2246
- }
2247
- function typeName(value) {
2248
- return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2249
- }
2250
- function willCoercionThrow(value) {
2251
- try {
2252
- testStringCoercion(value);
2253
- return false;
2254
- } catch (e) {
2255
- return true;
2256
- }
2257
- }
2258
- function testStringCoercion(value) {
2259
- return "" + value;
2260
- }
2261
- function checkKeyStringCoercion(value) {
2262
- if (willCoercionThrow(value)) {
2263
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2264
- return testStringCoercion(value);
2265
- }
2266
- }
2267
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2268
- var RESERVED_PROPS = {
2269
- key: true,
2270
- ref: true,
2271
- __self: true,
2272
- __source: true
2273
- };
2274
- var specialPropKeyWarningShown;
2275
- var specialPropRefWarningShown;
2276
- var didWarnAboutStringRefs = {};
2277
- function hasValidRef(config) {
2278
- if (hasOwnProperty.call(config, "ref")) {
2279
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2280
- if (getter && getter.isReactWarning) return false;
2281
- }
2282
- return config.ref !== void 0;
2283
- }
2284
- function hasValidKey(config) {
2285
- if (hasOwnProperty.call(config, "key")) {
2286
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2287
- if (getter && getter.isReactWarning) return false;
2288
- }
2289
- return config.key !== void 0;
2290
- }
2291
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2292
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2293
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2294
- if (!didWarnAboutStringRefs[componentName]) {
2295
- error("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2296
- didWarnAboutStringRefs[componentName] = true;
2297
- }
2298
- }
2299
- }
2300
- function defineKeyPropWarningGetter(props, displayName) {
2301
- var warnAboutAccessingKey = function() {
2302
- if (!specialPropKeyWarningShown) {
2303
- specialPropKeyWarningShown = true;
2304
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2305
- }
2306
- };
2307
- warnAboutAccessingKey.isReactWarning = true;
2308
- Object.defineProperty(props, "key", {
2309
- get: warnAboutAccessingKey,
2310
- configurable: true
2311
- });
2312
- }
2313
- function defineRefPropWarningGetter(props, displayName) {
2314
- var warnAboutAccessingRef = function() {
2315
- if (!specialPropRefWarningShown) {
2316
- specialPropRefWarningShown = true;
2317
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2318
- }
2319
- };
2320
- warnAboutAccessingRef.isReactWarning = true;
2321
- Object.defineProperty(props, "ref", {
2322
- get: warnAboutAccessingRef,
2323
- configurable: true
2324
- });
2325
- }
2326
- /**
2327
- * Factory method to create a new React element. This no longer adheres to
2328
- * the class pattern, so do not use new to call it. Also, instanceof check
2329
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2330
- * if something is a React Element.
2331
- *
2332
- * @param {*} type
2333
- * @param {*} props
2334
- * @param {*} key
2335
- * @param {string|object} ref
2336
- * @param {*} owner
2337
- * @param {*} self A *temporary* helper to detect places where `this` is
2338
- * different from the `owner` when React.createElement is called, so that we
2339
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
2340
- * functions, and as long as `this` and owner are the same, there will be no
2341
- * change in behavior.
2342
- * @param {*} source An annotation object (added by a transpiler or otherwise)
2343
- * indicating filename, line number, and/or other information.
2344
- * @internal
2345
- */
2346
- var ReactElement = function(type, key, ref, self, source, owner, props) {
2347
- var element = {
2348
- $$typeof: REACT_ELEMENT_TYPE,
2349
- type,
2350
- key,
2351
- ref,
2352
- props,
2353
- _owner: owner
2354
- };
2355
- element._store = {};
2356
- Object.defineProperty(element._store, "validated", {
2357
- configurable: false,
2358
- enumerable: false,
2359
- writable: true,
2360
- value: false
2361
- });
2362
- Object.defineProperty(element, "_self", {
2363
- configurable: false,
2364
- enumerable: false,
2365
- writable: false,
2366
- value: self
2367
- });
2368
- Object.defineProperty(element, "_source", {
2369
- configurable: false,
2370
- enumerable: false,
2371
- writable: false,
2372
- value: source
2373
- });
2374
- if (Object.freeze) {
2375
- Object.freeze(element.props);
2376
- Object.freeze(element);
2377
- }
2378
- return element;
2379
- };
2380
- /**
2381
- * https://github.com/reactjs/rfcs/pull/107
2382
- * @param {*} type
2383
- * @param {object} props
2384
- * @param {string} key
2385
- */
2386
- function jsxDEV(type, config, maybeKey, source, self) {
2387
- var propName;
2388
- var props = {};
2389
- var key = null;
2390
- var ref = null;
2391
- if (maybeKey !== void 0) {
2392
- checkKeyStringCoercion(maybeKey);
2393
- key = "" + maybeKey;
2394
- }
2395
- if (hasValidKey(config)) {
2396
- checkKeyStringCoercion(config.key);
2397
- key = "" + config.key;
2398
- }
2399
- if (hasValidRef(config)) {
2400
- ref = config.ref;
2401
- warnIfStringRefCannotBeAutoConverted(config, self);
2402
- }
2403
- for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];
2404
- if (type && type.defaultProps) {
2405
- var defaultProps = type.defaultProps;
2406
- for (propName in defaultProps) if (props[propName] === void 0) props[propName] = defaultProps[propName];
2407
- }
2408
- if (key || ref) {
2409
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2410
- if (key) defineKeyPropWarningGetter(props, displayName);
2411
- if (ref) defineRefPropWarningGetter(props, displayName);
2412
- }
2413
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2414
- }
2415
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2416
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2417
- function setCurrentlyValidatingElement$1(element) {
2418
- if (element) {
2419
- var owner = element._owner;
2420
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2421
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2422
- } else ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2423
- }
2424
- var propTypesMisspellWarningShown = false;
2425
- /**
2426
- * Verifies the object is a ReactElement.
2427
- * See https://reactjs.org/docs/react-api.html#isvalidelement
2428
- * @param {?object} object
2429
- * @return {boolean} True if `object` is a ReactElement.
2430
- * @final
2431
- */
2432
- function isValidElement(object) {
2433
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2434
- }
2435
- function getDeclarationErrorAddendum() {
2436
- if (ReactCurrentOwner$1.current) {
2437
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2438
- if (name) return "\n\nCheck the render method of `" + name + "`.";
2439
- }
2440
- return "";
2441
- }
2442
- function getSourceInfoErrorAddendum(source) {
2443
- if (source !== void 0) {
2444
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2445
- var lineNumber = source.lineNumber;
2446
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2447
- }
2448
- return "";
2449
- }
2450
- /**
2451
- * Warn if there's no key explicitly set on dynamic arrays of children or
2452
- * object keys are not valid. This allows us to keep track of children between
2453
- * updates.
2454
- */
2455
- var ownerHasKeyUseWarning = {};
2456
- function getCurrentComponentErrorInfo(parentType) {
2457
- var info = getDeclarationErrorAddendum();
2458
- if (!info) {
2459
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2460
- if (parentName) info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2461
- }
2462
- return info;
2463
- }
2464
- /**
2465
- * Warn if the element doesn't have an explicit key assigned to it.
2466
- * This element is in an array. The array could grow and shrink or be
2467
- * reordered. All children that haven't already been validated are required to
2468
- * have a "key" property assigned to it. Error statuses are cached so a warning
2469
- * will only be shown once.
2470
- *
2471
- * @internal
2472
- * @param {ReactElement} element Element that requires a key.
2473
- * @param {*} parentType element's parent's type.
2474
- */
2475
- function validateExplicitKey(element, parentType) {
2476
- if (!element._store || element._store.validated || element.key != null) return;
2477
- element._store.validated = true;
2478
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2479
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) return;
2480
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2481
- var childOwner = "";
2482
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2483
- setCurrentlyValidatingElement$1(element);
2484
- error("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", currentComponentErrorInfo, childOwner);
2485
- setCurrentlyValidatingElement$1(null);
2486
- }
2487
- /**
2488
- * Ensure that every element either is passed in a static location, in an
2489
- * array with an explicit keys property defined, or in an object literal
2490
- * with valid key property.
2491
- *
2492
- * @internal
2493
- * @param {ReactNode} node Statically passed child of any type.
2494
- * @param {*} parentType node's parent's type.
2495
- */
2496
- function validateChildKeys(node, parentType) {
2497
- if (typeof node !== "object") return;
2498
- if (isArray(node)) for (var i = 0; i < node.length; i++) {
2499
- var child = node[i];
2500
- if (isValidElement(child)) validateExplicitKey(child, parentType);
2501
- }
2502
- else if (isValidElement(node)) {
2503
- if (node._store) node._store.validated = true;
2504
- } else if (node) {
2505
- var iteratorFn = getIteratorFn(node);
2506
- if (typeof iteratorFn === "function") {
2507
- if (iteratorFn !== node.entries) {
2508
- var iterator = iteratorFn.call(node);
2509
- var step;
2510
- while (!(step = iterator.next()).done) if (isValidElement(step.value)) validateExplicitKey(step.value, parentType);
2511
- }
2512
- }
2513
- }
2514
- }
2515
- /**
2516
- * Given an element, validate that its props follow the propTypes definition,
2517
- * provided by the type.
2518
- *
2519
- * @param {ReactElement} element
2520
- */
2521
- function validatePropTypes(element) {
2522
- var type = element.type;
2523
- if (type === null || type === void 0 || typeof type === "string") return;
2524
- var propTypes;
2525
- if (typeof type === "function") propTypes = type.propTypes;
2526
- else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) propTypes = type.propTypes;
2527
- else return;
2528
- if (propTypes) {
2529
- var name = getComponentNameFromType(type);
2530
- checkPropTypes(propTypes, element.props, "prop", name, element);
2531
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2532
- propTypesMisspellWarningShown = true;
2533
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", getComponentNameFromType(type) || "Unknown");
2534
- }
2535
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2536
- }
2537
- /**
2538
- * Given a fragment, validate that it can only be provided with fragment props
2539
- * @param {ReactElement} fragment
2540
- */
2541
- function validateFragmentProps(fragment) {
2542
- var keys = Object.keys(fragment.props);
2543
- for (var i = 0; i < keys.length; i++) {
2544
- var key = keys[i];
2545
- if (key !== "children" && key !== "key") {
2546
- setCurrentlyValidatingElement$1(fragment);
2547
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
2548
- setCurrentlyValidatingElement$1(null);
2549
- break;
2550
- }
2551
- }
2552
- if (fragment.ref !== null) {
2553
- setCurrentlyValidatingElement$1(fragment);
2554
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
2555
- setCurrentlyValidatingElement$1(null);
2556
- }
2557
- }
2558
- var didWarnAboutKeySpread = {};
2559
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
2560
- var validType = isValidElementType(type);
2561
- if (!validType) {
2562
- var info = "";
2563
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
2564
- var sourceInfo = getSourceInfoErrorAddendum(source);
2565
- if (sourceInfo) info += sourceInfo;
2566
- else info += getDeclarationErrorAddendum();
2567
- var typeString;
2568
- if (type === null) typeString = "null";
2569
- else if (isArray(type)) typeString = "array";
2570
- else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
2571
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
2572
- info = " Did you accidentally export a JSX literal instead of a component?";
2573
- } else typeString = typeof type;
2574
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
2575
- }
2576
- var element = jsxDEV(type, props, key, source, self);
2577
- if (element == null) return element;
2578
- if (validType) {
2579
- var children = props.children;
2580
- if (children !== void 0) if (isStaticChildren) if (isArray(children)) {
2581
- for (var i = 0; i < children.length; i++) validateChildKeys(children[i], type);
2582
- if (Object.freeze) Object.freeze(children);
2583
- } else error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2584
- else validateChildKeys(children, type);
2585
- }
2586
- if (hasOwnProperty.call(props, "key")) {
2587
- var componentName = getComponentNameFromType(type);
2588
- var keys = Object.keys(props).filter(function(k$1) {
2589
- return k$1 !== "key";
2590
- });
2591
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
2592
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
2593
- error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", beforeExample, componentName, keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}", componentName);
2594
- didWarnAboutKeySpread[componentName + beforeExample] = true;
2595
- }
2596
- }
2597
- if (type === REACT_FRAGMENT_TYPE) validateFragmentProps(element);
2598
- else validatePropTypes(element);
2599
- return element;
2600
- }
2601
- function jsxWithValidationStatic(type, props, key) {
2602
- return jsxWithValidation(type, props, key, true);
2603
- }
2604
- function jsxWithValidationDynamic(type, props, key) {
2605
- return jsxWithValidation(type, props, key, false);
2606
- }
2607
- var jsx$1 = jsxWithValidationDynamic;
2608
- var jsxs$1 = jsxWithValidationStatic;
2609
- exports.Fragment = REACT_FRAGMENT_TYPE;
2610
- exports.jsx = jsx$1;
2611
- exports.jsxs = jsxs$1;
2612
- })();
2613
- }) });
2614
- var require_jsx_runtime = /* @__PURE__ */ __commonJS({ "../../node_modules/react/jsx-runtime.js": ((exports, module) => {
2615
- if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production_min();
2616
- else module.exports = require_react_jsx_runtime_development();
2617
- }) });
2618
-
2619
- //#endregion
2620
- //#region ../icons/dist/Sparkles.js
2621
- var import_jsx_runtime$3 = /* @__PURE__ */ __toESM(require_jsx_runtime());
2622
- const SvgSparkles = (props) => /* @__PURE__ */ (0, import_jsx_runtime$3.jsxs)("svg", {
2623
- width: 24,
2624
- height: 24,
2625
- viewBox: "0 0 24 24",
2626
- fill: "currentColor",
2627
- xmlns: "http://www.w3.org/2000/svg",
2628
- ...props,
2629
- children: [
2630
- /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("path", {
2631
- d: "M8.18658 5.99609L9.47499 9.34597C9.68451 9.89072 9.78927 10.1631 9.95218 10.3922C10.0966 10.5953 10.274 10.7727 10.477 10.9171C10.7061 11.08 10.9785 11.1847 11.5233 11.3943L14.8732 12.6827L11.5233 13.9711C10.9785 14.1806 10.7061 14.2854 10.477 14.4483C10.274 14.5927 10.0966 14.7701 9.95218 14.9731C9.78927 15.2022 9.68451 15.4746 9.47499 16.0194L8.18658 19.3693L6.89816 16.0194C6.68864 15.4746 6.58388 15.2022 6.42097 14.9731C6.27659 14.7701 6.09917 14.5927 5.89612 14.4483C5.66701 14.2854 5.39463 14.1806 4.84988 13.9711L1.5 12.6827L4.84987 11.3943C5.39463 11.1847 5.66701 11.08 5.89612 10.9171C6.09917 10.7727 6.27659 10.5953 6.42097 10.3922C6.58388 10.1631 6.68864 9.89072 6.89816 9.34597L8.18658 5.99609Z",
2632
- fill: "currentColor",
2633
- stroke: "currentColor",
2634
- strokeWidth: 1.11443,
2635
- strokeLinecap: "round",
2636
- strokeLinejoin: "round"
2637
- }),
2638
- /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("path", {
2639
- d: "M19.6402 14.3135L20.2844 15.9884C20.3891 16.2608 20.4415 16.397 20.523 16.5115C20.5952 16.6131 20.6839 16.7018 20.7854 16.774C20.8999 16.8554 21.0361 16.9078 21.3085 17.0126L22.9835 17.6568L21.3085 18.301C21.0361 18.4057 20.8999 18.4581 20.7854 18.5396C20.6839 18.6118 20.5952 18.7005 20.523 18.802C20.4415 18.9166 20.3891 19.0527 20.2844 19.3251L19.6402 21.0001L18.996 19.3251C18.8912 19.0527 18.8388 18.9166 18.7574 18.802C18.6852 18.7005 18.5965 18.6118 18.4949 18.5396C18.3804 18.4581 18.2442 18.4057 17.9718 18.301L16.2969 17.6568L17.9718 17.0126C18.2442 16.9078 18.3804 16.8554 18.4949 16.774C18.5965 16.7018 18.6852 16.6131 18.7574 16.5115C18.8388 16.397 18.8912 16.2608 18.996 15.9884L19.6402 14.3135Z",
2640
- fill: "currentColor",
2641
- stroke: "currentColor",
2642
- strokeWidth: 1.11443,
2643
- strokeLinecap: "round",
2644
- strokeLinejoin: "round"
2645
- }),
2646
- /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("path", {
2647
- d: "M17.0913 3L17.7355 4.67494C17.8403 4.94732 17.8927 5.0835 17.9741 5.19806C18.0463 5.29959 18.135 5.38829 18.2366 5.46049C18.3511 5.54194 18.4873 5.59432 18.7597 5.69908L20.4346 6.34329L18.7597 6.9875C18.4873 7.09226 18.3511 7.14464 18.2366 7.22609C18.135 7.29829 18.0463 7.38699 17.9741 7.48852C17.8927 7.60308 17.8403 7.73927 17.7355 8.01165L17.0913 9.68658L16.4471 8.01165C16.3424 7.73927 16.29 7.60308 16.2085 7.48852C16.1363 7.38699 16.0476 7.29829 15.9461 7.22609C15.8315 7.14464 15.6954 7.09226 15.423 6.9875L13.748 6.34329L15.423 5.69908C15.6954 5.59432 15.8315 5.54194 15.9461 5.46049C16.0476 5.38829 16.1363 5.29959 16.2085 5.19806C16.29 5.0835 16.3424 4.94731 16.4471 4.67494L17.0913 3Z",
2648
- fill: "currentColor",
2649
- stroke: "currentColor",
2650
- strokeWidth: 1.11443,
2651
- strokeLinecap: "round",
2652
- strokeLinejoin: "round"
2653
- })
2654
- ]
2655
- });
2656
- var Sparkles_default = SvgSparkles;
2657
-
2658
- //#endregion
2659
- //#region ../icons/dist/IconCloseVariant.js
2660
- var import_jsx_runtime$2 = /* @__PURE__ */ __toESM(require_jsx_runtime());
2661
- const SvgIconCloseVariant = (props) => /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("svg", {
2662
- viewBox: "0 0 24 24",
2663
- xmlns: "http://www.w3.org/2000/svg",
2664
- ...props,
2665
- children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsxs)("g", {
2666
- className: "layer",
2667
- children: [/* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("title", { children: "Layer 1" }), /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("path", {
2668
- d: "m18.98,2.56l-6.76,6.76l-6.76,-6.76l-2.65,2.65l6.76,6.76l-6.76,6.76l2.65,2.65l6.76,-6.76l6.76,6.76l2.65,-2.65l-6.76,-6.76l6.76,-6.76l-2.65,-2.65z",
2669
- fill: "currentColor",
2670
- id: "svg_2"
2671
- })]
2672
- })
2673
- });
2674
- var IconCloseVariant_default = SvgIconCloseVariant;
2675
-
2676
- //#endregion
2677
- //#region src/SearchZeroState/overlay/overlayHostLocator.ts
2678
- const SEARCH_OVERLAY_ENTRYPOINT_ID = "spiffy-ai-search-overlay-entrypoint";
2679
- const SEARCH_OVERLAY_PORTAL_ID = "spiffy-ai-search-overlay-portal";
2680
- /**
2681
- * Find the portal target inside the overlay host's ShadowRoot.
2682
- */
2683
- function getOverlayPortalTarget(hostId = SEARCH_OVERLAY_ENTRYPOINT_ID) {
2684
- const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID);
2685
- if (bareMount) return bareMount;
2686
- const host = document.getElementById(hostId);
2687
- if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
2688
- const sr = host.shadowRoot;
2689
- if (!sr) throw new Error("[Overlay] Host has no shadowRoot (was it initialized?)");
2690
- const mount = sr.getElementById(SEARCH_OVERLAY_PORTAL_ID);
2691
- if (!mount) throw new Error("[Overlay] Portal mount missing inside ShadowRoot");
2692
- return mount;
2693
- }
2694
-
2695
- //#endregion
2696
- //#region src/SearchZeroState/SearchOverlay.tsx
2697
- const SearchOverlay = React.forwardRef(({ children, className, dataTestId, role, ariaModal, ariaLabelledby, id, usingPortal }, ref) => {
2698
- const overlayClasses = classNames("spiffy-search-overlay", "spiffy-tw-fixed", "spiffy-tw-top-[0]", "spiffy-tw-left-[0]", "spiffy-tw-h-[100vh]", "spiffy-tw-w-full", "spiffy-h-[calc(100%-1rem)]", "spiffy-tw-px-[24px] spiffy-tw-pt-[16px] sm:spiffy-tw-px-[41px] sm:spiffy-tw-pt-[40px]", "spiffy-tw-z-[2147483647]", "spiffy-tw-overflow-y-auto", "spiffy-tw-overflow-x-hidden", className);
2699
- const overlayContentClasses = classNames("spiffy-search-overlay-content", "spiffy-tw-flex spiffy-tw-flex-col", "spiffy-tw-min-h-full", className);
2700
- const node = /* @__PURE__ */ jsx(motion.div, {
2701
- ref,
2702
- className: overlayClasses,
2703
- initial: { opacity: 0 },
2704
- animate: { opacity: 1 },
2705
- exit: { opacity: 0 },
2706
- transition: { duration: .2 },
2707
- children: /* @__PURE__ */ jsx("div", {
2708
- className: overlayContentClasses,
2709
- "data-testid": dataTestId,
2710
- role,
2711
- "aria-modal": ariaModal,
2712
- "aria-labelledby": ariaLabelledby,
2713
- id,
2714
- children
2715
- })
2716
- });
2717
- if (!usingPortal) return node;
2718
- try {
2719
- return createPortal(node, getOverlayPortalTarget());
2720
- } catch (err) {
2721
- return node;
2722
- }
2723
- });
2724
- SearchOverlay.displayName = "SearchOverlay";
2725
-
2726
- //#endregion
2727
- //#region src/SearchZeroState/zeroStateSearchVariants.ts
2728
- const searchZeroStateVariantClasses = {
2729
- backgroundTertiary: {
2730
- overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-tertiary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
2731
- sparklesIconColor: colorVar(ColorNames.AccentPrimary)
2732
- },
2733
- backgroundDark: {
2734
- overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
2735
- sparklesIconColor: colorVar(ColorNames.AccentPrimary)
2736
- },
2737
- backgroundPrimary: {
2738
- overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-primary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
2739
- sparklesIconColor: colorVar(ColorNames.AccentPrimary)
2740
- }
2741
- };
2742
-
2743
- //#endregion
2744
- //#region ../icons/dist/AiSearchBold.js
2745
- var import_jsx_runtime$1 = /* @__PURE__ */ __toESM(require_jsx_runtime());
2746
- const SvgAiSearchBold = (props) => /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("svg", {
2747
- width: 32,
2748
- height: 32,
2749
- viewBox: "0 0 32 32",
2750
- fill: "none",
2751
- xmlns: "http://www.w3.org/2000/svg",
2752
- ...props,
2753
- children: [
2754
- /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("path", {
2755
- d: "M25.3445 3.27148L26.448 6.14076C26.6275 6.60736 26.7172 6.84066 26.8568 7.0369C26.9804 7.21083 27.1324 7.36279 27.3063 7.48646C27.5026 7.626 27.7359 7.71573 28.2025 7.89519L31.0717 8.99876L28.2025 10.1023C27.7359 10.2818 27.5026 10.3715 27.3063 10.5111C27.1324 10.6347 26.9804 10.7867 26.8568 10.9606C26.7172 11.1569 26.6275 11.3902 26.448 11.8568L25.3445 14.726L24.2409 11.8568C24.0614 11.3902 23.9717 11.1569 23.8322 10.9606C23.7085 10.7867 23.5565 10.6347 23.3826 10.5111C23.1864 10.3715 22.9531 10.2818 22.4865 10.1023L19.6172 8.99876L22.4865 7.89519C22.9531 7.71573 23.1864 7.626 23.3826 7.48646C23.5565 7.36279 23.7085 7.21083 23.8322 7.0369C23.9717 6.84066 24.0614 6.60736 24.2409 6.14076L25.3445 3.27148Z",
2756
- fill: "#AB1212",
2757
- stroke: "#AB1212",
2758
- strokeLinecap: "round",
2759
- strokeLinejoin: "round"
2760
- }),
2761
- /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("path", {
2762
- d: "M18.8072 5.46891C17.3865 4.5308 15.6938 3.96698 13.8663 3.92165C8.67511 3.79287 4.3624 7.89679 4.23363 13.088C4.10485 18.2792 8.20877 22.592 13.4 22.7207C17.8631 22.8314 21.6768 19.8136 22.7407 15.6659",
2763
- stroke: "#111111",
2764
- strokeWidth: 2,
2765
- strokeLinecap: "round"
2766
- }),
2767
- /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("path", {
2768
- d: "M19.312 21.2498L24.1245 26.4999",
2769
- stroke: "#111111",
2770
- strokeWidth: 2,
2771
- strokeLinecap: "round"
2772
- })
2773
- ]
2774
- });
2775
- var AiSearchBold_default = SvgAiSearchBold;
2776
-
2777
- //#endregion
2778
- //#region ../icons/dist/AiSearchThin.js
2779
- var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime());
2780
- const SvgAiSearchThin = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
2781
- width: 26,
2782
- height: 23,
2783
- viewBox: "0 0 26 23",
2784
- fill: "none",
2785
- xmlns: "http://www.w3.org/2000/svg",
2786
- ...props,
2787
- children: [
2788
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
2789
- d: "M19.1063 1.14819L19.9991 3.46956C20.1443 3.84706 20.2169 4.03581 20.3298 4.19458C20.4298 4.3353 20.5528 4.45824 20.6935 4.55829C20.8523 4.67118 21.041 4.74378 21.4185 4.88897L23.7399 5.78181L21.4185 6.67464C21.041 6.81984 20.8523 6.89243 20.6935 7.00532C20.5528 7.10538 20.4298 7.22832 20.3298 7.36904C20.2169 7.5278 20.1443 7.71656 19.9991 8.09406L19.1063 10.4154L18.2134 8.09406C18.0682 7.71656 17.9956 7.5278 17.8828 7.36903C17.7827 7.22832 17.6598 7.10538 17.519 7.00532C17.3603 6.89243 17.1715 6.81984 16.794 6.67464L14.4727 5.78181L16.794 4.88897C17.1715 4.74378 17.3603 4.67118 17.519 4.55829C17.6598 4.45824 17.7827 4.3353 17.8828 4.19458C17.9956 4.03581 18.0682 3.84706 18.2134 3.46956L19.1063 1.14819Z",
2790
- stroke: "currentColor",
2791
- strokeLinecap: "round",
2792
- strokeLinejoin: "round"
2793
- }),
2794
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
2795
- d: "M13.1079 2.92848C11.9585 2.16951 10.589 1.71336 9.1105 1.67668C4.91057 1.5725 1.4214 4.89275 1.31721 9.09268C1.21303 13.2926 4.53328 16.7818 8.73321 16.886C12.344 16.9755 15.4295 14.534 16.2902 11.1783",
2796
- stroke: "currentColor",
2797
- strokeLinecap: "round"
2798
- }),
2799
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
2800
- d: "M15.5439 17.7734L19.1358 21.7072",
2801
- stroke: "currentColor",
2802
- strokeLinecap: "round"
2803
- })
2804
- ]
2805
- });
2806
- var AiSearchThin_default = SvgAiSearchThin;
2807
-
2808
- //#endregion
2809
- //#region src/SearchZeroState/SearchIcon.tsx
2810
- const SEARCH_ENTRYPOINT_BUTTON_TESTID = "spiffy-search-entrypoint-button";
2811
- const SearchIcon = ({ size = 22, variant = "thin", color = "currentColor", onClick, label, entryPointRef }) => {
2812
- const containerClasses = classNames([
2813
- "spiffy-global-search-input-container",
2814
- "spiffy-tw-relative",
2815
- "spiffy-tw-flex",
2816
- "spiffy-tw-items-center"
2817
- ]);
2818
- const iconStrokeWidth = variant === "thin" ? "inherit" : "2px";
2819
- const IconComponent = {
2820
- thin: AiSearchThin_default,
2821
- bold: AiSearchBold_default
2822
- }[variant];
2823
- return /* @__PURE__ */ jsxs("button", {
2824
- className: containerClasses,
2825
- type: "button",
2826
- onClick,
2827
- "data-testid": SEARCH_ENTRYPOINT_BUTTON_TESTID,
2828
- ref: entryPointRef,
2829
- children: [/* @__PURE__ */ jsx(IconComponent, {
2830
- style: {
2831
- width: size,
2832
- height: size
2833
- },
2834
- fill: color,
2835
- strokeWidth: iconStrokeWidth
2836
- }), label && /* @__PURE__ */ jsx(Typography, {
2837
- variant: "body3",
2838
- className: "spiffy-global-search-text",
2839
- children: label
2840
- })]
2841
- });
2842
- };
2843
-
2844
- //#endregion
2845
- //#region src/SearchZeroState/components/RecommendedProducts.tsx
2846
- const RecommendedProducts = ({ retrievedProducts, merchantShortName, productCardConfig = {
2847
- variant: "minimal",
2848
- hoverVariant: "none",
2849
- layoutVariant: "square"
2850
- }, productGridVariant = "square", heading }) => {
2851
- const { track } = useAmplitudeTracking();
2852
- const containerClasses = classNames("spiffy-tw-justify-center", "spiffy-tw-overflow-hidden", "spiffy-tw-bg-white", "spiffy-tw-relative", "spiffy-tw-px-[24px]", "spiffy-tw-py-[16px]", "sm:spiffy-tw-px-[41px]", "sm:spiffy-tw-py-[40px]");
2853
- const titleContainerClasses = classNames("spiffy-tw-w-full", "spiffy-tw-border-b", "spiffy-tw-border-solid", "spiffy-tw-border-b-[--spiffy-colors-text-accent]", "spiffy-tw-pb-[8px]", "spiffy-tw-mb-[16px]");
2854
- const productGridClasses = classNames("spiffy-tw-grid", "spiffy-tw-justify-items-stretch", "spiffy-tw-grid-cols-2", "md:spiffy-tw-grid-cols-3", "lg:spiffy-tw-grid-cols-4", "spiffy-tw-gap-x-[4px]", "spiffy-tw-gap-y-[24px]", "spiffy-tw-h-full", "spiffy-tw-w-full", "spiffy-tw-items-stretch");
2855
- if (retrievedProducts == null || retrievedProducts.length === 0) return null;
2856
- const handleProductClick = (product, index) => {
2857
- track(SpiffyMetricsEventName.ProductCardClicked, {
2858
- eventProps: {
2859
- url: product.url,
2860
- search_response_id: void 0,
2861
- product_response_id: product.response_id,
2862
- trigger_location: ChatElementDisplayLocation.SEARCH_ZERO_STATE_SUGGESTED_PRODUCTS,
2863
- click_position: index != null ? index + 1 : null,
2864
- title: product.title,
2865
- original_price: product.original_price,
2866
- sale_price: product.sale_price,
2867
- average_rating: product.average_rating,
2868
- number_reviews: product.number_reviews
2869
- },
2870
- alsoSendToGoogleAnalytics: true
2871
- });
2872
- };
2873
- return /* @__PURE__ */ jsxs(motion.div, {
2874
- className: containerClasses,
2875
- initial: { opacity: 0 },
2876
- animate: { opacity: 1 },
2877
- exit: { opacity: 0 },
2878
- transition: { duration: .2 },
2879
- style: {
2880
- left: "50%",
2881
- right: "50%",
2882
- marginLeft: "-50vw",
2883
- marginRight: "-50vw",
2884
- width: "100vw"
2885
- },
2886
- children: [heading && /* @__PURE__ */ jsx("div", {
2887
- className: titleContainerClasses,
2888
- children: /* @__PURE__ */ jsx(Typography, {
2889
- variant: "h1",
2890
- className: "spiffy-tw-text-[--spiffy-colors-text-accent]",
2891
- children: heading
2892
- })
2893
- }), /* @__PURE__ */ jsx(ProductGrid, {
2894
- productList: retrievedProducts,
2895
- productGridVariant,
2896
- productGridClasses,
2897
- productCardConfig,
2898
- merchantShortName,
2899
- onProductClick: handleProductClick
2900
- })]
2901
- });
2902
- };
2903
-
2904
- //#endregion
2905
- //#region src/SearchZeroState/SearchZeroState.tsx
2906
- const SEARCH_ENTRYPOINT_INPUT_TESTID = "spiffy-search-entrypoint-input";
2907
- const SearchZeroState = ({ widgetConfig, initialIsOpen, entryPointRef }) => {
2908
- console.log("SearchZeroState: widgetConfig", widgetConfig);
2909
- const { searchZeroStateVariant, searchInputVariant, searchIconVariant, searchIconSize = 24, searchBoxPlaceholder, layout, compactLabel, initialSuggestions = [], animationSpeed = "standard", suggestionButtonConfig, includeSubtitle, usingPortal = false } = widgetConfig;
2910
- const { variant: suggestionButtonVariant, hoverVariant: suggestionButtonHoverVariant, borderRadius: suggestionButtonBorderRadius } = suggestionButtonConfig;
2911
- const [isOpen, setIsOpen] = useState(!!initialIsOpen);
2912
- const searchInputRef = useRef(null);
2913
- const searchInput = useSearch({ allowRedirect: true });
2914
- const { track } = useAmplitudeTracking();
2915
- const { recommendedProductsHeading, searchOverlayHeading, productCardConfig, merchantShortName, recommendedProducts, searchText, autocompleteResults, focusedIndex, focusedOptionId, shouldShowAutocomplete, onSearchInputChange, onSearchInputFocus, onSearchInputBlur, onKeyDown, onAutocompleteSelect, onSubmitSearch, resetSearch } = searchInput;
2916
- const { overlayBackgroundClasses, sparklesIconColor } = searchZeroStateVariantClasses[searchZeroStateVariant && searchZeroStateVariantClasses[searchZeroStateVariant] ? searchZeroStateVariant : "backgroundTertiary"];
2917
- const { searchInputIconColor } = searchInputVariantClasses[searchInputVariant];
2918
- const handleOpen = () => setIsOpen(true);
2919
- const handleClose = () => setIsOpen(false);
2920
- useEffect(() => {
2921
- if (isOpen) track(SpiffyMetricsEventName.SearchComponentVisible, { eventProps: { search_component: SpiffyWidgets.SearchZeroState } });
2922
- }, [isOpen, track]);
2923
- useEffect(() => {
2924
- if (isOpen) {
2925
- resetSearch();
2926
- searchInputRef.current?.focus();
2927
- }
2928
- }, [isOpen, resetSearch]);
2929
- const submitSearchString = useCallback((query) => {
2930
- onSearchInputChange(query);
2931
- if (onSubmitSearch && query.trim()) {
2932
- onSubmitSearch();
2933
- setIsOpen(false);
2934
- }
2935
- }, [onSubmitSearch, onSearchInputChange]);
2936
- const searchChange = (value) => {
2937
- onSearchInputChange(value);
2938
- };
2939
- if (!isOpen) {
2940
- if (layout === "icon") return /* @__PURE__ */ jsx(SearchIcon, {
2941
- entryPointRef,
2942
- size: searchIconSize,
2943
- variant: searchIconVariant,
2944
- label: compactLabel,
2945
- onClick: handleOpen,
2946
- color: searchInputIconColor
2947
- });
2948
- return /* @__PURE__ */ jsx(SearchInput, {
2949
- value: "",
2950
- onChange: () => {},
2951
- placeholder: searchBoxPlaceholder,
2952
- suggestions: [],
2953
- onFocus: handleOpen,
2954
- searchInputVariant,
2955
- dataTestId: SEARCH_ENTRYPOINT_INPUT_TESTID
2956
- });
2957
- }
2958
- return /* @__PURE__ */ jsx(AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxs(SearchOverlay, {
2959
- role: "dialog",
2960
- ariaModal: true,
2961
- ariaLabelledby: "global-search-title",
2962
- className: overlayBackgroundClasses,
2963
- usingPortal,
2964
- children: [
2965
- /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
2966
- className: "spiffy-tw-relative spiffy-tw-mb-4",
2967
- children: [/* @__PURE__ */ jsxs("div", {
2968
- className: "spiffy-tw-flex spiffy-tw-items-center",
2969
- children: [/* @__PURE__ */ jsx(Typography, {
2970
- id: "global-search-title",
2971
- variant: "t3",
2972
- children: searchOverlayHeading
2973
- }), /* @__PURE__ */ jsx(Sparkles_default, {
2974
- className: "spiffy-tw-ml-2 spiffy-tw-h-[36px] spiffy-tw-w-[24px] sm:spiffy-tw-h-[45px] sm:spiffy-tw-w-[36px]",
2975
- color: sparklesIconColor,
2976
- stroke: "2px"
2977
- })]
2978
- }), includeSubtitle && /* @__PURE__ */ jsx(Typography, {
2979
- variant: "body2",
2980
- children: "Go ahead, get as specific as you like..."
2981
- })]
2982
- }), /* @__PURE__ */ jsx("button", {
2983
- onClick: handleClose,
2984
- className: "spiffy-tw-absolute spiffy-tw-right-4 spiffy-tw-top-4 sm:spiffy-tw-right-8 sm:spiffy-tw-top-8",
2985
- "aria-label": "Close search",
2986
- type: "button",
2987
- children: /* @__PURE__ */ jsx(IconCloseVariant_default, {
2988
- className: "spiffy-tw-h-[20px] spiffy-tw-w-[20px] sm:spiffy-tw-h-[28px] sm:spiffy-tw-w-[28px]",
2989
- strokeWidth: "2px"
2990
- })
2991
- })] }),
2992
- /* @__PURE__ */ jsx(SearchInputForm, {
2993
- searchInputRef,
2994
- searchInputVariant,
2995
- searchText,
2996
- autocompleteResults,
2997
- searchBoxPlaceholder,
2998
- focusedOptionId,
2999
- shouldShowAutocomplete,
3000
- focusedIndex,
3001
- onKeyDown,
3002
- onAutocompleteSelect,
3003
- onSearchInputChange: searchChange,
3004
- onSearchSubmit: submitSearchString,
3005
- onSearchInputFocus,
3006
- onSearchInputBlur
3007
- }),
3008
- /* @__PURE__ */ jsxs(AnimatePresence, { children: [initialSuggestions && initialSuggestions.length > 0 && /* @__PURE__ */ jsx(motion.div, {
3009
- className: "spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden",
3010
- initial: { opacity: 0 },
3011
- animate: { opacity: 1 },
3012
- exit: { opacity: 0 },
3013
- transition: { duration: .2 },
3014
- children: /* @__PURE__ */ jsx("div", {
3015
- className: "spiffy-tw-mt-6",
3016
- children: /* @__PURE__ */ jsx(SuggestionBar, {
3017
- id: "global-search-suggestions",
3018
- locationForMetrics: SuggestionBarLocationForMetrics.SUGGESTION_BAR_TOP,
3019
- buttonTexts: initialSuggestions,
3020
- buttonBorderRadius: suggestionButtonBorderRadius,
3021
- buttonVariation: suggestionButtonVariant ?? "primary",
3022
- hoverButtonVariation: suggestionButtonHoverVariant ?? "primary",
3023
- animationSpeed,
3024
- handleReply: (message) => {
3025
- if (message.type === MessageType.QueryTyped && message.metadata?.content) {
3026
- track(SpiffyMetricsEventName.SearchZeroStateSuggestionClicked, { eventProps: {
3027
- queryText: message.metadata.content,
3028
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
3029
- } });
3030
- submitSearchString(message.metadata.content);
3031
- }
3032
- },
3033
- twoRowsOnMobile: true
3034
- })
3035
- })
3036
- }), recommendedProducts.length > 0 && /* @__PURE__ */ jsx("div", {
3037
- className: "spiffy-tw-mt-[40px]",
3038
- children: /* @__PURE__ */ jsx(RecommendedProducts, {
3039
- retrievedProducts: recommendedProducts,
3040
- merchantShortName,
3041
- productCardConfig,
3042
- productGridVariant: "standard",
3043
- heading: recommendedProductsHeading
3044
- })
3045
- })] })
3046
- ]
3047
- }) });
3048
- };
3049
-
3050
- //#endregion
3051
- //#region src/SearchZeroState/SearchZeroStateWidget.tsx
3052
- const SearchZeroStateWidget = ({ initialIsOpen, widgetConfigId = "searchEntryPointIcon", entryPointRef }) => {
3053
- const newConfig = useNewOrgConfig();
3054
- const widgetConfig = useMemo(() => {
3055
- if (newConfig && newConfig.frontendConfig?.widgetConfigs) return { ...(newConfig.frontendConfig?.widgetConfigs).find((widget) => widget.key === widgetConfigId).config };
3056
- return null;
3057
- }, [newConfig, widgetConfigId]);
3058
- if (!widgetConfig) return null;
3059
- return /* @__PURE__ */ jsx(SearchZeroState, {
3060
- widgetConfig,
3061
- initialIsOpen,
3062
- entryPointRef
3063
- });
3064
- };
3065
-
3066
- //#endregion
3067
4
  export { SearchZeroState, SearchZeroStateWidget };