lightly-studio 0.4.6__py3-none-any.whl

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 (356) hide show
  1. lightly_studio/__init__.py +12 -0
  2. lightly_studio/api/__init__.py +0 -0
  3. lightly_studio/api/app.py +131 -0
  4. lightly_studio/api/cache.py +77 -0
  5. lightly_studio/api/db_tables.py +35 -0
  6. lightly_studio/api/features.py +5 -0
  7. lightly_studio/api/routes/api/annotation.py +305 -0
  8. lightly_studio/api/routes/api/annotation_label.py +87 -0
  9. lightly_studio/api/routes/api/annotations/__init__.py +7 -0
  10. lightly_studio/api/routes/api/annotations/create_annotation.py +52 -0
  11. lightly_studio/api/routes/api/caption.py +100 -0
  12. lightly_studio/api/routes/api/classifier.py +384 -0
  13. lightly_studio/api/routes/api/dataset.py +191 -0
  14. lightly_studio/api/routes/api/dataset_tag.py +266 -0
  15. lightly_studio/api/routes/api/embeddings2d.py +90 -0
  16. lightly_studio/api/routes/api/exceptions.py +114 -0
  17. lightly_studio/api/routes/api/export.py +114 -0
  18. lightly_studio/api/routes/api/features.py +17 -0
  19. lightly_studio/api/routes/api/frame.py +241 -0
  20. lightly_studio/api/routes/api/image.py +155 -0
  21. lightly_studio/api/routes/api/metadata.py +161 -0
  22. lightly_studio/api/routes/api/operator.py +75 -0
  23. lightly_studio/api/routes/api/sample.py +103 -0
  24. lightly_studio/api/routes/api/selection.py +87 -0
  25. lightly_studio/api/routes/api/settings.py +41 -0
  26. lightly_studio/api/routes/api/status.py +19 -0
  27. lightly_studio/api/routes/api/text_embedding.py +50 -0
  28. lightly_studio/api/routes/api/validators.py +17 -0
  29. lightly_studio/api/routes/api/video.py +133 -0
  30. lightly_studio/api/routes/healthz.py +13 -0
  31. lightly_studio/api/routes/images.py +104 -0
  32. lightly_studio/api/routes/video_frames_media.py +116 -0
  33. lightly_studio/api/routes/video_media.py +223 -0
  34. lightly_studio/api/routes/webapp.py +51 -0
  35. lightly_studio/api/server.py +94 -0
  36. lightly_studio/core/__init__.py +0 -0
  37. lightly_studio/core/add_samples.py +533 -0
  38. lightly_studio/core/add_videos.py +294 -0
  39. lightly_studio/core/dataset.py +780 -0
  40. lightly_studio/core/dataset_query/__init__.py +14 -0
  41. lightly_studio/core/dataset_query/boolean_expression.py +67 -0
  42. lightly_studio/core/dataset_query/dataset_query.py +317 -0
  43. lightly_studio/core/dataset_query/field.py +113 -0
  44. lightly_studio/core/dataset_query/field_expression.py +79 -0
  45. lightly_studio/core/dataset_query/match_expression.py +23 -0
  46. lightly_studio/core/dataset_query/order_by.py +79 -0
  47. lightly_studio/core/dataset_query/sample_field.py +37 -0
  48. lightly_studio/core/dataset_query/tags_expression.py +46 -0
  49. lightly_studio/core/image_sample.py +36 -0
  50. lightly_studio/core/loading_log.py +56 -0
  51. lightly_studio/core/sample.py +291 -0
  52. lightly_studio/core/start_gui.py +54 -0
  53. lightly_studio/core/video_sample.py +38 -0
  54. lightly_studio/dataset/__init__.py +0 -0
  55. lightly_studio/dataset/edge_embedding_generator.py +155 -0
  56. lightly_studio/dataset/embedding_generator.py +129 -0
  57. lightly_studio/dataset/embedding_manager.py +349 -0
  58. lightly_studio/dataset/env.py +20 -0
  59. lightly_studio/dataset/file_utils.py +49 -0
  60. lightly_studio/dataset/fsspec_lister.py +275 -0
  61. lightly_studio/dataset/mobileclip_embedding_generator.py +158 -0
  62. lightly_studio/dataset/perception_encoder_embedding_generator.py +260 -0
  63. lightly_studio/db_manager.py +166 -0
  64. lightly_studio/dist_lightly_studio_view_app/_app/env.js +1 -0
  65. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.GcXvs2l7.css +1 -0
  66. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/12.Dx6SXgAb.css +1 -0
  67. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/17.9X9_k6TP.css +1 -0
  68. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/18.BxiimdIO.css +1 -0
  69. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/2.CkOblLn7.css +1 -0
  70. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/ClassifierSamplesGrid.BJbCDlvs.css +1 -0
  71. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/LightlyLogo.BNjCIww-.png +0 -0
  72. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Bold.DGvYQtcs.ttf +0 -0
  73. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Italic-VariableFont_wdth_wght.B4AZ-wl6.ttf +0 -0
  74. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Medium.DVUZMR_6.ttf +0 -0
  75. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Regular.DxJTClRG.ttf +0 -0
  76. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-SemiBold.D3TTYgdB.ttf +0 -0
  77. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-VariableFont_wdth_wght.BZBpG5Iz.ttf +0 -0
  78. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.CefECEWA.css +1 -0
  79. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.D5tDcjY-.css +1 -0
  80. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_page.9X9_k6TP.css +1 -0
  81. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_page.BxiimdIO.css +1 -0
  82. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_page.Dx6SXgAb.css +1 -0
  83. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform._-1mPSEI.css +1 -0
  84. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/0dDyq72A.js +20 -0
  85. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/69_IOA4Y.js +1 -0
  86. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BK4An2kI.js +1 -0
  87. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BRmB-kJ9.js +1 -0
  88. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B_1cpokE.js +1 -0
  89. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BiqpDEr0.js +1 -0
  90. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BpLiSKgx.js +1 -0
  91. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BscxbINH.js +39 -0
  92. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C1FmrZbK.js +1 -0
  93. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C80h3dJx.js +1 -0
  94. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C8mfFM-u.js +2 -0
  95. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CGY1p9L4.js +517 -0
  96. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/COfLknXM.js +1 -0
  97. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CWj6FrbW.js +1 -0
  98. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CYgJF_JY.js +1 -0
  99. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CmLg0ys7.js +1 -0
  100. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CvGjimpO.js +1 -0
  101. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D3RDXHoj.js +39 -0
  102. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D4y7iiT3.js +1 -0
  103. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D9SC3jBb.js +1 -0
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DCuAdx1Q.js +20 -0
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DDBy-_jD.js +1 -0
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DIeogL5L.js +1 -0
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DL9a7v5o.js +1 -0
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DSKECuqX.js +39 -0
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D_FFv0Oe.js +1 -0
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DiZ5o5vz.js +1 -0
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DkbXUtyG.js +1 -0
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmK2hulV.js +1 -0
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DqnHaLTj.js +1 -0
  114. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DtWZc_tl.js +1 -0
  115. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DuUalyFS.js +1 -0
  116. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DwIonDAZ.js +1 -0
  117. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Il-mSPmK.js +1 -0
  118. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/KNLP4aJU.js +1 -0
  119. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/KjYeVjkE.js +1 -0
  120. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/MErlcOXj.js +1 -0
  121. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/VRI4prUD.js +1 -0
  122. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/VYb2dkNs.js +1 -0
  123. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/VqWvU2yF.js +1 -0
  124. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/dHC3otuL.js +1 -0
  125. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/da7Oy_lO.js +1 -0
  126. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/eAy8rZzC.js +2 -0
  127. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/erjNR5MX.js +1 -0
  128. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/f1oG3eFE.js +1 -0
  129. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/rsLi1iKv.js +20 -0
  130. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/rwuuBP9f.js +1 -0
  131. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/xGHZQ1pe.js +3 -0
  132. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.DrTRUgT3.js +2 -0
  133. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.BK5EOJl2.js +1 -0
  134. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.CIvTuljF.js +4 -0
  135. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/1.UBvSzxdA.js +1 -0
  136. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.CQ_tiLJa.js +1 -0
  137. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/11.KqkAcaxW.js +1 -0
  138. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.DoYsmxQc.js +1 -0
  139. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/13.571n2LZA.js +1 -0
  140. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/14.DGs689M-.js +1 -0
  141. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/15.CWG1ehzT.js +1 -0
  142. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/16.Dpq6jbSh.js +1 -0
  143. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/17.B5AZbHUU.js +1 -0
  144. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/18.CBga8cnq.js +1 -0
  145. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.D2HXgz-8.js +1090 -0
  146. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/3.f4HAg-y3.js +1 -0
  147. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/4.BKF4xuKQ.js +1 -0
  148. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.BAE0Pm_f.js +39 -0
  149. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/6.CouWWpzA.js +1 -0
  150. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.UBHT0ktp.js +1 -0
  151. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.FiYNElcc.js +1 -0
  152. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.B3-UaT23.js +1 -0
  153. lightly_studio/dist_lightly_studio_view_app/_app/immutable/workers/clustering.worker-DKqeLtG0.js +2 -0
  154. lightly_studio/dist_lightly_studio_view_app/_app/immutable/workers/search.worker-vNSty3B0.js +1 -0
  155. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -0
  156. lightly_studio/dist_lightly_studio_view_app/apple-touch-icon-precomposed.png +0 -0
  157. lightly_studio/dist_lightly_studio_view_app/apple-touch-icon.png +0 -0
  158. lightly_studio/dist_lightly_studio_view_app/favicon.png +0 -0
  159. lightly_studio/dist_lightly_studio_view_app/index.html +45 -0
  160. lightly_studio/errors.py +5 -0
  161. lightly_studio/examples/example.py +25 -0
  162. lightly_studio/examples/example_coco.py +27 -0
  163. lightly_studio/examples/example_coco_caption.py +29 -0
  164. lightly_studio/examples/example_metadata.py +369 -0
  165. lightly_studio/examples/example_operators.py +111 -0
  166. lightly_studio/examples/example_selection.py +28 -0
  167. lightly_studio/examples/example_split_work.py +48 -0
  168. lightly_studio/examples/example_video.py +22 -0
  169. lightly_studio/examples/example_video_annotations.py +157 -0
  170. lightly_studio/examples/example_yolo.py +22 -0
  171. lightly_studio/export/coco_captions.py +69 -0
  172. lightly_studio/export/export_dataset.py +104 -0
  173. lightly_studio/export/lightly_studio_label_input.py +120 -0
  174. lightly_studio/export_schema.py +18 -0
  175. lightly_studio/export_version.py +57 -0
  176. lightly_studio/few_shot_classifier/__init__.py +0 -0
  177. lightly_studio/few_shot_classifier/classifier.py +80 -0
  178. lightly_studio/few_shot_classifier/classifier_manager.py +644 -0
  179. lightly_studio/few_shot_classifier/random_forest_classifier.py +495 -0
  180. lightly_studio/metadata/complex_metadata.py +47 -0
  181. lightly_studio/metadata/compute_similarity.py +84 -0
  182. lightly_studio/metadata/compute_typicality.py +67 -0
  183. lightly_studio/metadata/gps_coordinate.py +41 -0
  184. lightly_studio/metadata/metadata_protocol.py +17 -0
  185. lightly_studio/models/__init__.py +1 -0
  186. lightly_studio/models/annotation/__init__.py +0 -0
  187. lightly_studio/models/annotation/annotation_base.py +303 -0
  188. lightly_studio/models/annotation/instance_segmentation.py +56 -0
  189. lightly_studio/models/annotation/links.py +17 -0
  190. lightly_studio/models/annotation/object_detection.py +47 -0
  191. lightly_studio/models/annotation/semantic_segmentation.py +44 -0
  192. lightly_studio/models/annotation_label.py +47 -0
  193. lightly_studio/models/caption.py +49 -0
  194. lightly_studio/models/classifier.py +20 -0
  195. lightly_studio/models/dataset.py +70 -0
  196. lightly_studio/models/embedding_model.py +30 -0
  197. lightly_studio/models/image.py +96 -0
  198. lightly_studio/models/metadata.py +208 -0
  199. lightly_studio/models/range.py +17 -0
  200. lightly_studio/models/sample.py +154 -0
  201. lightly_studio/models/sample_embedding.py +36 -0
  202. lightly_studio/models/settings.py +69 -0
  203. lightly_studio/models/tag.py +96 -0
  204. lightly_studio/models/two_dim_embedding.py +16 -0
  205. lightly_studio/models/video.py +161 -0
  206. lightly_studio/plugins/__init__.py +0 -0
  207. lightly_studio/plugins/base_operator.py +60 -0
  208. lightly_studio/plugins/operator_registry.py +47 -0
  209. lightly_studio/plugins/parameter.py +70 -0
  210. lightly_studio/py.typed +0 -0
  211. lightly_studio/resolvers/__init__.py +0 -0
  212. lightly_studio/resolvers/annotation_label_resolver/__init__.py +22 -0
  213. lightly_studio/resolvers/annotation_label_resolver/create.py +27 -0
  214. lightly_studio/resolvers/annotation_label_resolver/delete.py +28 -0
  215. lightly_studio/resolvers/annotation_label_resolver/get_all.py +37 -0
  216. lightly_studio/resolvers/annotation_label_resolver/get_by_id.py +24 -0
  217. lightly_studio/resolvers/annotation_label_resolver/get_by_ids.py +25 -0
  218. lightly_studio/resolvers/annotation_label_resolver/get_by_label_name.py +24 -0
  219. lightly_studio/resolvers/annotation_label_resolver/names_by_ids.py +25 -0
  220. lightly_studio/resolvers/annotation_label_resolver/update.py +38 -0
  221. lightly_studio/resolvers/annotation_resolver/__init__.py +40 -0
  222. lightly_studio/resolvers/annotation_resolver/count_annotations_by_dataset.py +129 -0
  223. lightly_studio/resolvers/annotation_resolver/create_many.py +124 -0
  224. lightly_studio/resolvers/annotation_resolver/delete_annotation.py +87 -0
  225. lightly_studio/resolvers/annotation_resolver/delete_annotations.py +60 -0
  226. lightly_studio/resolvers/annotation_resolver/get_all.py +85 -0
  227. lightly_studio/resolvers/annotation_resolver/get_all_with_payload.py +179 -0
  228. lightly_studio/resolvers/annotation_resolver/get_by_id.py +34 -0
  229. lightly_studio/resolvers/annotation_resolver/get_by_id_with_payload.py +130 -0
  230. lightly_studio/resolvers/annotation_resolver/update_annotation_label.py +142 -0
  231. lightly_studio/resolvers/annotation_resolver/update_bounding_box.py +68 -0
  232. lightly_studio/resolvers/annotations/__init__.py +1 -0
  233. lightly_studio/resolvers/annotations/annotations_filter.py +88 -0
  234. lightly_studio/resolvers/caption_resolver.py +129 -0
  235. lightly_studio/resolvers/dataset_resolver/__init__.py +55 -0
  236. lightly_studio/resolvers/dataset_resolver/check_dataset_type.py +29 -0
  237. lightly_studio/resolvers/dataset_resolver/create.py +20 -0
  238. lightly_studio/resolvers/dataset_resolver/delete.py +20 -0
  239. lightly_studio/resolvers/dataset_resolver/export.py +267 -0
  240. lightly_studio/resolvers/dataset_resolver/get_all.py +19 -0
  241. lightly_studio/resolvers/dataset_resolver/get_by_id.py +16 -0
  242. lightly_studio/resolvers/dataset_resolver/get_by_name.py +12 -0
  243. lightly_studio/resolvers/dataset_resolver/get_dataset_details.py +27 -0
  244. lightly_studio/resolvers/dataset_resolver/get_hierarchy.py +31 -0
  245. lightly_studio/resolvers/dataset_resolver/get_or_create_child_dataset.py +58 -0
  246. lightly_studio/resolvers/dataset_resolver/get_parent_dataset_by_sample_id.py +27 -0
  247. lightly_studio/resolvers/dataset_resolver/get_parent_dataset_id.py +22 -0
  248. lightly_studio/resolvers/dataset_resolver/get_root_dataset.py +61 -0
  249. lightly_studio/resolvers/dataset_resolver/get_root_datasets_overview.py +41 -0
  250. lightly_studio/resolvers/dataset_resolver/update.py +25 -0
  251. lightly_studio/resolvers/embedding_model_resolver.py +120 -0
  252. lightly_studio/resolvers/image_filter.py +50 -0
  253. lightly_studio/resolvers/image_resolver/__init__.py +21 -0
  254. lightly_studio/resolvers/image_resolver/create_many.py +52 -0
  255. lightly_studio/resolvers/image_resolver/delete.py +20 -0
  256. lightly_studio/resolvers/image_resolver/filter_new_paths.py +23 -0
  257. lightly_studio/resolvers/image_resolver/get_all_by_dataset_id.py +117 -0
  258. lightly_studio/resolvers/image_resolver/get_by_id.py +14 -0
  259. lightly_studio/resolvers/image_resolver/get_dimension_bounds.py +75 -0
  260. lightly_studio/resolvers/image_resolver/get_many_by_id.py +22 -0
  261. lightly_studio/resolvers/image_resolver/get_samples_excluding.py +43 -0
  262. lightly_studio/resolvers/metadata_resolver/__init__.py +15 -0
  263. lightly_studio/resolvers/metadata_resolver/metadata_filter.py +163 -0
  264. lightly_studio/resolvers/metadata_resolver/sample/__init__.py +21 -0
  265. lightly_studio/resolvers/metadata_resolver/sample/bulk_update_metadata.py +46 -0
  266. lightly_studio/resolvers/metadata_resolver/sample/get_by_sample_id.py +24 -0
  267. lightly_studio/resolvers/metadata_resolver/sample/get_metadata_info.py +104 -0
  268. lightly_studio/resolvers/metadata_resolver/sample/get_value_for_sample.py +27 -0
  269. lightly_studio/resolvers/metadata_resolver/sample/set_value_for_sample.py +53 -0
  270. lightly_studio/resolvers/sample_embedding_resolver.py +132 -0
  271. lightly_studio/resolvers/sample_resolver/__init__.py +17 -0
  272. lightly_studio/resolvers/sample_resolver/count_by_dataset_id.py +16 -0
  273. lightly_studio/resolvers/sample_resolver/create.py +16 -0
  274. lightly_studio/resolvers/sample_resolver/create_many.py +25 -0
  275. lightly_studio/resolvers/sample_resolver/get_by_id.py +14 -0
  276. lightly_studio/resolvers/sample_resolver/get_filtered_samples.py +56 -0
  277. lightly_studio/resolvers/sample_resolver/get_many_by_id.py +22 -0
  278. lightly_studio/resolvers/sample_resolver/sample_filter.py +74 -0
  279. lightly_studio/resolvers/settings_resolver.py +62 -0
  280. lightly_studio/resolvers/tag_resolver.py +299 -0
  281. lightly_studio/resolvers/twodim_embedding_resolver.py +119 -0
  282. lightly_studio/resolvers/video_frame_resolver/__init__.py +23 -0
  283. lightly_studio/resolvers/video_frame_resolver/count_video_frames_annotations.py +83 -0
  284. lightly_studio/resolvers/video_frame_resolver/create_many.py +57 -0
  285. lightly_studio/resolvers/video_frame_resolver/get_all_by_dataset_id.py +63 -0
  286. lightly_studio/resolvers/video_frame_resolver/get_by_id.py +13 -0
  287. lightly_studio/resolvers/video_frame_resolver/get_table_fields_bounds.py +44 -0
  288. lightly_studio/resolvers/video_frame_resolver/video_frame_annotations_counter_filter.py +47 -0
  289. lightly_studio/resolvers/video_frame_resolver/video_frame_filter.py +57 -0
  290. lightly_studio/resolvers/video_resolver/__init__.py +27 -0
  291. lightly_studio/resolvers/video_resolver/count_video_frame_annotations_by_video_dataset.py +86 -0
  292. lightly_studio/resolvers/video_resolver/create_many.py +58 -0
  293. lightly_studio/resolvers/video_resolver/filter_new_paths.py +33 -0
  294. lightly_studio/resolvers/video_resolver/get_all_by_dataset_id.py +181 -0
  295. lightly_studio/resolvers/video_resolver/get_by_id.py +22 -0
  296. lightly_studio/resolvers/video_resolver/get_table_fields_bounds.py +72 -0
  297. lightly_studio/resolvers/video_resolver/get_view_by_id.py +52 -0
  298. lightly_studio/resolvers/video_resolver/video_count_annotations_filter.py +50 -0
  299. lightly_studio/resolvers/video_resolver/video_filter.py +98 -0
  300. lightly_studio/selection/__init__.py +1 -0
  301. lightly_studio/selection/mundig.py +143 -0
  302. lightly_studio/selection/select.py +203 -0
  303. lightly_studio/selection/select_via_db.py +273 -0
  304. lightly_studio/selection/selection_config.py +49 -0
  305. lightly_studio/services/annotations_service/__init__.py +33 -0
  306. lightly_studio/services/annotations_service/create_annotation.py +64 -0
  307. lightly_studio/services/annotations_service/delete_annotation.py +22 -0
  308. lightly_studio/services/annotations_service/get_annotation_by_id.py +31 -0
  309. lightly_studio/services/annotations_service/update_annotation.py +54 -0
  310. lightly_studio/services/annotations_service/update_annotation_bounding_box.py +36 -0
  311. lightly_studio/services/annotations_service/update_annotation_label.py +48 -0
  312. lightly_studio/services/annotations_service/update_annotations.py +29 -0
  313. lightly_studio/setup_logging.py +59 -0
  314. lightly_studio/type_definitions.py +31 -0
  315. lightly_studio/utils/__init__.py +3 -0
  316. lightly_studio/utils/download.py +94 -0
  317. lightly_studio/vendor/__init__.py +1 -0
  318. lightly_studio/vendor/mobileclip/ACKNOWLEDGEMENTS +422 -0
  319. lightly_studio/vendor/mobileclip/LICENSE +31 -0
  320. lightly_studio/vendor/mobileclip/LICENSE_weights_data +50 -0
  321. lightly_studio/vendor/mobileclip/README.md +5 -0
  322. lightly_studio/vendor/mobileclip/__init__.py +96 -0
  323. lightly_studio/vendor/mobileclip/clip.py +77 -0
  324. lightly_studio/vendor/mobileclip/configs/mobileclip_b.json +18 -0
  325. lightly_studio/vendor/mobileclip/configs/mobileclip_s0.json +18 -0
  326. lightly_studio/vendor/mobileclip/configs/mobileclip_s1.json +18 -0
  327. lightly_studio/vendor/mobileclip/configs/mobileclip_s2.json +18 -0
  328. lightly_studio/vendor/mobileclip/image_encoder.py +67 -0
  329. lightly_studio/vendor/mobileclip/logger.py +154 -0
  330. lightly_studio/vendor/mobileclip/models/__init__.py +10 -0
  331. lightly_studio/vendor/mobileclip/models/mci.py +933 -0
  332. lightly_studio/vendor/mobileclip/models/vit.py +433 -0
  333. lightly_studio/vendor/mobileclip/modules/__init__.py +4 -0
  334. lightly_studio/vendor/mobileclip/modules/common/__init__.py +4 -0
  335. lightly_studio/vendor/mobileclip/modules/common/mobileone.py +341 -0
  336. lightly_studio/vendor/mobileclip/modules/common/transformer.py +451 -0
  337. lightly_studio/vendor/mobileclip/modules/image/__init__.py +4 -0
  338. lightly_studio/vendor/mobileclip/modules/image/image_projection.py +113 -0
  339. lightly_studio/vendor/mobileclip/modules/image/replknet.py +188 -0
  340. lightly_studio/vendor/mobileclip/modules/text/__init__.py +4 -0
  341. lightly_studio/vendor/mobileclip/modules/text/repmixer.py +281 -0
  342. lightly_studio/vendor/mobileclip/modules/text/tokenizer.py +38 -0
  343. lightly_studio/vendor/mobileclip/text_encoder.py +245 -0
  344. lightly_studio/vendor/perception_encoder/LICENSE.PE +201 -0
  345. lightly_studio/vendor/perception_encoder/README.md +11 -0
  346. lightly_studio/vendor/perception_encoder/vision_encoder/__init__.py +0 -0
  347. lightly_studio/vendor/perception_encoder/vision_encoder/bpe_simple_vocab_16e6.txt.gz +0 -0
  348. lightly_studio/vendor/perception_encoder/vision_encoder/config.py +205 -0
  349. lightly_studio/vendor/perception_encoder/vision_encoder/config_src.py +264 -0
  350. lightly_studio/vendor/perception_encoder/vision_encoder/pe.py +766 -0
  351. lightly_studio/vendor/perception_encoder/vision_encoder/rope.py +352 -0
  352. lightly_studio/vendor/perception_encoder/vision_encoder/tokenizer.py +347 -0
  353. lightly_studio/vendor/perception_encoder/vision_encoder/transforms.py +36 -0
  354. lightly_studio-0.4.6.dist-info/METADATA +88 -0
  355. lightly_studio-0.4.6.dist-info/RECORD +356 -0
  356. lightly_studio-0.4.6.dist-info/WHEEL +4 -0
@@ -0,0 +1,517 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./0dDyq72A.js","./CWj6FrbW.js","./DkbXUtyG.js","./DIeogL5L.js","./CmLg0ys7.js","./VqWvU2yF.js","./DuUalyFS.js","./B_1cpokE.js"])))=>i.map(i=>d[i]);
2
+ var nT=Object.defineProperty;var rT=Object.getPrototypeOf;var iT=Reflect.get;var k_=e=>{throw TypeError(e)};var oT=(e,t,n)=>t in e?nT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ot=(e,t,n)=>oT(e,typeof t!="symbol"?t+"":t,n),Kg=(e,t,n)=>t.has(e)||k_("Cannot "+n);var y=(e,t,n)=>(Kg(e,t,"read from private field"),n?n.call(e):t.get(e)),V=(e,t,n)=>t.has(e)?k_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,i)=>(Kg(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Et=(e,t,n)=>(Kg(e,t,"access private method"),n);var T_=(e,t,n)=>iT(rT(e),n,t);import"./CWj6FrbW.js";import{M as sT,b3 as aT,bf as lT,D as ir,P as Sp,aQ as cT,A as sy,bg as E_,R as uT,S as dT,T as Cp,U as _f,X as I_,aq as qg,ao as Ap,a0 as O_,H as ay,F as of,L as R_,K as N_,as as M_,k as fT,Z as ly,B as cy,_ as sf,bh as hT,aL as gT,bi as pT,E as uy,bj as vT,a2 as mT,V as bT,O as dy,C as _T,a8 as dh,m as Hr,bk as yT,bl as wT,bm as xT,I as fy,aj as ST,j as Ct,bn as hy,W as da,aM as fh,a9 as gy,bo as CT,aN as D_,i as xn,y as cs,d as ft,bd as L_,g as d,h as O,ap as fa,p as st,a as at,c as G,s as et,r as W,f as N,b as E,bp as py,t as Rt,e as On,u as se,x as Le,n as jt,l as hh,bc as AT,aO as F_,aP as PT,bq as kT,br as vy,$ as TT,z as Ud}from"./DkbXUtyG.js";import{d as ET,e as B_,f as IT,s as $t,c as OT,m as RT,u as NT}from"./eAy8rZzC.js";import{d as MT,b as Gr,a as _,c as K,f as Z,t as oe}from"./CmLg0ys7.js";import{i as dt,a as sr,s as Kt,b as Ea,m as Ia}from"./B_1cpokE.js";import{p as P,r as xt,s as Ft,b as Rn,c as _t}from"./DuUalyFS.js";import{o as nn,d as ar,e as Eo}from"./D9SC3jBb.js";import{j as z_,p as DT,q as LT,r as FT,g as Vi,b as Yt,e as Qn,i as Rs,S as BT,d as Gn,t as Or,a as Kn,o as af,k as Ri,s as Pt,u as Yu,c as zo,v as my,w as zT}from"./C8mfFM-u.js";import{p as ri}from"./C80h3dJx.js";import{s as ut}from"./VqWvU2yF.js";import"./69_IOA4Y.js";import{i as by}from"./f1oG3eFE.js";import{b as _y,a as VT,c as $r}from"./DtWZc_tl.js";import{a as Uo,u as ii}from"./KNLP4aJU.js";import{P as HT,Q as WT,c as UT,R as GT}from"./BpLiSKgx.js";import{o as Xu,a as KT,g as yy}from"./xGHZQ1pe.js";import{A as qT,S as Yg}from"./DL9a7v5o.js";import"./CvGjimpO.js";import{u as YT}from"./D_FFv0Oe.js";import{Q as XT,y as jT,u as Vs,z as ZT,A as QT,B as JT,C as $T,s as cv,c as uv,q as dv,D as tE,E as eE,F as nE,G as rE,e as wy,f as iE}from"./VYb2dkNs.js";import{u as xy}from"./da7Oy_lO.js";import{r as Sy}from"./BRmB-kJ9.js";import{_ as V_}from"./C1FmrZbK.js";import{S as oE,s as sE,x as H_,e as Cy}from"./MErlcOXj.js";const aE=[];function Ay(e,t=!1,n=!1){return lf(e,new Map,"",aE,null,n)}function lf(e,t,n,i,s=null,l=!1){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(sT(e)){var c=Array(e.length);t.set(e,c),s!==null&&t.set(s,c);for(var f=0;f<e.length;f+=1){var h=e[f];f in e&&(c[f]=lf(h,t,n,i,null,l))}return c}if(aT(e)===lT){c={},t.set(e,c),s!==null&&t.set(s,c);for(var g in e)c[g]=lf(e[g],t,n,i,null,l);return c}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!l)return lf(e.toJSON(),t,n,i,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}const Xg=0,Gd=1,jg=2;function W_(e,t,n,i,s){ir&&Sp();var l=e,a=cT(),c=fT,f=I_,h,g,p,v=a?Ap(void 0):O_(void 0,!1,!1),b=a?Ap(void 0):O_(void 0,!1,!1),w=!1;function S(A,T){w=!0,T&&(R_(x),N_(x),M_(c));try{A===Gd&&i&&(g?ly(g):g=cy(()=>i(l,v))),A!==Xg&&h&&sf(h,()=>h=null),A!==Gd&&g&&sf(g,()=>g=null),A!==jg&&p&&sf(p,()=>p=null)}finally{T&&(M_(null),N_(null),R_(null),hT||gT())}}var x=sy(()=>{if(f===(f=t()))return;let A=ir&&E_(f)===(l.data===uT);if(A&&(l=dT(),Cp(l),_f(!1),A=!0),E_(f)){var T=f;w=!1,T.then(D=>{T===f&&(qg(v,D),S(Gd,!0))},D=>{if(T===f)throw qg(b,D),S(jg,!0),b.v}),ir||ay(()=>{w||S(Xg,!0)})}else qg(v,f),S(Gd,!1);return A&&_f(!0),()=>f=I_});ir&&(l=of)}function lE(e,t,n,i,s,l){let a=ir;ir&&Sp();var c,f,h=null;ir&&of.nodeType===pT&&(h=of,Sp());var g=ir?of:e,p;sy(()=>{const v=t()||null;var b=vT;v!==c&&(p&&(v===null?sf(p,()=>{p=null,f=null}):v===f?ly(p):(_T(p),B_(!1))),v&&v!==f&&(p=cy(()=>{if(h=ir?h:document.createElementNS(b,v),MT(h,h),i){ir&&ET(v)&&h.append(document.createComment(""));var w=ir?mT(h):h.appendChild(bT());ir&&(w===null?_f(!1):Cp(w)),i(h,w)}dy.nodes_end=h,g.before(h)})),c=v,c&&(f=c),B_(!0))},uy),a&&(_f(!0),Cp(g))}function cE(e,t,n){dh(()=>{var i=Hr(()=>t(e,n==null?void 0:n())||{});if(i!=null&&i.destroy)return()=>i.destroy()})}const uE=()=>performance.now(),Oi={tick:e=>requestAnimationFrame(e),now:()=>uE(),tasks:new Set};function Py(){const e=Oi.now();Oi.tasks.forEach(t=>{t.c(e)||(Oi.tasks.delete(t),t.f())}),Oi.tasks.size!==0&&Oi.tick(Py)}function dE(e){let t;return Oi.tasks.size===0&&Oi.tick(Py),{promise:new Promise(n=>{Oi.tasks.add(t={c:e,f:n})}),abort(){Oi.tasks.delete(t)}}}function Kd(e,t){fy(()=>{e.dispatchEvent(new CustomEvent(t))})}function fE(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function U_(e){const t={},n=e.split(";");for(const i of n){const[s,l]=i.split(":");if(!s||l===void 0)break;const a=fE(s.trim());t[a]=l.trim()}return t}const hE=e=>e;function fv(e,t,n,i){var s=(e&xT)!==0,l="both",a,c=t.inert,f=t.style.overflow,h,g;function p(){return fy(()=>a??(a=n()(t,(i==null?void 0:i())??{},{direction:l})))}var v={is_global:s,in(){t.inert=c,Kd(t,"introstart"),h=Pp(t,p(),g,1,()=>{Kd(t,"introend"),h==null||h.abort(),h=a=void 0,t.style.overflow=f})},out(x){t.inert=!0,Kd(t,"outrostart"),g=Pp(t,p(),h,0,()=>{Kd(t,"outroend"),x==null||x()})},stop:()=>{h==null||h.abort(),g==null||g.abort()}},b=dy;if((b.transitions??(b.transitions=[])).push(v),IT){var w=s;if(!w){for(var S=b.parent;S&&S.f&uy;)for(;(S=S.parent)&&!(S.f&yT););w=!S||(S.f&wT)!==0}w&&dh(()=>{Hr(()=>v.in())})}}function Pp(e,t,n,i,s){var l=i===1;if(ST(t)){var a,c=!1;return ay(()=>{if(!c){var x=t({direction:l?"in":"out"});a=Pp(e,x,n,i,s)}}),{abort:()=>{c=!0,a==null||a.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return s(),{abort:Ct,deactivate:Ct,reset:Ct,t:()=>i};const{delay:f=0,css:h,tick:g,easing:p=hE}=t;var v=[];if(l&&n===void 0&&(g&&g(0,1),h)){var b=U_(h(0,1));v.push(b,b)}var w=()=>1-i,S=e.animate(v,{duration:f,fill:"forwards"});return S.onfinish=()=>{S.cancel();var x=(n==null?void 0:n.t())??1-i;n==null||n.abort();var A=i-x,T=t.duration*Math.abs(A),D=[];if(T>0){var R=!1;if(h)for(var L=Math.ceil(T/16.666666666666668),F=0;F<=L;F+=1){var M=x+A*p(F/L),U=U_(h(M,1-M));D.push(U),R||(R=U.overflow==="hidden")}R&&(e.style.overflow="hidden"),w=()=>{var q=S.currentTime;return x+A*p(q/T)},g&&dE(()=>{if(S.playState!=="running")return!1;var q=w();return g(q,1-q),!0})}S=e.animate(D,{duration:T,fill:"forwards"}),S.onfinish=()=>{w=()=>i,g==null||g(i,1-i),s()}},{abort:()=>{S&&(S.cancel(),S.effect=null,S.onfinish=Ct)},deactivate:()=>{s=Ct},reset:()=>{i===0&&(g==null||g(1,0))},t:()=>w()}}function Ra(e,t,n=t){var i=new WeakSet;hy(e,"input",async s=>{var l=s?e.defaultValue:e.value;if(l=Zg(e)?Qg(l):l,n(l),da!==null&&i.add(da),await fh(),l!==(l=t())){var a=e.selectionStart,c=e.selectionEnd;e.value=l??"",c!==null&&(e.selectionStart=a,e.selectionEnd=Math.min(c,e.value.length))}}),(ir&&e.defaultValue!==e.value||Hr(t)==null&&e.value)&&(n(Zg(e)?Qg(e.value):e.value),da!==null&&i.add(da)),gy(()=>{var s=t();if(e===document.activeElement){var l=CT??da;if(i.has(l))return}Zg(e)&&s===Qg(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Zg(e){var t=e.type;return t==="number"||t==="range"}function Qg(e){return e===""?null:+e}function gE(e,t,n=t){hy(e,"change",()=>{n(e.files)}),ir&&e.files&&n(e.files),gy(()=>{e.files=t()})}var so,vs,Ya,Lf,ky;const Ff=class Ff{constructor(t){V(this,Lf);V(this,so,new WeakMap);V(this,vs);V(this,Ya);He(this,Ya,t)}observe(t,n){var i=y(this,so).get(t)||new Set;return i.add(n),y(this,so).set(t,i),Et(this,Lf,ky).call(this).observe(t,y(this,Ya)),()=>{var s=y(this,so).get(t);s.delete(n),s.size===0&&(y(this,so).delete(t),y(this,vs).unobserve(t))}}};so=new WeakMap,vs=new WeakMap,Ya=new WeakMap,Lf=new WeakSet,ky=function(){return y(this,vs)??He(this,vs,new ResizeObserver(t=>{for(var n of t){Ff.entries.set(n.target,n);for(var i of y(this,so).get(n.target)||[])i(n)}}))},ot(Ff,"entries",new WeakMap);let kp=Ff;var pE=new kp({box:"border-box"});function Oa(e,t,n){var i=pE.observe(e,()=>n(e[t]));dh(()=>(Hr(()=>n(e[t])),i))}var vE=class extends XT{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:z_()},t)}getOptimisticResult(e){return e.behavior=z_(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var w,S;const{state:n}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:l,isError:a,isRefetchError:c}=i,f=(S=(w=n.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:S.direction,h=a&&f==="forward",g=s&&f==="forward",p=a&&f==="backward",v=s&&f==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:LT(t,n.data),hasPreviousPage:DT(t,n.data),isFetchNextPageError:h,isFetchingNextPage:g,isFetchPreviousPageError:p,isFetchingPreviousPage:v,isRefetchError:c&&!h&&!p,isRefetching:l&&!g&&!v}}},ao,lo,rr,Pi,Di,cf,Tp,oy,mE=(oy=class extends oE{constructor(n,i){super();V(this,Di);V(this,ao);V(this,lo);V(this,rr);V(this,Pi);He(this,ao,n),this.setOptions(i),this.bindMethods(),Et(this,Di,cf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const i=this.options;this.options=y(this,ao).defaultMutationOptions(n),sE(this.options,i)||y(this,ao).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,rr),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&H_(i.mutationKey)!==H_(this.options.mutationKey)?this.reset():((s=y(this,rr))==null?void 0:s.state.status)==="pending"&&y(this,rr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=y(this,rr))==null||n.removeObserver(this)}onMutationUpdate(n){Et(this,Di,cf).call(this),Et(this,Di,Tp).call(this,n)}getCurrentResult(){return y(this,lo)}reset(){var n;(n=y(this,rr))==null||n.removeObserver(this),He(this,rr,void 0),Et(this,Di,cf).call(this),Et(this,Di,Tp).call(this)}mutate(n,i){var s;return He(this,Pi,i),(s=y(this,rr))==null||s.removeObserver(this),He(this,rr,y(this,ao).getMutationCache().build(y(this,ao),this.options)),y(this,rr).addObserver(this),y(this,rr).execute(n)}},ao=new WeakMap,lo=new WeakMap,rr=new WeakMap,Pi=new WeakMap,Di=new WeakSet,cf=function(){var i;const n=((i=y(this,rr))==null?void 0:i.state)??FT();He(this,lo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Tp=function(n){Cy.batch(()=>{var i,s,l,a,c,f,h,g;if(y(this,Pi)&&this.hasListeners()){const p=y(this,lo).variables,v=y(this,lo).context;(n==null?void 0:n.type)==="success"?((s=(i=y(this,Pi)).onSuccess)==null||s.call(i,n.data,p,v),(a=(l=y(this,Pi)).onSettled)==null||a.call(l,n.data,null,p,v)):(n==null?void 0:n.type)==="error"&&((f=(c=y(this,Pi)).onError)==null||f.call(c,n.error,p,v),(g=(h=y(this,Pi)).onSettled)==null||g.call(h,void 0,n.error,p,v))}this.listeners.forEach(p=>{p(y(this,lo))})})},oy);function Ty(e,t){return jT(e,vE)}function Ey(e,t){const n=Vs(),i=ZT(e)?e:D_(e),s=new mE(n,xn(i));let l;i.subscribe(f=>{l=(h,g)=>{s.mutate(h,g).catch(QT)},s.setOptions(f)});const a=D_(s.getCurrentResult(),f=>s.subscribe(Cy.batchCalls(h=>f(h)))),{subscribe:c}=cs(a,f=>({...f,mutate:l,mutateAsync:f.mutate}));return{subscribe:c}}var Qr,Jr,ki,Bf,Vr,xa,uf;const am=class am extends Map{constructor(n){super();V(this,Vr);V(this,Qr,new Map);V(this,Jr,ft(0));V(this,ki,ft(0));V(this,Bf,L_||-1);if(n){for(var[i,s]of n)super.set(i,s);y(this,ki).v=super.size}}has(n){var i=y(this,Qr),s=i.get(n);if(s===void 0){var l=super.get(n);if(l!==void 0)s=Et(this,Vr,xa).call(this,0),i.set(n,s);else return d(y(this,Jr)),!1}return d(s),!0}forEach(n,i){Et(this,Vr,uf).call(this),super.forEach(n,i)}get(n){var i=y(this,Qr),s=i.get(n);if(s===void 0){var l=super.get(n);if(l!==void 0)s=Et(this,Vr,xa).call(this,0),i.set(n,s);else{d(y(this,Jr));return}}return d(s),super.get(n)}set(n,i){var p;var s=y(this,Qr),l=s.get(n),a=super.get(n),c=super.set(n,i),f=y(this,Jr);if(l===void 0)l=Et(this,Vr,xa).call(this,0),s.set(n,l),O(y(this,ki),super.size),fa(f);else if(a!==i){fa(l);var h=f.reactions===null?null:new Set(f.reactions),g=h===null||!((p=l.reactions)!=null&&p.every(v=>h.has(v)));g&&fa(f)}return c}delete(n){var i=y(this,Qr),s=i.get(n),l=super.delete(n);return s!==void 0&&(i.delete(n),O(y(this,ki),super.size),O(s,-1),fa(y(this,Jr))),l}clear(){if(super.size!==0){super.clear();var n=y(this,Qr);O(y(this,ki),0);for(var i of n.values())O(i,-1);fa(y(this,Jr)),n.clear()}}keys(){return d(y(this,Jr)),super.keys()}values(){return Et(this,Vr,uf).call(this),super.values()}entries(){return Et(this,Vr,uf).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(y(this,ki)),super.size}};Qr=new WeakMap,Jr=new WeakMap,ki=new WeakMap,Bf=new WeakMap,Vr=new WeakSet,xa=function(n){return L_===y(this,Bf)?ft(n):Ap(n)},uf=function(){d(y(this,Jr));var n=y(this,Qr);if(y(this,ki).v!==n.size){for(var i of T_(am.prototype,this,"keys").call(this))if(!n.has(i)){var s=Et(this,Vr,xa).call(this,0);n.set(i,s)}}for([,s]of y(this,Qr))d(s)};let Na=am;/**
3
+ * @license @lucide/svelte v0.482.0 - ISC
4
+ *
5
+ * ISC License
6
+ *
7
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
8
+ *
9
+ * Permission to use, copy, modify, and/or distribute this software for any
10
+ * purpose with or without fee is hereby granted, provided that the above
11
+ * copyright notice and this permission notice appear in all copies.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
+ *
21
+ */const bE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var _E=Gr("<svg><!><!></svg>");function pn(e,t){st(t,!0);const n=P(t,"color",3,"currentColor"),i=P(t,"size",3,24),s=P(t,"strokeWidth",3,2),l=P(t,"absoluteStrokeWidth",3,!1),a=P(t,"iconNode",19,()=>[]),c=xt(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]),f=Vi(),[h,g]=f;var p=_E();Yt(p,w=>({...bE,...c,width:i(),height:i(),stroke:n(),"stroke-width":w,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>l()?Number(s())*24/Number(i()):s()]);var v=G(p);Qn(v,17,a,Rs,(w,S)=>{var x=E(()=>py(d(S),2));let A=()=>d(x)[0],T=()=>d(x)[1];var D=K(),R=N(D);lE(R,A,!0,(L,F)=>{Yt(L,M=>({...M}),[()=>`${A()}`=="button"?g({...T()},[{attribute_name:"formaction"}]):`${A()}`=="form"?g({...T()},[{attribute_name:"action"}]):`${A()}`=="a"?g({...T()},[{attribute_name:"href",lang_attribute_name:"hreflang"}]):{...T()}])}),_(w,D)});var b=et(v);ut(b,()=>t.children??Ct),W(p),_(e,p),at()}function yE(e,t){st(t,!0);/**
22
+ * @license @lucide/svelte v0.482.0 - ISC
23
+ *
24
+ * ISC License
25
+ *
26
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
27
+ *
28
+ * Permission to use, copy, modify, and/or distribute this software for any
29
+ * purpose with or without fee is hereby granted, provided that the above
30
+ * copyright notice and this permission notice appear in all copies.
31
+ *
32
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
33
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
34
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
35
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
36
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
37
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
38
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
39
+ *
40
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M12 13h4"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1"}],["path",{d:"M12 8h8"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2"}],["circle",{cx:"16",cy:"13",r:".5"}],["circle",{cx:"18",cy:"3",r:".5"}],["circle",{cx:"20",cy:"21",r:".5"}],["circle",{cx:"20",cy:"8",r:".5"}]];pn(e,Ft({name:"brain-circuit"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function gh(e,t){st(t,!0);/**
41
+ * @license @lucide/svelte v0.482.0 - ISC
42
+ *
43
+ * ISC License
44
+ *
45
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
46
+ *
47
+ * Permission to use, copy, modify, and/or distribute this software for any
48
+ * purpose with or without fee is hereby granted, provided that the above
49
+ * copyright notice and this permission notice appear in all copies.
50
+ *
51
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
52
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
53
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
54
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
55
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
56
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
57
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
58
+ *
59
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M20 6 9 17l-5-5"}]];pn(e,Ft({name:"check"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function ph(e,t){st(t,!0);/**
60
+ * @license @lucide/svelte v0.482.0 - ISC
61
+ *
62
+ * ISC License
63
+ *
64
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
65
+ *
66
+ * Permission to use, copy, modify, and/or distribute this software for any
67
+ * purpose with or without fee is hereby granted, provided that the above
68
+ * copyright notice and this permission notice appear in all copies.
69
+ *
70
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
71
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
72
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
73
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
74
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
75
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
76
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
77
+ *
78
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m6 9 6 6 6-6"}]];pn(e,Ft({name:"chevron-down"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function wE(e,t){st(t,!0);/**
79
+ * @license @lucide/svelte v0.482.0 - ISC
80
+ *
81
+ * ISC License
82
+ *
83
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
84
+ *
85
+ * Permission to use, copy, modify, and/or distribute this software for any
86
+ * purpose with or without fee is hereby granted, provided that the above
87
+ * copyright notice and this permission notice appear in all copies.
88
+ *
89
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
90
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
91
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
92
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
93
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
94
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
95
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
96
+ *
97
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m9 18 6-6-6-6"}]];pn(e,Ft({name:"chevron-right"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function xE(e,t){st(t,!0);/**
98
+ * @license @lucide/svelte v0.482.0 - ISC
99
+ *
100
+ * ISC License
101
+ *
102
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
103
+ *
104
+ * Permission to use, copy, modify, and/or distribute this software for any
105
+ * purpose with or without fee is hereby granted, provided that the above
106
+ * copyright notice and this permission notice appear in all copies.
107
+ *
108
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
109
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
110
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
111
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
112
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
113
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
114
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
115
+ *
116
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m18 15-6-6-6 6"}]];pn(e,Ft({name:"chevron-up"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function SE(e,t){st(t,!0);/**
117
+ * @license @lucide/svelte v0.482.0 - ISC
118
+ *
119
+ * ISC License
120
+ *
121
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
122
+ *
123
+ * Permission to use, copy, modify, and/or distribute this software for any
124
+ * purpose with or without fee is hereby granted, provided that the above
125
+ * copyright notice and this permission notice appear in all copies.
126
+ *
127
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
128
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
129
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
130
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
131
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
132
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
133
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
134
+ *
135
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];pn(e,Ft({name:"chevrons-up-down"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function Iy(e,t){st(t,!0);/**
136
+ * @license @lucide/svelte v0.482.0 - ISC
137
+ *
138
+ * ISC License
139
+ *
140
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
141
+ *
142
+ * Permission to use, copy, modify, and/or distribute this software for any
143
+ * purpose with or without fee is hereby granted, provided that the above
144
+ * copyright notice and this permission notice appear in all copies.
145
+ *
146
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
147
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
148
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
149
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
150
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
151
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
152
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
153
+ *
154
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3"}]];pn(e,Ft({name:"download"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function CE(e,t){st(t,!0);/**
155
+ * @license @lucide/svelte v0.482.0 - ISC
156
+ *
157
+ * ISC License
158
+ *
159
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
160
+ *
161
+ * Permission to use, copy, modify, and/or distribute this software for any
162
+ * purpose with or without fee is hereby granted, provided that the above
163
+ * copyright notice and this permission notice appear in all copies.
164
+ *
165
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
166
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
167
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
168
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
169
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
170
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
171
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
172
+ *
173
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];pn(e,Ft({name:"eye-off"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function AE(e,t){st(t,!0);/**
174
+ * @license @lucide/svelte v0.482.0 - ISC
175
+ *
176
+ * ISC License
177
+ *
178
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
179
+ *
180
+ * Permission to use, copy, modify, and/or distribute this software for any
181
+ * purpose with or without fee is hereby granted, provided that the above
182
+ * copyright notice and this permission notice appear in all copies.
183
+ *
184
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
185
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
186
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
187
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
188
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
189
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
190
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
191
+ *
192
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];pn(e,Ft({name:"eye"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function Jg(e,t){st(t,!0);/**
193
+ * @license @lucide/svelte v0.482.0 - ISC
194
+ *
195
+ * ISC License
196
+ *
197
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
198
+ *
199
+ * Permission to use, copy, modify, and/or distribute this software for any
200
+ * purpose with or without fee is hereby granted, provided that the above
201
+ * copyright notice and this permission notice appear in all copies.
202
+ *
203
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
204
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
205
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
206
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
207
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
208
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
209
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
210
+ *
211
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];pn(e,Ft({name:"info"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function Oy(e,t){st(t,!0);/**
212
+ * @license @lucide/svelte v0.482.0 - ISC
213
+ *
214
+ * ISC License
215
+ *
216
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
217
+ *
218
+ * Permission to use, copy, modify, and/or distribute this software for any
219
+ * purpose with or without fee is hereby granted, provided that the above
220
+ * copyright notice and this permission notice appear in all copies.
221
+ *
222
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
223
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
224
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
225
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
226
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
227
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
228
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
229
+ *
230
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];pn(e,Ft({name:"loader-circle"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function yf(e,t){st(t,!0);/**
231
+ * @license @lucide/svelte v0.482.0 - ISC
232
+ *
233
+ * ISC License
234
+ *
235
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
236
+ *
237
+ * Permission to use, copy, modify, and/or distribute this software for any
238
+ * purpose with or without fee is hereby granted, provided that the above
239
+ * copyright notice and this permission notice appear in all copies.
240
+ *
241
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
242
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
243
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
244
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
245
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
246
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
247
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
248
+ *
249
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]];pn(e,Ft({name:"network"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function PE(e,t){st(t,!0);/**
250
+ * @license @lucide/svelte v0.482.0 - ISC
251
+ *
252
+ * ISC License
253
+ *
254
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
255
+ *
256
+ * Permission to use, copy, modify, and/or distribute this software for any
257
+ * purpose with or without fee is hereby granted, provided that the above
258
+ * copyright notice and this permission notice appear in all copies.
259
+ *
260
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
261
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
262
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
263
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
264
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
265
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
266
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
267
+ *
268
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];pn(e,Ft({name:"pencil"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function G_(e,t){st(t,!0);/**
269
+ * @license @lucide/svelte v0.482.0 - ISC
270
+ *
271
+ * ISC License
272
+ *
273
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
274
+ *
275
+ * Permission to use, copy, modify, and/or distribute this software for any
276
+ * purpose with or without fee is hereby granted, provided that the above
277
+ * copyright notice and this permission notice appear in all copies.
278
+ *
279
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
280
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
281
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
282
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
283
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
284
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
285
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
286
+ *
287
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["polygon",{points:"6 3 20 12 6 21 6 3"}]];pn(e,Ft({name:"play"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function kE(e,t){st(t,!0);/**
288
+ * @license @lucide/svelte v0.482.0 - ISC
289
+ *
290
+ * ISC License
291
+ *
292
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
293
+ *
294
+ * Permission to use, copy, modify, and/or distribute this software for any
295
+ * purpose with or without fee is hereby granted, provided that the above
296
+ * copyright notice and this permission notice appear in all copies.
297
+ *
298
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
299
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
300
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
301
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
302
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
303
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
304
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
305
+ *
306
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"}]];pn(e,Ft({name:"puzzle"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function TE(e,t){st(t,!0);/**
307
+ * @license @lucide/svelte v0.482.0 - ISC
308
+ *
309
+ * ISC License
310
+ *
311
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
312
+ *
313
+ * Permission to use, copy, modify, and/or distribute this software for any
314
+ * purpose with or without fee is hereby granted, provided that the above
315
+ * copyright notice and this permission notice appear in all copies.
316
+ *
317
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
318
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
319
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
320
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
321
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
322
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
323
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
324
+ *
325
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];pn(e,Ft({name:"search"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function EE(e,t){st(t,!0);/**
326
+ * @license @lucide/svelte v0.482.0 - ISC
327
+ *
328
+ * ISC License
329
+ *
330
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
331
+ *
332
+ * Permission to use, copy, modify, and/or distribute this software for any
333
+ * purpose with or without fee is hereby granted, provided that the above
334
+ * copyright notice and this permission notice appear in all copies.
335
+ *
336
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
337
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
338
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
339
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
340
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
341
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
342
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
343
+ *
344
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];pn(e,Ft({name:"settings"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function IE(e,t){st(t,!0);/**
345
+ * @license @lucide/svelte v0.482.0 - ISC
346
+ *
347
+ * ISC License
348
+ *
349
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
350
+ *
351
+ * Permission to use, copy, modify, and/or distribute this software for any
352
+ * purpose with or without fee is hereby granted, provided that the above
353
+ * copyright notice and this permission notice appear in all copies.
354
+ *
355
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
356
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
357
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
358
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
359
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
360
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
361
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
362
+ *
363
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor"}]];pn(e,Ft({name:"tags"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function Ry(e,t){st(t,!0);/**
364
+ * @license @lucide/svelte v0.482.0 - ISC
365
+ *
366
+ * ISC License
367
+ *
368
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
369
+ *
370
+ * Permission to use, copy, modify, and/or distribute this software for any
371
+ * purpose with or without fee is hereby granted, provided that the above
372
+ * copyright notice and this permission notice appear in all copies.
373
+ *
374
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
375
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
376
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
377
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
378
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
379
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
380
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
381
+ *
382
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];pn(e,Ft({name:"trash-2"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function OE(e,t){st(t,!0);/**
383
+ * @license @lucide/svelte v0.482.0 - ISC
384
+ *
385
+ * ISC License
386
+ *
387
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
388
+ *
389
+ * Permission to use, copy, modify, and/or distribute this software for any
390
+ * purpose with or without fee is hereby granted, provided that the above
391
+ * copyright notice and this permission notice appear in all copies.
392
+ *
393
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
394
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
395
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
396
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
397
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
398
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
399
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
400
+ *
401
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15"}]];pn(e,Ft({name:"upload"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function RE(e,t){st(t,!0);/**
402
+ * @license @lucide/svelte v0.482.0 - ISC
403
+ *
404
+ * ISC License
405
+ *
406
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
407
+ *
408
+ * Permission to use, copy, modify, and/or distribute this software for any
409
+ * purpose with or without fee is hereby granted, provided that the above
410
+ * copyright notice and this permission notice appear in all copies.
411
+ *
412
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
413
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
414
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
415
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
416
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
417
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
418
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
419
+ *
420
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"}],["path",{d:"m14 7 3 3"}],["path",{d:"M5 6v4"}],["path",{d:"M19 14v4"}],["path",{d:"M10 2v2"}],["path",{d:"M7 8H3"}],["path",{d:"M21 16h-4"}],["path",{d:"M11 3H9"}]];pn(e,Ft({name:"wand-sparkles"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}function Ny(e,t){st(t,!0);/**
421
+ * @license @lucide/svelte v0.482.0 - ISC
422
+ *
423
+ * ISC License
424
+ *
425
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
426
+ *
427
+ * Permission to use, copy, modify, and/or distribute this software for any
428
+ * purpose with or without fee is hereby granted, provided that the above
429
+ * copyright notice and this permission notice appear in all copies.
430
+ *
431
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
432
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
433
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
434
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
435
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
436
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
437
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
438
+ *
439
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];pn(e,Ft({name:"x"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}})),at()}/**
440
+ * @license @lucide/svelte v0.482.0 - ISC
441
+ *
442
+ * ISC License
443
+ *
444
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
445
+ *
446
+ * Permission to use, copy, modify, and/or distribute this software for any
447
+ * purpose with or without fee is hereby granted, provided that the above
448
+ * copyright notice and this permission notice appear in all copies.
449
+ *
450
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
451
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
452
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
453
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
454
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
455
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
456
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
457
+ *
458
+ */const NE=Object.freeze(Object.defineProperty({__proto__:null,default:gh},Symbol.toStringTag,{value:"Module"}));var ME=Z('<div class="relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700" role="alert"><strong class="block font-bold"> </strong> <span class="block"><!></span></div>');function hv(e,t){var n=ME(),i=G(n),s=G(i,!0);W(i);var l=et(i,2),a=G(l);ut(a,()=>t.children),W(l),W(n),Rt(()=>$t(s,t.title)),_(e,n)}function DE(e=100){let t;return n=>{clearTimeout(t),t=setTimeout(n,e)}}function LE(e=200){let t,n;return(i,s)=>l=>{t&&(Math.abs(l-t)>i?(s.fast(),n!==void 0&&(clearTimeout(n),n=void 0),n=setTimeout(()=>{s.slow(),n=void 0},e)):n===void 0&&s.slow()),t=l}}const Ep={ceil:(e,t)=>Math.ceil(e/t)*t,floor:(e,t)=>~~(e/t)*t},FE=(e,t,n,i,s,l)=>{const a=[],c=Ep.floor(l/t*i,i),f=c>s?c-s:0,h=c>0&&f>=0?f:c,p=Math.min(e,Ep.ceil((l+n)/t*i,i))+s,v=p<e?p:e;for(let b=h;b<v;b++)a.push(b);return a},QV=(e,t,n,i,s)=>{const l=[],a=~~(s/t),c=a>i?a-i:0,f=c>=0?c:a,g=Math.min(e,~~((s+n)/t))+i,p=g<e?g:e;for(let v=f;v<p;v++)l.push(v);return l},K_=(e,t)=>~~(e/t),BE=DE(),zE=LE();var VE=Z("<div><!></div>"),HE=Z("<div><!> <div></div> <!></div>");function gv(e,t){st(t,!0);let n=P(t,"width",3,"100%"),i=P(t,"overScan",3,1),s=P(t,"marginLeft",3,0),l=P(t,"marginTop",3,0),a=P(t,"scrollPosition",15,0),c=P(t,"scrollBehavior",3,"auto"),f=P(t,"getKey",3,lt=>lt),h=xt(t,["$$slots","$$events","$$legacy","itemCount","itemHeight","itemWidth","height","width","overScan","marginLeft","marginTop","scrollPosition","scrollBehavior","getKey","columnCount","onscroll","header","item","placeholder","footer"]),g=ft(void 0),p=ft(On(a())),v=ft(0),b=ft(0),w=ft(0),S=ft(On([])),x=!1,A=!1,T=ft(!1);function D(lt,yt=c()){L(K_(lt,d(q))*t.itemHeight+l()+d(v),yt)}function R(lt,yt=c()){L(lt,yt)}const L=(lt,yt=c())=>{d(g)&&(x=!0,d(g).scrollTo({top:lt,behavior:yt}),x=!1)},F=lt=>{d(g)&&!x&&!A&&(x=!0,d(g).scrollTo({top:lt,behavior:c()}),x=!1)},M=lt=>{const yt=K_(lt,d(q)),Ot=lt%d(q);return{rowIndex:yt,columnIndex:Ot,style:`position: absolute; transform: translate3d(${Ot*t.itemWidth+s()}px, ${yt*t.itemHeight+l()}px, 0px); height: ${t.itemHeight}px; width: ${t.itemWidth}px; will-change: transform;`}},U=lt=>{A=!0,x||(O(p,Math.max(0,lt.currentTarget.scrollTop-d(v)),!0),a(lt.currentTarget.scrollTop),d(z)(d(p))),BE(()=>{A=!1})};let q=E(()=>t.columnCount?t.columnCount:Math.max(~~((d(b)-s()-(d(b)-d(w)))/t.itemWidth),1)),tt=E(()=>Ep.ceil(t.itemCount,d(q))*t.itemHeight/d(q)),nt=E(()=>d(q)*i());se(()=>{(d(b)||d(q))&&O(S,FE(t.itemCount,t.itemHeight,t.height,d(q),d(nt),d(p)),!0)}),se(()=>{d(g)&&F(a())});let z=E(()=>zE(t.height,{fast:()=>{O(T,!0)},slow:()=>{O(T,!1)}}));var it={scrollToIndex:D,scrollToPosition:R},X=HE(),j=lt=>{var yt;U(lt),(yt=t.onscroll)==null||yt.call(t,lt)};Yt(X,lt=>({onscroll:j,...h,[BT]:lt}),[()=>({position:"relative",overflow:"auto",height:`${t.height??""}px`,width:n()})]);var J=G(X);{var rt=lt=>{var yt=VE(),Ot=G(yt);ut(Ot,()=>t.header),W(yt),Oa(yt,"offsetHeight",Vt=>O(v,Vt)),_(lt,yt)};dt(J,lt=>{t.header&&lt(rt)})}var ht=et(J,2);let pt;Qn(ht,21,()=>d(S),lt=>f()(lt),(lt,yt)=>{const Ot=E(()=>{const{rowIndex:kt,columnIndex:Wt,style:Lt}=M(d(yt));return{rowIndex:kt,columnIndex:Wt,style:Lt}});var Vt=K(),St=N(Vt);{var At=kt=>{var Wt=K(),Lt=N(Wt);ut(Lt,()=>t.item,()=>({index:d(yt),rowIndex:d(Ot).rowIndex,columnIndex:d(Ot).columnIndex,style:d(Ot).style})),_(kt,Wt)},qt=kt=>{var Wt=K(),Lt=N(Wt);ut(Lt,()=>t.placeholder,()=>({index:d(yt),rowIndex:d(Ot).rowIndex,columnIndex:d(Ot).columnIndex,style:d(Ot).style})),_(kt,Wt)};dt(St,kt=>{!d(T)||!t.placeholder?kt(At):kt(qt,!1)})}_(lt,Vt)}),W(ht);var wt=et(ht,2);return ut(wt,()=>t.footer??Ct),W(X),Rn(X,lt=>O(g,lt),()=>d(g)),Rt(lt=>pt=Gn(ht,"",pt,lt),[()=>({height:`${d(tt)??""}px`,width:"100%"})]),Oa(X,"offsetWidth",lt=>O(b,lt)),Oa(X,"clientWidth",lt=>O(w,lt)),_(e,X),at(it)}const vh=({datasetId:e})=>{const t=Ey(JT());return t.subscribe(()=>{}),{updateAnnotations:i=>new Promise((s,l)=>{xn(t).mutate({path:{dataset_id:e},body:i},{onSuccess:()=>{s()},onError:a=>{l(a)}})})}},WE=(...e)=>{const t=$T(...e),n=Le(!1),i=Ty({...t,getNextPageParam:f=>f.nextCursor||void 0}),s=Vs(),l=()=>{s.invalidateQueries({queryKey:t.queryKey}),s.invalidateQueries({queryKey:cv({path:{dataset_id:a}}).queryKey})},a=e[0].path.dataset_id,{updateAnnotations:c}=vh({datasetId:a});return{annotations:i,refresh:l,isPending:n,updateAnnotations:async f=>{try{n.set(!0),await c(f),l(),Or.success("Annotations updated successfully")}catch(h){Or.error("Failed to update annotations:"+h.message)}finally{n.set(!1)}}}};var UE=Z('<div role="status"><svg aria-hidden="true" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"></path></svg> <span class="sr-only">Loading...</span></div>');function My(e,t){const n=P(t,"size",3,"medium"),i=P(t,"align",3,"center"),s={small:"h-4 w-4",medium:"h-6 w-6",large:"h-8 w-8"},l={left:"text-start",center:"text-center",right:"text-end"};var a=UE(),c=G(a);jt(2),W(a),Rt(()=>Kn(c,0,s[n()]+" "+l[i()]+" spinner inline animate-spin text-gray-200 dark:text-gray-600","svelte-uqfq9v")),_(e,a)}function GE(e){return typeof e=="function"}function KE(e){return e!==null&&typeof e=="object"}const qE=["string","number","bigint","boolean"];function Ip(e){return e==null||qE.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Ip(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Ma=Symbol("box"),pv=Symbol("is-writable");function YE(e){return KE(e)&&Ma in e}function XE(e){return H.isBox(e)&&pv in e}function H(e){let t=ft(On(e));return{[Ma]:!0,[pv]:!0,get current(){return d(t)},set current(n){O(t,n,!0)}}}function jE(e,t){const n=E(e);return t?{[Ma]:!0,[pv]:!0,get current(){return d(n)},set current(i){t(i)}}:{[Ma]:!0,get current(){return e()}}}function ZE(e){return H.isBox(e)?e:GE(e)?H.with(e):H(e)}function QE(e){return Object.entries(e).reduce((t,[n,i])=>H.isBox(i)?(H.isWritableBox(i)?Object.defineProperty(t,n,{get(){return i.current},set(s){i.current=s}}):Object.defineProperty(t,n,{get(){return i.current}}),t):Object.assign(t,{[n]:i}),{})}function JE(e){return H.isWritableBox(e)?{[Ma]:!0,get current(){return e.current}}:e}H.from=ZE;H.with=jE;H.flatten=QE;H.readonly=JE;H.isBox=YE;H.isWritableBox=XE;function Dy(...e){return function(t){var n;for(const i of e)if(i){if(t.defaultPrevented)return;typeof i=="function"?i.call(this,t):(n=i.current)==null||n.call(this,t)}}}var ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ly(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fy={},q_=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$E=/\n/g,tI=/^\s*/,eI=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,nI=/^:\s*/,rI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,iI=/^[;\s]*/,oI=/^\s+|\s+$/g,sI=`
459
+ `,Y_="/",X_="*",Io="",aI="comment",lI="declaration",cI=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function s(w){var S=w.match($E);S&&(n+=S.length);var x=w.lastIndexOf(sI);i=~x?w.length-x:i+w.length}function l(){var w={line:n,column:i};return function(S){return S.position=new a(w),h(),S}}function a(w){this.start=w,this.end={line:n,column:i},this.source=t.source}a.prototype.content=e;function c(w){var S=new Error(t.source+":"+n+":"+i+": "+w);if(S.reason=w,S.filename=t.source,S.line=n,S.column=i,S.source=e,!t.silent)throw S}function f(w){var S=w.exec(e);if(S){var x=S[0];return s(x),e=e.slice(x.length),S}}function h(){f(tI)}function g(w){var S;for(w=w||[];S=p();)S!==!1&&w.push(S);return w}function p(){var w=l();if(!(Y_!=e.charAt(0)||X_!=e.charAt(1))){for(var S=2;Io!=e.charAt(S)&&(X_!=e.charAt(S)||Y_!=e.charAt(S+1));)++S;if(S+=2,Io===e.charAt(S-1))return c("End of comment missing");var x=e.slice(2,S-2);return i+=2,s(x),e=e.slice(S),i+=2,w({type:aI,comment:x})}}function v(){var w=l(),S=f(eI);if(S){if(p(),!f(nI))return c("property missing ':'");var x=f(rI),A=w({type:lI,property:j_(S[0].replace(q_,Io)),value:x?j_(x[0].replace(q_,Io)):Io});return f(iI),A}}function b(){var w=[];g(w);for(var S;S=v();)S!==!1&&(w.push(S),g(w));return w}return h(),b()};function j_(e){return e?e.replace(oI,Io):Io}var uI=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fy,"__esModule",{value:!0});var Z_=Fy.default=fI,dI=uI(cI);function fI(e,t){var n=null;if(!e||typeof e!="string")return n;var i=(0,dI.default)(e),s=typeof t=="function";return i.forEach(function(l){if(l.type==="declaration"){var a=l.property,c=l.value;s?t(a,c,l):c&&(n=n||{},n[a]=c)}}),n}const hI=Z_.default||Z_,gI=/\d/,pI=["-","_","/","."];function vI(e=""){if(!gI.test(e))return e!==e.toLowerCase()}function mI(e){const t=[];let n="",i,s;for(const l of e){const a=pI.includes(l);if(a===!0){t.push(n),n="",i=void 0;continue}const c=vI(l);if(s===!1){if(i===!1&&c===!0){t.push(n),n=l,i=c;continue}if(i===!0&&c===!1&&n.length>1){const f=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=f+l,i=c;continue}}n+=l,i=c,s=a}return t.push(n),t}function By(e){return e?mI(e).map(t=>_I(t)).join(""):""}function bI(e){return yI(By(e||""))}function _I(e){return e?e[0].toUpperCase()+e.slice(1):""}function yI(e){return e?e[0].toLowerCase()+e.slice(1):""}function Sa(e){if(!e)return{};const t={};function n(i,s){if(i.startsWith("-moz-")||i.startsWith("-webkit-")||i.startsWith("-ms-")||i.startsWith("-o-")){t[By(i)]=s;return}if(i.startsWith("--")){t[i]=s;return}t[bI(i)]=s}return hI(e,n),t}function Ni(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function wI(e,t){const n=RegExp(e,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(n)?i.replace(n,t):i}}const xI=wI(/[A-Z]/,e=>`-${e.toLowerCase()}`);function SI(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${xI(t)}: ${e[t]};`).join(`
460
+ `)}function vv(e={}){return SI(e).replace(`
461
+ `," ")}const zy={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},CI=vv(zy);function AI(e){var t;return e.length>2&&e.startsWith("on")&&e[2]===((t=e[2])==null?void 0:t.toLowerCase())}function ee(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const i=e[n];for(const s in i){const l=t[s],a=i[s],c=typeof l=="function",f=typeof a=="function";if(c&&AI(s)){const h=l,g=a;t[s]=Dy(h,g)}else if(c&&f)t[s]=Ni(l,a);else if(s==="class"){const h=Ip(l),g=Ip(a);h&&g?t[s]=af(l,a):h?t[s]=af(l):g&&(t[s]=af(a))}else if(s==="style"){const h=typeof l=="object",g=typeof a=="object",p=typeof l=="string",v=typeof a=="string";if(h&&g)t[s]={...l,...a};else if(h&&v){const b=Sa(a);t[s]={...l,...b}}else if(p&&g){const b=Sa(l);t[s]={...b,...a}}else if(p&&v){const b=Sa(l),w=Sa(a);t[s]={...b,...w}}else h?t[s]=l:g?t[s]=a:p?t[s]=l:v&&(t[s]=a)}else t[s]=a!==void 0?a:l}}return typeof t.style=="object"&&(t.style=vv(t.style).replaceAll(`
462
+ `," ")),t.hidden!==!0&&(t.hidden=void 0,delete t.hidden),t.disabled!==!0&&(t.disabled=void 0,delete t.disabled),t}const Vy=typeof window<"u"?window:void 0;function PI(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var ms,Xa;class kI{constructor(t={}){V(this,ms);V(this,Xa);const{window:n=Vy,document:i=n==null?void 0:n.document}=t;n!==void 0&&(He(this,ms,i),He(this,Xa,OT(s=>{const l=nn(n,"focusin",s),a=nn(n,"focusout",s);return()=>{l(),a()}})))}get current(){var t;return(t=y(this,Xa))==null||t.call(this),y(this,ms)?PI(y(this,ms)):null}}ms=new WeakMap,Xa=new WeakMap;new kI;function TI(e){return typeof e=="function"}function EI(e,t){switch(e){case"post":se(t);break;case"pre":hh(t);break}}function Hy(e,t,n,i={}){const{lazy:s=!1}=i;let l=!s,a=Array.isArray(e)?[]:void 0;EI(t,()=>{const c=Array.isArray(e)?e.map(h=>h()):e();if(!l){l=!0,a=c;return}const f=Hr(()=>n(c,a));return a=c,f})}function Se(e,t,n){Hy(e,"post",t,n)}function II(e,t,n){Hy(e,"pre",t,n)}Se.pre=II;function OI(e){return TI(e)?e():e}var Ti;class RI{constructor(t,n={box:"border-box"}){V(this,Ti,ft(On({width:0,height:0})));var s,l;const i=n.window??Vy;O(y(this,Ti),{width:((s=n.initialSize)==null?void 0:s.width)??0,height:((l=n.initialSize)==null?void 0:l.height)??0},!0),se(()=>{if(!i)return;const a=OI(t);if(!a)return;const c=new i.ResizeObserver(f=>{for(const h of f){const g=n.box==="content-box"?h.contentBoxSize:h.borderBoxSize,p=Array.isArray(g)?g:[g];d(y(this,Ti)).width=p.reduce((v,b)=>Math.max(v,b.inlineSize),0),d(y(this,Ti)).height=p.reduce((v,b)=>Math.max(v,b.blockSize),0)}});return c.observe(a),()=>{c.disconnect()}})}get current(){return d(y(this,Ti))}get width(){return d(y(this,Ti)).width}get height(){return d(y(this,Ti)).height}}Ti=new WeakMap;var ja,Za;class Wy{constructor(t){V(this,ja,ft(void 0));V(this,Za);se(()=>{O(y(this,ja),y(this,Za),!0),He(this,Za,t())})}get current(){return d(y(this,ja))}}ja=new WeakMap,Za=new WeakMap;var Qa,Ei;class Fn{constructor(t){V(this,Qa);V(this,Ei);He(this,Qa,t),He(this,Ei,Symbol(t))}get key(){return y(this,Ei)}exists(){return AT(y(this,Ei))}get(){const t=F_(y(this,Ei));if(t===void 0)throw new Error(`Context "${y(this,Qa)}" not found`);return t}getOr(t){const n=F_(y(this,Ei));return n===void 0?t:n}set(t){return PT(y(this,Ei),t)}}Qa=new WeakMap,Ei=new WeakMap;function mv(e){se(()=>()=>{e()})}function ue({id:e,ref:t,deps:n=()=>!0,onRefChange:i,getRootNode:s}){Se([()=>e.current,n],([l])=>{const a=(s==null?void 0:s())??document,c=a==null?void 0:a.getElementById(l);c?t.current=c:t.current=null,i==null||i(t.current)}),mv(()=>{t.current=null,i==null||i(null)})}function ju(e,t){return setTimeout(t,e)}function br(e){fh().then(e)}function bv(e){se(()=>Hr(()=>e()))}function vo(e){return e?"open":"closed"}function NI(e){return e?"checked":"unchecked"}function _v(e){return e?"true":"false"}function mh(e){return e?"true":"false"}function lr(e){return e?"":void 0}function Uy(e){return e?"true":"false"}function Gy(e){return e?"true":"false"}function Ky(e,t){return t?"mixed":e?"true":"false"}function JV(e){return e}function MI(e){return e?"true":void 0}function $V(e){return e}function DI(e){return e?"":void 0}function LI(e){return e?"":void 0}function FI(e){return e?!0:void 0}function yv(e){return e?!0:void 0}function BI(e){return e?!0:void 0}const zr="ArrowDown",Zu="ArrowLeft",Qu="ArrowRight",Ir="ArrowUp",Hs="End",Li="Enter",zI="Escape",Ws="Home",qy="PageDown",Yy="PageUp",Mi=" ",Op="Tab",VI="p",HI="n",WI="j",UI="k";function GI(e){return window.getComputedStyle(e).getPropertyValue("direction")}function KI(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Zu:Qu,vertical:zr}[t]}function qI(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Qu:Zu,vertical:Ir}[t]}function YI(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:KI(e,t),prevKey:qI(e,t)}}const bh=typeof document<"u",Rp=XI();function XI(){var e,t;return bh&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Np(e){return e instanceof HTMLElement}function Xy(e){return e instanceof Element}function jy(e){return e instanceof Element||e instanceof SVGElement}function jI(e){return e!==null}function ZI(e){return e instanceof HTMLInputElement&&"select"in e}function QI(e,t){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JI(e){const t=H(null);function n(){if(!bh)return[];const a=document.getElementById(e.rootNodeId.current);return a?e.candidateSelector?Array.from(a.querySelectorAll(e.candidateSelector)):e.candidateAttr?Array.from(a.querySelectorAll(`[${e.candidateAttr}]:not([data-disabled])`)):[]:[]}function i(){var c;const a=n();a.length&&((c=a[0])==null||c.focus())}function s(a,c,f=!1){var D;const h=document.getElementById(e.rootNodeId.current);if(!h||!a)return;const g=n();if(!g.length)return;const p=g.indexOf(a),v=GI(h),{nextKey:b,prevKey:w}=YI(v,e.orientation.current),S=e.loop.current,x={[b]:p+1,[w]:p-1,[Ws]:0,[Hs]:g.length-1};if(f){const R=b===zr?Qu:zr,L=w===Ir?Zu:Ir;x[R]=p+1,x[L]=p-1}let A=x[c.key];if(A===void 0)return;c.preventDefault(),A<0&&S?A=g.length-1:A===g.length&&S&&(A=0);const T=g[A];if(T)return T.focus(),t.current=T.id,(D=e.onCandidateFocus)==null||D.call(e,T),T}function l(a){const c=n(),f=t.current!==null;return a&&!f&&c[0]===a?(t.current=a.id,0):(a==null?void 0:a.id)===t.current?0:-1}return{setCurrentTabStopId(a){t.current=a},getTabIndex:l,handleKeydown:s,focusFirstCandidate:i,currentTabStopId:t}}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function de(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function Ce(){}function $I(e,t){const n=H(e);function i(l){return t[n.current][l]??n.current}return{state:n,dispatch:l=>{n.current=i(l)}}}function t3(e,t){let n=ft(On({})),i=ft("none");const s=e.current?"mounted":"unmounted";let l=ft(null);const a=new Wy(()=>e.current);Se([()=>t.current,()=>e.current],([v,b])=>{!v||!b||br(()=>{O(l,document.getElementById(v),!0)})});const{state:c,dispatch:f}=$I(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});Se(()=>e.current,v=>{if(d(l)||O(l,document.getElementById(t.current),!0),!d(l)||!(v!==a.current))return;const w=d(i),S=qd(d(l));v?f("MOUNT"):S==="none"||d(n).display==="none"?f("UNMOUNT"):f(a&&w!==S?"ANIMATION_OUT":"UNMOUNT")});function h(v){if(d(l)||O(l,document.getElementById(t.current),!0),!d(l))return;const b=qd(d(l)),w=b.includes(v.animationName)||b==="none";v.target===d(l)&&w&&f("ANIMATION_END")}function g(v){d(l)||O(l,document.getElementById(t.current),!0),d(l)&&v.target===d(l)&&O(i,qd(d(l)),!0)}Se(()=>c.current,()=>{if(d(l)||O(l,document.getElementById(t.current),!0),!d(l))return;const v=qd(d(l));O(i,c.current==="mounted"?v:"none",!0)}),Se(()=>d(l),v=>{if(v)return O(n,getComputedStyle(v),!0),Ni(nn(v,"animationstart",g),nn(v,"animationcancel",h),nn(v,"animationend",h))});const p=E(()=>["mounted","unmountSuspended"].includes(c.current));return{get current(){return d(p)}}}function qd(e){return e&&getComputedStyle(e).animationName||"none"}function _h(e,t){st(t,!0);const n=t3(H.with(()=>t.present),H.with(()=>t.id));var i=K(),s=N(i);{var l=a=>{var c=K(),f=N(c);ut(f,()=>t.presence??Ct,()=>({present:n})),_(a,c)};dt(s,a=>{(t.forceMount||t.present||n.current)&&a(l)})}_(e,i),at()}function e3(e){return{content:`data-${e}-content`,trigger:`data-${e}-trigger`,overlay:`data-${e}-overlay`,title:`data-${e}-title`,description:`data-${e}-description`,close:`data-${e}-close`,cancel:`data-${e}-cancel`,action:`data-${e}-action`}}var Ja,$a,tl,el,nl,rl,il,ol,sl,al;class n3{constructor(t){ot(this,"opts");V(this,Ja,ft(null));V(this,$a,ft(null));V(this,tl,ft(null));V(this,el,ft(void 0));V(this,nl,ft(void 0));V(this,rl,ft(void 0));V(this,il,ft(void 0));V(this,ol,ft(null));V(this,sl,E(()=>e3(this.opts.variant.current)));V(this,al,E(()=>({"data-state":vo(this.opts.open.current)})));this.opts=t,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return d(y(this,Ja))}set triggerNode(t){O(y(this,Ja),t,!0)}get contentNode(){return d(y(this,$a))}set contentNode(t){O(y(this,$a),t,!0)}get descriptionNode(){return d(y(this,tl))}set descriptionNode(t){O(y(this,tl),t,!0)}get contentId(){return d(y(this,el))}set contentId(t){O(y(this,el),t,!0)}get titleId(){return d(y(this,nl))}set titleId(t){O(y(this,nl),t,!0)}get triggerId(){return d(y(this,rl))}set triggerId(t){O(y(this,rl),t,!0)}get descriptionId(){return d(y(this,il))}set descriptionId(t){O(y(this,il),t,!0)}get cancelNode(){return d(y(this,ol))}set cancelNode(t){O(y(this,ol),t,!0)}get attrs(){return d(y(this,sl))}set attrs(t){O(y(this,sl),t)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return d(y(this,al))}set sharedProps(t){O(y(this,al),t)}}Ja=new WeakMap,$a=new WeakMap,tl=new WeakMap,el=new WeakMap,nl=new WeakMap,rl=new WeakMap,il=new WeakMap,ol=new WeakMap,sl=new WeakMap,al=new WeakMap;var zf,ll;class r3{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,zf,E(()=>this.root.attrs[this.opts.variant.current]));V(this,ll,E(()=>({id:this.opts.id.current,[d(y(this,zf))]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps})));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),ue({...t,deps:()=>this.root.opts.open.current})}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Mi||t.key===Li)&&(t.preventDefault(),this.root.handleClose())}get props(){return d(y(this,ll))}set props(t){O(y(this,ll),t)}}zf=new WeakMap,ll=new WeakMap;var cl;class i3{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,cl,E(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps})));this.opts=t,this.root=n,ue({...t,onRefChange:i=>{this.root.titleId=i==null?void 0:i.id},deps:()=>this.root.opts.open.current})}get props(){return d(y(this,cl))}set props(t){O(y(this,cl),t)}}cl=new WeakMap;var ul;class o3{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,ul,E(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=t,this.root=n,ue({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.descriptionNode=i,this.root.descriptionId=i==null?void 0:i.id}})}get props(){return d(y(this,ul))}set props(t){O(y(this,ul),t)}}ul=new WeakMap;var dl,fl;class s3{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,dl,E(()=>({open:this.root.opts.open.current})));V(this,fl,E(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps})));this.opts=t,this.root=n,ue({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i,this.root.contentId=i==null?void 0:i.id}})}get snippetProps(){return d(y(this,dl))}set snippetProps(t){O(y(this,dl),t)}get props(){return d(y(this,fl))}set props(t){O(y(this,fl),t)}}dl=new WeakMap,fl=new WeakMap;var hl,gl;class a3{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,hl,E(()=>({open:this.root.opts.open.current})));V(this,gl,E(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=t,this.root=n,ue({...t,deps:()=>this.root.opts.open.current})}get snippetProps(){return d(y(this,hl))}set snippetProps(t){O(y(this,hl),t)}get props(){return d(y(this,gl))}set props(t){O(y(this,gl),t)}}hl=new WeakMap,gl=new WeakMap;const Us=new Fn("Dialog.Root");function l3(e){return Us.set(new n3(e))}function c3(e){return new i3(e,Us.get())}function u3(e){return new s3(e,Us.get())}function d3(e){return new a3(e,Us.get())}function f3(e){return new o3(e,Us.get())}function h3(e){return new r3(e,Us.get())}var g3=Z("<div><!></div>");function p3(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"level",3,2),l=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=c3({id:H.with(()=>n()),level:H.with(()=>s()),ref:H.with(()=>i(),v=>i(v))}),c=E(()=>ee(l,a.props));var f=K(),h=N(f);{var g=v=>{var b=K(),w=N(b);ut(w,()=>t.child,()=>({props:d(c)})),_(v,b)},p=v=>{var b=g3();Yt(b,()=>({...d(c)}));var w=G(b);ut(w,()=>t.children??Ct),W(b),_(v,b)};dt(h,v=>{t.child?v(g):v(p,!1)})}_(e,f),at()}function v3(e,t){var n=K(),i=N(n);Ri(i,()=>t.children,s=>{var l=K(),a=N(l);ut(a,()=>t.children??Ct),_(s,l)}),_(e,n)}function yh(e,t){st(t,!0);let n=P(t,"to",3,"body");const i=kT();let s=E(l);function l(){if(!bh||t.disabled)return null;let p=null;return typeof n()=="string"?p=document.querySelector(n()):(n()instanceof HTMLElement||n()instanceof DocumentFragment)&&(p=n()),p}let a;function c(){a&&(NT(a),a=null)}Se([()=>d(s),()=>t.disabled],([p,v])=>{if(!p||v){c();return}return a=RT(v3,{target:p,props:{children:t.children},context:i}),()=>{c()}});var f=K(),h=N(f);{var g=p=>{var v=K(),b=N(v);ut(b,()=>t.children??Ct),_(p,v)};dt(h,p=>{t.disabled&&p(g)})}_(e,f),at()}function Zy(e,t,n,i){const s=Array.isArray(t)?t:[t];return s.forEach(l=>e.addEventListener(l,n,i)),()=>{s.forEach(l=>e.removeEventListener(l,n,i))}}class Qy{constructor(t,n={bubbles:!0,cancelable:!0}){ot(this,"eventName");ot(this,"options");this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const i=this.createEvent(n);return t.dispatchEvent(i),i}listen(t,n,i){const s=l=>{n(l)};return nn(t,this.eventName,s,i)}}function Q_(e,t=500){let n=null;const i=(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)};return i.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},i}function wv(e,t){return e===t||e.contains(t)}function Jy(e){return(e==null?void 0:e.ownerDocument)??document}function m3(e){if(!e)return null;for(const t of e.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function b3(e,t){const{clientX:n,clientY:i}=e,s=t.getBoundingClientRect();return n<s.left||n>s.right||i<s.top||i>s.bottom}globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);var bs,No,co,_s,ys,uo,pl,vl,Ii,Vf,zs,$y,Hf,ws,Wf,Uf,Gf,Kf,ml,tw,qf,Yf;class _3{constructor(t){V(this,zs);ot(this,"opts");V(this,bs);V(this,No);V(this,co,{pointerdown:!1});V(this,_s,!1);V(this,ys,!1);ot(this,"node",H(null));V(this,uo);V(this,pl);V(this,vl,ft(null));V(this,Ii,Ce);V(this,Vf,t=>{t.defaultPrevented||this.currNode&&br(()=>{var n,i;!this.currNode||y(this,Kf).call(this,t.target)||t.target&&!y(this,ys)&&((i=(n=y(this,pl)).current)==null||i.call(n,t))})});V(this,Hf,t=>{let n=t;n.defaultPrevented&&(n=J_(t)),y(this,bs).current(t)});V(this,ws,Q_(t=>{if(!this.currNode){y(this,Ii).call(this);return}const n=this.opts.isValidEvent.current(t,this.currNode)||S3(t,this.currNode);if(!y(this,_s)||Et(this,zs,tw).call(this)||!n){y(this,Ii).call(this);return}let i=t;if(i.defaultPrevented&&(i=J_(i)),y(this,No).current!=="close"&&y(this,No).current!=="defer-otherwise-close"){y(this,Ii).call(this);return}t.pointerType==="touch"?(y(this,Ii).call(this),He(this,Ii,Zy(y(this,uo),"click",y(this,Hf),{once:!0}))):y(this,bs).current(i)},10));V(this,Wf,t=>{y(this,co)[t.type]=!0});V(this,Uf,t=>{y(this,co)[t.type]=!1});V(this,Gf,()=>{this.node.current&&He(this,_s,x3(this.node.current))});V(this,Kf,t=>this.node.current?wv(this.node.current,t):!1);V(this,ml,Q_(()=>{for(const t in y(this,co))y(this,co)[t]=!1;He(this,_s,!1)},20));V(this,qf,()=>{He(this,ys,!0)});V(this,Yf,()=>{He(this,ys,!1)});ot(this,"props",{onfocuscapture:y(this,qf),onblurcapture:y(this,Yf)});this.opts=t,ue({id:t.id,ref:this.node,deps:()=>t.enabled.current,onRefChange:s=>{this.currNode=s}}),He(this,No,t.interactOutsideBehavior),He(this,bs,t.onInteractOutside),He(this,pl,t.onFocusOutside),se(()=>{He(this,uo,Jy(this.currNode))});let n=Ce;const i=()=>{y(this,ml).call(this),globalThis.bitsDismissableLayers.delete(this),y(this,ws).destroy(),n()};Se([()=>this.opts.enabled.current,()=>this.currNode],([s,l])=>{if(!(!s||!l))return ju(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,y(this,No)),n(),n=Et(this,zs,$y).call(this))}),i}),mv(()=>{y(this,ml).destroy(),globalThis.bitsDismissableLayers.delete(this),y(this,ws).destroy(),y(this,Ii).call(this),n()})}get currNode(){return d(y(this,vl))}set currNode(t){O(y(this,vl),t,!0)}}bs=new WeakMap,No=new WeakMap,co=new WeakMap,_s=new WeakMap,ys=new WeakMap,uo=new WeakMap,pl=new WeakMap,vl=new WeakMap,Ii=new WeakMap,Vf=new WeakMap,zs=new WeakSet,$y=function(){return Ni(nn(y(this,uo),"pointerdown",Ni(y(this,Wf),y(this,Gf)),{capture:!0}),nn(y(this,uo),"pointerdown",Ni(y(this,Uf),y(this,ws))),nn(y(this,uo),"focusin",y(this,Vf)))},Hf=new WeakMap,ws=new WeakMap,Wf=new WeakMap,Uf=new WeakMap,Gf=new WeakMap,Kf=new WeakMap,ml=new WeakMap,tw=function(){return Object.values(y(this,co)).some(Boolean)},qf=new WeakMap,Yf=new WeakMap;function y3(e){return new _3(e)}function w3(e){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function x3(e){const t=[...globalThis.bitsDismissableLayers],n=w3(t);if(n)return n[0].node.current===e;const[i]=t[0];return i.node.current===e}function S3(e,t){if("button"in e&&e.button>0)return!1;const n=e.target;return Xy(n)?Jy(n).documentElement.contains(n)&&!wv(t,n)&&b3(e,t):!1}function J_(e){const t=e.currentTarget,n=e.target;let i;e instanceof PointerEvent?i=new PointerEvent(e.type,e):i=new PointerEvent("pointerdown",e);let s=!1;return new Proxy(i,{get:(a,c)=>c==="currentTarget"?t:c==="target"?n:c==="preventDefault"?()=>{s=!0,typeof a.preventDefault=="function"&&a.preventDefault()}:c==="defaultPrevented"?s:c in a?a[c]:e[c]})}function ew(e,t){st(t,!0);let n=P(t,"interactOutsideBehavior",3,"close"),i=P(t,"onInteractOutside",3,Ce),s=P(t,"onFocusOutside",3,Ce),l=P(t,"isValidEvent",3,()=>!1);const a=y3({id:H.with(()=>t.id),interactOutsideBehavior:H.with(()=>n()),onInteractOutside:H.with(()=>i()),enabled:H.with(()=>t.enabled),onFocusOutside:H.with(()=>s()),isValidEvent:H.with(()=>l())});var c=K(),f=N(c);ut(f,()=>t.children??Ct,()=>({props:a.props})),_(e,c),at()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var Xf,jf;class C3{constructor(t){ot(this,"opts");V(this,Xf,()=>nn(document,"keydown",y(this,jf),{passive:!1}));V(this,jf,t=>{if(t.key!==zI||!P3(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const i=this.opts.escapeKeydownBehavior.current;i!=="close"&&i!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)});this.opts=t;let n=Ce;Se(()=>t.enabled.current,i=>(i&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=y(this,Xf).call(this)),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}}Xf=new WeakMap,jf=new WeakMap;function A3(e){return new C3(e)}function P3(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([s,{current:l}])=>l==="close"||l==="ignore");if(n)return n[0]===e;const[i]=t[0];return i===e}function nw(e,t){st(t,!0);let n=P(t,"escapeKeydownBehavior",3,"close"),i=P(t,"onEscapeKeydown",3,Ce);A3({escapeKeydownBehavior:H.with(()=>n()),onEscapeKeydown:H.with(()=>i()),enabled:H.with(()=>t.enabled)});var s=K(),l=N(s);ut(l,()=>t.children??Ct),_(e,s),at()}const Ji=H([]);function k3(){return{add(e){const t=Ji.current[0];t&&e.id!==t.id&&t.pause(),Ji.current=$_(Ji.current,e),Ji.current.unshift(e)},remove(e){var t;Ji.current=$_(Ji.current,e),(t=Ji.current[0])==null||t.resume()},get current(){return Ji.current}}}function T3(){let e=ft(!1),t=ft(!1);return{id:de(),get paused(){return d(e)},get isHandlingFocus(){return d(t)},set isHandlingFocus(n){O(t,n,!0)},pause(){O(e,!0)},resume(){O(e,!1)}}}function $_(e,t){return[...e].filter(n=>n.id!==t.id)}function E3(e){return e.filter(t=>t.tagName!=="A")}function ro(e,{select:t=!1}={}){if(!(e&&e.focus)||document.activeElement===e)return;const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ZI(e)&&t&&e.select()}function I3(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(ro(i,{select:t}),document.activeElement!==n)return!0}function t0(e,t){for(const n of e)if(!QI(n,t))return n}function rw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function O3(e){const t=rw(e),n=t0(t,e),i=t0(t.reverse(),e);return[n,i]}/*!
463
+ * tabbable 6.2.0
464
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
465
+ */var R3=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],N3=R3.join(","),iw=typeof Element>"u",wf=iw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xf=!iw&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},M3=function e(t,n){var i;n===void 0&&(n=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),l=s===""||s==="true",a=l||n&&t&&e(t.parentNode);return a},D3=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},L3=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},F3=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||D3(t))&&!L3(t)?0:t.tabIndex},ow=function(t){return t.tagName==="INPUT"},B3=function(t){return ow(t)&&t.type==="hidden"},z3=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},V3=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},H3=function(t){if(!t.name)return!0;var n=t.form||xf(t),i=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var l=V3(s,t.form);return!l||l===t},W3=function(t){return ow(t)&&t.type==="radio"},U3=function(t){return W3(t)&&!H3(t)},G3=function(t){var n,i=t&&xf(t),s=(n=i)===null||n===void 0?void 0:n.host,l=!1;if(i&&i!==t){var a,c,f;for(l=!!((a=s)!==null&&a!==void 0&&(c=a.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!l&&s;){var h,g,p;i=xf(s),s=(h=i)===null||h===void 0?void 0:h.host,l=!!((g=s)!==null&&g!==void 0&&(p=g.ownerDocument)!==null&&p!==void 0&&p.contains(s))}}return l},e0=function(t){var n=t.getBoundingClientRect(),i=n.width,s=n.height;return i===0&&s===0},K3=function(t,n){var i=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var l=wf.call(t,"details>summary:first-of-type"),a=l?t.parentElement:t;if(wf.call(a,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof s=="function"){for(var c=t;t;){var f=t.parentElement,h=xf(t);if(f&&!f.shadowRoot&&s(f)===!0)return e0(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(G3(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return e0(t);return!1},q3=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var s=n.children.item(i);if(s.tagName==="LEGEND")return wf.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Y3=function(t,n){return!(n.disabled||M3(n)||B3(n)||K3(n,t)||z3(n)||q3(n))},X3=function(t,n){return!(U3(n)||F3(n)<0||!Y3(t,n))},j3=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wf.call(t,N3)===!1?!1:X3(n,t)};const Z3=new Qy("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),Q3=new Qy("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),J3=new Fn("FocusScope");function $3({id:e,loop:t,enabled:n,onOpenAutoFocus:i,onCloseAutoFocus:s,forceMount:l}){const a=k3(),c=T3(),f=H(null),h=J3.getOr({ignoreCloseAutoFocus:!1});let g=null;ue({id:e,ref:f,deps:()=>n.current});function p(A){if(!(c.paused||!f.current||c.isHandlingFocus)){c.isHandlingFocus=!0;try{const T=A.target;if(!Np(T))return;const D=f.current.contains(T);if(A.type==="focusin")if(D)g=T;else{if(h.ignoreCloseAutoFocus)return;ro(g,{select:!0})}else A.type==="focusout"&&!D&&!h.ignoreCloseAutoFocus&&ro(g,{select:!0})}finally{c.isHandlingFocus=!1}}}function v(A){if(!g||!f.current)return;let T=!1;for(const D of A){if(D.type==="childList"&&D.removedNodes.length>0)for(const R of D.removedNodes){if(R===g){T=!0;break}if(R.nodeType===Node.ELEMENT_NODE&&R.contains(g)){T=!0;break}}if(T)break}T&&f.current&&!f.current.contains(document.activeElement)&&ro(f.current)}Se([()=>f.current,()=>n.current],([A,T])=>{if(!A||!T)return;const D=Ni(nn(document,"focusin",p),nn(document,"focusout",p)),R=new MutationObserver(v);return R.observe(A,{childList:!0,subtree:!0,attributes:!1}),()=>{D(),R.disconnect()}}),Se([()=>l.current,()=>f.current],([A,T])=>{if(A)return;const D=document.activeElement;return b(T,D),()=>{T&&w(D)}}),Se([()=>l.current,()=>f.current,()=>n.current],([A,T])=>{if(!A)return;const D=document.activeElement;return b(T,D),()=>{T&&w(D)}});function b(A,T){if(A||(A=document.getElementById(e.current)),!A||!n.current)return;if(a.add(c),!A.contains(T)){const R=Z3.createEvent();i.current(R),R.defaultPrevented||br(()=>{if(!A)return;I3(E3(rw(A)),{select:!0})||ro(A)})}}function w(A){var R;const T=Q3.createEvent();(R=s.current)==null||R.call(s,T);const D=h.ignoreCloseAutoFocus;ju(0,()=>{!T.defaultPrevented&&A&&!D&&ro(j3(A)?A:document.body,{select:!0}),a.remove(c)})}function S(A){if(!n.current||!t.current&&!n.current||c.paused)return;const T=A.key===Op&&!A.ctrlKey&&!A.altKey&&!A.metaKey,D=document.activeElement;if(!(T&&D))return;const R=f.current;if(!R)return;const[L,F]=O3(R);L&&F?!A.shiftKey&&D===F?(A.preventDefault(),t.current&&ro(L,{select:!0})):A.shiftKey&&D===L&&(A.preventDefault(),t.current&&ro(F,{select:!0})):D===R&&A.preventDefault()}const x=E(()=>({id:e.current,tabindex:-1,onkeydown:S}));return{get props(){return d(x)}}}function sw(e,t){st(t,!0);let n=P(t,"trapFocus",3,!1),i=P(t,"loop",3,!1),s=P(t,"onCloseAutoFocus",3,Ce),l=P(t,"onOpenAutoFocus",3,Ce),a=P(t,"forceMount",3,!1);const c=$3({enabled:H.with(()=>n()),loop:H.with(()=>i()),onCloseAutoFocus:H.with(()=>s()),onOpenAutoFocus:H.with(()=>l()),id:H.with(()=>t.id),forceMount:H.with(()=>a())});var f=K(),h=N(f);ut(h,()=>t.focusScope??Ct,()=>({props:c.props})),_(e,f),at()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var xs,bl,Zf,aw,Qf,_l;class tO{constructor(t){V(this,Zf);ot(this,"opts");V(this,xs,Ce);V(this,bl,H(null));V(this,Qf,t=>{const n=y(this,bl).current,i=t.target;!Np(n)||!Np(i)||!this.opts.enabled.current||!rO(this)||!wv(n,i)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&He(this,xs,nO(n)))});V(this,_l,()=>{y(this,xs).call(this),He(this,xs,Ce)});this.opts=t,ue({id:t.id,ref:y(this,bl),deps:()=>this.opts.enabled.current});let n=Ce;Se(()=>this.opts.enabled.current,i=>(i&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=Et(this,Zf,aw).call(this)),()=>{n(),y(this,_l).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}xs=new WeakMap,bl=new WeakMap,Zf=new WeakSet,aw=function(){return Ni(nn(document,"pointerdown",y(this,Qf)),nn(document,"pointerup",Dy(y(this,_l),this.opts.onPointerUp.current)))},Qf=new WeakMap,_l=new WeakMap;function eO(e){return new tO(e)}const n0=e=>e.style.userSelect||e.style.webkitUserSelect;function nO(e){const t=document.body,n=n0(t),i=n0(e);return Yd(t,"none"),Yd(e,"text"),()=>{Yd(t,n),Yd(e,i)}}function Yd(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function rO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function lw(e,t){st(t,!0);let n=P(t,"preventOverflowTextSelection",3,!0),i=P(t,"onPointerDown",3,Ce),s=P(t,"onPointerUp",3,Ce);eO({id:H.with(()=>t.id),onPointerDown:H.with(()=>i()),onPointerUp:H.with(()=>s()),enabled:H.with(()=>t.enabled&&n())});var l=K(),a=N(l);ut(a,()=>t.children??Ct),_(e,l),at()}function iO(e){let t=0,n=ft(void 0),i;function s(){t-=1,i&&t<=0&&(i(),O(n,void 0),i=void 0)}return(...l)=>(t+=1,d(n)===void 0&&(i=vy(()=>{O(n,e(...l),!0)})),se(()=>()=>{s()}),d(n))}const oO=iO(()=>{const e=new Na,t=E(()=>{for(const l of e.values())if(l)return!0;return!1});let n=ft(null),i=null;function s(){bh&&(document.body.setAttribute("style",d(n)??""),document.body.style.removeProperty("--scrollbar-width"),Rp&&(i==null||i()))}return se(()=>{const l=d(t);return Hr(()=>{if(!l)return;O(n,document.body.getAttribute("style"),!0);const a=getComputedStyle(document.body),c=window.innerWidth-document.documentElement.clientWidth,h={padding:Number.parseInt(a.paddingRight??"0",10)+c,margin:Number.parseInt(a.marginRight??"0",10)};c>0&&(document.body.style.paddingRight=`${h.padding}px`,document.body.style.marginRight=`${h.margin}px`,document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),Rp&&(i=Zy(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),br(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),se(()=>()=>{i==null||i()}),{get map(){return e},resetBodyStyle:s}});function sO(e,t=()=>null){const n=de(),i=oO();if(!i)return;const s=E(t);i.map.set(n,e??!1);const l=H.with(()=>i.map.get(n)??!1,a=>i.map.set(n,a));return se(()=>()=>{i.map.delete(n),!aO(i.map)&&(d(s)===null?requestAnimationFrame(()=>i.resetBodyStyle()):ju(d(s),()=>i.resetBodyStyle()))}),l}function aO(e){for(const[t,n]of e)if(n)return!0;return!1}function Sf(e,t){st(t,!0);let n=P(t,"preventScroll",3,!0),i=P(t,"restoreScrollDelay",3,null);sO(n(),()=>i()),at()}function lO({forceMount:e,present:t,trapFocus:n,open:i}){return e?i&&n:t&&n&&i}var cO=Z("<div><!></div>");function uO(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"forceMount",3,!1),s=P(t,"ref",15,null),l=xt(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=d3({id:H.with(()=>n()),ref:H.with(()=>s(),f=>s(f))}),c=E(()=>ee(l,a.props));{const f=g=>{var p=K(),v=N(p);{var b=S=>{var x=K(),A=N(x);{let T=E(()=>({props:ee(d(c)),...a.snippetProps}));ut(A,()=>t.child,()=>d(T))}_(S,x)},w=S=>{var x=cO();Yt(x,T=>({...T}),[()=>ee(d(c))]);var A=G(x);ut(A,()=>t.children??Ct,()=>a.snippetProps),W(x),_(S,x)};dt(v,S=>{t.child?S(b):S(w,!1)})}_(g,p)};let h=E(()=>a.root.opts.open.current||i());_h(e,{get id(){return n()},get present(){return d(h)},presence:f,$$slots:{presence:!0}})}at()}var dO=Z("<div><!></div>");function fO(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const l=f3({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=dO();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}function hO(e,t){return e>=0&&e<t.length}function gO(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function pO(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function vO(e,t,n,i=!0){if(e.length===0||t<0||t>=e.length)return;let s=t+n;return i?s=(s%e.length+e.length)%e.length:s=Math.max(0,Math.min(s,e.length-1)),e[s]}function mO(e,t,n,i=!0){if(e.length===0||t<0||t>=e.length)return;let s=t-n;return i?s=(s%e.length+e.length)%e.length:s=Math.max(0,Math.min(s,e.length-1)),e[s]}function xv(e,t,n){const i=t.toLowerCase();if(i.endsWith(" ")){const p=i.slice(0,-1);if(e.filter(S=>S.toLowerCase().startsWith(p)).length<=1)return xv(e,p,n);const b=n==null?void 0:n.toLowerCase();if(b&&b.startsWith(p)&&b.charAt(p.length)===" "&&t.trim()===p)return n;const w=e.filter(S=>S.toLowerCase().startsWith(i));if(w.length>0){const S=n?e.indexOf(n):-1;return r0(w,Math.max(S,0)).find(T=>T!==n)||n}}const l=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,a=l.toLowerCase(),c=n?e.indexOf(n):-1;let f=r0(e,Math.max(c,0));l.length===1&&(f=f.filter(p=>p!==n));const g=f.find(p=>p==null?void 0:p.toLowerCase().startsWith(a));return g!==n?g:void 0}function r0(e,t){return e.map((n,i)=>e[(t+i)%e.length])}const bO="data-checkbox-root";var yl,wl,xl,Sl,Mp,Cl,Al;class _O{constructor(t,n=null){V(this,Sl);ot(this,"opts");ot(this,"group");V(this,yl,E(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current));V(this,wl,E(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current));V(this,xl,E(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current));V(this,Cl,E(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current})));V(this,Al,E(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":Ky(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":Uy(this.trueRequired),"data-disabled":lr(this.trueDisabled),"data-state":wO(this.opts.checked.current,this.opts.indeterminate.current),[bO]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,this.group=n,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),ue(t),Se.pre([()=>{var i;return Ay((i=this.group)==null?void 0:i.opts.value.current)},()=>this.opts.value.current],([i,s])=>{!i||!s||(this.opts.checked.current=i.includes(s))}),Se.pre(()=>this.opts.checked.current,i=>{var s,l;this.group&&(i?(s=this.group)==null||s.addValue(this.opts.value.current):(l=this.group)==null||l.removeValue(this.opts.value.current))})}get trueName(){return d(y(this,yl))}set trueName(t){O(y(this,yl),t)}get trueRequired(){return d(y(this,wl))}set trueRequired(t){O(y(this,wl),t)}get trueDisabled(){return d(y(this,xl))}set trueDisabled(t){O(y(this,xl),t)}onkeydown(t){this.opts.disabled.current||(t.key===Li&&t.preventDefault(),t.key===Mi&&(t.preventDefault(),Et(this,Sl,Mp).call(this)))}onclick(t){this.opts.disabled.current||Et(this,Sl,Mp).call(this)}get snippetProps(){return d(y(this,Cl))}set snippetProps(t){O(y(this,Cl),t)}get props(){return d(y(this,Al))}set props(t){O(y(this,Al),t)}}yl=new WeakMap,wl=new WeakMap,xl=new WeakMap,Sl=new WeakSet,Mp=function(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current},Cl=new WeakMap,Al=new WeakMap;var Pl,kl,Tl;class yO{constructor(t){ot(this,"root");V(this,Pl,E(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current));V(this,kl,E(()=>!!this.root.trueName));V(this,Tl,E(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current})));this.root=t}get trueChecked(){return d(y(this,Pl))}set trueChecked(t){O(y(this,Pl),t)}get shouldRender(){return d(y(this,kl))}set shouldRender(t){O(y(this,kl),t)}get props(){return d(y(this,Tl))}set props(t){O(y(this,Tl),t)}}Pl=new WeakMap,kl=new WeakMap,Tl=new WeakMap;function wO(e,t){return t?"indeterminate":e?"checked":"unchecked"}const xO=new Fn("Checkbox.Group"),cw=new Fn("Checkbox.Root");function SO(e,t){return cw.set(new _O(e,t))}function CO(){return new yO(cw.get())}var AO=Z("<input/>"),PO=Z("<input/>");function Sv(e,t){st(t,!0);let n=P(t,"value",15),i=xt(t,["$$slots","$$events","$$legacy","value"]);const s=E(()=>ee(i,{"aria-hidden":"true",tabindex:-1,style:CI}));var l=K(),a=N(l);{var c=h=>{var g=AO();Yt(g,()=>({...d(s),value:n()}),void 0,void 0,void 0,!0),_(h,g)},f=h=>{var g=PO();Yt(g,()=>({...d(s)}),void 0,void 0,void 0,!0),Ra(g,n),_(h,g)};dt(a,h=>{d(s).type==="checkbox"?h(c):h(f,!1)})}_(e,l),at()}function kO(e,t){st(t,!1);const n=CO();by();var i=K(),s=N(i);{var l=a=>{Sv(a,Ft(()=>n.props))};dt(s,a=>{n.shouldRender&&a(l)})}_(e,i),at()}var TO=Z("<button><!></button>"),EO=Z("<!> <!>",1);function IO(e,t){st(t,!0);let n=P(t,"checked",15,!1),i=P(t,"ref",15,null),s=P(t,"disabled",3,!1),l=P(t,"required",3,!1),a=P(t,"name",3,void 0),c=P(t,"value",3,"on"),f=P(t,"id",19,de),h=P(t,"indeterminate",15,!1),g=P(t,"type",3,"button"),p=xt(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type"]);const v=xO.getOr(null);v&&c()&&(v.opts.value.current.includes(c())?n(!0):n(!1)),Se.pre(()=>c(),()=>{v&&c()&&(v.opts.value.current.includes(c())?n(!0):n(!1))});const b=SO({checked:H.with(()=>n(),M=>{var U;n(M),(U=t.onCheckedChange)==null||U.call(t,M)}),disabled:H.with(()=>s()??!1),required:H.with(()=>l()),name:H.with(()=>a()),value:H.with(()=>c()),id:H.with(()=>f()),ref:H.with(()=>i(),M=>i(M)),indeterminate:H.with(()=>h(),M=>{var U;h(M),(U=t.onIndeterminateChange)==null||U.call(t,M)}),type:H.with(()=>g())},v),w=E(()=>ee({...p},b.props)),S=Vi(),[x,A]=S;var T=EO(),D=N(T);{var R=M=>{var U=K(),q=N(U);{let tt=E(()=>({props:d(w),...b.snippetProps}));ut(q,()=>t.child,()=>d(tt))}_(M,U)},L=M=>{var U=TO();Yt(U,tt=>({...tt}),[()=>A({...d(w)},[{attribute_name:"formaction"}])]);var q=G(U);ut(q,()=>t.children??Ct,()=>b.snippetProps),W(U),_(M,U)};dt(D,M=>{t.child?M(R):M(L,!1)})}var F=et(D,2);kO(F,{}),_(e,T),at()}const OO="data-collapsible-root",RO="data-collapsible-content",NO="data-collapsible-trigger";var El,Il;class MO{constructor(t){ot(this,"opts");V(this,El,ft(null));V(this,Il,E(()=>({id:this.opts.id.current,"data-state":vo(this.opts.open.current),"data-disabled":lr(this.opts.disabled.current),[OO]:""})));this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),ue(t)}get contentNode(){return d(y(this,El))}set contentNode(t){O(y(this,El),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return d(y(this,Il))}set props(t){O(y(this,Il),t)}}El=new WeakMap,Il=new WeakMap;var Ss,Cs,As,Ps,Ol,Rl,Nl;class DO{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Ss);V(this,Cs,ft(!1));V(this,As,ft(0));V(this,Ps,ft(0));V(this,Ol,E(()=>this.opts.forceMount.current||this.root.opts.open.current));V(this,Rl,E(()=>({open:this.root.opts.open.current})));V(this,Nl,E(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":d(y(this,Ps))?`${d(y(this,Ps))}px`:void 0,"--bits-collapsible-content-width":d(y(this,As))?`${d(y(this,As))}px`:void 0},"data-state":vo(this.root.opts.open.current),"data-disabled":lr(this.root.opts.disabled.current),[RO]:""})));this.opts=t,this.root=n,O(y(this,Cs),n.opts.open.current,!0),ue({...t,deps:()=>this.present,onRefChange:i=>{this.root.contentNode=i}}),hh(()=>{const i=requestAnimationFrame(()=>{O(y(this,Cs),!1)});return()=>{cancelAnimationFrame(i)}}),Se([()=>this.opts.ref.current,()=>this.present],([i])=>{i&&br(()=>{if(!this.opts.ref.current)return;He(this,Ss,y(this,Ss)||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName}),i.style.transitionDuration="0s",i.style.animationName="none";const s=i.getBoundingClientRect();if(O(y(this,Ps),s.height,!0),O(y(this,As),s.width,!0),!d(y(this,Cs))){const{animationName:l,transitionDuration:a}=y(this,Ss);i.style.transitionDuration=a,i.style.animationName=l}})})}get present(){return d(y(this,Ol))}set present(t){O(y(this,Ol),t)}get snippetProps(){return d(y(this,Rl))}set snippetProps(t){O(y(this,Rl),t)}get props(){return d(y(this,Nl))}set props(t){O(y(this,Nl),t)}}Ss=new WeakMap,Cs=new WeakMap,As=new WeakMap,Ps=new WeakMap,Ol=new WeakMap,Rl=new WeakMap,Nl=new WeakMap;var Mo,Ml;class LO{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Mo,E(()=>this.opts.disabled.current||this.root.opts.disabled.current));V(this,Ml,E(()=>{var t;return{id:this.opts.id.current,type:"button",disabled:d(y(this,Mo)),"aria-controls":(t=this.root.contentNode)==null?void 0:t.id,"aria-expanded":mh(this.root.opts.open.current),"data-state":vo(this.root.opts.open.current),"data-disabled":lr(d(y(this,Mo))),[NO]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),ue(t)}onclick(t){if(!d(y(this,Mo))){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){d(y(this,Mo))||(t.key===Mi||t.key===Li)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return d(y(this,Ml))}set props(t){O(y(this,Ml),t)}}Mo=new WeakMap,Ml=new WeakMap;const Cv=new Fn("Collapsible.Root");function FO(e){return Cv.set(new MO(e))}function BO(e){return new LO(e,Cv.get())}function zO(e){return new DO(e,Cv.get())}var VO=Z("<div><!></div>");function HO(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"open",15,!1),l=P(t,"disabled",3,!1),a=P(t,"onOpenChange",3,Ce),c=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange"]);const f=FO({open:H.with(()=>s(),w=>{s(w),a()(w)}),disabled:H.with(()=>l()),id:H.with(()=>n()),ref:H.with(()=>i(),w=>i(w))}),h=E(()=>ee(c,f.props));var g=K(),p=N(g);{var v=w=>{var S=K(),x=N(S);ut(x,()=>t.child,()=>({props:d(h)})),_(w,S)},b=w=>{var S=VO();Yt(S,()=>({...d(h)}));var x=G(S);ut(x,()=>t.children??Ct),W(S),_(w,S)};dt(p,w=>{t.child?w(v):w(b,!1)})}_(e,g),at()}var WO=Z("<div><!></div>");function UO(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"forceMount",3,!1),s=P(t,"id",19,de),l=xt(t,["$$slots","$$events","$$legacy","child","ref","forceMount","children","id"]);const a=zO({id:H.with(()=>s()),forceMount:H.with(()=>i()),ref:H.with(()=>n(),c=>n(c))});_h(e,{forceMount:!0,get present(){return a.present},get id(){return s()},presence:(f,h)=>{let g=()=>h==null?void 0:h().present;const p=E(()=>ee(l,a.props,{hidden:i()?void 0:!g().current}));var v=K(),b=N(v);{var w=x=>{var A=K(),T=N(A);{let D=E(()=>({...a.snippetProps,props:d(p)}));ut(T,()=>t.child,()=>d(D))}_(x,A)},S=x=>{var A=WO();Yt(A,()=>({...d(p)}));var T=G(A);ut(T,()=>t.children??Ct),W(A),_(x,A)};dt(b,x=>{t.child?x(w):x(S,!1)})}_(f,v)},$$slots:{presence:!0}}),at()}var GO=Z("<button><!></button>");function KO(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"id",19,de),s=P(t,"disabled",3,!1),l=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const a=BO({id:H.with(()=>i()),ref:H.with(()=>n(),S=>n(S)),disabled:H.with(()=>s())}),c=E(()=>ee(l,a.props)),f=Vi(),[h,g]=f;var p=K(),v=N(p);{var b=S=>{var x=K(),A=N(x);ut(A,()=>t.child,()=>({props:d(c)})),_(S,x)},w=S=>{var x=GO();Yt(x,T=>({...T}),[()=>g({...d(c)},[{attribute_name:"formaction"}])]);var A=G(x);ut(A,()=>t.children??Ct),W(x),_(S,x)};dt(v,S=>{t.child?S(b):S(w,!1)})}_(e,p),at()}const qO=["top","right","bottom","left"],ho=Math.min,_r=Math.max,Cf=Math.round,Xd=Math.floor,ei=e=>({x:e,y:e}),YO={left:"right",right:"left",bottom:"top",top:"bottom"},XO={start:"end",end:"start"};function Dp(e,t,n){return _r(e,ho(t,n))}function Fi(e,t){return typeof e=="function"?e(t):e}function Bi(e){return e.split("-")[0]}function Gs(e){return e.split("-")[1]}function Av(e){return e==="x"?"y":"x"}function Pv(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Bi(e))?"y":"x"}function kv(e){return Av(go(e))}function jO(e,t,n){n===void 0&&(n=!1);const i=Gs(e),s=kv(e),l=Pv(s);let a=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(a=Af(a)),[a,Af(a)]}function ZO(e){const t=Af(e);return[Lp(e),t,Lp(t)]}function Lp(e){return e.replace(/start|end/g,t=>XO[t])}function QO(e,t,n){const i=["left","right"],s=["right","left"],l=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?l:a;default:return[]}}function JO(e,t,n,i){const s=Gs(e);let l=QO(Bi(e),n==="start",i);return s&&(l=l.map(a=>a+"-"+s),t&&(l=l.concat(l.map(Lp)))),l}function Af(e){return e.replace(/left|right|bottom|top/g,t=>YO[t])}function $O(e){return{top:0,right:0,bottom:0,left:0,...e}}function uw(e){return typeof e!="number"?$O(e):{top:e,right:e,bottom:e,left:e}}function Pf(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function i0(e,t,n){let{reference:i,floating:s}=e;const l=go(t),a=kv(t),c=Pv(a),f=Bi(t),h=l==="y",g=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,v=i[c]/2-s[c]/2;let b;switch(f){case"top":b={x:g,y:i.y-s.height};break;case"bottom":b={x:g,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:p};break;case"left":b={x:i.x-s.width,y:p};break;default:b={x:i.x,y:i.y}}switch(Gs(t)){case"start":b[a]-=v*(n&&h?-1:1);break;case"end":b[a]+=v*(n&&h?-1:1);break}return b}const tR=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:a}=n,c=l.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(t));let h=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=i0(h,i,f),v=i,b={},w=0;for(let S=0;S<c.length;S++){const{name:x,fn:A}=c[S],{x:T,y:D,data:R,reset:L}=await A({x:g,y:p,initialPlacement:i,placement:v,strategy:s,middlewareData:b,rects:h,platform:a,elements:{reference:e,floating:t}});g=T??g,p=D??p,b={...b,[x]:{...b[x],...R}},L&&w<=50&&(w++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(h=L.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:g,y:p}=i0(h,v,f)),S=-1)}return{x:g,y:p,placement:v,strategy:s,middlewareData:b}};async function Da(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:a,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:b=0}=Fi(t,e),w=uw(b),x=c[v?p==="floating"?"reference":"floating":p],A=Pf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(x)))==null||n?x:x.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:h,rootBoundary:g,strategy:f})),T=p==="floating"?{x:i,y:s,width:a.floating.width,height:a.floating.height}:a.reference,D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),R=await(l.isElement==null?void 0:l.isElement(D))?await(l.getScale==null?void 0:l.getScale(D))||{x:1,y:1}:{x:1,y:1},L=Pf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:D,strategy:f}):T);return{top:(A.top-L.top+w.top)/R.y,bottom:(L.bottom-A.bottom+w.bottom)/R.y,left:(A.left-L.left+w.left)/R.x,right:(L.right-A.right+w.right)/R.x}}const eR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:l,platform:a,elements:c,middlewareData:f}=t,{element:h,padding:g=0}=Fi(e,t)||{};if(h==null)return{};const p=uw(g),v={x:n,y:i},b=kv(s),w=Pv(b),S=await a.getDimensions(h),x=b==="y",A=x?"top":"left",T=x?"bottom":"right",D=x?"clientHeight":"clientWidth",R=l.reference[w]+l.reference[b]-v[b]-l.floating[w],L=v[b]-l.reference[b],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let M=F?F[D]:0;(!M||!await(a.isElement==null?void 0:a.isElement(F)))&&(M=c.floating[D]||l.floating[w]);const U=R/2-L/2,q=M/2-S[w]/2-1,tt=ho(p[A],q),nt=ho(p[T],q),z=tt,it=M-S[w]-nt,X=M/2-S[w]/2+U,j=Dp(z,X,it),J=!f.arrow&&Gs(s)!=null&&X!==j&&l.reference[w]/2-(X<z?tt:nt)-S[w]/2<0,rt=J?X<z?X-z:X-it:0;return{[b]:v[b]+rt,data:{[b]:j,centerOffset:X-j-rt,...J&&{alignmentOffset:rt}},reset:J}}}),nR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:l,rects:a,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...x}=Fi(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const A=Bi(s),T=go(c),D=Bi(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(h.floating)),L=v||(D||!S?[Af(c)]:ZO(c)),F=w!=="none";!v&&F&&L.push(...JO(c,S,w,R));const M=[c,...L],U=await Da(t,x),q=[];let tt=((i=l.flip)==null?void 0:i.overflows)||[];if(g&&q.push(U[A]),p){const X=jO(s,a,R);q.push(U[X[0]],U[X[1]])}if(tt=[...tt,{placement:s,overflows:q}],!q.every(X=>X<=0)){var nt,z;const X=(((nt=l.flip)==null?void 0:nt.index)||0)+1,j=M[X];if(j)return{data:{index:X,overflows:tt},reset:{placement:j}};let J=(z=tt.filter(rt=>rt.overflows[0]<=0).sort((rt,ht)=>rt.overflows[1]-ht.overflows[1])[0])==null?void 0:z.placement;if(!J)switch(b){case"bestFit":{var it;const rt=(it=tt.filter(ht=>{if(F){const pt=go(ht.placement);return pt===T||pt==="y"}return!0}).map(ht=>[ht.placement,ht.overflows.filter(pt=>pt>0).reduce((pt,wt)=>pt+wt,0)]).sort((ht,pt)=>ht[1]-pt[1])[0])==null?void 0:it[0];rt&&(J=rt);break}case"initialPlacement":J=c;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function o0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function s0(e){return qO.some(t=>e[t]>=0)}const rR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=Fi(e,t);switch(i){case"referenceHidden":{const l=await Da(t,{...s,elementContext:"reference"}),a=o0(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:s0(a)}}}case"escaped":{const l=await Da(t,{...s,altBoundary:!0}),a=o0(l,n.floating);return{data:{escapedOffsets:a,escaped:s0(a)}}}default:return{}}}}};async function iR(e,t){const{placement:n,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),a=Bi(n),c=Gs(n),f=go(n)==="y",h=["left","top"].includes(a)?-1:1,g=l&&f?-1:1,p=Fi(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(b=c==="end"?w*-1:w),f?{x:b*g,y:v*h}:{x:v*h,y:b*g}}const oR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:l,placement:a,middlewareData:c}=t,f=await iR(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:s+f.x,y:l+f.y,data:{...f,placement:a}}}}},sR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:c={fn:x=>{let{x:A,y:T}=x;return{x:A,y:T}}},...f}=Fi(e,t),h={x:n,y:i},g=await Da(t,f),p=go(Bi(s)),v=Av(p);let b=h[v],w=h[p];if(l){const x=v==="y"?"top":"left",A=v==="y"?"bottom":"right",T=b+g[x],D=b-g[A];b=Dp(T,b,D)}if(a){const x=p==="y"?"top":"left",A=p==="y"?"bottom":"right",T=w+g[x],D=w-g[A];w=Dp(T,w,D)}const S=c.fn({...t,[v]:b,[p]:w});return{...S,data:{x:S.x-n,y:S.y-i,enabled:{[v]:l,[p]:a}}}}}},aR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:s,rects:l,middlewareData:a}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=Fi(e,t),g={x:n,y:i},p=go(s),v=Av(p);let b=g[v],w=g[p];const S=Fi(c,t),x=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const D=v==="y"?"height":"width",R=l.reference[v]-l.floating[D]+x.mainAxis,L=l.reference[v]+l.reference[D]-x.mainAxis;b<R?b=R:b>L&&(b=L)}if(h){var A,T;const D=v==="y"?"width":"height",R=["top","left"].includes(Bi(s)),L=l.reference[p]-l.floating[D]+(R&&((A=a.offset)==null?void 0:A[p])||0)+(R?0:x.crossAxis),F=l.reference[p]+l.reference[D]+(R?0:((T=a.offset)==null?void 0:T[p])||0)-(R?x.crossAxis:0);w<L?w=L:w>F&&(w=F)}return{[v]:b,[p]:w}}}},lR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:s,rects:l,platform:a,elements:c}=t,{apply:f=()=>{},...h}=Fi(e,t),g=await Da(t,h),p=Bi(s),v=Gs(s),b=go(s)==="y",{width:w,height:S}=l.floating;let x,A;p==="top"||p==="bottom"?(x=p,A=v===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(A=p,x=v==="end"?"top":"bottom");const T=S-g.top-g.bottom,D=w-g.left-g.right,R=ho(S-g[x],T),L=ho(w-g[A],D),F=!t.middlewareData.shift;let M=R,U=L;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=D),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=T),F&&!v){const tt=_r(g.left,0),nt=_r(g.right,0),z=_r(g.top,0),it=_r(g.bottom,0);b?U=w-2*(tt!==0||nt!==0?tt+nt:_r(g.left,g.right)):M=S-2*(z!==0||it!==0?z+it:_r(g.top,g.bottom))}await f({...t,availableWidth:U,availableHeight:M});const q=await a.getDimensions(c.floating);return w!==q.width||S!==q.height?{reset:{rects:!0}}:{}}}};function wh(){return typeof window<"u"}function Ks(e){return dw(e)?(e.nodeName||"").toLowerCase():"#document"}function yr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ai(e){var t;return(t=(dw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dw(e){return wh()?e instanceof Node||e instanceof yr(e).Node:!1}function Wr(e){return wh()?e instanceof Element||e instanceof yr(e).Element:!1}function oi(e){return wh()?e instanceof HTMLElement||e instanceof yr(e).HTMLElement:!1}function a0(e){return!wh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yr(e).ShadowRoot}function Ju(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=Ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function cR(e){return["table","td","th"].includes(Ks(e))}function xh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Tv(e){const t=Ev(),n=Wr(e)?Ur(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function uR(e){let t=po(e);for(;oi(t)&&!Ns(t);){if(Tv(t))return t;if(xh(t))return null;t=po(t)}return null}function Ev(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ns(e){return["html","body","#document"].includes(Ks(e))}function Ur(e){return yr(e).getComputedStyle(e)}function Sh(e){return Wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function po(e){if(Ks(e)==="html")return e;const t=e.assignedSlot||e.parentNode||a0(e)&&e.host||ai(e);return a0(t)?t.host:t}function fw(e){const t=po(e);return Ns(t)?e.ownerDocument?e.ownerDocument.body:e.body:oi(t)&&Ju(t)?t:fw(t)}function La(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=fw(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),a=yr(s);if(l){const c=Fp(a);return t.concat(a,a.visualViewport||[],Ju(s)?s:[],c&&n?La(c):[])}return t.concat(s,La(s,[],n))}function Fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hw(e){const t=Ur(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=oi(e),l=s?e.offsetWidth:n,a=s?e.offsetHeight:i,c=Cf(n)!==l||Cf(i)!==a;return c&&(n=l,i=a),{width:n,height:i,$:c}}function Iv(e){return Wr(e)?e:e.contextElement}function us(e){const t=Iv(e);if(!oi(t))return ei(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:l}=hw(t);let a=(l?Cf(n.width):n.width)/i,c=(l?Cf(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const dR=ei(0);function gw(e){const t=yr(e);return!Ev()||!t.visualViewport?dR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yr(e)?!1:t}function Vo(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=Iv(e);let a=ei(1);t&&(i?Wr(i)&&(a=us(i)):a=us(e));const c=fR(l,n,i)?gw(l):ei(0);let f=(s.left+c.x)/a.x,h=(s.top+c.y)/a.y,g=s.width/a.x,p=s.height/a.y;if(l){const v=yr(l),b=i&&Wr(i)?yr(i):i;let w=v,S=Fp(w);for(;S&&i&&b!==w;){const x=us(S),A=S.getBoundingClientRect(),T=Ur(S),D=A.left+(S.clientLeft+parseFloat(T.paddingLeft))*x.x,R=A.top+(S.clientTop+parseFloat(T.paddingTop))*x.y;f*=x.x,h*=x.y,g*=x.x,p*=x.y,f+=D,h+=R,w=yr(S),S=Fp(w)}}return Pf({width:g,height:p,x:f,y:h})}function Ov(e,t){const n=Sh(e).scrollLeft;return t?t.left+n:Vo(ai(e)).left+n}function pw(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-(n?0:Ov(e,i)),l=i.top+t.scrollTop;return{x:s,y:l}}function hR(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const l=s==="fixed",a=ai(i),c=t?xh(t.floating):!1;if(i===a||c&&l)return n;let f={scrollLeft:0,scrollTop:0},h=ei(1);const g=ei(0),p=oi(i);if((p||!p&&!l)&&((Ks(i)!=="body"||Ju(a))&&(f=Sh(i)),oi(i))){const b=Vo(i);h=us(i),g.x=b.x+i.clientLeft,g.y=b.y+i.clientTop}const v=a&&!p&&!l?pw(a,f,!0):ei(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+g.x+v.x,y:n.y*h.y-f.scrollTop*h.y+g.y+v.y}}function gR(e){return Array.from(e.getClientRects())}function pR(e){const t=ai(e),n=Sh(e),i=e.ownerDocument.body,s=_r(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=_r(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+Ov(e);const c=-n.scrollTop;return Ur(i).direction==="rtl"&&(a+=_r(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:a,y:c}}function vR(e,t){const n=yr(e),i=ai(e),s=n.visualViewport;let l=i.clientWidth,a=i.clientHeight,c=0,f=0;if(s){l=s.width,a=s.height;const h=Ev();(!h||h&&t==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}return{width:l,height:a,x:c,y:f}}function mR(e,t){const n=Vo(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,l=oi(e)?us(e):ei(1),a=e.clientWidth*l.x,c=e.clientHeight*l.y,f=s*l.x,h=i*l.y;return{width:a,height:c,x:f,y:h}}function l0(e,t,n){let i;if(t==="viewport")i=vR(e,n);else if(t==="document")i=pR(ai(e));else if(Wr(t))i=mR(t,n);else{const s=gw(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Pf(i)}function vw(e,t){const n=po(e);return n===t||!Wr(n)||Ns(n)?!1:Ur(n).position==="fixed"||vw(n,t)}function bR(e,t){const n=t.get(e);if(n)return n;let i=La(e,[],!1).filter(c=>Wr(c)&&Ks(c)!=="body"),s=null;const l=Ur(e).position==="fixed";let a=l?po(e):e;for(;Wr(a)&&!Ns(a);){const c=Ur(a),f=Tv(a);!f&&c.position==="fixed"&&(s=null),(l?!f&&!s:!f&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ju(a)&&!f&&vw(e,a))?i=i.filter(g=>g!==a):s=c,a=po(a)}return t.set(e,i),i}function _R(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const a=[...n==="clippingAncestors"?xh(t)?[]:bR(t,this._c):[].concat(n),i],c=a[0],f=a.reduce((h,g)=>{const p=l0(t,g,s);return h.top=_r(p.top,h.top),h.right=ho(p.right,h.right),h.bottom=ho(p.bottom,h.bottom),h.left=_r(p.left,h.left),h},l0(t,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function yR(e){const{width:t,height:n}=hw(e);return{width:t,height:n}}function wR(e,t,n){const i=oi(t),s=ai(t),l=n==="fixed",a=Vo(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const f=ei(0);if(i||!i&&!l)if((Ks(t)!=="body"||Ju(s))&&(c=Sh(t)),i){const v=Vo(t,!0,l,t);f.x=v.x+t.clientLeft,f.y=v.y+t.clientTop}else s&&(f.x=Ov(s));const h=s&&!i&&!l?pw(s,c):ei(0),g=a.left+c.scrollLeft-f.x-h.x,p=a.top+c.scrollTop-f.y-h.y;return{x:g,y:p,width:a.width,height:a.height}}function $g(e){return Ur(e).position==="static"}function c0(e,t){if(!oi(e)||Ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ai(e)===n&&(n=n.ownerDocument.body),n}function mw(e,t){const n=yr(e);if(xh(e))return n;if(!oi(e)){let s=po(e);for(;s&&!Ns(s);){if(Wr(s)&&!$g(s))return s;s=po(s)}return n}let i=c0(e,t);for(;i&&cR(i)&&$g(i);)i=c0(i,t);return i&&Ns(i)&&$g(i)&&!Tv(i)?n:i||uR(e)||n}const xR=async function(e){const t=this.getOffsetParent||mw,n=this.getDimensions,i=await n(e.floating);return{reference:wR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function SR(e){return Ur(e).direction==="rtl"}const CR={convertOffsetParentRelativeRectToViewportRelativeRect:hR,getDocumentElement:ai,getClippingRect:_R,getOffsetParent:mw,getElementRects:xR,getClientRects:gR,getDimensions:yR,getScale:us,isElement:Wr,isRTL:SR};function bw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AR(e,t){let n=null,i;const s=ai(e);function l(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function a(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:g,top:p,width:v,height:b}=h;if(c||t(),!v||!b)return;const w=Xd(p),S=Xd(s.clientWidth-(g+v)),x=Xd(s.clientHeight-(p+b)),A=Xd(g),D={rootMargin:-w+"px "+-S+"px "+-x+"px "+-A+"px",threshold:_r(0,ho(1,f))||1};let R=!0;function L(F){const M=F[0].intersectionRatio;if(M!==f){if(!R)return a();M?a(!1,M):i=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!bw(h,e.getBoundingClientRect())&&a(),R=!1}try{n=new IntersectionObserver(L,{...D,root:s.ownerDocument})}catch{n=new IntersectionObserver(L,D)}n.observe(e)}return a(!0),l}function PR(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,h=Iv(e),g=s||l?[...h?La(h):[],...La(t)]:[];g.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),l&&A.addEventListener("resize",n)});const p=h&&c?AR(h,n):null;let v=-1,b=null;a&&(b=new ResizeObserver(A=>{let[T]=A;T&&T.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var D;(D=b)==null||D.observe(t)})),n()}),h&&!f&&b.observe(h),b.observe(t));let w,S=f?Vo(e):null;f&&x();function x(){const A=Vo(e);S&&!bw(S,A)&&n(),S=A,w=requestAnimationFrame(x)}return n(),()=>{var A;g.forEach(T=>{s&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),p==null||p(),(A=b)==null||A.disconnect(),b=null,f&&cancelAnimationFrame(w)}}const kR=oR,TR=sR,ER=nR,IR=lR,OR=rR,RR=eR,NR=aR,MR=(e,t,n)=>{const i=new Map,s={platform:CR,...n},l={...s.platform,_c:i};return tR(e,t,{...s,platform:l})};function ha(e){return typeof e=="function"?e():e}function _w(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function u0(e,t){const n=_w(e);return Math.round(t*n)/n}function d0(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function DR(e){const t=e.whileElementsMounted,n=E(()=>ha(e.open)??!0),i=E(()=>ha(e.middleware)),s=E(()=>ha(e.transform)??!0),l=E(()=>ha(e.placement)??"bottom"),a=E(()=>ha(e.strategy)??"absolute"),c=e.reference;let f=ft(0),h=ft(0);const g=H(null);let p=ft(On(d(a))),v=ft(On(d(l))),b=ft(On({})),w=ft(!1);const S=E(()=>{const L={position:d(p),left:"0",top:"0"};if(!g.current)return L;const F=u0(g.current,d(f)),M=u0(g.current,d(h));return d(s)?{...L,transform:`translate(${F}px, ${M}px)`,..._w(g.current)>=1.5&&{willChange:"transform"}}:{position:d(p),left:`${F}px`,top:`${M}px`}});let x;function A(){c.current===null||g.current===null||MR(c.current,g.current,{middleware:d(i),placement:d(l),strategy:d(a)}).then(L=>{O(f,L.x,!0),O(h,L.y,!0),O(p,L.strategy,!0),O(v,L.placement,!0),O(b,L.middlewareData,!0),O(w,!0)})}function T(){typeof x=="function"&&(x(),x=void 0)}function D(){if(T(),t===void 0){A();return}c.current===null||g.current===null||(x=t(c.current,g.current,A))}function R(){d(n)||O(w,!1)}return se(A),se(D),se(R),se(()=>T),{floating:g,reference:c,get strategy(){return d(p)},get placement(){return d(v)},get middlewareData(){return d(b)},get isPositioned(){return d(w)},get floatingStyles(){return d(S)},get update(){return A}}}const LR={top:"bottom",right:"left",bottom:"top",left:"right"};class FR{constructor(){ot(this,"anchorNode",H(null));ot(this,"customAnchorNode",H(null));ot(this,"triggerNode",H(null));se(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}var Dl,Jf,Ll,$f,Fl,th,Bl,zl,Vl,Hl,Wl,Ul,Gl,Kl,ql,Yl,Xl,jl,Zl,Ql,Jl,$l,tc,ec;class BR{constructor(t,n){ot(this,"opts");ot(this,"root");ot(this,"contentRef",H(null));ot(this,"wrapperRef",H(null));ot(this,"arrowRef",H(null));ot(this,"arrowId",H(de()));V(this,Dl,E(()=>{if(typeof this.opts.style=="string")return Sa(this.opts.style);if(!this.opts.style)return{}}));V(this,Jf);V(this,Ll,new RI(()=>this.arrowRef.current??void 0));V(this,$f,E(()=>{var t;return((t=y(this,Ll))==null?void 0:t.width)??0}));V(this,Fl,E(()=>{var t;return((t=y(this,Ll))==null?void 0:t.height)??0}));V(this,th,E(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));V(this,Bl,E(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));V(this,zl,E(()=>d(y(this,Bl)).length>0));V(this,Vl,E(()=>({padding:this.opts.collisionPadding.current,boundary:d(y(this,Bl)).filter(jI),altBoundary:this.hasExplicitBoundaries})));V(this,Hl,ft(void 0));V(this,Wl,ft(void 0));V(this,Ul,ft(void 0));V(this,Gl,ft(void 0));V(this,Kl,E(()=>[kR({mainAxis:this.opts.sideOffset.current+d(y(this,Fl)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&TR({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?NR():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ER({...this.detectOverflowOptions}),IR({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:s,height:l}=t.reference;O(y(this,Hl),n,!0),O(y(this,Wl),i,!0),O(y(this,Ul),s,!0),O(y(this,Gl),l,!0)}}),this.arrowRef.current&&RR({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),GR({arrowWidth:d(y(this,$f)),arrowHeight:d(y(this,Fl))}),this.opts.hideWhenDetached.current&&OR({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));ot(this,"floating");V(this,ql,E(()=>KR(this.floating.placement)));V(this,Yl,E(()=>qR(this.floating.placement)));V(this,Xl,E(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));V(this,jl,E(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));V(this,Zl,E(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));V(this,Ql,ft());V(this,Jl,E(()=>LR[this.placedSide]));V(this,$l,E(()=>{var t,n,i;return{id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${(t=this.floating.middlewareData.transformOrigin)==null?void 0:t.x} ${(n=this.floating.middlewareData.transformOrigin)==null?void 0:n.y}`,"--bits-floating-available-width":`${d(y(this,Hl))}px`,"--bits-floating-available-height":`${d(y(this,Wl))}px`,"--bits-floating-anchor-width":`${d(y(this,Ul))}px`,"--bits-floating-anchor-height":`${d(y(this,Gl))}px`,...((i=this.floating.middlewareData.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...d(y(this,Dl))},dir:this.opts.dir.current}}));V(this,tc,E(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:vv({...d(y(this,Dl))})})));V(this,ec,E(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0})));this.opts=t,this.root=n,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),Se(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),ue({id:this.opts.wrapperId,ref:this.wrapperRef,deps:()=>this.opts.enabled.current}),ue({id:this.opts.id,ref:this.contentRef,deps:()=>this.opts.enabled.current}),this.floating=DR({strategy:()=>this.opts.strategy.current,placement:()=>d(y(this,th)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>{var l;return PR(...i,{animationFrame:((l=y(this,Jf))==null?void 0:l.current)==="always"})},open:()=>this.opts.enabled.current}),se(()=>{var i;this.floating.isPositioned&&((i=this.opts.onPlaced)==null||i.current())}),Se(()=>this.contentRef.current,i=>{i&&(this.contentZIndex=window.getComputedStyle(i).zIndex)}),se(()=>{this.floating.floating.current=this.wrapperRef.current})}get hasExplicitBoundaries(){return d(y(this,zl))}set hasExplicitBoundaries(t){O(y(this,zl),t)}get detectOverflowOptions(){return d(y(this,Vl))}set detectOverflowOptions(t){O(y(this,Vl),t)}get middleware(){return d(y(this,Kl))}set middleware(t){O(y(this,Kl),t)}get placedSide(){return d(y(this,ql))}set placedSide(t){O(y(this,ql),t)}get placedAlign(){return d(y(this,Yl))}set placedAlign(t){O(y(this,Yl),t)}get arrowX(){return d(y(this,Xl))}set arrowX(t){O(y(this,Xl),t)}get arrowY(){return d(y(this,jl))}set arrowY(t){O(y(this,jl),t)}get cannotCenterArrow(){return d(y(this,Zl))}set cannotCenterArrow(t){O(y(this,Zl),t)}get contentZIndex(){return d(y(this,Ql))}set contentZIndex(t){O(y(this,Ql),t,!0)}get arrowBaseSide(){return d(y(this,Jl))}set arrowBaseSide(t){O(y(this,Jl),t)}get wrapperProps(){return d(y(this,$l))}set wrapperProps(t){O(y(this,$l),t)}get props(){return d(y(this,tc))}set props(t){O(y(this,tc),t)}get arrowStyle(){return d(y(this,ec))}set arrowStyle(t){O(y(this,ec),t)}}Dl=new WeakMap,Jf=new WeakMap,Ll=new WeakMap,$f=new WeakMap,Fl=new WeakMap,th=new WeakMap,Bl=new WeakMap,zl=new WeakMap,Vl=new WeakMap,Hl=new WeakMap,Wl=new WeakMap,Ul=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,ql=new WeakMap,Yl=new WeakMap,Xl=new WeakMap,jl=new WeakMap,Zl=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,$l=new WeakMap,tc=new WeakMap,ec=new WeakMap;class zR{constructor(t,n){ot(this,"opts");ot(this,"root");ot(this,"ref",H(null));this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=H.from(t.virtualEl.current):ue({id:t.id,ref:this.ref,onRefChange:i=>{n.triggerNode.current=i}})}}const Rv=new Fn("Floating.Root"),VR=new Fn("Floating.Content");function HR(){return Rv.set(new FR)}function WR(e){return VR.set(new BR(e,Rv.get()))}function UR(e){return new zR(e,Rv.get())}function GR(e){return{name:"transformOrigin",options:e,fn(t){var x,A,T;const{placement:n,rects:i,middlewareData:s}=t,a=((x=s.arrow)==null?void 0:x.centerOffset)!==0,c=a?0:e.arrowWidth,f=a?0:e.arrowHeight,[h,g]=Nv(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(((A=s.arrow)==null?void 0:A.x)??0)+c/2,b=(((T=s.arrow)==null?void 0:T.y)??0)+f/2;let w="",S="";return h==="bottom"?(w=a?p:`${v}px`,S=`${-f}px`):h==="top"?(w=a?p:`${v}px`,S=`${i.floating.height+f}px`):h==="right"?(w=`${-f}px`,S=a?p:`${b}px`):h==="left"&&(w=`${i.floating.width+f}px`,S=a?p:`${b}px`),{data:{x:w,y:S}}}}}function Nv(e){const[t,n="center"]=e.split("-");return[t,n]}function KR(e){return Nv(e)[0]}function qR(e){return Nv(e)[1]}function yw(e,t){st(t,!0),HR();var n=K(),i=N(n);ut(i,()=>t.children??Ct),_(e,n),at()}function ww(e,t=1e4,n=Ce){let i=null,s=ft(On(e));function l(){return window.setTimeout(()=>{O(s,e,!0),n(e)},t)}return se(()=>()=>{i&&clearTimeout(i)}),H.with(()=>d(s),a=>{O(s,a,!0),n(a),i&&clearTimeout(i),i=l()})}function YR(e){const t=ww("",1e3),n=(e==null?void 0:e.onMatch)??(a=>a.focus()),i=(e==null?void 0:e.getCurrentItem)??(()=>document.activeElement);function s(a,c){var b,w;if(!c.length)return;t.current=t.current+a;const f=i(),h=((w=(b=c.find(S=>S===f))==null?void 0:b.textContent)==null?void 0:w.trim())??"",g=c.map(S=>{var x;return((x=S.textContent)==null?void 0:x.trim())??""}),p=xv(g,t.current,h),v=c.find(S=>{var x;return((x=S.textContent)==null?void 0:x.trim())===p});return v&&n(v),v}function l(){t.current=""}return{search:t,handleTypeaheadSearch:s,resetTypeahead:l}}function XR(e){const t=ww("",1e3),n=E(()=>e.candidateValues());function i(l){if(!e.enabled||!d(n).length)return;t.current=t.current+l;const a=e.getCurrentItem(),c=d(n).find(p=>p===a)??"",f=d(n).map(p=>p??""),h=xv(f,t.current,c),g=d(n).find(p=>p===h);return g&&e.onMatch(g),g}function s(){t.current=""}return{search:t,handleTypeaheadSearch:i,resetTypeahead:s}}const jR=[zr,Yy,Ws],ZR=[Ir,qy,Hs],QR=[...jR,...ZR];var nc,rc,ic,oc,sc,ac,lc,cc,uc,dc;class xw{constructor(t){ot(this,"opts");V(this,nc,ft(!1));V(this,rc,ft(""));V(this,ic,ft(null));V(this,oc,ft(null));V(this,sc,ft(null));V(this,ac,ft(""));V(this,lc,ft(null));V(this,cc,E(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));V(this,uc,E(()=>{if(this.highlightedNode)return this.highlightedNode.id}));V(this,dc,E(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));ot(this,"isUsingKeyboard",!1);ot(this,"isCombobox",!1);ot(this,"bitsAttrs");this.opts=t,this.isCombobox=t.isCombobox,this.bitsAttrs=yN(this),hh(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return d(y(this,nc))}set touchedInput(t){O(y(this,nc),t,!0)}get inputValue(){return d(y(this,rc))}set inputValue(t){O(y(this,rc),t,!0)}get inputNode(){return d(y(this,ic))}set inputNode(t){O(y(this,ic),t,!0)}get contentNode(){return d(y(this,oc))}set contentNode(t){O(y(this,oc),t,!0)}get triggerNode(){return d(y(this,sc))}set triggerNode(t){O(y(this,sc),t,!0)}get valueId(){return d(y(this,ac))}set valueId(t){O(y(this,ac),t,!0)}get highlightedNode(){return d(y(this,lc))}set highlightedNode(t){O(y(this,lc),t,!0)}get highlightedValue(){return d(y(this,cc))}set highlightedValue(t){O(y(this,cc),t)}get highlightedId(){return d(y(this,uc))}set highlightedId(t){O(y(this,uc),t)}get highlightedLabel(){return d(y(this,dc))}set highlightedLabel(t){O(y(this,dc),t)}setHighlightedNode(t,n=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||n)&&t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.bitsAttrs.item}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(){this.setHighlightedNode(null);const t=this.getCandidateNodes();t.length&&this.setHighlightedNode(t[0])}getNodeByValue(t){return this.getCandidateNodes().find(i=>i.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}nc=new WeakMap,rc=new WeakMap,ic=new WeakMap,oc=new WeakMap,sc=new WeakMap,ac=new WeakMap,lc=new WeakMap,cc=new WeakMap,uc=new WeakMap,dc=new WeakMap;var fc,hc,gc,pc;class JR extends xw{constructor(n){super(n);ot(this,"opts");ot(this,"isMulti",!1);V(this,fc,E(()=>this.opts.value.current!==""));V(this,hc,E(()=>{var i;return this.opts.items.current.length?((i=this.opts.items.current.find(s=>s.value===this.opts.value.current))==null?void 0:i.label)??"":""}));V(this,gc,E(()=>this.opts.items.current.length?this.opts.items.current.filter(i=>!i.disabled).map(i=>i.label):[]));V(this,pc,E(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=n,se(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Se(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return d(y(this,fc))}set hasValue(n){O(y(this,fc),n)}get currentLabel(){return d(y(this,hc))}set currentLabel(n){O(y(this,hc),n)}get candidateLabels(){return d(y(this,gc))}set candidateLabels(n){O(y(this,gc),n)}get dataTypeaheadEnabled(){return d(y(this,pc))}set dataTypeaheadEnabled(n){O(y(this,pc),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i=n){this.opts.value.current=this.includesItem(n)?"":n,this.inputValue=i}setInitialHighlightedNode(){br(()=>{if(this.highlightedNode&&document.contains(this.highlightedNode))return;if(this.opts.value.current!==""){const i=this.getNodeByValue(this.opts.value.current);if(i){this.setHighlightedNode(i,!0);return}}const n=this.getCandidateNodes()[0];n&&this.setHighlightedNode(n,!0)})}}fc=new WeakMap,hc=new WeakMap,gc=new WeakMap,pc=new WeakMap;var vc;class $R extends xw{constructor(n){super(n);ot(this,"opts");ot(this,"isMulti",!0);V(this,vc,E(()=>this.opts.value.current.length>0));this.opts=n,se(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Se(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return d(y(this,vc))}set hasValue(n){O(y(this,vc),n)}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i=n){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(s=>s!==n):this.opts.value.current=[...this.opts.value.current,n],this.inputValue=i}setInitialHighlightedNode(){br(()=>{if(this.highlightedNode&&document.contains(this.highlightedNode))return;if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const i=this.getNodeByValue(this.opts.value.current[0]);if(i){this.setHighlightedNode(i,!0);return}}const n=this.getCandidateNodes()[0];n&&this.setHighlightedNode(n,!0)})}}vc=new WeakMap;var Do,ks,si,Sw,Bp,zp,mc;class tN{constructor(t,n){V(this,si);ot(this,"opts");ot(this,"root");V(this,Do);V(this,ks);V(this,mc,E(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":mh(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":vo(this.root.opts.open.current),"data-disabled":lr(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.bitsAttrs.trigger]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup})));this.opts=t,this.root=n,ue({...t,onRefChange:i=>{this.root.triggerNode=i}}),He(this,Do,YR({getCurrentItem:()=>this.root.highlightedNode,onMatch:i=>{this.root.setHighlightedNode(i)}})),He(this,ks,XR({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:i=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(l=>l.label===i);s&&(this.root.opts.value.current=s.value)},enabled:!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===Ir||t.key===zr)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===Li||t.key===Mi||t.key===zr||t.key===Ir)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){y(this,ks).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const a=this.root.getCandidateNodes();if(!a.length)return;if(t.key===zr){const c=a[0];this.root.setHighlightedNode(c)}else if(t.key===Ir){const c=a[a.length-1];this.root.setHighlightedNode(c)}return}if(t.key===Op){this.root.handleClose();return}if((t.key===Li||t.key===Mi&&y(this,Do).search.current==="")&&!t.isComposing&&(t.preventDefault(),Et(this,si,zp).call(this)))return;if(t.key===Ir&&t.altKey&&this.root.handleClose(),QR.includes(t.key)){t.preventDefault();const a=this.root.getCandidateNodes(),c=this.root.highlightedNode,f=c?a.indexOf(c):-1,h=this.root.opts.loop.current;let g;if(t.key===zr?g=gO(a,f,h):t.key===Ir?g=pO(a,f,h):t.key===qy?g=vO(a,f,10,h):t.key===Yy?g=mO(a,f,10,h):t.key===Ws?g=a[0]:t.key===Hs&&(g=a[a.length-1]),!g)return;this.root.setHighlightedNode(g);return}const n=t.ctrlKey||t.altKey||t.metaKey,i=t.key.length===1,s=t.key===Mi,l=this.root.getCandidateNodes();if(t.key!==Op){if(!n&&(i||s)){!y(this,Do).handleTypeaheadSearch(t.key,l)&&s&&(t.preventDefault(),Et(this,si,zp).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const n=t.target;n!=null&&n.hasPointerCapture(t.pointerId)&&(n==null||n.releasePointerCapture(t.pointerId)),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?Et(this,si,Bp).call(this,t):this.root.handleClose())}onpointerup(t){t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?Et(this,si,Bp).call(this,t):this.root.handleClose())}get props(){return d(y(this,mc))}set props(t){O(y(this,mc),t)}}Do=new WeakMap,ks=new WeakMap,si=new WeakSet,Sw=function(){this.root.opts.open.current=!0,y(this,ks).resetTypeahead(),y(this,Do).resetTypeahead()},Bp=function(t){Et(this,si,Sw).call(this)},zp=function(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)},mc=new WeakMap;var bc,_c,eh,yc,wc;class eN{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,bc,ft(null));V(this,_c,ft(!1));V(this,eh,E(()=>{const t=this.root.isCombobox?"--bits-combobox":"--bits-select";return{[`${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`${t}-content-available-width`]:"var(--bits-floating-available-width)",[`${t}-content-available-height`]:"var(--bits-floating-available-height)",[`${t}-anchor-width`]:" var(--bits-floating-anchor-width)",[`${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}));ot(this,"onInteractOutside",t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()});ot(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});ot(this,"onOpenAutoFocus",t=>{t.preventDefault()});ot(this,"onCloseAutoFocus",t=>{t.preventDefault()});V(this,yc,E(()=>({open:this.root.opts.open.current})));V(this,wc,E(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":vo(this.root.opts.open.current),[this.root.bitsAttrs.content]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...d(y(this,eh))},onpointermove:this.onpointermove})));ot(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}});this.opts=t,this.root=n,ue({...t,onRefChange:i=>{this.root.contentNode=i},deps:()=>this.root.opts.open.current}),mv(()=>{this.root.contentNode=null,this.isPositioned=!1}),Se(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}get viewportNode(){return d(y(this,bc))}set viewportNode(t){O(y(this,bc),t,!0)}get isPositioned(){return d(y(this,_c))}set isPositioned(t){O(y(this,_c),t,!0)}onpointermove(t){this.root.isUsingKeyboard=!1}get snippetProps(){return d(y(this,yc))}set snippetProps(t){O(y(this,yc),t)}get props(){return d(y(this,wc))}set props(t){O(y(this,wc),t)}}bc=new WeakMap,_c=new WeakMap,eh=new WeakMap,yc=new WeakMap,wc=new WeakMap;var xc,Sc,Cc,Ac,Pc;class nN{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,xc,E(()=>this.root.includesItem(this.opts.value.current)));V(this,Sc,E(()=>this.root.highlightedValue===this.opts.value.current));ot(this,"prevHighlighted",new Wy(()=>this.isHighlighted));V(this,Cc,ft(!1));V(this,Ac,E(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));V(this,Pc,E(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":lr(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.bitsAttrs.item]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup})));this.opts=t,this.root=n,ue({...t,deps:()=>this.mounted}),Se([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Se(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}get isSelected(){return d(y(this,xc))}set isSelected(t){O(y(this,xc),t)}get isHighlighted(){return d(y(this,Sc))}set isHighlighted(t){O(y(this,Sc),t)}get mounted(){return d(y(this,Cc))}set mounted(t){O(y(this,Cc),t,!0)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}get snippetProps(){return d(y(this,Ac))}set snippetProps(t){O(y(this,Ac),t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Rp){nn(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return d(y(this,Pc))}set props(t){O(y(this,Pc),t)}}xc=new WeakMap,Sc=new WeakMap,Cc=new WeakMap,Ac=new WeakMap,Pc=new WeakMap;var kc,Tc;class rN{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,kc,ft(null));V(this,Tc,E(()=>{var t;return{id:this.opts.id.current,role:"group",[this.root.bitsAttrs.group]:"","aria-labelledby":((t=this.labelNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.root=n,ue(t)}get labelNode(){return d(y(this,kc))}set labelNode(t){O(y(this,kc),t,!0)}get props(){return d(y(this,Tc))}set props(t){O(y(this,Tc),t)}}kc=new WeakMap,Tc=new WeakMap;var Ec;class iN{constructor(t,n){ot(this,"opts");ot(this,"group");V(this,Ec,E(()=>({id:this.opts.id.current,[this.group.root.bitsAttrs["group-label"]]:""})));this.opts=t,this.group=n,ue({...t,onRefChange:i=>{n.labelNode=i}})}get props(){return d(y(this,Ec))}set props(t){O(y(this,Ec),t)}}Ec=new WeakMap;var Ic,Oc;class oN{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Ic,E(()=>this.root.opts.name.current!==""));V(this,Oc,E(()=>({disabled:yv(this.root.opts.disabled.current),required:BI(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=n,this.onfocus=this.onfocus.bind(this)}get shouldRender(){return d(y(this,Ic))}set shouldRender(t){O(y(this,Ic),t)}onfocus(t){var n,i;t.preventDefault(),this.root.isCombobox?(i=this.root.inputNode)==null||i.focus():(n=this.root.triggerNode)==null||n.focus()}get props(){return d(y(this,Oc))}set props(t){O(y(this,Oc),t)}}Ic=new WeakMap,Oc=new WeakMap;var Rc,Nc;class sN{constructor(t,n){ot(this,"opts");ot(this,"content");ot(this,"root");V(this,Rc,ft(0));V(this,Nc,E(()=>({id:this.opts.id.current,role:"presentation",[this.root.bitsAttrs.viewport]:"",style:{position:"relative",flex:1,overflow:"auto"}})));this.opts=t,this.content=n,this.root=n.root,ue({...t,onRefChange:i=>{this.content.viewportNode=i},deps:()=>this.root.opts.open.current})}get prevScrollTop(){return d(y(this,Rc))}set prevScrollTop(t){O(y(this,Rc),t,!0)}get props(){return d(y(this,Nc))}set props(t){O(y(this,Nc),t)}}Rc=new WeakMap,Nc=new WeakMap;var Mc,Dc;class Cw{constructor(t,n){ot(this,"opts");ot(this,"content");ot(this,"root");ot(this,"autoScrollTimer",null);ot(this,"userScrollTimer",-1);ot(this,"isUserScrolling",!1);ot(this,"onAutoScroll",Ce);V(this,Mc,ft(!1));V(this,Dc,E(()=>({id:this.opts.id.current,"aria-hidden":MI(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave})));this.opts=t,this.content=n,this.root=n.root,ue({...t,deps:()=>this.mounted}),Se([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),se(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}get mounted(){return d(y(this,Mc))}set mounted(t){O(y(this,Mc),t,!0)}handleUserScroll(){window.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=window.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(window.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(t){if(this.autoScrollTimer!==null)return;const n=i=>{this.onAutoScroll(),this.autoScrollTimer=window.setTimeout(()=>n(i+1),this.opts.delay.current(i))};this.autoScrollTimer=window.setTimeout(()=>n(1),this.opts.delay.current(0))}onpointermove(t){this.onpointerdown(t)}onpointerleave(t){this.clearAutoScrollInterval()}get props(){return d(y(this,Dc))}set props(t){O(y(this,Dc),t)}}Mc=new WeakMap,Dc=new WeakMap;var Lc,Fc;class aN{constructor(t){ot(this,"scrollButtonState");ot(this,"content");ot(this,"root");V(this,Lc,ft(!1));ot(this,"scrollIntoViewTimer",null);ot(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.content.viewportNode)return;const n=this.content.viewportNode.scrollHeight-this.content.viewportNode.clientHeight,i=Number.parseInt(getComputedStyle(this.content.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.content.viewportNode.scrollTop)<n-i});ot(this,"handleAutoScroll",()=>{const t=this.content.viewportNode,n=this.root.highlightedNode;!t||!n||(t.scrollTop=t.scrollTop+n.offsetHeight)});V(this,Fc,E(()=>({...this.scrollButtonState.props,[this.root.bitsAttrs["scroll-down-button"]]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Se([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),nn(this.content.viewportNode,"scroll",()=>this.handleScroll())}),Se(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=ju(5,()=>{const n=this.root.highlightedNode;n==null||n.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}get canScrollDown(){return d(y(this,Lc))}set canScrollDown(t){O(y(this,Lc),t,!0)}get props(){return d(y(this,Fc))}set props(t){O(y(this,Fc),t)}}Lc=new WeakMap,Fc=new WeakMap;var Bc,zc;class lN{constructor(t){ot(this,"scrollButtonState");ot(this,"content");ot(this,"root");V(this,Bc,ft(!1));ot(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.content.viewportNode)return;const n=Number.parseInt(getComputedStyle(this.content.viewportNode).paddingTop,10);this.canScrollUp=this.content.viewportNode.scrollTop-n>.1});ot(this,"handleAutoScroll",()=>{!this.content.viewportNode||!this.root.highlightedNode||(this.content.viewportNode.scrollTop=this.content.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)});V(this,zc,E(()=>({...this.scrollButtonState.props,[this.root.bitsAttrs["scroll-up-button"]]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,Se([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),nn(this.content.viewportNode,"scroll",()=>this.handleScroll())})}get canScrollUp(){return d(y(this,Bc))}set canScrollUp(t){O(y(this,Bc),t,!0)}get props(){return d(y(this,zc))}set props(t){O(y(this,zc),t)}}Bc=new WeakMap,zc=new WeakMap;const qs=new Fn("Select.Root | Combobox.Root"),Aw=new Fn("Select.Group | Combobox.Group"),Ch=new Fn("Select.Content | Combobox.Content");function cN(e){const{type:t,...n}=e,i=t==="single"?new JR(n):new $R(n);return qs.set(i)}function uN(e){return Ch.set(new eN(e,qs.get()))}function dN(e){return new tN(e,qs.get())}function fN(e){return new nN(e,qs.get())}function hN(e){return new sN(e,Ch.get())}function gN(e){return new lN(new Cw(e,Ch.get()))}function pN(e){return new aN(new Cw(e,Ch.get()))}function vN(e){return Aw.set(new rN(e,qs.get()))}function mN(e){return new iN(e,Aw.get())}function bN(e){return new oN(e,qs.get())}const _N=["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"];function yN(e){const t=e.isCombobox,n={};for(const i of _N)n[i]=t?`data-combobox-${i}`:`data-select-${i}`;return n}function f0(e,t){st(t,!0);let n=P(t,"value",15,"");const i=bN({value:H.with(()=>n())});var s=K(),l=N(s);{var a=c=>{Sv(c,Ft(()=>i.props,{get value(){return n()},set value(f){n(f)}}))};dt(l,c=>{i.shouldRender&&c(a)})}_(e,s),at()}function Pw(e,t){st(t,!0),UR({id:H.with(()=>t.id),virtualEl:H.with(()=>t.virtualEl)});var n=K(),i=N(n);ut(i,()=>t.children??Ct),_(e,n),at()}function wN(e,t){st(t,!0);let n=P(t,"side",3,"bottom"),i=P(t,"sideOffset",3,0),s=P(t,"align",3,"center"),l=P(t,"alignOffset",3,0),a=P(t,"arrowPadding",3,0),c=P(t,"avoidCollisions",3,!0),f=P(t,"collisionBoundary",19,()=>[]),h=P(t,"collisionPadding",3,0),g=P(t,"hideWhenDetached",3,!1),p=P(t,"onPlaced",3,()=>{}),v=P(t,"sticky",3,"partial"),b=P(t,"updatePositionStrategy",3,"optimized"),w=P(t,"strategy",3,"fixed"),S=P(t,"dir",3,"ltr"),x=P(t,"style",19,()=>({})),A=P(t,"wrapperId",19,de),T=P(t,"customAnchor",3,null);const D=WR({side:H.with(()=>n()),sideOffset:H.with(()=>i()),align:H.with(()=>s()),alignOffset:H.with(()=>l()),id:H.with(()=>t.id),arrowPadding:H.with(()=>a()),avoidCollisions:H.with(()=>c()),collisionBoundary:H.with(()=>f()),collisionPadding:H.with(()=>h()),hideWhenDetached:H.with(()=>g()),onPlaced:H.with(()=>p()),sticky:H.with(()=>v()),updatePositionStrategy:H.with(()=>b()),strategy:H.with(()=>w()),dir:H.with(()=>S()),style:H.with(()=>x()),enabled:H.with(()=>t.enabled),wrapperId:H.with(()=>A()),customAnchor:H.with(()=>T())}),R=E(()=>ee(D.wrapperProps,{style:{pointerEvents:"auto"}}));var L=K(),F=N(L);ut(F,()=>t.content??Ct,()=>({props:D.props,wrapperProps:d(R)})),_(e,L),at()}function xN(e,t){st(t,!0),Xu(()=>{var s;(s=t.onPlaced)==null||s.call(t)});var n=K(),i=N(n);ut(i,()=>t.content??Ct,()=>({props:{},wrapperProps:{}})),_(e,n),at()}function SN(e,t){let n=P(t,"isStatic",3,!1),i=xt(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var s=K(),l=N(s);{var a=f=>{xN(f,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},c=f=>{wN(f,Ft({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};dt(l,f=>{n()?f(a):f(c,!1)})}_(e,s)}var CN=Z("<!> <!>",1);function kw(e,t){st(t,!0);let n=P(t,"interactOutsideBehavior",3,"close"),i=P(t,"trapFocus",3,!0),s=P(t,"isValidEvent",3,()=>!1),l=P(t,"customAnchor",3,null),a=P(t,"isStatic",3,!1),c=xt(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);SN(e,{get isStatic(){return a()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return l()},get enabled(){return t.enabled},content:(h,g)=>{let p=()=>g==null?void 0:g().props,v=()=>g==null?void 0:g().wrapperProps;var b=CN(),w=N(b);{var S=T=>{Sf(T,{get preventScroll(){return t.preventScroll}})},x=T=>{var D=K(),R=N(D);{var L=F=>{Sf(F,{get preventScroll(){return t.preventScroll}})};dt(R,F=>{t.forceMount||F(L)},!0)}_(T,D)};dt(w,T=>{t.forceMount&&t.enabled?T(S):T(x,!1)})}var A=et(w,2);{const T=(R,L)=>{let F=()=>L==null?void 0:L().props;nw(R,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},children:(M,U)=>{ew(M,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return s()},get enabled(){return t.enabled},children:(tt,nt)=>{let z=()=>nt==null?void 0:nt().props;lw(tt,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},children:(it,X)=>{var j=K(),J=N(j);{let rt=E(()=>({props:ee(c,p(),z(),F(),{style:{pointerEvents:"auto"}}),wrapperProps:v()}));ut(J,()=>t.popper??Ct,()=>d(rt))}_(it,j)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})};let D=E(()=>t.enabled&&i());sw(A,{get id(){return t.id},get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get trapFocus(){return d(D)},get forceMount(){return t.forceMount},focusScope:T,$$slots:{focusScope:!0}})}_(h,b)},$$slots:{content:!0}}),at()}function Tw(e,t){let n=P(t,"interactOutsideBehavior",3,"close"),i=P(t,"trapFocus",3,!0),s=P(t,"isValidEvent",3,()=>!1),l=P(t,"customAnchor",3,null),a=P(t,"isStatic",3,!1),c=xt(t,["$$slots","$$events","$$legacy","popper","present","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic"]);_h(e,Ft({get id(){return t.id},get present(){return t.present}},()=>c,{presence:h=>{kw(h,Ft({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return l()},get isStatic(){return a()},get enabled(){return t.present},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return s()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1},()=>c))},$$slots:{presence:!0}}))}function Ew(e,t){let n=P(t,"interactOutsideBehavior",3,"close"),i=P(t,"trapFocus",3,!0),s=P(t,"isValidEvent",3,()=>!1),l=P(t,"customAnchor",3,null),a=P(t,"isStatic",3,!1),c=xt(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);kw(e,Ft({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return l()},get isStatic(){return a()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return s()},get onFocusOutside(){return t.onFocusOutside}},()=>c,{forceMount:!0}))}var AN=Z("<div><div><!></div></div>"),PN=Z("<div><div><!></div></div>");function kN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"forceMount",3,!1),l=P(t,"side",3,"bottom"),a=P(t,"onInteractOutside",3,Ce),c=P(t,"onEscapeKeydown",3,Ce),f=P(t,"preventScroll",3,!1),h=xt(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll"]);const g=uN({id:H.with(()=>n()),ref:H.with(()=>i(),x=>i(x)),onInteractOutside:H.with(()=>a()),onEscapeKeydown:H.with(()=>c())}),p=E(()=>ee(h,g.props));var v=K(),b=N(v);{var w=x=>{Ew(x,Ft(()=>d(p),()=>g.popperProps,{get side(){return l()},get enabled(){return g.root.opts.open.current},get id(){return n()},get preventScroll(){return f()},forceMount:!0,popper:(T,D)=>{let R=()=>D==null?void 0:D().props,L=()=>D==null?void 0:D().wrapperProps;const F=E(()=>ee(R(),{style:g.props.style}));var M=K(),U=N(M);{var q=nt=>{var z=K(),it=N(z);{let X=E(()=>({props:d(F),wrapperProps:L(),...g.snippetProps}));ut(it,()=>t.child,()=>d(X))}_(nt,z)},tt=nt=>{var z=AN();Yt(z,()=>({...L()}));var it=G(z);Yt(it,()=>({...d(F)}));var X=G(it);ut(X,()=>t.children??Ct),W(it),W(z),_(nt,z)};dt(U,nt=>{t.child?nt(q):nt(tt,!1)})}_(T,M)},$$slots:{popper:!0}}))},S=x=>{var A=K(),T=N(A);{var D=R=>{Tw(R,Ft(()=>d(p),()=>g.popperProps,{get side(){return l()},get present(){return g.root.opts.open.current},get id(){return n()},get preventScroll(){return f()},forceMount:!1,popper:(F,M)=>{let U=()=>M==null?void 0:M().props,q=()=>M==null?void 0:M().wrapperProps;const tt=E(()=>ee(U(),{style:g.props.style}));var nt=K(),z=N(nt);{var it=j=>{var J=K(),rt=N(J);{let ht=E(()=>({props:d(tt),wrapperProps:q(),...g.snippetProps}));ut(rt,()=>t.child,()=>d(ht))}_(j,J)},X=j=>{var J=PN();Yt(J,()=>({...q()}));var rt=G(J);Yt(rt,()=>({...d(tt)}));var ht=G(rt);ut(ht,()=>t.children??Ct),W(rt),W(J),_(j,J)};dt(z,j=>{t.child?j(it):j(X,!1)})}_(F,nt)},$$slots:{popper:!0}}))};dt(T,R=>{s()||R(D)},!0)}_(x,A)};dt(b,x=>{s()?x(w):x(S,!1)})}_(e,v),at()}function Mv(e,t){st(t,!0);let n=P(t,"mounted",15,!1),i=P(t,"onMountedChange",3,Ce);bv(()=>(n(!0),i()(!0),()=>{n(!1),i()(!1)})),at()}var TN=Z("<div><!></div>"),EN=Z("<!> <!>",1);function IN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"label",19,()=>t.value),l=P(t,"disabled",3,!1),a=P(t,"onHighlight",3,Ce),c=P(t,"onUnhighlight",3,Ce),f=xt(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const h=fN({id:H.with(()=>n()),ref:H.with(()=>i(),x=>i(x)),value:H.with(()=>t.value),disabled:H.with(()=>l()),label:H.with(()=>s()),onHighlight:H.with(()=>a()),onUnhighlight:H.with(()=>c())}),g=E(()=>ee(f,h.props));var p=EN(),v=N(p);{var b=x=>{var A=K(),T=N(A);{let D=E(()=>({props:d(g),...h.snippetProps}));ut(T,()=>t.child,()=>d(D))}_(x,A)},w=x=>{var A=TN();Yt(A,()=>({...d(g)}));var T=G(A);ut(T,()=>t.children??Ct,()=>h.snippetProps),W(A),_(x,A)};dt(v,x=>{t.child?x(b):x(w,!1)})}var S=et(v,2);Mv(S,{get mounted(){return h.mounted},set mounted(x){h.mounted=x}}),_(e,p),at()}var ON=Z("<div><!></div>");function RN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=vN({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=ON();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var NN=Z("<div><!></div>");function MN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children"]);const l=mN({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=NN();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var DN=Z("<div><!></div>");function LN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=hN({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=DN();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var FN=Z("<div><!></div>"),BN=Z("<!> <!>",1);function zN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"delay",3,()=>50),l=xt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=pN({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p)),delay:H.with(()=>s())}),c=E(()=>ee(l,a.props));var f=K(),h=N(f);{var g=p=>{var v=BN(),b=N(v);Mv(b,{get mounted(){return a.scrollButtonState.mounted},set mounted(A){a.scrollButtonState.mounted=A}});var w=et(b,2);{var S=A=>{var T=K(),D=N(T);ut(D,()=>t.child,()=>({props:l})),_(A,T)},x=A=>{var T=FN();Yt(T,()=>({...d(c)}));var D=G(T);ut(D,()=>t.children??Ct),W(T),_(A,T)};dt(w,A=>{t.child?A(S):A(x,!1)})}_(p,v)};dt(h,p=>{a.canScrollDown&&p(g)})}_(e,f),at()}var VN=Z("<div><!></div>"),HN=Z("<!> <!>",1);function WN(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"delay",3,()=>50),l=xt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=gN({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p)),delay:H.with(()=>s())}),c=E(()=>ee(l,a.props));var f=K(),h=N(f);{var g=p=>{var v=HN(),b=N(v);Mv(b,{get mounted(){return a.scrollButtonState.mounted},set mounted(A){a.scrollButtonState.mounted=A}});var w=et(b,2);{var S=A=>{var T=K(),D=N(T);ut(D,()=>t.child,()=>({props:l})),_(A,T)},x=A=>{var T=VN();Yt(T,()=>({...d(c)}));var D=G(T);ut(D,()=>t.children??Ct),W(T),_(A,T)};dt(w,A=>{t.child?A(S):A(x,!1)})}_(p,v)};dt(h,p=>{a.canScrollUp&&p(g)})}_(e,f),at()}function UN(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function GN(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}var Iw={exports:{}};/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */(function(e,t){(function(n,i){e.exports=i(n)})(ti,function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var i=function(s){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var l=String(s),a=l.length,c=-1,f,h="",g=l.charCodeAt(0);++c<a;){if(f=l.charCodeAt(c),f==0){h+="�";continue}if(f>=1&&f<=31||f==127||c==0&&f>=48&&f<=57||c==1&&f>=48&&f<=57&&g==45){h+="\\"+f.toString(16)+" ";continue}if(c==0&&a==1&&f==45){h+="\\"+l.charAt(c);continue}if(f>=128||f==45||f==95||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122){h+=l.charAt(c);continue}h+="\\"+l.charAt(c)}return h};return n.CSS||(n.CSS={}),n.CSS.escape=i,i})})(Iw);var KN=Iw.exports;const Ow=Ly(KN),qN="data-command-root",YN="data-command-list",XN="data-command-input",jN="data-command-empty",Rw="data-command-group",Nw="data-command-group-items",Mw="data-command-group-heading",Dw="data-command-item",ZN="data-command-input-label",Oo="data-value",ga=`[${Rw}]`,tp=`[${Nw}]`,QN=`[${Mw}]`,Lw=`[${Dw}]`,ep=`${Lw}:not([aria-disabled="true"])`,Go=new Fn("Command.Root"),JN=new Fn("Command.List"),$u=new Fn("Command.Group"),h0={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var Ts,Vc,Hc,Wc,Uc,Gc,Kc,we,Fw,df,Vp,ff,hf,gf,as,Bw,Hp,Wp,Up,qc;class $N{constructor(t){V(this,we);ot(this,"opts");V(this,Ts,!1);ot(this,"sortAfterTick",!1);ot(this,"sortAndFilterAfterTick",!1);ot(this,"allItems",new Set);ot(this,"allGroups",new Map);ot(this,"allIds",new Map);V(this,Vc,ft(0));V(this,Hc,ft(null));V(this,Wc,ft(null));V(this,Uc,ft(null));V(this,Gc,ft(h0));V(this,Kc,ft(On(h0)));V(this,qc,E(()=>({id:this.opts.id.current,role:"application",[qN]:"",tabindex:-1,onkeydown:this.onkeydown})));this.opts=t;const n={...this._commandState,value:this.opts.value.current??""};this._commandState=n,this.commandState=n,ue(t),this.onkeydown=this.onkeydown.bind(this)}get key(){return d(y(this,Vc))}set key(t){O(y(this,Vc),t,!0)}get viewportNode(){return d(y(this,Hc))}set viewportNode(t){O(y(this,Hc),t,!0)}get inputNode(){return d(y(this,Wc))}set inputNode(t){O(y(this,Wc),t,!0)}get labelNode(){return d(y(this,Uc))}set labelNode(t){O(y(this,Uc),t,!0)}get commandState(){return d(y(this,Gc))}set commandState(t){O(y(this,Gc),t)}get _commandState(){return d(y(this,Kc))}set _commandState(t){O(y(this,Kc),t,!0)}setState(t,n,i){Object.is(this._commandState[t],n)||(this._commandState[t]=n,t==="search"?(Et(this,we,gf).call(this),Et(this,we,ff).call(this)):t==="value"&&(i||Et(this,we,Bw).call(this)),Et(this,we,df).call(this))}setValue(t,n){t!==this.opts.value.current&&t===""&&br(()=>{this.key++}),this.setState("value",t,n),this.opts.value.current=t}getValidItems(){const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(ep)).filter(i=>!!i):[]}updateSelectedToIndex(t){const i=this.getValidItems()[t];i&&this.setValue(i.getAttribute(Oo)??"")}updateSelectedByItem(t){const n=Et(this,we,as).call(this),i=this.getValidItems(),s=i.findIndex(a=>a===n);let l=i[s+t];this.opts.loop.current&&(l=s+t<0?i[i.length-1]:s+t===i.length?i[0]:i[s+t]),l&&this.setValue(l.getAttribute(Oo)??"")}updateSelectedByGroup(t){const n=Et(this,we,as).call(this);let i=n==null?void 0:n.closest(ga),s;for(;i&&!s;)i=t>0?UN(i,ga):GN(i,ga),s=i==null?void 0:i.querySelector(ep);s?this.setValue(s.getAttribute(Oo)??""):this.updateSelectedByItem(t)}registerValue(t,n){var i;return t&&t===((i=this.allIds.get(t))==null?void 0:i.value)||this.allIds.set(t,{value:t,keywords:n}),this._commandState.filtered.items.set(t,Et(this,we,Vp).call(this,t,n)),this.sortAfterTick||(this.sortAfterTick=!0,br(()=>{Et(this,we,ff).call(this),this.sortAfterTick=!1})),()=>{this.allIds.delete(t)}}registerItem(t,n){return this.allItems.add(t),n&&(this.allGroups.has(n)?this.allGroups.get(n).add(t):this.allGroups.set(n,new Set([t]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,br(()=>{Et(this,we,gf).call(this),Et(this,we,ff).call(this),this.sortAndFilterAfterTick=!1})),Et(this,we,df).call(this),()=>{const i=Et(this,we,as).call(this);this.allIds.delete(t),this.allItems.delete(t),this.commandState.filtered.items.delete(t),Et(this,we,gf).call(this),(i==null?void 0:i.getAttribute("id"))===t&&Et(this,we,hf).call(this),Et(this,we,df).call(this)}}registerGroup(t){return this.allGroups.has(t)||this.allGroups.set(t,new Set),()=>{this.allIds.delete(t),this.allGroups.delete(t)}}onkeydown(t){switch(t.key){case HI:case WI:{this.opts.vimBindings.current&&t.ctrlKey&&Et(this,we,Wp).call(this,t);break}case zr:Et(this,we,Wp).call(this,t);break;case VI:case UI:{this.opts.vimBindings.current&&t.ctrlKey&&Et(this,we,Up).call(this,t);break}case Ir:Et(this,we,Up).call(this,t);break;case Ws:t.preventDefault(),this.updateSelectedToIndex(0);break;case Hs:t.preventDefault(),Et(this,we,Hp).call(this);break;case Li:if(!t.isComposing&&t.keyCode!==229){t.preventDefault();const n=Et(this,we,as).call(this);n&&(n==null||n.click())}}}get props(){return d(y(this,qc))}set props(t){O(y(this,qc),t)}}Ts=new WeakMap,Vc=new WeakMap,Hc=new WeakMap,Wc=new WeakMap,Uc=new WeakMap,Gc=new WeakMap,Kc=new WeakMap,we=new WeakSet,Fw=function(){return Ay(this._commandState)},df=function(){y(this,Ts)||(He(this,Ts,!0),br(()=>{var i,s;He(this,Ts,!1);const t=Et(this,we,Fw).call(this);!Object.is(this.commandState,t)&&(this.commandState=t,(s=(i=this.opts.onStateChange)==null?void 0:i.current)==null||s.call(i,t))}))},Vp=function(t,n){const i=this.opts.filter.current??Hw;return t?i(t,this._commandState.search,n):0},ff=function(){var a;if(!this._commandState.search||this.opts.shouldFilter.current===!1){Et(this,we,hf).call(this);return}const t=this._commandState.filtered.items,n=[];for(const c of this._commandState.filtered.groups){const f=this.allGroups.get(c);let h=0;if(!f){n.push([c,h]);continue}for(const g of f){const p=t.get(g);h=Math.max(p??0,h)}n.push([c,h])}const i=this.viewportNode,s=this.getValidItems().sort((c,f)=>{const h=c.getAttribute("data-value"),g=f.getAttribute("data-value"),p=t.get(h)??0;return(t.get(g)??0)-p});for(const c of s){const f=c.closest(tp);if(f){const h=c.parentElement===f?c:c.closest(`${tp} > *`);h&&f.appendChild(h)}else{const h=c.parentElement===i?c:c.closest(`${tp} > *`);h&&(i==null||i.appendChild(h))}}const l=n.sort((c,f)=>f[1]-c[1]);for(const c of l){const f=i==null?void 0:i.querySelector(`${ga}[${Oo}="${Ow(c[0])}"]`);(a=f==null?void 0:f.parentElement)==null||a.appendChild(f)}Et(this,we,hf).call(this)},hf=function(){br(()=>{const t=this.getValidItems().find(i=>i.getAttribute("aria-disabled")!=="true"),n=t==null?void 0:t.getAttribute(Oo);this.setValue(n||"")})},gf=function(){var n,i;if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let t=0;for(const s of this.allItems){const l=((n=this.allIds.get(s))==null?void 0:n.value)??"",a=((i=this.allIds.get(s))==null?void 0:i.keywords)??[],c=Et(this,we,Vp).call(this,l,a);this._commandState.filtered.items.set(s,c),c>0&&t++}for(const[s,l]of this.allGroups)for(const a of l){const c=this._commandState.filtered.items.get(a);if(c&&c>0){this._commandState.filtered.groups.add(s);break}}this._commandState.filtered.count=t},as=function(){const t=this.opts.ref.current;if(!t)return;const n=t.querySelector(`${ep}[data-selected]`);if(n)return n},Bw=function(){br(()=>{var s,l,a,c;const t=Et(this,we,as).call(this);if(!t)return;const n=(s=t.parentElement)==null?void 0:s.parentElement;if(!n)return;const i=m3(n);if(i&&((l=i.dataset)==null?void 0:l.value)===((a=t.dataset)==null?void 0:a.value)){const f=(c=t==null?void 0:t.closest(ga))==null?void 0:c.querySelector(QN);f==null||f.scrollIntoView({block:"nearest"});return}t.scrollIntoView({block:"nearest"})})},Hp=function(){return this.updateSelectedToIndex(this.getValidItems().length-1)},Wp=function(t){t.preventDefault(),t.metaKey?Et(this,we,Hp).call(this):t.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)},Up=function(t){t.preventDefault(),t.metaKey?this.updateSelectedToIndex(0):t.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},qc=new WeakMap;var Yc,Xc,jc;class tM{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Yc,!0);V(this,Xc,E(()=>this.root._commandState.filtered.count===0&&y(this,Yc)===!1||this.opts.forceMount.current));V(this,jc,E(()=>({id:this.opts.id.current,role:"presentation",[jN]:""})));this.opts=t,this.root=n,hh(()=>{He(this,Yc,!1)}),ue({...t,deps:()=>this.shouldRender})}get shouldRender(){return d(y(this,Xc))}set shouldRender(t){O(y(this,Xc),t)}get props(){return d(y(this,jc))}set props(t){O(y(this,jc),t)}}Yc=new WeakMap,Xc=new WeakMap,jc=new WeakMap;var Zc,Qc,Jc,$c;class eM{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Zc,ft(null));V(this,Qc,ft(""));V(this,Jc,E(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));V(this,$c,E(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[Rw]:""})));this.opts=t,this.root=n,this.trueValue=t.value.current??t.id.current,ue({...t,deps:()=>this.shouldRender}),Se(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),se(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}get headingNode(){return d(y(this,Zc))}set headingNode(t){O(y(this,Zc),t,!0)}get trueValue(){return d(y(this,Qc))}set trueValue(t){O(y(this,Qc),t,!0)}get shouldRender(){return d(y(this,Jc))}set shouldRender(t){O(y(this,Jc),t)}get props(){return d(y(this,$c))}set props(t){O(y(this,$c),t)}}Zc=new WeakMap,Qc=new WeakMap,Jc=new WeakMap,$c=new WeakMap;var tu;class nM{constructor(t,n){ot(this,"opts");ot(this,"group");V(this,tu,E(()=>({id:this.opts.id.current,[Mw]:""})));this.opts=t,this.group=n,ue({...t,onRefChange:i=>{this.group.headingNode=i}})}get props(){return d(y(this,tu))}set props(t){O(y(this,tu),t)}}tu=new WeakMap;var eu;class rM{constructor(t,n){ot(this,"opts");ot(this,"group");V(this,eu,E(()=>{var t;return{id:this.opts.id.current,role:"group",[Nw]:"","aria-labelledby":((t=this.group.headingNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.group=n,ue(t)}get props(){return d(y(this,eu))}set props(t){O(y(this,eu),t)}}eu=new WeakMap;var nh,nu;class iM{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,nh,E(()=>{var n;const t=(n=this.root.viewportNode)==null?void 0:n.querySelector(`${Lw}[${Oo}="${Ow(this.root.opts.value.current)}"]`);if(t)return(t==null?void 0:t.getAttribute("id"))??void 0}));V(this,nu,E(()=>{var t,n;return{id:this.opts.id.current,type:"text",[XN]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":mh(!0),"aria-controls":((t=this.root.viewportNode)==null?void 0:t.id)??void 0,"aria-labelledby":((n=this.root.labelNode)==null?void 0:n.id)??void 0,"aria-activedescendant":d(y(this,nh))}}));this.opts=t,this.root=n,ue({...t,onRefChange:i=>{this.root.inputNode=i}}),Se(()=>this.opts.ref.current,()=>{const i=this.opts.ref.current;i&&this.opts.autofocus.current&&ju(10,()=>i.focus())}),Se(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}get props(){return d(y(this,nu))}set props(t){O(y(this,nu),t)}}nh=new WeakMap,nu=new WeakMap;var Lo,rh,ru,iu,ou,Wo,zw,Gp,su;class oM{constructor(t,n){V(this,Wo);ot(this,"opts");ot(this,"root");V(this,Lo,null);V(this,rh,E(()=>{var t;return this.opts.forceMount.current||((t=y(this,Lo))==null?void 0:t.opts.forceMount.current)===!0}));V(this,ru,ft(""));V(this,iu,E(()=>{if(this.opts.ref.current,d(y(this,rh))||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;const t=this.root.commandState.filtered.items.get(this.trueValue);return t===void 0?!1:t>0}));V(this,ou,E(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));V(this,su,E(()=>({id:this.opts.id.current,"aria-disabled":_v(this.opts.disabled.current),"aria-selected":Gy(this.isSelected),"data-disabled":lr(this.opts.disabled.current),"data-selected":LI(this.isSelected),"data-value":this.trueValue,[Dw]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick})));this.opts=t,this.root=n,He(this,Lo,$u.getOr(null)),this.trueValue=t.value.current,ue({...t,deps:()=>!!this.root.commandState.search}),Se([()=>this.trueValue,()=>{var i;return(i=y(this,Lo))==null?void 0:i.trueValue},()=>this.opts.forceMount.current],()=>{var i;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(i=y(this,Lo))==null?void 0:i.trueValue)}),Se([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{var i,s;!this.opts.value.current&&((i=this.opts.ref.current)!=null&&i.textContent)&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.root.registerValue(this.trueValue,t.keywords.current.map(l=>l.trim())),(s=this.opts.ref.current)==null||s.setAttribute(Oo,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}get trueValue(){return d(y(this,ru))}set trueValue(t){O(y(this,ru),t,!0)}get shouldRender(){return d(y(this,iu))}set shouldRender(t){O(y(this,iu),t)}get isSelected(){return d(y(this,ou))}set isSelected(t){O(y(this,ou),t)}onpointermove(t){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||Et(this,Wo,Gp).call(this)}onclick(t){this.opts.disabled.current||Et(this,Wo,zw).call(this)}get props(){return d(y(this,su))}set props(t){O(y(this,su),t)}}Lo=new WeakMap,rh=new WeakMap,ru=new WeakMap,iu=new WeakMap,ou=new WeakMap,Wo=new WeakSet,zw=function(){var t;this.opts.disabled.current||(Et(this,Wo,Gp).call(this),(t=this.opts.onSelect)==null||t.current())},Gp=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},su=new WeakMap;var au;class sM{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,au,E(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[YN]:""})));this.opts=t,this.root=n,ue(t)}get props(){return d(y(this,au))}set props(t){O(y(this,au),t)}}au=new WeakMap;var lu;class aM{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,lu,E(()=>{var t;return{id:this.opts.id.current,[ZN]:"",for:(t=this.opts.for)==null?void 0:t.current,style:zy}}));this.opts=t,this.root=n,ue({...t,onRefChange:i=>{this.root.labelNode=i}})}get props(){return d(y(this,lu))}set props(t){O(y(this,lu),t)}}lu=new WeakMap;function lM(e){return Go.set(new $N(e))}function cM(e){return new tM(e,Go.get())}function uM(e){const t=$u.getOr(null);return new oM({...e,group:t},Go.get())}function dM(e){return $u.set(new eM(e,Go.get()))}function fM(e){return new nM(e,$u.get())}function hM(e){return new rM(e,$u.get())}function gM(e){return new iM(e,Go.get())}function pM(e){return JN.set(new sM(e,Go.get()))}function vM(e){return new aM(e,Go.get())}var mM=Z("<label><!></label>");function bM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children"]);const l=vM({id:H.with(()=>n()),ref:H.with(()=>i(),h=>i(h))}),a=E(()=>ee(s,l.props));var c=mM();Yt(c,()=>({...d(a)}));var f=G(c);ut(f,()=>t.children??Ct),W(c),_(e,c),at()}var _M=Z("<!> <!>",1),yM=Z("<div><!> <!></div>");function wM(e,t){st(t,!0);const n=tt=>{bM(tt,{children:(nt,z)=>{jt();var it=oe();Rt(()=>$t(it,p())),_(nt,it)},$$slots:{default:!0}})};let i=P(t,"id",19,de),s=P(t,"ref",15,null),l=P(t,"value",15,""),a=P(t,"onValueChange",3,Ce),c=P(t,"onStateChange",3,Ce),f=P(t,"loop",3,!1),h=P(t,"shouldFilter",3,!0),g=P(t,"filter",3,Hw),p=P(t,"label",3,""),v=P(t,"vimBindings",3,!0),b=P(t,"disablePointerSelection",3,!1),w=xt(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","children","child"]);const S=lM({id:H.with(()=>i()),ref:H.with(()=>s(),tt=>s(tt)),filter:H.with(()=>g()),shouldFilter:H.with(()=>h()),loop:H.with(()=>f()),value:H.with(()=>l(),tt=>{l()!==tt&&(l(tt),a()(tt))}),vimBindings:H.with(()=>v()),disablePointerSelection:H.with(()=>b()),onStateChange:H.with(()=>c())}),x=tt=>S.updateSelectedToIndex(tt),A=tt=>S.updateSelectedByGroup(tt),T=tt=>S.updateSelectedByItem(tt),D=()=>S.getValidItems(),R=E(()=>ee(w,S.props));var L={updateSelectedToIndex:x,updateSelectedByGroup:A,updateSelectedByItem:T,getValidItems:D},F=K(),M=N(F);{var U=tt=>{var nt=_M(),z=N(nt);n(z);var it=et(z,2);ut(it,()=>t.child,()=>({props:d(R)})),_(tt,nt)},q=tt=>{var nt=yM();Yt(nt,()=>({...d(R)}));var z=G(nt);n(z);var it=et(z,2);ut(it,()=>t.children??Ct),W(nt),_(tt,nt)};dt(M,tt=>{t.child?tt(U):tt(q,!1)})}return _(e,F),at(L)}var xM=Z("<div><!></div>");function SM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"forceMount",3,!1),l=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const a=cM({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p)),forceMount:H.with(()=>s())}),c=E(()=>ee(a.props,l));var f=K(),h=N(f);{var g=p=>{var v=K(),b=N(v);{var w=x=>{var A=K(),T=N(A);ut(T,()=>t.child,()=>({props:d(c)})),_(x,A)},S=x=>{var A=xM();Yt(A,()=>({...d(c)}));var T=G(A);ut(T,()=>t.children??Ct),W(A),_(x,A)};dt(b,x=>{t.child?x(w):x(S,!1)})}_(p,v)};dt(h,p=>{a.shouldRender&&p(g)})}_(e,f),at()}var CM=Z("<div><!></div>");function AM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"value",3,""),l=P(t,"forceMount",3,!1),a=xt(t,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const c=dM({id:H.with(()=>n()),ref:H.with(()=>i(),b=>i(b)),forceMount:H.with(()=>l()),value:H.with(()=>s())}),f=E(()=>ee(a,c.props));var h=K(),g=N(h);{var p=b=>{var w=K(),S=N(w);ut(S,()=>t.child,()=>({props:d(f)})),_(b,w)},v=b=>{var w=CM();Yt(w,()=>({...d(f)}));var S=G(w);ut(S,()=>t.children??Ct),W(w),_(b,w)};dt(g,b=>{t.child?b(p):b(v,!1)})}_(e,h),at()}var PM=Z("<div><!></div>");function kM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=fM({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=PM();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var TM=Z("<div><!></div>"),EM=Z('<div style="display: contents;"><!></div>');function IM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=hM({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=EM(),f=G(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=TM();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}W(c),_(e,c),at()}var OM=Z("<input/>");function RM(e,t){st(t,!0);let n=P(t,"value",15,""),i=P(t,"autofocus",3,!1),s=P(t,"id",19,de),l=P(t,"ref",15,null),a=xt(t,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const c=gM({id:H.with(()=>s()),ref:H.with(()=>l(),b=>l(b)),value:H.with(()=>n(),b=>{n(b)}),autofocus:H.with(()=>i()??!1)}),f=E(()=>ee(a,c.props));var h=K(),g=N(h);{var p=b=>{var w=K(),S=N(w);ut(S,()=>t.child,()=>({props:d(f)})),_(b,w)},v=b=>{var w=OM();Yt(w,()=>({...d(f)}),void 0,void 0,void 0,!0),Ra(w,n),_(b,w)};dt(g,b=>{t.child?b(p):b(v,!1)})}_(e,h),at()}var NM=Z("<div><!></div>"),MM=Z('<div style="display: contents;" data-item-wrapper=""><!></div>');function DM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"value",3,""),l=P(t,"disabled",3,!1),a=P(t,"onSelect",3,Ce),c=P(t,"forceMount",3,!1),f=P(t,"keywords",19,()=>[]),h=xt(t,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const g=uM({id:H.with(()=>n()),ref:H.with(()=>i(),w=>i(w)),value:H.with(()=>s()),disabled:H.with(()=>l()),onSelect:H.with(()=>a()),forceMount:H.with(()=>c()),keywords:H.with(()=>f())}),p=E(()=>ee(h,g.props));var v=K(),b=N(v);Ri(b,()=>g.root.key,w=>{var S=MM(),x=G(S);{var A=T=>{var D=K(),R=N(D);{var L=M=>{var U=K(),q=N(U);ut(q,()=>t.child,()=>({props:d(p)})),_(M,U)},F=M=>{var U=NM();Yt(U,()=>({...d(p)}));var q=G(U);ut(q,()=>t.children??Ct),W(U),_(M,U)};dt(R,M=>{t.child?M(L):M(F,!1)})}_(T,D)};dt(x,T=>{g.shouldRender&&T(A)})}W(S),Rt(()=>Pt(S,"data-value",g.trueValue)),_(w,S)}),_(e,v),at()}var LM=Z("<div><!></div>");function FM(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const l=pM({id:H.with(()=>n()),ref:H.with(()=>i(),h=>i(h)),ariaLabel:H.with(()=>t["aria-label"]??"Suggestions...")}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);Ri(f,()=>l.root._commandState.search==="",h=>{var g=K(),p=N(g);{var v=w=>{var S=K(),x=N(S);ut(x,()=>t.child,()=>({props:d(a)})),_(w,S)},b=w=>{var S=LM();Yt(S,()=>({...d(a)}));var x=G(S);ut(x,()=>t.children??Ct),W(S),_(w,S)};dt(p,w=>{t.child?w(v):w(b,!1)})}_(h,g)}),_(e,c),at()}const g0=1,BM=.9,zM=.8,VM=.17,np=.1,rp=.999,HM=.9999,WM=.99,UM=/[\\/_+.#"@[({&]/,GM=/[\\/_+.#"@[({&]/g,KM=/[\s-]/,Vw=/[\s-]/g;function Kp(e,t,n,i,s,l,a){if(l===t.length)return s===e.length?g0:WM;const c=`${s},${l}`;if(a[c]!==void 0)return a[c];const f=i.charAt(l);let h=n.indexOf(f,s),g=0,p,v,b,w;for(;h>=0;)p=Kp(e,t,n,i,h+1,l+1,a),p>g&&(h===s?p*=g0:UM.test(e.charAt(h-1))?(p*=zM,b=e.slice(s,h-1).match(GM),b&&s>0&&(p*=rp**b.length)):KM.test(e.charAt(h-1))?(p*=BM,w=e.slice(s,h-1).match(Vw),w&&s>0&&(p*=rp**w.length)):(p*=VM,s>0&&(p*=rp**(h-s))),e.charAt(h)!==t.charAt(l)&&(p*=HM)),(p<np&&n.charAt(h-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(h-1)!==i.charAt(l))&&(v=Kp(e,t,n,i,h+1,l+2,a),v*np>p&&(p=v*np)),p>g&&(g=p),h=n.indexOf(f,h+1);return a[c]=g,g}function p0(e){return e.toLowerCase().replace(Vw," ")}function Hw(e,t,n){return e=n&&n.length>0?`${`${e} ${n==null?void 0:n.join(" ")}`}`:e,Kp(e,t,p0(e),p0(t),0,0,{})}var cu,uu;class qM{constructor(t){ot(this,"opts");V(this,cu,ft(null));V(this,uu,ft(null));this.opts=t}get contentNode(){return d(y(this,cu))}set contentNode(t){O(y(this,cu),t,!0)}get triggerNode(){return d(y(this,uu))}set triggerNode(t){O(y(this,uu),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}}cu=new WeakMap,uu=new WeakMap;var ih,Ww,du;class YM{constructor(t,n){V(this,ih);ot(this,"opts");ot(this,"root");V(this,du,E(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":mh(this.root.opts.open.current),"data-state":vo(this.root.opts.open.current),"aria-controls":Et(this,ih,Ww).call(this),"data-popover-trigger":"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick})));this.opts=t,this.root=n,ue({...t,onRefChange:i=>{this.root.triggerNode=i}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button===0&&this.root.toggleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Li||t.key===Mi)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return d(y(this,du))}set props(t){O(y(this,du),t)}}ih=new WeakSet,Ww=function(){var t,n;if(this.root.opts.open.current&&((t=this.root.contentNode)!=null&&t.id))return(n=this.root.contentNode)==null?void 0:n.id},du=new WeakMap;var fu,hu;class XM{constructor(t,n){ot(this,"opts");ot(this,"root");ot(this,"onInteractOutside",t=>{this.opts.onInteractOutside.current(t),!(t.defaultPrevented||!Xy(t.target)||t.target.closest("[data-popover-trigger]")===this.root.triggerNode)&&this.root.handleClose()});ot(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});ot(this,"onCloseAutoFocus",t=>{var n;this.opts.onCloseAutoFocus.current(t),!t.defaultPrevented&&(t.preventDefault(),(n=this.root.triggerNode)==null||n.focus())});V(this,fu,E(()=>({open:this.root.opts.open.current})));V(this,hu,E(()=>({id:this.opts.id.current,tabindex:-1,"data-state":vo(this.root.opts.open.current),"data-popover-content":"",style:{pointerEvents:"auto"}})));ot(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onCloseAutoFocus:this.onCloseAutoFocus});this.opts=t,this.root=n,ue({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i}})}get snippetProps(){return d(y(this,fu))}set snippetProps(t){O(y(this,fu),t)}get props(){return d(y(this,hu))}set props(t){O(y(this,hu),t)}}fu=new WeakMap,hu=new WeakMap;const Dv=new Fn("Popover.Root");function jM(e){return Dv.set(new qM(e))}function ZM(e){return new YM(e,Dv.get())}function QM(e){return new XM(e,Dv.get())}var JM=Z("<div><div><!></div></div>"),$M=Z("<div><div><!></div></div>");function t5(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"id",19,de),s=P(t,"forceMount",3,!1),l=P(t,"onCloseAutoFocus",3,Ce),a=P(t,"onEscapeKeydown",3,Ce),c=P(t,"onInteractOutside",3,Ce),f=P(t,"trapFocus",3,!0),h=P(t,"preventScroll",3,!1),g=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll"]);const p=QM({id:H.with(()=>i()),ref:H.with(()=>n(),A=>n(A)),onInteractOutside:H.with(()=>c()),onEscapeKeydown:H.with(()=>a()),onCloseAutoFocus:H.with(()=>l())}),v=E(()=>ee(g,p.props));var b=K(),w=N(b);{var S=A=>{Ew(A,Ft(()=>d(v),()=>p.popperProps,{get enabled(){return p.root.opts.open.current},get id(){return i()},get trapFocus(){return f()},get preventScroll(){return h()},loop:!0,forceMount:!0,popper:(D,R)=>{let L=()=>R==null?void 0:R().props,F=()=>R==null?void 0:R().wrapperProps;const M=E(()=>ee(L(),{style:d0("popover")}));var U=K(),q=N(U);{var tt=z=>{var it=K(),X=N(it);{let j=E(()=>({props:d(M),wrapperProps:F(),...p.snippetProps}));ut(X,()=>t.child,()=>d(j))}_(z,it)},nt=z=>{var it=JM();Yt(it,()=>({...F()}));var X=G(it);Yt(X,()=>({...d(M)}));var j=G(X);ut(j,()=>t.children??Ct),W(X),W(it),_(z,it)};dt(q,z=>{t.child?z(tt):z(nt,!1)})}_(D,U)},$$slots:{popper:!0}}))},x=A=>{var T=K(),D=N(T);{var R=L=>{Tw(L,Ft(()=>d(v),()=>p.popperProps,{get present(){return p.root.opts.open.current},get id(){return i()},get trapFocus(){return f()},get preventScroll(){return h()},loop:!0,forceMount:!1,popper:(M,U)=>{let q=()=>U==null?void 0:U().props,tt=()=>U==null?void 0:U().wrapperProps;const nt=E(()=>ee(q(),{style:d0("popover")}));var z=K(),it=N(z);{var X=J=>{var rt=K(),ht=N(rt);{let pt=E(()=>({props:d(nt),wrapperProps:tt(),...p.snippetProps}));ut(ht,()=>t.child,()=>d(pt))}_(J,rt)},j=J=>{var rt=$M();Yt(rt,()=>({...tt()}));var ht=G(rt);Yt(ht,()=>({...d(nt)}));var pt=G(ht);ut(pt,()=>t.children??Ct),W(ht),W(rt),_(J,rt)};dt(it,J=>{t.child?J(X):J(j,!1)})}_(M,z)},$$slots:{popper:!0}}))};dt(D,L=>{s()||L(R)},!0)}_(A,T)};dt(w,A=>{s()?A(S):A(x,!1)})}_(e,b),at()}var e5=Z("<button><!></button>");function n5(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"type",3,"button"),l=P(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled"]);const c=ZM({id:H.with(()=>n()),ref:H.with(()=>i(),v=>i(v)),disabled:H.with(()=>!!l())}),f=E(()=>ee(a,c.props,{type:s()})),h=Vi(),[g,p]=h;Pw(e,{get id(){return n()},children:(v,b)=>{var w=K(),S=N(w);{var x=T=>{var D=K(),R=N(D);ut(R,()=>t.child,()=>({props:d(f)})),_(T,D)},A=T=>{var D=e5();Yt(D,L=>({...L}),[()=>p({...d(f)},[{attribute_name:"formaction"}])]);var R=G(D);ut(R,()=>t.children??Ct),W(D),_(T,D)};dt(S,T=>{t.child?T(x):T(A,!1)})}_(v,w)},$$slots:{default:!0}}),at()}function r5(e,t){st(t,!0);let n=P(t,"open",15,!1),i=P(t,"onOpenChange",3,Ce);l3({variant:H.with(()=>"dialog"),open:H.with(()=>n(),a=>{n(a),i()(a)})});var s=K(),l=N(s);ut(l,()=>t.children??Ct),_(e,s),at()}var i5=Z("<button><!></button>");function o5(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"disabled",3,!1),l=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const a=h3({variant:H.with(()=>"close"),id:H.with(()=>n()),ref:H.with(()=>i(),S=>i(S)),disabled:H.with(()=>!!s())}),c=E(()=>ee(l,a.props)),f=Vi(),[h,g]=f;var p=K(),v=N(p);{var b=S=>{var x=K(),A=N(x);ut(A,()=>t.child,()=>({props:d(c)})),_(S,x)},w=S=>{var x=i5();Yt(x,T=>({...T}),[()=>g({...d(c)},[{attribute_name:"formaction"}])]);var A=G(x);ut(A,()=>t.children??Ct),W(x),_(S,x)};dt(v,S=>{t.child?S(b):S(w,!1)})}_(e,p),at()}var s5=Z("<!> <!>",1),a5=Z("<!> <div><!></div>",1);function l5(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"forceMount",3,!1),l=P(t,"onCloseAutoFocus",3,Ce),a=P(t,"onOpenAutoFocus",3,Ce),c=P(t,"onEscapeKeydown",3,Ce),f=P(t,"onInteractOutside",3,Ce),h=P(t,"trapFocus",3,!0),g=P(t,"preventScroll",3,!0),p=P(t,"restoreScrollDelay",3,null),v=xt(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const b=u3({id:H.with(()=>n()),ref:H.with(()=>i(),S=>i(S))}),w=E(()=>ee(v,b.props));{const S=A=>{{const T=(R,L)=>{let F=()=>L==null?void 0:L().props;nw(R,Ft(()=>d(w),{get enabled(){return b.root.opts.open.current},onEscapeKeydown:M=>{c()(M),!M.defaultPrevented&&b.root.handleClose()},children:(M,U)=>{ew(M,Ft(()=>d(w),{get enabled(){return b.root.opts.open.current},onInteractOutside:q=>{f()(q),!q.defaultPrevented&&b.root.handleClose()},children:(q,tt)=>{lw(q,Ft(()=>d(w),{get enabled(){return b.root.opts.open.current},children:(nt,z)=>{var it=K(),X=N(it);{var j=rt=>{var ht=s5(),pt=N(ht);{var wt=yt=>{Sf(yt,{get preventScroll(){return g()},get restoreScrollDelay(){return p()}})};dt(pt,yt=>{b.root.opts.open.current&&yt(wt)})}var lt=et(pt,2);{let yt=E(()=>({props:ee(d(w),F()),...b.snippetProps}));ut(lt,()=>t.child,()=>d(yt))}_(rt,ht)},J=rt=>{var ht=a5(),pt=N(ht);Sf(pt,{get preventScroll(){return g()}});var wt=et(pt,2);Yt(wt,yt=>({...yt}),[()=>ee(d(w),F())]);var lt=G(wt);ut(lt,()=>t.children??Ct),W(wt),_(rt,ht)};dt(X,rt=>{t.child?rt(j):rt(J,!1)})}_(nt,it)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))};let D=E(()=>lO({forceMount:s(),present:b.root.opts.open.current,trapFocus:h(),open:b.root.opts.open.current}));sw(A,{loop:!0,get trapFocus(){return d(D)},get onOpenAutoFocus(){return a()},get id(){return n()},onCloseAutoFocus:R=>{var L;l()(R),!R.defaultPrevented&&((L=b.root.triggerNode)==null||L.focus())},focusScope:T,$$slots:{focusScope:!0}})}};let x=E(()=>b.root.opts.open.current||s());_h(e,Ft(()=>d(w),{get forceMount(){return s()},get present(){return d(x)},presence:S,$$slots:{presence:!0}}))}at()}const c5="data-label-root";var gu;class u5{constructor(t){ot(this,"opts");V(this,gu,E(()=>({id:this.opts.id.current,[c5]:"",onmousedown:this.onmousedown})));this.opts=t,this.onmousedown=this.onmousedown.bind(this),ue(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return d(y(this,gu))}set props(t){O(y(this,gu),t)}}gu=new WeakMap;function d5(e){return new u5(e)}var f5=Z("<label><!></label>");function h5(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const l=d5({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props,{for:t.for}));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=f5();Yt(v,()=>({...d(a),for:t.for}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}function g5(e,t){st(t,!0);let n=P(t,"open",15,!1),i=P(t,"onOpenChange",3,Ce);jM({open:H.with(()=>n(),s=>{n(s),i()(s)})}),yw(e,{children:(s,l)=>{var a=K(),c=N(a);ut(c,()=>t.children??Ct),_(s,a)},$$slots:{default:!0}}),at()}var p5=Z("<!> <!>",1);function v5(e,t){st(t,!0);let n=P(t,"value",15),i=P(t,"onValueChange",3,Ce),s=P(t,"name",3,""),l=P(t,"disabled",3,!1),a=P(t,"open",15,!1),c=P(t,"onOpenChange",3,Ce),f=P(t,"loop",3,!1),h=P(t,"scrollAlignment",3,"nearest"),g=P(t,"required",3,!1),p=P(t,"items",19,()=>[]),v=P(t,"allowDeselect",3,!1);function b(){n()===void 0&&n(t.type==="single"?"":[])}b(),Se.pre(()=>n(),()=>{b()});const w=cN({type:t.type,value:H.with(()=>n(),R=>{n(R),i()(R)}),disabled:H.with(()=>l()),required:H.with(()=>g()),open:H.with(()=>a(),R=>{a(R),c()(R)}),loop:H.with(()=>f()),scrollAlignment:H.with(()=>h()),name:H.with(()=>s()),isCombobox:!1,items:H.with(()=>p()),allowDeselect:H.with(()=>v())});var S=p5(),x=N(S);yw(x,{children:(R,L)=>{var F=K(),M=N(F);ut(M,()=>t.children??Ct),_(R,F)},$$slots:{default:!0}});var A=et(x,2);{var T=R=>{var L=K(),F=N(L);{var M=U=>{var q=K(),tt=N(q);Qn(tt,17,()=>w.opts.value.current,Rs,(nt,z)=>{f0(nt,{get value(){return d(z)}})}),_(U,q)};dt(F,U=>{w.opts.value.current.length&&U(M)})}_(R,L)},D=R=>{f0(R,{get value(){return w.opts.value.current},set value(L){w.opts.value.current=L}})};dt(A,R=>{Array.isArray(w.opts.value.current)?R(T):R(D,!1)})}_(e,S),at()}var m5=Z("<button><!></button>");function b5(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"type",3,"button"),l=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=dN({id:H.with(()=>n()),ref:H.with(()=>i(),b=>i(b))}),c=E(()=>ee(l,a.props,{type:s()})),f=Vi(),[h,g]=f;var p=K(),v=N(p);_t(v,()=>Pw,(b,w)=>{w(b,{get id(){return n()},children:(S,x)=>{var A=K(),T=N(A);{var D=L=>{var F=K(),M=N(F);ut(M,()=>t.child,()=>({props:d(c)})),_(L,F)},R=L=>{var F=m5();Yt(F,U=>({...U}),[()=>g({...d(c)},[{attribute_name:"formaction"}])]);var M=G(F);ut(M,()=>t.children??Ct),W(F),_(L,F)};dt(T,L=>{t.child?L(D):L(R,!1)})}_(S,A)},$$slots:{default:!0}})}),_(e,p),at()}function _5(e,t,n){const i={position:"absolute"};return e==="lr"?(i.left=`${t}%`,i.right=`${n}%`):e==="rl"?(i.right=`${t}%`,i.left=`${n}%`):e==="bt"?(i.bottom=`${t}%`,i.top=`${n}%`):(i.top=`${t}%`,i.bottom=`${n}%`),i}function Uw(e,t){const n={position:"absolute"};return e==="lr"?(n.left=`${t}%`,n.translate="-50% 0"):e==="rl"?(n.right=`${t}%`,n.translate="50% 0"):e==="bt"?(n.bottom=`${t}%`,n.translate="0 50%"):(n.top=`${t}%`,n.translate="0 -50%"),n}function Gw(e,t,n){const i={position:"absolute"};return e==="lr"?(i.left=`${t}%`,i.translate=`${n}% 0`):e==="rl"?(i.right=`${t}%`,i.translate=`${-n}% 0`):e==="bt"?(i.bottom=`${t}%`,i.translate=`0 ${-n}%`):(i.top=`${t}%`,i.translate=`0 ${n}%`),i}function ds(e,t,n,i){const s=(e-(Number.isNaN(t)?0:t))%i;let l=Math.abs(s)*2>=i?e+Math.sign(s)*(i-Math.abs(s)):e-s;Number.isNaN(t)?!Number.isNaN(n)&&l>n&&(l=Math.floor(n/i)*i):l<t?l=t:!Number.isNaN(n)&&l>n&&(l=t+Math.floor((n-t)/i)*i);const a=i.toString(),c=a.indexOf("."),f=c>=0?a.length-c:0;if(f>0){const h=10**f;l=Math.round(l*h)/h}return l}function Lv(e,t,n=!0){const[i,s]=e,[l,a]=t,c=(a-l)/(s-i);return f=>{const h=l+c*(f-i);return n?h>Math.max(l,a)?Math.max(l,a):h<Math.min(l,a)?Math.min(l,a):h:h}}const y5="data-slider-root",kf="data-slider-thumb",w5="data-slider-range",Kw="data-slider-tick";var pu,vu,oh,mu;class qw{constructor(t){ot(this,"opts");V(this,pu,ft(!1));V(this,vu,E(()=>this.opts.orientation.current==="horizontal"?this.opts.dir.current==="rtl"?"rl":"lr":this.opts.dir.current==="rtl"?"tb":"bt"));V(this,oh,E(()=>{if(!this.opts.disabled.current)return this.opts.orientation.current==="horizontal"?"pan-y":"pan-x"}));ot(this,"getAllThumbs",()=>{const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(`[${kf}]`)):[]});ot(this,"getThumbScale",()=>{var f,h;if(this.opts.thumbPositioning.current==="exact")return[0,100];const t=this.opts.orientation.current==="vertical",n=this.getAllThumbs()[0],i=t?n==null?void 0:n.offsetHeight:n==null?void 0:n.offsetWidth;if(i===void 0||Number.isNaN(i)||i===0)return[0,100];const s=t?(f=this.opts.ref.current)==null?void 0:f.offsetHeight:(h=this.opts.ref.current)==null?void 0:h.offsetWidth;if(s===void 0||Number.isNaN(s)||s===0)return[0,100];const l=i/2/s*100,a=l,c=100-l;return[a,c]});ot(this,"getPositionFromValue",t=>{const n=this.getThumbScale();return Lv([this.opts.min.current,this.opts.max.current],n)(t)});V(this,mu,E(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,"data-disabled":lr(this.opts.disabled.current),style:{touchAction:d(y(this,oh))},[y5]:""})));this.opts=t,ue(t)}get isActive(){return d(y(this,pu))}set isActive(t){O(y(this,pu),t,!0)}get direction(){return d(y(this,vu))}set direction(t){O(y(this,vu),t)}isThumbActive(t){return this.isActive}get props(){return d(y(this,mu))}set props(t){O(y(this,mu),t)}}pu=new WeakMap,vu=new WeakMap,oh=new WeakMap,mu=new WeakMap;var bu,_u,yu,wu,xu;class x5 extends qw{constructor(n){super(n);ot(this,"opts");ot(this,"isMulti",!1);ot(this,"updateValue",n=>{this.opts.value.current=ds(n,this.opts.min.current,this.opts.max.current,this.opts.step.current)});ot(this,"handlePointerMove",n=>{if(!this.isActive||this.opts.disabled.current)return;n.preventDefault(),n.stopPropagation();const i=this.opts.ref.current,s=this.getAllThumbs()[0];if(!i||!s)return;s.focus();const{left:l,right:a,top:c,bottom:f}=i.getBoundingClientRect();this.direction==="lr"?this.applyPosition({clientXY:n.clientX,start:l,end:a}):this.direction==="rl"?this.applyPosition({clientXY:n.clientX,start:a,end:l}):this.direction==="bt"?this.applyPosition({clientXY:n.clientY,start:f,end:c}):this.direction==="tb"&&this.applyPosition({clientXY:n.clientY,start:c,end:f})});ot(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=this.getAllThumbs()[0];if(!s||!i)return;const l=n.target;!jy(l)||!i.contains(l)||(n.preventDefault(),s.focus(),this.isActive=!0,this.handlePointerMove(n))});ot(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(Hr(()=>this.opts.value.current)),this.isActive=!1)});V(this,bu,E(()=>{const n=this.opts.value.current;return Array.from({length:1},()=>{const i=n,s=this.getPositionFromValue(i),l=Uw(this.direction,s);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":i,"aria-disabled":_v(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":i,tabindex:this.opts.disabled.current?-1:0,style:l,[kf]:""}})}));V(this,_u,E(()=>this.thumbsPropsArr.map((n,i)=>i)));V(this,yu,E(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,l=n-i;let a=Math.ceil(l/s);l%s==0&&a++;const c=this.opts.value.current;return Array.from({length:a},(f,h)=>{const g=h*s,p=Lv([0,(a-1)*s],this.getThumbScale()),v=h===0,b=h===a-1,w=v?0:b?-100:-50,S=Gw(this.direction,p(g),w),x=i+h*s,A=x<=c;return{"data-disabled":lr(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":A?"":void 0,"data-value":x,style:S,[Kw]:""}})}));V(this,wu,E(()=>this.ticksPropsArr.map((n,i)=>i)));V(this,xu,E(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,bv(()=>Ni(nn(document,"pointerdown",this.handlePointerDown),nn(document,"pointerup",this.handlePointerUp),nn(document,"pointermove",this.handlePointerMove),nn(document,"pointerleave",this.handlePointerUp))),Se([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,l,a])=>{const c=h=>ds(h,s,l,i)===h,f=h=>ds(h,s,l,i);c(a)||(this.opts.value.current=f(a))})}applyPosition({clientXY:n,start:i,end:s}){const l=this.opts.min.current,a=this.opts.max.current,f=(n-i)/(s-i)*(a-l)+l;if(f<l)this.updateValue(l);else if(f>a)this.updateValue(a);else{const h=this.opts.step.current,g=Math.floor((f-l)/h),p=l+g*h+h/2,v=l+(g+1)*h+h/2,b=f>=p&&f<v?(g+1)*h+l:g*h+l;b<=a&&this.updateValue(b)}}get thumbsPropsArr(){return d(y(this,bu))}set thumbsPropsArr(n){O(y(this,bu),n)}get thumbsRenderArr(){return d(y(this,_u))}set thumbsRenderArr(n){O(y(this,_u),n)}get ticksPropsArr(){return d(y(this,yu))}set ticksPropsArr(n){O(y(this,yu),n)}get ticksRenderArr(){return d(y(this,wu))}set ticksRenderArr(n){O(y(this,wu),n)}get snippetProps(){return d(y(this,xu))}set snippetProps(n){O(y(this,xu),n)}}bu=new WeakMap,_u=new WeakMap,yu=new WeakMap,wu=new WeakMap,xu=new WeakMap;var Su,Cu,sh,Au,Pu,ku,Tu,Eu;class S5 extends qw{constructor(n){super(n);ot(this,"opts");ot(this,"isMulti",!0);V(this,Su,ft(null));V(this,Cu,ft(0));V(this,sh,n=>{const i=this.getAllThumbs();if(!i.length)return;for(const c of i)c.blur();const s=i.map(c=>{if(this.opts.orientation.current==="horizontal"){const{left:f,right:h}=c.getBoundingClientRect();return Math.abs(n.clientX-(f+h)/2)}else{const{top:f,bottom:h}=c.getBoundingClientRect();return Math.abs(n.clientY-(f+h)/2)}}),l=i[s.indexOf(Math.min(...s))],a=i.indexOf(l);return{node:l,idx:a}});ot(this,"handlePointerMove",n=>{if(!this.isActive||this.opts.disabled.current)return;n.preventDefault(),n.stopPropagation();const i=this.opts.ref.current,s=this.activeThumb;if(!i||!s)return;s.node.focus();const{left:l,right:a,top:c,bottom:f}=i.getBoundingClientRect(),h=this.direction;h==="lr"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:l,end:a}):h==="rl"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:a,end:l}):h==="bt"?this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:f,end:c}):h==="tb"&&this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:c,end:f})});ot(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=y(this,sh).call(this,n);if(!s||!i)return;const l=n.target;!jy(l)||!i.contains(l)||(n.preventDefault(),this.activeThumb=s,s.node.focus(),this.isActive=!0,this.handlePointerMove(n))});ot(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(Hr(()=>this.opts.value.current)),this.isActive=!1)});ot(this,"getAllThumbs",()=>{const n=this.opts.ref.current;return n?Array.from(n.querySelectorAll(`[${kf}]`)):[]});ot(this,"updateValue",(n,i)=>{const s=this.opts.value.current;if(!s.length){this.opts.value.current.push(n);return}if(s[i]===n)return;const a=[...s];if(!hO(i,a))return;const c=a[i]>n?-1:1,f=()=>{var w;const v=i+c;a[i]=a[v],a[v]=n;const b=this.getAllThumbs();b.length&&((w=b[v])==null||w.focus(),this.activeThumb={node:b[v],idx:v})};if(this.opts.autoSort.current&&(c===-1&&n<a[i-1]||c===1&&n>a[i+1])){f(),this.opts.value.current=a;return}const h=this.opts.min.current,g=this.opts.max.current,p=this.opts.step.current;a[i]=ds(n,h,g,p),this.opts.value.current=a});V(this,Au,E(()=>{const n=this.opts.value.current;return Array.from({length:n.length||1},(i,s)=>{const l=Hr(()=>this.currentThumbIdx);l<n.length&&Hr(()=>{this.currentThumbIdx=l+1});const a=n[s],c=this.getPositionFromValue(a??0),f=Uw(this.direction,c);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":a,"aria-disabled":_v(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":a,tabindex:this.opts.disabled.current?-1:0,style:f,[kf]:""}})}));V(this,Pu,E(()=>this.thumbsPropsArr.map((n,i)=>i)));V(this,ku,E(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,l=n-i;let a=Math.ceil(l/s);l%s==0&&a++;const c=this.opts.value.current;return Array.from({length:a},(f,h)=>{const g=h*s,p=Lv([0,(a-1)*s],this.getThumbScale()),v=h===0,b=h===a-1,w=v?0:b?-100:-50,S=Gw(this.direction,p(g),w),x=i+h*s,A=c.length===1?x<=c[0]:c[0]<=x&&x<=c[c.length-1];return{"data-disabled":lr(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":A?"":void 0,"data-value":x,style:S,[Kw]:""}})}));V(this,Tu,E(()=>this.ticksPropsArr.map((n,i)=>i)));V(this,Eu,E(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,bv(()=>Ni(nn(document,"pointerdown",this.handlePointerDown),nn(document,"pointerup",this.handlePointerUp),nn(document,"pointermove",this.handlePointerMove),nn(document,"pointerleave",this.handlePointerUp))),Se([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,l,a])=>{const c=h=>ds(h,s,l,i)===h,f=h=>ds(h,s,l,i);a.some(h=>!c(h))&&(this.opts.value.current=a.map(f))})}get activeThumb(){return d(y(this,Su))}set activeThumb(n){O(y(this,Su),n,!0)}get currentThumbIdx(){return d(y(this,Cu))}set currentThumbIdx(n){O(y(this,Cu),n,!0)}isThumbActive(n){var i;return this.isActive&&((i=this.activeThumb)==null?void 0:i.idx)===n}applyPosition({clientXY:n,activeThumbIdx:i,start:s,end:l}){const a=this.opts.min.current,c=this.opts.max.current,h=(n-s)/(l-s)*(c-a)+a;if(h<a)this.updateValue(a,i);else if(h>c)this.updateValue(c,i);else{const g=this.opts.step.current,p=Math.floor((h-a)/g),v=a+p*g+g/2,b=a+(p+1)*g+g/2,w=h>=v&&h<b?(p+1)*g+a:p*g+a;w<=c&&this.updateValue(w,i)}}get thumbsPropsArr(){return d(y(this,Au))}set thumbsPropsArr(n){O(y(this,Au),n)}get thumbsRenderArr(){return d(y(this,Pu))}set thumbsRenderArr(n){O(y(this,Pu),n)}get ticksPropsArr(){return d(y(this,ku))}set ticksPropsArr(n){O(y(this,ku),n)}get ticksRenderArr(){return d(y(this,Tu))}set ticksRenderArr(n){O(y(this,Tu),n)}get snippetProps(){return d(y(this,Eu))}set snippetProps(n){O(y(this,Eu),n)}}Su=new WeakMap,Cu=new WeakMap,sh=new WeakMap,Au=new WeakMap,Pu=new WeakMap,ku=new WeakMap,Tu=new WeakMap,Eu=new WeakMap;const C5=[Zu,Qu,Ir,zr,Ws,Hs];var Iu,Ou;class A5{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Iu,E(()=>{const t=Array.isArray(this.root.opts.value.current)&&this.root.opts.value.current.length>1?this.root.getPositionFromValue(Math.min(...this.root.opts.value.current)??0):0,n=Array.isArray(this.root.opts.value.current)?100-this.root.getPositionFromValue(Math.max(...this.root.opts.value.current)??0):100-this.root.getPositionFromValue(this.root.opts.value.current);return{position:"absolute",..._5(this.root.direction,t,n)}}));V(this,Ou,E(()=>({id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":lr(this.root.opts.disabled.current),style:this.rangeStyles,[w5]:""})));this.opts=t,this.root=n,ue(t)}get rangeStyles(){return d(y(this,Iu))}set rangeStyles(t){O(y(this,Iu),t)}get props(){return d(y(this,Ou))}set props(t){O(y(this,Ou),t)}}Iu=new WeakMap,Ou=new WeakMap;var ah,Ln,Zn,Ru;class P5{constructor(t,n){V(this,Ln);ot(this,"opts");ot(this,"root");V(this,ah,E(()=>this.root.opts.disabled.current||this.opts.disabled.current));V(this,Ru,E(()=>({...this.root.thumbsPropsArr[this.opts.index.current],id:this.opts.id.current,onkeydown:this.onkeydown,"data-active":this.root.isThumbActive(this.opts.index.current)?"":void 0})));this.opts=t,this.root=n,ue(t),this.onkeydown=this.onkeydown.bind(this)}onkeydown(t){if(d(y(this,ah)))return;const n=this.opts.ref.current;if(!n)return;const i=this.root.getAllThumbs();if(!i.length)return;const s=i.indexOf(n);if(this.root.isMulti&&(this.root.currentThumbIdx=s),!C5.includes(t.key))return;t.preventDefault();const l=this.root.opts.min.current,a=this.root.opts.max.current,c=this.root.opts.value.current,f=Array.isArray(c)?c[s]:c,h=this.root.opts.orientation.current,g=this.root.direction,p=this.root.opts.step.current;switch(t.key){case Ws:Et(this,Ln,Zn).call(this,l);break;case Hs:Et(this,Ln,Zn).call(this,a);break;case Zu:if(h!=="horizontal")break;if(t.metaKey){const v=g==="rl"?a:l;Et(this,Ln,Zn).call(this,v)}else g==="rl"&&f<a?Et(this,Ln,Zn).call(this,f+p):g==="lr"&&f>l&&Et(this,Ln,Zn).call(this,f-p);break;case Qu:if(h!=="horizontal")break;if(t.metaKey){const v=g==="rl"?l:a;Et(this,Ln,Zn).call(this,v)}else g==="rl"&&f>l?Et(this,Ln,Zn).call(this,f-p):g==="lr"&&f<a&&Et(this,Ln,Zn).call(this,f+p);break;case Ir:if(t.metaKey){const v=g==="tb"?l:a;Et(this,Ln,Zn).call(this,v)}else g==="tb"&&f>l?Et(this,Ln,Zn).call(this,f-p):g!=="tb"&&f<a&&Et(this,Ln,Zn).call(this,f+p);break;case zr:if(t.metaKey){const v=g==="tb"?a:l;Et(this,Ln,Zn).call(this,v)}else g==="tb"&&f<a?Et(this,Ln,Zn).call(this,f+p):g!=="tb"&&f>l&&Et(this,Ln,Zn).call(this,f-p);break}this.root.opts.onValueCommit.current(this.root.opts.value.current)}get props(){return d(y(this,Ru))}set props(t){O(y(this,Ru),t)}}ah=new WeakMap,Ln=new WeakSet,Zn=function(t){this.root.isMulti?this.root.updateValue(t,this.opts.index.current):this.root.updateValue(t)},Ru=new WeakMap;const Fv=new Fn("Slider.Root");function k5(e){const{type:t,...n}=e,i=t==="single"?new x5(n):new S5(n);return Fv.set(i)}function T5(e){return new A5(e,Fv.get())}function E5(e){return new P5(e,Fv.get())}var I5=Z("<span><!></span>");function O5(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"value",15),l=P(t,"onValueChange",3,Ce),a=P(t,"onValueCommit",3,Ce),c=P(t,"disabled",3,!1),f=P(t,"min",3,0),h=P(t,"max",3,100),g=P(t,"step",3,1),p=P(t,"dir",3,"ltr"),v=P(t,"autoSort",3,!0),b=P(t,"orientation",3,"horizontal"),w=P(t,"thumbPositioning",3,"contain"),S=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","value","type","onValueChange","onValueCommit","disabled","min","max","step","dir","autoSort","orientation","thumbPositioning"]);function x(){s()===void 0&&s(t.type==="single"?0:[])}x(),Se.pre(()=>s(),()=>{x()});const A=k5({id:H.with(()=>n()),ref:H.with(()=>i(),M=>i(M)),value:H.with(()=>s(),M=>{s(M),l()(M)}),onValueCommit:H.with(()=>a()),disabled:H.with(()=>c()),min:H.with(()=>f()),max:H.with(()=>h()),step:H.with(()=>g()),dir:H.with(()=>p()),autoSort:H.with(()=>v()),orientation:H.with(()=>b()),thumbPositioning:H.with(()=>w()),type:t.type}),T=E(()=>ee(S,A.props));var D=K(),R=N(D);{var L=M=>{var U=K(),q=N(U);{let tt=E(()=>({props:d(T),...A.snippetProps}));ut(q,()=>t.child,()=>d(tt))}_(M,U)},F=M=>{var U=I5();Yt(U,()=>({...d(T)}));var q=G(U);ut(q,()=>t.children??Ct,()=>A.snippetProps),W(U),_(M,U)};dt(R,M=>{t.child?M(L):M(F,!1)})}_(e,D),at()}var R5=Z("<span><!></span>");function N5(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"id",19,de),s=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const l=T5({id:H.with(()=>i()),ref:H.with(()=>n(),p=>n(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=R5();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var M5=Z("<span><!></span>");function D5(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"id",19,de),s=P(t,"disabled",3,!1),l=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id","index","disabled"]);const a=E5({id:H.with(()=>i()),ref:H.with(()=>n(),v=>n(v)),index:H.with(()=>t.index),disabled:H.with(()=>s())}),c=E(()=>ee(l,a.props));var f=K(),h=N(f);{var g=v=>{var b=K(),w=N(b);{let S=E(()=>({active:a.root.isThumbActive(a.opts.index.current),props:d(c)}));ut(w,()=>t.child,()=>d(S))}_(v,b)},p=v=>{var b=M5();Yt(b,()=>({...d(c)}));var w=G(b);{let S=E(()=>({active:a.root.isThumbActive(a.opts.index.current)}));ut(w,()=>t.children??Ct,()=>d(S))}W(b),_(v,b)};dt(h,v=>{t.child?v(g):v(p,!1)})}_(e,f),at()}const L5="data-switch-root",F5="data-switch-thumb";var Nu,qp,Mu,Du,Lu;class B5{constructor(t){V(this,Nu);ot(this,"opts");V(this,Mu,E(()=>({"data-disabled":lr(this.opts.disabled.current),"data-state":NI(this.opts.checked.current),"data-required":DI(this.opts.required.current)})));V(this,Du,E(()=>({checked:this.opts.checked.current})));V(this,Lu,E(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:yv(this.opts.disabled.current),"aria-checked":Ky(this.opts.checked.current,!1),"aria-required":Uy(this.opts.required.current),[L5]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,ue(t),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){!(t.key===Li||t.key===Mi)||this.opts.disabled.current||(t.preventDefault(),Et(this,Nu,qp).call(this))}onclick(t){this.opts.disabled.current||Et(this,Nu,qp).call(this)}get sharedProps(){return d(y(this,Mu))}set sharedProps(t){O(y(this,Mu),t)}get snippetProps(){return d(y(this,Du))}set snippetProps(t){O(y(this,Du),t)}get props(){return d(y(this,Lu))}set props(t){O(y(this,Lu),t)}}Nu=new WeakSet,qp=function(){this.opts.checked.current=!this.opts.checked.current},Mu=new WeakMap,Du=new WeakMap,Lu=new WeakMap;var Fu,Bu;class z5{constructor(t){ot(this,"root");V(this,Fu,E(()=>this.root.opts.name.current!==void 0));V(this,Bu,E(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current})));this.root=t}get shouldRender(){return d(y(this,Fu))}set shouldRender(t){O(y(this,Fu),t)}get props(){return d(y(this,Bu))}set props(t){O(y(this,Bu),t)}}Fu=new WeakMap,Bu=new WeakMap;var zu,Vu;class V5{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,zu,E(()=>({checked:this.root.opts.checked.current})));V(this,Vu,E(()=>({...this.root.sharedProps,id:this.opts.id.current,[F5]:""})));this.opts=t,this.root=n,ue(t)}get snippetProps(){return d(y(this,zu))}set snippetProps(t){O(y(this,zu),t)}get props(){return d(y(this,Vu))}set props(t){O(y(this,Vu),t)}}zu=new WeakMap,Vu=new WeakMap;const Bv=new Fn("Switch.Root");function H5(e){return Bv.set(new B5(e))}function W5(){return new z5(Bv.get())}function U5(e){return new V5(e,Bv.get())}function G5(e,t){st(t,!1);const n=W5();by();var i=K(),s=N(i);{var l=a=>{Sv(a,Ft(()=>n.props))};dt(s,a=>{n.shouldRender&&a(l)})}_(e,i),at()}var K5=Z("<button><!></button>"),q5=Z("<!> <!>",1);function Y5(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"id",19,de),s=P(t,"disabled",3,!1),l=P(t,"required",3,!1),a=P(t,"checked",15,!1),c=P(t,"value",3,"on"),f=P(t,"name",3,void 0),h=P(t,"type",3,"button"),g=P(t,"onCheckedChange",3,Ce),p=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const v=H5({checked:H.with(()=>a(),F=>{var M;a(F),(M=g())==null||M(F)}),disabled:H.with(()=>s()??!1),required:H.with(()=>l()),value:H.with(()=>c()),name:H.with(()=>f()),id:H.with(()=>i()),ref:H.with(()=>n(),F=>n(F))}),b=E(()=>ee(p,v.props,{type:h()})),w=Vi(),[S,x]=w;var A=q5(),T=N(A);{var D=F=>{var M=K(),U=N(M);{let q=E(()=>({props:d(b),...v.snippetProps}));ut(U,()=>t.child,()=>d(q))}_(F,M)},R=F=>{var M=K5();Yt(M,q=>({...q}),[()=>x({...d(b)},[{attribute_name:"formaction"}])]);var U=G(M);ut(U,()=>t.children??Ct,()=>v.snippetProps),W(M),_(F,M)};dt(T,F=>{t.child?F(D):F(R,!1)})}var L=et(T,2);G5(L,{}),_(e,A),at()}var X5=Z("<span><!></span>");function j5(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"id",19,de),s=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const l=U5({id:H.with(()=>i()),ref:H.with(()=>n(),p=>n(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);{let w=E(()=>({props:d(a),...l.snippetProps}));ut(b,()=>t.child,()=>d(w))}_(p,v)},g=p=>{var v=X5();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct,()=>l.snippetProps),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}const Z5="data-tabs-root",Q5="data-tabs-list",Yw="data-tabs-trigger",J5="data-tabs-content";var Hu,Wu;class $5{constructor(t){ot(this,"opts");ot(this,"rovingFocusGroup");V(this,Hu,ft(On([])));ot(this,"valueToTriggerId",new Na);ot(this,"valueToContentId",new Na);V(this,Wu,E(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[Z5]:""})));this.opts=t,ue(t),this.rovingFocusGroup=JI({candidateAttr:Yw,rootNodeId:this.opts.id,loop:this.opts.loop,orientation:this.opts.orientation})}get triggerIds(){return d(y(this,Hu))}set triggerIds(t){O(y(this,Hu),t,!0)}registerTrigger(t,n){return this.triggerIds.push(t),this.valueToTriggerId.set(n,t),()=>{this.triggerIds=this.triggerIds.filter(i=>i!==t),this.valueToTriggerId.delete(n)}}registerContent(t,n){return this.valueToContentId.set(n,t),()=>{this.valueToContentId.delete(n)}}setValue(t){this.opts.value.current=t}get props(){return d(y(this,Wu))}set props(t){O(y(this,Wu),t)}}Hu=new WeakMap,Wu=new WeakMap;var lh,Uu;class t4{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,lh,E(()=>this.root.opts.disabled.current));V(this,Uu,E(()=>({id:this.opts.id.current,role:"tablist","aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[Q5]:"","data-disabled":lr(d(y(this,lh)))})));this.opts=t,this.root=n,ue(t)}get props(){return d(y(this,Uu))}set props(t){O(y(this,Uu),t)}}lh=new WeakMap,Uu=new WeakMap;var Es,fo,Is,ch,Os,pf,Gu;class e4{constructor(t,n){V(this,Os);ot(this,"opts");ot(this,"root");V(this,Es,E(()=>this.root.opts.value.current===this.opts.value.current));V(this,fo,E(()=>this.opts.disabled.current||this.root.opts.disabled.current));V(this,Is,ft(0));V(this,ch,E(()=>this.root.valueToContentId.get(this.opts.value.current)));V(this,Gu,E(()=>({id:this.opts.id.current,role:"tab","data-state":Xw(d(y(this,Es))),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":lr(d(y(this,fo))),"aria-selected":Gy(d(y(this,Es))),"aria-controls":d(y(this,ch)),[Yw]:"",disabled:yv(d(y(this,fo))),tabindex:d(y(this,Is)),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown})));this.opts=t,this.root=n,ue(t),Se([()=>this.opts.id.current,()=>this.opts.value.current],([i,s])=>this.root.registerTrigger(i,s)),se(()=>{this.root.triggerIds.length,d(y(this,Es))||!this.root.opts.value.current?O(y(this,Is),0):O(y(this,Is),-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onfocus(t){this.root.opts.activationMode.current!=="automatic"||d(y(this,fo))||Et(this,Os,pf).call(this)}onclick(t){d(y(this,fo))||Et(this,Os,pf).call(this)}onkeydown(t){if(!d(y(this,fo))){if(t.key===Mi||t.key===Li){t.preventDefault(),Et(this,Os,pf).call(this);return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,t)}}get props(){return d(y(this,Gu))}set props(t){O(y(this,Gu),t)}}Es=new WeakMap,fo=new WeakMap,Is=new WeakMap,ch=new WeakMap,Os=new WeakSet,pf=function(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)},Gu=new WeakMap;var Ku,uh,qu;class n4{constructor(t,n){ot(this,"opts");ot(this,"root");V(this,Ku,E(()=>this.root.opts.value.current===this.opts.value.current));V(this,uh,E(()=>this.root.valueToTriggerId.get(this.opts.value.current)));V(this,qu,E(()=>({id:this.opts.id.current,role:"tabpanel",hidden:FI(!d(y(this,Ku))),tabindex:0,"data-value":this.opts.value.current,"data-state":Xw(d(y(this,Ku))),"aria-labelledby":d(y(this,uh)),[J5]:""})));this.opts=t,this.root=n,ue(t),Se([()=>this.opts.id.current,()=>this.opts.value.current],([i,s])=>this.root.registerContent(i,s))}get props(){return d(y(this,qu))}set props(t){O(y(this,qu),t)}}Ku=new WeakMap,uh=new WeakMap,qu=new WeakMap;const Ah=new Fn("Tabs.Root");function r4(e){return Ah.set(new $5(e))}function i4(e){return new e4(e,Ah.get())}function o4(e){return new t4(e,Ah.get())}function s4(e){return new n4(e,Ah.get())}function Xw(e){return e?"active":"inactive"}var a4=Z("<div><!></div>");function l4(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=P(t,"value",15,""),l=P(t,"onValueChange",3,Ce),a=P(t,"orientation",3,"horizontal"),c=P(t,"loop",3,!0),f=P(t,"activationMode",3,"automatic"),h=P(t,"disabled",3,!1),g=xt(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","orientation","loop","activationMode","disabled","children","child"]);const p=r4({id:H.with(()=>n()),value:H.with(()=>s(),A=>{s(A),l()(A)}),orientation:H.with(()=>a()),loop:H.with(()=>c()),activationMode:H.with(()=>f()),disabled:H.with(()=>h()),ref:H.with(()=>i(),A=>i(A))}),v=E(()=>ee(g,p.props));var b=K(),w=N(b);{var S=A=>{var T=K(),D=N(T);ut(D,()=>t.child,()=>({props:d(v)})),_(A,T)},x=A=>{var T=a4();Yt(T,()=>({...d(v)}));var D=G(T);ut(D,()=>t.children??Ct),W(T),_(A,T)};dt(w,A=>{t.child?A(S):A(x,!1)})}_(e,b),at()}var c4=Z("<div><!></div>");function u4(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","value"]);const l=s4({value:H.with(()=>t.value),id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=c4();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var d4=Z("<div><!></div>");function f4(e,t){st(t,!0);let n=P(t,"id",19,de),i=P(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","child","children","id","ref"]);const l=o4({id:H.with(()=>n()),ref:H.with(()=>i(),p=>i(p))}),a=E(()=>ee(s,l.props));var c=K(),f=N(c);{var h=p=>{var v=K(),b=N(v);ut(b,()=>t.child,()=>({props:d(a)})),_(p,v)},g=p=>{var v=d4();Yt(v,()=>({...d(a)}));var b=G(v);ut(b,()=>t.children??Ct),W(v),_(p,v)};dt(f,p=>{t.child?p(h):p(g,!1)})}_(e,c),at()}var h4=Z("<button><!></button>");function g4(e,t){st(t,!0);let n=P(t,"disabled",3,!1),i=P(t,"id",19,de),s=P(t,"type",3,"button"),l=P(t,"ref",15,null),a=xt(t,["$$slots","$$events","$$legacy","child","children","disabled","id","type","value","ref"]);const c=i4({id:H.with(()=>i()),disabled:H.with(()=>n()??!1),value:H.with(()=>t.value),ref:H.with(()=>l(),x=>l(x))}),f=E(()=>ee(a,c.props,{type:s()})),h=Vi(),[g,p]=h;var v=K(),b=N(v);{var w=x=>{var A=K(),T=N(A);ut(T,()=>t.child,()=>({props:d(f)})),_(x,A)},S=x=>{var A=h4();Yt(A,D=>({...D}),[()=>p({...d(f)},[{attribute_name:"formaction"}])]);var T=G(A);ut(T,()=>t.children??Ct),W(A),_(x,A)};dt(b,x=>{t.child?x(w):x(S,!1)})}_(e,v),at()}const zv="-",p4=e=>{const t=m4(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const c=a.split(zv);return c[0]===""&&c.length!==1&&c.shift(),jw(c,t)||v4(a)},getConflictingClassGroupIds:(a,c)=>{const f=n[a]||[];return c&&i[a]?[...f,...i[a]]:f}}},jw=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?jw(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const l=e.join(zv);return(a=t.validators.find(({validator:c})=>c(l)))==null?void 0:a.classGroupId},v0=/^\[(.+)\]$/,v4=e=>{if(v0.test(e)){const t=v0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},m4=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return _4(Object.entries(e.classGroups),n).forEach(([l,a])=>{Yp(a,i,l,t)}),i},Yp=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const l=s===""?t:m0(t,s);l.classGroupId=n;return}if(typeof s=="function"){if(b4(s)){Yp(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([l,a])=>{Yp(a,m0(t,l),n,i)})})},m0=(e,t)=>{let n=e;return t.split(zv).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},b4=e=>e.isThemeGetter,_4=(e,t)=>t?e.map(([n,i])=>{const s=i.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([a,c])=>[t+a,c])):l);return[n,s]}):e,y4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(l,a)=>{n.set(l,a),t++,t>e&&(t=0,i=n,n=new Map)};return{get(l){let a=n.get(l);if(a!==void 0)return a;if((a=i.get(l))!==void 0)return s(l,a),a},set(l,a){n.has(l)?n.set(l,a):s(l,a)}}},Zw="!",w4=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],l=t.length,a=c=>{const f=[];let h=0,g=0,p;for(let x=0;x<c.length;x++){let A=c[x];if(h===0){if(A===s&&(i||c.slice(x,x+l)===t)){f.push(c.slice(g,x)),g=x+l;continue}if(A==="/"){p=x;continue}}A==="["?h++:A==="]"&&h--}const v=f.length===0?c:c.substring(g),b=v.startsWith(Zw),w=b?v.substring(1):v,S=p&&p>g?p-g:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:a}):a},x4=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},S4=e=>({cache:y4(e.cacheSize),parseClassName:w4(e),...p4(e)}),C4=/\s+/,A4=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,l=[],a=e.trim().split(C4);let c="";for(let f=a.length-1;f>=0;f-=1){const h=a[f],{modifiers:g,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=n(h);let w=!!b,S=i(w?v.substring(0,b):v);if(!S){if(!w){c=h+(c.length>0?" "+c:c);continue}if(S=i(v),!S){c=h+(c.length>0?" "+c:c);continue}w=!1}const x=x4(g).join(":"),A=p?x+Zw:x,T=A+S;if(l.includes(T))continue;l.push(T);const D=s(S,w);for(let R=0;R<D.length;++R){const L=D[R];l.push(A+L)}c=h+(c.length>0?" "+c:c)}return c};function P4(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Qw(t))&&(i&&(i+=" "),i+=n);return i}const Qw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Qw(e[i]))&&(n&&(n+=" "),n+=t);return n};function k4(e,...t){let n,i,s,l=a;function a(f){const h=t.reduce((g,p)=>p(g),e());return n=S4(h),i=n.cache.get,s=n.cache.set,l=c,c(f)}function c(f){const h=i(f);if(h)return h;const g=A4(f,n);return s(f,g),g}return function(){return l(P4.apply(null,arguments))}}const tn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Jw=/^\[(?:([a-z-]+):)?(.+)\]$/i,T4=/^\d+\/\d+$/,E4=new Set(["px","full","screen"]),I4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,R4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,N4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,M4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wi=e=>fs(e)||E4.has(e)||T4.test(e),$i=e=>Ys(e,"length",W4),fs=e=>!!e&&!Number.isNaN(Number(e)),ip=e=>Ys(e,"number",fs),pa=e=>!!e&&Number.isInteger(Number(e)),D4=e=>e.endsWith("%")&&fs(e.slice(0,-1)),me=e=>Jw.test(e),to=e=>I4.test(e),L4=new Set(["length","size","percentage"]),F4=e=>Ys(e,L4,$w),B4=e=>Ys(e,"position",$w),z4=new Set(["image","url"]),V4=e=>Ys(e,z4,G4),H4=e=>Ys(e,"",U4),va=()=>!0,Ys=(e,t,n)=>{const i=Jw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},W4=e=>O4.test(e)&&!R4.test(e),$w=()=>!1,U4=e=>N4.test(e),G4=e=>M4.test(e),K4=()=>{const e=tn("colors"),t=tn("spacing"),n=tn("blur"),i=tn("brightness"),s=tn("borderColor"),l=tn("borderRadius"),a=tn("borderSpacing"),c=tn("borderWidth"),f=tn("contrast"),h=tn("grayscale"),g=tn("hueRotate"),p=tn("invert"),v=tn("gap"),b=tn("gradientColorStops"),w=tn("gradientColorStopPositions"),S=tn("inset"),x=tn("margin"),A=tn("opacity"),T=tn("padding"),D=tn("saturate"),R=tn("scale"),L=tn("sepia"),F=tn("skew"),M=tn("space"),U=tn("translate"),q=()=>["auto","contain","none"],tt=()=>["auto","hidden","clip","visible","scroll"],nt=()=>["auto",me,t],z=()=>[me,t],it=()=>["",wi,$i],X=()=>["auto",fs,me],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>["start","end","center","between","around","evenly","stretch"],pt=()=>["","0",me],wt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],lt=()=>[fs,me];return{cacheSize:500,separator:":",theme:{colors:[va],spacing:[wi,$i],blur:["none","",to,me],brightness:lt(),borderColor:[e],borderRadius:["none","","full",to,me],borderSpacing:z(),borderWidth:it(),contrast:lt(),grayscale:pt(),hueRotate:lt(),invert:pt(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[D4,$i],inset:nt(),margin:nt(),opacity:lt(),padding:z(),saturate:lt(),scale:lt(),sepia:pt(),skew:lt(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[to]}],"break-after":[{"break-after":wt()}],"break-before":[{"break-before":wt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),me]}],overflow:[{overflow:tt()}],"overflow-x":[{"overflow-x":tt()}],"overflow-y":[{"overflow-y":tt()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pa,me]}],basis:[{basis:nt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",pa,me]}],"grid-cols":[{"grid-cols":[va]}],"col-start-end":[{col:["auto",{span:["full",pa,me]},me]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[va]}],"row-start-end":[{row:["auto",{span:[pa,me]},me]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ht()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ht(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ht(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,t]}],"min-w":[{"min-w":[me,t,"min","max","fit"]}],"max-w":[{"max-w":[me,t,"none","full","min","max","fit","prose",{screen:[to]},to]}],h:[{h:[me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",to,$i]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ip]}],"font-family":[{font:[va]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",me]}],"line-clamp":[{"line-clamp":["none",fs,ip]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wi,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wi,$i]}],"underline-offset":[{"underline-offset":["auto",wi,me]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),B4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",F4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},V4]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:J()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[wi,me]}],"outline-w":[{outline:[wi,$i]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:it()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[wi,$i]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",to,H4]}],"shadow-color":[{shadow:[va]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...rt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":rt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",to,me]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[p]}],saturate:[{saturate:[D]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:lt()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:lt()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[pa,me]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wi,$i,ip]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},q4=k4(K4);function ce(...e){return q4(af(e))}function Y4(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"value",15,""),s=xt(t,["$$slots","$$events","$$legacy","ref","value","class"]);var l=K(),a=N(l);{let c=E(()=>ce("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t.class));_t(a,()=>wM,(f,h)=>{h(f,Ft({get class(){return d(c)}},()=>s,{get value(){return i()},set value(g){i(g)},get ref(){return n()},set ref(g){n(g)}}))})}_(e,l),at()}function Fa(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("text-lg font-semibold leading-none tracking-tight",t.class));_t(l,()=>p3,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}var X4=Z("<div><!></div>");function Vv(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=X4();Yt(s,a=>({class:a,...i}),[()=>ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)]);var l=G(s);ut(l,()=>t.children??Ct),W(s),Rn(s,a=>n(a),()=>n()),_(e,s),at()}var j4=Z("<div><!></div>");function Ba(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=j4();Yt(s,a=>({class:a,...i}),[()=>ce("flex flex-col space-y-1.5 text-center sm:text-left",t.class)]);var l=G(s);ut(l,()=>t.children??Ct),W(s),Rn(s,a=>n(a),()=>n()),_(e,s),at()}function Ms(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t.class));_t(l,()=>uO,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}var Z4=Z('<!> <span class="sr-only">Close</span>',1),Q4=Z("<!> <!>",1),J4=Z("<!> <!>",1);function za(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children"]);var s=K(),l=N(s);_t(l,()=>Ds,(a,c)=>{c(a,Ft(()=>t.portalProps,{children:(f,h)=>{var g=J4(),p=N(g);_t(p,()=>Ms,(b,w)=>{w(b,{})});var v=et(p,2);{let b=E(()=>ce("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t.class));_t(v,()=>l5,(w,S)=>{S(w,Ft({get class(){return d(b)}},()=>i,{get ref(){return n()},set ref(x){n(x)},children:(x,A)=>{var T=Q4(),D=N(T);ut(D,()=>t.children??Ct);var R=et(D,2);_t(R,()=>o5,(L,F)=>{F(L,{class:"ring-offset-background focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:(M,U)=>{var q=Z4(),tt=N(q);Ny(tt,{class:"size-4"}),jt(2),_(M,q)},$$slots:{default:!0}})}),_(x,T)},$$slots:{default:!0}}))})}_(f,g)},$$slots:{default:!0}}))}),_(e,s),at()}function Ph(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("text-muted-foreground text-sm",t.class));_t(l,()=>fO,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}const Va=r5,Ds=yh;function $4(e,t){st(t,!0),P(t,"ref",11,null);let n=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var i=K(),s=N(i);{let l=E(()=>ce("py-6 text-center text-sm",t.class));_t(s,()=>SM,(a,c)=>{c(a,Ft({get class(){return d(l)}},()=>n))})}_(e,i),at()}var tD=Z("<!> <!>",1);function eD(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var s=K(),l=N(s);{let a=E(()=>ce("text-foreground overflow-hidden p-1",t.class)),c=E(()=>t.value??t.heading??`----${de()}`);_t(l,()=>AM,(f,h)=>{h(f,Ft({get class(){return d(a)},get value(){return d(c)}},()=>i,{get ref(){return n()},set ref(g){n(g)},children:(g,p)=>{var v=tD(),b=N(v);{var w=x=>{var A=K(),T=N(A);_t(T,()=>kM,(D,R)=>{R(D,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:(L,F)=>{jt();var M=oe();Rt(()=>$t(M,t.heading)),_(L,M)},$$slots:{default:!0}})}),_(x,A)};dt(b,x=>{t.heading&&x(w)})}var S=et(b,2);_t(S,()=>IM,(x,A)=>{A(x,{get children(){return t.children}})}),_(g,v)},$$slots:{default:!0}}))})}_(e,s),at()}function b0(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t.class));_t(l,()=>DM,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}var nD=Z('<div class="flex items-center border-b px-2" data-command-input-wrapper=""><!> <!></div>');function rD(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"value",15,""),s=xt(t,["$$slots","$$events","$$legacy","ref","class","value"]);var l=nD(),a=G(l);TE(a,{class:"mr-2 size-4 shrink-0 opacity-50"});var c=et(a,2);{let f=E(()=>ce("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class));_t(c,()=>RM,(h,g)=>{g(h,Ft({get class(){return d(f)}},()=>s,{get ref(){return n()},set ref(p){n(p)},get value(){return i()},set value(p){i(p)}}))})}W(l),_(e,l),at()}function iD(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("max-h-[300px] overflow-y-auto overflow-x-hidden",t.class));_t(l,()=>FM,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}function kh(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"sideOffset",3,4),s=P(t,"align",3,"center"),l=xt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","align","portalProps"]);var a=K(),c=N(a);_t(c,()=>yh,(f,h)=>{h(f,Ft(()=>t.portalProps,{children:(g,p)=>{var v=K(),b=N(v);{let w=E(()=>ce("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",t.class));_t(b,()=>t5,(S,x)=>{x(S,Ft({get sideOffset(){return i()},get align(){return s()},get class(){return d(w)}},()=>l,{get ref(){return n()},set ref(A){n(A)}}))})}_(g,v)},$$slots:{default:!0}}))}),_(e,a),at()}const Th=g5,Eh=n5;var _0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,nr=e=>!e||typeof e!="object"||Object.keys(e).length===0,oD=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function tx(e,t){e.forEach(function(n){Array.isArray(n)?tx(n,t):t.push(n)})}function ex(e){let t=[];return tx(e,t),t}var nx=(...e)=>ex(e).filter(Boolean),rx=(e,t)=>{let n={},i=Object.keys(e),s=Object.keys(t);for(let l of i)if(s.includes(l)){let a=e[l],c=t[l];Array.isArray(a)||Array.isArray(c)?n[l]=nx(c,a):typeof a=="object"&&typeof c=="object"?n[l]=rx(a,c):n[l]=c+" "+a}else n[l]=e[l];for(let l of s)i.includes(l)||(n[l]=t[l]);return n},y0=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Hv="-",sD=e=>{const t=lD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const c=a.split(Hv);return c[0]===""&&c.length!==1&&c.shift(),ix(c,t)||aD(a)},getConflictingClassGroupIds:(a,c)=>{const f=n[a]||[];return c&&i[a]?[...f,...i[a]]:f}}},ix=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?ix(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const l=e.join(Hv);return(a=t.validators.find(({validator:c})=>c(l)))==null?void 0:a.classGroupId},w0=/^\[(.+)\]$/,aD=e=>{if(w0.test(e)){const t=w0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},lD=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return uD(Object.entries(e.classGroups),n).forEach(([l,a])=>{Xp(a,i,l,t)}),i},Xp=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const l=s===""?t:x0(t,s);l.classGroupId=n;return}if(typeof s=="function"){if(cD(s)){Xp(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([l,a])=>{Xp(a,x0(t,l),n,i)})})},x0=(e,t)=>{let n=e;return t.split(Hv).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},cD=e=>e.isThemeGetter,uD=(e,t)=>t?e.map(([n,i])=>{const s=i.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([a,c])=>[t+a,c])):l);return[n,s]}):e,dD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(l,a)=>{n.set(l,a),t++,t>e&&(t=0,i=n,n=new Map)};return{get(l){let a=n.get(l);if(a!==void 0)return a;if((a=i.get(l))!==void 0)return s(l,a),a},set(l,a){n.has(l)?n.set(l,a):s(l,a)}}},ox="!",fD=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],l=t.length,a=c=>{const f=[];let h=0,g=0,p;for(let x=0;x<c.length;x++){let A=c[x];if(h===0){if(A===s&&(i||c.slice(x,x+l)===t)){f.push(c.slice(g,x)),g=x+l;continue}if(A==="/"){p=x;continue}}A==="["?h++:A==="]"&&h--}const v=f.length===0?c:c.substring(g),b=v.startsWith(ox),w=b?v.substring(1):v,S=p&&p>g?p-g:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:a}):a},hD=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},gD=e=>({cache:dD(e.cacheSize),parseClassName:fD(e),...sD(e)}),pD=/\s+/,vD=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,l=[],a=e.trim().split(pD);let c="";for(let f=a.length-1;f>=0;f-=1){const h=a[f],{modifiers:g,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=n(h);let w=!!b,S=i(w?v.substring(0,b):v);if(!S){if(!w){c=h+(c.length>0?" "+c:c);continue}if(S=i(v),!S){c=h+(c.length>0?" "+c:c);continue}w=!1}const x=hD(g).join(":"),A=p?x+ox:x,T=A+S;if(l.includes(T))continue;l.push(T);const D=s(S,w);for(let R=0;R<D.length;++R){const L=D[R];l.push(A+L)}c=h+(c.length>0?" "+c:c)}return c};function mD(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sx(t))&&(i&&(i+=" "),i+=n);return i}const sx=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=sx(e[i]))&&(n&&(n+=" "),n+=t);return n};function jp(e,...t){let n,i,s,l=a;function a(f){const h=t.reduce((g,p)=>p(g),e());return n=gD(h),i=n.cache.get,s=n.cache.set,l=c,c(f)}function c(f){const h=i(f);if(h)return h;const g=vD(f,n);return s(f,g),g}return function(){return l(mD.apply(null,arguments))}}const en=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ax=/^\[(?:([a-z-]+):)?(.+)\]$/i,bD=/^\d+\/\d+$/,_D=new Set(["px","full","screen"]),yD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xi=e=>hs(e)||_D.has(e)||bD.test(e),eo=e=>Xs(e,"length",RD),hs=e=>!!e&&!Number.isNaN(Number(e)),op=e=>Xs(e,"number",hs),ma=e=>!!e&&Number.isInteger(Number(e)),AD=e=>e.endsWith("%")&&hs(e.slice(0,-1)),be=e=>ax.test(e),no=e=>yD.test(e),PD=new Set(["length","size","percentage"]),kD=e=>Xs(e,PD,lx),TD=e=>Xs(e,"position",lx),ED=new Set(["image","url"]),ID=e=>Xs(e,ED,MD),OD=e=>Xs(e,"",ND),ba=()=>!0,Xs=(e,t,n)=>{const i=ax.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},RD=e=>wD.test(e)&&!xD.test(e),lx=()=>!1,ND=e=>SD.test(e),MD=e=>CD.test(e),Zp=()=>{const e=en("colors"),t=en("spacing"),n=en("blur"),i=en("brightness"),s=en("borderColor"),l=en("borderRadius"),a=en("borderSpacing"),c=en("borderWidth"),f=en("contrast"),h=en("grayscale"),g=en("hueRotate"),p=en("invert"),v=en("gap"),b=en("gradientColorStops"),w=en("gradientColorStopPositions"),S=en("inset"),x=en("margin"),A=en("opacity"),T=en("padding"),D=en("saturate"),R=en("scale"),L=en("sepia"),F=en("skew"),M=en("space"),U=en("translate"),q=()=>["auto","contain","none"],tt=()=>["auto","hidden","clip","visible","scroll"],nt=()=>["auto",be,t],z=()=>[be,t],it=()=>["",xi,eo],X=()=>["auto",hs,be],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>["start","end","center","between","around","evenly","stretch"],pt=()=>["","0",be],wt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],lt=()=>[hs,be];return{cacheSize:500,separator:":",theme:{colors:[ba],spacing:[xi,eo],blur:["none","",no,be],brightness:lt(),borderColor:[e],borderRadius:["none","","full",no,be],borderSpacing:z(),borderWidth:it(),contrast:lt(),grayscale:pt(),hueRotate:lt(),invert:pt(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[AD,eo],inset:nt(),margin:nt(),opacity:lt(),padding:z(),saturate:lt(),scale:lt(),sepia:pt(),skew:lt(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[no]}],"break-after":[{"break-after":wt()}],"break-before":[{"break-before":wt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),be]}],overflow:[{overflow:tt()}],"overflow-x":[{"overflow-x":tt()}],"overflow-y":[{"overflow-y":tt()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ma,be]}],basis:[{basis:nt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",ma,be]}],"grid-cols":[{"grid-cols":[ba]}],"col-start-end":[{col:["auto",{span:["full",ma,be]},be]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[ba]}],"row-start-end":[{row:["auto",{span:[ma,be]},be]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ht()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ht(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ht(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[no]},no]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",no,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",op]}],"font-family":[{font:[ba]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",be]}],"line-clamp":[{"line-clamp":["none",hs,op]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xi,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xi,eo]}],"underline-offset":[{"underline-offset":["auto",xi,be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),TD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ID]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:J()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[xi,be]}],"outline-w":[{outline:[xi,eo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:it()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[xi,eo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",no,OD]}],"shadow-color":[{shadow:[ba]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...rt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":rt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",no,be]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[p]}],saturate:[{saturate:[D]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",be]}],duration:[{duration:lt()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:lt()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[ma,be]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xi,eo,op]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},DD=(e,{cacheSize:t,prefix:n,separator:i,experimentalParseClassName:s,extend:l={},override:a={}})=>{Ca(e,"cacheSize",t),Ca(e,"prefix",n),Ca(e,"separator",i),Ca(e,"experimentalParseClassName",s);for(const c in a)LD(e[c],a[c]);for(const c in l)FD(e[c],l[c]);return e},Ca=(e,t,n)=>{n!==void 0&&(e[t]=n)},LD=(e,t)=>{if(t)for(const n in t)Ca(e,n,t[n])},FD=(e,t)=>{if(t)for(const n in t){const i=t[n];i!==void 0&&(e[n]=(e[n]||[]).concat(i))}},BD=(e,...t)=>typeof e=="function"?jp(Zp,e,...t):jp(()=>DD(Zp(),e),...t),zD=jp(Zp);var VD={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},cx=e=>e||void 0,Ha=(...e)=>cx(ex(e).filter(Boolean).join(" ")),sp=null,Ci={},Qp=!1,_a=(...e)=>t=>t.twMerge?((!sp||Qp)&&(Qp=!1,sp=nr(Ci)?zD:BD({...Ci,extend:{theme:Ci.theme,classGroups:Ci.classGroups,conflictingClassGroupModifiers:Ci.conflictingClassGroupModifiers,conflictingClassGroups:Ci.conflictingClassGroups,...Ci.extend}})),cx(sp(Ha(e)))):Ha(e),S0=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=Ha(e[n],t[n]):e[n]=t[n];return e},ux=(e,t)=>{let{extend:n=null,slots:i={},variants:s={},compoundVariants:l=[],compoundSlots:a=[],defaultVariants:c={}}=e,f={...VD,...t},h=n!=null&&n.base?Ha(n.base,e==null?void 0:e.base):e==null?void 0:e.base,g=n!=null&&n.variants&&!nr(n.variants)?rx(s,n.variants):s,p=n!=null&&n.defaultVariants&&!nr(n.defaultVariants)?{...n.defaultVariants,...c}:c;!nr(f.twMergeConfig)&&!oD(f.twMergeConfig,Ci)&&(Qp=!0,Ci=f.twMergeConfig);let v=nr(n==null?void 0:n.slots),b=nr(i)?{}:{base:Ha(e==null?void 0:e.base,v&&(n==null?void 0:n.base)),...i},w=v?b:S0({...n==null?void 0:n.slots},nr(b)?{base:e==null?void 0:e.base}:b),S=nr(n==null?void 0:n.compoundVariants)?l:nx(n==null?void 0:n.compoundVariants,l),x=T=>{if(nr(g)&&nr(i)&&v)return _a(h,T==null?void 0:T.class,T==null?void 0:T.className)(f);if(S&&!Array.isArray(S))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof S}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let D=(z,it,X=[],j)=>{let J=X;if(typeof it=="string")J=J.concat(y0(it).split(" ").map(rt=>`${z}:${rt}`));else if(Array.isArray(it))J=J.concat(it.reduce((rt,ht)=>rt.concat(`${z}:${ht}`),[]));else if(typeof it=="object"&&typeof j=="string"){for(let rt in it)if(it.hasOwnProperty(rt)&&rt===j){let ht=it[rt];if(ht&&typeof ht=="string"){let pt=y0(ht);J[j]?J[j]=J[j].concat(pt.split(" ").map(wt=>`${z}:${wt}`)):J[j]=pt.split(" ").map(wt=>`${z}:${wt}`)}else Array.isArray(ht)&&ht.length>0&&(J[j]=ht.reduce((pt,wt)=>pt.concat(`${z}:${wt}`),[]))}}return J},R=(z,it=g,X=null,j=null)=>{var J;let rt=it[z];if(!rt||nr(rt))return null;let ht=(J=j==null?void 0:j[z])!=null?J:T==null?void 0:T[z];if(ht===null)return null;let pt=_0(ht),wt=Array.isArray(f.responsiveVariants)&&f.responsiveVariants.length>0||f.responsiveVariants===!0,lt=p==null?void 0:p[z],yt=[];if(typeof pt=="object"&&wt)for(let[St,At]of Object.entries(pt)){let qt=rt[At];if(St==="initial"){lt=At;continue}Array.isArray(f.responsiveVariants)&&!f.responsiveVariants.includes(St)||(yt=D(St,qt,yt,X))}let Ot=pt!=null&&typeof pt!="object"?pt:_0(lt),Vt=rt[Ot||"false"];return typeof yt=="object"&&typeof X=="string"&&yt[X]?S0(yt,Vt):yt.length>0?(yt.push(Vt),X==="base"?yt.join(" "):yt):Vt},L=()=>g?Object.keys(g).map(z=>R(z,g)):null,F=(z,it)=>{if(!g||typeof g!="object")return null;let X=new Array;for(let j in g){let J=R(j,g,z,it),rt=z==="base"&&typeof J=="string"?J:J&&J[z];rt&&(X[X.length]=rt)}return X},M={};for(let z in T)T[z]!==void 0&&(M[z]=T[z]);let U=(z,it)=>{var X;let j=typeof(T==null?void 0:T[z])=="object"?{[z]:(X=T[z])==null?void 0:X.initial}:{};return{...p,...M,...j,...it}},q=(z=[],it)=>{let X=[];for(let{class:j,className:J,...rt}of z){let ht=!0;for(let[pt,wt]of Object.entries(rt)){let lt=U(pt,it)[pt];if(Array.isArray(wt)){if(!wt.includes(lt)){ht=!1;break}}else{let yt=Ot=>Ot==null||Ot===!1;if(yt(wt)&&yt(lt))continue;if(lt!==wt){ht=!1;break}}}ht&&(j&&X.push(j),J&&X.push(J))}return X},tt=z=>{let it=q(S,z);if(!Array.isArray(it))return it;let X={};for(let j of it)if(typeof j=="string"&&(X.base=_a(X.base,j)(f)),typeof j=="object")for(let[J,rt]of Object.entries(j))X[J]=_a(X[J],rt)(f);return X},nt=z=>{if(a.length<1)return null;let it={};for(let{slots:X=[],class:j,className:J,...rt}of a){if(!nr(rt)){let ht=!0;for(let pt of Object.keys(rt)){let wt=U(pt,z)[pt];if(wt===void 0||(Array.isArray(rt[pt])?!rt[pt].includes(wt):rt[pt]!==wt)){ht=!1;break}}if(!ht)continue}for(let ht of X)it[ht]=it[ht]||[],it[ht].push([j,J])}return it};if(!nr(i)||!v){let z={};if(typeof w=="object"&&!nr(w))for(let it of Object.keys(w))z[it]=X=>{var j,J;return _a(w[it],F(it,X),((j=tt(X))!=null?j:[])[it],((J=nt(X))!=null?J:[])[it],X==null?void 0:X.class,X==null?void 0:X.className)(f)};return z}return _a(h,L(),q(S),T==null?void 0:T.class,T==null?void 0:T.className)(f)},A=()=>{if(!(!g||typeof g!="object"))return Object.keys(g)};return x.variantKeys=A(),x.extend=n,x.base=h,x.slots=w,x.variants=g,x.defaultVariants=p,x.compoundSlots=a,x.compoundVariants=S,x};const C0=ux({base:"ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-input bg-background hover:bg-accent hover:text-accent-foreground border",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});var HD=Z("<a><!></a>"),WD=Z("<button><!></button>");function In(e,t){st(t,!0);let n=P(t,"variant",3,"default"),i=P(t,"size",3,"default"),s=P(t,"ref",15,null),l=P(t,"href",3,void 0),a=P(t,"type",3,"button"),c=xt(t,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","children"]);const f=Vi(),[h,g]=f;var p=K(),v=N(p);{var b=S=>{var x=HD();Yt(x,T=>({...T}),[()=>g({class:ce(C0({variant:n(),size:i()}),t.class),href:l(),...c},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]);var A=G(x);ut(A,()=>t.children??Ct),W(x),Rn(x,T=>s(T),()=>s()),_(S,x)},w=S=>{var x=WD();Yt(x,T=>({...T}),[()=>g({class:ce(C0({variant:n(),size:i()}),t.class),type:a(),...c},[{attribute_name:"formaction"}])]);var A=G(x);ut(A,()=>t.children??Ct),W(x),Rn(x,T=>s(T),()=>s()),_(S,x)};dt(v,S=>{l()?S(b):S(w,!1)})}_(e,p),at()}const UD=(e,t)=>{const n=window.URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.setAttribute("download",e),document.body.appendChild(i),i.click(),i.remove(),window.URL.revokeObjectURL(n)},ss=Le({}),jd=Le(0),Wv=()=>({customLabelColorsStore:ss,colorVersion:jd,getCustomColor:l=>xn(ss)[l],setCustomColor:(l,a,c=1)=>{ss.update(f=>({...f,[l]:{color:a,alpha:c}})),jd.update(f=>f+1)},hasCustomColor:l=>!!xn(ss)[l],deleteCustomColor:l=>{ss.update(a=>{const{[l]:c,...f}=a;return f}),jd.update(a=>a+1)},clearCustomColors:()=>{ss.set({}),jd.update(l=>l+1)}}),oo=(e,t=1)=>{t=Math.max(0,Math.min(t,1));const{getCustomColor:n,hasCustomColor:i}=Wv();if(i(e)){const x=n(e);if(x)return((T,D)=>{const R=parseInt(T.slice(1,3),16),L=parseInt(T.slice(3,5),16),F=parseInt(T.slice(5,7),16);return{color:`rgba(${R}, ${L}, ${F}, ${D})`,contrastColor:`rgba(${255-R}, ${255-L}, ${255-F}, ${D})`}})(x.color,x.alpha*t)}const s=["rgba(255, 0, 0, alpha)","rgba(0, 255, 0, alpha)","rgba(0, 0, 255, alpha)","rgba(255, 255, 0, alpha)","rgba(255, 0, 255, alpha)","rgba(0, 255, 255, alpha)","rgba(128, 0, 0, alpha)","rgba(0, 128, 0, alpha)","rgba(0, 0, 128, alpha)","rgba(128, 128, 0, alpha)","rgba(128, 0, 128, alpha)","rgba(0, 128, 128, alpha)","rgba(192, 192, 192, alpha)","rgba(128, 128, 128, alpha)","rgba(255, 165, 0, alpha)","rgba(255, 20, 147, alpha)","rgba(75, 0, 130, alpha)","rgba(255, 105, 180, alpha)","rgba(0, 255, 127, alpha)","rgba(255, 215, 0, alpha)","rgba(255, 69, 0, alpha)"];let l;const a=s.length-1;if(l=Array.from(e).reduce((x,A)=>(x<<5)-x+A.charCodeAt(0),0),l=Math.abs(l)%a+1,l>=1&&l<=a)return{color:s[l-1].replace("alpha",t.toString()),contrastColor:`rgba(${255-Math.round(parseInt(s[l-1].split(",")[0].split("(")[1])*(t/255))}, ${255-Math.round(parseInt(s[l-1].split(",")[1]))}, ${255-Math.round(parseInt(s[l-1].split(",")[2]))}, ${t})`};const c=(l*30+20)%256,f=(l*60+100)%256,h=(l*90+150)%256,g=Math.max(c,f,h),p=Math.min(c,f,h);if(g-p===0)return{color:`rgba(255, 255, 255, ${t})`,contrastColor:`rgba(0, 0, 0, ${t})`};const b=255/g,w=`rgba(${Math.round(c*b)}, ${Math.round(f*b)}, ${Math.round(h*b)}, ${t})`,S=`rgba(${255-Math.round(c*b)}, ${255-Math.round(f*b)}, ${255-Math.round(h*b)}, ${t})`;return{color:w,contrastColor:S}},dx="en-US",Jp=e=>new Intl.NumberFormat(dx,{}).format(e).toString(),GD=(e,t=3,n=0)=>new Intl.NumberFormat(dx,{maximumFractionDigits:t,minimumFractionDigits:n}).format(e).toString(),Aa=e=>{if(e==null)return"null";if(typeof e=="string")return e;if(typeof e=="number")return Number.isInteger(e)?Jp(e):GD(e);if(typeof e=="boolean")return e?"true":"false";if(Array.isArray(e))return e.length===0?"[]":e.length<=3&&e.every(t=>typeof t!="object"||t===null)?`[${e.map(t=>Aa(t)).join(", ")}]`:`[${e.map(n=>Aa(n)).join(", ")}]`;if(typeof e=="object"&&e!==null&&!Array.isArray(e)){const t=e,n=Object.keys(t);return n.length===0?"{}":n.length<=3&&n.every(s=>{const l=t[s];return typeof l!="object"||l===null||Array.isArray(l)})?`{${n.map(l=>`${l}: ${Aa(t[l])}`).join(", ")}}`:`{
466
+ ${n.map(s=>{const l=Aa(t[s]);return`${s}: ${l}`}).join(`
467
+ `)}
468
+ }`}return String(e)},KD=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement;var qD=Z(" <!>",1),YD=Z('<div class="flex items-center space-x-4"><!> <!></div>'),XD=Z("<!> ",1),jD=Z('<span class="opacity-50">Create:</span> <span class="ml-1 font-semibold"> </span>',1),ZD=Z('<div class="border-t"><!></div>'),QD=Z("<!> <!> <!>",1),JD=Z("<!> <!>",1),$D=Z("<!> <!>",1);function Uv(e,t){st(t,!0);let n=ft(!1),i=ft(null);function s(){O(n,!1),fh().then(()=>{d(i).focus()})}let l=P(t,"name",3,"items"),a=P(t,"label",3,"Select an item"),c=P(t,"selectedItem",15,void 0),f=P(t,"placeholder",3,"Search an item..."),h=P(t,"className",3,""),g=P(t,"contentClassName",3,""),p=P(t,"disabled",3,!1),v=P(t,"isLoading",3,!1),b=ft(""),w=ft("");const S=E(()=>{var L;return(L=c())==null?void 0:L.value});se(()=>{d(n)||(O(b,""),O(w,""))});const x=L=>{var F;c(L),(F=t.onSelect)==null||F.call(t,L),s()},A=L=>{const F=t.items.find(M=>M.value.toLowerCase()===L.toLowerCase());if(F)x(F);else{const M={value:L,label:L};t.items.push(M),x(M)}},T=L=>{L.key==="Enter"&&!d(w)&&d(b)?(A(d(b)),L.preventDefault(),L.stopPropagation()):(L.key==="ArrowLeft"||L.key==="ArrowRight")&&L.stopPropagation()};var D=K(),R=N(D);_t(R,()=>Th,(L,F)=>{F(L,{get open(){return d(n)},set open(M){O(n,M,!0)},children:(M,U)=>{var q=$D(),tt=N(q);{const z=(it,X)=>{let j=()=>X==null?void 0:X().props;var J=YD(),rt=G(J);{let wt=E(()=>ce("w-[200px] justify-between",h()));In(rt,Ft(j,{variant:"secondary",get disabled(){return p()},get class(){return d(wt)},role:"combobox",get"aria-expanded"(){return d(n)},"data-testid":"select-list-trigger",children:(lt,yt)=>{jt();var Ot=qD(),Vt=N(Ot),St=et(Vt);SE(St,{class:"opacity-50"}),Rt(()=>{var At;return $t(Vt,`${(((At=c())==null?void 0:At.label)||a())??""} `)}),_(lt,Ot)},$$slots:{default:!0}}))}var ht=et(rt,2);{var pt=wt=>{Oy(wt,{class:"mr-2 h-4 w-4 animate-spin"})};dt(ht,wt=>{v()&&wt(pt)})}W(J),_(it,J)};_t(tt,()=>Eh,(it,X)=>{X(it,{get ref(){return d(i)},set ref(j){O(i,j,!0)},child:z,$$slots:{child:!0}})})}var nt=et(tt,2);{let z=E(()=>ce("w-[200px] p-0",g()));_t(nt,()=>kh,(it,X)=>{X(it,{get class(){return d(z)},children:(j,J)=>{var rt=K(),ht=N(rt);_t(ht,()=>Y4,(pt,wt)=>{wt(pt,{get value(){return d(w)},set value(lt){O(w,lt,!0)},children:(lt,yt)=>{var Ot=JD(),Vt=N(Ot);_t(Vt,()=>rD,(At,qt)=>{qt(At,{get placeholder(){return f()},onkeydown:T,"data-testid":"select-list-input",get value(){return d(b)},set value(kt){O(b,kt,!0)}})});var St=et(Vt,2);_t(St,()=>iD,(At,qt)=>{qt(At,{class:"dark:[color-scheme:dark]",children:(kt,Wt)=>{var Lt=QD(),Ie=N(Lt);_t(Ie,()=>$4,(Ht,Ae)=>{Ae(Ht,{children:(Nt,ne)=>{var Ut=K(),he=N(Ut);{var ae=It=>{var Xt=K(),ge=N(Xt);ut(ge,()=>t.notFound,()=>({inputValue:d(b)||""})),_(It,Xt)},te=It=>{var Xt=oe("Item not found");_(It,Xt)};dt(he,It=>{t.notFound?It(ae):It(te,!1)})}_(Nt,Ut)},$$slots:{default:!0}})});var _e=et(Ie,2);_t(_e,()=>eD,(Ht,Ae)=>{Ae(Ht,{get value(){return l()},children:(Nt,ne)=>{var Ut=K(),he=N(Ut);Qn(he,17,()=>t.items,ae=>ae.value,(ae,te)=>{var It=K(),Xt=N(It);_t(Xt,()=>b0,(ge,an)=>{an(ge,{get value(){return d(te).value},onSelect:()=>x(d(te)),children:(vn,rn)=>{var pe=XD(),fe=N(pe);{let De=E(()=>ce(d(S)!==d(te).value&&"text-transparent"));gh(fe,{get class(){return d(De)}})}var on=et(fe);Rt(()=>$t(on,` ${d(te).label??""}`)),_(vn,pe)},$$slots:{default:!0}})}),_(ae,It)}),_(Nt,Ut)},$$slots:{default:!0}})});var Me=et(_e,2);{var Dt=Ht=>{var Ae=ZD(),Nt=G(Ae);_t(Nt,()=>b0,(ne,Ut)=>{Ut(ne,{value:"__create__",onSelect:()=>{const he={value:d(b),label:d(b)};t.items.push(he),x(he)},forceMount:!0,keywords:[],children:(he,ae)=>{var te=jD(),It=et(N(te),2),Xt=G(It,!0);W(It),Rt(()=>$t(Xt,d(b))),_(he,te)},$$slots:{default:!0}})}),W(Ae),_(Ht,Ae)};dt(Me,Ht=>{d(b).trim()&&Ht(Dt)})}_(kt,Lt)},$$slots:{default:!0}})}),_(lt,Ot)},$$slots:{default:!0}})}),_(j,rt)},$$slots:{default:!0}})})}_(M,q)},$$slots:{default:!0}})}),_(e,D),at()}const Gv=()=>uv(dv());var tL=Z('<div class="text-md m-2">Press Enter to create a new <span class="font-semibold"> </span> label.</div>'),eL=Z('<div class="text-md m-2">Type to create a new label.</div>');function Kv(e,t){st(t,!0);var n=K(),i=N(n);{var s=a=>{var c=tL(),f=et(G(c)),h=G(f);W(f),jt(),W(c),Rt(()=>$t(h,`"${t.label??""}"`)),_(a,c)},l=a=>{var c=eL();_(a,c)};dt(i,a=>{t.label.length>0?a(s):a(l,!1)})}_(e,n),at()}const qv=e=>e.map(n=>{const i=n.annotation_label_name;return{value:i,label:i}}).sort((n,i)=>n.label.localeCompare(i.label));var nL=Z('<div class="flex flex-col space-y-4"><div class="text-md mb-2">You can edit labels for multiple annotations at once.</div> <!></div>'),rL=Z('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-hidden dark:[color-scheme:dark]"><!></div>');function iL(e,t){st(t,!0);const n=()=>Kt(l,"$result",i),[i,s]=sr(),l=Gv(),a=E(()=>qv(n().data||[]));vx(e,{className:"h-full",children:(c,f)=>{mx(c,{className:"h-full flex flex-col",children:(h,g)=>{var p=rL(),v=G(p);{let b=E(()=>`Selected annotations: ${t.selectedAnnotations.length}`);Ls(v,{get title(){return d(b)},children:(w,S)=>{var x=nL(),A=et(G(x),2);Uv(A,{get items(){return d(a)},name:"annotation-label",placeholder:"Select or create a label",label:"Select a label",get onSelect(){return t.onSelect},get isLoading(){return t.isLoading},get disabled(){return t.disabled},notFound:(D,R)=>{let L=()=>R==null?void 0:R().inputValue;Kv(D,{get label(){return L()}})},$$slots:{notFound:!0}}),W(x),_(w,x)}})}W(p),_(h,p)},$$slots:{default:!0}})},$$slots:{default:!0}}),at(),s()}const A0=new Map,fx=e=>{const t=Uo(e,{position:0,filterHash:""});return{initialize:()=>{A0.get(e)||(t.set({position:0,filterHash:""}),A0.set(e,!0))},savePosition:(l,a)=>{t.set({position:l,filterHash:a})},getRestoredPosition:l=>{const a=xn(t);return a.filterHash===l?a.position:0}}},oL="annotation-label-change",hx=({annotations:e,datasetId:t,addReversibleAction:n,updateAnnotations:i,refresh:s})=>{const l=e.map(f=>({annotation_id:f.sample_id,label_name:f.annotation_label.annotation_label_name,dataset_id:t})),a=async()=>{await i(l),s()},c=e.length;n({id:`annotation-label-change-${Date.now()}`,description:`Undo label change for ${c} annotation${c>1?"s":""}`,execute:a,timestamp:new Date,groupId:oL})};function sL(e,t){const n=e.currentTarget.dataset.annotationId;t(n)}function aL(e,t){const n=e.currentTarget.dataset.annotationId,i=e.currentTarget.dataset.sampleId,s=e.currentTarget.dataset.index;yy(Sy.toSampleWithAnnotation({sampleId:i,annotationId:n,datasetId:t.dataset_id,annotationIndex:Number(s)}))}function lL(e,t){if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.annotationId;t(n)}}var cL=Z(`<div class="flex h-full flex-1 items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-lg font-medium">No annotations found</div> <div class="text-sm">This dataset doesn't contain any annotations.</div></div></div>`),uL=Z('<div data-testid="annotation-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <!></div>'),dL=Z('<div class="flex justify-center p-4"><!></div>'),fL=Z("<!> <!>",1),hL=Z('<div class="min-w-[250px] max-w-[30%] flex-1"><!></div>'),gL=Z('<div class="flex h-full flex-1" data-testid="annotations-grid"><div class="viewport flex-1"><!></div> <!></div>');function t7(e,t){st(t,!0);const n=()=>Kt(b,"$showAnnotationTextLabelsStore",h),i=()=>Kt(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",h),s=()=>Kt(d(v),"$tagsSelected",h),l=()=>Kt(d(X),"$infiniteAnnotations",h),a=()=>Kt(Ot,"$pickedAnnotationIds",h),c=()=>Kt(w,"$isEditingMode",h),f=()=>Kt(d(rt),"$isPending",h),[h,g]=sr(),p=E(()=>xy({dataset_id:t.dataset_id,kind:["annotation"]})),v=E(()=>d(p).tagsSelected),{showAnnotationTextLabelsStore:b}=Yu(),{isEditingMode:w}=ri.data.globalStorage;let S=E(n);const{getDatasetVersion:x,setfilteredAnnotationCount:A,addReversibleAction:T,clearReversibleActions:D}=ii();KT(()=>{D()});let R=ft("");const{initialize:L,savePosition:F,getRestoredPosition:M}=fx("annotations_scroll");Xu(async()=>{L(),O(R,await x(t.dataset_id),!0)});let U=ft(null),q=ft(0),tt=ft(0),nt=ft(0);const z=E(()=>({path:{dataset_id:t.dataset_id},query:{annotation_label_ids:i().length>0?i():void 0,tag_ids:s().size>0?Array.from(s()):void 0}})),it=E(()=>WE(d(z))),X=E(()=>d(it).annotations),j=E(()=>d(it).updateAnnotations),J=E(()=>d(it).refresh),rt=E(()=>d(it).isPending),{updateAnnotations:ht}=vh({datasetId:t.dataset_id});let pt=E(()=>i().join(",")+Array.from(s()).join(","));const wt=E(()=>d(pt)),lt=E(()=>M(d(wt)));function yt(Nt){const ne=Nt.target.scrollTop;F(ne,d(wt))}se(()=>{d(X).subscribe(Nt=>{Nt.isSuccess&&Nt.data.pages.length>0&&A(Nt.data.pages[0].total_count)})});const{selectedSampleAnnotationCropIds:Ot,toggleSampleAnnotationCropSelection:Vt,clearSelectedSampleAnnotationCrops:St}=ii(),At=16;function qt(Nt){Nt&&Vt(Nt)}const kt=E(()=>{var Nt;return((Nt=l().data)==null?void 0:Nt.pages.flatMap(ne=>ne.data.filter(Ut=>Ut.annotation.annotation_type!=qT.CLASSIFICATION)))||[]});function Wt(){l().hasNextPage&&l().fetchNextPage()}const Lt=E(()=>d(kt).map(Nt=>Nt.annotation).filter(Nt=>a().has(Nt.sample_id))),Ie=async Nt=>{hx({annotations:d(Lt).map(ne=>ne),datasetId:t.dataset_id,addReversibleAction:T,updateAnnotations:ht,refresh:d(J)}),await d(j)(d(Lt).map(ne=>({annotation_id:ne.sample_id,label_name:Nt.value,dataset_id:t.dataset_id}))),St()};let _e=ft(600);se(()=>{if(!d(U))return;O(q,d(nt)/t.itemWidth),O(tt,d(q)-At);const Nt=new ResizeObserver(ne=>{for(const Ut of ne)O(_e,Ut.contentRect.height,!0)});return Nt.observe(d(U)),()=>{Nt.disconnect()}});var Me=K(),Dt=N(Me);{var Ht=Nt=>{var ne=cL();_(Nt,ne)},Ae=Nt=>{var ne=gL(),Ut=G(ne),he=G(Ut);Ri(he,()=>d(pt),It=>{{const Xt=(rn,pe)=>{let fe=()=>pe==null?void 0:pe().index,on=()=>pe==null?void 0:pe().style;var De=K(),Fe=N(De);Ri(Fe,()=>l().dataUpdatedAt,Ge=>{var Ne=K(),Pe=N(Ne);{var ln=mn=>{var Oe=uL();Oe.__click=[sL,qt],Oe.__dblclick=[aL,t],Oe.__keydown=[lL,qt];var Re=G(Oe),je=G(Re);{let Bn=E(()=>a().has(d(kt)[fe()].annotation.sample_id));em(je,{onSelect:()=>{},get isSelected(){return d(Bn)}})}W(Re);var un=et(Re,2);{let Bn=E(()=>a().has(d(kt)[fe()].annotation.sample_id));SL(un,{get annotation(){return d(kt)[fe()]},get width(){return d(tt)},get height(){return d(tt)},get cachedDatasetVersion(){return d(R)},get showLabel(){return d(S)},get selected(){return d(Bn)}})}W(Oe),Rt(()=>{Gn(Oe,on()),Pt(Oe,"data-annotation-id",d(kt)[fe()].annotation.sample_id),Pt(Oe,"data-sample-id",d(kt)[fe()].annotation.parent_sample_id),Pt(Oe,"data-index",fe()),Pt(Oe,"aria-label",`Edit annotation: ${d(kt)[fe()].annotation.sample_id}`)}),_(mn,Oe)};dt(Pe,mn=>{d(kt)[fe()]&&mn(ln)})}_(Ge,Ne)}),_(rn,De)},ge=rn=>{var pe=fL(),fe=N(pe);Ri(fe,()=>d(kt).length,Fe=>{Ax(Fe,{onIntersect:Wt})});var on=et(fe,2);{var De=Fe=>{var Ge=dL(),Ne=G(Ge);My(Ne,{}),W(Ge),_(Fe,Ge)};dt(on,Fe=>{l().isFetchingNextPage&&Fe(De)})}_(rn,pe)};let an=E(()=>{var rn;return(rn=d(kt))==null?void 0:rn.length}),vn=E(()=>d(kt).length>0?d(lt):0);gv(It,{get itemCount(){return d(an)},get itemHeight(){return d(q)},get itemWidth(){return d(q)},get height(){return d(_e)},get scrollPosition(){return d(vn)},onscroll:yt,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${d(tt)??""}px; --sample-height: ${d(tt)??""}px;`},item:Xt,footer:ge,$$slots:{item:!0,footer:!0}})}}),W(Ut);var ae=et(Ut,2);{var te=It=>{var Xt=hL(),ge=G(Xt);{let an=E(()=>d(Lt).length===0);iL(ge,{get selectedAnnotations(){return d(Lt)},get disabled(){return d(an)},get isLoading(){return f()},onSelect:Ie})}W(Xt),_(It,Xt)};dt(ae,It=>{c()&&It(te)})}W(ne),Rn(ne,It=>O(U,It),()=>d(U)),Oa(ne,"clientWidth",It=>O(nt,It)),_(Nt,ne)};dt(Dt,Nt=>{l().isFetched&&d(kt).length===0?Nt(Ht):Nt(Ae,!1)})}_(e,Me),at(),g()}ar(["click","dblclick","keydown"]);function P0(e){return e.annotation_type==="object_detection"}function pL(e){return e.annotation_type==="instance_segmentation"}function e7(e){return e.annotation_type==="classification"}function Tf(e){if(P0(e)||pL(e)){const t={...P0(e)?e.object_detection_details:e.instance_segmentation_details};return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}else throw new Error(`Annotation type is not supported for bounding box extraction: ${e.annotation_type}`)}const vL=(e,t)=>{const n=Tf(e),i=Tf(t),s=n.height*n.width;return i.height*i.width-s},n7=e=>e===void 0?[]:e.filter(t=>t.annotation_type!=="classification").sort(vL),k0=Le(!1);function gx(){const{settingsStore:e}=Yu(),t=cs(e,i=>i.key_hide_annotations||"v");return{isHidden:k0,handleKeyEvent:i=>{if(KD(i.target))return;let s;t.subscribe(a=>{s=a})(),i.key===s&&k0.set(i.type==="keydown")}}}var mL=Z('<div class="annotation-label flex items-center justify-between text-sm text-white svelte-tm55hc"><span class="truncate text-sm"> </span></div>'),bL=Gr("<svg><!></svg>"),_L=Z("<div><div><!> <!></div></div>"),yL=Z('<div class="crop flex items-center justify-center rounded-lg bg-black svelte-tm55hc"><div class="text-xs text-gray-400">Loading...</div></div>');function px(e,t){var X,j;st(t,!0);const n=()=>Kt(g,"$customLabelColorsStore",s),i=()=>Kt(h,"$isHidden",s),[s,l]=sr();let a=P(t,"showLabel",3,!0),c=P(t,"selected",3,!1);const f=20,{isHidden:h}=gx(),{customLabelColorsStore:g}=Wv();if(!t.annotation.object_detection_details&&!t.annotation.instance_segmentation_details)throw new Error("Unsupported annotation: Only annotations with object_detection_details or instance_segmentation_details are supported. Please check the annotation data.");const{width:p,height:v,x:b,y:w}=Tf(t.annotation),S=(j=(X=t.annotation)==null?void 0:X.instance_segmentation_details)==null?void 0:j.segmentation_mask,x=E(()=>Math.min(t.containerWidth/(p+f*2),t.containerHeight/(v+f*2)));function A(){return-(b-f)*d(x)+(t.containerWidth-(p+f*2)*d(x))/2}function T(){return-(w-f)*d(x)+(t.containerHeight-(v+f*2)*d(x))/2}let D=t.annotation.annotation_label.annotation_label_name;const R=E(()=>{var J;return((J=n()[D])==null?void 0:J.color)??oo(D,1).color}),L=E(()=>{var J;return(J=n()[D])==null||J.color,oo(D,.4).color}),F=E(()=>{var J;return((J=n()[D])==null?void 0:J.alpha)??.4}),M=!!S,U=E(A),q=E(T);var tt=K(),nt=N(tt);{var z=J=>{var rt=_L();let ht;var pt=G(rt);let wt;var lt=G(pt);{var yt=St=>{var At=mL(),qt=G(At),kt=G(qt,!0);W(qt),W(At),Rt(Wt=>{Gn(At,Wt),$t(kt,D)},[()=>`background-color: ${d(L)??oo(D,.4).color};`]),_(St,At)};dt(lt,St=>{a()&&St(yt)})}var Ot=et(lt,2);{var Vt=St=>{var At=bL(),qt=G(At);zx(qt,{get segmentation(){return S},get width(){return t.sample.width},get colorFill(){return d(L)},get opacity(){return d(F)}}),W(At),Rt(()=>Pt(At,"viewBox",`${b} ${w} ${p} ${v}`)),_(St,At)};dt(Ot,St=>{M&&St(Vt)})}W(pt),W(rt),Rt((St,At,qt)=>{ht=Kn(rt,1,"crop rounded-lg bg-black svelte-tm55hc",null,ht,St),Gn(rt,`
469
+ width: ${t.containerWidth}px;
470
+ height: ${t.containerHeight}px;
471
+ background-image: url("${t.sample.url}");
472
+ background-position: ${d(U)}px ${d(q)}px;
473
+ background-size: ${t.sample.width*d(x)}px ${t.sample.height*d(x)}px;
474
+ background-repeat: no-repeat;
475
+ `),wt=Kn(pt,1,"annotation-box svelte-tm55hc",null,wt,At),Gn(pt,qt)},[()=>({"annotation-selected":c()}),()=>({invisible:i()}),()=>`
476
+ left: ${(t.containerWidth-p*d(x))/2}px;
477
+ top: ${(t.containerHeight-v*d(x))/2}px;
478
+ width: ${p*d(x)}px;
479
+ height: ${v*d(x)}px;
480
+ border-color: ${M?"transparent":d(R)??oo(D).color};
481
+ background-color: ${M?"transparent":d(L)??oo(D,.4).color};
482
+ border-style: solid;
483
+
484
+ `]),_(J,rt)},it=J=>{var rt=yL();Rt(()=>Gn(rt,`width: ${t.containerWidth}px; height: ${t.containerHeight}px;`)),_(J,rt)};dt(nt,J=>{t.sample?J(z):J(it,!1)})}_(e,tt),at(),l()}function wL(e,t){st(t,!0);let n=P(t,"cachedDatasetVersion",3,""),i=P(t,"showLabel",3,!0),s=P(t,"selected",3,!1);const{getDatasetVersion:l}=ii();let a=ft(On(n())),c=ft(!!n());const f=E(()=>d(c));se(()=>{var w,S;!n()&&((S=(w=t.image)==null?void 0:w.sample)!=null&&S.dataset_id)&&!d(c)&&(async()=>{const x=await l(t.image.sample.dataset_id);O(a,x,!0),O(c,!0)})(),n()&&!d(c)&&O(c,!0)});const h=E(()=>t.image?`${_y}/sample/${t.image.sample_id}${d(a)?`?v=${d(a)}`:""}`:""),g=E(()=>({width:t.image.width,height:t.image.height,url:d(h)}));var p=K(),v=N(p);{var b=w=>{px(w,{get annotation(){return t.annotation},get containerHeight(){return t.containerHeight},get sample(){return d(g)},get containerWidth(){return t.containerWidth},get showLabel(){return i()},get selected(){return s()}})};dt(v,w=>{d(f)&&w(b)})}_(e,p),at()}function xL(e,t){st(t,!0);let n=P(t,"showLabel",3,!0),i=P(t,"selected",3,!1);const s=E(()=>({width:t.videoFrame.video.width,height:t.videoFrame.video.height,url:`${VT}/${t.videoFrame.sample_id}`}));px(e,{get annotation(){return t.annotation},get containerHeight(){return t.containerHeight},get sample(){return d(s)},get containerWidth(){return t.containerWidth},get showLabel(){return n()},get selected(){return i()}}),at()}function SL(e,t){st(t,!0);let n=P(t,"cachedDatasetVersion",3,""),i=P(t,"showLabel",3,!0),s=P(t,"selected",3,!1);var l=K(),a=N(l);{var c=h=>{wL(h,{get annotation(){return t.annotation.annotation},get image(){return t.annotation.parent_sample_data},get containerWidth(){return t.width},get containerHeight(){return t.height},get cachedDatasetVersion(){return n()},get showLabel(){return i()},get selected(){return s()}})},f=h=>{var g=K(),p=N(g);{var v=b=>{xL(b,{get annotation(){return t.annotation.annotation},get videoFrame(){return t.annotation.parent_sample_data},get containerWidth(){return t.width},get containerHeight(){return t.height},get showLabel(){return i()},get selected(){return s()}})};dt(p,b=>{(t.annotation.parent_sample_type==Yg.VIDEO_FRAME||t.annotation.parent_sample_type==Yg.VIDEO)&&b(v)},!0)}_(h,g)};dt(a,h=>{t.annotation.parent_sample_type==Yg.IMAGE?h(c):h(f,!1)})}_(e,l),at()}var CL=Z("<div><!></div>");function vx(e,t){st(t,!0);var n=CL(),i=G(n);ut(i,()=>t.children),W(n),Rt(s=>Kn(n,1,s),[()=>zo(ce("rounded-lg border border-gray-800 bg-black",t.className))]),_(e,n),at()}var AL=Z("<div><!></div>");function mx(e,t){st(t,!0);var n=AL(),i=G(n);ut(i,()=>t.children),W(n),Rt(s=>Kn(n,1,s),[()=>zo(ce("p-4",t.className))]),_(e,n),at()}var PL=Z(`<span class="bg-secondary relative grow overflow-hidden rounded-full data-[orientation='horizontal']:h-2 data-[orientation='vertical']:h-full data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-2"><!></span> <!>`,1);function kL(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"value",15),s=P(t,"orientation",3,"horizontal"),l=xt(t,["$$slots","$$events","$$legacy","ref","value","orientation","class"]);var a=K(),c=N(a);{const f=(g,p)=>{let v=()=>p==null?void 0:p().thumbs;var b=PL(),w=N(b),S=G(w);_t(S,()=>N5,(A,T)=>{T(A,{class:"bg-primary absolute data-[orientation='horizontal']:h-full data-[orientation='vertical']:w-full"})}),W(w);var x=et(w,2);Qn(x,17,v,Rs,(A,T)=>{var D=K(),R=N(D);_t(R,()=>D5,(L,F)=>{F(L,{get index(){return d(T)},class:"border-primary bg-background ring-offset-background focus-visible:ring-ring block size-5 rounded-full border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})}),_(A,D)}),Rt(()=>Pt(w,"data-orientation",s())),_(g,b)};let h=E(()=>ce("relative flex touch-none select-none items-center data-[orientation='vertical']:h-full data-[orientation='vertical']:min-h-44 data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-auto data-[orientation='vertical']:flex-col",t.class));_t(c,()=>O5,(g,p)=>{p(g,Ft({get orientation(){return s()},get class(){return d(h)}},()=>l,{get ref(){return n()},set ref(v){n(v)},get value(){return i()},set value(v){i(v)},children:f,$$slots:{default:!0}}))})}_(e,a),at()}const TL=HO,EL=KO,IL=UO,OL=e=>e;function bx(e){const t=e-1;return t*t*t+1}function T0(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function r7(e,{delay:t=0,duration:n=400,easing:i=OL}={}){const s=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:l=>`opacity: ${l*s}`}}function _x(e,{delay:t=0,duration:n=400,easing:i=bx,x:s=0,y:l=0,opacity:a=0}={}){const c=getComputedStyle(e),f=+c.opacity,h=c.transform==="none"?"":c.transform,g=f*(1-a),[p,v]=T0(s),[b,w]=T0(l);return{delay:t,duration:n,easing:i,css:(S,x)=>`
485
+ transform: ${h} translate(${(1-S)*p}${v}, ${(1-S)*b}${w});
486
+ opacity: ${f-g*x}`}}function RL(e,{delay:t=0,duration:n=400,easing:i=bx,axis:s="y"}={}){const l=getComputedStyle(e),a=+l.opacity,c=s==="y"?"height":"width",f=parseFloat(l[c]),h=s==="y"?["top","bottom"]:["left","right"],g=h.map(A=>`${A[0].toUpperCase()}${A.slice(1)}`),p=parseFloat(l[`padding${g[0]}`]),v=parseFloat(l[`padding${g[1]}`]),b=parseFloat(l[`margin${g[0]}`]),w=parseFloat(l[`margin${g[1]}`]),S=parseFloat(l[`border${g[0]}Width`]),x=parseFloat(l[`border${g[1]}Width`]);return{delay:t,duration:n,easing:i,css:A=>`overflow: hidden;opacity: ${Math.min(A*20,1)*a};${c}: ${A*f}px;padding-${h[0]}: ${A*p}px;padding-${h[1]}: ${A*v}px;margin-${h[0]}: ${A*b}px;margin-${h[1]}: ${A*w}px;border-${h[0]}-width: ${A*S}px;border-${h[1]}-width: ${A*x}px;min-${c}: 0`}}var NL=Z('<h2 class="py-2 text-lg font-semibold"><div class="flex items-center justify-between"><div class="flex items-center space-x-2"><!> <span> </span></div> <div><!></div></div></h2>'),ML=Z('<div class="mt-2"><!></div>'),DL=Z("<!> <!>",1);function Ls(e,t){let n=ft(!0);const i=168;TL(e,{get open(){return d(n)},set open(s){O(n,s,!0)},children:(s,l)=>{var a=DL(),c=N(a);EL(c,{class:"w-full",children:(h,g)=>{var p=NL(),v=G(p),b=G(v),w=G(b);{var S=R=>{var L=K(),F=N(L);_t(F,()=>t.icon,(M,U)=>{U(M,{})}),_(R,L)};dt(w,R=>{t.icon&&R(S)})}var x=et(w,2),A=G(x,!0);W(x),W(b);var T=et(b,2),D=G(T);{let R=E(()=>`transform: ${d(n)?"rotate(-180deg)":"rotate(0deg)"}`);ph(D,{class:"transition-transform duration-168",get style(){return d(R)}})}W(T),W(v),W(p),Rt(()=>$t(A,t.title)),_(h,p)},$$slots:{default:!0}});var f=et(c,2);IL(f,{forceMount:!0,children:(h,g)=>{var p=K(),v=N(p);{var b=w=>{var S=ML(),x=G(S);ut(x,()=>t.children),W(S),fv(3,S,()=>RL,()=>({duration:i})),_(w,S)};dt(v,w=>{d(n)&&w(b)})}_(h,p)},$$slots:{default:!0}}),_(s,a)},$$slots:{default:!0}})}const Yv=Uo("lightlyStudio_video_frames_bounds_values",null),Xv=Uo("lightlyStudio_video_frames_bounds",null),E0=Le(!1),LL=async e=>{if(xn(E0))return;const{data:t}=await HT({path:{video_frame_dataset_id:e}});E0.set(!0),t&&(Yv.set(t),Xv.set(t))},FL=e=>{Xv.set(e)},BL=e=>{Yv.set(e)},i7=e=>(e&&LL(e),{videoFramesBounds:Xv,videoFramesBoundsValues:Yv,updateVideoFramesBounds:FL,updateVideoFramesBoundsValues:BL}),jv=Uo("lightlyStudio_video_bounds_values",null),Zv=Uo("lightlyStudio_video_bounds",null),I0=Le(!1),zL=async e=>{if(xn(I0))return;const{data:t}=await WT({path:{dataset_id:e},body:{annotations_frames_labels_id:null}});I0.set(!0),t&&(jv.set(t),Zv.set(t))},VL=e=>{Zv.set(e)},HL=e=>{jv.set(e)},o7=e=>(e&&zL(e),{videoBounds:Zv,videoBoundsValues:jv,updateVideoBounds:VL,updateVideoBoundsValues:HL});function WL(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("py-1.5 pl-8 pr-2 text-sm font-semibold",t.class));_t(l,()=>MN,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}var UL=Z('<span class="absolute left-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function $p(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var s=K(),l=N(s);{const a=(f,h)=>{let g=()=>h==null?void 0:h().selected,p=()=>h==null?void 0:h().highlighted;var v=UL(),b=N(v),w=G(b);{var S=D=>{gh(D,{class:"size-4"})};dt(w,D=>{g()&&D(S)})}W(b);var x=et(b,2);{var A=D=>{var R=K(),L=N(R);ut(L,()=>t.children,()=>({selected:g(),highlighted:p()})),_(D,R)},T=D=>{var R=oe();Rt(()=>$t(R,t.label||t.value)),_(D,R)};dt(x,D=>{t.children?D(A):D(T,!1)})}_(f,v)};let c=E(()=>ce("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class));_t(l,()=>IN,(f,h)=>{h(f,Ft({get value(){return t.value},get class(){return d(c)}},()=>i,{get ref(){return n()},set ref(g){n(g)},children:a,$$slots:{default:!0}}))})}_(e,s),at()}function GL(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("flex cursor-default items-center justify-center py-1",t.class));_t(l,()=>WN,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{xE(h,{class:"size-4"})},$$slots:{default:!0}}))})}_(e,s),at()}function KL(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("flex cursor-default items-center justify-center py-1",t.class));_t(l,()=>zN,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{ph(h,{class:"size-4"})},$$slots:{default:!0}}))})}_(e,s),at()}var qL=Z("<!> <!> <!>",1);function yx(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"sideOffset",3,4),s=xt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]);var l=K(),a=N(l);_t(a,()=>yh,(c,f)=>{f(c,Ft(()=>t.portalProps,{children:(h,g)=>{var p=K(),v=N(p);{let b=E(()=>ce("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t.class));_t(v,()=>kN,(w,S)=>{S(w,Ft({get sideOffset(){return i()},get class(){return d(b)}},()=>s,{get ref(){return n()},set ref(x){n(x)},children:(x,A)=>{var T=qL(),D=N(T);GL(D,{});var R=et(D,2);{let F=E(()=>ce("h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"));_t(R,()=>LN,(M,U)=>{U(M,{get class(){return d(F)},children:(q,tt)=>{var nt=K(),z=N(nt);ut(z,()=>t.children??Ct),_(q,nt)},$$slots:{default:!0}})})}var L=et(R,2);KL(L,{}),_(x,T)},$$slots:{default:!0}}))})}_(h,p)},$$slots:{default:!0}}))}),_(e,l),at()}var YL=Z("<!> <!>",1);function wx(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=K(),l=N(s);{let a=E(()=>ce("border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t.class));_t(l,()=>b5,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{var p=YL(),v=N(p);ut(v,()=>t.children??Ct);var b=et(v,2);ph(b,{class:"size-4 opacity-50"}),_(h,p)},$$slots:{default:!0}}))})}_(e,s),at()}const xx=v5,XL=RN;function O0(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",t.class));_t(l,()=>u4,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}function jL(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",t.class));_t(l,()=>f4,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}function R0(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",t.class));_t(l,()=>g4,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}const ZL=l4,QL=ux({base:"[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}});var JL=Z("<div><!></div>");function s7(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"variant",3,"default"),s=xt(t,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var l=JL();Yt(l,c=>({class:c,...s,role:"alert"}),[()=>ce(QL({variant:i()}),t.class)]);var a=G(l);ut(a,()=>t.children??Ct),W(l),Rn(l,c=>n(c),()=>n()),_(e,l),at()}const ap=Le(!1);function $L(){return{isExportDialogOpen:ap,openExportDialog:()=>{ap.set(!0)},closeExportDialog:()=>{ap.set(!1)}}}var tF=Z('<div class="size-3.5"></div>'),eF=Z('<div class="flex size-4 items-center justify-center text-current"><!></div>');function Sx(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"checked",15,!1),s=P(t,"indeterminate",15,!1),l=xt(t,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var a=K(),c=N(a);{const f=(g,p)=>{let v=()=>p==null?void 0:p().checked,b=()=>p==null?void 0:p().indeterminate;var w=eF(),S=G(w);{var x=T=>{var D=K(),R=N(D);W_(R,()=>V_(()=>import("./0dDyq72A.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),null,(L,F)=>{var M=E(()=>{var{default:nt}=d(F);return{Minus:nt}}),U=E(()=>d(M).Minus),q=K(),tt=N(q);_t(tt,()=>d(U),(nt,z)=>{z(nt,{class:"size-3.5"})}),_(L,q)}),_(T,D)},A=T=>{var D=K(),R=N(D);{var L=M=>{var U=K(),q=N(U);W_(q,()=>V_(()=>Promise.resolve().then(()=>NE),void 0,import.meta.url),null,(tt,nt)=>{var z=E(()=>{var{default:J}=d(nt);return{Check:J}}),it=E(()=>d(z).Check),X=K(),j=N(X);_t(j,()=>d(it),(J,rt)=>{rt(J,{class:"size-3.5"})}),_(tt,X)}),_(M,U)},F=M=>{var U=tF();_(M,U)};dt(R,M=>{v()?M(L):M(F,!1)},!0)}_(T,D)};dt(S,T=>{b()?T(x):T(A,!1)})}W(w),_(g,w)};let h=E(()=>ce("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content size-4 shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",t.class));_t(c,()=>IO,(g,p)=>{p(g,Ft({get class(){return d(h)}},()=>l,{get ref(){return n()},set ref(v){n(v)},get checked(){return i()},set checked(v){i(v)},get indeterminate(){return s()},set indeterminate(v){s(v)},children:f,$$slots:{default:!0}}))})}_(e,a),at()}function Ai(e,t){st(t,!0);let n=P(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),l=N(s);{let a=E(()=>ce("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class));_t(l,()=>h5,(c,f)=>{f(c,Ft({get class(){return d(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}_(e,s),at()}var nF=Z('<div class="text-xs text-muted-foreground"> </div>'),rF=Z('<div class="flex flex-col gap-2"><div class="flex gap-2"><!> <!></div> <!></div>');function iF(e,t){const n=P(t,"isChecked",3,!1),i=P(t,"disabled",3,!1);var s=rF(),l=G(s),a=G(l);{let g=E(()=>`${t.name}-label`);Sx(a,{get id(){return t.name},get"aria-labelledby"(){return d(g)},get checked(){return n()},get onCheckedChange(){return t.onCheckedChange},get disabled(){return i()}})}var c=et(a,2);{let g=E(()=>`${t.name}-label`);Ai(c,{get id(){return d(g)},get for(){return t.name},class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70","data-testid":"tags-menu-label",children:(p,v)=>{jt();var b=oe();Rt(()=>$t(b,t.label)),_(p,b)},$$slots:{default:!0}})}W(l);var f=et(l,2);{var h=g=>{var p=nF(),v=G(p,!0);W(p),Rt(()=>$t(v,t.helperText)),_(g,p)};dt(f,g=>{t.helperText&&g(h)})}W(s),_(e,s)}const lp=Le(!1),cp=Le("create"),up=Le(null);function Qv(){return{isDialogOpen:lp,activeTab:cp,scrollToClassifierId:up,openClassifiersMenu:()=>{lp.set(!0)},closeClassifiersMenu:()=>{lp.set(!1)},switchToManageTab:()=>{cp.set("manage")},switchToCreateTab:()=>{cp.set("create")},scrollToAndSelectClassifier:l=>{up.set(l),setTimeout(()=>{up.set(null)},100)}}}const dp=Le(!1);function oF(){return{isSelectionDialogOpen:dp,openSelectionDialog:()=>{dp.set(!0)},closeSelectionDialog:()=>{dp.set(!1)}}}const fp=Le(!1);function Cx(){return{isSettingsDialogOpen:fp,openSettingsDialog:()=>{fp.set(!0)},closeSettingsDialog:()=>{fp.set(!1)}}}const hp=Le(!1);function sF(){return{isOperatorsDialogOpen:hp,openOperatorsDialog:()=>{hp.set(!0)},closeOperatorsDialog:()=>{hp.set(!1)}}}var aF=Z("<span>Menu</span> <!>",1),lF=(e,t,n)=>t(d(n).onSelect),cF=Z('<button type="button" class="flex w-full items-center justify-between rounded px-3 py-2 text-left text-sm transition hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="flex items-center gap-2"><!> <span> </span></div> <!></button>'),uF=Z('<div class="flex flex-col"></div>'),dF=Z("<!> <!>",1);function a7(e,t){st(t,!0);let n=P(t,"isSamples",3,!1),i=P(t,"hasEmbeddingSearch",3,!1),s=P(t,"isFSCEnabled",3,!1);const{openClassifiersMenu:l}=Qv(),{openSelectionDialog:a}=oF(),{openExportDialog:c}=$L(),{openSettingsDialog:f}=Cx(),{openOperatorsDialog:h}=sF();let g=ft(!1);const p=E(()=>n()&&i()&&s()),v=E(n),b=E(()=>t.dataset.sample_type=="image"),w=E(()=>{const x=[];return d(p)&&x.push({icon:yE,label:"Few Shot Classifier",onSelect:l,testId:"menu-classifiers"}),d(v)&&x.push({icon:RE,label:"Selection",onSelect:a,testId:"menu-selection"}),x.push({icon:kE,label:"Plugins",onSelect:h,testId:"menu-operators"}),d(b)&&x.push({icon:Iy,label:"Export",onSelect:c,testId:"menu-export"}),x.push({icon:EE,label:"Settings",onSelect:f,testId:"menu-settings"}),x});function S(x){O(g,!1),x()}Th(e,{get open(){return d(g)},set open(x){O(g,x,!0)},children:(x,A)=>{var T=dF(),D=N(T);Eh(D,{children:(L,F)=>{In(L,{variant:"ghost",class:"nav-button flex items-center space-x-2","data-testid":"menu-trigger",children:(M,U)=>{var q=aF(),tt=et(N(q),2);ph(tt,{class:"size-4"}),_(M,q)},$$slots:{default:!0}})},$$slots:{default:!0}});var R=et(D,2);kh(R,{class:"w-64 p-2",children:(L,F)=>{var M=uF();Qn(M,21,()=>d(w),U=>U.testId,(U,q)=>{var tt=cF();tt.__click=[lF,S,q];var nt=G(tt),z=G(nt);_t(z,()=>d(q).icon,(J,rt)=>{rt(J,{class:"size-4 text-muted-foreground"})});var it=et(z,2),X=G(it,!0);W(it),W(nt);var j=et(nt,2);wE(j,{class:"size-4 text-muted-foreground"}),W(tt),Rt(()=>{Pt(tt,"data-testid",d(q).testId),$t(X,d(q).label)}),_(U,tt)}),W(M),_(L,M)},$$slots:{default:!0}}),_(x,T)},$$slots:{default:!0}}),at()}ar(["click"]);var Ef={exports:{}};/**
487
+ * @license
488
+ * Lodash <https://lodash.com/>
489
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
490
+ * Released under MIT license <https://lodash.com/license>
491
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
492
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
493
+ */Ef.exports;(function(e,t){(function(){var n,i="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,g="__lodash_placeholder__",p=1,v=2,b=4,w=1,S=2,x=1,A=2,T=4,D=8,R=16,L=32,F=64,M=128,U=256,q=512,tt=30,nt="...",z=800,it=16,X=1,j=2,J=3,rt=1/0,ht=9007199254740991,pt=17976931348623157e292,wt=NaN,lt=4294967295,yt=lt-1,Ot=lt>>>1,Vt=[["ary",M],["bind",x],["bindKey",A],["curry",D],["curryRight",R],["flip",q],["partial",L],["partialRight",F],["rearg",U]],St="[object Arguments]",At="[object Array]",qt="[object AsyncFunction]",kt="[object Boolean]",Wt="[object Date]",Lt="[object DOMException]",Ie="[object Error]",_e="[object Function]",Me="[object GeneratorFunction]",Dt="[object Map]",Ht="[object Number]",Ae="[object Null]",Nt="[object Object]",ne="[object Promise]",Ut="[object Proxy]",he="[object RegExp]",ae="[object Set]",te="[object String]",It="[object Symbol]",Xt="[object Undefined]",ge="[object WeakMap]",an="[object WeakSet]",vn="[object ArrayBuffer]",rn="[object DataView]",pe="[object Float32Array]",fe="[object Float64Array]",on="[object Int8Array]",De="[object Int16Array]",Fe="[object Int32Array]",Ge="[object Uint8Array]",Ne="[object Uint8ClampedArray]",Pe="[object Uint16Array]",ln="[object Uint32Array]",mn=/\b__p \+= '';/g,Oe=/\b(__p \+=) '' \+/g,Re=/(__e\(.*?\)|\b__t\)) \+\n'';/g,je=/&(?:amp|lt|gt|quot|#39);/g,un=/[&<>"']/g,Bn=RegExp(je.source),Gt=RegExp(un.source),re=/<%-([\s\S]+?)%>/g,Bt=/<%([\s\S]+?)%>/g,Be=/<%=([\s\S]+?)%>/g,bn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ze=/[\\^$.*+?()[\]{}|]/g,Qe=RegExp(ze.source),qe=/^\s+/,fn=/\s/,We=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Je=/\{\n\/\* \[wrapped with (.+)\] \*/,_n=/,? & /,Tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rr=/[()=,{}\[\]\/\s]/,qn=/\\(\\)?/g,cr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cn=/\w*$/,ur=/^[-+]0x[0-9a-f]+$/i,ci=/^0b[01]+$/i,dr=/^\[object .+?Constructor\]$/,Sn=/^0o[0-7]+$/i,zn=/^(?:0|[1-9]\d*)$/,Vn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nn=/($^)/,mo=/['\n\r\u2028\u2029\\]/g,An="\\ud800-\\udfff",hn="\\u0300-\\u036f",Hn="\\ufe20-\\ufe2f",qr="\\u20d0-\\u20ff",ui=hn+Hn+qr,di="\\u2700-\\u27bf",Hi="a-z\\xdf-\\xf6\\xf8-\\xff",nd="\\xac\\xb1\\xd7\\xf7",bo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ko="\\u2000-\\u206f",js=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yr="A-Z\\xc0-\\xd6\\xd8-\\xde",Nr="\\ufe0e\\ufe0f",Wi=nd+bo+Ko+js,_o="['’]",n1="["+An+"]",lm="["+Wi+"]",rd="["+ui+"]",cm="\\d+",r1="["+di+"]",um="["+Hi+"]",dm="[^"+An+Wi+cm+di+Hi+Yr+"]",Lh="\\ud83c[\\udffb-\\udfff]",i1="(?:"+rd+"|"+Lh+")",fm="[^"+An+"]",Fh="(?:\\ud83c[\\udde6-\\uddff]){2}",Bh="[\\ud800-\\udbff][\\udc00-\\udfff]",qo="["+Yr+"]",hm="\\u200d",gm="(?:"+um+"|"+dm+")",o1="(?:"+qo+"|"+dm+")",pm="(?:"+_o+"(?:d|ll|m|re|s|t|ve))?",vm="(?:"+_o+"(?:D|LL|M|RE|S|T|VE))?",mm=i1+"?",bm="["+Nr+"]?",s1="(?:"+hm+"(?:"+[fm,Fh,Bh].join("|")+")"+bm+mm+")*",a1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",l1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",_m=bm+mm+s1,c1="(?:"+[r1,Fh,Bh].join("|")+")"+_m,u1="(?:"+[fm+rd+"?",rd,Fh,Bh,n1].join("|")+")",d1=RegExp(_o,"g"),f1=RegExp(rd,"g"),zh=RegExp(Lh+"(?="+Lh+")|"+u1+_m,"g"),h1=RegExp([qo+"?"+um+"+"+pm+"(?="+[lm,qo,"$"].join("|")+")",o1+"+"+vm+"(?="+[lm,qo+gm,"$"].join("|")+")",qo+"?"+gm+"+"+pm,qo+"+"+vm,l1,a1,cm,c1].join("|"),"g"),g1=RegExp("["+hm+An+ui+Nr+"]"),p1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,v1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],m1=-1,$e={};$e[pe]=$e[fe]=$e[on]=$e[De]=$e[Fe]=$e[Ge]=$e[Ne]=$e[Pe]=$e[ln]=!0,$e[St]=$e[At]=$e[vn]=$e[kt]=$e[rn]=$e[Wt]=$e[Ie]=$e[_e]=$e[Dt]=$e[Ht]=$e[Nt]=$e[he]=$e[ae]=$e[te]=$e[ge]=!1;var Ze={};Ze[St]=Ze[At]=Ze[vn]=Ze[rn]=Ze[kt]=Ze[Wt]=Ze[pe]=Ze[fe]=Ze[on]=Ze[De]=Ze[Fe]=Ze[Dt]=Ze[Ht]=Ze[Nt]=Ze[he]=Ze[ae]=Ze[te]=Ze[It]=Ze[Ge]=Ze[Ne]=Ze[Pe]=Ze[ln]=!0,Ze[Ie]=Ze[_e]=Ze[ge]=!1;var b1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},y1={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},w1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},x1=parseFloat,S1=parseInt,ym=typeof ti=="object"&&ti&&ti.Object===Object&&ti,C1=typeof self=="object"&&self&&self.Object===Object&&self,Mn=ym||C1||Function("return this")(),Vh=t&&!t.nodeType&&t,yo=Vh&&!0&&e&&!e.nodeType&&e,wm=yo&&yo.exports===Vh,Hh=wm&&ym.process,xr=function(){try{var Q=yo&&yo.require&&yo.require("util").types;return Q||Hh&&Hh.binding&&Hh.binding("util")}catch{}}(),xm=xr&&xr.isArrayBuffer,Sm=xr&&xr.isDate,Cm=xr&&xr.isMap,Am=xr&&xr.isRegExp,Pm=xr&&xr.isSet,km=xr&&xr.isTypedArray;function fr(Q,gt,ct){switch(ct.length){case 0:return Q.call(gt);case 1:return Q.call(gt,ct[0]);case 2:return Q.call(gt,ct[0],ct[1]);case 3:return Q.call(gt,ct[0],ct[1],ct[2])}return Q.apply(gt,ct)}function A1(Q,gt,ct,Mt){for(var ie=-1,Ve=Q==null?0:Q.length;++ie<Ve;){var Pn=Q[ie];gt(Mt,Pn,ct(Pn),Q)}return Mt}function Sr(Q,gt){for(var ct=-1,Mt=Q==null?0:Q.length;++ct<Mt&&gt(Q[ct],ct,Q)!==!1;);return Q}function P1(Q,gt){for(var ct=Q==null?0:Q.length;ct--&&gt(Q[ct],ct,Q)!==!1;);return Q}function Tm(Q,gt){for(var ct=-1,Mt=Q==null?0:Q.length;++ct<Mt;)if(!gt(Q[ct],ct,Q))return!1;return!0}function Ui(Q,gt){for(var ct=-1,Mt=Q==null?0:Q.length,ie=0,Ve=[];++ct<Mt;){var Pn=Q[ct];gt(Pn,ct,Q)&&(Ve[ie++]=Pn)}return Ve}function id(Q,gt){var ct=Q==null?0:Q.length;return!!ct&&Yo(Q,gt,0)>-1}function Wh(Q,gt,ct){for(var Mt=-1,ie=Q==null?0:Q.length;++Mt<ie;)if(ct(gt,Q[Mt]))return!0;return!1}function sn(Q,gt){for(var ct=-1,Mt=Q==null?0:Q.length,ie=Array(Mt);++ct<Mt;)ie[ct]=gt(Q[ct],ct,Q);return ie}function Gi(Q,gt){for(var ct=-1,Mt=gt.length,ie=Q.length;++ct<Mt;)Q[ie+ct]=gt[ct];return Q}function Uh(Q,gt,ct,Mt){var ie=-1,Ve=Q==null?0:Q.length;for(Mt&&Ve&&(ct=Q[++ie]);++ie<Ve;)ct=gt(ct,Q[ie],ie,Q);return ct}function k1(Q,gt,ct,Mt){var ie=Q==null?0:Q.length;for(Mt&&ie&&(ct=Q[--ie]);ie--;)ct=gt(ct,Q[ie],ie,Q);return ct}function Gh(Q,gt){for(var ct=-1,Mt=Q==null?0:Q.length;++ct<Mt;)if(gt(Q[ct],ct,Q))return!0;return!1}var T1=Kh("length");function E1(Q){return Q.split("")}function I1(Q){return Q.match(Tn)||[]}function Em(Q,gt,ct){var Mt;return ct(Q,function(ie,Ve,Pn){if(gt(ie,Ve,Pn))return Mt=Ve,!1}),Mt}function od(Q,gt,ct,Mt){for(var ie=Q.length,Ve=ct+(Mt?1:-1);Mt?Ve--:++Ve<ie;)if(gt(Q[Ve],Ve,Q))return Ve;return-1}function Yo(Q,gt,ct){return gt===gt?W1(Q,gt,ct):od(Q,Im,ct)}function O1(Q,gt,ct,Mt){for(var ie=ct-1,Ve=Q.length;++ie<Ve;)if(Mt(Q[ie],gt))return ie;return-1}function Im(Q){return Q!==Q}function Om(Q,gt){var ct=Q==null?0:Q.length;return ct?Yh(Q,gt)/ct:wt}function Kh(Q){return function(gt){return gt==null?n:gt[Q]}}function qh(Q){return function(gt){return Q==null?n:Q[gt]}}function Rm(Q,gt,ct,Mt,ie){return ie(Q,function(Ve,Pn,Xe){ct=Mt?(Mt=!1,Ve):gt(ct,Ve,Pn,Xe)}),ct}function R1(Q,gt){var ct=Q.length;for(Q.sort(gt);ct--;)Q[ct]=Q[ct].value;return Q}function Yh(Q,gt){for(var ct,Mt=-1,ie=Q.length;++Mt<ie;){var Ve=gt(Q[Mt]);Ve!==n&&(ct=ct===n?Ve:ct+Ve)}return ct}function Xh(Q,gt){for(var ct=-1,Mt=Array(Q);++ct<Q;)Mt[ct]=gt(ct);return Mt}function N1(Q,gt){return sn(gt,function(ct){return[ct,Q[ct]]})}function Nm(Q){return Q&&Q.slice(0,Fm(Q)+1).replace(qe,"")}function hr(Q){return function(gt){return Q(gt)}}function jh(Q,gt){return sn(gt,function(ct){return Q[ct]})}function Zs(Q,gt){return Q.has(gt)}function Mm(Q,gt){for(var ct=-1,Mt=Q.length;++ct<Mt&&Yo(gt,Q[ct],0)>-1;);return ct}function Dm(Q,gt){for(var ct=Q.length;ct--&&Yo(gt,Q[ct],0)>-1;);return ct}function M1(Q,gt){for(var ct=Q.length,Mt=0;ct--;)Q[ct]===gt&&++Mt;return Mt}var D1=qh(b1),L1=qh(_1);function F1(Q){return"\\"+w1[Q]}function B1(Q,gt){return Q==null?n:Q[gt]}function Xo(Q){return g1.test(Q)}function z1(Q){return p1.test(Q)}function V1(Q){for(var gt,ct=[];!(gt=Q.next()).done;)ct.push(gt.value);return ct}function Zh(Q){var gt=-1,ct=Array(Q.size);return Q.forEach(function(Mt,ie){ct[++gt]=[ie,Mt]}),ct}function Lm(Q,gt){return function(ct){return Q(gt(ct))}}function Ki(Q,gt){for(var ct=-1,Mt=Q.length,ie=0,Ve=[];++ct<Mt;){var Pn=Q[ct];(Pn===gt||Pn===g)&&(Q[ct]=g,Ve[ie++]=ct)}return Ve}function sd(Q){var gt=-1,ct=Array(Q.size);return Q.forEach(function(Mt){ct[++gt]=Mt}),ct}function H1(Q){var gt=-1,ct=Array(Q.size);return Q.forEach(function(Mt){ct[++gt]=[Mt,Mt]}),ct}function W1(Q,gt,ct){for(var Mt=ct-1,ie=Q.length;++Mt<ie;)if(Q[Mt]===gt)return Mt;return-1}function U1(Q,gt,ct){for(var Mt=ct+1;Mt--;)if(Q[Mt]===gt)return Mt;return Mt}function jo(Q){return Xo(Q)?K1(Q):T1(Q)}function Mr(Q){return Xo(Q)?q1(Q):E1(Q)}function Fm(Q){for(var gt=Q.length;gt--&&fn.test(Q.charAt(gt)););return gt}var G1=qh(y1);function K1(Q){for(var gt=zh.lastIndex=0;zh.test(Q);)++gt;return gt}function q1(Q){return Q.match(zh)||[]}function Y1(Q){return Q.match(h1)||[]}var X1=function Q(gt){gt=gt==null?Mn:Zo.defaults(Mn.Object(),gt,Zo.pick(Mn,v1));var ct=gt.Array,Mt=gt.Date,ie=gt.Error,Ve=gt.Function,Pn=gt.Math,Xe=gt.Object,Qh=gt.RegExp,j1=gt.String,Cr=gt.TypeError,ad=ct.prototype,Z1=Ve.prototype,Qo=Xe.prototype,ld=gt["__core-js_shared__"],cd=Z1.toString,Ye=Qo.hasOwnProperty,Q1=0,Bm=function(){var r=/[^.]+$/.exec(ld&&ld.keys&&ld.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),ud=Qo.toString,J1=cd.call(Xe),$1=Mn._,tS=Qh("^"+cd.call(Ye).replace(ze,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dd=wm?gt.Buffer:n,qi=gt.Symbol,fd=gt.Uint8Array,zm=dd?dd.allocUnsafe:n,hd=Lm(Xe.getPrototypeOf,Xe),Vm=Xe.create,Hm=Qo.propertyIsEnumerable,gd=ad.splice,Wm=qi?qi.isConcatSpreadable:n,Qs=qi?qi.iterator:n,wo=qi?qi.toStringTag:n,pd=function(){try{var r=Po(Xe,"defineProperty");return r({},"",{}),r}catch{}}(),eS=gt.clearTimeout!==Mn.clearTimeout&&gt.clearTimeout,nS=Mt&&Mt.now!==Mn.Date.now&&Mt.now,rS=gt.setTimeout!==Mn.setTimeout&&gt.setTimeout,vd=Pn.ceil,md=Pn.floor,Jh=Xe.getOwnPropertySymbols,iS=dd?dd.isBuffer:n,Um=gt.isFinite,oS=ad.join,sS=Lm(Xe.keys,Xe),kn=Pn.max,Wn=Pn.min,aS=Mt.now,lS=gt.parseInt,Gm=Pn.random,cS=ad.reverse,$h=Po(gt,"DataView"),Js=Po(gt,"Map"),tg=Po(gt,"Promise"),Jo=Po(gt,"Set"),$s=Po(gt,"WeakMap"),ta=Po(Xe,"create"),bd=$s&&new $s,$o={},uS=ko($h),dS=ko(Js),fS=ko(tg),hS=ko(Jo),gS=ko($s),_d=qi?qi.prototype:n,ea=_d?_d.valueOf:n,Km=_d?_d.toString:n;function k(r){if(gn(r)&&!le(r)&&!(r instanceof Te)){if(r instanceof Ar)return r;if(Ye.call(r,"__wrapped__"))return qb(r)}return new Ar(r)}var ts=function(){function r(){}return function(o){if(!cn(o))return{};if(Vm)return Vm(o);r.prototype=o;var u=new r;return r.prototype=n,u}}();function yd(){}function Ar(r,o){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=n}k.templateSettings={escape:re,evaluate:Bt,interpolate:Be,variable:"",imports:{_:k}},k.prototype=yd.prototype,k.prototype.constructor=k,Ar.prototype=ts(yd.prototype),Ar.prototype.constructor=Ar;function Te(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=lt,this.__views__=[]}function pS(){var r=new Te(this.__wrapped__);return r.__actions__=Jn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Jn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Jn(this.__views__),r}function vS(){if(this.__filtered__){var r=new Te(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function mS(){var r=this.__wrapped__.value(),o=this.__dir__,u=le(r),m=o<0,C=u?r.length:0,I=E2(0,C,this.__views__),B=I.start,Y=I.end,$=Y-B,vt=m?Y:B-1,mt=this.__iteratees__,bt=mt.length,Tt=0,zt=Wn($,this.__takeCount__);if(!u||!m&&C==$&&zt==$)return pb(r,this.__actions__);var Qt=[];t:for(;$--&&Tt<zt;){vt+=o;for(var ye=-1,Jt=r[vt];++ye<bt;){var ke=mt[ye],Ee=ke.iteratee,vr=ke.type,jn=Ee(Jt);if(vr==j)Jt=jn;else if(!jn){if(vr==X)continue t;break t}}Qt[Tt++]=Jt}return Qt}Te.prototype=ts(yd.prototype),Te.prototype.constructor=Te;function xo(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var m=r[o];this.set(m[0],m[1])}}function bS(){this.__data__=ta?ta(null):{},this.size=0}function _S(r){var o=this.has(r)&&delete this.__data__[r];return this.size-=o?1:0,o}function yS(r){var o=this.__data__;if(ta){var u=o[r];return u===f?n:u}return Ye.call(o,r)?o[r]:n}function wS(r){var o=this.__data__;return ta?o[r]!==n:Ye.call(o,r)}function xS(r,o){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=ta&&o===n?f:o,this}xo.prototype.clear=bS,xo.prototype.delete=_S,xo.prototype.get=yS,xo.prototype.has=wS,xo.prototype.set=xS;function fi(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var m=r[o];this.set(m[0],m[1])}}function SS(){this.__data__=[],this.size=0}function CS(r){var o=this.__data__,u=wd(o,r);if(u<0)return!1;var m=o.length-1;return u==m?o.pop():gd.call(o,u,1),--this.size,!0}function AS(r){var o=this.__data__,u=wd(o,r);return u<0?n:o[u][1]}function PS(r){return wd(this.__data__,r)>-1}function kS(r,o){var u=this.__data__,m=wd(u,r);return m<0?(++this.size,u.push([r,o])):u[m][1]=o,this}fi.prototype.clear=SS,fi.prototype.delete=CS,fi.prototype.get=AS,fi.prototype.has=PS,fi.prototype.set=kS;function hi(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var m=r[o];this.set(m[0],m[1])}}function TS(){this.size=0,this.__data__={hash:new xo,map:new(Js||fi),string:new xo}}function ES(r){var o=Nd(this,r).delete(r);return this.size-=o?1:0,o}function IS(r){return Nd(this,r).get(r)}function OS(r){return Nd(this,r).has(r)}function RS(r,o){var u=Nd(this,r),m=u.size;return u.set(r,o),this.size+=u.size==m?0:1,this}hi.prototype.clear=TS,hi.prototype.delete=ES,hi.prototype.get=IS,hi.prototype.has=OS,hi.prototype.set=RS;function So(r){var o=-1,u=r==null?0:r.length;for(this.__data__=new hi;++o<u;)this.add(r[o])}function NS(r){return this.__data__.set(r,f),this}function MS(r){return this.__data__.has(r)}So.prototype.add=So.prototype.push=NS,So.prototype.has=MS;function Dr(r){var o=this.__data__=new fi(r);this.size=o.size}function DS(){this.__data__=new fi,this.size=0}function LS(r){var o=this.__data__,u=o.delete(r);return this.size=o.size,u}function FS(r){return this.__data__.get(r)}function BS(r){return this.__data__.has(r)}function zS(r,o){var u=this.__data__;if(u instanceof fi){var m=u.__data__;if(!Js||m.length<s-1)return m.push([r,o]),this.size=++u.size,this;u=this.__data__=new hi(m)}return u.set(r,o),this.size=u.size,this}Dr.prototype.clear=DS,Dr.prototype.delete=LS,Dr.prototype.get=FS,Dr.prototype.has=BS,Dr.prototype.set=zS;function qm(r,o){var u=le(r),m=!u&&To(r),C=!u&&!m&&Qi(r),I=!u&&!m&&!C&&is(r),B=u||m||C||I,Y=B?Xh(r.length,j1):[],$=Y.length;for(var vt in r)(o||Ye.call(r,vt))&&!(B&&(vt=="length"||C&&(vt=="offset"||vt=="parent")||I&&(vt=="buffer"||vt=="byteLength"||vt=="byteOffset")||mi(vt,$)))&&Y.push(vt);return Y}function Ym(r){var o=r.length;return o?r[dg(0,o-1)]:n}function VS(r,o){return Md(Jn(r),Co(o,0,r.length))}function HS(r){return Md(Jn(r))}function eg(r,o,u){(u!==n&&!Lr(r[o],u)||u===n&&!(o in r))&&gi(r,o,u)}function na(r,o,u){var m=r[o];(!(Ye.call(r,o)&&Lr(m,u))||u===n&&!(o in r))&&gi(r,o,u)}function wd(r,o){for(var u=r.length;u--;)if(Lr(r[u][0],o))return u;return-1}function WS(r,o,u,m){return Yi(r,function(C,I,B){o(m,C,u(C),B)}),m}function Xm(r,o){return r&&jr(o,En(o),r)}function US(r,o){return r&&jr(o,tr(o),r)}function gi(r,o,u){o=="__proto__"&&pd?pd(r,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[o]=u}function ng(r,o){for(var u=-1,m=o.length,C=ct(m),I=r==null;++u<m;)C[u]=I?n:Lg(r,o[u]);return C}function Co(r,o,u){return r===r&&(u!==n&&(r=r<=u?r:u),o!==n&&(r=r>=o?r:o)),r}function Pr(r,o,u,m,C,I){var B,Y=o&p,$=o&v,vt=o&b;if(u&&(B=C?u(r,m,C,I):u(r)),B!==n)return B;if(!cn(r))return r;var mt=le(r);if(mt){if(B=O2(r),!Y)return Jn(r,B)}else{var bt=Un(r),Tt=bt==_e||bt==Me;if(Qi(r))return bb(r,Y);if(bt==Nt||bt==St||Tt&&!C){if(B=$||Tt?{}:Fb(r),!Y)return $?y2(r,US(B,r)):_2(r,Xm(B,r))}else{if(!Ze[bt])return C?r:{};B=R2(r,bt,Y)}}I||(I=new Dr);var zt=I.get(r);if(zt)return zt;I.set(r,B),f_(r)?r.forEach(function(Jt){B.add(Pr(Jt,o,u,Jt,r,I))}):u_(r)&&r.forEach(function(Jt,ke){B.set(ke,Pr(Jt,o,u,ke,r,I))});var Qt=vt?$?xg:wg:$?tr:En,ye=mt?n:Qt(r);return Sr(ye||r,function(Jt,ke){ye&&(ke=Jt,Jt=r[ke]),na(B,ke,Pr(Jt,o,u,ke,r,I))}),B}function GS(r){var o=En(r);return function(u){return jm(u,r,o)}}function jm(r,o,u){var m=u.length;if(r==null)return!m;for(r=Xe(r);m--;){var C=u[m],I=o[C],B=r[C];if(B===n&&!(C in r)||!I(B))return!1}return!0}function Zm(r,o,u){if(typeof r!="function")throw new Cr(a);return ca(function(){r.apply(n,u)},o)}function ra(r,o,u,m){var C=-1,I=id,B=!0,Y=r.length,$=[],vt=o.length;if(!Y)return $;u&&(o=sn(o,hr(u))),m?(I=Wh,B=!1):o.length>=s&&(I=Zs,B=!1,o=new So(o));t:for(;++C<Y;){var mt=r[C],bt=u==null?mt:u(mt);if(mt=m||mt!==0?mt:0,B&&bt===bt){for(var Tt=vt;Tt--;)if(o[Tt]===bt)continue t;$.push(mt)}else I(o,bt,m)||$.push(mt)}return $}var Yi=Sb(Xr),Qm=Sb(ig,!0);function KS(r,o){var u=!0;return Yi(r,function(m,C,I){return u=!!o(m,C,I),u}),u}function xd(r,o,u){for(var m=-1,C=r.length;++m<C;){var I=r[m],B=o(I);if(B!=null&&(Y===n?B===B&&!pr(B):u(B,Y)))var Y=B,$=I}return $}function qS(r,o,u,m){var C=r.length;for(u=ve(u),u<0&&(u=-u>C?0:C+u),m=m===n||m>C?C:ve(m),m<0&&(m+=C),m=u>m?0:g_(m);u<m;)r[u++]=o;return r}function Jm(r,o){var u=[];return Yi(r,function(m,C,I){o(m,C,I)&&u.push(m)}),u}function Dn(r,o,u,m,C){var I=-1,B=r.length;for(u||(u=M2),C||(C=[]);++I<B;){var Y=r[I];o>0&&u(Y)?o>1?Dn(Y,o-1,u,m,C):Gi(C,Y):m||(C[C.length]=Y)}return C}var rg=Cb(),$m=Cb(!0);function Xr(r,o){return r&&rg(r,o,En)}function ig(r,o){return r&&$m(r,o,En)}function Sd(r,o){return Ui(o,function(u){return bi(r[u])})}function Ao(r,o){o=ji(o,r);for(var u=0,m=o.length;r!=null&&u<m;)r=r[Zr(o[u++])];return u&&u==m?r:n}function tb(r,o,u){var m=o(r);return le(r)?m:Gi(m,u(r))}function Yn(r){return r==null?r===n?Xt:Ae:wo&&wo in Xe(r)?T2(r):H2(r)}function og(r,o){return r>o}function YS(r,o){return r!=null&&Ye.call(r,o)}function XS(r,o){return r!=null&&o in Xe(r)}function jS(r,o,u){return r>=Wn(o,u)&&r<kn(o,u)}function sg(r,o,u){for(var m=u?Wh:id,C=r[0].length,I=r.length,B=I,Y=ct(I),$=1/0,vt=[];B--;){var mt=r[B];B&&o&&(mt=sn(mt,hr(o))),$=Wn(mt.length,$),Y[B]=!u&&(o||C>=120&&mt.length>=120)?new So(B&&mt):n}mt=r[0];var bt=-1,Tt=Y[0];t:for(;++bt<C&&vt.length<$;){var zt=mt[bt],Qt=o?o(zt):zt;if(zt=u||zt!==0?zt:0,!(Tt?Zs(Tt,Qt):m(vt,Qt,u))){for(B=I;--B;){var ye=Y[B];if(!(ye?Zs(ye,Qt):m(r[B],Qt,u)))continue t}Tt&&Tt.push(Qt),vt.push(zt)}}return vt}function ZS(r,o,u,m){return Xr(r,function(C,I,B){o(m,u(C),I,B)}),m}function ia(r,o,u){o=ji(o,r),r=Hb(r,o);var m=r==null?r:r[Zr(Tr(o))];return m==null?n:fr(m,r,u)}function eb(r){return gn(r)&&Yn(r)==St}function QS(r){return gn(r)&&Yn(r)==vn}function JS(r){return gn(r)&&Yn(r)==Wt}function oa(r,o,u,m,C){return r===o?!0:r==null||o==null||!gn(r)&&!gn(o)?r!==r&&o!==o:$S(r,o,u,m,oa,C)}function $S(r,o,u,m,C,I){var B=le(r),Y=le(o),$=B?At:Un(r),vt=Y?At:Un(o);$=$==St?Nt:$,vt=vt==St?Nt:vt;var mt=$==Nt,bt=vt==Nt,Tt=$==vt;if(Tt&&Qi(r)){if(!Qi(o))return!1;B=!0,mt=!1}if(Tt&&!mt)return I||(I=new Dr),B||is(r)?Mb(r,o,u,m,C,I):P2(r,o,$,u,m,C,I);if(!(u&w)){var zt=mt&&Ye.call(r,"__wrapped__"),Qt=bt&&Ye.call(o,"__wrapped__");if(zt||Qt){var ye=zt?r.value():r,Jt=Qt?o.value():o;return I||(I=new Dr),C(ye,Jt,u,m,I)}}return Tt?(I||(I=new Dr),k2(r,o,u,m,C,I)):!1}function t2(r){return gn(r)&&Un(r)==Dt}function ag(r,o,u,m){var C=u.length,I=C,B=!m;if(r==null)return!I;for(r=Xe(r);C--;){var Y=u[C];if(B&&Y[2]?Y[1]!==r[Y[0]]:!(Y[0]in r))return!1}for(;++C<I;){Y=u[C];var $=Y[0],vt=r[$],mt=Y[1];if(B&&Y[2]){if(vt===n&&!($ in r))return!1}else{var bt=new Dr;if(m)var Tt=m(vt,mt,$,r,o,bt);if(!(Tt===n?oa(mt,vt,w|S,m,bt):Tt))return!1}}return!0}function nb(r){if(!cn(r)||L2(r))return!1;var o=bi(r)?tS:dr;return o.test(ko(r))}function e2(r){return gn(r)&&Yn(r)==he}function n2(r){return gn(r)&&Un(r)==ae}function r2(r){return gn(r)&&Vd(r.length)&&!!$e[Yn(r)]}function rb(r){return typeof r=="function"?r:r==null?er:typeof r=="object"?le(r)?sb(r[0],r[1]):ob(r):A_(r)}function lg(r){if(!la(r))return sS(r);var o=[];for(var u in Xe(r))Ye.call(r,u)&&u!="constructor"&&o.push(u);return o}function i2(r){if(!cn(r))return V2(r);var o=la(r),u=[];for(var m in r)m=="constructor"&&(o||!Ye.call(r,m))||u.push(m);return u}function cg(r,o){return r<o}function ib(r,o){var u=-1,m=$n(r)?ct(r.length):[];return Yi(r,function(C,I,B){m[++u]=o(C,I,B)}),m}function ob(r){var o=Cg(r);return o.length==1&&o[0][2]?zb(o[0][0],o[0][1]):function(u){return u===r||ag(u,r,o)}}function sb(r,o){return Pg(r)&&Bb(o)?zb(Zr(r),o):function(u){var m=Lg(u,r);return m===n&&m===o?Fg(u,r):oa(o,m,w|S)}}function Cd(r,o,u,m,C){r!==o&&rg(o,function(I,B){if(C||(C=new Dr),cn(I))o2(r,o,B,u,Cd,m,C);else{var Y=m?m(Tg(r,B),I,B+"",r,o,C):n;Y===n&&(Y=I),eg(r,B,Y)}},tr)}function o2(r,o,u,m,C,I,B){var Y=Tg(r,u),$=Tg(o,u),vt=B.get($);if(vt){eg(r,u,vt);return}var mt=I?I(Y,$,u+"",r,o,B):n,bt=mt===n;if(bt){var Tt=le($),zt=!Tt&&Qi($),Qt=!Tt&&!zt&&is($);mt=$,Tt||zt||Qt?le(Y)?mt=Y:yn(Y)?mt=Jn(Y):zt?(bt=!1,mt=bb($,!0)):Qt?(bt=!1,mt=_b($,!0)):mt=[]:ua($)||To($)?(mt=Y,To(Y)?mt=p_(Y):(!cn(Y)||bi(Y))&&(mt=Fb($))):bt=!1}bt&&(B.set($,mt),C(mt,$,m,I,B),B.delete($)),eg(r,u,mt)}function ab(r,o){var u=r.length;if(u)return o+=o<0?u:0,mi(o,u)?r[o]:n}function lb(r,o,u){o.length?o=sn(o,function(I){return le(I)?function(B){return Ao(B,I.length===1?I[0]:I)}:I}):o=[er];var m=-1;o=sn(o,hr(Zt()));var C=ib(r,function(I,B,Y){var $=sn(o,function(vt){return vt(I)});return{criteria:$,index:++m,value:I}});return R1(C,function(I,B){return b2(I,B,u)})}function s2(r,o){return cb(r,o,function(u,m){return Fg(r,m)})}function cb(r,o,u){for(var m=-1,C=o.length,I={};++m<C;){var B=o[m],Y=Ao(r,B);u(Y,B)&&sa(I,ji(B,r),Y)}return I}function a2(r){return function(o){return Ao(o,r)}}function ug(r,o,u,m){var C=m?O1:Yo,I=-1,B=o.length,Y=r;for(r===o&&(o=Jn(o)),u&&(Y=sn(r,hr(u)));++I<B;)for(var $=0,vt=o[I],mt=u?u(vt):vt;($=C(Y,mt,$,m))>-1;)Y!==r&&gd.call(Y,$,1),gd.call(r,$,1);return r}function ub(r,o){for(var u=r?o.length:0,m=u-1;u--;){var C=o[u];if(u==m||C!==I){var I=C;mi(C)?gd.call(r,C,1):gg(r,C)}}return r}function dg(r,o){return r+md(Gm()*(o-r+1))}function l2(r,o,u,m){for(var C=-1,I=kn(vd((o-r)/(u||1)),0),B=ct(I);I--;)B[m?I:++C]=r,r+=u;return B}function fg(r,o){var u="";if(!r||o<1||o>ht)return u;do o%2&&(u+=r),o=md(o/2),o&&(r+=r);while(o);return u}function xe(r,o){return Eg(Vb(r,o,er),r+"")}function c2(r){return Ym(os(r))}function u2(r,o){var u=os(r);return Md(u,Co(o,0,u.length))}function sa(r,o,u,m){if(!cn(r))return r;o=ji(o,r);for(var C=-1,I=o.length,B=I-1,Y=r;Y!=null&&++C<I;){var $=Zr(o[C]),vt=u;if($==="__proto__"||$==="constructor"||$==="prototype")return r;if(C!=B){var mt=Y[$];vt=m?m(mt,$,Y):n,vt===n&&(vt=cn(mt)?mt:mi(o[C+1])?[]:{})}na(Y,$,vt),Y=Y[$]}return r}var db=bd?function(r,o){return bd.set(r,o),r}:er,d2=pd?function(r,o){return pd(r,"toString",{configurable:!0,enumerable:!1,value:zg(o),writable:!0})}:er;function f2(r){return Md(os(r))}function kr(r,o,u){var m=-1,C=r.length;o<0&&(o=-o>C?0:C+o),u=u>C?C:u,u<0&&(u+=C),C=o>u?0:u-o>>>0,o>>>=0;for(var I=ct(C);++m<C;)I[m]=r[m+o];return I}function h2(r,o){var u;return Yi(r,function(m,C,I){return u=o(m,C,I),!u}),!!u}function Ad(r,o,u){var m=0,C=r==null?m:r.length;if(typeof o=="number"&&o===o&&C<=Ot){for(;m<C;){var I=m+C>>>1,B=r[I];B!==null&&!pr(B)&&(u?B<=o:B<o)?m=I+1:C=I}return C}return hg(r,o,er,u)}function hg(r,o,u,m){var C=0,I=r==null?0:r.length;if(I===0)return 0;o=u(o);for(var B=o!==o,Y=o===null,$=pr(o),vt=o===n;C<I;){var mt=md((C+I)/2),bt=u(r[mt]),Tt=bt!==n,zt=bt===null,Qt=bt===bt,ye=pr(bt);if(B)var Jt=m||Qt;else vt?Jt=Qt&&(m||Tt):Y?Jt=Qt&&Tt&&(m||!zt):$?Jt=Qt&&Tt&&!zt&&(m||!ye):zt||ye?Jt=!1:Jt=m?bt<=o:bt<o;Jt?C=mt+1:I=mt}return Wn(I,yt)}function fb(r,o){for(var u=-1,m=r.length,C=0,I=[];++u<m;){var B=r[u],Y=o?o(B):B;if(!u||!Lr(Y,$)){var $=Y;I[C++]=B===0?0:B}}return I}function hb(r){return typeof r=="number"?r:pr(r)?wt:+r}function gr(r){if(typeof r=="string")return r;if(le(r))return sn(r,gr)+"";if(pr(r))return Km?Km.call(r):"";var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function Xi(r,o,u){var m=-1,C=id,I=r.length,B=!0,Y=[],$=Y;if(u)B=!1,C=Wh;else if(I>=s){var vt=o?null:C2(r);if(vt)return sd(vt);B=!1,C=Zs,$=new So}else $=o?[]:Y;t:for(;++m<I;){var mt=r[m],bt=o?o(mt):mt;if(mt=u||mt!==0?mt:0,B&&bt===bt){for(var Tt=$.length;Tt--;)if($[Tt]===bt)continue t;o&&$.push(bt),Y.push(mt)}else C($,bt,u)||($!==Y&&$.push(bt),Y.push(mt))}return Y}function gg(r,o){return o=ji(o,r),r=Hb(r,o),r==null||delete r[Zr(Tr(o))]}function gb(r,o,u,m){return sa(r,o,u(Ao(r,o)),m)}function Pd(r,o,u,m){for(var C=r.length,I=m?C:-1;(m?I--:++I<C)&&o(r[I],I,r););return u?kr(r,m?0:I,m?I+1:C):kr(r,m?I+1:0,m?C:I)}function pb(r,o){var u=r;return u instanceof Te&&(u=u.value()),Uh(o,function(m,C){return C.func.apply(C.thisArg,Gi([m],C.args))},u)}function pg(r,o,u){var m=r.length;if(m<2)return m?Xi(r[0]):[];for(var C=-1,I=ct(m);++C<m;)for(var B=r[C],Y=-1;++Y<m;)Y!=C&&(I[C]=ra(I[C]||B,r[Y],o,u));return Xi(Dn(I,1),o,u)}function vb(r,o,u){for(var m=-1,C=r.length,I=o.length,B={};++m<C;){var Y=m<I?o[m]:n;u(B,r[m],Y)}return B}function vg(r){return yn(r)?r:[]}function mg(r){return typeof r=="function"?r:er}function ji(r,o){return le(r)?r:Pg(r,o)?[r]:Kb(Ue(r))}var g2=xe;function Zi(r,o,u){var m=r.length;return u=u===n?m:u,!o&&u>=m?r:kr(r,o,u)}var mb=eS||function(r){return Mn.clearTimeout(r)};function bb(r,o){if(o)return r.slice();var u=r.length,m=zm?zm(u):new r.constructor(u);return r.copy(m),m}function bg(r){var o=new r.constructor(r.byteLength);return new fd(o).set(new fd(r)),o}function p2(r,o){var u=o?bg(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function v2(r){var o=new r.constructor(r.source,Cn.exec(r));return o.lastIndex=r.lastIndex,o}function m2(r){return ea?Xe(ea.call(r)):{}}function _b(r,o){var u=o?bg(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function yb(r,o){if(r!==o){var u=r!==n,m=r===null,C=r===r,I=pr(r),B=o!==n,Y=o===null,$=o===o,vt=pr(o);if(!Y&&!vt&&!I&&r>o||I&&B&&$&&!Y&&!vt||m&&B&&$||!u&&$||!C)return 1;if(!m&&!I&&!vt&&r<o||vt&&u&&C&&!m&&!I||Y&&u&&C||!B&&C||!$)return-1}return 0}function b2(r,o,u){for(var m=-1,C=r.criteria,I=o.criteria,B=C.length,Y=u.length;++m<B;){var $=yb(C[m],I[m]);if($){if(m>=Y)return $;var vt=u[m];return $*(vt=="desc"?-1:1)}}return r.index-o.index}function wb(r,o,u,m){for(var C=-1,I=r.length,B=u.length,Y=-1,$=o.length,vt=kn(I-B,0),mt=ct($+vt),bt=!m;++Y<$;)mt[Y]=o[Y];for(;++C<B;)(bt||C<I)&&(mt[u[C]]=r[C]);for(;vt--;)mt[Y++]=r[C++];return mt}function xb(r,o,u,m){for(var C=-1,I=r.length,B=-1,Y=u.length,$=-1,vt=o.length,mt=kn(I-Y,0),bt=ct(mt+vt),Tt=!m;++C<mt;)bt[C]=r[C];for(var zt=C;++$<vt;)bt[zt+$]=o[$];for(;++B<Y;)(Tt||C<I)&&(bt[zt+u[B]]=r[C++]);return bt}function Jn(r,o){var u=-1,m=r.length;for(o||(o=ct(m));++u<m;)o[u]=r[u];return o}function jr(r,o,u,m){var C=!u;u||(u={});for(var I=-1,B=o.length;++I<B;){var Y=o[I],$=m?m(u[Y],r[Y],Y,u,r):n;$===n&&($=r[Y]),C?gi(u,Y,$):na(u,Y,$)}return u}function _2(r,o){return jr(r,Ag(r),o)}function y2(r,o){return jr(r,Db(r),o)}function kd(r,o){return function(u,m){var C=le(u)?A1:WS,I=o?o():{};return C(u,r,Zt(m,2),I)}}function es(r){return xe(function(o,u){var m=-1,C=u.length,I=C>1?u[C-1]:n,B=C>2?u[2]:n;for(I=r.length>3&&typeof I=="function"?(C--,I):n,B&&Xn(u[0],u[1],B)&&(I=C<3?n:I,C=1),o=Xe(o);++m<C;){var Y=u[m];Y&&r(o,Y,m,I)}return o})}function Sb(r,o){return function(u,m){if(u==null)return u;if(!$n(u))return r(u,m);for(var C=u.length,I=o?C:-1,B=Xe(u);(o?I--:++I<C)&&m(B[I],I,B)!==!1;);return u}}function Cb(r){return function(o,u,m){for(var C=-1,I=Xe(o),B=m(o),Y=B.length;Y--;){var $=B[r?Y:++C];if(u(I[$],$,I)===!1)break}return o}}function w2(r,o,u){var m=o&x,C=aa(r);function I(){var B=this&&this!==Mn&&this instanceof I?C:r;return B.apply(m?u:this,arguments)}return I}function Ab(r){return function(o){o=Ue(o);var u=Xo(o)?Mr(o):n,m=u?u[0]:o.charAt(0),C=u?Zi(u,1).join(""):o.slice(1);return m[r]()+C}}function ns(r){return function(o){return Uh(S_(x_(o).replace(d1,"")),r,"")}}function aa(r){return function(){var o=arguments;switch(o.length){case 0:return new r;case 1:return new r(o[0]);case 2:return new r(o[0],o[1]);case 3:return new r(o[0],o[1],o[2]);case 4:return new r(o[0],o[1],o[2],o[3]);case 5:return new r(o[0],o[1],o[2],o[3],o[4]);case 6:return new r(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new r(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var u=ts(r.prototype),m=r.apply(u,o);return cn(m)?m:u}}function x2(r,o,u){var m=aa(r);function C(){for(var I=arguments.length,B=ct(I),Y=I,$=rs(C);Y--;)B[Y]=arguments[Y];var vt=I<3&&B[0]!==$&&B[I-1]!==$?[]:Ki(B,$);if(I-=vt.length,I<u)return Ib(r,o,Td,C.placeholder,n,B,vt,n,n,u-I);var mt=this&&this!==Mn&&this instanceof C?m:r;return fr(mt,this,B)}return C}function Pb(r){return function(o,u,m){var C=Xe(o);if(!$n(o)){var I=Zt(u,3);o=En(o),u=function(Y){return I(C[Y],Y,C)}}var B=r(o,u,m);return B>-1?C[I?o[B]:B]:n}}function kb(r){return vi(function(o){var u=o.length,m=u,C=Ar.prototype.thru;for(r&&o.reverse();m--;){var I=o[m];if(typeof I!="function")throw new Cr(a);if(C&&!B&&Rd(I)=="wrapper")var B=new Ar([],!0)}for(m=B?m:u;++m<u;){I=o[m];var Y=Rd(I),$=Y=="wrapper"?Sg(I):n;$&&kg($[0])&&$[1]==(M|D|L|U)&&!$[4].length&&$[9]==1?B=B[Rd($[0])].apply(B,$[3]):B=I.length==1&&kg(I)?B[Y]():B.thru(I)}return function(){var vt=arguments,mt=vt[0];if(B&&vt.length==1&&le(mt))return B.plant(mt).value();for(var bt=0,Tt=u?o[bt].apply(this,vt):mt;++bt<u;)Tt=o[bt].call(this,Tt);return Tt}})}function Td(r,o,u,m,C,I,B,Y,$,vt){var mt=o&M,bt=o&x,Tt=o&A,zt=o&(D|R),Qt=o&q,ye=Tt?n:aa(r);function Jt(){for(var ke=arguments.length,Ee=ct(ke),vr=ke;vr--;)Ee[vr]=arguments[vr];if(zt)var jn=rs(Jt),mr=M1(Ee,jn);if(m&&(Ee=wb(Ee,m,C,zt)),I&&(Ee=xb(Ee,I,B,zt)),ke-=mr,zt&&ke<vt){var wn=Ki(Ee,jn);return Ib(r,o,Td,Jt.placeholder,u,Ee,wn,Y,$,vt-ke)}var Fr=bt?u:this,yi=Tt?Fr[r]:r;return ke=Ee.length,Y?Ee=W2(Ee,Y):Qt&&ke>1&&Ee.reverse(),mt&&$<ke&&(Ee.length=$),this&&this!==Mn&&this instanceof Jt&&(yi=ye||aa(yi)),yi.apply(Fr,Ee)}return Jt}function Tb(r,o){return function(u,m){return ZS(u,r,o(m),{})}}function Ed(r,o){return function(u,m){var C;if(u===n&&m===n)return o;if(u!==n&&(C=u),m!==n){if(C===n)return m;typeof u=="string"||typeof m=="string"?(u=gr(u),m=gr(m)):(u=hb(u),m=hb(m)),C=r(u,m)}return C}}function _g(r){return vi(function(o){return o=sn(o,hr(Zt())),xe(function(u){var m=this;return r(o,function(C){return fr(C,m,u)})})})}function Id(r,o){o=o===n?" ":gr(o);var u=o.length;if(u<2)return u?fg(o,r):o;var m=fg(o,vd(r/jo(o)));return Xo(o)?Zi(Mr(m),0,r).join(""):m.slice(0,r)}function S2(r,o,u,m){var C=o&x,I=aa(r);function B(){for(var Y=-1,$=arguments.length,vt=-1,mt=m.length,bt=ct(mt+$),Tt=this&&this!==Mn&&this instanceof B?I:r;++vt<mt;)bt[vt]=m[vt];for(;$--;)bt[vt++]=arguments[++Y];return fr(Tt,C?u:this,bt)}return B}function Eb(r){return function(o,u,m){return m&&typeof m!="number"&&Xn(o,u,m)&&(u=m=n),o=_i(o),u===n?(u=o,o=0):u=_i(u),m=m===n?o<u?1:-1:_i(m),l2(o,u,m,r)}}function Od(r){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=Er(o),u=Er(u)),r(o,u)}}function Ib(r,o,u,m,C,I,B,Y,$,vt){var mt=o&D,bt=mt?B:n,Tt=mt?n:B,zt=mt?I:n,Qt=mt?n:I;o|=mt?L:F,o&=~(mt?F:L),o&T||(o&=-4);var ye=[r,o,C,zt,bt,Qt,Tt,Y,$,vt],Jt=u.apply(n,ye);return kg(r)&&Wb(Jt,ye),Jt.placeholder=m,Ub(Jt,r,o)}function yg(r){var o=Pn[r];return function(u,m){if(u=Er(u),m=m==null?0:Wn(ve(m),292),m&&Um(u)){var C=(Ue(u)+"e").split("e"),I=o(C[0]+"e"+(+C[1]+m));return C=(Ue(I)+"e").split("e"),+(C[0]+"e"+(+C[1]-m))}return o(u)}}var C2=Jo&&1/sd(new Jo([,-0]))[1]==rt?function(r){return new Jo(r)}:Wg;function Ob(r){return function(o){var u=Un(o);return u==Dt?Zh(o):u==ae?H1(o):N1(o,r(o))}}function pi(r,o,u,m,C,I,B,Y){var $=o&A;if(!$&&typeof r!="function")throw new Cr(a);var vt=m?m.length:0;if(vt||(o&=-97,m=C=n),B=B===n?B:kn(ve(B),0),Y=Y===n?Y:ve(Y),vt-=C?C.length:0,o&F){var mt=m,bt=C;m=C=n}var Tt=$?n:Sg(r),zt=[r,o,u,m,C,mt,bt,I,B,Y];if(Tt&&z2(zt,Tt),r=zt[0],o=zt[1],u=zt[2],m=zt[3],C=zt[4],Y=zt[9]=zt[9]===n?$?0:r.length:kn(zt[9]-vt,0),!Y&&o&(D|R)&&(o&=-25),!o||o==x)var Qt=w2(r,o,u);else o==D||o==R?Qt=x2(r,o,Y):(o==L||o==(x|L))&&!C.length?Qt=S2(r,o,u,m):Qt=Td.apply(n,zt);var ye=Tt?db:Wb;return Ub(ye(Qt,zt),r,o)}function Rb(r,o,u,m){return r===n||Lr(r,Qo[u])&&!Ye.call(m,u)?o:r}function Nb(r,o,u,m,C,I){return cn(r)&&cn(o)&&(I.set(o,r),Cd(r,o,n,Nb,I),I.delete(o)),r}function A2(r){return ua(r)?n:r}function Mb(r,o,u,m,C,I){var B=u&w,Y=r.length,$=o.length;if(Y!=$&&!(B&&$>Y))return!1;var vt=I.get(r),mt=I.get(o);if(vt&&mt)return vt==o&&mt==r;var bt=-1,Tt=!0,zt=u&S?new So:n;for(I.set(r,o),I.set(o,r);++bt<Y;){var Qt=r[bt],ye=o[bt];if(m)var Jt=B?m(ye,Qt,bt,o,r,I):m(Qt,ye,bt,r,o,I);if(Jt!==n){if(Jt)continue;Tt=!1;break}if(zt){if(!Gh(o,function(ke,Ee){if(!Zs(zt,Ee)&&(Qt===ke||C(Qt,ke,u,m,I)))return zt.push(Ee)})){Tt=!1;break}}else if(!(Qt===ye||C(Qt,ye,u,m,I))){Tt=!1;break}}return I.delete(r),I.delete(o),Tt}function P2(r,o,u,m,C,I,B){switch(u){case rn:if(r.byteLength!=o.byteLength||r.byteOffset!=o.byteOffset)return!1;r=r.buffer,o=o.buffer;case vn:return!(r.byteLength!=o.byteLength||!I(new fd(r),new fd(o)));case kt:case Wt:case Ht:return Lr(+r,+o);case Ie:return r.name==o.name&&r.message==o.message;case he:case te:return r==o+"";case Dt:var Y=Zh;case ae:var $=m&w;if(Y||(Y=sd),r.size!=o.size&&!$)return!1;var vt=B.get(r);if(vt)return vt==o;m|=S,B.set(r,o);var mt=Mb(Y(r),Y(o),m,C,I,B);return B.delete(r),mt;case It:if(ea)return ea.call(r)==ea.call(o)}return!1}function k2(r,o,u,m,C,I){var B=u&w,Y=wg(r),$=Y.length,vt=wg(o),mt=vt.length;if($!=mt&&!B)return!1;for(var bt=$;bt--;){var Tt=Y[bt];if(!(B?Tt in o:Ye.call(o,Tt)))return!1}var zt=I.get(r),Qt=I.get(o);if(zt&&Qt)return zt==o&&Qt==r;var ye=!0;I.set(r,o),I.set(o,r);for(var Jt=B;++bt<$;){Tt=Y[bt];var ke=r[Tt],Ee=o[Tt];if(m)var vr=B?m(Ee,ke,Tt,o,r,I):m(ke,Ee,Tt,r,o,I);if(!(vr===n?ke===Ee||C(ke,Ee,u,m,I):vr)){ye=!1;break}Jt||(Jt=Tt=="constructor")}if(ye&&!Jt){var jn=r.constructor,mr=o.constructor;jn!=mr&&"constructor"in r&&"constructor"in o&&!(typeof jn=="function"&&jn instanceof jn&&typeof mr=="function"&&mr instanceof mr)&&(ye=!1)}return I.delete(r),I.delete(o),ye}function vi(r){return Eg(Vb(r,n,jb),r+"")}function wg(r){return tb(r,En,Ag)}function xg(r){return tb(r,tr,Db)}var Sg=bd?function(r){return bd.get(r)}:Wg;function Rd(r){for(var o=r.name+"",u=$o[o],m=Ye.call($o,o)?u.length:0;m--;){var C=u[m],I=C.func;if(I==null||I==r)return C.name}return o}function rs(r){var o=Ye.call(k,"placeholder")?k:r;return o.placeholder}function Zt(){var r=k.iteratee||Vg;return r=r===Vg?rb:r,arguments.length?r(arguments[0],arguments[1]):r}function Nd(r,o){var u=r.__data__;return D2(o)?u[typeof o=="string"?"string":"hash"]:u.map}function Cg(r){for(var o=En(r),u=o.length;u--;){var m=o[u],C=r[m];o[u]=[m,C,Bb(C)]}return o}function Po(r,o){var u=B1(r,o);return nb(u)?u:n}function T2(r){var o=Ye.call(r,wo),u=r[wo];try{r[wo]=n;var m=!0}catch{}var C=ud.call(r);return m&&(o?r[wo]=u:delete r[wo]),C}var Ag=Jh?function(r){return r==null?[]:(r=Xe(r),Ui(Jh(r),function(o){return Hm.call(r,o)}))}:Ug,Db=Jh?function(r){for(var o=[];r;)Gi(o,Ag(r)),r=hd(r);return o}:Ug,Un=Yn;($h&&Un(new $h(new ArrayBuffer(1)))!=rn||Js&&Un(new Js)!=Dt||tg&&Un(tg.resolve())!=ne||Jo&&Un(new Jo)!=ae||$s&&Un(new $s)!=ge)&&(Un=function(r){var o=Yn(r),u=o==Nt?r.constructor:n,m=u?ko(u):"";if(m)switch(m){case uS:return rn;case dS:return Dt;case fS:return ne;case hS:return ae;case gS:return ge}return o});function E2(r,o,u){for(var m=-1,C=u.length;++m<C;){var I=u[m],B=I.size;switch(I.type){case"drop":r+=B;break;case"dropRight":o-=B;break;case"take":o=Wn(o,r+B);break;case"takeRight":r=kn(r,o-B);break}}return{start:r,end:o}}function I2(r){var o=r.match(Je);return o?o[1].split(_n):[]}function Lb(r,o,u){o=ji(o,r);for(var m=-1,C=o.length,I=!1;++m<C;){var B=Zr(o[m]);if(!(I=r!=null&&u(r,B)))break;r=r[B]}return I||++m!=C?I:(C=r==null?0:r.length,!!C&&Vd(C)&&mi(B,C)&&(le(r)||To(r)))}function O2(r){var o=r.length,u=new r.constructor(o);return o&&typeof r[0]=="string"&&Ye.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Fb(r){return typeof r.constructor=="function"&&!la(r)?ts(hd(r)):{}}function R2(r,o,u){var m=r.constructor;switch(o){case vn:return bg(r);case kt:case Wt:return new m(+r);case rn:return p2(r,u);case pe:case fe:case on:case De:case Fe:case Ge:case Ne:case Pe:case ln:return _b(r,u);case Dt:return new m;case Ht:case te:return new m(r);case he:return v2(r);case ae:return new m;case It:return m2(r)}}function N2(r,o){var u=o.length;if(!u)return r;var m=u-1;return o[m]=(u>1?"& ":"")+o[m],o=o.join(u>2?", ":" "),r.replace(We,`{
494
+ /* [wrapped with `+o+`] */
495
+ `)}function M2(r){return le(r)||To(r)||!!(Wm&&r&&r[Wm])}function mi(r,o){var u=typeof r;return o=o??ht,!!o&&(u=="number"||u!="symbol"&&zn.test(r))&&r>-1&&r%1==0&&r<o}function Xn(r,o,u){if(!cn(u))return!1;var m=typeof o;return(m=="number"?$n(u)&&mi(o,u.length):m=="string"&&o in u)?Lr(u[o],r):!1}function Pg(r,o){if(le(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||pr(r)?!0:Ke.test(r)||!bn.test(r)||o!=null&&r in Xe(o)}function D2(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}function kg(r){var o=Rd(r),u=k[o];if(typeof u!="function"||!(o in Te.prototype))return!1;if(r===u)return!0;var m=Sg(u);return!!m&&r===m[0]}function L2(r){return!!Bm&&Bm in r}var F2=ld?bi:Gg;function la(r){var o=r&&r.constructor,u=typeof o=="function"&&o.prototype||Qo;return r===u}function Bb(r){return r===r&&!cn(r)}function zb(r,o){return function(u){return u==null?!1:u[r]===o&&(o!==n||r in Xe(u))}}function B2(r){var o=Bd(r,function(m){return u.size===h&&u.clear(),m}),u=o.cache;return o}function z2(r,o){var u=r[1],m=o[1],C=u|m,I=C<(x|A|M),B=m==M&&u==D||m==M&&u==U&&r[7].length<=o[8]||m==(M|U)&&o[7].length<=o[8]&&u==D;if(!(I||B))return r;m&x&&(r[2]=o[2],C|=u&x?0:T);var Y=o[3];if(Y){var $=r[3];r[3]=$?wb($,Y,o[4]):Y,r[4]=$?Ki(r[3],g):o[4]}return Y=o[5],Y&&($=r[5],r[5]=$?xb($,Y,o[6]):Y,r[6]=$?Ki(r[5],g):o[6]),Y=o[7],Y&&(r[7]=Y),m&M&&(r[8]=r[8]==null?o[8]:Wn(r[8],o[8])),r[9]==null&&(r[9]=o[9]),r[0]=o[0],r[1]=C,r}function V2(r){var o=[];if(r!=null)for(var u in Xe(r))o.push(u);return o}function H2(r){return ud.call(r)}function Vb(r,o,u){return o=kn(o===n?r.length-1:o,0),function(){for(var m=arguments,C=-1,I=kn(m.length-o,0),B=ct(I);++C<I;)B[C]=m[o+C];C=-1;for(var Y=ct(o+1);++C<o;)Y[C]=m[C];return Y[o]=u(B),fr(r,this,Y)}}function Hb(r,o){return o.length<2?r:Ao(r,kr(o,0,-1))}function W2(r,o){for(var u=r.length,m=Wn(o.length,u),C=Jn(r);m--;){var I=o[m];r[m]=mi(I,u)?C[I]:n}return r}function Tg(r,o){if(!(o==="constructor"&&typeof r[o]=="function")&&o!="__proto__")return r[o]}var Wb=Gb(db),ca=rS||function(r,o){return Mn.setTimeout(r,o)},Eg=Gb(d2);function Ub(r,o,u){var m=o+"";return Eg(r,N2(m,U2(I2(m),u)))}function Gb(r){var o=0,u=0;return function(){var m=aS(),C=it-(m-u);if(u=m,C>0){if(++o>=z)return arguments[0]}else o=0;return r.apply(n,arguments)}}function Md(r,o){var u=-1,m=r.length,C=m-1;for(o=o===n?m:o;++u<o;){var I=dg(u,C),B=r[I];r[I]=r[u],r[u]=B}return r.length=o,r}var Kb=B2(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(dn,function(u,m,C,I){o.push(C?I.replace(qn,"$1"):m||u)}),o});function Zr(r){if(typeof r=="string"||pr(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function ko(r){if(r!=null){try{return cd.call(r)}catch{}try{return r+""}catch{}}return""}function U2(r,o){return Sr(Vt,function(u){var m="_."+u[0];o&u[1]&&!id(r,m)&&r.push(m)}),r.sort()}function qb(r){if(r instanceof Te)return r.clone();var o=new Ar(r.__wrapped__,r.__chain__);return o.__actions__=Jn(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}function G2(r,o,u){(u?Xn(r,o,u):o===n)?o=1:o=kn(ve(o),0);var m=r==null?0:r.length;if(!m||o<1)return[];for(var C=0,I=0,B=ct(vd(m/o));C<m;)B[I++]=kr(r,C,C+=o);return B}function K2(r){for(var o=-1,u=r==null?0:r.length,m=0,C=[];++o<u;){var I=r[o];I&&(C[m++]=I)}return C}function q2(){var r=arguments.length;if(!r)return[];for(var o=ct(r-1),u=arguments[0],m=r;m--;)o[m-1]=arguments[m];return Gi(le(u)?Jn(u):[u],Dn(o,1))}var Y2=xe(function(r,o){return yn(r)?ra(r,Dn(o,1,yn,!0)):[]}),X2=xe(function(r,o){var u=Tr(o);return yn(u)&&(u=n),yn(r)?ra(r,Dn(o,1,yn,!0),Zt(u,2)):[]}),j2=xe(function(r,o){var u=Tr(o);return yn(u)&&(u=n),yn(r)?ra(r,Dn(o,1,yn,!0),n,u):[]});function Z2(r,o,u){var m=r==null?0:r.length;return m?(o=u||o===n?1:ve(o),kr(r,o<0?0:o,m)):[]}function Q2(r,o,u){var m=r==null?0:r.length;return m?(o=u||o===n?1:ve(o),o=m-o,kr(r,0,o<0?0:o)):[]}function J2(r,o){return r&&r.length?Pd(r,Zt(o,3),!0,!0):[]}function $2(r,o){return r&&r.length?Pd(r,Zt(o,3),!0):[]}function tC(r,o,u,m){var C=r==null?0:r.length;return C?(u&&typeof u!="number"&&Xn(r,o,u)&&(u=0,m=C),qS(r,o,u,m)):[]}function Yb(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=u==null?0:ve(u);return C<0&&(C=kn(m+C,0)),od(r,Zt(o,3),C)}function Xb(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=m-1;return u!==n&&(C=ve(u),C=u<0?kn(m+C,0):Wn(C,m-1)),od(r,Zt(o,3),C,!0)}function jb(r){var o=r==null?0:r.length;return o?Dn(r,1):[]}function eC(r){var o=r==null?0:r.length;return o?Dn(r,rt):[]}function nC(r,o){var u=r==null?0:r.length;return u?(o=o===n?1:ve(o),Dn(r,o)):[]}function rC(r){for(var o=-1,u=r==null?0:r.length,m={};++o<u;){var C=r[o];m[C[0]]=C[1]}return m}function Zb(r){return r&&r.length?r[0]:n}function iC(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=u==null?0:ve(u);return C<0&&(C=kn(m+C,0)),Yo(r,o,C)}function oC(r){var o=r==null?0:r.length;return o?kr(r,0,-1):[]}var sC=xe(function(r){var o=sn(r,vg);return o.length&&o[0]===r[0]?sg(o):[]}),aC=xe(function(r){var o=Tr(r),u=sn(r,vg);return o===Tr(u)?o=n:u.pop(),u.length&&u[0]===r[0]?sg(u,Zt(o,2)):[]}),lC=xe(function(r){var o=Tr(r),u=sn(r,vg);return o=typeof o=="function"?o:n,o&&u.pop(),u.length&&u[0]===r[0]?sg(u,n,o):[]});function cC(r,o){return r==null?"":oS.call(r,o)}function Tr(r){var o=r==null?0:r.length;return o?r[o-1]:n}function uC(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=m;return u!==n&&(C=ve(u),C=C<0?kn(m+C,0):Wn(C,m-1)),o===o?U1(r,o,C):od(r,Im,C,!0)}function dC(r,o){return r&&r.length?ab(r,ve(o)):n}var fC=xe(Qb);function Qb(r,o){return r&&r.length&&o&&o.length?ug(r,o):r}function hC(r,o,u){return r&&r.length&&o&&o.length?ug(r,o,Zt(u,2)):r}function gC(r,o,u){return r&&r.length&&o&&o.length?ug(r,o,n,u):r}var pC=vi(function(r,o){var u=r==null?0:r.length,m=ng(r,o);return ub(r,sn(o,function(C){return mi(C,u)?+C:C}).sort(yb)),m});function vC(r,o){var u=[];if(!(r&&r.length))return u;var m=-1,C=[],I=r.length;for(o=Zt(o,3);++m<I;){var B=r[m];o(B,m,r)&&(u.push(B),C.push(m))}return ub(r,C),u}function Ig(r){return r==null?r:cS.call(r)}function mC(r,o,u){var m=r==null?0:r.length;return m?(u&&typeof u!="number"&&Xn(r,o,u)?(o=0,u=m):(o=o==null?0:ve(o),u=u===n?m:ve(u)),kr(r,o,u)):[]}function bC(r,o){return Ad(r,o)}function _C(r,o,u){return hg(r,o,Zt(u,2))}function yC(r,o){var u=r==null?0:r.length;if(u){var m=Ad(r,o);if(m<u&&Lr(r[m],o))return m}return-1}function wC(r,o){return Ad(r,o,!0)}function xC(r,o,u){return hg(r,o,Zt(u,2),!0)}function SC(r,o){var u=r==null?0:r.length;if(u){var m=Ad(r,o,!0)-1;if(Lr(r[m],o))return m}return-1}function CC(r){return r&&r.length?fb(r):[]}function AC(r,o){return r&&r.length?fb(r,Zt(o,2)):[]}function PC(r){var o=r==null?0:r.length;return o?kr(r,1,o):[]}function kC(r,o,u){return r&&r.length?(o=u||o===n?1:ve(o),kr(r,0,o<0?0:o)):[]}function TC(r,o,u){var m=r==null?0:r.length;return m?(o=u||o===n?1:ve(o),o=m-o,kr(r,o<0?0:o,m)):[]}function EC(r,o){return r&&r.length?Pd(r,Zt(o,3),!1,!0):[]}function IC(r,o){return r&&r.length?Pd(r,Zt(o,3)):[]}var OC=xe(function(r){return Xi(Dn(r,1,yn,!0))}),RC=xe(function(r){var o=Tr(r);return yn(o)&&(o=n),Xi(Dn(r,1,yn,!0),Zt(o,2))}),NC=xe(function(r){var o=Tr(r);return o=typeof o=="function"?o:n,Xi(Dn(r,1,yn,!0),n,o)});function MC(r){return r&&r.length?Xi(r):[]}function DC(r,o){return r&&r.length?Xi(r,Zt(o,2)):[]}function LC(r,o){return o=typeof o=="function"?o:n,r&&r.length?Xi(r,n,o):[]}function Og(r){if(!(r&&r.length))return[];var o=0;return r=Ui(r,function(u){if(yn(u))return o=kn(u.length,o),!0}),Xh(o,function(u){return sn(r,Kh(u))})}function Jb(r,o){if(!(r&&r.length))return[];var u=Og(r);return o==null?u:sn(u,function(m){return fr(o,n,m)})}var FC=xe(function(r,o){return yn(r)?ra(r,o):[]}),BC=xe(function(r){return pg(Ui(r,yn))}),zC=xe(function(r){var o=Tr(r);return yn(o)&&(o=n),pg(Ui(r,yn),Zt(o,2))}),VC=xe(function(r){var o=Tr(r);return o=typeof o=="function"?o:n,pg(Ui(r,yn),n,o)}),HC=xe(Og);function WC(r,o){return vb(r||[],o||[],na)}function UC(r,o){return vb(r||[],o||[],sa)}var GC=xe(function(r){var o=r.length,u=o>1?r[o-1]:n;return u=typeof u=="function"?(r.pop(),u):n,Jb(r,u)});function $b(r){var o=k(r);return o.__chain__=!0,o}function KC(r,o){return o(r),r}function Dd(r,o){return o(r)}var qC=vi(function(r){var o=r.length,u=o?r[0]:0,m=this.__wrapped__,C=function(I){return ng(I,r)};return o>1||this.__actions__.length||!(m instanceof Te)||!mi(u)?this.thru(C):(m=m.slice(u,+u+(o?1:0)),m.__actions__.push({func:Dd,args:[C],thisArg:n}),new Ar(m,this.__chain__).thru(function(I){return o&&!I.length&&I.push(n),I}))});function YC(){return $b(this)}function XC(){return new Ar(this.value(),this.__chain__)}function jC(){this.__values__===n&&(this.__values__=h_(this.value()));var r=this.__index__>=this.__values__.length,o=r?n:this.__values__[this.__index__++];return{done:r,value:o}}function ZC(){return this}function QC(r){for(var o,u=this;u instanceof yd;){var m=qb(u);m.__index__=0,m.__values__=n,o?C.__wrapped__=m:o=m;var C=m;u=u.__wrapped__}return C.__wrapped__=r,o}function JC(){var r=this.__wrapped__;if(r instanceof Te){var o=r;return this.__actions__.length&&(o=new Te(this)),o=o.reverse(),o.__actions__.push({func:Dd,args:[Ig],thisArg:n}),new Ar(o,this.__chain__)}return this.thru(Ig)}function $C(){return pb(this.__wrapped__,this.__actions__)}var tA=kd(function(r,o,u){Ye.call(r,u)?++r[u]:gi(r,u,1)});function eA(r,o,u){var m=le(r)?Tm:KS;return u&&Xn(r,o,u)&&(o=n),m(r,Zt(o,3))}function nA(r,o){var u=le(r)?Ui:Jm;return u(r,Zt(o,3))}var rA=Pb(Yb),iA=Pb(Xb);function oA(r,o){return Dn(Ld(r,o),1)}function sA(r,o){return Dn(Ld(r,o),rt)}function aA(r,o,u){return u=u===n?1:ve(u),Dn(Ld(r,o),u)}function t_(r,o){var u=le(r)?Sr:Yi;return u(r,Zt(o,3))}function e_(r,o){var u=le(r)?P1:Qm;return u(r,Zt(o,3))}var lA=kd(function(r,o,u){Ye.call(r,u)?r[u].push(o):gi(r,u,[o])});function cA(r,o,u,m){r=$n(r)?r:os(r),u=u&&!m?ve(u):0;var C=r.length;return u<0&&(u=kn(C+u,0)),Hd(r)?u<=C&&r.indexOf(o,u)>-1:!!C&&Yo(r,o,u)>-1}var uA=xe(function(r,o,u){var m=-1,C=typeof o=="function",I=$n(r)?ct(r.length):[];return Yi(r,function(B){I[++m]=C?fr(o,B,u):ia(B,o,u)}),I}),dA=kd(function(r,o,u){gi(r,u,o)});function Ld(r,o){var u=le(r)?sn:ib;return u(r,Zt(o,3))}function fA(r,o,u,m){return r==null?[]:(le(o)||(o=o==null?[]:[o]),u=m?n:u,le(u)||(u=u==null?[]:[u]),lb(r,o,u))}var hA=kd(function(r,o,u){r[u?0:1].push(o)},function(){return[[],[]]});function gA(r,o,u){var m=le(r)?Uh:Rm,C=arguments.length<3;return m(r,Zt(o,4),u,C,Yi)}function pA(r,o,u){var m=le(r)?k1:Rm,C=arguments.length<3;return m(r,Zt(o,4),u,C,Qm)}function vA(r,o){var u=le(r)?Ui:Jm;return u(r,zd(Zt(o,3)))}function mA(r){var o=le(r)?Ym:c2;return o(r)}function bA(r,o,u){(u?Xn(r,o,u):o===n)?o=1:o=ve(o);var m=le(r)?VS:u2;return m(r,o)}function _A(r){var o=le(r)?HS:f2;return o(r)}function yA(r){if(r==null)return 0;if($n(r))return Hd(r)?jo(r):r.length;var o=Un(r);return o==Dt||o==ae?r.size:lg(r).length}function wA(r,o,u){var m=le(r)?Gh:h2;return u&&Xn(r,o,u)&&(o=n),m(r,Zt(o,3))}var xA=xe(function(r,o){if(r==null)return[];var u=o.length;return u>1&&Xn(r,o[0],o[1])?o=[]:u>2&&Xn(o[0],o[1],o[2])&&(o=[o[0]]),lb(r,Dn(o,1),[])}),Fd=nS||function(){return Mn.Date.now()};function SA(r,o){if(typeof o!="function")throw new Cr(a);return r=ve(r),function(){if(--r<1)return o.apply(this,arguments)}}function n_(r,o,u){return o=u?n:o,o=r&&o==null?r.length:o,pi(r,M,n,n,n,n,o)}function r_(r,o){var u;if(typeof o!="function")throw new Cr(a);return r=ve(r),function(){return--r>0&&(u=o.apply(this,arguments)),r<=1&&(o=n),u}}var Rg=xe(function(r,o,u){var m=x;if(u.length){var C=Ki(u,rs(Rg));m|=L}return pi(r,m,o,u,C)}),i_=xe(function(r,o,u){var m=x|A;if(u.length){var C=Ki(u,rs(i_));m|=L}return pi(o,m,r,u,C)});function o_(r,o,u){o=u?n:o;var m=pi(r,D,n,n,n,n,n,o);return m.placeholder=o_.placeholder,m}function s_(r,o,u){o=u?n:o;var m=pi(r,R,n,n,n,n,n,o);return m.placeholder=s_.placeholder,m}function a_(r,o,u){var m,C,I,B,Y,$,vt=0,mt=!1,bt=!1,Tt=!0;if(typeof r!="function")throw new Cr(a);o=Er(o)||0,cn(u)&&(mt=!!u.leading,bt="maxWait"in u,I=bt?kn(Er(u.maxWait)||0,o):I,Tt="trailing"in u?!!u.trailing:Tt);function zt(wn){var Fr=m,yi=C;return m=C=n,vt=wn,B=r.apply(yi,Fr),B}function Qt(wn){return vt=wn,Y=ca(ke,o),mt?zt(wn):B}function ye(wn){var Fr=wn-$,yi=wn-vt,P_=o-Fr;return bt?Wn(P_,I-yi):P_}function Jt(wn){var Fr=wn-$,yi=wn-vt;return $===n||Fr>=o||Fr<0||bt&&yi>=I}function ke(){var wn=Fd();if(Jt(wn))return Ee(wn);Y=ca(ke,ye(wn))}function Ee(wn){return Y=n,Tt&&m?zt(wn):(m=C=n,B)}function vr(){Y!==n&&mb(Y),vt=0,m=$=C=Y=n}function jn(){return Y===n?B:Ee(Fd())}function mr(){var wn=Fd(),Fr=Jt(wn);if(m=arguments,C=this,$=wn,Fr){if(Y===n)return Qt($);if(bt)return mb(Y),Y=ca(ke,o),zt($)}return Y===n&&(Y=ca(ke,o)),B}return mr.cancel=vr,mr.flush=jn,mr}var CA=xe(function(r,o){return Zm(r,1,o)}),AA=xe(function(r,o,u){return Zm(r,Er(o)||0,u)});function PA(r){return pi(r,q)}function Bd(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new Cr(a);var u=function(){var m=arguments,C=o?o.apply(this,m):m[0],I=u.cache;if(I.has(C))return I.get(C);var B=r.apply(this,m);return u.cache=I.set(C,B)||I,B};return u.cache=new(Bd.Cache||hi),u}Bd.Cache=hi;function zd(r){if(typeof r!="function")throw new Cr(a);return function(){var o=arguments;switch(o.length){case 0:return!r.call(this);case 1:return!r.call(this,o[0]);case 2:return!r.call(this,o[0],o[1]);case 3:return!r.call(this,o[0],o[1],o[2])}return!r.apply(this,o)}}function kA(r){return r_(2,r)}var TA=g2(function(r,o){o=o.length==1&&le(o[0])?sn(o[0],hr(Zt())):sn(Dn(o,1),hr(Zt()));var u=o.length;return xe(function(m){for(var C=-1,I=Wn(m.length,u);++C<I;)m[C]=o[C].call(this,m[C]);return fr(r,this,m)})}),Ng=xe(function(r,o){var u=Ki(o,rs(Ng));return pi(r,L,n,o,u)}),l_=xe(function(r,o){var u=Ki(o,rs(l_));return pi(r,F,n,o,u)}),EA=vi(function(r,o){return pi(r,U,n,n,n,o)});function IA(r,o){if(typeof r!="function")throw new Cr(a);return o=o===n?o:ve(o),xe(r,o)}function OA(r,o){if(typeof r!="function")throw new Cr(a);return o=o==null?0:kn(ve(o),0),xe(function(u){var m=u[o],C=Zi(u,0,o);return m&&Gi(C,m),fr(r,this,C)})}function RA(r,o,u){var m=!0,C=!0;if(typeof r!="function")throw new Cr(a);return cn(u)&&(m="leading"in u?!!u.leading:m,C="trailing"in u?!!u.trailing:C),a_(r,o,{leading:m,maxWait:o,trailing:C})}function NA(r){return n_(r,1)}function MA(r,o){return Ng(mg(o),r)}function DA(){if(!arguments.length)return[];var r=arguments[0];return le(r)?r:[r]}function LA(r){return Pr(r,b)}function FA(r,o){return o=typeof o=="function"?o:n,Pr(r,b,o)}function BA(r){return Pr(r,p|b)}function zA(r,o){return o=typeof o=="function"?o:n,Pr(r,p|b,o)}function VA(r,o){return o==null||jm(r,o,En(o))}function Lr(r,o){return r===o||r!==r&&o!==o}var HA=Od(og),WA=Od(function(r,o){return r>=o}),To=eb(function(){return arguments}())?eb:function(r){return gn(r)&&Ye.call(r,"callee")&&!Hm.call(r,"callee")},le=ct.isArray,UA=xm?hr(xm):QS;function $n(r){return r!=null&&Vd(r.length)&&!bi(r)}function yn(r){return gn(r)&&$n(r)}function GA(r){return r===!0||r===!1||gn(r)&&Yn(r)==kt}var Qi=iS||Gg,KA=Sm?hr(Sm):JS;function qA(r){return gn(r)&&r.nodeType===1&&!ua(r)}function YA(r){if(r==null)return!0;if($n(r)&&(le(r)||typeof r=="string"||typeof r.splice=="function"||Qi(r)||is(r)||To(r)))return!r.length;var o=Un(r);if(o==Dt||o==ae)return!r.size;if(la(r))return!lg(r).length;for(var u in r)if(Ye.call(r,u))return!1;return!0}function XA(r,o){return oa(r,o)}function jA(r,o,u){u=typeof u=="function"?u:n;var m=u?u(r,o):n;return m===n?oa(r,o,n,u):!!m}function Mg(r){if(!gn(r))return!1;var o=Yn(r);return o==Ie||o==Lt||typeof r.message=="string"&&typeof r.name=="string"&&!ua(r)}function ZA(r){return typeof r=="number"&&Um(r)}function bi(r){if(!cn(r))return!1;var o=Yn(r);return o==_e||o==Me||o==qt||o==Ut}function c_(r){return typeof r=="number"&&r==ve(r)}function Vd(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ht}function cn(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}function gn(r){return r!=null&&typeof r=="object"}var u_=Cm?hr(Cm):t2;function QA(r,o){return r===o||ag(r,o,Cg(o))}function JA(r,o,u){return u=typeof u=="function"?u:n,ag(r,o,Cg(o),u)}function $A(r){return d_(r)&&r!=+r}function tP(r){if(F2(r))throw new ie(l);return nb(r)}function eP(r){return r===null}function nP(r){return r==null}function d_(r){return typeof r=="number"||gn(r)&&Yn(r)==Ht}function ua(r){if(!gn(r)||Yn(r)!=Nt)return!1;var o=hd(r);if(o===null)return!0;var u=Ye.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&cd.call(u)==J1}var Dg=Am?hr(Am):e2;function rP(r){return c_(r)&&r>=-9007199254740991&&r<=ht}var f_=Pm?hr(Pm):n2;function Hd(r){return typeof r=="string"||!le(r)&&gn(r)&&Yn(r)==te}function pr(r){return typeof r=="symbol"||gn(r)&&Yn(r)==It}var is=km?hr(km):r2;function iP(r){return r===n}function oP(r){return gn(r)&&Un(r)==ge}function sP(r){return gn(r)&&Yn(r)==an}var aP=Od(cg),lP=Od(function(r,o){return r<=o});function h_(r){if(!r)return[];if($n(r))return Hd(r)?Mr(r):Jn(r);if(Qs&&r[Qs])return V1(r[Qs]());var o=Un(r),u=o==Dt?Zh:o==ae?sd:os;return u(r)}function _i(r){if(!r)return r===0?r:0;if(r=Er(r),r===rt||r===-1/0){var o=r<0?-1:1;return o*pt}return r===r?r:0}function ve(r){var o=_i(r),u=o%1;return o===o?u?o-u:o:0}function g_(r){return r?Co(ve(r),0,lt):0}function Er(r){if(typeof r=="number")return r;if(pr(r))return wt;if(cn(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=cn(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=Nm(r);var u=ci.test(r);return u||Sn.test(r)?S1(r.slice(2),u?2:8):ur.test(r)?wt:+r}function p_(r){return jr(r,tr(r))}function cP(r){return r?Co(ve(r),-9007199254740991,ht):r===0?r:0}function Ue(r){return r==null?"":gr(r)}var uP=es(function(r,o){if(la(o)||$n(o)){jr(o,En(o),r);return}for(var u in o)Ye.call(o,u)&&na(r,u,o[u])}),v_=es(function(r,o){jr(o,tr(o),r)}),Wd=es(function(r,o,u,m){jr(o,tr(o),r,m)}),dP=es(function(r,o,u,m){jr(o,En(o),r,m)}),fP=vi(ng);function hP(r,o){var u=ts(r);return o==null?u:Xm(u,o)}var gP=xe(function(r,o){r=Xe(r);var u=-1,m=o.length,C=m>2?o[2]:n;for(C&&Xn(o[0],o[1],C)&&(m=1);++u<m;)for(var I=o[u],B=tr(I),Y=-1,$=B.length;++Y<$;){var vt=B[Y],mt=r[vt];(mt===n||Lr(mt,Qo[vt])&&!Ye.call(r,vt))&&(r[vt]=I[vt])}return r}),pP=xe(function(r){return r.push(n,Nb),fr(m_,n,r)});function vP(r,o){return Em(r,Zt(o,3),Xr)}function mP(r,o){return Em(r,Zt(o,3),ig)}function bP(r,o){return r==null?r:rg(r,Zt(o,3),tr)}function _P(r,o){return r==null?r:$m(r,Zt(o,3),tr)}function yP(r,o){return r&&Xr(r,Zt(o,3))}function wP(r,o){return r&&ig(r,Zt(o,3))}function xP(r){return r==null?[]:Sd(r,En(r))}function SP(r){return r==null?[]:Sd(r,tr(r))}function Lg(r,o,u){var m=r==null?n:Ao(r,o);return m===n?u:m}function CP(r,o){return r!=null&&Lb(r,o,YS)}function Fg(r,o){return r!=null&&Lb(r,o,XS)}var AP=Tb(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=ud.call(o)),r[o]=u},zg(er)),PP=Tb(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=ud.call(o)),Ye.call(r,o)?r[o].push(u):r[o]=[u]},Zt),kP=xe(ia);function En(r){return $n(r)?qm(r):lg(r)}function tr(r){return $n(r)?qm(r,!0):i2(r)}function TP(r,o){var u={};return o=Zt(o,3),Xr(r,function(m,C,I){gi(u,o(m,C,I),m)}),u}function EP(r,o){var u={};return o=Zt(o,3),Xr(r,function(m,C,I){gi(u,C,o(m,C,I))}),u}var IP=es(function(r,o,u){Cd(r,o,u)}),m_=es(function(r,o,u,m){Cd(r,o,u,m)}),OP=vi(function(r,o){var u={};if(r==null)return u;var m=!1;o=sn(o,function(I){return I=ji(I,r),m||(m=I.length>1),I}),jr(r,xg(r),u),m&&(u=Pr(u,p|v|b,A2));for(var C=o.length;C--;)gg(u,o[C]);return u});function RP(r,o){return b_(r,zd(Zt(o)))}var NP=vi(function(r,o){return r==null?{}:s2(r,o)});function b_(r,o){if(r==null)return{};var u=sn(xg(r),function(m){return[m]});return o=Zt(o),cb(r,u,function(m,C){return o(m,C[0])})}function MP(r,o,u){o=ji(o,r);var m=-1,C=o.length;for(C||(C=1,r=n);++m<C;){var I=r==null?n:r[Zr(o[m])];I===n&&(m=C,I=u),r=bi(I)?I.call(r):I}return r}function DP(r,o,u){return r==null?r:sa(r,o,u)}function LP(r,o,u,m){return m=typeof m=="function"?m:n,r==null?r:sa(r,o,u,m)}var __=Ob(En),y_=Ob(tr);function FP(r,o,u){var m=le(r),C=m||Qi(r)||is(r);if(o=Zt(o,4),u==null){var I=r&&r.constructor;C?u=m?new I:[]:cn(r)?u=bi(I)?ts(hd(r)):{}:u={}}return(C?Sr:Xr)(r,function(B,Y,$){return o(u,B,Y,$)}),u}function BP(r,o){return r==null?!0:gg(r,o)}function zP(r,o,u){return r==null?r:gb(r,o,mg(u))}function VP(r,o,u,m){return m=typeof m=="function"?m:n,r==null?r:gb(r,o,mg(u),m)}function os(r){return r==null?[]:jh(r,En(r))}function HP(r){return r==null?[]:jh(r,tr(r))}function WP(r,o,u){return u===n&&(u=o,o=n),u!==n&&(u=Er(u),u=u===u?u:0),o!==n&&(o=Er(o),o=o===o?o:0),Co(Er(r),o,u)}function UP(r,o,u){return o=_i(o),u===n?(u=o,o=0):u=_i(u),r=Er(r),jS(r,o,u)}function GP(r,o,u){if(u&&typeof u!="boolean"&&Xn(r,o,u)&&(o=u=n),u===n&&(typeof o=="boolean"?(u=o,o=n):typeof r=="boolean"&&(u=r,r=n)),r===n&&o===n?(r=0,o=1):(r=_i(r),o===n?(o=r,r=0):o=_i(o)),r>o){var m=r;r=o,o=m}if(u||r%1||o%1){var C=Gm();return Wn(r+C*(o-r+x1("1e-"+((C+"").length-1))),o)}return dg(r,o)}var KP=ns(function(r,o,u){return o=o.toLowerCase(),r+(u?w_(o):o)});function w_(r){return Bg(Ue(r).toLowerCase())}function x_(r){return r=Ue(r),r&&r.replace(Vn,D1).replace(f1,"")}function qP(r,o,u){r=Ue(r),o=gr(o);var m=r.length;u=u===n?m:Co(ve(u),0,m);var C=u;return u-=o.length,u>=0&&r.slice(u,C)==o}function YP(r){return r=Ue(r),r&&Gt.test(r)?r.replace(un,L1):r}function XP(r){return r=Ue(r),r&&Qe.test(r)?r.replace(ze,"\\$&"):r}var jP=ns(function(r,o,u){return r+(u?"-":"")+o.toLowerCase()}),ZP=ns(function(r,o,u){return r+(u?" ":"")+o.toLowerCase()}),QP=Ab("toLowerCase");function JP(r,o,u){r=Ue(r),o=ve(o);var m=o?jo(r):0;if(!o||m>=o)return r;var C=(o-m)/2;return Id(md(C),u)+r+Id(vd(C),u)}function $P(r,o,u){r=Ue(r),o=ve(o);var m=o?jo(r):0;return o&&m<o?r+Id(o-m,u):r}function tk(r,o,u){r=Ue(r),o=ve(o);var m=o?jo(r):0;return o&&m<o?Id(o-m,u)+r:r}function ek(r,o,u){return u||o==null?o=0:o&&(o=+o),lS(Ue(r).replace(qe,""),o||0)}function nk(r,o,u){return(u?Xn(r,o,u):o===n)?o=1:o=ve(o),fg(Ue(r),o)}function rk(){var r=arguments,o=Ue(r[0]);return r.length<3?o:o.replace(r[1],r[2])}var ik=ns(function(r,o,u){return r+(u?"_":"")+o.toLowerCase()});function ok(r,o,u){return u&&typeof u!="number"&&Xn(r,o,u)&&(o=u=n),u=u===n?lt:u>>>0,u?(r=Ue(r),r&&(typeof o=="string"||o!=null&&!Dg(o))&&(o=gr(o),!o&&Xo(r))?Zi(Mr(r),0,u):r.split(o,u)):[]}var sk=ns(function(r,o,u){return r+(u?" ":"")+Bg(o)});function ak(r,o,u){return r=Ue(r),u=u==null?0:Co(ve(u),0,r.length),o=gr(o),r.slice(u,u+o.length)==o}function lk(r,o,u){var m=k.templateSettings;u&&Xn(r,o,u)&&(o=n),r=Ue(r),o=Wd({},o,m,Rb);var C=Wd({},o.imports,m.imports,Rb),I=En(C),B=jh(C,I),Y,$,vt=0,mt=o.interpolate||Nn,bt="__p += '",Tt=Qh((o.escape||Nn).source+"|"+mt.source+"|"+(mt===Be?cr:Nn).source+"|"+(o.evaluate||Nn).source+"|$","g"),zt="//# sourceURL="+(Ye.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++m1+"]")+`
496
+ `;r.replace(Tt,function(Jt,ke,Ee,vr,jn,mr){return Ee||(Ee=vr),bt+=r.slice(vt,mr).replace(mo,F1),ke&&(Y=!0,bt+=`' +
497
+ __e(`+ke+`) +
498
+ '`),jn&&($=!0,bt+=`';
499
+ `+jn+`;
500
+ __p += '`),Ee&&(bt+=`' +
501
+ ((__t = (`+Ee+`)) == null ? '' : __t) +
502
+ '`),vt=mr+Jt.length,Jt}),bt+=`';
503
+ `;var Qt=Ye.call(o,"variable")&&o.variable;if(!Qt)bt=`with (obj) {
504
+ `+bt+`
505
+ }
506
+ `;else if(Rr.test(Qt))throw new ie(c);bt=($?bt.replace(mn,""):bt).replace(Oe,"$1").replace(Re,"$1;"),bt="function("+(Qt||"obj")+`) {
507
+ `+(Qt?"":`obj || (obj = {});
508
+ `)+"var __t, __p = ''"+(Y?", __e = _.escape":"")+($?`, __j = Array.prototype.join;
509
+ function print() { __p += __j.call(arguments, '') }
510
+ `:`;
511
+ `)+bt+`return __p
512
+ }`;var ye=C_(function(){return Ve(I,zt+"return "+bt).apply(n,B)});if(ye.source=bt,Mg(ye))throw ye;return ye}function ck(r){return Ue(r).toLowerCase()}function uk(r){return Ue(r).toUpperCase()}function dk(r,o,u){if(r=Ue(r),r&&(u||o===n))return Nm(r);if(!r||!(o=gr(o)))return r;var m=Mr(r),C=Mr(o),I=Mm(m,C),B=Dm(m,C)+1;return Zi(m,I,B).join("")}function fk(r,o,u){if(r=Ue(r),r&&(u||o===n))return r.slice(0,Fm(r)+1);if(!r||!(o=gr(o)))return r;var m=Mr(r),C=Dm(m,Mr(o))+1;return Zi(m,0,C).join("")}function hk(r,o,u){if(r=Ue(r),r&&(u||o===n))return r.replace(qe,"");if(!r||!(o=gr(o)))return r;var m=Mr(r),C=Mm(m,Mr(o));return Zi(m,C).join("")}function gk(r,o){var u=tt,m=nt;if(cn(o)){var C="separator"in o?o.separator:C;u="length"in o?ve(o.length):u,m="omission"in o?gr(o.omission):m}r=Ue(r);var I=r.length;if(Xo(r)){var B=Mr(r);I=B.length}if(u>=I)return r;var Y=u-jo(m);if(Y<1)return m;var $=B?Zi(B,0,Y).join(""):r.slice(0,Y);if(C===n)return $+m;if(B&&(Y+=$.length-Y),Dg(C)){if(r.slice(Y).search(C)){var vt,mt=$;for(C.global||(C=Qh(C.source,Ue(Cn.exec(C))+"g")),C.lastIndex=0;vt=C.exec(mt);)var bt=vt.index;$=$.slice(0,bt===n?Y:bt)}}else if(r.indexOf(gr(C),Y)!=Y){var Tt=$.lastIndexOf(C);Tt>-1&&($=$.slice(0,Tt))}return $+m}function pk(r){return r=Ue(r),r&&Bn.test(r)?r.replace(je,G1):r}var vk=ns(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),Bg=Ab("toUpperCase");function S_(r,o,u){return r=Ue(r),o=u?n:o,o===n?z1(r)?Y1(r):I1(r):r.match(o)||[]}var C_=xe(function(r,o){try{return fr(r,n,o)}catch(u){return Mg(u)?u:new ie(u)}}),mk=vi(function(r,o){return Sr(o,function(u){u=Zr(u),gi(r,u,Rg(r[u],r))}),r});function bk(r){var o=r==null?0:r.length,u=Zt();return r=o?sn(r,function(m){if(typeof m[1]!="function")throw new Cr(a);return[u(m[0]),m[1]]}):[],xe(function(m){for(var C=-1;++C<o;){var I=r[C];if(fr(I[0],this,m))return fr(I[1],this,m)}})}function _k(r){return GS(Pr(r,p))}function zg(r){return function(){return r}}function yk(r,o){return r==null||r!==r?o:r}var wk=kb(),xk=kb(!0);function er(r){return r}function Vg(r){return rb(typeof r=="function"?r:Pr(r,p))}function Sk(r){return ob(Pr(r,p))}function Ck(r,o){return sb(r,Pr(o,p))}var Ak=xe(function(r,o){return function(u){return ia(u,r,o)}}),Pk=xe(function(r,o){return function(u){return ia(r,u,o)}});function Hg(r,o,u){var m=En(o),C=Sd(o,m);u==null&&!(cn(o)&&(C.length||!m.length))&&(u=o,o=r,r=this,C=Sd(o,En(o)));var I=!(cn(u)&&"chain"in u)||!!u.chain,B=bi(r);return Sr(C,function(Y){var $=o[Y];r[Y]=$,B&&(r.prototype[Y]=function(){var vt=this.__chain__;if(I||vt){var mt=r(this.__wrapped__),bt=mt.__actions__=Jn(this.__actions__);return bt.push({func:$,args:arguments,thisArg:r}),mt.__chain__=vt,mt}return $.apply(r,Gi([this.value()],arguments))})}),r}function kk(){return Mn._===this&&(Mn._=$1),this}function Wg(){}function Tk(r){return r=ve(r),xe(function(o){return ab(o,r)})}var Ek=_g(sn),Ik=_g(Tm),Ok=_g(Gh);function A_(r){return Pg(r)?Kh(Zr(r)):a2(r)}function Rk(r){return function(o){return r==null?n:Ao(r,o)}}var Nk=Eb(),Mk=Eb(!0);function Ug(){return[]}function Gg(){return!1}function Dk(){return{}}function Lk(){return""}function Fk(){return!0}function Bk(r,o){if(r=ve(r),r<1||r>ht)return[];var u=lt,m=Wn(r,lt);o=Zt(o),r-=lt;for(var C=Xh(m,o);++u<r;)o(u);return C}function zk(r){return le(r)?sn(r,Zr):pr(r)?[r]:Jn(Kb(Ue(r)))}function Vk(r){var o=++Q1;return Ue(r)+o}var Hk=Ed(function(r,o){return r+o},0),Wk=yg("ceil"),Uk=Ed(function(r,o){return r/o},1),Gk=yg("floor");function Kk(r){return r&&r.length?xd(r,er,og):n}function qk(r,o){return r&&r.length?xd(r,Zt(o,2),og):n}function Yk(r){return Om(r,er)}function Xk(r,o){return Om(r,Zt(o,2))}function jk(r){return r&&r.length?xd(r,er,cg):n}function Zk(r,o){return r&&r.length?xd(r,Zt(o,2),cg):n}var Qk=Ed(function(r,o){return r*o},1),Jk=yg("round"),$k=Ed(function(r,o){return r-o},0);function tT(r){return r&&r.length?Yh(r,er):0}function eT(r,o){return r&&r.length?Yh(r,Zt(o,2)):0}return k.after=SA,k.ary=n_,k.assign=uP,k.assignIn=v_,k.assignInWith=Wd,k.assignWith=dP,k.at=fP,k.before=r_,k.bind=Rg,k.bindAll=mk,k.bindKey=i_,k.castArray=DA,k.chain=$b,k.chunk=G2,k.compact=K2,k.concat=q2,k.cond=bk,k.conforms=_k,k.constant=zg,k.countBy=tA,k.create=hP,k.curry=o_,k.curryRight=s_,k.debounce=a_,k.defaults=gP,k.defaultsDeep=pP,k.defer=CA,k.delay=AA,k.difference=Y2,k.differenceBy=X2,k.differenceWith=j2,k.drop=Z2,k.dropRight=Q2,k.dropRightWhile=J2,k.dropWhile=$2,k.fill=tC,k.filter=nA,k.flatMap=oA,k.flatMapDeep=sA,k.flatMapDepth=aA,k.flatten=jb,k.flattenDeep=eC,k.flattenDepth=nC,k.flip=PA,k.flow=wk,k.flowRight=xk,k.fromPairs=rC,k.functions=xP,k.functionsIn=SP,k.groupBy=lA,k.initial=oC,k.intersection=sC,k.intersectionBy=aC,k.intersectionWith=lC,k.invert=AP,k.invertBy=PP,k.invokeMap=uA,k.iteratee=Vg,k.keyBy=dA,k.keys=En,k.keysIn=tr,k.map=Ld,k.mapKeys=TP,k.mapValues=EP,k.matches=Sk,k.matchesProperty=Ck,k.memoize=Bd,k.merge=IP,k.mergeWith=m_,k.method=Ak,k.methodOf=Pk,k.mixin=Hg,k.negate=zd,k.nthArg=Tk,k.omit=OP,k.omitBy=RP,k.once=kA,k.orderBy=fA,k.over=Ek,k.overArgs=TA,k.overEvery=Ik,k.overSome=Ok,k.partial=Ng,k.partialRight=l_,k.partition=hA,k.pick=NP,k.pickBy=b_,k.property=A_,k.propertyOf=Rk,k.pull=fC,k.pullAll=Qb,k.pullAllBy=hC,k.pullAllWith=gC,k.pullAt=pC,k.range=Nk,k.rangeRight=Mk,k.rearg=EA,k.reject=vA,k.remove=vC,k.rest=IA,k.reverse=Ig,k.sampleSize=bA,k.set=DP,k.setWith=LP,k.shuffle=_A,k.slice=mC,k.sortBy=xA,k.sortedUniq=CC,k.sortedUniqBy=AC,k.split=ok,k.spread=OA,k.tail=PC,k.take=kC,k.takeRight=TC,k.takeRightWhile=EC,k.takeWhile=IC,k.tap=KC,k.throttle=RA,k.thru=Dd,k.toArray=h_,k.toPairs=__,k.toPairsIn=y_,k.toPath=zk,k.toPlainObject=p_,k.transform=FP,k.unary=NA,k.union=OC,k.unionBy=RC,k.unionWith=NC,k.uniq=MC,k.uniqBy=DC,k.uniqWith=LC,k.unset=BP,k.unzip=Og,k.unzipWith=Jb,k.update=zP,k.updateWith=VP,k.values=os,k.valuesIn=HP,k.without=FC,k.words=S_,k.wrap=MA,k.xor=BC,k.xorBy=zC,k.xorWith=VC,k.zip=HC,k.zipObject=WC,k.zipObjectDeep=UC,k.zipWith=GC,k.entries=__,k.entriesIn=y_,k.extend=v_,k.extendWith=Wd,Hg(k,k),k.add=Hk,k.attempt=C_,k.camelCase=KP,k.capitalize=w_,k.ceil=Wk,k.clamp=WP,k.clone=LA,k.cloneDeep=BA,k.cloneDeepWith=zA,k.cloneWith=FA,k.conformsTo=VA,k.deburr=x_,k.defaultTo=yk,k.divide=Uk,k.endsWith=qP,k.eq=Lr,k.escape=YP,k.escapeRegExp=XP,k.every=eA,k.find=rA,k.findIndex=Yb,k.findKey=vP,k.findLast=iA,k.findLastIndex=Xb,k.findLastKey=mP,k.floor=Gk,k.forEach=t_,k.forEachRight=e_,k.forIn=bP,k.forInRight=_P,k.forOwn=yP,k.forOwnRight=wP,k.get=Lg,k.gt=HA,k.gte=WA,k.has=CP,k.hasIn=Fg,k.head=Zb,k.identity=er,k.includes=cA,k.indexOf=iC,k.inRange=UP,k.invoke=kP,k.isArguments=To,k.isArray=le,k.isArrayBuffer=UA,k.isArrayLike=$n,k.isArrayLikeObject=yn,k.isBoolean=GA,k.isBuffer=Qi,k.isDate=KA,k.isElement=qA,k.isEmpty=YA,k.isEqual=XA,k.isEqualWith=jA,k.isError=Mg,k.isFinite=ZA,k.isFunction=bi,k.isInteger=c_,k.isLength=Vd,k.isMap=u_,k.isMatch=QA,k.isMatchWith=JA,k.isNaN=$A,k.isNative=tP,k.isNil=nP,k.isNull=eP,k.isNumber=d_,k.isObject=cn,k.isObjectLike=gn,k.isPlainObject=ua,k.isRegExp=Dg,k.isSafeInteger=rP,k.isSet=f_,k.isString=Hd,k.isSymbol=pr,k.isTypedArray=is,k.isUndefined=iP,k.isWeakMap=oP,k.isWeakSet=sP,k.join=cC,k.kebabCase=jP,k.last=Tr,k.lastIndexOf=uC,k.lowerCase=ZP,k.lowerFirst=QP,k.lt=aP,k.lte=lP,k.max=Kk,k.maxBy=qk,k.mean=Yk,k.meanBy=Xk,k.min=jk,k.minBy=Zk,k.stubArray=Ug,k.stubFalse=Gg,k.stubObject=Dk,k.stubString=Lk,k.stubTrue=Fk,k.multiply=Qk,k.nth=dC,k.noConflict=kk,k.noop=Wg,k.now=Fd,k.pad=JP,k.padEnd=$P,k.padStart=tk,k.parseInt=ek,k.random=GP,k.reduce=gA,k.reduceRight=pA,k.repeat=nk,k.replace=rk,k.result=MP,k.round=Jk,k.runInContext=Q,k.sample=mA,k.size=yA,k.snakeCase=ik,k.some=wA,k.sortedIndex=bC,k.sortedIndexBy=_C,k.sortedIndexOf=yC,k.sortedLastIndex=wC,k.sortedLastIndexBy=xC,k.sortedLastIndexOf=SC,k.startCase=sk,k.startsWith=ak,k.subtract=$k,k.sum=tT,k.sumBy=eT,k.template=lk,k.times=Bk,k.toFinite=_i,k.toInteger=ve,k.toLength=g_,k.toLower=ck,k.toNumber=Er,k.toSafeInteger=cP,k.toString=Ue,k.toUpper=uk,k.trim=dk,k.trimEnd=fk,k.trimStart=hk,k.truncate=gk,k.unescape=pk,k.uniqueId=Vk,k.upperCase=vk,k.upperFirst=Bg,k.each=t_,k.eachRight=e_,k.first=Zb,Hg(k,function(){var r={};return Xr(k,function(o,u){Ye.call(k.prototype,u)||(r[u]=o)}),r}(),{chain:!1}),k.VERSION=i,Sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){k[r].placeholder=k}),Sr(["drop","take"],function(r,o){Te.prototype[r]=function(u){u=u===n?1:kn(ve(u),0);var m=this.__filtered__&&!o?new Te(this):this.clone();return m.__filtered__?m.__takeCount__=Wn(u,m.__takeCount__):m.__views__.push({size:Wn(u,lt),type:r+(m.__dir__<0?"Right":"")}),m},Te.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Sr(["filter","map","takeWhile"],function(r,o){var u=o+1,m=u==X||u==J;Te.prototype[r]=function(C){var I=this.clone();return I.__iteratees__.push({iteratee:Zt(C,3),type:u}),I.__filtered__=I.__filtered__||m,I}}),Sr(["head","last"],function(r,o){var u="take"+(o?"Right":"");Te.prototype[r]=function(){return this[u](1).value()[0]}}),Sr(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");Te.prototype[r]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter(er)},Te.prototype.find=function(r){return this.filter(r).head()},Te.prototype.findLast=function(r){return this.reverse().find(r)},Te.prototype.invokeMap=xe(function(r,o){return typeof r=="function"?new Te(this):this.map(function(u){return ia(u,r,o)})}),Te.prototype.reject=function(r){return this.filter(zd(Zt(r)))},Te.prototype.slice=function(r,o){r=ve(r);var u=this;return u.__filtered__&&(r>0||o<0)?new Te(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==n&&(o=ve(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},Te.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Te.prototype.toArray=function(){return this.take(lt)},Xr(Te.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),m=/^(?:head|last)$/.test(o),C=k[m?"take"+(o=="last"?"Right":""):o],I=m||/^find/.test(o);C&&(k.prototype[o]=function(){var B=this.__wrapped__,Y=m?[1]:arguments,$=B instanceof Te,vt=Y[0],mt=$||le(B),bt=function(ke){var Ee=C.apply(k,Gi([ke],Y));return m&&Tt?Ee[0]:Ee};mt&&u&&typeof vt=="function"&&vt.length!=1&&($=mt=!1);var Tt=this.__chain__,zt=!!this.__actions__.length,Qt=I&&!Tt,ye=$&&!zt;if(!I&&mt){B=ye?B:new Te(this);var Jt=r.apply(B,Y);return Jt.__actions__.push({func:Dd,args:[bt],thisArg:n}),new Ar(Jt,Tt)}return Qt&&ye?r.apply(this,Y):(Jt=this.thru(bt),Qt?m?Jt.value()[0]:Jt.value():Jt)})}),Sr(["pop","push","shift","sort","splice","unshift"],function(r){var o=ad[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",m=/^(?:pop|shift)$/.test(r);k.prototype[r]=function(){var C=arguments;if(m&&!this.__chain__){var I=this.value();return o.apply(le(I)?I:[],C)}return this[u](function(B){return o.apply(le(B)?B:[],C)})}}),Xr(Te.prototype,function(r,o){var u=k[o];if(u){var m=u.name+"";Ye.call($o,m)||($o[m]=[]),$o[m].push({name:o,func:u})}}),$o[Td(n,A).name]=[{name:"wrapper",func:n}],Te.prototype.clone=pS,Te.prototype.reverse=vS,Te.prototype.value=mS,k.prototype.at=qC,k.prototype.chain=YC,k.prototype.commit=XC,k.prototype.next=jC,k.prototype.plant=QC,k.prototype.reverse=JC,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=$C,k.prototype.first=k.prototype.head,Qs&&(k.prototype[Qs]=ZC),k},Zo=X1();yo?((yo.exports=Zo)._=Zo,Vh._=Zo):Mn._=Zo}).call(ti)})(Ef,Ef.exports);var fF=Ef.exports;const N0=Ly(fF);function hF(e,t){const n=e.target.value;/^#[0-9A-Fa-f]{6}$/.test(n)&&O(t,n,!0)}function M0(e){e.stopPropagation(),e.preventDefault()}function gF(e,t,n){e.stopPropagation(),e.preventDefault(),O(t,!d(t)),d(t)&&setTimeout(n,0)}function D0(e,t){e.key==="Escape"&&t()}var pF=(e,t,n)=>t(d(n)),vF=Z('<button type="button"></button>'),mF=Z('<div id="color-picker-panel" tabindex="-1"><div class="flex items-center justify-between border-b px-3 py-2"><h3 class="text-sm font-medium">Color</h3> <!></div> <div class="p-3"><div class="space-y-3"><div class="relative h-28 cursor-crosshair rounded"><div class="absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-md"></div></div> <div class="relative h-4 cursor-pointer rounded" style="background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"><div class="absolute top-0 h-full w-1 -translate-x-1/2 border-x border-white shadow-sm"></div></div> <div class="flex items-center gap-2"><div class="h-6 w-6 rounded border"></div> <input type="text" class="bg-background flex-1 rounded border px-2 py-1 text-xs uppercase"/></div> <div class="space-y-1"><div class="flex items-center justify-between text-xs"><span>Opacity</span> <span> </span></div> <!></div> <div class="space-y-1"><div class="text-xs">Presets</div> <div class="grid grid-cols-8 gap-1"></div></div></div> <div class="mt-3 flex justify-end gap-2"><!> <!></div></div></div>'),bF=Z('<div class="relative inline-block"><button type="button" class="m-0 border-0 bg-transparent p-0" tabindex="0"><!></button> <!></div>');function l7(e,t){st(t,!0);let n=P(t,"initialColor",3,"#ff0000"),i=P(t,"initialAlpha",3,1),s=P(t,"position",3,"right"),l=ft(!1),a,c=ft(On(n())),f=ft(On(i()));const h=["#ff0000","#ff8000","#ffff00","#80ff00","#00ff00","#00ffff","#0080ff","#0000ff","#8000ff","#ff00ff","#ff0080","#ffffff","#cccccc","#888888","#444444","#000000"];let g,p,v=ft(0),b=ft(100),w=ft(50);se(()=>{if(d(c).startsWith("#")){const[X,j,J]=S(d(c));O(v,X,!0),O(b,j,!0),O(w,J,!0)}}),se(()=>{O(c,x(d(v),d(b),d(w)),!0)});function S(X){X=X.replace(/^#/,"");const j=parseInt(X.slice(0,2),16)/255,J=parseInt(X.slice(2,4),16)/255,rt=parseInt(X.slice(4,6),16)/255,ht=Math.max(j,J,rt),pt=Math.min(j,J,rt),wt=(ht+pt)/2;let lt=0,yt=0;if(ht!==pt){const Ot=ht-pt;switch(yt=wt>.5?Ot/(2-ht-pt):Ot/(ht+pt),ht){case j:lt=((J-rt)/Ot+(J<rt?6:0))/6;break;case J:lt=((rt-j)/Ot+2)/6;break;case rt:lt=((j-J)/Ot+4)/6;break}}return[Math.round(lt*360),Math.round(yt*100),Math.round(wt*100)]}function x(X,j,J){X/=360,j/=100,J/=100;let rt,ht,pt;if(j===0)rt=ht=pt=J;else{const yt=J<.5?J*(1+j):J+j-J*j,Ot=2*J-yt;rt=wt(Ot,yt,X+1/3),ht=wt(Ot,yt,X),pt=wt(Ot,yt,X-1/3)}function wt(yt,Ot,Vt){return Vt<0&&(Vt+=1),Vt>1&&(Vt-=1),Vt<1/6?yt+(Ot-yt)*6*Vt:Vt<1/2?Ot:Vt<2/3?yt+(Ot-yt)*(2/3-Vt)*6:yt}const lt=yt=>{const Ot=Math.round(yt*255).toString(16);return Ot.length===1?"0"+Ot:Ot};return`#${lt(rt)}${lt(ht)}${lt(pt)}`}function A(X){if(!g)return;const j=g.getBoundingClientRect(),J=Math.max(0,Math.min(1,(X.clientX-j.left)/j.width)),rt=Math.max(0,Math.min(1,(X.clientY-j.top)/j.height));if(O(b,Math.round(J*100),!0),O(w,Math.round((1-rt)*100),!0),X.buttons!==1&&X.type!=="mousedown")return;const ht=pt=>A(pt);document.addEventListener("mousemove",ht),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ht)},{once:!0})}function T(X){if(!p)return;const j=p.getBoundingClientRect(),J=Math.max(0,Math.min(1,(X.clientX-j.left)/j.width));if(O(v,Math.round(J*360),!0),X.buttons!==1&&X.type!=="mousedown")return;const rt=ht=>T(ht);document.addEventListener("mousemove",rt),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",rt)},{once:!0})}function D(X){O(c,X,!0)}function R(X){O(f,X[0],!0)}function L(){t.onChange&&t.onChange(d(c),d(f)),O(l,!1)}function F(){O(l,!1)}function M(){function X(J){if(d(l)&&a){const rt=document.getElementById("color-picker-panel");rt&&!rt.contains(J.target)&&!a.contains(J.target)&&O(l,!1)}}document.addEventListener("mousedown",X);const j=()=>U();return window.addEventListener("resize",j),{destroy:()=>{document.removeEventListener("mousedown",X),window.removeEventListener("resize",j)}}}function U(){a&&requestAnimationFrame(()=>{const X=document.getElementById("color-picker-panel");if(!X)return;const j=a.getBoundingClientRect(),J=window.innerWidth,rt=window.innerHeight,ht=X.offsetWidth,pt=X.offsetHeight;let wt,lt;switch(s()){case"top":wt=j.left+j.width/2-ht/2,lt=j.top-pt-8;break;case"bottom":wt=j.left+j.width/2-ht/2,lt=j.bottom+8;break;case"left":wt=j.left-ht-8,lt=j.top;break;case"right":default:wt=j.right+8,lt=j.top;break}wt<10&&(wt=10),lt<10&&(lt=10),wt+ht>J-10&&(wt=J-ht-10),lt+pt>rt-10&&(lt=rt-pt-10),X.style.position="fixed",X.style.left=`${wt}px`,X.style.top=`${lt}px`})}vy(()=>{if(d(l))return M().destroy});var q=bF(),tt=G(q);tt.__click=[gF,l,U],tt.__keydown=[D0,F];var nt=G(tt);ut(nt,()=>t.children),W(tt),Rn(tt,X=>a=X,()=>a);var z=et(tt,2);{var it=X=>{var j=K(),J=N(j);_t(J,()=>yh,(rt,ht)=>{ht(rt,{children:(pt,wt)=>{var lt=mF();lt.__keydown=[D0,F],lt.__click=[M0],lt.__mousedown=[M0];var yt=G(lt),Ot=et(G(yt),2);In(Ot,{variant:"ghost",size:"icon",class:"h-6 w-6",onclick:F,children:(It,Xt)=>{Ny(It,{class:"h-4 w-4"})},$$slots:{default:!0}}),W(yt);var Vt=et(yt,2),St=G(Vt),At=G(St);At.__mousedown=A;var qt=G(At);W(At),Rn(At,It=>g=It,()=>g);var kt=et(At,2);kt.__mousedown=T;var Wt=G(kt);W(kt),Rn(kt,It=>p=It,()=>p);var Lt=et(kt,2),Ie=G(Lt),_e=et(Ie,2);my(_e),_e.__input=[hF,c],W(Lt);var Me=et(Lt,2),Dt=G(Me),Ht=et(G(Dt),2),Ae=G(Ht);W(Ht),W(Dt);var Nt=et(Dt,2);{let It=E(()=>[d(f)]);kL(Nt,{min:0,max:1,step:.01,get value(){return d(It)},onValueChange:R})}W(Me);var ne=et(Me,2),Ut=et(G(ne),2);Qn(Ut,21,()=>h,Rs,(It,Xt)=>{var ge=vF();ge.__click=[pF,D,Xt],Rt(an=>{Kn(ge,1,an),Gn(ge,`background-color: ${d(Xt)}`),Pt(ge,"title",d(Xt))},[()=>zo(ce("h-4 w-4 rounded-sm border",d(c)===d(Xt)?"ring-primary ring-1":""))]),_(It,ge)}),W(Ut),W(ne),W(St);var he=et(St,2),ae=G(he);In(ae,{size:"sm",variant:"outline",class:"h-7 px-2 py-0 text-xs",onclick:F,children:(It,Xt)=>{jt();var ge=oe("Cancel");_(It,ge)},$$slots:{default:!0}});var te=et(ae,2);In(te,{size:"sm",class:"h-7 px-2 py-0 text-xs",onclick:L,children:(It,Xt)=>{jt();var ge=oe("Apply");_(It,ge)},$$slots:{default:!0}}),W(he),W(Vt),W(lt),Rt((It,Xt)=>{Kn(lt,1,It),Gn(At,`background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${d(v)}, 100%, 50%))`),Gn(qt,`left: ${d(b)}%; top: ${100-d(w)}%; background-color: ${d(c)}`),Gn(Wt,`left: ${d(v)/360*100}%`),Gn(Ie,`background-color: ${d(c)}`),zT(_e,d(c)),$t(Ae,`${Xt??""}%`)},[()=>zo(ce("bg-popover text-popover-foreground z-50 w-56 rounded-md border shadow-md",t.class)),()=>Math.round(d(f)*100)]),fv(3,lt,()=>_x,()=>({duration:150,y:0,x:0})),_(pt,lt)},$$slots:{default:!0}})}),_(X,j)};dt(z,X=>{d(l)&&X(it)})}W(q),_(e,q),at()}ar(["click","keydown","mousedown","input"]);var _F=Z('<div style="height: 1px; width: 1px;"></div>');function Ax(e,t){st(t,!0);const n=P(t,"rootMargin",3,"200px"),i=P(t,"threshold",3,0),s=P(t,"disabled",3,!1);let l=ft(null);se(()=>{if(!d(l)||s())return;const c=new IntersectionObserver(f=>{f[0].isIntersecting&&t.onIntersect()},{rootMargin:n(),threshold:i()});return c.observe(d(l)),()=>c.disconnect()});var a=_F();Rn(a,c=>O(l,c),()=>d(l)),_(e,a),at()}function gp(e,t,n=!1){const s={...e};if(n)return s.x=Math.round(Math.max(t.x,Math.min(s.x,t.x+t.width-s.width))),s.y=Math.round(Math.max(t.y,Math.min(s.y,t.y+t.height-s.height))),s;{const l=e.x,a=e.y,c=e.x+e.width,f=e.y+e.height,h=Math.max(t.x,l),g=Math.max(t.y,a),p=Math.min(t.x+t.width,c),v=Math.min(t.y+t.height,f),b={x:Math.round(h),y:Math.round(g),width:Math.round(p-h),height:Math.round(v-g)};return b.width=Math.max(1,b.width),b.height=Math.max(1,b.height),b}}var tv="http://www.w3.org/1999/xhtml";const L0={svg:"http://www.w3.org/2000/svg",xhtml:tv,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ih(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),L0.hasOwnProperty(t)?{space:L0[t],local:e}:e}function yF(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===tv&&t.documentElement.namespaceURI===tv?t.createElement(e):t.createElementNS(n,e)}}function wF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Px(e){var t=Ih(e);return(t.local?wF:yF)(t)}function xF(){}function Jv(e){return e==null?xF:function(){return this.querySelector(e)}}function SF(e){typeof e!="function"&&(e=Jv(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=new Array(a),f,h,g=0;g<a;++g)(f=l[g])&&(h=e.call(f,f.__data__,g,l))&&("__data__"in f&&(h.__data__=f.__data__),c[g]=h);return new wr(i,this._parents)}function CF(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function AF(){return[]}function kx(e){return e==null?AF:function(){return this.querySelectorAll(e)}}function PF(e){return function(){return CF(e.apply(this,arguments))}}function kF(e){typeof e=="function"?e=PF(e):e=kx(e);for(var t=this._groups,n=t.length,i=[],s=[],l=0;l<n;++l)for(var a=t[l],c=a.length,f,h=0;h<c;++h)(f=a[h])&&(i.push(e.call(f,f.__data__,h,a)),s.push(f));return new wr(i,s)}function Tx(e){return function(){return this.matches(e)}}function Ex(e){return function(t){return t.matches(e)}}var TF=Array.prototype.find;function EF(e){return function(){return TF.call(this.children,e)}}function IF(){return this.firstElementChild}function OF(e){return this.select(e==null?IF:EF(typeof e=="function"?e:Ex(e)))}var RF=Array.prototype.filter;function NF(){return Array.from(this.children)}function MF(e){return function(){return RF.call(this.children,e)}}function DF(e){return this.selectAll(e==null?NF:MF(typeof e=="function"?e:Ex(e)))}function LF(e){typeof e!="function"&&(e=Tx(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],f,h=0;h<a;++h)(f=l[h])&&e.call(f,f.__data__,h,l)&&c.push(f);return new wr(i,this._parents)}function Ix(e){return new Array(e.length)}function FF(){return new wr(this._enter||this._groups.map(Ix),this._parents)}function If(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}If.prototype={constructor:If,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function BF(e){return function(){return e}}function zF(e,t,n,i,s,l){for(var a=0,c,f=t.length,h=l.length;a<h;++a)(c=t[a])?(c.__data__=l[a],i[a]=c):n[a]=new If(e,l[a]);for(;a<f;++a)(c=t[a])&&(s[a]=c)}function VF(e,t,n,i,s,l,a){var c,f,h=new Map,g=t.length,p=l.length,v=new Array(g),b;for(c=0;c<g;++c)(f=t[c])&&(v[c]=b=a.call(f,f.__data__,c,t)+"",h.has(b)?s[c]=f:h.set(b,f));for(c=0;c<p;++c)b=a.call(e,l[c],c,l)+"",(f=h.get(b))?(i[c]=f,f.__data__=l[c],h.delete(b)):n[c]=new If(e,l[c]);for(c=0;c<g;++c)(f=t[c])&&h.get(v[c])===f&&(s[c]=f)}function HF(e){return e.__data__}function WF(e,t){if(!arguments.length)return Array.from(this,HF);var n=t?VF:zF,i=this._parents,s=this._groups;typeof e!="function"&&(e=BF(e));for(var l=s.length,a=new Array(l),c=new Array(l),f=new Array(l),h=0;h<l;++h){var g=i[h],p=s[h],v=p.length,b=UF(e.call(g,g&&g.__data__,h,i)),w=b.length,S=c[h]=new Array(w),x=a[h]=new Array(w),A=f[h]=new Array(v);n(g,p,S,x,A,b,t);for(var T=0,D=0,R,L;T<w;++T)if(R=S[T]){for(T>=D&&(D=T+1);!(L=x[D])&&++D<w;);R._next=L||null}}return a=new wr(a,i),a._enter=c,a._exit=f,a}function UF(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GF(){return new wr(this._exit||this._groups.map(Ix),this._parents)}function KF(e,t,n){var i=this.enter(),s=this,l=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?l.remove():n(l),i&&s?i.merge(s).order():s}function qF(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,s=n.length,l=i.length,a=Math.min(s,l),c=new Array(s),f=0;f<a;++f)for(var h=n[f],g=i[f],p=h.length,v=c[f]=new Array(p),b,w=0;w<p;++w)(b=h[w]||g[w])&&(v[w]=b);for(;f<s;++f)c[f]=n[f];return new wr(c,this._parents)}function YF(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],s=i.length-1,l=i[s],a;--s>=0;)(a=i[s])&&(l&&a.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(a,l),l=a);return this}function XF(e){e||(e=jF);function t(p,v){return p&&v?e(p.__data__,v.__data__):!p-!v}for(var n=this._groups,i=n.length,s=new Array(i),l=0;l<i;++l){for(var a=n[l],c=a.length,f=s[l]=new Array(c),h,g=0;g<c;++g)(h=a[g])&&(f[g]=h);f.sort(t)}return new wr(s,this._parents).order()}function jF(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ZF(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function QF(){return Array.from(this)}function JF(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length;s<l;++s){var a=i[s];if(a)return a}return null}function $F(){let e=0;for(const t of this)++e;return e}function t6(){return!this.node()}function e6(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var s=t[n],l=0,a=s.length,c;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s);return this}function n6(e){return function(){this.removeAttribute(e)}}function r6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function i6(e,t){return function(){this.setAttribute(e,t)}}function o6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function s6(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function a6(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function l6(e,t){var n=Ih(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?r6:n6:typeof t=="function"?n.local?a6:s6:n.local?o6:i6)(n,t))}function Ox(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function c6(e){return function(){this.style.removeProperty(e)}}function u6(e,t,n){return function(){this.style.setProperty(e,t,n)}}function d6(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function f6(e,t,n){return arguments.length>1?this.each((t==null?c6:typeof t=="function"?d6:u6)(e,t,n??"")):Fs(this.node(),e)}function Fs(e,t){return e.style.getPropertyValue(t)||Ox(e).getComputedStyle(e,null).getPropertyValue(t)}function h6(e){return function(){delete this[e]}}function g6(e,t){return function(){this[e]=t}}function p6(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function v6(e,t){return arguments.length>1?this.each((t==null?h6:typeof t=="function"?p6:g6)(e,t)):this.node()[e]}function Rx(e){return e.trim().split(/^|\s+/)}function $v(e){return e.classList||new Nx(e)}function Nx(e){this._node=e,this._names=Rx(e.getAttribute("class")||"")}Nx.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Mx(e,t){for(var n=$v(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function Dx(e,t){for(var n=$v(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function m6(e){return function(){Mx(this,e)}}function b6(e){return function(){Dx(this,e)}}function _6(e,t){return function(){(t.apply(this,arguments)?Mx:Dx)(this,e)}}function y6(e,t){var n=Rx(e+"");if(arguments.length<2){for(var i=$v(this.node()),s=-1,l=n.length;++s<l;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?_6:t?m6:b6)(n,t))}function w6(){this.textContent=""}function x6(e){return function(){this.textContent=e}}function S6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function C6(e){return arguments.length?this.each(e==null?w6:(typeof e=="function"?S6:x6)(e)):this.node().textContent}function A6(){this.innerHTML=""}function P6(e){return function(){this.innerHTML=e}}function k6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function T6(e){return arguments.length?this.each(e==null?A6:(typeof e=="function"?k6:P6)(e)):this.node().innerHTML}function E6(){this.nextSibling&&this.parentNode.appendChild(this)}function I6(){return this.each(E6)}function O6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function R6(){return this.each(O6)}function N6(e){var t=typeof e=="function"?e:Px(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function M6(){return null}function D6(e,t){var n=typeof e=="function"?e:Px(e),i=t==null?M6:typeof t=="function"?t:Jv(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function L6(){var e=this.parentNode;e&&e.removeChild(this)}function F6(){return this.each(L6)}function B6(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function z6(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function V6(e){return this.select(e?z6:B6)}function H6(e){return arguments.length?this.property("__data__",e):this.node().__data__}function W6(e){return function(t){e.call(this,t,this.__data__)}}function U6(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function G6(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,s=t.length,l;n<s;++n)l=t[n],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++i]=l;++i?t.length=i:delete this.__on}}}function K6(e,t,n){return function(){var i=this.__on,s,l=W6(t);if(i){for(var a=0,c=i.length;a<c;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=n),s.value=t;return}}this.addEventListener(e.type,l,n),s={type:e.type,name:e.name,value:t,listener:l,options:n},i?i.push(s):this.__on=[s]}}function q6(e,t,n){var i=U6(e+""),s,l=i.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,h=c.length,g;f<h;++f)for(s=0,g=c[f];s<l;++s)if((a=i[s]).type===g.type&&a.name===g.name)return g.value}return}for(c=t?K6:G6,s=0;s<l;++s)this.each(c(i[s],t,n));return this}function Lx(e,t,n){var i=Ox(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,n):(s=i.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Y6(e,t){return function(){return Lx(this,e,t)}}function X6(e,t){return function(){return Lx(this,e,t.apply(this,arguments))}}function j6(e,t){return this.each((typeof t=="function"?X6:Y6)(e,t))}function*Z6(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length,a;s<l;++s)(a=i[s])&&(yield a)}var Fx=[null];function wr(e,t){this._groups=e,this._parents=t}function td(){return new wr([[document.documentElement]],Fx)}function Q6(){return this}wr.prototype=td.prototype={constructor:wr,select:SF,selectAll:kF,selectChild:OF,selectChildren:DF,filter:LF,data:WF,enter:FF,exit:GF,join:KF,merge:qF,selection:Q6,order:YF,sort:XF,call:ZF,nodes:QF,node:JF,size:$F,empty:t6,each:e6,attr:l6,style:f6,property:v6,classed:y6,text:C6,html:T6,raise:I6,lower:R6,append:N6,insert:D6,remove:F6,clone:V6,datum:H6,on:q6,dispatch:j6,[Symbol.iterator]:Z6};function Fo(e){return typeof e=="string"?new wr([[document.querySelector(e)]],[document.documentElement]):new wr([[e]],Fx)}function J6(e){let t;for(;t=e.sourceEvent;)e=t;return e}function F0(e,t){if(e=J6(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}var $6={value:()=>{}};function tm(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new vf(n)}function vf(e){this._=e}function t8(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}vf.prototype=tm.prototype={constructor:vf,on:function(e,t){var n=this._,i=t8(e+"",n),s,l=-1,a=i.length;if(arguments.length<2){for(;++l<a;)if((s=(e=i[l]).type)&&(s=e8(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<a;)if(s=(e=i[l]).type)n[s]=B0(n[s],e.name,t);else if(t==null)for(s in n)n[s]=B0(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new vf(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,l;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],i=0,s=l.length;i<s;++i)l[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,l=i.length;s<l;++s)i[s].value.apply(t,n)}};function e8(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function B0(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=$6,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}const n8={passive:!1},Wa={capture:!0,passive:!1};function pp(e){e.stopImmediatePropagation()}function gs(e){e.preventDefault(),e.stopImmediatePropagation()}function r8(e){var t=e.document.documentElement,n=Fo(e).on("dragstart.drag",gs,Wa);"onselectstart"in t?n.on("selectstart.drag",gs,Wa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function i8(e,t){var n=e.document.documentElement,i=Fo(e).on("dragstart.drag",null);t&&(i.on("click.drag",gs,Wa),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Zd=e=>()=>e;function ev(e,{sourceEvent:t,subject:n,target:i,identifier:s,active:l,x:a,y:c,dx:f,dy:h,dispatch:g}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:g}})}ev.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function o8(e){return!e.ctrlKey&&!e.button}function s8(){return this.parentNode}function a8(e,t){return t??{x:e.x,y:e.y}}function l8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bx(){var e=o8,t=s8,n=a8,i=l8,s={},l=tm("start","drag","end"),a=0,c,f,h,g,p=0;function v(R){R.on("mousedown.drag",b).filter(i).on("touchstart.drag",x).on("touchmove.drag",A,n8).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(R,L){if(!(g||!e.call(this,R,L))){var F=D(this,t.call(this,R,L),R,L,"mouse");F&&(Fo(R.view).on("mousemove.drag",w,Wa).on("mouseup.drag",S,Wa),r8(R.view),pp(R),h=!1,c=R.clientX,f=R.clientY,F("start",R))}}function w(R){if(gs(R),!h){var L=R.clientX-c,F=R.clientY-f;h=L*L+F*F>p}s.mouse("drag",R)}function S(R){Fo(R.view).on("mousemove.drag mouseup.drag",null),i8(R.view,h),gs(R),s.mouse("end",R)}function x(R,L){if(e.call(this,R,L)){var F=R.changedTouches,M=t.call(this,R,L),U=F.length,q,tt;for(q=0;q<U;++q)(tt=D(this,M,R,L,F[q].identifier,F[q]))&&(pp(R),tt("start",R,F[q]))}}function A(R){var L=R.changedTouches,F=L.length,M,U;for(M=0;M<F;++M)(U=s[L[M].identifier])&&(gs(R),U("drag",R,L[M]))}function T(R){var L=R.changedTouches,F=L.length,M,U;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),M=0;M<F;++M)(U=s[L[M].identifier])&&(pp(R),U("end",R,L[M]))}function D(R,L,F,M,U,q){var tt=l.copy(),nt=F0(q||F,L),z,it,X;if((X=n.call(R,new ev("beforestart",{sourceEvent:F,target:v,identifier:U,active:a,x:nt[0],y:nt[1],dx:0,dy:0,dispatch:tt}),M))!=null)return z=X.x-nt[0]||0,it=X.y-nt[1]||0,function j(J,rt,ht){var pt=nt,wt;switch(J){case"start":s[U]=j,wt=a++;break;case"end":delete s[U],--a;case"drag":nt=F0(ht||rt,L),wt=a;break}tt.call(J,R,new ev(J,{sourceEvent:rt,subject:X,target:v,identifier:U,active:wt,x:nt[0]+z,y:nt[1]+it,dx:nt[0]-pt[0],dy:nt[1]-pt[1],dispatch:tt}),M)}}return v.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Zd(!!R),v):e},v.container=function(R){return arguments.length?(t=typeof R=="function"?R:Zd(R),v):t},v.subject=function(R){return arguments.length?(n=typeof R=="function"?R:Zd(R),v):n},v.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:Zd(!!R),v):i},v.on=function(){var R=l.on.apply(l,arguments);return R===l?v:R},v.clickDistance=function(R){return arguments.length?(p=(R=+R)*R,v):Math.sqrt(p)},v}function c8({handle:e,getCurrentBbox:t,onResize:n,onDragEnd:i,onInteractionStart:s,onInteractionEnd:l}){let a;return Bx().on("start",()=>{a=t(),s==null||s()}).on("drag",c=>{let f=a.x,h=a.y,g=a.width,p=a.height;const v=c.x-c.subject.x,b=c.y-c.subject.y;switch(e){case"nw":f=a.x+v,h=a.y+b,g=a.width-v,p=a.height-b;break;case"ne":h=a.y+b,g=a.width+v,p=a.height-b;break;case"sw":f=a.x+v,g=a.width-v,p=a.height+b;break;case"se":g=a.width+v,p=a.height+b;break;case"n":h=a.y+b,p=a.height-b;break;case"s":p=a.height+b;break;case"w":f=a.x+v,g=a.width-v;break;case"e":g=a.width+v;break}const w=1;g<w&&(g=w,e.includes("w")&&(f=a.x+a.width-w)),p<w&&(p=w,e.includes("n")&&(h=a.y+a.height-w));const S=Math.round(f),x=Math.round(h),A=Math.round(g),T=Math.round(p);n&&n({x:S,y:x,width:A,height:T})}).on("end",()=>{const{x:c,y:f,width:h,height:g}=t();i&&i({x:c,y:f,width:h,height:g}),l==null||l()})}function u8({getCurrentBbox:e,onMove:t,onDragEnd:n,onInteractionStart:i,onInteractionEnd:s}){let l;return Bx().on("start",()=>{l=e(),i==null||i()}).on("drag",a=>{const c=a.x-a.subject.x,f=a.y-a.subject.y,h=Math.round(l.x+c),g=Math.round(l.y+f);t&&t({x:h,y:g,width:l.width,height:l.height})}).on("end",()=>{const a=e();n&&n(a),s==null||s()})}var d8=Gr('<text dominant-baseline="middle" text-anchor="end"> </text><text text-anchor="middle"> </text><text dominant-baseline="middle" text-anchor="end"> </text>',1),f8=Gr('<g><rect stroke-width="2" pointer-events="all" vector-effect="non-scaling-stroke" class="movable-rectangle" style="cursor: move;"></rect><!></g>');function h8(e,t){st(t,!0);const n=P(t,"bbox",15),i=P(t,"colorStroke",3,"#007bff"),s=P(t,"colorFill",3,"transparent"),l=P(t,"opacity",3,.3),a=P(t,"handleSize",3,12),c=P(t,"scale",3,1),f=E(()=>n().x),h=E(()=>n().y),g=E(()=>n().width),p=E(()=>n().height);let v=ft(void 0),b=ft(!1);function w(){if(!d(v))return;const L=a()/c(),U=Math.max(3,Math.min(L,d(g)*.1,d(p)*.1,7)),q=[{id:"nw",x:d(f)-U/2,y:d(h)-U/2,cursor:"nwse-resize",label:"Resize northwest corner"},{id:"ne",x:d(f)+d(g)-U/2,y:d(h)-U/2,cursor:"nesw-resize",label:"Resize northeast corner"},{id:"sw",x:d(f)-U/2,y:d(h)+d(p)-U/2,cursor:"nesw-resize",label:"Resize southwest corner"},{id:"se",x:d(f)+d(g)-U/2,y:d(h)+d(p)-U/2,cursor:"nwse-resize",label:"Resize southeast corner"},{id:"n",x:d(f)+d(g)/2-U/2,y:d(h)-U/2,cursor:"ns-resize",label:"Resize top edge"},{id:"s",x:d(f)+d(g)/2-U/2,y:d(h)+d(p)-U/2,cursor:"ns-resize",label:"Resize bottom edge"},{id:"w",x:d(f)-U/2,y:d(h)+d(p)/2-U/2,cursor:"ew-resize",label:"Resize left edge"},{id:"e",x:d(f)+d(g)-U/2,y:d(h)+d(p)/2-U/2,cursor:"ew-resize",label:"Resize right edge"}],nt=Fo(d(v)).selectAll(".resize-handle").data(q,z=>z.id);nt.enter().append("rect").attr("class","resize-handle").attr("width",U).attr("height",U).attr("fill",i()).attr("stroke",i()).attr("stroke-width","1").attr("vector-effect","non-scaling-stroke").attr("role","button").attr("style",z=>`cursor: ${z.cursor};`).attr("data-testid",z=>`resize-handle-${z.id}`).attr("aria-label",z=>z.label).merge(nt).attr("x",z=>z.x).attr("y",z=>z.y).attr("width",U).attr("height",U).attr("fill",i()).attr("stroke",i()),nt.exit().remove()}function S(){if(!d(v))return;["nw","ne","sw","se","n","s","w","e"].forEach(M=>{if(!d(v))return;const U=d(v).querySelector(`[data-testid="resize-handle-${M}"]`);U&&Fo(U).call(c8({handle:M,getCurrentBbox:()=>({x:d(f),y:d(h),width:d(g),height:d(p)}),onResize:q=>{n(n().x=q.x,!0),n(n().y=q.y,!0),n(n().width=q.width,!0),n(n().height=q.height,!0),t.onResize&&t.onResize(q),w()},onDragEnd:q=>{t.onDragEnd&&t.onDragEnd(q)},onInteractionStart:()=>{O(b,!0)},onInteractionEnd:()=>{O(b,!1)}}))});const F=d(v).querySelector(".movable-rectangle");F&&Fo(F).call(u8({getCurrentBbox:()=>({x:d(f),y:d(h),width:d(g),height:d(p)}),onMove:M=>{n(n().x=M.x,!0),n(n().y=M.y,!0),n(n().width=M.width,!0),n(n().height=M.height,!0),t.onMove&&t.onMove(M),w()},onDragEnd:M=>{t.onDragEnd&&t.onDragEnd(M)},onInteractionStart:()=>{O(b,!0)},onInteractionEnd:()=>{O(b,!1)}}))}Xu(()=>{d(v)&&(w(),S())});const x=async()=>{d(v)&&(await fh(),w(),S())};se(()=>{w(),x()});var A=f8(),T=G(A),D=et(T);{var R=L=>{var F=d8(),M=N(F),U=G(M);W(M);var q=et(M),tt=G(q);W(q);var nt=et(q),z=G(nt);W(nt),Rt(()=>{Pt(M,"x",d(f)-10/c()),Pt(M,"y",d(h)+1/c()),Pt(M,"fill",i()),Pt(M,"font-size",14/c()),$t(U,`x: ${d(f)??""}, y: ${d(h)??""}`),Pt(q,"x",d(f)+d(g)/2),Pt(q,"y",d(h)+d(p)+20/c()),Pt(q,"fill",i()),Pt(q,"font-size",14/c()),$t(tt,`w: ${d(g)??""}px`),Pt(nt,"x",d(f)-10/c()),Pt(nt,"y",d(h)+d(p)/2),Pt(nt,"fill",i()),Pt(nt,"font-size",14/c()),$t(z,`h: ${d(p)??""}px`)}),_(L,F)};dt(D,L=>{d(b)&&L(R)})}W(A),Rn(A,L=>O(v,L),()=>d(v)),Rt(()=>{Pt(T,"x",d(f)),Pt(T,"y",d(h)),Pt(T,"width",d(g)),Pt(T,"height",d(p)),Pt(T,"stroke",i()),Pt(T,"fill",s()),Pt(T,"fill-opacity",l())}),_(e,A),at()}var g8=Gr('<g data-testid="sample-annotation"><!><!><!></g>');function p8(e,t){var it,X;st(t,!0);const n=()=>Kt(f,"$customLabelColorsStore",i),[i,s]=sr(),l=P(t,"showLabel",3,!1),a=P(t,"isResizable",3,!1),c=P(t,"scale",3,1),{customLabelColorsStore:f}=Wv(),h=E(()=>t.annotation.annotation_label.annotation_label_name),g=(X=(it=t.annotation)==null?void 0:it.instance_segmentation_details)==null?void 0:X.segmentation_mask,p=E(()=>t.annotation.sample_id),v=E(()=>oo(d(h),1)),b=E(()=>{var j;return((j=n()[d(h)])==null?void 0:j.color)??oo(d(h),1).color}),w=E(()=>{var j;return((j=n()[d(h)])==null?void 0:j.color)??oo(d(h),.4).color}),S=E(()=>{var j;return((j=n()[d(h)])==null?void 0:j.alpha)*.4});let x=ft(On(Tf(t.annotation)));const A=j=>{O(x,t.constraintBox?gp(j,t.constraintBox,!1):j,!0)},T=j=>{O(x,t.constraintBox?gp(j,t.constraintBox,!0):j,!0)},D=j=>{var rt;const J=t.constraintBox?gp(j,t.constraintBox,!0):j;O(x,J,!0),(rt=t.onBoundingBoxChanged)==null||rt.call(t,J)},R=E(()=>[d(x).x,d(x).y,d(x).width,d(x).height]);var L=g8(),F=G(L);{var M=j=>{{let J=E(()=>[d(x).x,d(x).y]);_8(j,{get coordinates(){return d(J)},get colorText(){return d(v)},get label(){return d(h)}})}};dt(F,j=>{l()&&j(M)})}var U=et(F);{var q=j=>{zx(j,{get segmentation(){return g},get width(){return t.imageWidth},get colorFill(){return d(w)},get opacity(){return d(S)}})};dt(U,j=>{g&&j(q)})}var tt=et(U);{var nt=j=>{h8(j,{get colorStroke(){return d(b)},get colorFill(){return d(w)},get opacity(){return d(S)},get scale(){return c()},onResize:A,onMove:T,onDragEnd:D,get bbox(){return d(x)},set bbox(J){O(x,J,!0)}})},z=j=>{m8(j,{get bbox(){return d(R)},get annotationId(){return d(p)},get label(){return d(h)},get colorStroke(){return d(b)},get colorFill(){return d(w)},get opacity(){return d(S)}})};dt(tt,j=>{a()&&t.constraintBox?j(nt):j(z,!1)})}W(L),Rt(()=>{Pt(L,"data-annotation-label",d(h)),Pt(L,"data-annotation-id",d(p))}),_(e,L),at(),s()}var v8=Gr('<rect vector-effect="non-scaling-stroke" stroke-width="2" pointer-events="all" data-testid="annotation_box"></rect>');function m8(e,t){const n=P(t,"isPrediction",3,!1),[i,s,l,a]=t.bbox,c=n()?"5,5":"none",f=n()?.8:1;var h=v8();Rt(()=>{Pt(h,"x",i),Pt(h,"y",s),Pt(h,"width",l),Pt(h,"height",a),Pt(h,"stroke",t.colorStroke),Pt(h,"stroke-opacity",f),Pt(h,"stroke-dasharray",c),Pt(h,"fill",t.colorFill),Pt(h,"fill-opacity",t.opacity),Pt(h,"aria-label",t.label)}),_(e,h)}var b8=Gr('<g class="unscaled"><rect></rect><text class="annotation-label-text" data-testid="svg-annotation-text"> </text></g>');function _8(e,t){st(t,!0);const n=P(t,"fontSize",3,14),i=P(t,"isPrediction",3,!1),s=E(()=>py(t.coordinates,2)),l=E(()=>d(s)[0]),a=E(()=>d(s)[1]);let c=ft(null);const f=E(()=>d(c)?(d(c).textContent=i()?`${t.label} (pred)`:t.label,d(c).getBBox()):{width:0,height:0}),h=5,g=i()?.8:1,p=i()?"italic":"normal";var v=b8(),b=G(v),w=et(b);Pt(w,"x",h),Pt(w,"y",-5);var S=G(w,!0);W(w),Rn(w,x=>O(c,x),()=>d(c)),W(v),Rt(()=>{var x,A,T;Pt(v,"transform",`translate(${d(l)}, ${d(a)})`),Pt(v,"data-label",t.label),Pt(b,"y",-((x=d(f))==null?void 0:x.height)),Pt(b,"width",((A=d(f))==null?void 0:A.width)+h*2),Pt(b,"height",(T=d(f))==null?void 0:T.height),Pt(b,"fill",t.colorText.color),Pt(b,"opacity",g),Pt(w,"fill",t.colorText.contrastColor),Pt(w,"font-size",n()),Pt(w,"font-style",p),$t(S,i()?`${t.label} (pred)`:t.label)}),_(e,v),at()}function y8(e){if(typeof document>"u")return{r:0,g:0,b:0,a:255};const t=document.createElement("canvas");t.width=1,t.height=1;const n=t.getContext("2d",{willReadFrequently:!0});if(!n)return console.error("Failed to get context for color parsing, returning default black"),{r:0,g:0,b:0,a:255};n.fillStyle=e,n.fillRect(0,0,1,1);try{const i=n.getImageData(0,0,1,1).data;return{r:i[0],g:i[1],b:i[2],a:i[3]}}catch(i){return console.error("Failed to getImageData for color parsing, returning default black:",i),{r:0,g:0,b:0,a:255}}}function w8(e,t,n){const i=e.reduce((A,T)=>A+T,0),s=Math.ceil(i/t);if(t<=0||s<=0||!Number.isFinite(t)||!Number.isFinite(s))return{dataUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",height:0};if(typeof document>"u")throw new Error("Canvas API (document) not available. Ensure tests mock the DOM and Canvas.");const l=document.createElement("canvas");l.width=t,l.height=s;const a=l.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("Failed to get canvas 2D context. Check canvas support or mocks.");if(typeof a.createImageData!="function"||typeof a.putImageData!="function")throw new Error("Canvas context mock is incomplete. Missing 'createImageData' or 'putImageData'. Please update test environment mocks (e.g., jest-canvas-mock).");let c;try{c=a.createImageData(t,s)}catch(A){throw console.error(`Error calling ctx.createImageData(${t}, ${s}). Check mock implementation.`,A),A}const f=c.data,h=f.length,{r:g,g:p,b:v,a:b}=y8(n);let w=0,S=0;e.forEach((A,T)=>{if(A===0)return;if(T%2!==0){const R=w+A;for(;w<R;){const L=Math.floor(w/t),F=w%t;S=(L*t+F)*4,S>=0&&S<h-3&&(f[S]=g,f[S+1]=p,f[S+2]=v,f[S+3]=b),w++}}else w+=A}),a.putImageData(c,0,0);let x="";try{x=l.toDataURL()}catch(A){console.error("Error calling canvas.toDataURL(). Check mock implementation.",A),x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}return{dataUrl:x,height:s}}var x8=Gr('<image x="0" y="0"></image>');function zx(e,t){st(t,!0);const n=P(t,"colorFill",3,"rgba(255, 0, 0, 0.2)"),i=P(t,"opacity",3,.4);if(!t.segmentation)throw new Error("Segmentation data is required");const s=E(()=>{const f=n().replace(/rgba?\((\d+,\s*\d+,\s*\d+)(?:,\s*[\d.]+)?\)/,"rgb($1)");return w8(t.segmentation,t.width,f)}),l=E(()=>d(s).dataUrl),a=E(()=>d(s).height);var c=x8();Rt(()=>{Pt(c,"href",d(l)),Pt(c,"width",t.width),Pt(c,"height",d(a)),Pt(c,"opacity",i())}),_(e,c),at()}var S8=Gr('<svg style="position: absolute; top: 0; left: 0;"><g></g></svg>');function C8(e,t){st(t,!0);const n=()=>Kt(a,"$isHidden",i),[i,s]=sr(),l=P(t,"sampleImageObjectFit",3,"contain"),{isHidden:a}=gx(),c=E(()=>t.sample.annotations.filter(p=>p.annotation_type!=="classification"));var f=S8(),h=G(f);let g;Qn(h,21,()=>d(c),p=>p.sample_id,(p,v)=>{p8(p,{get annotation(){return d(v)},get showLabel(){return t.showLabel},get imageWidth(){return t.sample.width}})}),W(h),W(f),Rt(p=>{Pt(f,"viewBox",`0 0 ${t.sample.width} ${t.sample.height}`),Pt(f,"preserveAspectRatio",l()==="contain"?"xMidYMid meet":"xMidYMid slice"),Pt(f,"width",t.containerWidth),Pt(f,"height",t.containerHeight),g=Kn(h,0,"",null,g,p)},[()=>({invisible:n()})]),_(e,f),at(),s()}function A8(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t())}var P8=Gr('<rect fill="none" stroke="hsl(var(--primary))" stroke-width="3" pointer-events="none" vector-effect="non-scaling-stroke"></rect>'),k8=Gr('<g role="button" tabindex="0" data-testid="selectable-svg-group"><!><!></g>');function c7(e,t){st(t,!0);let n=P(t,"isSelected",3,!1);const{x:i,y:s,width:l,height:a}=t.box,c=()=>{t.onSelect(t.groupId)};var f=k8();f.__click=c;let h;f.__keydown=[A8,c],Gn(f,"",{},{cursor:"pointer"});var g=G(f);ut(g,()=>t.children);var p=et(g);{var v=b=>{var w=P8();Rt(()=>{Pt(w,"x",i),Pt(w,"y",s),Pt(w,"width",l),Pt(w,"height",a)}),_(b,w)};dt(p,b=>{n()&&b(v)})}W(f),Rt(b=>{h=Kn(f,0,"group svelte-lseqsj",null,h,b),Pt(f,"data-group-id",t.groupId)},[()=>({selected:n()})]),_(e,f),at()}ar(["click","keydown"]);const T8=({datasetId:e,annotationId:t,onUpdate:n})=>{const i=tE({path:{annotation_id:t,dataset_id:e}}),s=Vs(),{updateAnnotations:l}=vh({datasetId:e}),a=uv(i),c=()=>{s.invalidateQueries({queryKey:i.queryKey}),s.invalidateQueries({queryKey:dv().queryKey}),s.invalidateQueries({queryKey:cv({path:{dataset_id:e}}).queryKey})};return{updateAnnotation:async h=>{try{await l([h]),c(),Or.success("Annotation updated successfully"),n==null||n()}catch(g){Or.error("Failed to update annotation:"+g.message)}},annotation:a,refetch:c}};var E8=Z('<div class="flex items-start gap-3"><span class="truncate text-sm font-medium"> </span> <pre class="min-w-[8rem] flex-1 overflow-x-auto whitespace-pre-wrap rounded bg-muted p-2 text-sm"> </pre></div>'),I8=Z('<div class="flex items-start gap-3"><span class="truncate text-sm font-medium"> </span> <span class="min-w-[8rem] flex-1 break-all text-sm"> </span></div>'),O8=Z('<div class="space-y-3 text-diffuse-foreground"></div>');function R8(e,t){st(t,!0);const n=E(()=>{const a=[];if(t.metadata_dict&&typeof t.metadata_dict=="object"&&"data"in t.metadata_dict){const c=t.metadata_dict.data;c&&typeof c=="object"&&Object.entries(c).forEach(([f,h])=>{const g=Aa(h),p=typeof h=="object"&&h!==null&&!Array.isArray(h);a.push({id:`metadata_${f}`,label:`${f}:`,value:g,isComplex:p})})}return a});var i=K(),s=N(i);{var l=a=>{Ls(a,{title:"Metadata",children:(c,f)=>{var h=O8();Qn(h,21,()=>d(n),({label:g,value:p,id:v,isComplex:b})=>g,(g,p)=>{let v=()=>d(p).label,b=()=>d(p).value,w=()=>d(p).id,S=()=>d(p).isComplex;var x=K(),A=N(x);{var T=R=>{var L=E8(),F=G(L),M=G(F,!0);W(F);var U=et(F,2),q=G(U,!0);W(U),W(L),Rt(()=>{Pt(F,"title",v()),$t(M,v()),$t(q,b())}),_(R,L)},D=R=>{var L=I8(),F=G(L),M=G(F,!0);W(F);var U=et(F,2),q=G(U,!0);W(U),W(L),Rt(()=>{Pt(F,"title",v()),$t(M,v()),Pt(U,"data-testid",`sample-metadata-${w()}`),$t(q,b())}),_(R,L)};dt(A,R=>{S()?R(T):R(D,!1)})}_(g,x)}),W(h),_(c,h)}})};dt(s,a=>{d(n).length>0&&a(l)})}_(e,i),at()}var N8=Z('<span class="text-sm"> </span> <span class="break-all text-sm"> </span>',1),M8=Z('<div class="grid grid-cols-[6rem_1fr] gap-y-3 text-diffuse-foreground"></div>'),D8=Z("<!> <!>",1);function L8(e,t){st(t,!0);const n=P(t,"showCustomMetadata",3,!0),i=E(()=>[{id:"height",label:"Height:",value:Jp(t.sample.height)+"px"},{id:"width",label:"Width:",value:Jp(t.sample.width)+"px"},{id:"filename",label:"Filename:",value:t.sample.file_name},{id:"filepath",label:"Filepath:",value:t.sample.file_path_abs}]);var s=D8(),l=N(s);Ls(l,{title:"Sample details",children:(f,h)=>{var g=M8();Qn(g,21,()=>d(i),({label:p,value:v,id:b})=>p,(p,v)=>{let b=()=>d(v).label,w=()=>d(v).value,S=()=>d(v).id;var x=N8(),A=N(x),T=G(A,!0);W(A);var D=et(A,2),R=G(D,!0);W(D),Rt(()=>{$t(T,b()),Pt(D,"data-testid",`sample-metadata-${S()}`),$t(R,w())}),_(p,x)}),W(g),_(f,g)}});var a=et(l,2);{var c=f=>{R8(f,{get metadata_dict(){return t.sample.metadata_dict}})};dt(a,f=>{n()&&f(c)})}_(e,s),at()}var F8=Z('You are going to delete this annotation. This action cannot be undone. <div class="mt-2 flex justify-end gap-2"><!> <!></div>',1),B8=Z("<!> <!>",1),z8=Z('<button type="button"><span class="flex flex-1 flex-col gap-1"><span class="text-sm font-medium" data-testid="sample-details-pannel-annotation-name"><!></span> <span class="text-xs text-muted-foreground"> <!></span></span> <div class="flex gap-3"><!> <!></div></button>');function V8(e,t){st(t,!0);const n=()=>Kt(b,"$result",l),i=()=>Kt(d(T),"$annotationResp",l),s=()=>Kt(p,"$isEditingMode",l),[l,a]=sr(),c=P(t,"isSelected",3,!1),f=P(t,"isHidden",3,!1),h=St=>{switch(St){case"object_detection":return"Object Detection";case"instance_segmentation":return"Instance Segmentation";case"semantic_segmentation":return"Semantic Segmentation";case"classification":return"Image Classification";default:return St}},g=St=>{const At=St.object_detection_details||St.instance_segmentation_details;if(At){const{width:qt,height:kt}=At;return`${Math.round(qt)}x${Math.round(kt)}px`}return""},{isEditingMode:p}=ri.data.globalStorage,{datasetId:v}=ri.data,b=Gv(),w=E(()=>qv(n().data||[])),{addReversibleAction:S}=ii(),x=E(()=>t.annotation.sample_id),A=E(()=>T8({datasetId:v,annotationId:d(x),onUpdate:t.onUpdate})),T=E(()=>d(A).annotation),D=E(()=>d(A).updateAnnotation),R=E(()=>d(A).refetch),{updateAnnotations:L}=vh({datasetId:v}),F=E(()=>i().data||t.annotation),M=E(()=>{const St=d(F).annotation_label.annotation_label_name,At=d(w).find(qt=>qt.value===St);return At||{value:St,label:St}});let U=ft(!1);var q=z8();q.__click=function(...St){var At;(At=t.onClick)==null||At.apply(this,St)};var tt=G(q),nt=G(tt),z=G(nt);{var it=St=>{{const At=(kt,Wt)=>{let Lt=()=>Wt==null?void 0:Wt().inputValue;Kv(kt,{get label(){return Lt()}})};let qt=E(()=>d(w).find(kt=>{var Wt;return kt.value===((Wt=d(M))==null?void 0:Wt.value)}));Uv(St,{get items(){return d(w)},get selectedItem(){return d(qt)},name:"annotation-label",placeholder:"Select or create a label",onSelect:async kt=>{hx({annotations:[{sample_id:d(x),annotation_label:{annotation_label_name:d(F).annotation_label.annotation_label_name}}],datasetId:v,addReversibleAction:S,updateAnnotations:L,refresh:d(R)}),await d(D)({annotation_id:d(x),dataset_id:v,label_name:kt.value})},notFound:At,$$slots:{notFound:!0}})}},X=St=>{var At=oe();Rt(()=>$t(At,d(F).annotation_label.annotation_label_name)),_(St,At)};dt(z,St=>{s()?St(it):St(X,!1)})}W(nt);var j=et(nt,2),J=G(j),rt=et(J);{var ht=St=>{var At=oe();Rt(qt=>$t(At,`(${qt??""})`),[()=>g(d(F))]),_(St,At)};dt(rt,St=>{g(d(F))&&St(ht)})}W(j),W(tt);var pt=et(tt,2),wt=G(pt);{var lt=St=>{CE(St,{class:"size-6 text-muted-foreground",get onclick(){return t.onToggleShowAnnotation}})},yt=St=>{AE(St,{class:"size-6",get onclick(){return t.onToggleShowAnnotation}})};dt(wt,St=>{f()?St(lt):St(yt,!1)})}var Ot=et(wt,2);{var Vt=St=>{var At=K(),qt=N(At);_t(qt,()=>Th,(kt,Wt)=>{Wt(kt,{get open(){return d(U)},set open(Lt){O(U,Lt,!0)},children:(Lt,Ie)=>{var _e=B8(),Me=N(_e);_t(Me,()=>Eh,(Ht,Ae)=>{Ae(Ht,{children:(Nt,ne)=>{Ry(Nt,{class:"size-6"})},$$slots:{default:!0}})});var Dt=et(Me,2);_t(Dt,()=>kh,(Ht,Ae)=>{Ae(Ht,{children:(Nt,ne)=>{jt();var Ut=F8(),he=et(N(Ut)),ae=G(he);In(ae,{variant:"destructive",size:"sm",onclick:It=>{It.stopPropagation(),t.onDeleteAnnotation(It),O(U,!1)},children:(It,Xt)=>{jt();var ge=oe("Delete");_(It,ge)},$$slots:{default:!0}});var te=et(ae,2);In(te,{variant:"outline",size:"sm",onclick:It=>{It.stopPropagation(),O(U,!1)},children:(It,Xt)=>{jt();var ge=oe("Cancel");_(It,ge)},$$slots:{default:!0}}),W(he),_(Nt,Ut)},$$slots:{default:!0}})}),_(Lt,_e)},$$slots:{default:!0}})}),_(St,At)};dt(Ot,St=>{s()&&St(Vt)})}W(pt),W(q),Rt((St,At)=>{Kn(q,1,St),Pt(q,"data-annotation-id",d(F).sample_id),$t(J,`${At??""} `)},[()=>zo(ce("flex w-full items-start justify-between gap-2 rounded-sm px-4 py-3 text-left align-baseline transition-colors",c()?"border border-accent-foreground/20 bg-accent":"bg-card hover:bg-accent/50")),()=>h(d(F).annotation_type)]),_(e,q),at(),a()}ar(["click"]);const H8=({sampleId:e,onUpdate:t})=>{const n=eE({path:{sample_id:e}}),i=Vs(),s=Ey(nE());s.subscribe(()=>{});const l=h=>new Promise((g,p)=>{xn(s).mutate({path:{sample_id:e},body:h},{onSuccess:()=>g(),onError:v=>p(v)})}),a=uv(n),c=async()=>{await i.invalidateQueries({queryKey:n.queryKey})};return{updateCaptionText:async h=>{try{await l(h),await c(),Or.success("Caption updated successfully"),t==null||t()}catch(g){Or.error("Failed to update caption: "+g.message)}},caption:a,refetch:c}};var W8=Z('You are going to delete this caption. This action cannot be undone. <div class="mt-2 flex justify-end gap-2"><!> <!></div>',1),U8=Z("<!> <!>",1),G8=Z('<div class="flex items-center gap-2"><input class="flex h-10 flex-1 rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm" type="text" placeholder="Update caption" data-testid="caption-input"/> <button type="button" class="inline-flex h-9 w-9 items-center justify-center rounded-md border border-primary bg-primary text-primary-foreground transition disabled:cursor-not-allowed disabled:border-input disabled:bg-background disabled:text-muted-foreground disabled:opacity-50" aria-label="Save caption" data-testid="save-caption-button"><!></button> <!></div>'),K8=Z('<span class="text-sm"> </span>'),q8=Z('<div class="mb-2 gap-2 rounded-sm bg-card px-4 py-3 text-left align-baseline text-diffuse-foreground transition-colors"><div class="flex flex-1 flex-col gap-1"><div class="text-sm font-medium" data-testid="caption-field"><!></div></div></div>');function Y8(e,t){st(t,!0);const n=()=>Kt(d(h),"$captionResp",s),i=()=>Kt(a,"$isEditingMode",s),[s,l]=sr(),{isEditingMode:a}=ri.data.globalStorage,c=E(()=>t.caption.sample_id),f=E(()=>H8({sampleId:d(c),onUpdate:t.onUpdate})),h=E(()=>d(f).caption),g=E(()=>d(f).updateCaptionText),p=E(()=>n().data||t.caption);let v=ft(""),b=ft(!1);se(()=>{O(v,d(p).text??"",!0)});const w=E(()=>d(v)!==(d(p).text??"")),S=async()=>{if(!(!d(w)||d(b))){O(b,!0);try{await d(g)(d(v))}finally{O(b,!1)}}},x=q=>{var nt;(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(q.key)||q.code==="Space")&&(q.stopPropagation(),(nt=q.stopImmediatePropagation)==null||nt.call(q)),q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),S())},A=q=>{const tt=nt=>x(nt);return q.addEventListener("keydown",tt,!0),{destroy:()=>q.removeEventListener("keydown",tt,!0)}};let T=ft(!1);var D=q8(),R=G(D),L=G(R),F=G(L);{var M=q=>{var tt=G8(),nt=G(tt);my(nt),dh(()=>Ra(nt,()=>d(v),j=>O(v,j))),cE(nt,j=>A==null?void 0:A(j));var z=et(nt,2);z.__click=S;var it=G(z);gh(it,{class:"size-5"}),W(z);var X=et(z,2);_t(X,()=>Th,(j,J)=>{J(j,{get open(){return d(T)},set open(rt){O(T,rt,!0)},children:(rt,ht)=>{var pt=U8(),wt=N(pt);_t(wt,()=>Eh,(yt,Ot)=>{Ot(yt,{"data-testid":"delete-caption-button",children:(Vt,St)=>{Ry(Vt,{class:"size-6"})},$$slots:{default:!0}})});var lt=et(wt,2);_t(lt,()=>kh,(yt,Ot)=>{Ot(yt,{children:(Vt,St)=>{jt();var At=W8(),qt=et(N(At)),kt=G(qt);In(kt,{variant:"destructive",size:"sm",onclick:Lt=>{Lt.stopPropagation(),t.onDeleteCaption(Lt),O(T,!1)},"data-testid":"confirm-delete-caption-button",children:(Lt,Ie)=>{jt();var _e=oe("Delete");_(Lt,_e)},$$slots:{default:!0}});var Wt=et(kt,2);In(Wt,{variant:"outline",size:"sm",onclick:Lt=>{Lt.stopPropagation(),O(T,!1)},"data-testid":"cancel-delete-caption-button",children:(Lt,Ie)=>{jt();var _e=oe("Cancel");_(Lt,_e)},$$slots:{default:!0}}),W(qt),_(Vt,At)},$$slots:{default:!0}})}),_(rt,pt)},$$slots:{default:!0}})}),W(tt),Rt(()=>{nt.disabled=d(b),z.disabled=!d(w)||d(b)}),_(q,tt)},U=q=>{var tt=K8(),nt=G(tt,!0);W(tt),Rt(()=>$t(nt,d(p).text)),_(q,tt)};dt(F,q=>{i()?q(M):q(U,!1)})}W(L),W(R),W(D),Rt(()=>Pt(D,"data-caption-id",d(p).sample_id)),_(e,D),at(),l()}ar(["click"]);var X8=(e,t,n)=>{e.stopPropagation(),t(d(n).tagId)},j8=Z('<div class="inline-flex items-center gap-1 rounded-lg bg-card px-2 py-1 text-xs"><span> </span> <button type="button" class="flex size-4 items-center justify-center rounded-full text-muted-foreground transition hover:text-destructive focus:outline-none disabled:cursor-not-allowed disabled:opacity-50">x</button></div>'),Z8=Z('<div class="flex flex-wrap gap-1"></div>');function Q8(e,t){st(t,!0);const n=a=>{try{t.onClick(a),Or.success("Tag removed successfully")}catch(c){Or.error("Failed to remove tag. Please try again."),console.error("Error removing tag from sample:",c)}};var i=K(),s=N(i);{var l=a=>{Ls(a,{title:"Tags",get icon(){return IE},children:(c,f)=>{var h=Z8();Qn(h,21,()=>t.tags,g=>g.tagId,(g,p)=>{var v=j8(),b=G(v),w=G(b,!0);W(b);var S=et(b,2);S.__click=[X8,n,p],W(v),Rt(()=>{$t(w,d(p).name),Pt(S,"aria-label",`Remove tag ${d(p).name}`)}),_(g,v)}),W(h),_(c,h)}})};dt(s,a=>{t.tags.length>0&&a(l)})}_(e,i),at()}ar(["click"]);var J8=Z('<label class="flex w-full flex-col gap-3 text-muted-foreground"><div class="text-sm">Select or create a label for a new annotation.</div> <!></label>'),$8=Z('<div class="items-left mb-2 flex flex-col justify-between space-y-2 bg-muted p-2"><div class="mb-2 w-full"><!></div> <!></div>'),t9=Z('<div class="flex flex-col gap-3 space-y-4"><!> <div class="flex flex-col gap-2"></div></div>'),e9=(e,t)=>t.onCreateCaption(t.sample.sample_id),n9=Z('<button type="button" class="mb-2 flex h-8 items-center justify-center rounded-sm bg-card px-2 py-0 text-diffuse-foreground transition-colors hover:bg-primary hover:text-primary-foreground" data-testid="add-caption-button">+</button>'),r9=Z('<div class="flex flex-col gap-3 space-y-4"><div class="flex flex-col gap-2"><!> <!></div></div>'),i9=Z('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-y-auto dark:[color-scheme:dark]"><!> <!> <!> <!></div>');function u7(e,t){st(t,!0);const n=()=>Kt(p,"$annotationLabels",s),i=()=>Kt(g,"$isEditingMode",s),[s,l]=sr();let a=P(t,"addAnnotationEnabled",15,!1),c=P(t,"addAnnotationLabel",15,void 0);const f=E(()=>t.sample.tags.map(w=>({tagId:w.tag_id,name:w.name}))??[]),h=E(()=>t.sample.annotations?[...t.sample.annotations].sort((w,S)=>w.annotation_label.annotation_label_name.localeCompare(S.annotation_label.annotation_label_name)):[]),{isEditingMode:g}=ri.data.globalStorage,p=Gv(),v=E(()=>qv(n().data||[]));se(()=>{if(t.selectedAnnotationId){const w=document.querySelector(`button[data-annotation-id="${t.selectedAnnotationId}"]`);w&&w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}});const b=E(()=>t.sample.captions??[]);vx(e,{className:"h-full",children:(w,S)=>{mx(w,{className:"h-full flex flex-col",children:(x,A)=>{var T=i9(),D=G(T);Q8(D,{get tags(){return d(f)},get onClick(){return t.onRemoveTag}});var R=et(D,2);Ls(R,{title:"Annotations",children:(M,U)=>{var q=t9(),tt=G(q);{var nt=it=>{var X=$8(),j=G(X),J=G(j);{let pt=E(()=>a()?"default":"outline");In(J,{title:"Add annotation",get variant(){return d(pt)},"data-testid":"create-rectangle",class:"w-full",onclick:()=>{a(!a())},children:(wt,lt)=>{jt();var yt=oe("Add annotation");_(wt,yt)},$$slots:{default:!0}})}W(j);var rt=et(j,2);{var ht=pt=>{var wt=J8(),lt=et(G(wt),2);{const yt=(Vt,St)=>{let At=()=>St==null?void 0:St().inputValue;Kv(Vt,{get label(){return At()}})};let Ot=E(()=>d(v).find(Vt=>{var St;return Vt.value===((St=c())==null?void 0:St.value)}));Uv(lt,{get items(){return d(v)},get selectedItem(){return d(Ot)},name:"annotation-label",label:"Choose or create a label",className:"w-full",contentClassName:"w-full",placeholder:"Select or create a label",onSelect:Vt=>{c(Vt)},notFound:yt,$$slots:{notFound:!0}})}W(wt),_(pt,wt)};dt(rt,pt=>{a()&&pt(ht)})}W(X),_(it,X)};dt(tt,it=>{i()&&it(nt)})}var z=et(tt,2);Qn(z,21,()=>d(h),Rs,(it,X)=>{{let j=E(()=>t.selectedAnnotationId===d(X).sample_id),J=E(()=>t.annotationsIdsToHide.has(d(X).sample_id));V8(it,{get annotation(){return d(X)},get isSelected(){return d(j)},onClick:()=>t.onAnnotationClick(d(X).sample_id),onDeleteAnnotation:()=>t.onDeleteAnnotation(d(X).sample_id),get isHidden(){return d(J)},onToggleShowAnnotation:rt=>{rt.stopPropagation(),t.onToggleShowAnnotation(d(X).sample_id)},get onUpdate(){return t.onUpdate}})}}),W(z),W(q),_(M,q)}});var L=et(R,2);Ls(L,{title:"Captions",children:(M,U)=>{var q=r9(),tt=G(q),nt=G(tt);Qn(nt,17,()=>d(b),Rs,(X,j)=>{Y8(X,{get caption(){return d(j)},onDeleteCaption:()=>t.onDeleteCaption(d(j).sample_id),get onUpdate(){return t.onUpdate}})});var z=et(nt,2);{var it=X=>{var j=n9();j.__click=[e9,t],_(X,j)};dt(z,X=>{i()&&X(it)})}W(tt),W(q),_(M,q)}});var F=et(L,2);L8(F,{get sample(){return t.sample}}),W(T),_(x,T)},$$slots:{default:!0}})},$$slots:{default:!0}}),at(),l()}ar(["click"]);var o9=Z('<img loading="lazy"/>');function Vx(e,t){st(t,!0);const n=P(t,"objectFit",3,"contain"),{getDatasetVersion:i}=ii();let s=ft("");Xu(async()=>{var a,c;(c=(a=t.sample)==null?void 0:a.sample)!=null&&c.dataset_id&&O(s,await i(t.sample.sample.dataset_id),!0)});var l=o9();Rt(a=>{Pt(l,"src",`${_y}/sample/${t.sample.sample_id}${d(s)?`?v=${d(s)}`:""}`),Pt(l,"alt",t.sample.file_path_abs),Kn(l,1,a,"svelte-1a2mlic"),Gn(l,`--object-fit: ${n()??""}`)},[()=>zo(ce("sample-image rounded-lg bg-black",t.class))]),_(e,l),at()}const s9=e=>{const t=["readImagesInfinite",e.dataset_id,e.mode,e.mode==="normal"?e.filters:e.classifierSamples,{metadata_values:e.metadata_values,text_embedding:e.text_embedding}];return rE({queryKey:t,queryFn:async({pageParam:n=0,signal:i})=>{const s=a9(e,n),{data:l}=await UT({path:{dataset_id:e.dataset_id},body:s,signal:i,throwOnError:!0});return l},initialPageParam:0,getNextPageParam:n=>n.nextCursor??void 0,enabled:l9(e)})},a9=(e,t)=>{var i,s,l,a;const n={pagination:{offset:t,limit:50},text_embedding:e.text_embedding,filters:{sample_filter:{metadata_filters:e.metadata_values?wy(e.metadata_values):void 0}}};if(e.mode==="classifier"&&e.classifierSamples){const c=[...e.classifierSamples.positiveSampleIds,...e.classifierSamples.negativeSampleIds];return{...n,sample_ids:c}}else if(e.mode==="normal"&&e.filters)return{...n,filters:{...n.filters,sample_filter:{...((i=n.filters)==null?void 0:i.sample_filter)??{},annotation_label_ids:(s=e.filters.annotation_label_ids)!=null&&s.length?e.filters.annotation_label_ids:void 0,tag_ids:(l=e.filters.tag_ids)!=null&&l.length?e.filters.tag_ids:void 0,sample_ids:(a=e.filters.sample_ids)!=null&&a.length?e.filters.sample_ids:void 0},width:e.filters.dimensions?{min:e.filters.dimensions.min_width,max:e.filters.dimensions.max_width}:void 0,height:e.filters.dimensions?{min:e.filters.dimensions.min_height,max:e.filters.dimensions.max_height}:void 0}};return n},l9=e=>e.mode==="classifier"?!!e.classifierSamples:!0,Hx=e=>{const t=s9(e),n=Ty(t),i=Vs();return{samples:n,refresh:()=>{i.invalidateQueries({queryKey:t.queryKey})}}},Pa=Le({}),z0=(e,t)=>{if(!(e==null&&t==null))return{min:e??void 0,max:t??void 0}},c9=e=>{if(!e)return{};const t=z0(e.min_width,e.max_width),n=z0(e.min_height,e.max_height);return{width:t,height:n}},u9=cs(Pa,e=>{var f,h,g,p;if(!(e!=null&&e.dataset_id)||!(e!=null&&e.mode)||e.mode==="classifier")return null;const t={},{width:n,height:i}=c9((f=e.filters)==null?void 0:f.dimensions);n&&(t.width=n),i&&(t.height=i);const s={};s.dataset_id=e==null?void 0:e.dataset_id;const l=(h=e.filters)==null?void 0:h.sample_ids;l&&l.length>0&&(s.sample_ids=l);const a=(g=e.filters)==null?void 0:g.annotation_label_ids;a&&a.length>0&&(s.annotation_label_ids=a);const c=(p=e.filters)==null?void 0:p.tag_ids;if(c&&c.length>0&&(s.tag_ids=c),e.metadata_values){const v=wy(e.metadata_values);v.length>0&&(s.metadata_filters=v)}return Object.keys(s).length>0&&(t.sample_filter=s),Object.keys(t).length>0?t:null}),d9=()=>({filterParams:Pa,imageFilter:u9,updateFilterParams:n=>{Pa.set(n)},updateSampleIds:n=>{const i={...xn(Pa)};if(i.mode!=="normal")return;const s={...i,filters:{...i.filters,sample_ids:n.length>0?n:void 0}};Pa.set(s)}});function f9(e,t,n){const i=e.currentTarget.dataset.sampleId;t(i,n.dataset_id)}function h9(e,t){const n=e.currentTarget.dataset.sampleId,i=e.currentTarget.dataset.index;yy(Sy.toSample({sampleId:n,datasetId:t.dataset_id,sampleIndex:Number(i)}))}function g9(e,t,n){if(e.key==="Enter"||e.key===" "){e.preventDefault();const i=e.currentTarget.dataset.sampleId;t(i,n.dataset_id)}}var p9=Z('<div class="flex h-full w-full items-center justify-center"><div>Loading samples...</div></div>'),v9=Z('<div class="flex h-full w-full items-center justify-center"><div class="mb-2 font-medium">Error loading samples</div></div>'),m9=Z(`<div class="flex h-full w-full items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-lg font-medium">No samples found</div> <div class="text-sm">This dataset doesn't contain any samples.</div></div></div>`),b9=Z('<div class="pointer-events-none absolute inset-x-0 bottom-0 z-10 rounded-b-lg bg-black/60 px-2 py-1 text-xs font-medium text-white"><span class="block truncate"> </span></div>'),_9=Z('<div data-testid="sample-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <div class="relative overflow-hidden rounded-lg" style="width: var(--sample-width); height: var(--sample-height);"><!> <!> <!></div></div>'),y9=Z('<div class="flex justify-center p-4"><!></div>'),w9=Z("<!> <!>",1),x9=Z('<div class="viewport flex-1 svelte-w4icmb"><!></div>'),S9=Z('<div class="flex h-full w-full items-center justify-center" data-testid="samples-loading"><div>Loading...</div></div>');function d7(e,t){st(t,!0);const n=()=>Kt(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",v),i=()=>Kt(x,"$tagsSelected",v),s=()=>Kt(A,"$dimensions",v),l=()=>Kt(T,"$metadataValues",v),a=()=>Kt(t.textEmbedding,"$textEmbedding",v),c=()=>Kt(nt,"$filterParams",v),f=()=>Kt(d(X),"$infiniteSamples",v),h=()=>Kt(w,"$gridViewSampleRenderingStore",v),g=()=>Kt(S,"$showSampleFilenamesStore",v),p=()=>Kt(M,"$selectedSampleIds",v),[v,b]=sr(),{gridViewSampleRenderingStore:w,showSampleFilenamesStore:S}=Yu(),{tagsSelected:x}=xy({dataset_id:t.dataset_id,kind:["sample"]}),{dimensionsValues:A}=YT(),{metadataValues:T}=iE(t.dataset_id),{getSelectedSampleIds:D,toggleSampleSelection:R,getDatasetVersion:L,setfilteredSampleCount:F}=ii(),M=D(t.dataset_id);let U=ft(0);const q=E(()=>{var Dt,Ht;return{dataset_id:t.dataset_id,mode:"normal",filters:{annotation_label_ids:(Dt=n())!=null&&Dt.length?n():void 0,tag_ids:i().size>0?Array.from(i()):void 0,dimensions:s()},metadata_values:l(),text_embedding:(Ht=a())==null?void 0:Ht.embedding}}),tt=Dt=>({...Dt,filters:Dt.filters?N0.omit(Dt.filters,["sample_ids"]):void 0}),{filterParams:nt,updateFilterParams:z}=d9();se(()=>{var ne;const Dt=d(q),Ht=c();if(Ht&&N0.isEqual(tt(Dt),tt(Ht)))return;let Ae=Dt;const Nt=(ne=Ht==null?void 0:Ht.filters)==null?void 0:ne.sample_ids;Nt&&Nt.length>0&&(Ae={...Ae,filters:{...Ae.filters??{},sample_ids:Nt}}),z(Ae)});const it=E(()=>Hx({...c(),dataset_id:t.dataset_id})),X=E(()=>d(it).samples),j=E(()=>f()&&f().data?f().data.pages.flatMap(Dt=>Dt.data):[]);let J=ft(null),rt=ft(!1),ht=ft(On(h())),pt=ft(0);const{initialize:wt,savePosition:lt,getRestoredPosition:yt}=fx("samples_scroll");Xu(async()=>{wt(),await L(t.dataset_id),O(rt,!0)});const Ot=E(()=>{var Ht;return[n().join(","),Array.from(i()).join(","),`${s().min_width}-${s().max_width}`,`${s().min_height}-${s().max_height}`,JSON.stringify(l()),((Ht=a())==null?void 0:Ht.queryText)||""].filter(Boolean).join("|")}),Vt=E(()=>yt(d(Ot)));function St(Dt){const Ht=Dt.target.scrollTop;lt(Ht,d(Ot))}se(()=>{O(ht,h(),!0)}),se(()=>{var Dt;f().isSuccess&&((Dt=f().data)==null?void 0:Dt.pages.length)>0&&F(f().data.pages[0].total_count)});let At=ft(0),qt=ft(0);se(()=>{if(!d(J))return;O(At,d(U)/t.sampleWidth),O(qt,d(At)-Wt),O(pt,d(J).clientHeight,!0);const Dt=new ResizeObserver(()=>{d(J)&&O(pt,d(J).clientHeight,!0)});return Dt.observe(d(J)),()=>{Dt.disconnect()}});function kt(){f().hasNextPage&&!f().isFetchingNextPage&&f().fetchNextPage()}const Wt=16;var Lt=K(),Ie=N(Lt);{var _e=Dt=>{var Ht=p9();_(Dt,Ht)},Me=Dt=>{var Ht=K(),Ae=N(Ht);{var Nt=Ut=>{var he=v9();_(Ut,he)},ne=Ut=>{var he=K(),ae=N(he);{var te=Xt=>{var ge=m9();_(Xt,ge)},It=Xt=>{var ge=K(),an=N(ge);{var vn=pe=>{var fe=x9(),on=G(fe);gv(on,{get itemCount(){return d(j).length},get itemHeight(){return d(At)},get itemWidth(){return d(At)},get height(){return d(pt)},get scrollPosition(){return d(Vt)},onscroll:St,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${d(qt)??""}px; --sample-height: ${d(qt)??""}px;`},overScan:100,item:(Ge,Ne)=>{let Pe=()=>Ne==null?void 0:Ne().index,ln=()=>Ne==null?void 0:Ne().style;var mn=K(),Oe=N(mn);Ri(Oe,()=>f().dataUpdatedAt,Re=>{var je=K(),un=N(je);{var Bn=Gt=>{const re=E(()=>{var We,Je;return g()?d(j)[Pe()].file_name:(Je=(We=d(j)[Pe()].captions)==null?void 0:We[0])==null?void 0:Je.text});var Bt=_9();let Be;Bt.__click=[f9,R,t],Bt.__dblclick=[h9,t],Bt.__keydown=[g9,R,t];var bn=G(Bt),Ke=G(bn);{let We=E(()=>p().has(d(j)[Pe()].sample_id));em(Ke,{onSelect:()=>{},get isSelected(){return d(We)}})}W(bn);var dn=et(bn,2),ze=G(dn);Vx(ze,{get sample(){return d(j)[Pe()]},get objectFit(){return d(ht)}});var Qe=et(ze,2);C8(Qe,{get sample(){return d(j)[Pe()]},get containerWidth(){return d(qt)},get sampleImageObjectFit(){return d(ht)},get containerHeight(){return d(qt)}});var qe=et(Qe,2);{var fn=We=>{var Je=b9(),_n=G(Je),Tn=G(_n,!0);W(_n),W(Je),Rt(()=>{Pt(_n,"title",d(re)),$t(Tn,d(re))}),_(We,Je)};dt(qe,We=>{d(re)&&We(fn)})}W(dn),W(Bt),Rt(We=>{Be=Kn(Bt,1,"relative svelte-w4icmb",null,Be,We),Gn(Bt,ln()),Pt(Bt,"data-sample-id",d(j)[Pe()].sample_id),Pt(Bt,"data-sample-name",d(j)[Pe()].file_name),Pt(Bt,"data-index",Pe()),Pt(Bt,"aria-label",`View sample: ${d(j)[Pe()].file_name}`)},[()=>({"sample-selected":p().has(d(j)[Pe()].sample_id)})]),_(Gt,Bt)};dt(un,Gt=>{d(j)[Pe()]&&Gt(Bn)})}_(Re,je)}),_(Ge,mn)},footer:Ge=>{var Ne=w9(),Pe=N(Ne);Ri(Pe,()=>d(j).length,Oe=>{{let Re=E(()=>!f().hasNextPage||f().isFetchingNextPage);Ax(Oe,{onIntersect:kt,get disabled(){return d(Re)}})}});var ln=et(Pe,2);{var mn=Oe=>{var Re=y9(),je=G(Re);My(je,{}),W(Re),_(Oe,Re)};dt(ln,Oe=>{f().isFetchingNextPage&&Oe(mn)})}_(Ge,Ne)},$$slots:{item:!0,footer:!0}}),W(fe),Rn(fe,De=>O(J,De),()=>d(J)),Oa(fe,"clientWidth",De=>O(U,De)),_(pe,fe)},rn=pe=>{var fe=S9();_(pe,fe)};dt(an,pe=>{d(rt)?pe(vn):pe(rn,!1)},!0)}_(Xt,ge)};dt(ae,Xt=>{f().isSuccess&&d(j).length===0?Xt(te):Xt(It,!1)},!0)}_(Ut,he)};dt(Ae,Ut=>{f().isError?Ut(Nt):Ut(ne,!1)},!0)}_(Dt,Ht)};dt(Ie,Dt=>{f().isPending?Dt(_e):Dt(Me,!1)})}_(e,Lt),at(),b()}ar(["click","dblclick","keydown"]);function em(e,t){const n=P(t,"isSelected",3,!1);Sx(e,{get checked(){return n()},get onCheckedChange(){return t.onSelect},"data-testid":"sample-selected-box"})}function nv(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"checked",15,!1),s=xt(t,["$$slots","$$events","$$legacy","ref","checked","class"]);var l=K(),a=N(l);{let c=E(()=>ce("focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.class));_t(a,()=>Y5,(f,h)=>{h(f,Ft({get class(){return d(c)}},()=>s,{get ref(){return n()},set ref(g){n(g)},get checked(){return i()},set checked(g){i(g)},children:(g,p)=>{var v=K(),b=N(v);{let w=E(()=>ce("bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"));_t(b,()=>j5,(S,x)=>{x(S,{get class(){return d(w)}})})}_(g,v)},$$slots:{default:!0}}))})}_(e,l),at()}var C9=Z("<!> <!>",1),A9=(e,t)=>{e.preventDefault(),t("hideAnnotations")},P9=Z('<span class="italic opacity-70">Press a key...</span>'),k9=Z("<span> </span>"),T9=(e,t)=>{e.preventDefault(),t("goBack")},E9=Z('<span class="italic opacity-70">Press a key...</span>'),I9=Z("<span> </span>"),O9=(e,t)=>{e.preventDefault(),t("toggleEditMode")},R9=Z('<span class="italic opacity-70">Press a key...</span>'),N9=Z("<span> </span>"),M9=Z("<!> <!>",1),D9=Z("<!> <!>",1),L9=Z("<!> <!>",1),F9=Z('<form><!> <div class="grid gap-4 py-4"><div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Keyboard Shortcuts</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="hide-annotations" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="go-back" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="toggle-edit-mode" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div></div> <div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Display Settings</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <div class="relative"><!></div></div> <div class="grid grid-cols-2 items-center gap-4"><!> <!></div></div> <div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Annotation Settings</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <!></div></div></div> <!></form>'),B9=Z("<!> <!>",1);function f7(e,t){st(t,!0);const n=()=>Kt(c,"$settingsStore",l),i=()=>Kt(f,"$isLoadedStore",l),s=()=>Kt(g,"$isSettingsDialogOpen",l),[l,a]=sr(),{settingsStore:c,isLoadedStore:f,saveSettings:h}=Yu(),{isSettingsDialogOpen:g,openSettingsDialog:p,closeSettingsDialog:v}=Cx();let b=ft(!1),w=ft(On({hideAnnotations:"v",goBack:"Escape",toggleEditMode:"e"})),S=ft("contain"),x=ft(!0),A=ft(!1),T=!1;se(()=>{n()&&i()&&!T&&(O(w,{hideAnnotations:n().key_hide_annotations||"v",goBack:n().key_go_back||"Escape",toggleEditMode:n().key_toggle_edit_mode||"e"},!0),O(S,n().grid_view_sample_rendering||"contain",!0),O(x,!!(n().show_annotation_text_labels??!0),!0),O(A,!!(n().show_sample_filenames??!1),!0),T=!0)});let D=ft(null);function R(z){z?p():v(),z||O(D,null)}function L(z){O(S,z,!0)}function F(z){z.preventDefault(),M()}async function M(){O(b,!0);try{await h({key_hide_annotations:d(w).hideAnnotations,key_go_back:d(w).goBack,key_toggle_edit_mode:d(w).toggleEditMode,grid_view_sample_rendering:d(S),show_annotation_text_labels:d(x),show_sample_filenames:d(A)}),R(!1)}catch(z){console.error("Error saving settings:",z)}finally{O(b,!1)}}const U=z=>{O(D,z,!0)},q=z=>{if(!d(D))return;z.preventDefault(),z.stopPropagation();let it=z.key;it===" "?it="Space":it.length===1&&/^[a-zA-Z]$/.test(it)&&!z.getModifierState("CapsLock")&&(it=it.toLowerCase()),d(D)==="hideAnnotations"?d(w).hideAnnotations=it:d(D)==="goBack"?d(w).goBack=it:d(D)==="toggleEditMode"&&(d(w).toggleEditMode=it),O(D,null)};var tt=K();Eo("keydown",TT,q);var nt=N(tt);_t(nt,()=>Va,(z,it)=>{it(z,{get open(){return s()},onOpenChange:X=>R(X),children:(X,j)=>{var J=K(),rt=N(J);_t(rt,()=>Ds,(ht,pt)=>{pt(ht,{children:(wt,lt)=>{var yt=B9(),Ot=N(yt);_t(Ot,()=>Ms,(St,At)=>{At(St,{})});var Vt=et(Ot,2);_t(Vt,()=>za,(St,At)=>{At(St,{class:"border-border bg-background sm:max-w-[500px]",children:(qt,kt)=>{var Wt=F9(),Lt=G(Wt);_t(Lt,()=>Ba,(Gt,re)=>{re(Gt,{children:(Bt,Be)=>{var bn=C9(),Ke=N(bn);_t(Ke,()=>Fa,(ze,Qe)=>{Qe(ze,{class:"text-foreground",children:(qe,fn)=>{jt();var We=oe("Settings");_(qe,We)},$$slots:{default:!0}})});var dn=et(Ke,2);_t(dn,()=>Ph,(ze,Qe)=>{Qe(ze,{class:"text-foreground",children:(qe,fn)=>{jt();var We=oe("Configure your application preferences.");_(qe,We)},$$slots:{default:!0}})}),_(Bt,bn)},$$slots:{default:!0}})});var Ie=et(Lt,2),_e=G(Ie),Me=et(G(_e),2),Dt=G(Me);Ai(Dt,{for:"hide-annotations",class:"text-right text-foreground",children:(Gt,re)=>{jt();var Bt=oe("Hide Annotations");_(Gt,Bt)},$$slots:{default:!0}});var Ht=et(Dt,2);Ht.__click=[A9,U];var Ae=G(Ht);{var Nt=Gt=>{var re=P9();_(Gt,re)},ne=Gt=>{var re=k9(),Bt=G(re,!0);W(re),Rt(()=>$t(Bt,d(w).hideAnnotations)),_(Gt,re)};dt(Ae,Gt=>{d(D)==="hideAnnotations"?Gt(Nt):Gt(ne,!1)})}W(Ht),W(Me);var Ut=et(Me,2),he=G(Ut);Ai(he,{for:"go-back",class:"text-right text-foreground",children:(Gt,re)=>{jt();var Bt=oe("Go Back");_(Gt,Bt)},$$slots:{default:!0}});var ae=et(he,2);ae.__click=[T9,U];var te=G(ae);{var It=Gt=>{var re=E9();_(Gt,re)},Xt=Gt=>{var re=I9(),Bt=G(re,!0);W(re),Rt(()=>$t(Bt,d(w).goBack)),_(Gt,re)};dt(te,Gt=>{d(D)==="goBack"?Gt(It):Gt(Xt,!1)})}W(ae),W(Ut);var ge=et(Ut,2),an=G(ge);Ai(an,{for:"toggle-edit-mode",class:"text-right text-foreground",children:(Gt,re)=>{jt();var Bt=oe("Toggle Edit Mode");_(Gt,Bt)},$$slots:{default:!0}});var vn=et(an,2);vn.__click=[O9,U];var rn=G(vn);{var pe=Gt=>{var re=R9();_(Gt,re)},fe=Gt=>{var re=N9(),Bt=G(re,!0);W(re),Rt(()=>$t(Bt,d(w).toggleEditMode)),_(Gt,re)};dt(rn,Gt=>{d(D)==="toggleEditMode"?Gt(pe):Gt(fe,!1)})}W(vn),W(ge),W(_e);var on=et(_e,2),De=et(G(on),2),Fe=G(De);Ai(Fe,{for:"grid-view-rendering",class:"text-right text-foreground",children:(Gt,re)=>{jt();var Bt=oe("Grid View Rendering");_(Gt,Bt)},$$slots:{default:!0}});var Ge=et(Fe,2),Ne=G(Ge);xx(Ne,{type:"single",get value(){return d(S)},onValueChange:L,children:(Gt,re)=>{var Bt=D9(),Be=N(Bt);wx(Be,{id:"grid-view-rendering",children:(Ke,dn)=>{jt();var ze=oe();Rt(()=>$t(ze,d(S)==="cover"?"Cover":"Contain")),_(Ke,ze)},$$slots:{default:!0}});var bn=et(Be,2);yx(bn,{children:(Ke,dn)=>{var ze=M9(),Qe=N(ze);$p(Qe,{value:"cover",children:(fn,We)=>{jt();var Je=oe("Cover");_(fn,Je)},$$slots:{default:!0}});var qe=et(Qe,2);$p(qe,{value:"contain",children:(fn,We)=>{jt();var Je=oe("Contain");_(fn,Je)},$$slots:{default:!0}}),_(Ke,ze)},$$slots:{default:!0}}),_(Gt,Bt)},$$slots:{default:!0}}),W(Ge),W(De);var Pe=et(De,2),ln=G(Pe);Ai(ln,{for:"show-sample-filenames",class:"text-right text-foreground",children:(Gt,re)=>{jt();var Bt=oe("Show filenames in grid view");_(Gt,Bt)},$$slots:{default:!0}});var mn=et(ln,2);nv(mn,{id:"show-sample-filenames",get disabled(){return d(b)},get checked(){return d(A)},set checked(Gt){O(A,Gt,!0)}}),W(Pe),W(on);var Oe=et(on,2),Re=et(G(Oe),2),je=G(Re);Ai(je,{for:"show-annotation-text-labels",class:"text-right text-foreground",children:(Gt,re)=>{jt();var Bt=oe("Show Annotation Text Labels");_(Gt,Bt)},$$slots:{default:!0}});var un=et(je,2);nv(un,{id:"show-annotation-text-labels",get disabled(){return d(b)},get checked(){return d(x)},set checked(Gt){O(x,Gt,!0)}}),W(Re),W(Oe),W(Ie);var Bn=et(Ie,2);_t(Bn,()=>Vv,(Gt,re)=>{re(Gt,{children:(Bt,Be)=>{var bn=L9(),Ke=N(bn);In(Ke,{variant:"outline",type:"button",onclick:()=>R(!1),children:(ze,Qe)=>{jt();var qe=oe("Cancel");_(ze,qe)},$$slots:{default:!0}});var dn=et(Ke,2);In(dn,{type:"submit",get disabled(){return d(b)},children:(ze,Qe)=>{jt();var qe=oe();Rt(()=>$t(qe,d(b)?"Saving...":"Save Changes")),_(ze,qe)},$$slots:{default:!0}}),_(Bt,bn)},$$slots:{default:!0}})}),W(Wt),Eo("submit",Wt,F),_(qt,Wt)},$$slots:{default:!0}})}),_(wt,yt)},$$slots:{default:!0}})}),_(X,J)},$$slots:{default:!0}})}),_(e,tt),at(),a()}ar(["click"]);var z9=Z("<input/>"),V9=Z("<input/>");function H9(e,t){st(t,!0);let n=P(t,"ref",15,null),i=P(t,"value",15),s=P(t,"files",15),l=xt(t,["$$slots","$$events","$$legacy","ref","value","type","files","class"]);var a=K(),c=N(a);{var f=g=>{var p=z9();Yt(p,v=>({class:v,type:"file",...l}),[()=>ce("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class)],void 0,void 0,!0),Rn(p,v=>n(v),()=>n()),gE(p,s),Ra(p,i),_(g,p)},h=g=>{var p=V9();Yt(p,v=>({class:v,type:t.type,...l}),[()=>ce("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class)],void 0,void 0,!0),Rn(p,v=>n(v),()=>n()),Ra(p,i),_(g,p)};dt(c,g=>{t.type==="file"?g(f):g(h,!1)})}_(e,a),at()}var W9=Z('<div role="tooltip" id="tooltip"> </div>'),U9=Z('<div class="relative inline-block" tabindex="0" role="button"><!> <!></div>');function G9(e,t){st(t,!0);let n=P(t,"position",3,"top"),i=ft(!1),s;function l(){if(!s)return{};switch(n()){case"top":return{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"5px"};case"bottom":return{top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"5px"};case"left":return{right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"5px"};case"right":return{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"5px"};default:return{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"5px"}}}function a(){O(i,!0)}function c(){O(i,!1)}var f=U9(),h=G(f);ut(h,()=>t.children);var g=et(h,2);{var p=v=>{var b=W9(),w=G(b,!0);W(b),Rt((S,x)=>{Kn(b,1,S),Gn(b,x),$t(w,t.content)},[()=>zo(ce("bg-popover text-popover-foreground absolute z-50 max-w-xs rounded-md px-3 py-1.5 text-xs shadow-md",t.class)),l]),fv(3,b,()=>_x,()=>({y:n()==="top"?5:n()==="bottom"?-5:0,x:n()==="left"?5:n()==="right"?-5:0,duration:200})),_(v,b)};dt(g,v=>{d(i)&&t.content&&v(p)})}W(f),Rn(f,v=>s=v,()=>s),Rt(()=>Pt(f,"aria-describedby",d(i)?"tooltip":void 0)),Eo("mouseenter",f,a),Eo("mouseleave",f,c),Eo("focusin",f,a),Eo("focusout",f,c),Eo("keydown",f,v=>v.key==="Escape"&&c()),_(e,f),at()}const Qd=Le(!1);function Oh(){return{error:Le(null),isCreateClassifiersPanelOpen:Qd,openCreateClassifiersPanel:()=>Qd.set(!0),closeCreateClassifiersPanel:()=>{Qd.set(!1)},toggleCreateClassifiersPanel:()=>Qd.update(t=>!t)}}const Jd=Le(!1),vp=Le(null),V0=Le(null),H0=Le(null),W0=Le(null);function Rh(){return{isRefineClassifiersPanelOpen:Jd,currentMode:vp,currentClassifierName:V0,currentClassifierId:H0,currentClassifierClasses:W0,openRefineClassifiersPanel:(t,n,i,s)=>{vp.set(t),Jd.set(!0),H0.set(n),V0.set(i),W0.set(s)},closeRefineClassifiersPanel:()=>{vp.set(null),Jd.set(!1)},toggleRefineClassifiersPanel:()=>{Jd.update(t=>!t)}}}const mp=Le(null),bp=Le(new Set);function Nh(){return{classifierSamples:mp,classifierSelectedSampleIds:bp,setClassifierSamples:s=>{mp.set(s)},clearClassifierSamples:()=>{mp.set(null)},toggleClassifierSampleSelection:s=>{bp.update(l=>(l.has(s)?l.delete(s):l.add(s),l))},clearClassifierSelectedSamples:()=>{bp.update(s=>(s.clear(),s))}}}const{getSelectedSampleIds:K9}=ii(),_p=Le(new Set);function q9(){const e=Le(null),t=Le(!1),n=async(h,g)=>{try{e.set(null);const p=await $r.POST("/api/classifiers/{classifier_id}/save_classifier_to_file/{export_type}",{params:{path:{classifier_id:h,export_type:g}},responseType:"arraybuffer",headers:{Accept:"application/octet-stream"},parseAs:"blob"}),v=p.response.headers.get("content-disposition"),b=v==null?void 0:v.match(/filename="(.+)"/),w=(b==null?void 0:b[1])??`classifier_${h}.pkl`;if(!p.data)return e.set(new Error("No data received from the server")),Promise.reject("No data received from the server");UD(w,p.data)}catch(p){throw e.set(p),p}},i=async h=>{var v;e.set(null);const g=h.target,p=(v=g.files)==null?void 0:v[0];if(!p){e.set(new Error("No file selected"));return}try{const b=new FormData;b.append("file",p),await $r.POST("/api/classifiers/load_classifier_from_buffer",{body:b,headers:{Accept:"application/json"}}),g.value=""}catch(b){throw e.set(b),b}},s=async(h,g)=>{try{e.set(null),await $r.POST("/api/classifiers/{classifier_id}/update_annotations",{params:{path:{classifier_id:h}},body:g})}catch(p){throw e.set(p),p}},l=async h=>{try{e.set(null),await $r.POST("/api/classifiers/{classifier_id}/train_classifier",{params:{path:{classifier_id:h}}})}catch(g){throw e.set(g),g}};async function a(){const h=ri.params.dataset_id,g=K9(h),p=xn(g),v=Array.from(p);e.set(null);try{const b=await $r.POST("/api/classifiers/get_negative_samples",{body:{dataset_id:h.toString(),positive_sample_ids:v}});return b.data?{positiveSampleIds:v,negativeSampleIds:b.data.negative_sample_ids}:(e.set(new Error("Failed to prepare samples")),Promise.reject("Failed to prepare samples"))}catch(b){return e.set(b),Promise.reject(b)}}return{error:e,isLoading:t,classifiersSelected:_p,saveClassifier:n,loadClassifier:i,updateAnnotations:s,trainClassifier:l,prepareSamples:a,classifierSelectionToggle:h=>{_p.update(g=>(g.has(h)?g.delete(h):g.add(h),new Set([...g])))},clearClassifiersSelected:()=>{_p.set(new Set)}}}const{classifiers:ya}=ii(),{classifierSamples:U0,setClassifierSamples:$d,clearClassifierSamples:Y9,classifierSelectedSampleIds:G0,clearClassifierSelectedSamples:tf,toggleClassifierSampleSelection:yp}=Nh();function nm(){const e=q9(),t=Le(null),n=Le(!1),i=Le(!1),{openRefineClassifiersPanel:s,closeRefineClassifiersPanel:l}=Rh(),{toggleCreateClassifiersPanel:a,closeCreateClassifiersPanel:c}=Oh(),f=async()=>{var F;if(!xn(n)){t.set(null),n.set(!0);try{const M=await $r.GET("/api/classifiers/get_all_classifiers");(F=M.data)!=null&&F.classifiers?ya.set(M.data.classifiers):ya.set([])}catch(M){t.set(M)}finally{n.set(!1)}}};xn(i)||(f(),i.set(!0));async function h(){t.set(null);try{const F=await e.prepareSamples();$d({positiveSampleIds:F.positiveSampleIds,negativeSampleIds:F.negativeSampleIds}),tf(),F.positiveSampleIds.forEach(M=>{yp(M)}),a(),t.set(null)}catch(F){t.set(F)}}async function g(F){try{if(t.set(null),!F.dataset_id)throw new Error("Dataset ID is required");const M=await $r.POST("/api/classifiers/create",{body:{name:F.name,class_list:F.class_list,dataset_id:F.dataset_id.toString()}});if(!M.data)return t.set(Error("Failed to create classifier.")),Promise.reject("Failed to create classifier.");const U=xn(U0),q=U?[...U.positiveSampleIds,...U.negativeSampleIds]:[],tt=Array.from(xn(G0)),nt=q.filter(it=>!tt.includes(it)),z={annotations:{positive:tt,negative:nt}};return await e.updateAnnotations(M.data.classifier_id,z),await e.trainClassifier(M.data.classifier_id),await b(M.data.classifier_id,F.dataset_id.toString(),F.class_list),s("temp",M.data.classifier_id,M.data.name,F.class_list),c(),M.data}catch(M){return t.set(M),Promise.reject(M)}}const p=async()=>{var F;try{n.set(!0),t.set(null);const M=Array.from(xn(e.classifiersSelected));for(const U of M){const q=xn(ya).find(tt=>tt.classifier_id===U);if(q){const tt=((F=q.class_list)==null?void 0:F.map(nt=>`${q.classifier_name}_${nt}`))||[];await $r.POST("/api/classifiers/{classifier_id}/run_on_dataset/{dataset_id}",{params:{path:{classifier_id:U,dataset_id:ri.params.dataset_id}}}),Or.success(`Classifier "${q.classifier_name}" completed successfully. New labels added: ${tt.join(", ")}. Annotations have been added to your dataset.`,{duration:1e4})}}n.set(!1)}catch(M){n.set(!1),t.set(M),Or.error("Failed to run classifiers: "+M.message)}},v=async F=>{try{t.set(null),await $r.POST("/api/classifiers/{classifier_id}/commit_temp_classifier",{params:{path:{classifier_id:F}}}),await f(),xn(ya).find(U=>U.classifier_id===F)||t.set(Error("Failed to create classifier."))}catch(M){t.set(M);return}Y9(),l()},b=async(F,M,U)=>{var q;try{t.set(null);const tt=await $r.GET("/api/classifiers/{classifier_id}/samples_to_refine",{params:{path:{classifier_id:F},query:{dataset_id:M}}});if(!((q=tt.data)!=null&&q.samples)){$d({positiveSampleIds:[],negativeSampleIds:[]}),tf();return}const nt=tt.data.samples,z=Object.keys(nt);if(z.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!U.every(X=>z.includes(X))){t.set(new Error(`Invalid class names. Expected classes: ${z.join(", ")}`));return}const it={positiveSampleIds:nt[U[0]]||[],negativeSampleIds:nt[U[1]]||[]};tf(),it.positiveSampleIds.forEach(X=>{yp(X)}),$d(it)}catch(tt){return t.set(tt),Promise.reject(tt)}};async function w(F,M,U,q,tt){try{t.set(null),await b(M,tt,q),s("existing",M,U,q)}catch(nt){t.set(nt)}}async function S(F,M,U){try{t.set(null);const q=xn(U0),tt=q?[...q.positiveSampleIds,...q.negativeSampleIds]:[],nt=Array.from(xn(G0)),z=tt.filter(X=>!nt.includes(X)),it={annotations:{positive:nt,negative:z}};await e.updateAnnotations(F,it),await e.trainClassifier(F),await b(F,M,U)}catch(q){t.set(q)}}async function x(F,M,U,q){var tt;try{if(t.set(null),q){const z=(tt=(await GT({path:{classifier_id:F}})).data)==null?void 0:tt.samples;if(!z){t.set(new Error("No samples data received"));return}const it=Object.keys(z);if(it.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!U.every(j=>it.includes(j))){t.set(new Error(`Invalid class names. Expected classes: ${it.join(", ")}`));return}const X={positiveSampleIds:z[U[0]]||[],negativeSampleIds:z[U[1]]||[]};tf(),X.positiveSampleIds.forEach(j=>{yp(j)}),$d(X)}else await b(F,M,U)}catch(nt){t.set(nt)}}const A=async()=>{try{return t.set(null),await e.prepareSamples()}catch(F){throw t.set(F),F}},T=async(F,M)=>{try{t.set(null),await e.saveClassifier(F,M)}catch(U){throw t.set(U),U}},D=async F=>{try{t.set(null),await e.loadClassifier(F),f()}catch(M){throw t.set(M),M}},R=async(F,M)=>{try{t.set(null),await e.updateAnnotations(F,M)}catch(U){throw t.set(U),U}},L=async F=>{try{t.set(null),await e.trainClassifier(F)}catch(M){throw t.set(M),M}};return{classifiers:Ud(ya),createClassifier:g,loadClassifiers:f,classifiersSelected:Ud(e.classifiersSelected),classifierSelectionToggle:e.classifierSelectionToggle,clearClassifiersSelected:e.clearClassifiersSelected,apply:p,saveClassifier:T,updateAnnotations:R,trainClassifier:L,commitTempClassifier:v,getSamplesToRefine:b,prepareSamples:A,loadClassifier:D,startCreateClassifier:h,isLoading:Ud(n),startRefinement:w,showClassifierTrainingSamples:x,refineClassifier:S,error:Ud(t)}}function X9(e,t,n){t(e),n()}var j9=Z("<!> <!>",1),Z9=Z("<!> <!>",1),Q9=Z('<div class="flex items-center gap-2"><p class="flex items-center gap-2 text-sm text-orange-600"><!> Select samples to create a classifier</p></div>'),J9=Z("<!> Create New Classifier",1),$9=Z('<p class="flex items-center gap-2 text-sm text-green-600"><!> </p> <!>',1),tB=Z("<!> Load Classifier (.pkl)",1),eB=Z('<div class="space-y-4"><div class="space-y-3"><!></div> <div class="border-t border-border"></div> <div class="space-y-3"><div class="flex items-center gap-2"><h4 class="text-sm font-medium">Load Existing Classifier</h4></div> <div class="relative"><input title="Load Classifier" type="file" accept=".pkl" class="absolute inset-0 h-full w-full cursor-pointer opacity-0"/> <!></div></div></div>'),nB=Z('<div class="flex items-center justify-between rounded-lg border p-3 transition-colors hover:bg-muted/50"><div class="flex min-w-0 flex-1 items-center gap-3"><!> <div class="min-w-0 flex-1"><p class="truncate text-sm font-medium"> </p></div></div> <div class="flex items-center gap-1"><!> <!></div></div>'),rB=Z("<!> Running Classifiers...",1),iB=Z("<!> Run Selected Classifiers",1),oB=Z('<div class="rounded-lg bg-muted/50 p-4"><div class="flex items-start gap-2"><h4 class="mb-3 text-sm text-muted-foreground">Selected classifiers will be applied to your dataset</h4> <!></div> <!></div>'),sB=Z('<div class="rounded-lg bg-muted/30 py-4 text-center"><!> <p class="text-sm text-muted-foreground">No classifiers selected</p></div>'),aB=Z('<div class="max-h-48 space-y-2 overflow-y-auto dark:[color-scheme:dark]"></div> <div class="mt-4 border-t pt-4"><div class="mb-3 flex items-center gap-2"><h4 class="text-sm font-medium">Run Classifiers</h4> <span> </span></div> <!></div>',1),lB=Z('<div class="py-8 text-center"><!> <p class="text-sm text-muted-foreground">No classifiers found</p> <p class="mt-1 text-xs text-muted-foreground">Create your first classifier to get started</p></div>'),cB=Z("<!> <!> <!>",1),uB=Z('<div class="border-t p-4"><!></div>'),dB=Z('<!> <div class="flex-1 overflow-y-auto"><div class="p-4 pb-0"><div class="flex items-center justify-between"><span class="inline-flex items-center rounded-full bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground"> </span></div></div> <!> <!></div>',1),fB=Z("<!> <!>",1),hB=Z("<!> <!>",1),gB=Z("<!> <!>",1),pB=Z('<!> <div class="grid gap-4 py-4"><div class="space-y-2"><label for="exportType" class="text-sm font-medium">Select the export type for the classifier.</label> <!></div> <!></div>',1),vB=Z("<!> <!>",1),mB=Z("<!> <!>",1);function h7(e,t){st(t,!0);const n=()=>Kt(F,"$isCreateClassifiersPanelOpen",A),i=()=>Kt(M,"$isRefineClassifiersPanelOpen",A),s=()=>Kt(it,"$scrollToClassifierId",A),l=()=>Kt(U,"$isDialogOpen",A),a=()=>Kt(j,"$classifiers",A),c=()=>Kt(q,"$activeTab",A),f=()=>Kt(At,"$selectedSampleIds",A),h=()=>Kt(Me,"$sortedClassifiers",A),g=()=>Kt(J,"$classifiersSelected",A),p=()=>Kt(Ie,"$isApplyButtonEnabled",A),v=()=>Kt(rt,"$isLoading",A),b=()=>Kt(X,"$error",A),w=()=>Kt(kt,"$showExportDialog",A),S=()=>Kt(qt,"$exportType",A),x=()=>Kt(_e,"$triggerContent",A),[A,T]=sr(),D=["sklearn","lightly"],R=ri.params.dataset_id,L=Vs(),{isCreateClassifiersPanelOpen:F}=Oh(),{isRefineClassifiersPanelOpen:M}=Rh(),{isDialogOpen:U,activeTab:q,switchToManageTab:tt,openClassifiersMenu:nt,closeClassifiersMenu:z,scrollToClassifierId:it}=Qv(),{error:X,classifiers:j,classifiersSelected:J,isLoading:rt,classifierSelectionToggle:ht,apply:pt,saveClassifier:wt,loadClassifier:lt,startRefinement:yt,startCreateClassifier:Ot,clearClassifiersSelected:Vt}=nm(),{getSelectedSampleIds:St}=ii(),At=St(R),qt=Le("sklearn"),kt=Le(!1),Wt=Le(null);let Lt=ft(!1);const Ie=cs([J,j],([te,It])=>te.size>0&&It.length>0),_e=cs(qt,te=>te||"Select export type"),Me=cs(j,te=>[...te].sort((It,Xt)=>It.classifier_name.localeCompare(Xt.classifier_name)));function Dt(te){Wt.set(te),kt.set(!0)}function Ht(){const te=xn(Wt),It=xn(qt);te&&(wt(te,It),kt.set(!1),Wt.set(null))}function Ae(){L.invalidateQueries({queryKey:dv().queryKey}),L.invalidateQueries({queryKey:cv({path:{dataset_id:R}}).queryKey})}async function Nt(){await pt(),Ae()}function ne(){O(Lt,!0),Ot(new Event("click")),z()}se(()=>{n()||i()?z():d(Lt)&&(nt(),O(Lt,!1))}),se(()=>{const te=s();te&&setTimeout(()=>{const It=document.querySelector(`[data-classifier-id="${te}"]`);It&&(It.scrollIntoView({behavior:"smooth",block:"center"}),ht(te))},50)}),se(()=>{l()||Vt()});var Ut=mB(),he=N(Ut);_t(he,()=>Va,(te,It)=>{It(te,{get open(){return l()},onOpenChange:Xt=>Xt?nt():z(),children:(Xt,ge)=>{var an=K(),vn=N(an);_t(vn,()=>Ds,(rn,pe)=>{pe(rn,{children:(fe,on)=>{var De=fB(),Fe=N(De);_t(Fe,()=>Ms,(Ne,Pe)=>{Pe(Ne,{})});var Ge=et(Fe,2);_t(Ge,()=>za,(Ne,Pe)=>{Pe(Ne,{class:"flex max-h-[85vh] w-[90vw] flex-col overflow-hidden border-border bg-background sm:w-[560px]",children:(ln,mn)=>{var Oe=dB(),Re=N(Oe);_t(Re,()=>Ba,(Ke,dn)=>{dn(Ke,{children:(ze,Qe)=>{var qe=j9(),fn=N(qe);_t(fn,()=>Fa,(Je,_n)=>{_n(Je,{class:"text-foreground",children:(Tn,Rr)=>{jt();var qn=oe("Classifier");_(Tn,qn)},$$slots:{default:!0}})});var We=et(fn,2);_t(We,()=>Ph,(Je,_n)=>{_n(Je,{class:"text-muted-foreground",children:(Tn,Rr)=>{jt();var qn=oe("Train and run Few Shot Classifiers using the embeddings.");_(Tn,qn)},$$slots:{default:!0}})}),_(ze,qe)},$$slots:{default:!0}})});var je=et(Re,2),un=G(je),Bn=G(un),Gt=G(Bn),re=G(Gt);W(Gt),W(Bn),W(un);var Bt=et(un,2);ZL(Bt,{class:"mt-2 w-full",get value(){return Ia(),c()},set value(Ke){Ea(q,Ke)},children:(Ke,dn)=>{var ze=cB(),Qe=N(ze);jL(Qe,{class:"mx-4 mb-4 grid w-auto grid-cols-2 gap-0",children:(We,Je)=>{var _n=Z9(),Tn=N(_n);R0(Tn,{value:"create",class:"flex items-center justify-center px-1 py-2 text-xs",children:(qn,cr)=>{jt();var Cn=oe("Create");_(qn,Cn)},$$slots:{default:!0}});var Rr=et(Tn,2);R0(Rr,{value:"manage",class:"flex items-center justify-center px-1 py-2 text-xs",children:(qn,cr)=>{jt();var Cn=oe("Manage & Run");_(qn,Cn)},$$slots:{default:!0}}),_(We,_n)},$$slots:{default:!0}});var qe=et(Qe,2);O0(qe,{value:"create",class:"space-y-4 px-4 pb-4",children:(We,Je)=>{var _n=eB(),Tn=G(_n),Rr=G(Tn);{var qn=Sn=>{var zn=Q9(),Vn=G(zn),Nn=G(Vn);Jg(Nn,{class:"size-4"}),jt(),W(Vn),W(zn),_(Sn,zn)},cr=Sn=>{var zn=$9(),Vn=N(zn),Nn=G(Vn);Jg(Nn,{class:"size-4"});var mo=et(Nn);W(Vn);var An=et(Vn,2);In(An,{variant:"default",class:"w-full",onclick:ne,children:(hn,Hn)=>{var qr=J9(),ui=N(qr);yf(ui,{class:"mr-2 size-4"}),jt(),_(hn,qr)},$$slots:{default:!0}}),Rt(()=>$t(mo,` ${f().size??""} samples selected`)),_(Sn,zn)};dt(Rr,Sn=>{f().size===0?Sn(qn):Sn(cr,!1)})}W(Tn);var Cn=et(Tn,4),ur=et(G(Cn),2),ci=G(ur);ci.__change=[X9,lt,tt];var dr=et(ci,2);In(dr,{variant:"outline",class:"w-full",children:(Sn,zn)=>{var Vn=tB(),Nn=N(Vn);OE(Nn,{class:"mr-2 size-4"}),jt(),_(Sn,Vn)},$$slots:{default:!0}}),W(ur),W(Cn),W(_n),_(We,_n)},$$slots:{default:!0}});var fn=et(qe,2);O0(fn,{value:"manage",class:"space-y-4 px-4 pb-4",children:(We,Je)=>{var _n=K(),Tn=N(_n);{var Rr=cr=>{var Cn=aB(),ur=N(Cn);Qn(ur,5,h,An=>An.classifier_id,(An,hn)=>{var Hn=nB(),qr=G(Hn),ui=G(qr);{let Yr=E(()=>g().has(d(hn).classifier_id));iF(ui,{get name(){return d(hn).classifier_id},label:"",get isChecked(){return d(Yr)},onCheckedChange:()=>ht(d(hn).classifier_id)})}var di=et(ui,2),Hi=G(di),nd=G(Hi,!0);W(Hi),W(di),W(qr);var bo=et(qr,2),Ko=G(bo);In(Ko,{variant:"ghost",size:"sm",title:"Edit classifier",onclick:()=>{O(Lt,!0),yt("existing",d(hn).classifier_id,d(hn).classifier_name,d(hn).class_list,R),z()},children:(Yr,Nr)=>{PE(Yr,{class:"size-4"})},$$slots:{default:!0}});var js=et(Ko,2);In(js,{variant:"ghost",size:"sm",title:"Download classifier",onclick:()=>Dt(d(hn).classifier_id),children:(Yr,Nr)=>{Iy(Yr,{class:"size-4"})},$$slots:{default:!0}}),W(bo),W(Hn),Rt(()=>{Pt(Hn,"data-classifier-id",d(hn).classifier_id),$t(nd,d(hn).classifier_name)}),_(An,Hn)}),W(ur);var ci=et(ur,2),dr=G(ci),Sn=et(G(dr),2),zn=G(Sn);W(Sn),W(dr);var Vn=et(dr,2);{var Nn=An=>{var hn=oB(),Hn=G(hn),qr=et(G(Hn),2);G9(qr,{content:"The results will be added as new annotations to the dataset. New labels with the format 'classifier_class_name' will be created for each class of the classifier after a successful run.",children:(di,Hi)=>{Jg(di,{class:"mt-0.5 size-4 text-muted-foreground"})},$$slots:{default:!0}}),W(Hn);var ui=et(Hn,2);{let di=E(()=>!p());In(ui,{variant:"default",class:"w-full",get disabled(){return d(di)},onclick:Nt,children:(Hi,nd)=>{var bo=K(),Ko=N(bo);{var js=Nr=>{var Wi=rB(),_o=N(Wi);Oy(_o,{class:"mr-2 size-4 animate-spin"}),jt(),_(Nr,Wi)},Yr=Nr=>{var Wi=iB(),_o=N(Wi);G_(_o,{class:"mr-2 size-4"}),jt(),_(Nr,Wi)};dt(Ko,Nr=>{v()?Nr(js):Nr(Yr,!1)})}_(Hi,bo)},$$slots:{default:!0}})}W(hn),_(An,hn)},mo=An=>{var hn=sB(),Hn=G(hn);G_(Hn,{class:"mx-auto mb-2 size-8 text-muted-foreground"}),jt(2),W(hn),_(An,hn)};dt(Vn,An=>{g().size>0?An(Nn):An(mo,!1)})}W(ci),Rt(()=>{Kn(Sn,1,`inline-flex items-center rounded-full px-2 py-1 text-xs font-medium ${g().size>0?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground"}`),$t(zn,`${g().size??""} selected`)}),_(cr,Cn)},qn=cr=>{var Cn=lB(),ur=G(Cn);yf(ur,{class:"mx-auto mb-3 size-12 text-muted-foreground"}),jt(4),W(Cn),_(cr,Cn)};dt(Tn,cr=>{h().length>0?cr(Rr):cr(qn,!1)})}_(We,_n)},$$slots:{default:!0}}),_(Ke,ze)},$$slots:{default:!0}});var Be=et(Bt,2);{var bn=Ke=>{var dn=uB(),ze=G(dn);hv(ze,{title:"Error occurred",children:(Qe,qe)=>{jt();var fn=oe();Rt(()=>$t(fn,b())),_(Qe,fn)}}),W(dn),_(Ke,dn)};dt(Be,Ke=>{b()&&Ke(bn)})}W(je),Rt(()=>$t(re,`${a().length??""} total`)),_(ln,Oe)},$$slots:{default:!0}})}),_(fe,De)},$$slots:{default:!0}})}),_(Xt,an)},$$slots:{default:!0}})});var ae=et(he,2);_t(ae,()=>Va,(te,It)=>{It(te,{get open(){return Ia(),w()},set open(Xt){Ea(kt,Xt)},children:(Xt,ge)=>{var an=K(),vn=N(an);_t(vn,()=>Ds,(rn,pe)=>{pe(rn,{children:(fe,on)=>{var De=vB(),Fe=N(De);_t(Fe,()=>Ms,(Ne,Pe)=>{Pe(Ne,{})});var Ge=et(Fe,2);_t(Ge,()=>za,(Ne,Pe)=>{Pe(Ne,{class:"border-border bg-background sm:max-w-[420px]",children:(ln,mn)=>{var Oe=pB(),Re=N(Oe);_t(Re,()=>Ba,(re,Bt)=>{Bt(re,{children:(Be,bn)=>{var Ke=K(),dn=N(Ke);_t(dn,()=>Fa,(ze,Qe)=>{Qe(ze,{children:(qe,fn)=>{jt();var We=oe("Export Classifier");_(qe,We)},$$slots:{default:!0}})}),_(Be,Ke)},$$slots:{default:!0}})});var je=et(Re,2),un=G(je),Bn=et(G(un),2);_t(Bn,()=>xx,(re,Bt)=>{Bt(re,{type:"single",name:"exportType",get value(){return Ia(),S()},set value(Be){Ea(qt,Be)},children:(Be,bn)=>{var Ke=gB(),dn=N(Ke);_t(dn,()=>wx,(Qe,qe)=>{qe(Qe,{class:"w-full",children:(fn,We)=>{jt();var Je=oe();Rt(()=>$t(Je,x())),_(fn,Je)},$$slots:{default:!0}})});var ze=et(dn,2);_t(ze,()=>yx,(Qe,qe)=>{qe(Qe,{children:(fn,We)=>{var Je=K(),_n=N(Je);_t(_n,()=>XL,(Tn,Rr)=>{Rr(Tn,{children:(qn,cr)=>{var Cn=hB(),ur=N(Cn);_t(ur,()=>WL,(dr,Sn)=>{Sn(dr,{children:(zn,Vn)=>{jt();var Nn=oe("Export Types");_(zn,Nn)},$$slots:{default:!0}})});var ci=et(ur,2);Qn(ci,16,()=>D,dr=>dr,(dr,Sn)=>{var zn=K(),Vn=N(zn);_t(Vn,()=>$p,(Nn,mo)=>{mo(Nn,{get value(){return Sn},get label(){return Sn},children:(An,hn)=>{jt();var Hn=oe();Rt(()=>$t(Hn,Sn)),_(An,Hn)},$$slots:{default:!0}})}),_(dr,zn)}),_(qn,Cn)},$$slots:{default:!0}})}),_(fn,Je)},$$slots:{default:!0}})}),_(Be,Ke)},$$slots:{default:!0}})}),W(un);var Gt=et(un,2);In(Gt,{class:"flex-1",onclick:()=>Ht(),children:(re,Bt)=>{jt();var Be=oe("Export");_(re,Be)},$$slots:{default:!0}}),W(je),_(ln,Oe)},$$slots:{default:!0}})}),_(fe,De)},$$slots:{default:!0}})}),_(Xt,an)},$$slots:{default:!0}})}),_(e,Ut),at(),T()}ar(["change"]);const bB=(e,t)=>{const n=e.currentTarget.dataset.sampleId;t(n)},_B=(e,t)=>{e.preventDefault();const n=e.currentTarget.dataset.sampleId;t(n)},yB=(e,t)=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.sampleId;t(n)}};var wB=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-sm text-muted-foreground">Loading samples...</div></div>'),xB=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-sm text-muted-foreground">Error loading samples</div></div>'),SB=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-sm font-medium">No samples available</div> <div class="text-xs">No samples found for this classifier.</div></div></div>'),CB=Z('<div data-testid="classifier-sample-grid-item" role="button" tabindex="0"><div class="absolute inset-0 z-10"><!></div> <!></div>'),AB=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-sm text-muted-foreground">No samples to display</div></div>'),PB=Z('<div class="viewport h-full w-full svelte-1mo6ri0"><!></div>');function Wx(e,t){st(t,!0);const n=()=>Kt(f,"$classifierSamples",a),i=()=>Kt(d(w),"$infiniteSamples",a),s=()=>Kt(p,"$gridViewSampleRenderingStore",a),l=()=>Kt(h,"$classifierSelectedSampleIds",a),[a,c]=sr(),{classifierSamples:f,classifierSelectedSampleIds:h,toggleClassifierSampleSelection:g}=Nh(),{gridViewSampleRenderingStore:p}=Yu(),v=E(()=>({dataset_id:t.dataset_id,mode:"classifier",classifierSamples:n()||void 0})),b=E(()=>Hx(d(v))),w=E(()=>d(b).samples),S=E(()=>i()&&i().data&&n()&&(n().positiveSampleIds.length>0||n().negativeSampleIds.length>0)?i().data.pages.flatMap(nt=>nt.data):[]);let x=ft(null),A=On(s()),T=ft(400);const D=160,R=160,L=6;se(()=>{if(d(x)){const nt=new ResizeObserver(z=>{for(const it of z)O(T,Math.max(it.contentRect.height,200),!0)});return nt.observe(d(x)),()=>nt.disconnect()}});function F(nt){g(nt)}var M=K(),U=N(M);{var q=nt=>{var z=wB();_(nt,z)},tt=nt=>{var z=K(),it=N(z);{var X=J=>{var rt=xB();_(J,rt)},j=J=>{var rt=K(),ht=N(rt);{var pt=lt=>{var yt=SB();_(lt,yt)},wt=lt=>{var yt=PB(),Ot=G(yt);{var Vt=At=>{{const qt=(kt,Wt)=>{let Lt=()=>Wt==null?void 0:Wt().index,Ie=()=>Wt==null?void 0:Wt().style;var _e=K(),Me=N(_e);Ri(Me,()=>i().dataUpdatedAt,Dt=>{var Ht=K(),Ae=N(Ht);{var Nt=ne=>{var Ut=CB();let he;Ut.__click=[bB,F],Ut.__dblclick=[_B,F],Ut.__keydown=[yB,F];var ae=G(Ut),te=G(ae);{let Xt=E(()=>l().has(d(S)[Lt()].sample_id));em(te,{onSelect:()=>{},get isSelected(){return d(Xt)}})}W(ae);var It=et(ae,2);Vx(It,{get sample(){return d(S)[Lt()]},get objectFit(){return A}}),W(Ut),Rt(Xt=>{he=Kn(Ut,1,"relative cursor-pointer svelte-1mo6ri0",null,he,Xt),Gn(Ut,Ie()),Pt(Ut,"data-sample-id",d(S)[Lt()].sample_id),Pt(Ut,"data-sample-name",d(S)[Lt()].file_name),Pt(Ut,"data-index",Lt()),Pt(Ut,"aria-label",`Select sample: ${d(S)[Lt()].file_name}`)},[()=>({"sample-selected":l().has(d(S)[Lt()].sample_id)})]),_(ne,Ut)};dt(Ae,ne=>{d(S)[Lt()]&&ne(Nt)})}_(Dt,Ht)}),_(kt,_e)};gv(At,{get itemCount(){return d(S).length},itemHeight:R+L,itemWidth:D+L,get height(){return d(T)},class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",style:"--sample-width: 160px; --sample-height: 160px;",overScan:5,item:qt,$$slots:{item:!0}})}},St=At=>{var qt=AB();_(At,qt)};dt(Ot,At=>{d(S).length>0?At(Vt):At(St,!1)})}W(yt),Rn(yt,At=>O(x,At),()=>d(x)),_(lt,yt)};dt(ht,lt=>{i().isSuccess&&d(S).length===0?lt(pt):lt(wt,!1)},!0)}_(J,rt)};dt(it,J=>{i().isError?J(X):J(j,!1)},!0)}_(nt,z)};dt(U,nt=>{i().isPending?nt(q):nt(tt,!1)})}_(e,M),at(),c()}ar(["click","dblclick","keydown"]);function kB(){const{clearClassifierSamples:e,clearClassifierSelectedSamples:t}=Nh(),{closeCreateClassifiersPanel:n}=Oh();e(),t(),n()}function TB(e){const{clearClassifierSelectedSamples:t}=Nh(),{clearSelectedSamples:n}=ii(),{closeRefineClassifiersPanel:i}=Rh(),s=Uo("refine_classifier_show_training_samples",!1);n(e),t(),s.set(!1),i()}async function EB(e,t,n,i,s,l,a){if(e.preventDefault(),!(!d(t)||d(n))){O(n,!0),O(i,null);try{await s({name:d(l),class_list:["positive","negative"],dataset_id:a}),O(l,"")}catch(c){O(i,c instanceof Error?c.message:String(c),!0)}finally{O(n,!1)}}}var IB=Z("<!> Create Classifier",1),OB=Z("<!> <!>",1),RB=Z('<button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="classifier-dialog-cancel">Cancel</button> <button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground ring-offset-background transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="classifier-dialog-submit"> </button>',1),NB=Z('<!> <div class="grid gap-4 py-4"><!> <div class="flex items-center gap-4"><!> <!></div></div> <div class="flex min-h-0 flex-1 flex-col border-t pt-4"><h3 class="mb-4 text-lg font-semibold">Select Positive Examples</h3> <div class="min-h-0 w-full flex-1 overflow-y-auto rounded-lg border dark:[color-scheme:dark]"><!></div></div> <!>',1),MB=Z("<!> <!>",1);function g7(e,t){st(t,!0);const n=()=>Kt(l,"$isCreateClassifiersPanelOpen",i),[i,s]=sr(),{isCreateClassifiersPanelOpen:l}=Oh(),{createClassifier:a}=nm();let c=ft(""),f=ri.params.dataset_id,h=ft(!1),g=ft(null);const p=E(()=>d(c).trim().length>0);function v(){O(c,""),kB(),O(g,null)}var b=K(),w=N(b);_t(w,()=>Va,(S,x)=>{x(S,{onOpenChange:A=>!A&&v(),get open(){return Ia(),n()},set open(A){Ea(l,A)},children:(A,T)=>{var D=K(),R=N(D);_t(R,()=>Ds,(L,F)=>{F(L,{children:(M,U)=>{var q=MB(),tt=N(q);_t(tt,()=>Ms,(z,it)=>{it(z,{})});var nt=et(tt,2);_t(nt,()=>za,(z,it)=>{it(z,{class:"h-[90vh] overflow-y-auto border-border bg-background dark:[color-scheme:dark] sm:max-h-[90vh] sm:max-w-[800px]",children:(X,j)=>{var J=NB(),rt=N(J);_t(rt,()=>Ba,(kt,Wt)=>{Wt(kt,{children:(Lt,Ie)=>{var _e=OB(),Me=N(_e);_t(Me,()=>Fa,(Ht,Ae)=>{Ae(Ht,{class:"flex items-center gap-2 text-foreground",children:(Nt,ne)=>{var Ut=IB(),he=N(Ut);yf(he,{class:"size-5"}),jt(),_(Nt,Ut)},$$slots:{default:!0}})});var Dt=et(Me,2);_t(Dt,()=>Ph,(Ht,Ae)=>{Ae(Ht,{class:"text-foreground",children:(Nt,ne)=>{jt();var Ut=oe(`Create a new few-shot classifier providing positive and negative examples.
513
+ Selected samples are considered positive examples and unselected samples are
514
+ considered negative examples.`);_(Nt,Ut)},$$slots:{default:!0}})}),_(Lt,_e)},$$slots:{default:!0}})});var ht=et(rt,2),pt=G(ht);{var wt=kt=>{hv(kt,{title:"Failed to create classifier",children:(Wt,Lt)=>{jt();var Ie=oe();Rt(()=>$t(Ie,d(g))),_(Wt,Ie)}})};dt(pt,kt=>{d(g)&&kt(wt)})}var lt=et(pt,2),yt=G(lt);Ai(yt,{for:"classifier-name",class:"whitespace-nowrap text-left text-foreground",children:(kt,Wt)=>{jt();var Lt=oe("Classifier Name");_(kt,Lt)},$$slots:{default:!0}});var Ot=et(yt,2);H9(Ot,{id:"classifier-name",type:"text",class:"flex-1",placeholder:"Enter classifier name",required:!0,"data-testid":"classifier-name-input",get value(){return d(c)},set value(kt){O(c,kt,!0)}}),W(lt),W(ht);var Vt=et(ht,2),St=et(G(Vt),2),At=G(St);Wx(At,{get dataset_id(){return f}}),W(St),W(Vt);var qt=et(Vt,2);_t(qt,()=>Vv,(kt,Wt)=>{Wt(kt,{class:"flex flex-nowrap gap-4",children:(Lt,Ie)=>{var _e=RB(),Me=N(_e);Me.__click=v;var Dt=et(Me,2);Dt.__click=[EB,p,h,g,a,c,f];var Ht=G(Dt,!0);W(Dt),Rt(()=>{Me.disabled=d(h),Dt.disabled=!d(p)||d(h),$t(Ht,d(h)?"Creating...":"Create Classifier")}),_(Lt,_e)},$$slots:{default:!0}})}),_(X,J)},$$slots:{default:!0}})}),_(M,q)},$$slots:{default:!0}})}),_(A,D)},$$slots:{default:!0}})}),_(e,b),at(),s()}ar(["click"]);var DB=Z("<!> ",1),LB=Z('You are refining classifier: <span class="font-medium"> </span>',1),FB=Z("<!> <!>",1),BB=(e,t)=>O(t,!d(t)),zB=Z(`<li>Once satisfied with the results, click "Save Classifier" to
515
+ save permanently.</li>`),VB=Z(`<ol class="mt-2 list-inside list-decimal space-y-2 text-sm text-muted-foreground"><li>Select positive examples from the samples below. Not selected
516
+ samples are considered negative examples.</li> <li>Click "Refine Classifier" to add your selections to the
517
+ classifier training data and retrain.</li> <!></ol>`),HB=Z('<button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="commit-temp-classifier-button"> </button>'),WB=Z('<div class="flex items-center gap-4"><!> <!></div> <div class="flex flex-nowrap gap-2"><!> <button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="refine-dialog-cancel"><!></button> <button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground ring-offset-background transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="refine-classifier-button"> </button></div>',1),UB=Z('<!> <div class="grid gap-4 py-4"><!> <div class="space-y-4"><div><button type="button" class="flex w-full items-center justify-between text-left"><h3 class="text-lg font-semibold">Refinement Instructions</h3> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></button> <!></div></div></div> <div class="flex min-h-0 flex-1 flex-col border-t pt-4"><h3 class="mb-4 text-lg font-semibold">Select Positive Examples</h3> <div class="min-h-0 w-full flex-1 overflow-y-auto rounded-lg border dark:[color-scheme:dark]"><!></div></div> <!>',1),GB=Z("<!> <!>",1);function p7(e,t){st(t,!0);const n=()=>Kt(b,"$currentClassifierId",f),i=()=>Kt(S,"$currentClassifierClasses",f),s=()=>Kt(w,"$currentClassifierName",f),l=()=>Kt(p,"$isRefineClassifiersPanelOpen",f),a=()=>Kt(v,"$currentMode",f),c=()=>Kt(g,"$showTrainingSamplesToggle",f),[f,h]=sr(),g=Uo("refine_classifier_show_training_samples",!1),{isRefineClassifiersPanelOpen:p,currentMode:v,currentClassifierId:b,currentClassifierName:w,currentClassifierClasses:S}=Rh(),{error:x,commitTempClassifier:A,refineClassifier:T,showClassifierTrainingSamples:D}=nm(),{openClassifiersMenu:R,switchToManageTab:L,scrollToAndSelectClassifier:F}=Qv();let M=ri.params.dataset_id,U=ft(!1),q=ft(!1),tt=ft(null);function nt(){g.set(!1),O(q,!1),TB(M)}async function z(){if(!d(U)){O(U,!0),O(tt,null);try{g.set(!1),await T(n()||"",M,i()||[])}catch(rt){O(tt,rt instanceof Error?rt.message:String(rt),!0)}finally{O(U,!1)}}}async function it(){if(!d(U)){O(U,!0),O(tt,null);try{g.set(!1),await A(n()||"",M),x?Or.success(`Classifier "${s()}" created successfully.`):Or.error("Failed to created classifier."),R(),L(),F(n()||""),nt()}catch(rt){O(tt,rt instanceof Error?rt.message:String(rt),!0)}finally{O(U,!1)}}}function X(rt){g.set(rt),D(n()||"",M,i()||[],rt)}var j=K(),J=N(j);_t(J,()=>Va,(rt,ht)=>{ht(rt,{onOpenChange:pt=>!pt&&nt(),get open(){return Ia(),l()},set open(pt){Ea(p,pt)},children:(pt,wt)=>{var lt=K(),yt=N(lt);_t(yt,()=>Ds,(Ot,Vt)=>{Vt(Ot,{children:(St,At)=>{var qt=GB(),kt=N(qt);_t(kt,()=>Ms,(Lt,Ie)=>{Ie(Lt,{})});var Wt=et(kt,2);_t(Wt,()=>za,(Lt,Ie)=>{Ie(Lt,{class:"h-[90vh] overflow-y-auto border-border bg-background dark:[color-scheme:dark] sm:max-h-[90vh] sm:max-w-[800px]",children:(_e,Me)=>{var Dt=UB(),Ht=N(Dt);_t(Ht,()=>Ba,(pe,fe)=>{fe(pe,{children:(on,De)=>{var Fe=FB(),Ge=N(Fe);_t(Ge,()=>Fa,(Pe,ln)=>{ln(Pe,{class:"flex items-center gap-2 text-foreground",children:(mn,Oe)=>{var Re=DB(),je=N(Re);yf(je,{class:"size-5"});var un=et(je);Rt(()=>$t(un,` ${a()==="temp"?"Refine Temporary Classifier":"Refine Classifier"}`)),_(mn,Re)},$$slots:{default:!0}})});var Ne=et(Ge,2);_t(Ne,()=>Ph,(Pe,ln)=>{ln(Pe,{class:"py-4 text-foreground",children:(mn,Oe)=>{jt();var Re=LB(),je=et(N(Re)),un=G(je,!0);W(je),Rt(()=>$t(un,s())),_(mn,Re)},$$slots:{default:!0}})}),_(on,Fe)},$$slots:{default:!0}})});var Ae=et(Ht,2),Nt=G(Ae);{var ne=pe=>{hv(pe,{title:"Operation failed",children:(fe,on)=>{jt();var De=oe();Rt(()=>$t(De,d(tt))),_(fe,De)}})};dt(Nt,pe=>{d(tt)&&pe(ne)})}var Ut=et(Nt,2),he=G(Ut),ae=G(he);ae.__click=[BB,q];var te=et(G(ae),2);W(ae);var It=et(ae,2);{var Xt=pe=>{var fe=VB(),on=et(G(fe),4);{var De=Fe=>{var Ge=zB();_(Fe,Ge)};dt(on,Fe=>{a()==="temp"&&Fe(De)})}W(fe),_(pe,fe)};dt(It,pe=>{d(q)&&pe(Xt)})}W(he),W(Ut),W(Ae);var ge=et(Ae,2),an=et(G(ge),2),vn=G(an);Wx(vn,{get dataset_id(){return M}}),W(an),W(ge);var rn=et(ge,2);_t(rn,()=>Vv,(pe,fe)=>{fe(pe,{class:"flex flex-nowrap gap-4",children:(on,De)=>{var Fe=WB(),Ge=N(Fe),Ne=G(Ge);Ai(Ne,{class:"text-foreground",children:(Bt,Be)=>{jt();var bn=oe("Show All Training Samples");_(Bt,bn)},$$slots:{default:!0}});var Pe=et(Ne,2);nv(Pe,{get checked(){return c()},onCheckedChange:X,class:""}),W(Ge);var ln=et(Ge,2),mn=G(ln);{var Oe=Bt=>{var Be=HB();Be.__click=it;var bn=G(Be,!0);W(Be),Rt(()=>{Be.disabled=d(U),$t(bn,d(U)?"Committing...":"Save Classifier")}),_(Bt,Be)};dt(mn,Bt=>{a()==="temp"&&Bt(Oe)})}var Re=et(mn,2);Re.__click=nt;var je=G(Re);{var un=Bt=>{var Be=oe("Cancel");_(Bt,Be)},Bn=Bt=>{var Be=oe("Done");_(Bt,Be)};dt(je,Bt=>{a()==="temp"?Bt(un):Bt(Bn,!1)})}W(Re);var Gt=et(Re,2);Gt.__click=z;var re=G(Gt,!0);W(Gt),W(ln),Rt(()=>{Re.disabled=d(U),Gt.disabled=d(U),$t(re,d(U)?"Refining...":"Refine Classifier")}),_(on,Fe)},$$slots:{default:!0}})}),Rt(()=>Kn(te,0,`size-5 transition-transform ${d(q)?"rotate-180":""}`)),_(_e,Dt)},$$slots:{default:!0}})}),_(St,qt)},$$slots:{default:!0}})}),_(pt,lt)},$$slots:{default:!0}})}),_(e,j),at(),h()}ar(["click"]);function rm(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ux(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function ed(){}var Ua=.7,Of=1/Ua,ps="\\s*([+-]?\\d+)\\s*",Ga="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KB=/^#([0-9a-f]{3,8})$/,qB=new RegExp(`^rgb\\(${ps},${ps},${ps}\\)$`),YB=new RegExp(`^rgb\\(${ni},${ni},${ni}\\)$`),XB=new RegExp(`^rgba\\(${ps},${ps},${ps},${Ga}\\)$`),jB=new RegExp(`^rgba\\(${ni},${ni},${ni},${Ga}\\)$`),ZB=new RegExp(`^hsl\\(${Ga},${ni},${ni}\\)$`),QB=new RegExp(`^hsla\\(${Ga},${ni},${ni},${Ga}\\)$`),K0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};rm(ed,Ka,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:q0,formatHex:q0,formatHex8:JB,formatHsl:$B,formatRgb:Y0,toString:Y0});function q0(){return this.rgb().formatHex()}function JB(){return this.rgb().formatHex8()}function $B(){return Gx(this).formatHsl()}function Y0(){return this.rgb().formatRgb()}function Ka(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=KB.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?X0(t):n===3?new or(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ef(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ef(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qB.exec(e))?new or(t[1],t[2],t[3],1):(t=YB.exec(e))?new or(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XB.exec(e))?ef(t[1],t[2],t[3],t[4]):(t=jB.exec(e))?ef(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ZB.exec(e))?Q0(t[1],t[2]/100,t[3]/100,1):(t=QB.exec(e))?Q0(t[1],t[2]/100,t[3]/100,t[4]):K0.hasOwnProperty(e)?X0(K0[e]):e==="transparent"?new or(NaN,NaN,NaN,0):null}function X0(e){return new or(e>>16&255,e>>8&255,e&255,1)}function ef(e,t,n,i){return i<=0&&(e=t=n=NaN),new or(e,t,n,i)}function tz(e){return e instanceof ed||(e=Ka(e)),e?(e=e.rgb(),new or(e.r,e.g,e.b,e.opacity)):new or}function rv(e,t,n,i){return arguments.length===1?tz(e):new or(e,t,n,i??1)}function or(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}rm(or,rv,Ux(ed,{brighter(e){return e=e==null?Of:Math.pow(Of,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ua:Math.pow(Ua,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new or(Bo(this.r),Bo(this.g),Bo(this.b),Rf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:j0,formatHex:j0,formatHex8:ez,formatRgb:Z0,toString:Z0}));function j0(){return`#${Ro(this.r)}${Ro(this.g)}${Ro(this.b)}`}function ez(){return`#${Ro(this.r)}${Ro(this.g)}${Ro(this.b)}${Ro((isNaN(this.opacity)?1:this.opacity)*255)}`}function Z0(){const e=Rf(this.opacity);return`${e===1?"rgb(":"rgba("}${Bo(this.r)}, ${Bo(this.g)}, ${Bo(this.b)}${e===1?")":`, ${e})`}`}function Rf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Bo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ro(e){return e=Bo(e),(e<16?"0":"")+e.toString(16)}function Q0(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Br(e,t,n,i)}function Gx(e){if(e instanceof Br)return new Br(e.h,e.s,e.l,e.opacity);if(e instanceof ed||(e=Ka(e)),!e)return new Br;if(e instanceof Br)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),l=Math.max(t,n,i),a=NaN,c=l-s,f=(l+s)/2;return c?(t===l?a=(n-i)/c+(n<i)*6:n===l?a=(i-t)/c+2:a=(t-n)/c+4,c/=f<.5?l+s:2-l-s,a*=60):c=f>0&&f<1?0:a,new Br(a,c,f,e.opacity)}function nz(e,t,n,i){return arguments.length===1?Gx(e):new Br(e,t,n,i??1)}function Br(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}rm(Br,nz,Ux(ed,{brighter(e){return e=e==null?Of:Math.pow(Of,e),new Br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ua:Math.pow(Ua,e),new Br(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,s=2*n-i;return new or(wp(e>=240?e-240:e+120,s,i),wp(e,s,i),wp(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Br(J0(this.h),nf(this.s),nf(this.l),Rf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rf(this.opacity);return`${e===1?"hsl(":"hsla("}${J0(this.h)}, ${nf(this.s)*100}%, ${nf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function J0(e){return e=(e||0)%360,e<0?e+360:e}function nf(e){return Math.max(0,Math.min(1,e||0))}function wp(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Kx=e=>()=>e;function rz(e,t){return function(n){return e+n*t}}function iz(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function oz(e){return(e=+e)==1?qx:function(t,n){return n-t?iz(t,n,e):Kx(isNaN(t)?n:t)}}function qx(e,t){var n=t-e;return n?rz(e,n):Kx(isNaN(e)?t:e)}const $0=function e(t){var n=oz(t);function i(s,l){var a=n((s=rv(s)).r,(l=rv(l)).r),c=n(s.g,l.g),f=n(s.b,l.b),h=qx(s.opacity,l.opacity);return function(g){return s.r=a(g),s.g=c(g),s.b=f(g),s.opacity=h(g),s+""}}return i.gamma=e,i}(1);function io(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var iv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xp=new RegExp(iv.source,"g");function sz(e){return function(){return e}}function az(e){return function(t){return e(t)+""}}function lz(e,t){var n=iv.lastIndex=xp.lastIndex=0,i,s,l,a=-1,c=[],f=[];for(e=e+"",t=t+"";(i=iv.exec(e))&&(s=xp.exec(t));)(l=s.index)>n&&(l=t.slice(n,l),c[a]?c[a]+=l:c[++a]=l),(i=i[0])===(s=s[0])?c[a]?c[a]+=s:c[++a]=s:(c[++a]=null,f.push({i:a,x:io(i,s)})),n=xp.lastIndex;return n<t.length&&(l=t.slice(n),c[a]?c[a]+=l:c[++a]=l),c.length<2?f[0]?az(f[0].x):sz(t):(t=f.length,function(h){for(var g=0,p;g<t;++g)c[(p=f[g]).i]=p.x(h);return c.join("")})}var ty=180/Math.PI,ov={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yx(e,t,n,i,s,l){var a,c,f;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(f=e*n+t*i)&&(n-=e*f,i-=t*f),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,f/=c),e*i<t*n&&(e=-e,t=-t,f=-f,a=-a),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*ty,skewX:Math.atan(f)*ty,scaleX:a,scaleY:c}}var rf;function cz(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ov:Yx(t.a,t.b,t.c,t.d,t.e,t.f)}function uz(e){return e==null||(rf||(rf=document.createElementNS("http://www.w3.org/2000/svg","g")),rf.setAttribute("transform",e),!(e=rf.transform.baseVal.consolidate()))?ov:(e=e.matrix,Yx(e.a,e.b,e.c,e.d,e.e,e.f))}function Xx(e,t,n,i){function s(h){return h.length?h.pop()+" ":""}function l(h,g,p,v,b,w){if(h!==p||g!==v){var S=b.push("translate(",null,t,null,n);w.push({i:S-4,x:io(h,p)},{i:S-2,x:io(g,v)})}else(p||v)&&b.push("translate("+p+t+v+n)}function a(h,g,p,v){h!==g?(h-g>180?g+=360:g-h>180&&(h+=360),v.push({i:p.push(s(p)+"rotate(",null,i)-2,x:io(h,g)})):g&&p.push(s(p)+"rotate("+g+i)}function c(h,g,p,v){h!==g?v.push({i:p.push(s(p)+"skewX(",null,i)-2,x:io(h,g)}):g&&p.push(s(p)+"skewX("+g+i)}function f(h,g,p,v,b,w){if(h!==p||g!==v){var S=b.push(s(b)+"scale(",null,",",null,")");w.push({i:S-4,x:io(h,p)},{i:S-2,x:io(g,v)})}else(p!==1||v!==1)&&b.push(s(b)+"scale("+p+","+v+")")}return function(h,g){var p=[],v=[];return h=e(h),g=e(g),l(h.translateX,h.translateY,g.translateX,g.translateY,p,v),a(h.rotate,g.rotate,p,v),c(h.skewX,g.skewX,p,v),f(h.scaleX,h.scaleY,g.scaleX,g.scaleY,p,v),h=g=null,function(b){for(var w=-1,S=v.length,x;++w<S;)p[(x=v[w]).i]=x.x(b);return p.join("")}}}var dz=Xx(cz,"px, ","px)","deg)"),fz=Xx(uz,", ",")",")"),Bs=0,ka=0,wa=0,jx=1e3,Nf,Ta,Mf=0,Ho=0,Mh=0,qa=typeof performance=="object"&&performance.now?performance:Date,Zx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function im(){return Ho||(Zx(hz),Ho=qa.now()+Mh)}function hz(){Ho=0}function Df(){this._call=this._time=this._next=null}Df.prototype=Qx.prototype={constructor:Df,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?im():+n)+(t==null?0:+t),!this._next&&Ta!==this&&(Ta?Ta._next=this:Nf=this,Ta=this),this._call=e,this._time=n,sv()},stop:function(){this._call&&(this._call=null,this._time=1/0,sv())}};function Qx(e,t,n){var i=new Df;return i.restart(e,t,n),i}function gz(){im(),++Bs;for(var e=Nf,t;e;)(t=Ho-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Bs}function ey(){Ho=(Mf=qa.now())+Mh,Bs=ka=0;try{gz()}finally{Bs=0,vz(),Ho=0}}function pz(){var e=qa.now(),t=e-Mf;t>jx&&(Mh-=t,Mf=e)}function vz(){for(var e,t=Nf,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Nf=n);Ta=e,sv(i)}function sv(e){if(!Bs){ka&&(ka=clearTimeout(ka));var t=e-Ho;t>24?(e<1/0&&(ka=setTimeout(ey,e-qa.now()-Mh)),wa&&(wa=clearInterval(wa))):(wa||(Mf=qa.now(),wa=setInterval(pz,jx)),Bs=1,Zx(ey))}}function ny(e,t,n){var i=new Df;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var mz=tm("start","end","cancel","interrupt"),bz=[],Jx=0,ry=1,av=2,mf=3,iy=4,lv=5,bf=6;function Dh(e,t,n,i,s,l){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;_z(e,n,{name:t,index:i,group:s,on:mz,tween:bz,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Jx})}function om(e,t){var n=Kr(e,t);if(n.state>Jx)throw new Error("too late; already scheduled");return n}function li(e,t){var n=Kr(e,t);if(n.state>mf)throw new Error("too late; already running");return n}function Kr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _z(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=Qx(l,0,n.time);function l(h){n.state=ry,n.timer.restart(a,n.delay,n.time),n.delay<=h&&a(h-n.delay)}function a(h){var g,p,v,b;if(n.state!==ry)return f();for(g in i)if(b=i[g],b.name===n.name){if(b.state===mf)return ny(a);b.state===iy?(b.state=bf,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete i[g]):+g<t&&(b.state=bf,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete i[g])}if(ny(function(){n.state===mf&&(n.state=iy,n.timer.restart(c,n.delay,n.time),c(h))}),n.state=av,n.on.call("start",e,e.__data__,n.index,n.group),n.state===av){for(n.state=mf,s=new Array(v=n.tween.length),g=0,p=-1;g<v;++g)(b=n.tween[g].value.call(e,e.__data__,n.index,n.group))&&(s[++p]=b);s.length=p+1}}function c(h){for(var g=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(f),n.state=lv,1),p=-1,v=s.length;++p<v;)s[p].call(e,g);n.state===lv&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=bf,n.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function yz(e,t){var n=e.__transition,i,s,l=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){l=!1;continue}s=i.state>av&&i.state<lv,i.state=bf,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}l&&delete e.__transition}}function wz(e){return this.each(function(){yz(this,e)})}function xz(e,t){var n,i;return function(){var s=li(this,e),l=s.tween;if(l!==n){i=n=l;for(var a=0,c=i.length;a<c;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function Sz(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var l=li(this,e),a=l.tween;if(a!==i){s=(i=a).slice();for(var c={name:t,value:n},f=0,h=s.length;f<h;++f)if(s[f].name===t){s[f]=c;break}f===h&&s.push(c)}l.tween=s}}function Cz(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=Kr(this.node(),n).tween,s=0,l=i.length,a;s<l;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?xz:Sz)(n,e,t))}function sm(e,t,n){var i=e._id;return e.each(function(){var s=li(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return Kr(s,i).value[t]}}function $x(e,t){var n;return(typeof t=="number"?io:t instanceof Ka?$0:(n=Ka(t))?(t=n,$0):lz)(e,t)}function Az(e){return function(){this.removeAttribute(e)}}function Pz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kz(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttribute(e);return a===s?null:a===i?l:l=t(i=a,n)}}function Tz(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?l:l=t(i=a,n)}}function Ez(e,t,n){var i,s,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),f=c+"",a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c)))}}function Iz(e,t,n){var i,s,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),f=c+"",a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c)))}}function Oz(e,t){var n=Ih(e),i=n==="transform"?fz:$x;return this.attrTween(e,typeof t=="function"?(n.local?Iz:Ez)(n,i,sm(this,"attr."+e,t)):t==null?(n.local?Pz:Az)(n):(n.local?Tz:kz)(n,i,t))}function Rz(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Nz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Mz(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&Nz(e,l)),n}return s._value=t,s}function Dz(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&Rz(e,l)),n}return s._value=t,s}function Lz(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=Ih(e);return this.tween(n,(i.local?Mz:Dz)(i,t))}function Fz(e,t){return function(){om(this,e).delay=+t.apply(this,arguments)}}function Bz(e,t){return t=+t,function(){om(this,e).delay=t}}function zz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fz:Bz)(t,e)):Kr(this.node(),t).delay}function Vz(e,t){return function(){li(this,e).duration=+t.apply(this,arguments)}}function Hz(e,t){return t=+t,function(){li(this,e).duration=t}}function Wz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Vz:Hz)(t,e)):Kr(this.node(),t).duration}function Uz(e,t){if(typeof t!="function")throw new Error;return function(){li(this,e).ease=t}}function Gz(e){var t=this._id;return arguments.length?this.each(Uz(t,e)):Kr(this.node(),t).ease}function Kz(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;li(this,e).ease=n}}function qz(e){if(typeof e!="function")throw new Error;return this.each(Kz(this._id,e))}function Yz(e){typeof e!="function"&&(e=Tx(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],f,h=0;h<a;++h)(f=l[h])&&e.call(f,f.__data__,h,l)&&c.push(f);return new zi(i,this._parents,this._name,this._id)}function Xz(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,s=n.length,l=Math.min(i,s),a=new Array(i),c=0;c<l;++c)for(var f=t[c],h=n[c],g=f.length,p=a[c]=new Array(g),v,b=0;b<g;++b)(v=f[b]||h[b])&&(p[b]=v);for(;c<i;++c)a[c]=t[c];return new zi(a,this._parents,this._name,this._id)}function jz(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Zz(e,t,n){var i,s,l=jz(t)?om:li;return function(){var a=l(this,e),c=a.on;c!==i&&(s=(i=c).copy()).on(t,n),a.on=s}}function Qz(e,t){var n=this._id;return arguments.length<2?Kr(this.node(),n).on.on(e):this.each(Zz(n,e,t))}function Jz(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function $z(){return this.on("end.remove",Jz(this._id))}function tV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Jv(e));for(var i=this._groups,s=i.length,l=new Array(s),a=0;a<s;++a)for(var c=i[a],f=c.length,h=l[a]=new Array(f),g,p,v=0;v<f;++v)(g=c[v])&&(p=e.call(g,g.__data__,v,c))&&("__data__"in g&&(p.__data__=g.__data__),h[v]=p,Dh(h[v],t,n,v,h,Kr(g,n)));return new zi(l,this._parents,t,n)}function eV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=kx(e));for(var i=this._groups,s=i.length,l=[],a=[],c=0;c<s;++c)for(var f=i[c],h=f.length,g,p=0;p<h;++p)if(g=f[p]){for(var v=e.call(g,g.__data__,p,f),b,w=Kr(g,n),S=0,x=v.length;S<x;++S)(b=v[S])&&Dh(b,t,n,S,v,w);l.push(v),a.push(g)}return new zi(l,a,t,n)}var nV=td.prototype.constructor;function rV(){return new nV(this._groups,this._parents)}function iV(e,t){var n,i,s;return function(){var l=Fs(this,e),a=(this.style.removeProperty(e),Fs(this,e));return l===a?null:l===n&&a===i?s:s=t(n=l,i=a)}}function t1(e){return function(){this.style.removeProperty(e)}}function oV(e,t,n){var i,s=n+"",l;return function(){var a=Fs(this,e);return a===s?null:a===i?l:l=t(i=a,n)}}function sV(e,t,n){var i,s,l;return function(){var a=Fs(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Fs(this,e))),a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c))}}function aV(e,t){var n,i,s,l="style."+t,a="end."+l,c;return function(){var f=li(this,e),h=f.on,g=f.value[l]==null?c||(c=t1(t)):void 0;(h!==n||s!==g)&&(i=(n=h).copy()).on(a,s=g),f.on=i}}function lV(e,t,n){var i=(e+="")=="transform"?dz:$x;return t==null?this.styleTween(e,iV(e,i)).on("end.style."+e,t1(e)):typeof t=="function"?this.styleTween(e,sV(e,i,sm(this,"style."+e,t))).each(aV(this._id,e)):this.styleTween(e,oV(e,i,t),n).on("end.style."+e,null)}function cV(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function uV(e,t,n){var i,s;function l(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&cV(e,a,n)),i}return l._value=t,l}function dV(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,uV(e,t,n??""))}function fV(e){return function(){this.textContent=e}}function hV(e){return function(){var t=e(this);this.textContent=t??""}}function gV(e){return this.tween("text",typeof e=="function"?hV(sm(this,"text",e)):fV(e==null?"":e+""))}function pV(e){return function(t){this.textContent=e.call(this,t)}}function vV(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&pV(s)),t}return i._value=e,i}function mV(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,vV(e))}function bV(){for(var e=this._name,t=this._id,n=e1(),i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,f,h=0;h<c;++h)if(f=a[h]){var g=Kr(f,t);Dh(f,e,n,h,a,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new zi(i,this._parents,e,n)}function _V(){var e,t,n=this,i=n._id,s=n.size();return new Promise(function(l,a){var c={value:a},f={value:function(){--s===0&&l()}};n.each(function(){var h=li(this,i),g=h.on;g!==e&&(t=(e=g).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),h.on=t}),s===0&&l()})}var yV=0;function zi(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function e1(){return++yV}var Si=td.prototype;zi.prototype={constructor:zi,select:tV,selectAll:eV,selectChild:Si.selectChild,selectChildren:Si.selectChildren,filter:Yz,merge:Xz,selection:rV,transition:bV,call:Si.call,nodes:Si.nodes,node:Si.node,size:Si.size,empty:Si.empty,each:Si.each,on:Qz,attr:Oz,attrTween:Lz,style:lV,styleTween:dV,text:gV,textTween:mV,remove:$z,tween:Cz,delay:zz,duration:Wz,ease:Gz,easeVarying:qz,end:_V,[Symbol.iterator]:Si[Symbol.iterator]};function wV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var xV={time:null,delay:0,duration:250,ease:wV};function SV(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function CV(e){var t,n;e instanceof zi?(t=e._id,e=e._name):(t=e1(),(n=xV).time=im(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,f,h=0;h<c;++h)(f=a[h])&&Dh(f,e,t,h,a,n||SV(f,t));return new zi(i,this._parents,e,t)}td.prototype.interrupt=wz;td.prototype.transition=CV;function ls(e,t,n){this.k=e,this.x=t,this.y=n}ls.prototype={constructor:ls,scale:function(e){return e===1?this:new ls(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ls(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var v7=new ls(1,0,0);ls.prototype;export{tm as $,t7 as A,In as B,vx as C,Gv as D,V8 as E,Uv as F,gv as G,Kv as H,pn as I,qv as J,Tf as K,Ax as L,R8 as M,c7 as N,T8 as O,n7 as P,Fo as Q,Bx as R,kL as S,h8 as T,oo as U,u7 as V,wE as W,wr as X,Fx as Y,CF as Z,N0 as _,d7 as a,v7 as a0,ls as a1,F0 as a2,yz as a3,r8 as a4,i8 as a5,vh as a6,hx as a7,e7 as a8,Jp as a9,a7 as aA,KD as aB,gh as aC,PE as aD,Sx as aE,Ai as aF,l7 as aG,Wv as aH,H9 as aI,Vv as aJ,hv as aK,C0 as aL,IE as aM,oF as aN,sF as aO,f7 as aP,h7 as aQ,fF as aR,d9 as aS,hI as aT,Fn as aU,Se as aV,Ay as aW,TE as aX,g7 as aY,p7 as aZ,L8 as aa,GD as ab,UD as ac,$L as ad,Ds as ae,Ms as af,za as ag,Ba as ah,Fa as ai,Ph as aj,ZL as ak,jL as al,R0 as am,O0 as an,xx as ao,wx as ap,yx as aq,XL as ar,WL as as,$p as at,iF as au,Oy as av,s7 as aw,fv as ax,r7 as ay,Va as az,Ls as b,Ey as c,p8 as d,ue as e,MI as f,$V as g,JV as h,de as i,H as j,ce as k,o7 as l,ee as m,mx as n,Q8 as o,QV as p,Oa as q,LE as r,DE as s,Ty as t,gx as u,Vx as v,Y8 as w,My as x,i7 as y,em as z};