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 @@
1
+ import{d as c,b as u}from"./VYb2dkNs.js";import{i as r}from"./DkbXUtyG.js";import{c as i}from"./CGY1p9L4.js";import"./CvGjimpO.js";const b=()=>{const t=i(c());return t.subscribe(()=>{}),{deleteCaption:o=>new Promise((a,n)=>{r(t).mutate({path:{sample_id:o}},{onSuccess:()=>{a()},onError:e=>{n(e)}})})}},l=()=>{const t=i(u());return t.subscribe(()=>{}),{createCaption:o=>new Promise((a,n)=>{r(t).mutate({body:o},{onSuccess:e=>{a(e)},onError:e=>{n(e)}})})}};export{l as a,b as u};
@@ -0,0 +1 @@
1
+ const d="5";var e;typeof window<"u"&&((e=window.__svelte??(window.__svelte={})).v??(e.v=new Set)).add(d);
@@ -0,0 +1 @@
1
+ class i{constructor(t,s){this.status=t,typeof s=="string"?this.body={message:s}:s?this.body=s:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class o{constructor(t,s){this.status=t,this.location=s}}class a extends Error{constructor(t,s,e){super(e),this.status=t,this.text=s}}export{i as H,o as R,a as S};
@@ -0,0 +1 @@
1
+ import{V as m,a2 as o,a3 as N,O as v,a4 as p,a5 as x,D as u,F as a,P as h,a6 as C,T as M,a7 as w}from"./DkbXUtyG.js";function T(e){var r=document.createElement("template");return r.innerHTML=e.replaceAll("<!>","<!---->"),r.content}function s(e,r){var t=v;t.nodes_start===null&&(t.nodes_start=e,t.nodes_end=r)}function O(e,r){var t=(r&p)!==0,_=(r&x)!==0,i,c=!e.startsWith("<!>");return()=>{if(u)return s(a,null),a;i===void 0&&(i=T(c?e:"<!>"+e),t||(i=o(i)));var n=_||N?document.importNode(i,!0):i.cloneNode(!0);if(t){var l=o(n),d=n.lastChild;s(l,d)}else s(n,n);return n}}function y(e,r,t="svg"){var _=!e.startsWith("<!>"),i=(r&p)!==0,c=`<${t}>${_?e:"<!>"+e}</${t}>`,n;return()=>{if(u)return s(a,null),a;if(!n){var l=T(c),d=o(l);if(i)for(n=document.createDocumentFragment();o(d);)n.appendChild(o(d));else n=o(d)}var f=n.cloneNode(!0);if(i){var g=o(f),E=f.lastChild;s(g,E)}else s(f,f);return f}}function $(e,r){return y(e,r,"svg")}function b(e=""){if(!u){var r=m(e+"");return s(r,r),r}var t=a;return t.nodeType!==C&&(t.before(t=m()),M(t)),s(t,t),t}function A(){if(u)return s(a,null),a;var e=document.createDocumentFragment(),r=document.createComment(""),t=m();return e.append(r,t),s(r,t),e}function F(e,r){if(u){v.nodes_end=a,h();return}e!==null&&e.before(r)}function P(){var e,r;if(u&&a&&a.nodeType===w&&((e=a.textContent)!=null&&e.startsWith("$"))){const t=a.textContent.substring(1);return h(),t}return(r=window.__svelte??(window.__svelte={})).uid??(r.uid=1),`c${window.__svelte.uid++}`}export{F as a,$ as b,A as c,s as d,O as f,P as p,b as t};
@@ -0,0 +1 @@
1
+ var _=Object.defineProperty;var E=(s,t,e)=>t in s?_(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var w=(s,t,e)=>E(s,typeof t!="symbol"?t+"":t,e);const T={bodySerializer:s=>JSON.stringify(s,(t,e)=>typeof e=="bigint"?e.toString():e)},U=async(s,t)=>{const e=typeof t=="function"?await t(s):t;if(e)return s.scheme==="bearer"?`Bearer ${e}`:s.scheme==="basic"?`Basic ${btoa(e)}`:e},P=s=>{switch(s){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},W=s=>{switch(s){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},k=s=>{switch(s){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:s,explode:t,name:e,style:a,value:o})=>{if(!t){const r=(s?o:o.map(c=>encodeURIComponent(c))).join(W(a));switch(a){case"label":return`.${r}`;case"matrix":return`;${e}=${r}`;case"simple":return r;default:return`${e}=${r}`}}const i=P(a),n=o.map(r=>a==="label"||a==="simple"?s?r:encodeURIComponent(r):y({allowReserved:s,name:e,value:r})).join(i);return a==="label"||a==="matrix"?i+n:n},y=({allowReserved:s,name:t,value:e})=>{if(e==null)return"";if(typeof e=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${s?e:encodeURIComponent(e)}`},O=({allowReserved:s,explode:t,name:e,style:a,value:o,valueOnly:i})=>{if(o instanceof Date)return i?o.toISOString():`${e}=${o.toISOString()}`;if(a!=="deepObject"&&!t){let c=[];Object.entries(o).forEach(([d,b])=>{c=[...c,d,s?b:encodeURIComponent(b)]});const l=c.join(",");switch(a){case"form":return`${e}=${l}`;case"label":return`.${l}`;case"matrix":return`;${e}=${l}`;default:return l}}const n=k(a),r=Object.entries(o).map(([c,l])=>y({allowReserved:s,name:a==="deepObject"?`${e}[${c}]`:c,value:l})).join(n);return a==="label"||a==="matrix"?n+r:r},V=/\{[^{}]+\}/g,D=({path:s,url:t})=>{let e=t;const a=t.match(V);if(a)for(const o of a){let i=!1,n=o.substring(1,o.length-1),r="simple";n.endsWith("*")&&(i=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(n=n.substring(1),r="label"):n.startsWith(";")&&(n=n.substring(1),r="matrix");const c=s[n];if(c==null)continue;if(Array.isArray(c)){e=e.replace(o,z({explode:i,name:n,style:r,value:c}));continue}if(typeof c=="object"){e=e.replace(o,O({explode:i,name:n,style:r,value:c,valueOnly:!0}));continue}if(r==="matrix"){e=e.replace(o,`;${y({name:n,value:c})}`);continue}const l=encodeURIComponent(r==="label"?`.${c}`:c);e=e.replace(o,l)}return e},C=({allowReserved:s,array:t,object:e}={})=>o=>{const i=[];if(o&&typeof o=="object")for(const n in o){const r=o[n];if(r!=null)if(Array.isArray(r)){const c=z({allowReserved:s,explode:!0,name:n,style:"form",value:r,...t});c&&i.push(c)}else if(typeof r=="object"){const c=O({allowReserved:s,explode:!0,name:n,style:"deepObject",value:r,...e});c&&i.push(c)}else{const c=y({allowReserved:s,name:n,value:r});c&&i.push(c)}}return i.join("&")},H=s=>{var e;if(!s)return"stream";const t=(e=s.split(";")[0])==null?void 0:e.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(a=>t.startsWith(a)))return"blob";if(t.startsWith("text/"))return"text"}},N=async({security:s,...t})=>{for(const e of s){const a=await U(e,t.auth);if(!a)continue;const o=e.name??"Authorization";switch(e.in){case"query":t.query||(t.query={}),t.query[o]=a;break;case"cookie":t.headers.append("Cookie",`${o}=${a}`);break;case"header":default:t.headers.set(o,a);break}return}},A=s=>R({baseUrl:s.baseUrl,path:s.path,query:s.query,querySerializer:typeof s.querySerializer=="function"?s.querySerializer:C(s.querySerializer),url:s.url}),R=({baseUrl:s,path:t,query:e,querySerializer:a,url:o})=>{const i=o.startsWith("/")?o:`/${o}`;let n=(s??"")+i;t&&(n=D({path:t,url:n}));let r=e?a(e):"";return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n},$=(s,t)=>{var a;const e={...s,...t};return(a=e.baseUrl)!=null&&a.endsWith("/")&&(e.baseUrl=e.baseUrl.substring(0,e.baseUrl.length-1)),e.headers=q(s.headers,t.headers),e},q=(...s)=>{const t=new Headers;for(const e of s){if(!e||typeof e!="object")continue;const a=e instanceof Headers?e.entries():Object.entries(e);for(const[o,i]of a)if(i===null)t.delete(o);else if(Array.isArray(i))for(const n of i)t.append(o,n);else i!==void 0&&t.set(o,typeof i=="object"?JSON.stringify(i):i)}return t};class g{constructor(){w(this,"_fns");this._fns=[]}clear(){this._fns=[]}getInterceptorIndex(t){return typeof t=="number"?this._fns[t]?t:-1:this._fns.indexOf(t)}exists(t){const e=this.getInterceptorIndex(t);return!!this._fns[e]}eject(t){const e=this.getInterceptorIndex(t);this._fns[e]&&(this._fns[e]=null)}update(t,e){const a=this.getInterceptorIndex(t);return this._fns[a]?(this._fns[a]=e,t):!1}use(t){return this._fns=[...this._fns,t],this._fns.length-1}}const B=()=>({error:new g,request:new g,response:new g}),J=C({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),L={"Content-Type":"application/json"},I=(s={})=>({...T,headers:L,parseAs:"auto",querySerializer:J,...s}),Q=(s={})=>{let t=$(I(),s);const e=()=>({...t}),a=n=>(t=$(t,n),e()),o=B(),i=async n=>{const r={...t,...n,fetch:n.fetch??t.fetch??globalThis.fetch,headers:q(t.headers,n.headers)};r.security&&await N({...r,security:r.security}),r.requestValidator&&await r.requestValidator(r),r.body&&r.bodySerializer&&(r.body=r.bodySerializer(r.body)),(r.body===void 0||r.body==="")&&r.headers.delete("Content-Type");const c=A(r),l={redirect:"follow",...r};let d=new Request(c,l);for(const u of o.request._fns)u&&(d=await u(d,r));const b=r.fetch;let f=await b(d);for(const u of o.response._fns)u&&(f=await u(f,d,r));const m={request:d,response:f};if(f.ok){if(f.status===204||f.headers.get("Content-Length")==="0")return r.responseStyle==="data"?{}:{data:{},...m};const u=(r.parseAs==="auto"?H(f.headers.get("Content-Type")):r.parseAs)??"json";let h;switch(u){case"arrayBuffer":case"blob":case"formData":case"json":case"text":h=await f[u]();break;case"stream":return r.responseStyle==="data"?f.body:{data:f.body,...m}}return u==="json"&&(r.responseValidator&&await r.responseValidator(h),r.responseTransformer&&(h=await r.responseTransformer(h))),r.responseStyle==="data"?h:{data:h,...m}}const j=await f.text();let x;try{x=JSON.parse(j)}catch{}const S=x??j;let p=S;for(const u of o.error._fns)u&&(p=await u(S,f,d,r));if(p=p||{},r.throwOnError)throw p;return r.responseStyle==="data"?void 0:{error:p,...m}};return{buildUrl:A,connect:n=>i({...n,method:"CONNECT"}),delete:n=>i({...n,method:"DELETE"}),get:n=>i({...n,method:"GET"}),getConfig:e,head:n=>i({...n,method:"HEAD"}),interceptors:o,options:n=>i({...n,method:"OPTIONS"}),patch:n=>i({...n,method:"PATCH"}),post:n=>i({...n,method:"POST"}),put:n=>i({...n,method:"PUT"}),request:i,setConfig:a,trace:n=>i({...n,method:"TRACE"})}},M=Q(I());export{M as c};
@@ -0,0 +1,39 @@
1
+ import"./CWj6FrbW.js";import{p as c,a as m,f as $,j as _,c as G,s as f,g,b as v,r as P}from"./DkbXUtyG.js";import{c as S,a as p,f as j}from"./CmLg0ys7.js";import{s as w,r as y,p as x}from"./DuUalyFS.js";import{a as L,s as V}from"./B_1cpokE.js";import{I as z,_ as k,S as q}from"./CGY1p9L4.js";import{u as A}from"./KNLP4aJU.js";import{s as I}from"./VqWvU2yF.js";function B(r,e){c(e,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * 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.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let a=y(e,["$$slots","$$events","$$legacy"]);const s=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M3 15h18"}],["path",{d:"M9 3v18"}],["path",{d:"M15 3v18"}]];z(r,w({name:"grid-3x3"},()=>a,{get iconNode(){return s},children:(o,i)=>{var t=S(),n=$(t);I(n,()=>e.children??_),p(o,t)},$$slots:{default:!0}})),m()}function D(r,e){c(e,!0);/**
21
+ * @license @lucide/svelte v0.482.0 - ISC
22
+ *
23
+ * ISC License
24
+ *
25
+ * 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.
26
+ *
27
+ * Permission to use, copy, modify, and/or distribute this software for any
28
+ * purpose with or without fee is hereby granted, provided that the above
29
+ * copyright notice and this permission notice appear in all copies.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ *
39
+ */let a=y(e,["$$slots","$$events","$$legacy"]);const s=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];z(r,w({name:"image"},()=>a,{get iconNode(){return s},children:(o,i)=>{var t=S(),n=$(t);I(n,()=>e.children??_),p(o,t)},$$slots:{default:!0}})),m()}var E=j('<div class="w-300 flex space-x-4 text-diffuse-foreground"><!> <!> <!></div>');function U(r,e){c(e,!0);const a=()=>V(M,"$sampleSize",s),[s,o]=L(),i=x(e,"min",3,1),t=x(e,"max",3,12),{updateSampleSize:n,sampleSize:M}=A(),N=v(()=>a().width),b=k.throttle(d=>{n(d[0])},100);var l=E(),h=G(l);D(h,{class:"h-6 w-6"});var u=f(h,2);{let d=v(()=>[g(N)]);q(u,{class:"w-full flex-1",get value(){return g(d)},get min(){return i()},get max(){return t()},step:1,get onValueChange(){return b}})}var C=f(u,2);B(C,{class:"h-6 w-6"}),P(l),p(r,l),m(),o()}export{U as I,D as a};
@@ -0,0 +1 @@
1
+ var I=Object.defineProperty;var A=r=>{throw TypeError(r)};var B=(r,t,e)=>t in r?I(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var O=(r,t,e)=>B(r,typeof t!="symbol"?t+"":t,e),D=(r,t,e)=>t.has(r)||A("Cannot "+e);var S=(r,t,e)=>(D(r,t,"read from private field"),e?e.call(r):t.get(r)),P=(r,t,e)=>t.has(r)?A("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e);import"./CWj6FrbW.js";import{b as R,g as h,h as E,p as T,f as b,a as k,c as H,j as q,r as C}from"./DkbXUtyG.js";import{c as w,a as p,f as F}from"./CmLg0ys7.js";import{p as i,r as y,c as G,s as J}from"./DuUalyFS.js";import{e as K,g as L,f as M,h as N,i as Q,j as l,m as U,k as V}from"./CGY1p9L4.js";import{s as x}from"./VqWvU2yF.js";import{i as W}from"./B_1cpokE.js";import{b as X}from"./C8mfFM-u.js";const Y="data-separator-root";var n;class Z{constructor(t){O(this,"opts");P(this,n,R(()=>({id:this.opts.id.current,role:this.opts.decorative.current?"none":"separator","aria-orientation":N(this.opts.orientation.current),"aria-hidden":M(this.opts.decorative.current),"data-orientation":L(this.opts.orientation.current),[Y]:""})));this.opts=t,K(t)}get props(){return h(S(this,n))}set props(t){E(S(this,n),t)}}n=new WeakMap;function $(r){return new Z(r)}var tt=F("<div><!></div>");function rt(r,t){T(t,!0);let e=i(t,"id",19,Q),s=i(t,"ref",15,null),m=i(t,"decorative",3,!1),c=i(t,"orientation",3,"horizontal"),u=y(t,["$$slots","$$events","$$legacy","id","ref","child","children","decorative","orientation"]);const v=$({ref:l.with(()=>s(),a=>s(a)),id:l.with(()=>e()),decorative:l.with(()=>m()),orientation:l.with(()=>c())}),d=R(()=>U(u,v.props));var f=w(),g=b(f);{var z=a=>{var o=w(),_=b(o);x(_,()=>t.child,()=>({props:h(d)})),p(a,o)},j=a=>{var o=tt();X(o,()=>({...h(d)}));var _=H(o);x(_,()=>t.children??q),C(o),p(a,o)};W(g,a=>{t.child?a(z):a(j,!1)})}p(r,f),k()}function lt(r,t){T(t,!0);let e=i(t,"ref",15,null),s=i(t,"orientation",3,"horizontal"),m=y(t,["$$slots","$$events","$$legacy","ref","class","orientation"]);var c=w(),u=b(c);{let v=R(()=>V("bg-border shrink-0",s()==="horizontal"?"h-[1px] w-full":"min-h-full w-[1px]",t.class));G(u,()=>rt,(d,f)=>{f(d,J({get class(){return h(v)},get orientation(){return s()}},()=>m,{get ref(){return e()},set ref(g){e(g)}}))})}p(r,c),k()}export{lt as S};
@@ -0,0 +1 @@
1
+ import{G as k,H as O,I as S,J as T,K as g,L as v,M as q,N as x,O as B}from"./DkbXUtyG.js";const H=new Set,N=new Set;function b(r,a,i,c={}){function e(t){if(c.capture||W.call(a,t),!t.cancelBubble)return S(()=>i==null?void 0:i.call(this,t))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?O(()=>{a.addEventListener(r,e,c)}):a.addEventListener(r,e,c),e}function G(r,a,i,c={}){var e=b(a,r,i,c);return()=>{r.removeEventListener(a,e,c)}}function I(r,a,i,c,e){var t={capture:c,passive:e},o=b(r,a,i,t);(a===document.body||a===window||a===document||a instanceof HTMLMediaElement)&&k(()=>{a.removeEventListener(r,o,t)})}function J(r){for(var a=0;a<r.length;a++)H.add(r[a]);for(var i of N)i(r)}let w=null;function W(r){var p;var a=this,i=a.ownerDocument,c=r.type,e=((p=r.composedPath)==null?void 0:p.call(r))||[],t=e[0]||r.target;w=r;var o=0,_=w===r&&r.__root;if(_){var l=e.indexOf(_);if(l!==-1&&(a===document||a===window)){r.__root=a;return}var d=e.indexOf(a);if(d===-1)return;l<=d&&(o=l)}if(t=e[o]||r.target,t!==a){T(r,"currentTarget",{configurable:!0,get(){return t||i}});var y=x,L=B;g(null),v(null);try{for(var n,h=[];t!==null;){var f=t.assignedSlot||t.parentNode||t.host||null;try{var s=t["__"+c];if(s!=null&&(!t.disabled||r.target===t))if(q(s)){var[E,...M]=s;E.apply(t,[r,...M])}else s.call(t,r)}catch(u){n?h.push(u):n=u}if(r.cancelBubble||f===a||f===null)break;t=f}if(n){for(let u of h)queueMicrotask(()=>{throw u});throw n}}finally{r.__root=a,delete r.currentTarget,g(y),v(L)}}}export{H as a,b as c,J as d,I as e,W as h,G as o,N as r};
@@ -0,0 +1,20 @@
1
+ import"./CWj6FrbW.js";import{p as d,f as h,j as n,a as m}from"./DkbXUtyG.js";import{c as i,a as M}from"./CmLg0ys7.js";import{s as c}from"./VqWvU2yF.js";import{s as f,r as l}from"./DuUalyFS.js";import{I as u}from"./CGY1p9L4.js";function S(p,a){d(a,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * 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.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let s=l(a,["$$slots","$$events","$$legacy"]);const o=[["path",{d:"M5 3a2 2 0 0 0-2 2"}],["path",{d:"M19 3a2 2 0 0 1 2 2"}],["path",{d:"M21 19a2 2 0 0 1-2 2"}],["path",{d:"M5 21a2 2 0 0 1-2-2"}],["path",{d:"M9 3h1"}],["path",{d:"M9 21h1"}],["path",{d:"M14 3h1"}],["path",{d:"M14 21h1"}],["path",{d:"M3 9v1"}],["path",{d:"M21 9v1"}],["path",{d:"M3 14v1"}],["path",{d:"M21 14v1"}]];u(p,f({name:"square-dashed"},()=>s,{get iconNode(){return o},children:(r,v)=>{var t=i(),e=h(t);c(e,()=>a.children??n),M(r,t)},$$slots:{default:!0}})),m()}export{S};
@@ -0,0 +1 @@
1
+ import"./CvGjimpO.js";import{i as D,j as E,k as T}from"./VYb2dkNs.js";import{i as c}from"./DkbXUtyG.js";import{c as d}from"./CGY1p9L4.js";const j=({datasetId:t})=>{const e=d(D());return e.subscribe(()=>{}),{createAnnotation:a=>new Promise((o,i)=>{c(e).mutate({path:{dataset_id:t},body:a},{onSuccess:n=>{o(n)},onError:n=>{i(n)}})})}},k=()=>{const t=d(E());return t.subscribe(()=>{}),{createLabel:s=>new Promise((a,o)=>{c(t).mutate({body:s},{onSuccess:i=>{a(i)},onError:i=>{o(i)}})})}},L=({datasetId:t})=>{const e=d(T());return e.subscribe(()=>{}),{deleteAnnotation:a=>new Promise((o,i)=>{c(e).mutate({path:{dataset_id:t,annotation_id:a}},{onSuccess:()=>{o()},onError:n=>{i(n)}})})}},I="annotation-create",P=({annotation:t,addReversibleAction:e,deleteAnnotation:s,refetch:a})=>{const o=async()=>{await s(t.sample_id),a()};e({id:`annotation-create-${t.sample_id}-${Date.now()}`,description:"Undo create annotation",execute:o,timestamp:new Date,groupId:I})},N="annotation-delete",S=({annotation:t,labels:e,addReversibleAction:s,createAnnotation:a,refetch:o})=>{var r,_,l,m,u,b,p,A,g;const i=t.annotation_label.annotation_label_name,n=e.find(y=>y.annotation_label_name===i);if(!(n!=null&&n.annotation_label_id))return;const w={parent_sample_id:t.parent_sample_id,annotation_type:t.annotation_type,annotation_label_id:n.annotation_label_id,x:((r=t.object_detection_details)==null?void 0:r.x)??((_=t.instance_segmentation_details)==null?void 0:_.x),y:((l=t.object_detection_details)==null?void 0:l.y)??((m=t.instance_segmentation_details)==null?void 0:m.y),width:((u=t.object_detection_details)==null?void 0:u.width)??((b=t.instance_segmentation_details)==null?void 0:b.width),height:((p=t.object_detection_details)==null?void 0:p.height)??((A=t.instance_segmentation_details)==null?void 0:A.height),segmentation_mask:(g=t.instance_segmentation_details)==null?void 0:g.segmentation_mask},h=async()=>{await a(w),o()};s({id:`annotation-delete-${t.sample_id}-${Date.now()}`,description:"Undo delete annotation",execute:h,timestamp:new Date,groupId:N})};export{k as a,L as b,P as c,S as d,j as u};
@@ -0,0 +1 @@
1
+ let e=!1,a=!1;function l(){e=!0}export{l as e,e as l,a as t};
@@ -0,0 +1 @@
1
+ const a={CLASSIFICATION:"classification"},o={VIDEO:"video",VIDEO_FRAME:"video_frame",IMAGE:"image",ANNOTATION:"annotation",CAPTION:"caption"};export{a as A,o as S};
@@ -0,0 +1,39 @@
1
+ import"./CWj6FrbW.js";import{p as f,f as A,j as u,a as v,c as b,r as x,g as D,b as T}from"./DkbXUtyG.js";import{c as M,a as c,f as y}from"./CmLg0ys7.js";import{s as o}from"./VqWvU2yF.js";import{s as F,r as h,p as m,b as k}from"./DuUalyFS.js";import{I,k as N,W}from"./CGY1p9L4.js";import{b as P,g as q}from"./C8mfFM-u.js";import{i as V}from"./B_1cpokE.js";function $(s,e){f(e,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * 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.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let t=h(e,["$$slots","$$events","$$legacy"]);const l=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];I(s,F({name:"database"},()=>t,{get iconNode(){return l},children:(a,n)=>{var r=M(),_=A(r);o(_,()=>e.children??u),c(a,r)},$$slots:{default:!0}})),v()}function ee(s,e){f(e,!0);/**
21
+ * @license @lucide/svelte v0.482.0 - ISC
22
+ *
23
+ * ISC License
24
+ *
25
+ * 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.
26
+ *
27
+ * Permission to use, copy, modify, and/or distribute this software for any
28
+ * purpose with or without fee is hereby granted, provided that the above
29
+ * copyright notice and this permission notice appear in all copies.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ *
39
+ */let t=h(e,["$$slots","$$events","$$legacy"]);const l=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];I(s,F({name:"house"},()=>t,{get iconNode(){return l},children:(a,n)=>{var r=M(),_=A(r);o(_,()=>e.children??u),c(a,r)},$$slots:{default:!0}})),v()}var E=y("<nav><!></nav>");function ae(s,e){f(e,!0);let t=m(e,"ref",15),l=h(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=E();P(a,()=>({class:e.class,"aria-label":"breadcrumb",...l}));var n=b(a);o(n,()=>e.children??u),x(a),k(a,r=>t(r),()=>t()),c(s,a),v()}var G=y("<li><!></li>");function re(s,e){f(e,!0);let t=m(e,"ref",15,null),l=h(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=G();P(a,r=>({class:r,...l}),[()=>N("inline-flex items-center gap-1.5",e.class)]);var n=b(a);o(n,()=>e.children??u),x(a),k(a,r=>t(r),()=>t()),c(s,a),v()}var J=y("<li><!></li>");function te(s,e){f(e,!0);let t=m(e,"ref",15,null),l=h(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=J();P(a,i=>({role:"presentation","aria-hidden":"true",class:i,...l}),[()=>N("[&>svg]:size-3.5",e.class)]);var n=b(a);{var r=i=>{var B=M(),H=A(B);o(H,()=>e.children??u),c(i,B)},_=i=>{W(i,{})};V(n,i=>{e.children?i(r):i(_,!1)})}x(a),k(a,i=>t(i),()=>t()),c(s,a),v()}var K=y("<a><!></a>");function se(s,e){f(e,!0);let t=m(e,"ref",15,null),l=m(e,"href",3,void 0),a=h(e,["$$slots","$$events","$$legacy","ref","class","href","child","children"]);const n=T(()=>({class:N("hover:text-foreground transition-colors",e.class),href:l(),...a})),r=q(),[_,i]=r;var B=M(),H=A(B);{var j=g=>{var d=M(),w=A(d);o(w,()=>e.child,()=>({props:D(n)})),c(g,d)},C=g=>{var d=K();P(d,z=>({...z}),[()=>i({...D(n)},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]);var w=b(d);o(w,()=>e.children??u),x(d),k(d,z=>t(z),()=>t()),c(g,d)};V(H,g=>{e.child?g(j):g(C,!1)})}c(s,B),v()}var L=y("<ol><!></ol>");function le(s,e){f(e,!0);let t=m(e,"ref",15,null),l=h(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=L();P(a,r=>({class:r,...l}),[()=>N("text-muted-foreground flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5",e.class)]);var n=b(a);o(n,()=>e.children??u),x(a),k(a,r=>t(r),()=>t()),c(s,a),v()}var O=y("<span><!></span>");function ne(s,e){f(e,!0);let t=m(e,"ref",15,null),l=h(e,["$$slots","$$events","$$legacy","ref","class","children"]);var a=O();P(a,r=>({role:"link","aria-disabled":"true","aria-current":"page",class:r,...l}),[()=>N("text-foreground font-normal",e.class)]);var n=b(a);o(n,()=>e.children??u),x(a),k(a,r=>t(r),()=>t()),c(s,a),v()}export{ae as B,$ as D,ee as H,le as a,re as b,se as c,te as d,ne as e};
@@ -0,0 +1 @@
1
+ import{c as d}from"./DtWZc_tl.js";import{a as r}from"./KNLP4aJU.js";import{i as m,x as u}from"./DkbXUtyG.js";const h=async({dataset_id:i,annotation_label_ids:n})=>{const t={data:void 0,error:void 0};try{const s=await d.GET("/api/datasets/{dataset_id}/images/dimensions",{params:{path:{dataset_id:i},query:{annotation_label_ids:n}}});if(s.error)throw new Error(JSON.stringify(s.error,null,2));if(!s.data)throw new Error("No dimension bounds data");t.data=s.data}catch(s){t.error="Error loading dimension bounds: "+String(s)}return t},o=r("lightlyStudio_dimensions_bounds",{min_width:0,max_width:0,min_height:0,max_height:0}),e=r("lightlyStudio_dimensions_values",{min_width:0,max_width:0,min_height:0,max_height:0}),l=i=>{e.set(i)},c=i=>{o.set(i)},a=u(!1),g=async i=>{if(m(a))return;const{data:n}=await h({dataset_id:i});n&&(o.set(n),e.set(n)),a.set(!0)},p=i=>(i&&g(i),{dimensionsBounds:o,dimensionsValues:e,updateDimensionsValues:l,updateDimensionsBounds:c});export{p as u};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import{o as F}from"./xGHZQ1pe.js";import{p as b,t as A,a as P}from"./DkbXUtyG.js";import{e as r}from"./D9SC3jBb.js";import{f as V,a as g}from"./CmLg0ys7.js";import{s as d,a as q,c as w}from"./C8mfFM-u.js";import{p as o,b as D}from"./DuUalyFS.js";import{P as N}from"./DtWZc_tl.js";var S=V("<video></video>",2);function G(c,e){b(e,!0);let m=o(e,"videoEl",15),s=o(e,"frames",19,()=>[]),p=o(e,"muted",3,!0),h=o(e,"playsinline",3,!0),_=o(e,"controls",3,!1),v=o(e,"preload",3,"metadata"),y=o(e,"className",3,""),E=o(e,"handleMouseEnter",3,()=>{}),M=o(e,"handleMouseLeave",3,()=>{}),x=o(e,"onplay",3,()=>{}),i=0,u=null;const f=.002;F(()=>{L()});function I(t){for(;i<s().length-1&&s()[i+1].frame_timestamp_s<=t+f;)i++;for(;i>0&&i<s().length&&s()[i].frame_timestamp_s>t+f;)i--;return{frame:s()[i],index:i}}function L(){function t(){if(!m())return;const{frame:n,index:l}=I(m().currentTime);u!=l&&(e.update(n,l),u=l),requestAnimationFrame(t)}requestAnimationFrame(t)}var a=S();D(a,t=>m(t),()=>m()),A(()=>{d(a,"src",`${N}/${e.video.sample_id}#t=0.001`),a.muted=p(),a.playsInline=h(),d(a,"preload",v()),a.controls=_(),q(a,1,w(y()))}),r("mouseenter",a,function(...t){var n;(n=E())==null||n.apply(this,t)}),r("mouseleave",a,function(...t){var n;(n=M())==null||n.apply(this,t)}),r("play",a,function(...t){var n;(n=x())==null||n.apply(this,t)}),g(c,a),P()}export{G as V};
@@ -0,0 +1 @@
1
+ var vn=Object.defineProperty;var he=t=>{throw TypeError(t)};var pn=(t,e,n)=>e in t?vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Tt=(t,e,n)=>pn(t,typeof e!="symbol"?e+"":e,n),Kt=(t,e,n)=>e.has(t)||he("Cannot "+n);var d=(t,e,n)=>(Kt(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>e.has(t)?he("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),U=(t,e,n,r)=>(Kt(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),B=(t,e,n)=>(Kt(t,e,"access private method"),n);import{l as re,t as hn}from"./DIeogL5L.js";const Re=!1;var dn=Array.isArray,wn=Array.prototype.indexOf,fr=Array.from,de=Object.defineProperty,St=Object.getOwnPropertyDescriptor,yn=Object.getOwnPropertyDescriptors,bn=Object.prototype,En=Array.prototype,Oe=Object.getPrototypeOf,we=Object.isExtensible;function ur(t){return typeof t=="function"}const et=()=>{};function lr(t){return typeof(t==null?void 0:t.then)=="function"}function or(t){return t()}function Ne(t){for(var e=0;e<t.length;e++)t[e]()}function ke(){var t,e,n=new Promise((r,s)=>{t=r,e=s});return{promise:n,resolve:t,reject:e}}function cr(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const S=2,se=4,Ut=8,ft=16,q=32,Z=64,Ce=128,C=256,Lt=512,g=1024,O=2048,Y=4096,z=8192,Et=16384,ae=32768,Ie=65536,ye=1<<17,gn=1<<18,gt=1<<19,Pe=1<<20,Xt=1<<21,Bt=1<<22,nt=1<<23,rt=Symbol("$state"),_r=Symbol("legacy props"),vr=Symbol(""),Rt=new class extends Error{constructor(){super(...arguments);Tt(this,"name","StaleReactionError");Tt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},hr=1,ie=3,De=8;function mn(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Tn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function dr(){throw new Error("https://svelte.dev/e/hydration_failed")}function wr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function On(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Nn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function kn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function yr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const br=1,Er=2,gr=4,mr=8,Tr=16,Ar=1,xr=2,Sr=4,Rr=8,Or=16,Nr=4,kr=1,Cr=2,Cn="[",In="[!",Pn="]",fe={},m=Symbol(),Ir="http://www.w3.org/1999/xhtml",Pr="http://www.w3.org/2000/svg",Dr="@attach";function ue(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Mr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Fr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let j=!1;function Me(t){j=t}let E;function at(t){if(t===null)throw ue(),fe;return E=t}function Lr(){return at(ut(E))}function jr(t){if(j){if(ut(E)!==null)throw ue(),fe;E=t}}function qr(t=1){if(j){for(var e=t,n=E;e--;)n=ut(n);E=n}}function Yr(t=!0){for(var e=0,n=E;;){if(n.nodeType===De){var r=n.data;if(r===Pn){if(e===0)return n;e-=1}else(r===Cn||r===In)&&(e+=1)}var s=ut(n);t&&n.remove(),n=s}}function Hr(t){if(!t||t.nodeType!==De)throw ue(),fe;return t.data}function Fe(t){return t===this.v}function Le(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ur(t,e){return t!==e}function je(t){return!Le(t,this.v)}let y=null;function jt(t){y=t}function Br(t){return Vt().get(t)}function Vr(t,e){return Vt().set(t,e),e}function $r(t){return Vt().has(t)}function Gr(){return Vt()}function Kr(t,e=!1,n){y={p:y,c:null,e:null,s:t,x:null,l:re&&!e?{s:null,u:null,$:[]}:null}}function zr(t){var e=y,n=e.e;if(n!==null){e.e=null;for(var r of n)Ze(r)}return t!==void 0&&(e.x=t),y=e.p,t??{}}function Pt(){return!re||y!==null&&y.l===null}function Vt(t){return y===null&&mn(),y.c??(y.c=new Map(Dn(y)||void 0))}function Dn(t){let e=t.p;for(;e!==null;){const n=e.c;if(n!==null)return n;e=e.p}return null}let Q=[];function qe(){var t=Q;Q=[],Ne(t)}function Ye(t){if(Q.length===0&&!Ot){var e=Q;queueMicrotask(()=>{e===Q&&qe()})}Q.push(t)}function Mn(){for(;Q.length>0;)qe()}const Fn=new WeakMap;function Ln(t){var e=h;if(e===null)return _.f|=nt,t;if(e.f&ae)qt(t,e);else{if(!(e.f&Ce))throw!e.parent&&t instanceof Error&&He(t),t;e.b.error(t)}}function qt(t,e){for(;e!==null;){if(e.f&Ce)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t instanceof Error&&He(t),t}function He(t){const e=Fn.get(t);e&&(de(t,"message",{value:e.message}),de(t,"stack",{value:e.stack}))}const Mt=new Set;let b=null,zt=null,be=new Set,F=[],$t=null,Zt=!1,Ot=!1;var _t,vt,$,kt,pt,ht,tt,dt,Ct,It,I,Jt,Ft,Qt;const ot=class ot{constructor(){N(this,I);Tt(this,"current",new Map);N(this,_t,new Map);N(this,vt,new Set);N(this,$,0);N(this,kt,null);N(this,pt,[]);N(this,ht,[]);N(this,tt,[]);N(this,dt,[]);N(this,Ct,[]);N(this,It,[]);Tt(this,"skipped_effects",new Set)}process(e){var i;F=[],zt=null;var n=ot.apply(this);for(const u of e)B(this,I,Jt).call(this,u);if(d(this,$)===0){B(this,I,Qt).call(this);var r=d(this,ht),s=d(this,tt);U(this,ht,[]),U(this,tt,[]),U(this,dt,[]),zt=this,b=null,Ee(r),Ee(s),(i=d(this,kt))==null||i.resolve()}else B(this,I,Ft).call(this,d(this,ht)),B(this,I,Ft).call(this,d(this,tt)),B(this,I,Ft).call(this,d(this,dt));n();for(const u of d(this,pt))bt(u);U(this,pt,[])}capture(e,n){d(this,_t).has(e)||d(this,_t).set(e,n),this.current.set(e,e.v)}activate(){b=this}deactivate(){b=null,zt=null;for(const e of be)if(be.delete(e),e(),b!==null)break}flush(){if(F.length>0){if(this.activate(),Ue(),b!==null&&b!==this)return}else d(this,$)===0&&B(this,I,Qt).call(this);this.deactivate()}increment(){U(this,$,d(this,$)+1)}decrement(){if(U(this,$,d(this,$)-1),d(this,$)===0){for(const e of d(this,Ct))T(e,O),it(e);for(const e of d(this,It))T(e,Y),it(e);this.flush()}else this.deactivate()}add_callback(e){d(this,vt).add(e)}settled(){return(d(this,kt)??U(this,kt,ke())).promise}static ensure(){if(b===null){const e=b=new ot;Mt.add(b),Ot||ot.enqueue(()=>{b===e&&e.flush()})}return b}static enqueue(e){Ye(e)}static apply(e){return et}};_t=new WeakMap,vt=new WeakMap,$=new WeakMap,kt=new WeakMap,pt=new WeakMap,ht=new WeakMap,tt=new WeakMap,dt=new WeakMap,Ct=new WeakMap,It=new WeakMap,I=new WeakSet,Jt=function(e){var f;e.f^=g;for(var n=e.first;n!==null;){var r=n.f,s=(r&(q|Z))!==0,i=s&&(r&g)!==0,u=i||(r&z)!==0||this.skipped_effects.has(n);if(!u&&n.fn!==null){s?n.f^=g:r&se?d(this,tt).push(n):r&g||(r&Bt&&((f=n.b)!=null&&f.is_pending())?d(this,pt).push(n):Dt(n)&&(n.f&ft&&d(this,dt).push(n),bt(n)));var l=n.first;if(l!==null){n=l;continue}}var a=n.parent;for(n=n.next;n===null&&a!==null;)n=a.next,a=a.parent}},Ft=function(e){for(const n of e)(n.f&O?d(this,Ct):d(this,It)).push(n),T(n,g);e.length=0},Qt=function(){var e;for(const n of d(this,vt))n();if(d(this,vt).clear(),Mt.size>1){d(this,_t).clear();let n=!0;for(const r of Mt){if(r===this){n=!1;continue}for(const[s,i]of this.current){if(r.current.has(s))if(n)r.current.set(s,i);else continue;Be(s)}if(F.length>0){b=r;const s=ot.apply(r);for(const i of F)B(e=r,I,Jt).call(e,i);F=[],s()}}b=null}Mt.delete(this)};let wt=ot;function jn(t){var e=Ot;Ot=!0;try{for(var n;;){if(Mn(),F.length===0&&(b==null||b.flush(),F.length===0))return $t=null,n;Ue()}}finally{Ot=e}}function Ue(){var t=ct;Zt=!0;try{var e=0;for(Ae(!0);F.length>0;){var n=wt.ensure();if(e++>1e3){var r,s;qn()}n.process(F),K.clear()}}finally{Zt=!1,Ae(t),$t=null}}function qn(){try{Rn()}catch(t){qt(t,$t)}}let L=null;function Ee(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if(!(r.f&(Et|z))&&Dt(r)&&(L=[],bt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?en(r):r.fn=null),(L==null?void 0:L.length)>0)){K.clear();for(const s of L)bt(s);L=[]}}L=null}}function Be(t){if(t.reactions!==null)for(const e of t.reactions){const n=e.f;n&S?Be(e):n&(Bt|ft)&&(T(e,O),it(e))}}function it(t){for(var e=$t=t;e.parent!==null;){e=e.parent;var n=e.f;if(Zt&&e===h&&n&ft)return;if(n&(Z|q)){if(!(n&g))return;e.f^=g}}F.push(e)}function Yn(t,e,n){const r=Pt()?le:Bn;if(e.length===0){n(t.map(r));return}var s=b,i=h,u=Hn(),l=j;Promise.all(e.map(a=>Un(a))).then(a=>{s==null||s.activate(),u();try{n([...t.map(r),...a])}catch(f){i.f&Et||qt(f,i)}l&&Me(!1),s==null||s.deactivate(),Ve()}).catch(a=>{qt(a,i)})}function Hn(){var t=h,e=_,n=y,r=b,s=j;if(s)var i=E;return function(){yt(t),X(e),jt(n),r==null||r.activate(),s&&(Me(!0),at(i))}}function Ve(){yt(null),X(null),jt(null)}function le(t){var e=S|O,n=_!==null&&_.f&S?_:null;return h===null||n!==null&&n.f&C?e|=C:h.f|=gt,{ctx:y,deps:null,effects:null,equals:Fe,f:e,fn:t,reactions:null,rv:0,v:m,wv:0,parent:n??h,ac:null}}function Un(t,e){let n=h;n===null&&Tn();var r=n.b,s=void 0,i=ce(m),u=!_,l=new Map;return Wn(()=>{var w;var a=ke();s=a.promise;try{Promise.resolve(t()).then(a.resolve,a.reject)}catch(p){a.reject(p)}var f=b,o=r.is_pending();u&&(r.update_pending_count(1),o||(f.increment(),(w=l.get(f))==null||w.reject(Rt),l.set(f,a)));const c=(p,v=void 0)=>{o||f.activate(),v?v!==Rt&&(i.f|=nt,te(i,v)):(i.f&nt&&(i.f^=nt),te(i,p)),u&&(r.update_pending_count(-1),o||f.decrement()),Ve()};a.promise.then(c,p=>c(null,p||"unknown"))}),zn(()=>{for(const a of l.values())a.reject(Rt)}),new Promise(a=>{function f(o){function c(){o===s?a(i):f(s)}o.then(c,c)}f(s)})}function Wr(t){const e=le(t);return sn(e),e}function Bn(t){const e=le(t);return e.equals=je,e}function $e(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)W(e[n])}}function Vn(t){for(var e=t.parent;e!==null;){if(!(e.f&S))return e;e=e.parent}return null}function oe(t){var e,n=h;yt(Vn(t));try{$e(t),e=ln(t)}finally{yt(n)}return e}function Ge(t){var e=oe(t);if(t.equals(e)||(t.v=e,t.wv=fn()),!mt){var n=(G||t.f&C)&&t.deps!==null?Y:g;T(t,n)}}const K=new Map;function ce(t,e){var n={f:0,v:t,reactions:null,equals:Fe,rv:0,wv:0};return n}function V(t,e){const n=ce(t);return sn(n),n}function Xr(t,e=!1,n=!0){var s;const r=ce(t);return e||(r.equals=je),re&&n&&y!==null&&y.l!==null&&((s=y.l).s??(s.s=[])).push(r),r}function J(t,e,n=!1){_!==null&&(!P||_.f&ye)&&Pt()&&_.f&(S|ft|Bt|ye)&&!(x!=null&&x.includes(t))&&kn();let r=n?At(e):e;return te(t,r)}function te(t,e){if(!t.equals(e)){var n=t.v;mt?K.set(t,e):K.set(t,n),t.v=e;var r=wt.ensure();r.capture(t,n),t.f&S&&(t.f&O&&oe(t),T(t,t.f&C?Y:g)),t.wv=fn(),Ke(t,O),Pt()&&h!==null&&h.f&g&&!(h.f&(q|Z))&&(k===null?tr([t]):k.push(t))}return e}function Wt(t){J(t,t.v+1)}function Ke(t,e){var n=t.reactions;if(n!==null)for(var r=Pt(),s=n.length,i=0;i<s;i++){var u=n[i],l=u.f;if(!(!r&&u===h)){var a=(l&O)===0;a&&T(u,e),l&S?Ke(u,Y):a&&(l&ft&&L!==null&&L.push(u),it(u))}}}function At(t){if(typeof t!="object"||t===null||rt in t)return t;const e=Oe(t);if(e!==bn&&e!==En)return t;var n=new Map,r=dn(t),s=V(0),i=st,u=l=>{if(st===i)return l();var a=_,f=st;X(null),Se(i);var o=l();return X(a),Se(f),o};return r&&n.set("length",V(t.length)),new Proxy(t,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&On();var o=n.get(a);return o===void 0?o=u(()=>{var c=V(f.value);return n.set(a,c),c}):J(o,f.value,!0),!0},deleteProperty(l,a){var f=n.get(a);if(f===void 0){if(a in l){const o=u(()=>V(m));n.set(a,o),Wt(s)}}else J(f,m),Wt(s);return!0},get(l,a,f){var p;if(a===rt)return t;var o=n.get(a),c=a in l;if(o===void 0&&(!c||(p=St(l,a))!=null&&p.writable)&&(o=u(()=>{var v=At(c?l[a]:m),M=V(v);return M}),n.set(a,o)),o!==void 0){var w=xt(o);return w===m?void 0:w}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var o=n.get(a);o&&(f.value=xt(o))}else if(f===void 0){var c=n.get(a),w=c==null?void 0:c.v;if(c!==void 0&&w!==m)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return f},has(l,a){var w;if(a===rt)return!0;var f=n.get(a),o=f!==void 0&&f.v!==m||Reflect.has(l,a);if(f!==void 0||h!==null&&(!o||(w=St(l,a))!=null&&w.writable)){f===void 0&&(f=u(()=>{var p=o?At(l[a]):m,v=V(p);return v}),n.set(a,f));var c=xt(f);if(c===m)return!1}return o},set(l,a,f,o){var pe;var c=n.get(a),w=a in l;if(r&&a==="length")for(var p=f;p<c.v;p+=1){var v=n.get(p+"");v!==void 0?J(v,m):p in l&&(v=u(()=>V(m)),n.set(p+"",v))}if(c===void 0)(!w||(pe=St(l,a))!=null&&pe.writable)&&(c=u(()=>V(void 0)),J(c,At(f)),n.set(a,c));else{w=c.v!==m;var M=u(()=>At(f));J(c,M)}var H=Reflect.getOwnPropertyDescriptor(l,a);if(H!=null&&H.set&&H.set.call(o,f),!w){if(r&&typeof a=="string"){var ve=n.get("length"),Gt=Number(a);Number.isInteger(Gt)&&Gt>=ve.v&&J(ve,Gt+1)}Wt(s)}return!0},ownKeys(l){xt(s);var a=Reflect.ownKeys(l).filter(c=>{var w=n.get(c);return w===void 0||w.v!==m});for(var[f,o]of n)o.v!==m&&!(f in l)&&a.push(f);return a},setPrototypeOf(){Nn()}})}function ge(t){try{if(t!==null&&typeof t=="object"&&rt in t)return t[rt]}catch{}return t}function Zr(t,e){return Object.is(ge(t),ge(e))}var me,$n,ze,We;function Jr(){if(me===void 0){me=window,$n=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;ze=St(e,"firstChild").get,We=St(e,"nextSibling").get,we(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),we(n)&&(n.__t=void 0)}}function Yt(t=""){return document.createTextNode(t)}function ee(t){return ze.call(t)}function ut(t){return We.call(t)}function Qr(t,e){if(!j)return ee(t);var n=ee(E);if(n===null)n=E.appendChild(Yt());else if(e&&n.nodeType!==ie){var r=Yt();return n==null||n.before(r),at(r),r}return at(n),n}function ts(t,e=!1){if(!j){var n=ee(t);return n instanceof Comment&&n.data===""?ut(n):n}if(e&&(E==null?void 0:E.nodeType)!==ie){var r=Yt();return E==null||E.before(r),at(r),r}return E}function es(t,e=1,n=!1){let r=j?E:t;for(var s;e--;)s=r,r=ut(r);if(!j)return r;if(n&&(r==null?void 0:r.nodeType)!==ie){var i=Yt();return r===null?s==null||s.after(i):r.before(i),at(i),i}return at(r),r}function ns(t){t.textContent=""}function rs(){return!1}function ss(t,e){if(e){const n=document.body;t.autofocus=!0,Ye(()=>{document.activeElement===n&&t.focus()})}}let Te=!1;function Gn(){Te||(Te=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)(e=n.__on_r)==null||e.call(n)})},{capture:!0}))}function _e(t){var e=_,n=h;X(null),yt(null);try{return t()}finally{X(e),yt(n)}}function as(t,e,n,r=n){t.addEventListener(e,()=>_e(n));const s=t.__on_r;s?t.__on_r=()=>{s(),r(!0)}:t.__on_r=()=>r(!0),Gn()}function Xe(t){h===null&&_===null&&Sn(),_!==null&&_.f&C&&h===null&&xn(),mt&&An()}function Kn(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function D(t,e,n,r=!0){var s=h;s!==null&&s.f&z&&(t|=z);var i={ctx:y,deps:null,nodes_start:null,nodes_end:null,f:t|O,first:null,fn:e,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{bt(i),i.f|=ae}catch(a){throw W(i),a}else e!==null&&it(i);if(r){var u=i;if(n&&u.deps===null&&u.teardown===null&&u.nodes_start===null&&u.first===u.last&&!(u.f&gt)&&(u=u.first),u!==null&&(u.parent=s,s!==null&&Kn(u,s),_!==null&&_.f&S&&!(t&Z))){var l=_;(l.effects??(l.effects=[])).push(u)}}return i}function is(){return _!==null&&!P}function zn(t){const e=D(Ut,null,!1);return T(e,g),e.teardown=t,e}function fs(t){Xe();var e=h.f,n=!_&&(e&q)!==0&&(e&ae)===0;if(n){var r=y;(r.e??(r.e=[])).push(t)}else return Ze(t)}function Ze(t){return D(se|Pe,t,!1)}function us(t){return Xe(),D(Ut|Pe,t,!0)}function ls(t){wt.ensure();const e=D(Z|gt,t,!0);return()=>{W(e)}}function os(t){wt.ensure();const e=D(Z|gt,t,!0);return(n={})=>new Promise(r=>{n.outro?Jn(e,()=>{W(e),r(void 0)}):(W(e),r(void 0))})}function cs(t){return D(se,t,!1)}function _s(t,e){var n=y,r={effect:null,ran:!1,deps:t};n.l.$.push(r),r.effect=Je(()=>{t(),!r.ran&&(r.ran=!0,cn(e))})}function vs(){var t=y;Je(()=>{for(var e of t.l.$){e.deps();var n=e.effect;n.f&g&&T(n,Y),Dt(n)&&bt(n),e.ran=!1}})}function Wn(t){return D(Bt|gt,t,!0)}function Je(t,e=0){return D(Ut|e,t,!0)}function ps(t,e=[],n=[]){Yn(e,n,r=>{D(Ut,()=>t(...r.map(xt)),!0)})}function hs(t,e=0){var n=D(ft|e,t,!0);return n}function ds(t,e=!0){return D(q|gt,t,!0,e)}function Qe(t){var e=t.teardown;if(e!==null){const n=mt,r=_;xe(!0),X(null);try{e.call(null)}finally{xe(n),X(r)}}}function tn(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const s=n.ac;s!==null&&_e(()=>{s.abort(Rt)});var r=n.next;n.f&Z?n.parent=null:W(n,e),n=r}}function Xn(t){for(var e=t.first;e!==null;){var n=e.next;e.f&q||W(e),e=n}}function W(t,e=!0){var n=!1;(e||t.f&gn)&&t.nodes_start!==null&&t.nodes_end!==null&&(Zn(t.nodes_start,t.nodes_end),n=!0),tn(t,e&&!n),Ht(t,0),T(t,Et);var r=t.transitions;if(r!==null)for(const i of r)i.stop();Qe(t);var s=t.parent;s!==null&&s.first!==null&&en(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function Zn(t,e){for(;t!==null;){var n=t===e?null:ut(t);t.remove(),t=n}}function en(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Jn(t,e){var n=[];nn(t,n,!0),Qn(n,()=>{W(t),e&&e()})}function Qn(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var s of t)s.out(r)}else e()}function nn(t,e,n){if(!(t.f&z)){if(t.f^=z,t.transitions!==null)for(const u of t.transitions)(u.is_global||n)&&e.push(u);for(var r=t.first;r!==null;){var s=r.next,i=(r.f&Ie)!==0||(r.f&q)!==0;nn(r,e,i?n:!1),r=s}}}function ws(t){rn(t,!0)}function rn(t,e){if(t.f&z){t.f^=z,t.f&g||(T(t,O),it(t));for(var n=t.first;n!==null;){var r=n.next,s=(n.f&Ie)!==0||(n.f&q)!==0;rn(n,s?e:!1),n=r}if(t.transitions!==null)for(const i of t.transitions)(i.is_global||e)&&i.in()}}let ct=!1;function Ae(t){ct=t}let mt=!1;function xe(t){mt=t}let _=null,P=!1;function X(t){_=t}let h=null;function yt(t){h=t}let x=null;function sn(t){_!==null&&(x===null?x=[t]:x.push(t))}let A=null,R=0,k=null;function tr(t){k=t}let an=1,Nt=0,st=Nt;function Se(t){st=t}let G=!1;function fn(){return++an}function Dt(t){var c;var e=t.f;if(e&O)return!0;if(e&Y){var n=t.deps,r=(e&C)!==0;if(n!==null){var s,i,u=(e&Lt)!==0,l=r&&h!==null&&!G,a=n.length;if((u||l)&&(h===null||!(h.f&Et))){var f=t,o=f.parent;for(s=0;s<a;s++)i=n[s],(u||!((c=i==null?void 0:i.reactions)!=null&&c.includes(f)))&&(i.reactions??(i.reactions=[])).push(f);u&&(f.f^=Lt),l&&o!==null&&!(o.f&C)&&(f.f^=C)}for(s=0;s<a;s++)if(i=n[s],Dt(i)&&Ge(i),i.wv>t.wv)return!0}(!r||h!==null&&!G)&&T(t,g)}return!1}function un(t,e,n=!0){var r=t.reactions;if(r!==null&&!(x!=null&&x.includes(t)))for(var s=0;s<r.length;s++){var i=r[s];i.f&S?un(i,e,!1):e===i&&(n?T(i,O):i.f&g&&T(i,Y),it(i))}}function ln(t){var M;var e=A,n=R,r=k,s=_,i=G,u=x,l=y,a=P,f=st,o=t.f;A=null,R=0,k=null,G=(o&C)!==0&&(P||!ct||_===null),_=o&(q|Z)?null:t,x=null,jt(t.ctx),P=!1,st=++Nt,t.ac!==null&&(_e(()=>{t.ac.abort(Rt)}),t.ac=null);try{t.f|=Xt;var c=t.fn,w=c(),p=t.deps;if(A!==null){var v;if(Ht(t,R),p!==null&&R>0)for(p.length=R+A.length,v=0;v<A.length;v++)p[R+v]=A[v];else t.deps=p=A;if(!G||o&S&&t.reactions!==null)for(v=R;v<p.length;v++)((M=p[v]).reactions??(M.reactions=[])).push(t)}else p!==null&&R<p.length&&(Ht(t,R),p.length=R);if(Pt()&&k!==null&&!P&&p!==null&&!(t.f&(S|Y|O)))for(v=0;v<k.length;v++)un(k[v],t);return s!==null&&s!==t&&(Nt++,k!==null&&(r===null?r=k:r.push(...k))),t.f&nt&&(t.f^=nt),w}catch(H){return Ln(H)}finally{t.f^=Xt,A=e,R=n,k=r,_=s,G=i,x=u,jt(l),P=a,st=f}}function er(t,e){let n=e.reactions;if(n!==null){var r=wn.call(n,t);if(r!==-1){var s=n.length-1;s===0?n=e.reactions=null:(n[r]=n[s],n.pop())}}n===null&&e.f&S&&(A===null||!A.includes(e))&&(T(e,Y),e.f&(C|Lt)||(e.f^=Lt),$e(e),Ht(e,0))}function Ht(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)er(t,n[r])}function bt(t){var e=t.f;if(!(e&Et)){T(t,g);var n=h,r=ct;h=t,ct=!0;try{e&ft?Xn(t):tn(t),Qe(t);var s=ln(t);t.teardown=typeof s=="function"?s:null,t.wv=an;var i;Re&&hn&&t.f&O&&t.deps}finally{ct=r,h=n}}}async function ys(){await Promise.resolve(),jn()}function xt(t){var e=t.f,n=(e&S)!==0;if(_!==null&&!P){var r=h!==null&&(h.f&Et)!==0;if(!r&&!(x!=null&&x.includes(t))){var s=_.deps;if(_.f&Xt)t.rv<Nt&&(t.rv=Nt,A===null&&s!==null&&s[R]===t?R++:A===null?A=[t]:(!G||!A.includes(t))&&A.push(t));else{(_.deps??(_.deps=[])).push(t);var i=t.reactions;i===null?t.reactions=[_]:i.includes(_)||i.push(_)}}}else if(n&&t.deps===null&&t.effects===null){var u=t,l=u.parent;l!==null&&!(l.f&C)&&(u.f^=C)}if(mt){if(K.has(t))return K.get(t);if(n){u=t;var a=u.v;return(!(u.f&g)&&u.reactions!==null||on(u))&&(a=oe(u)),K.set(u,a),a}}else n&&(u=t,Dt(u)&&Ge(u));if(t.f&nt)throw t.v;return t.v}function on(t){if(t.v===m)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(K.has(e)||e.f&S&&on(e))return!0;return!1}function cn(t){var e=P;try{return P=!0,t()}finally{P=e}}const nr=-7169;function T(t,e){t.f=t.f&nr|e}function bs(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(rt in t)ne(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];typeof n=="object"&&n&&rt in n&&ne(n)}}}function ne(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let r in t)try{ne(t[r],e)}catch{}const n=Oe(t);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=yn(n);for(let s in r){const i=r[s].get;if(i)try{i.call(t)}catch{}}}}}function _n(t,e,n){if(t==null)return e(void 0),n&&n(void 0),et;const r=cn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const lt=[];function rr(t,e){return{subscribe:sr(t,e).subscribe}}function sr(t,e=et){let n=null;const r=new Set;function s(l){if(Le(t,l)&&(t=l,n)){const a=!lt.length;for(const f of r)f[1](),lt.push(f,t);if(a){for(let f=0;f<lt.length;f+=2)lt[f][0](lt[f+1]);lt.length=0}}}function i(l){s(l(t))}function u(l,a=et){const f=[l,a];return r.add(f),r.size===1&&(n=e(s,i)||et),l(t),()=>{r.delete(f),r.size===0&&n&&(n(),n=null)}}return{set:s,update:i,subscribe:u}}function Es(t,e,n){const r=!Array.isArray(t),s=r?[t]:t;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=e.length<2;return rr(n,(u,l)=>{let a=!1;const f=[];let o=0,c=et;const w=()=>{if(o)return;c();const v=e(r?f[0]:f,u,l);i?u(v):c=typeof v=="function"?v:et},p=s.map((v,M)=>_n(v,H=>{f[M]=H,o&=~(1<<M),a&&w()},()=>{o|=1<<M}));return a=!0,w(),function(){Ne(p),c(),a=!1}})}function gs(t){return{subscribe:t.subscribe.bind(t)}}function ms(t){let e;return _n(t,n=>e=n)(),e}export{me as $,hs as A,ds as B,W as C,j as D,Ie as E,E as F,zn as G,Ye as H,_e as I,de as J,X as K,yt as L,dn as M,_ as N,h as O,Lr as P,Hr as Q,In as R,Yr as S,at as T,Me as U,Yt as V,b as W,m as X,rs as Y,ws as Z,Jn as _,zr as a,Mr as a$,Xr as a0,_n as a1,ee as a2,$n as a3,kr as a4,Cr as a5,ie as a6,De as a7,cs as a8,Je as a9,Fr as aA,gn as aB,Cn as aC,Jr as aD,fe as aE,dr as aF,ns as aG,fr as aH,os as aI,Pn as aJ,ue as aK,jn as aL,ys as aM,rr as aN,Br as aO,Vr as aP,Pt as aQ,Ur as aR,Le as aS,Er as aT,br as aU,Tr as aV,z as aW,nn as aX,Qn as aY,gr as aZ,mr as a_,rt as aa,St as ab,wr as ac,Sr as ad,Et as ae,Bn as af,Rr as ag,xr as ah,Ar as ai,ur as aj,_r as ak,Or as al,mt as am,is as an,ce as ao,Wt as ap,te as aq,wt as ar,jt as as,Ln as at,be as au,qt as av,yr as aw,gt as ax,Ce as ay,ut as az,Wr as b,Zr as b0,Yn as b1,Ir as b2,Oe as b3,Dr as b4,yn as b5,ss as b6,Gn as b7,vr as b8,Re as b9,_s as ba,vs as bb,$r as bc,st as bd,mn as be,bn as bf,lr as bg,Ot as bh,hr as bi,Pr as bj,ft as bk,ae as bl,Nr as bm,as as bn,zt as bo,cr as bp,Gr as bq,ls as br,Qr as c,V as d,At as e,ts as f,xt as g,J as h,ms as i,et as j,y as k,us as l,cn as m,qr as n,or as o,Kr as p,Ne as q,jr as r,es as s,ps as t,fs as u,bs as v,le as w,sr as x,Es as y,gs as z};
@@ -0,0 +1 @@
1
+ import{r as i}from"./VYb2dkNs.js";import{i as n}from"./DkbXUtyG.js";import{c as p}from"./CGY1p9L4.js";const l=({datasetId:e})=>{const o=p(i());return o.subscribe(()=>{}),{removeTagFromSample:(r,a)=>new Promise((m,t)=>{n(o).mutate({path:{dataset_id:e,sample_id:r,tag_id:a}},{onSuccess:()=>m(),onError:s=>t(s)})})}};export{l as u};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import"./69_IOA4Y.js";import{b as w}from"./xGHZQ1pe.js";import{p as X}from"./DwIonDAZ.js";import{i as H}from"./DkbXUtyG.js";let P;const D="en",k=["en","de"];let L=()=>D;const Q=t=>{typeof t=="function"?L=C(t):L=C(()=>t),P!==void 0&&P(L())};function C(t){return()=>{const n=t();if(!A(n))throw new Error("languageTag() didn't return a valid language tag. Check your setLanguageTag call");return n}}const Y=t=>{P=t};function A(t){return k.includes(t)}const q=Object.freeze(Object.defineProperty({__proto__:null,availableLanguageTags:k,isAvailableLanguageTag:A,get languageTag(){return L},onSetLanguageTag:Y,setLanguageTag:Q,sourceLanguageTag:D},Symbol.toStringTag,{value:"Module"}));function G(t,n){if(t==="")return"";const e=new URL(t,n).pathname;return e.endsWith("/")?e.slice(0,-1):e}function S(t,n){const e=V(t),o=J(e,n),[s,a]=Z(o);return[s,a]}const B=(t,n,e)=>[n,t,e??""].filter(o=>o!=="/").join("")||"/";function J(t,n){const e=t.replace(n,"");return e.startsWith("/")?e:`/${e}`}function Z(t){const e=["/.html__data.json","/__data.json"].find(o=>t.endsWith(o));return e?[t.slice(0,-e.length)||"/",e]:[t,void 0]}function V(t){try{return decodeURI(t)}catch{return t}}const tt=t=>({url:n})=>{try{const[e,o]=S(n.pathname,w),s=t.getLanguageFromLocalisedPath(e);if(!s)return n.pathname;const a=t.getCanonicalPath(e,s);return B(a,w,o)}catch{return n.pathname}};function et(t){return`/${t.split("/").filter(Boolean).join("/")}`}function nt(t){const n=t.map(e=>typeof e=="string"?o=>o===e:o=>e.test(o));return e=>n.some(o=>o(et(e)))}const T="rtl",R="ltr";function rt(t){try{const n=new Intl.Locale(t);return"textInfo"in n?n.textInfo.direction===T?T:R:n.getTextInfo().direction===T?T:R}catch{return R}}function ot(t){const n=t.map(e=>[e,rt(e)]);return Object.fromEntries(n)}const at=0,F=1,$=2,it=4,p=0,v=1,b=2;function st(t){const n=ct(ut);return t.sort((e,o)=>{var s,a,i,c,r,u;const f=z(e).map(n),l=z(o).map(n);for(let g=0;g<Math.max(f.length,l.length);g+=1){const m=f[g],x=l[g];if(!m)return-1;if(!x)return 1;for(let _=0;_<Math.max(m.length,x.length);_+=1){const h=m[_],d=x[_];if((h==null?void 0:h[p])||(d==null?void 0:d[p])){if(!h)return-1;if(!d)return 1;const y=((s=m[_+1])==null?void 0:s[v])||((i=(a=f[g+1])==null?void 0:a[0])==null?void 0:i[v]),I=((c=x[_+1])==null?void 0:c[v])||((u=(r=l[g+1])==null?void 0:r[0])==null?void 0:u[v]),K=y&&I,O=y&&!I,W=!y&&I;if((h[p]&&d[p])===$){if(K)continue;if(O)return-1;if(W)return 1}if(h[p]===$)return O?-1:1;if(d[p]===$)return W?1:-1;if(h[b]!==d[b])return(-1)**+h[b];if(h[p]!==d[p])return(-1)**+(h[p]>d[p])}else if((h==null?void 0:h[v])!==(d==null?void 0:d[v]))return lt(h[v],d[v])}}return e<o?1:-1})}function ct(t){const n=new Map;return e=>(n.has(e)||n.set(e,t(e)),n.get(e))}function ut(t){const n=[];let e=0;for(;e<=t.length;){const o=t.indexOf("[",e),s=o===-1;if(n.push([at,t.slice(e,s?void 0:o),!1]),s)break;const a=t[o+1]==="["?F:t[o+1]==="."?$:it,i=a===F?"]]":"]",c=t.indexOf(i,o);if(c===-1)throw new Error(`Invalid route definition ${t}`);const r=t.slice(o,e=c+i.length);n.push([a,r,r.includes("=")])}return n}const z=t=>t.replace(/\[\[[^\]]+\]\](?!$)/g,"").split("/").filter(Boolean);function lt(t,n){if(t===n)return 0;let e=0;for(;t[e]===n[e];)e++;return t[e]?n[e]?t[e]<n[e]?-1:1:-1:1}const ft=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function gt(t){const n=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${U(t).map(o=>{const s=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(o);if(s)return n.push({name:s[1],matcher:s[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const a=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(o);if(a)return n.push({name:a[1],matcher:a[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!o)return;const i=o.split(/\[(.+?)\](?!\])/);return"/"+i.map((r,u)=>{if(u%2){if(r.startsWith("x+"))return j(String.fromCharCode(parseInt(r.slice(2),16)));if(r.startsWith("u+"))return j(String.fromCharCode(...r.slice(2).split("-").map(_=>parseInt(_,16))));const f=ft.exec(r);if(!f)throw new Error(`Invalid param: ${r}`);const[,l,g,m,x]=f;return n.push({name:m,matcher:x,optional:!!l,rest:!!g,chained:g?u===1&&i[0]==="":!1}),g?"(.*?)":l?"([^/]*)?":"([^/]+?)"}return j(r)}).join("")}).join("")}/?$`),params:n}}function ht(t,n,e){const o={},s=t.slice(1),a=s.filter(c=>c!==void 0);let i=0;for(const[c,r]of n.entries()){let u=s[c-i];if(r.chained&&r.rest&&i&&(u=s.slice(c-i,c+1).filter(l=>l).join("/"),i=0),u===void 0){r.rest&&(o[r.name]="");continue}if(r.matcher&&!e[r.matcher])return;if((e[r.matcher]??(()=>!0))(u)){o[r.name]=u;const l=n[c+1],g=s[c+1];l&&!l.rest&&l.optional&&g&&r.chained&&(i=0),!l&&!g&&Object.keys(o).length===a.length&&(i=0);continue}if(r.optional&&r.chained){i++;continue}return}if(!i)return o}function j(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const dt=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function M(t,n){return"/"+U(t).map(e=>e.replace(dt,(o,s,a,i)=>{const c=n[i];if(!c){if(s||a&&c!==void 0)return"";throw new Error(`Missing parameter '${i}' in route ${t}`)}if(c[0]=="/"||c.endsWith("/"))throw new Error(`Parameter '${i}' in route ${t} cannot start or end with a slash`);return c})).filter(Boolean).join("/")}function N(t,n,e){const o=st(n);for(const s of o){const a=gt(s),i=a.pattern.exec(pt(t));if(!i)continue;const c=ht(i,a.params,e);if(c)return{params:c,id:s}}}const pt=t=>t.endsWith("/")?t.slice(0,-1):t,U=t=>t.slice(1).split("/");function mt(t,n,e,o,s){function a(r){const f=r.split("/")[1];if(t.includes(f)&&(s==="always"||f!==n))return f;if(s==="never")return n}function i(r,u){const f=r.endsWith("/")&&r!=="/";r=f?r.slice(0,-1):r;let l=vt(r,u,e,o);return f&&(l+="/"),(s==="always"||u!==n)&&(l=`/${u}${l}`),l}function c(r,u){const f=r.endsWith("/")&&r!=="/";(s==="always"||u!==n)&&(r=r.replace(`/${u}`,"")||"/");const l=f;r=l?r.slice(0,-1):r;let g=_t(r,u,e,o);return l&&(g+="/"),g}return{getLanguageFromLocalisedPath:a,getLocalisedPath:i,getCanonicalPath:c}}function _t(t,n,e,o){for(const[s,a]of Object.entries(e)){if(!(n in a))continue;const i=a[n];if(!i)continue;const c=N(t,[i],o);if(c)return M(s,c.params)}return t}function vt(t,n,e,o){const s=N(t,Object.keys(e),o);if(!s)return t;const a=e[s.id];if(!a)return t;const i=a[n];return i?M(i,s.params):t}function xt(t,n){const e={},o=[],s=t.sourceLanguageTag,a={defaultLanguageTag:s,runtime:t,translations:e,matchers:{},exclude:nt(o),prefixDefaultLanguage:"never",textDirection:ot(t.availableLanguageTags),seo:{noAlternateLinks:!1}},i=mt(t.availableLanguageTags,s,a.translations,a.matchers,a.prefixDefaultLanguage);return Object.freeze(e),Object.freeze(a),{config:a,strategy:i,reroute:()=>tt(i),handle:()=>{throw new Error("")},getLanguageFromUrl(c){const r=E(w),[u]=S(c.pathname,r);return a.exclude(u)?a.defaultLanguageTag:i.getLanguageFromLocalisedPath(u)||a.defaultLanguageTag},resolveRoute(c,r=void 0){if(a.exclude(c))return c;const u=E(w),[f,l]=S(c,u);if(r=r??t.languageTag(),!c.startsWith(u))return c;const g=i.getLocalisedPath(f,r);return B(g,u,l)},route(c){const r=E(w),[u,f]=S(c,r),g=i.getLanguageFromLocalisedPath(u)||a.defaultLanguageTag,m=i.getCanonicalPath(u,g);return B(m,r,f)}}}function E(t){return t===""?"":t.startsWith("/")?t:G(t,new URL(H(X).url))}const It=xt(q);export{It as i,G as n,S as p,B as s};
@@ -0,0 +1 @@
1
+ const M=/\{[^{}]+\}/g,k=()=>{var r,t;return typeof process=="object"&&Number.parseInt((t=(r=process==null?void 0:process.versions)==null?void 0:r.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function F(){return Math.random().toString(36).slice(2,11)}function N(r){let{baseUrl:t="",Request:e=globalThis.Request,fetch:s=globalThis.fetch,querySerializer:n,bodySerializer:i,headers:f,requestInitExt:l=void 0,...H}={...r};l=k()?l:void 0,t=z(t);const y=[];async function h(a,o){const{baseUrl:m,fetch:q=s,Request:K=e,headers:D,params:p={},parseAs:A="json",querySerializer:E,bodySerializer:C=i??V,body:L,...I}=o||{};m&&(t=z(m));let T=typeof n=="function"?n:x(n);E&&(T=typeof E=="function"?E:x({...typeof n=="object"?n:{},...E}));const O=L===void 0?void 0:C(L),B=O===void 0||O instanceof FormData?{}:{"Content-Type":"application/json"},v={redirect:"follow",...H,...I,body:O,headers:Q(B,f,D,p.header)};let j,S,b=new e(W(a,{baseUrl:t,params:p,querySerializer:T}),v);for(const u in I)u in b||(b[u]=I[u]);if(y.length){j=F(),S=Object.freeze({baseUrl:t,fetch:q,parseAs:A,querySerializer:T,bodySerializer:C});for(const u of y)if(u&&typeof u=="object"&&typeof u.onRequest=="function"){const d=await u.onRequest({request:b,schemaPath:a,params:p,options:S,id:j});if(d){if(!(d instanceof e))throw new Error("onRequest: must return new Request() when modifying the request");b=d}}}let c;try{c=await q(b,l)}catch(u){let d=u;if(y.length)for(let R=y.length-1;R>=0;R--){const g=y[R];if(g&&typeof g=="object"&&typeof g.onError=="function"){const w=await g.onError({request:b,error:d,schemaPath:a,params:p,options:S,id:j});if(w){if(w instanceof Response){d=void 0,c=w;break}if(w instanceof Error){d=w;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(d)throw d}if(y.length)for(let u=y.length-1;u>=0;u--){const d=y[u];if(d&&typeof d=="object"&&typeof d.onResponse=="function"){const R=await d.onResponse({request:b,response:c,schemaPath:a,params:p,options:S,id:j});if(R){if(!(R instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");c=R}}}if(c.status===204||c.headers.get("Content-Length")==="0")return c.ok?{data:void 0,response:c}:{error:void 0,response:c};if(c.ok)return A==="stream"?{data:c.body,response:c}:{data:await c[A](),response:c};let $=await c.text();try{$=JSON.parse($)}catch{}return{error:$,response:c}}return{request(a,o,m){return h(o,{...m,method:a.toUpperCase()})},GET(a,o){return h(a,{...o,method:"GET"})},PUT(a,o){return h(a,{...o,method:"PUT"})},POST(a,o){return h(a,{...o,method:"POST"})},DELETE(a,o){return h(a,{...o,method:"DELETE"})},OPTIONS(a,o){return h(a,{...o,method:"OPTIONS"})},HEAD(a,o){return h(a,{...o,method:"HEAD"})},PATCH(a,o){return h(a,{...o,method:"PATCH"})},TRACE(a,o){return h(a,{...o,method:"TRACE"})},use(...a){for(const o of a)if(o){if(typeof o!="object"||!("onRequest"in o||"onResponse"in o||"onError"in o))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");y.push(o)}},eject(...a){for(const o of a){const m=y.indexOf(o);m!==-1&&y.splice(m,1)}}}}function U(r,t,e){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${(e==null?void 0:e.allowReserved)===!0?t:encodeURIComponent(t)}`}function _(r,t,e){if(!t||typeof t!="object")return"";const s=[],n={simple:",",label:".",matrix:";"}[e.style]||"&";if(e.style!=="deepObject"&&e.explode===!1){for(const l in t)s.push(l,e.allowReserved===!0?t[l]:encodeURIComponent(t[l]));const f=s.join(",");switch(e.style){case"form":return`${r}=${f}`;case"label":return`.${f}`;case"matrix":return`;${r}=${f}`;default:return f}}for(const f in t){const l=e.style==="deepObject"?`${r}[${f}]`:f;s.push(U(l,t[f],e))}const i=s.join(n);return e.style==="label"||e.style==="matrix"?`${n}${i}`:i}function P(r,t,e){if(!Array.isArray(t))return"";if(e.explode===!1){const i={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[e.style]||",",f=(e.allowReserved===!0?t:t.map(l=>encodeURIComponent(l))).join(i);switch(e.style){case"simple":return f;case"label":return`.${f}`;case"matrix":return`;${r}=${f}`;default:return`${r}=${f}`}}const s={simple:",",label:".",matrix:";"}[e.style]||"&",n=[];for(const i of t)e.style==="simple"||e.style==="label"?n.push(e.allowReserved===!0?i:encodeURIComponent(i)):n.push(U(r,i,e));return e.style==="label"||e.style==="matrix"?`${s}${n.join(s)}`:n.join(s)}function x(r){return function(e){const s=[];if(e&&typeof e=="object")for(const n in e){const i=e[n];if(i!=null){if(Array.isArray(i)){if(i.length===0)continue;s.push(P(n,i,{style:"form",explode:!0,...r==null?void 0:r.array,allowReserved:(r==null?void 0:r.allowReserved)||!1}));continue}if(typeof i=="object"){s.push(_(n,i,{style:"deepObject",explode:!0,...r==null?void 0:r.object,allowReserved:(r==null?void 0:r.allowReserved)||!1}));continue}s.push(U(n,i,r))}}return s.join("&")}}function G(r,t){let e=r;for(const s of r.match(M)??[]){let n=s.substring(1,s.length-1),i=!1,f="simple";if(n.endsWith("*")&&(i=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(f="label",n=n.substring(1)):n.startsWith(";")&&(f="matrix",n=n.substring(1)),!t||t[n]===void 0||t[n]===null)continue;const l=t[n];if(Array.isArray(l)){e=e.replace(s,P(n,l,{style:f,explode:i}));continue}if(typeof l=="object"){e=e.replace(s,_(n,l,{style:f,explode:i}));continue}if(f==="matrix"){e=e.replace(s,`;${U(n,l)}`);continue}e=e.replace(s,f==="label"?`.${encodeURIComponent(l)}`:encodeURIComponent(l))}return e}function V(r){return r instanceof FormData?r:JSON.stringify(r)}function W(r,t){var n;let e=`${t.baseUrl}${r}`;(n=t.params)!=null&&n.path&&(e=G(e,t.params.path));let s=t.querySerializer(t.params.query??{});return s.startsWith("?")&&(s=s.substring(1)),s&&(e+=`?${s}`),e}function Q(...r){const t=new Headers;for(const e of r){if(!e||typeof e!="object")continue;const s=e instanceof Headers?e.entries():Object.entries(e);for(const[n,i]of s)if(i===null)t.delete(n);else if(Array.isArray(i))for(const f of i)t.append(n,f);else i!==void 0&&t.set(n,i)}return t}function z(r){return r.endsWith("/")?r.substring(0,r.length-1):r}const Y="/images",X="/videos/media",Z="/frames/media",J="/",ee="phc_LB62TVP2O3S2goH4KASascsXRT14H7zfxHVfo7d2cLV",re="https://eu.i.posthog.com",te=N({baseUrl:J,fetch});export{X as P,Z as a,Y as b,te as c,ee as d,re as e,J as f};
@@ -0,0 +1 @@
1
+ import{A as L,D as E,P as B,E as N,V as Y,B as j,W as R,Y as F,F as C,_ as K,a8 as M,a9 as U,m as y,H as q,aa as b,ab as S,ac as $,ad as z,g,e as G,h as H,O as V,ae as W,w as Z,af as J,ag as Q,ah as X,ai as k,aj as v,ak as A,al as ee,am as re}from"./DkbXUtyG.js";import{c as ne}from"./B_1cpokE.js";import{l as te}from"./DIeogL5L.js";function le(e,r,t){E&&B();var n=e,i,a,u=null,f=null;function c(){a&&(K(a),a=null),u&&(u.lastChild.remove(),n.before(u),u=null),a=f,f=null}L(()=>{if(i!==(i=r())){var d=F();if(i){var l=n;d&&(u=document.createDocumentFragment(),u.append(l=Y()),a&&R.skipped_effects.add(a)),f=j(()=>t(l,i))}d?R.add_callback(c):c()}},N),E&&(n=C)}function x(e,r){return e===r||(e==null?void 0:e[b])===r}function ce(e={},r,t,n){return M(()=>{var i,a;return U(()=>{i=a,a=[],y(()=>{e!==t(...a)&&(r(e,...a),i&&x(t(...i),e)&&r(null,...i))})}),()=>{q(()=>{a&&x(t(...a),e)&&r(null,...a)})}}),e}const ie={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function oe(e,r,t){return new Proxy({props:e,exclude:r},ie)}const ae={get(e,r){let t=e.props.length;for(;t--;){let n=e.props[t];if(v(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,t){let n=e.props.length;for(;n--;){let i=e.props[n];v(i)&&(i=i());const a=S(i,r);if(a&&a.set)return a.set(t),!0}return!1},getOwnPropertyDescriptor(e,r){let t=e.props.length;for(;t--;){let n=e.props[t];if(v(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const i=S(n,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===b||r===A)return!1;for(let t of e.props)if(v(t)&&(t=t()),t!=null&&r in t)return!0;return!1},ownKeys(e){const r=[];for(let t of e.props)if(v(t)&&(t=t()),!!t){for(const n in t)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(t))r.includes(n)||r.push(n)}return r}};function de(...e){return new Proxy({props:e},ae)}function pe(e,r,t,n){var w;var i=!te||(t&X)!==0,a=(t&Q)!==0,u=(t&ee)!==0,f=n,c=!0,d=()=>(c&&(c=!1,f=u?y(n):n),f),l;if(a){var I=b in e||A in e;l=((w=S(e,r))==null?void 0:w.set)??(I&&r in e?s=>e[r]=s:void 0)}var p,m=!1;a?[p,m]=ne(()=>e[r]):p=e[r],p===void 0&&n!==void 0&&(p=d(),l&&(i&&$(),l(p)));var o;if(i?o=()=>{var s=e[r];return s===void 0?d():(c=!0,s)}:o=()=>{var s=e[r];return s!==void 0&&(f=void 0),s===void 0?f:s},i&&!(t&z))return o;if(l){var D=e.$$legacy;return function(s,h){return arguments.length>0?((!i||!h||D||m)&&l(h?o():s),s):o()}}var P=!1,_=(t&k?Z:J)(()=>(P=!1,o()));a&&g(_);var T=V;return function(s,h){if(arguments.length>0){const O=h?g(_):i&&a?G(s):s;return H(_,O),P=!0,f!==void 0&&(f=O),s}return re&&P||T.f&W?_.v:g(_)}}export{ce as b,le as c,pe as p,oe as r,de as s};
@@ -0,0 +1 @@
1
+ import{s as e}from"./xGHZQ1pe.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import{f as m}from"./DkbXUtyG.js";import{c as i,a as p}from"./CmLg0ys7.js";import{s as n}from"./VqWvU2yF.js";function d(o,a){var r=i(),t=m(r);n(t,()=>a.children),p(o,r)}export{d as L};
@@ -0,0 +1 @@
1
+ import{b as E}from"./BpLiSKgx.js";import{x as s,i as m,y as F}from"./DkbXUtyG.js";function p(n,i){const r=s((()=>{if(typeof sessionStorage>"u")return i;try{const o=sessionStorage.getItem(n);if(o)return JSON.parse(o)}catch(o){console.warn(`Failed to read ${n} from sessionStorage`,o)}return i})());return r.subscribe(o=>{if(!(typeof sessionStorage>"u"))try{sessionStorage.setItem(n,JSON.stringify(o))}catch(h){console.warn(`Failed to write ${n} to sessionStorage`,h)}}),r}const c=s([]),R=()=>({reversibleActions:c,addReversibleAction:n=>{c.update(i=>[n,...i].slice(0,50))},executeReversibleAction:async n=>{const i=m(c),l=i.find(r=>r.id===n);if(l){await l.execute();const r=i.findIndex(o=>o.id===n);c.update(o=>o.slice(r+1))}},clearReversibleActions:()=>{c.set([])},clearReversibleActionsByGroupId:n=>{c.update(i=>i.filter(l=>l.groupId!==n))},hasReversibleActions:()=>m(c).length>0}),A=s("samples"),u=s({}),S=s(new Set),g=s(new Set),b=s(0),w=s(0),v=s(0),y=s(!1),_=s(void 0),I=p("lightlyStudio_sampleSize",{width:6,height:6}),C=p("lightlyStudio_metadata_bounds",{}),D=p("lightlyStudio_metadata_values",{}),x=p("lightlyStudio_metadata_info",[]),G=s(void 0),P=s([]),f=s({}),z=s(!1),V=n=>{z.set(n)},H=s(1),J=s(1),M=s({}),T=s(!1),j=()=>{const n=R();return{tags:G,textEmbedding:_,setTextEmbedding:e=>{_.set(e)},selectedSampleIdsByDataset:u,getSelectedSampleIds:e=>F(u,t=>t[e]??new Set),selectedSampleAnnotationCropIds:S,selectedAnnotationFilterIds:g,filteredAnnotationCount:b,filteredSampleCount:w,datasetVersions:f,hideAnnotations:y,classifiers:P,metadataBounds:C,metadataValues:D,metadataInfo:x,updateMetadataValues:e=>{D.set(e)},updateMetadataBounds:e=>{C.set(e)},updateMetadataInfo:e=>{x.set(e)},filteredFramesCount:v,setHideAnnotations:e=>{y.set(e)},getDatasetVersion:async e=>{const t=m(f);if(t[e])return t[e];const{data:a}=await E({path:{dataset_id:e}});if(a!=null&&a.created_at){const d=new Date(a.created_at).getTime().toString();return f.update(B=>({...B,[e]:d})),d}return""},toggleSampleSelection:(e,t)=>{u.update(a=>{const d=a[t]??new Set;return d.has(e)?d.delete(e):d.add(e),{...a,[t]:new Set([...d])}})},clearSelectedSamples:e=>{u.update(t=>({...t,[e]:new Set}))},toggleSampleAnnotationCropSelection:e=>{S.update(t=>(t.has(e)?t.delete(e):t.add(e),t))},clearSelectedSampleAnnotationCrops:()=>{S.update(e=>(e.clear(),e))},lastGridType:A,setLastGridType:e=>{A.set(e)},setSelectedAnnotationFilterIds:e=>{g.update(t=>(t.has(e)?t.delete(e):t.add(e),t))},clearSelectedAnnotationFilterIds:()=>{g.update(e=>(e.clear(),e))},setfilteredAnnotationCount:e=>{b.set(e)},setfilteredSampleCount:e=>{w.set(e)},setfilteredFramesCount:e=>{v.set(e)},sampleSize:I,updateSampleSize:e=>{I.set({width:e,height:e})},isEditingMode:z,setIsEditingMode:V,showPlot:T,setShowPlot:e=>{T.set(e)},imageBrightness:H,imageContrast:J,setDataset:e=>{M.update(t=>({...t,[e.dataset_id]:{sampleType:e.sample_type,parentDatasetId:e.parent_dataset_id,datasetId:e.dataset_id}}))},retrieveParentDataset:(e,t)=>{const a=e[t];return a!=null&&a.parentDatasetId?e[a.parentDatasetId]:null},datasets:M,...n}};export{p as a,j as u};
@@ -0,0 +1 @@
1
+ import{R as e,H as o}from"./CYgJF_JY.js";function i(r,t){throw new o(r,t)}function c(r,t){throw new e(r,t.toString())}new TextEncoder;export{i as e,c as r};
@@ -0,0 +1 @@
1
+ var B=t=>{throw TypeError(t)};var G=(t,e,s)=>e.has(t)||B("Cannot "+s);var n=(t,e,s)=>(G(t,e,"read from private field"),s?s.call(t):e.get(t)),p=(t,e,s)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),h=(t,e,s,r)=>(G(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),g=(t,e,s)=>(G(t,e,"access private method"),s);import{aO as se,aN as V,aP as fe}from"./DkbXUtyG.js";var re=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},I=typeof window>"u"||"Deno"in globalThis;function J(){}function Me(t,e){return typeof t=="function"?t(e):t}function de(t){return typeof t=="number"&&t>=0&&t!==1/0}function ye(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xe(t,e){return typeof t=="function"?t(e):t}function pe(t,e){return typeof t=="function"?t(e):t}function Ke(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:a}=t;if(l){if(r){if(e.queryHash!==ve(l,e.options))return!1}else if(!z(e.queryKey,l))return!1}if(s!=="all"){const f=e.isActive();if(s==="active"&&!f||s==="inactive"&&f)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||o&&!o(e))}function Le(t,e){const{exact:s,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if(H(e.options.mutationKey)!==H(o))return!1}else if(!z(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function ve(t,e){return((e==null?void 0:e.queryKeyHashFn)||H)(t)}function H(t){return JSON.stringify(t,(e,s)=>$(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function z(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(s=>!z(t[s],e[s])):!1}function ie(t,e){if(t===e)return t;const s=W(t)&&W(e);if(s||$(t)&&$(e)){const r=s?t:Object.keys(t),i=r.length,o=s?e:Object.keys(e),l=o.length,a=s?[]:{};let f=0;for(let w=0;w<l;w++){const y=s?w:o[w];(!s&&r.includes(y)||s)&&t[y]===void 0&&e[y]===void 0?(a[y]=void 0,f++):(a[y]=ie(t[y],e[y]),a[y]===t[y]&&t[y]!==void 0&&f++)}return i===l&&f===i?t:a}return e}function ke(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function W(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function $(t){if(!X(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!X(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function X(t){return Object.prototype.toString.call(t)==="[object Object]"}function be(t){return new Promise(e=>{setTimeout(e,t)})}function me(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?ie(t,e):e}function Ie(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Qe(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var ne=Symbol();function Se(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===ne?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var q,j,T,Y,we=(Y=class extends re{constructor(){super();p(this,q);p(this,j);p(this,T);h(this,T,e=>{if(!I&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,j)||this.setEventListener(n(this,T))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,j))==null||e.call(this),h(this,j,void 0))}setEventListener(e){var s;h(this,T,e),(s=n(this,j))==null||s.call(this),h(this,j,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){n(this,q)!==e&&(h(this,q,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof n(this,q)=="boolean"?n(this,q):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},q=new WeakMap,j=new WeakMap,T=new WeakMap,Y),Fe=new we,A,O,M,Z,Ce=(Z=class extends re{constructor(){super();p(this,A,!0);p(this,O);p(this,M);h(this,M,e=>{if(!I&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,O)||this.setEventListener(n(this,M))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,O))==null||e.call(this),h(this,O,void 0))}setEventListener(e){var s;h(this,M,e),(s=n(this,O))==null||s.call(this),h(this,O,e(this.setOnline.bind(this)))}setOnline(e){n(this,A)!==e&&(h(this,A,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return n(this,A)}},A=new WeakMap,O=new WeakMap,M=new WeakMap,Z),ae=new Ce;function ge(){let t,e;const s=new Promise((i,o)=>{t=i,e=o});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},s.reject=i=>{r({status:"rejected",reason:i}),e(i)},s}function Re(t){return Math.min(1e3*2**t,3e4)}function ue(t){return(t??"online")==="online"?ae.isOnline():!0}var oe=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function N(t){return t instanceof oe}function Ee(t){let e=!1,s=0,r=!1,i;const o=ge(),l=c=>{var b;r||(d(new oe(c)),(b=t.abort)==null||b.call(t))},a=()=>{e=!0},f=()=>{e=!1},w=()=>Fe.isFocused()&&(t.networkMode==="always"||ae.isOnline())&&t.canRun(),y=()=>ue(t.networkMode)&&t.canRun(),u=c=>{var b;r||(r=!0,(b=t.onSuccess)==null||b.call(t,c),i==null||i(),o.resolve(c))},d=c=>{var b;r||(r=!0,(b=t.onError)==null||b.call(t,c),i==null||i(),o.reject(c))},E=()=>new Promise(c=>{var b;i=C=>{(r||w())&&c(C)},(b=t.onPause)==null||b.call(t)}).then(()=>{var c;i=void 0,r||(c=t.onContinue)==null||c.call(t)}),F=()=>{if(r)return;let c;const b=s===0?t.initialPromise:void 0;try{c=b??t.fn()}catch(C){c=Promise.reject(C)}Promise.resolve(c).then(u).catch(C=>{var _;if(r)return;const L=t.retry??(I?0:3),Q=t.retryDelay??Re,he=typeof Q=="function"?Q(s,C):Q,le=L===!0||typeof L=="number"&&s<L||typeof L=="function"&&L(s,C);if(e||!le){d(C);return}s++,(_=t.onFail)==null||_.call(t,s,C),be(he).then(()=>w()?void 0:E()).then(()=>{e?d(C):F()})})};return{promise:o,cancel:l,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:f,canStart:y,start:()=>(y()?F():E().then(F),o)}}function je(){let t=[],e=0,s=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{e?t.push(a):i(()=>{s(a)})},l=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(f=>{s(f)})})})};return{batch:a=>{let f;e++;try{f=a()}finally{e--,e||l()}return f},batchCalls:a=>(...f)=>{o(()=>{a(...f)})},schedule:o,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Oe=je(),U,ee,qe=(ee=class{constructor(){p(this,U)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),de(this.gcTime)&&h(this,U,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(I?1/0:5*60*1e3))}clearGcTimeout(){n(this,U)&&(clearTimeout(n(this,U)),h(this,U,void 0))}},U=new WeakMap,ee),x,K,m,P,v,k,D,S,R,te,Ge=(te=class extends qe{constructor(e){super();p(this,S);p(this,x);p(this,K);p(this,m);p(this,P);p(this,v);p(this,k);p(this,D);h(this,D,!1),h(this,k,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(this,P,e.client),h(this,m,n(this,P).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h(this,x,Pe(this.options)),this.state=e.state??n(this,x),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=n(this,v))==null?void 0:e.promise}setOptions(e){this.options={...n(this,k),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,m).remove(this)}setData(e,s){const r=me(this.state.data,e,this.options);return g(this,S,R).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e,s){g(this,S,R).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var r,i;const s=(r=n(this,v))==null?void 0:r.promise;return(i=n(this,v))==null||i.cancel(e),s?s.then(J).catch(J):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(n(this,x))}isActive(){return this.observers.some(e=>pe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ne||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!ye(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=n(this,v))==null||s.continue()}onOnline(){var s;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=n(this,v))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),n(this,m).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(n(this,v)&&(n(this,D)?n(this,v).cancel({revert:!0}):n(this,v).cancelRetry()),this.scheduleGc()),n(this,m).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||g(this,S,R).call(this,{type:"invalidate"})}fetch(e,s){var f,w,y;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,v))return n(this,v).continueRetry(),n(this,v).promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(h(this,D,!0),r.signal)})},o=()=>{const u=Se(this.options,s),d={client:n(this,P),queryKey:this.queryKey,meta:this.meta};return i(d),h(this,D,!1),this.options.persister?this.options.persister(u,d,this):u(d)},l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:n(this,P),state:this.state,fetchFn:o};i(l),(f=this.options.behavior)==null||f.onFetch(l,this),h(this,K,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=l.fetchOptions)==null?void 0:w.meta))&&g(this,S,R).call(this,{type:"fetch",meta:(y=l.fetchOptions)==null?void 0:y.meta});const a=u=>{var d,E,F,c;N(u)&&u.silent||g(this,S,R).call(this,{type:"error",error:u}),N(u)||((E=(d=n(this,m).config).onError)==null||E.call(d,u,this),(c=(F=n(this,m).config).onSettled)==null||c.call(F,this.state.data,u,this)),this.scheduleGc()};return h(this,v,Ee({initialPromise:s==null?void 0:s.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,E,F,c;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(E=(d=n(this,m).config).onSuccess)==null||E.call(d,u,this),(c=(F=n(this,m).config).onSettled)==null||c.call(F,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{g(this,S,R).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{g(this,S,R).call(this,{type:"pause"})},onContinue:()=>{g(this,S,R).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),n(this,v).start()}},x=new WeakMap,K=new WeakMap,m=new WeakMap,P=new WeakMap,v=new WeakMap,k=new WeakMap,D=new WeakMap,S=new WeakSet,R=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ue(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return N(i)&&i.revert&&n(this,K)?{...n(this,K),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=s(this.state),Oe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),n(this,m).notify({query:this,type:"updated",action:e})})},te);function Ue(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ue(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Pe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}const ce="$$_queryClient",Ne=()=>{const t=se(ce);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},He=t=>{fe(ce,t)},De="$$_isRestoring",$e=()=>{try{const t=se(De);return t||V(!1)}catch{return V(!1)}};export{He as A,Ge as Q,qe as R,re as S,xe as a,de as b,Ue as c,me as d,Oe as e,Fe as f,$e as g,Ne as h,I as i,Ee as j,Se as k,Qe as l,Ie as m,J as n,ve as o,ge as p,Ke as q,pe as r,ke as s,ye as t,Le as u,ae as v,Me as w,H as x,z as y,ne as z};
@@ -0,0 +1 @@
1
+ import{a as o,u as s,c as r}from"./VYb2dkNs.js";const u=({datasetId:e})=>{const t=o({path:{dataset_id:e}}),a=s();return{rootDataset:r(t),refetch:()=>{a.invalidateQueries({queryKey:t.queryKey})}}};export{u};
@@ -0,0 +1 @@
1
+ var yt=e=>{throw TypeError(e)};var H=(e,t,a)=>t.has(e)||yt("Cannot "+a);var n=(e,t,a)=>(H(e,t,"read from private field"),a?a.call(e):t.get(e)),f=(e,t,a)=>t.has(e)?yt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),l=(e,t,a,s)=>(H(e,t,"write to private field"),s?s.call(e,a):t.set(e,a),a),y=(e,t,a)=>(H(e,t,"access private method"),a);import{f as It,h as Et,i as Rt,j as Ct,k as Qt,l as qt,u as St,m as Kt,n as Mt,o as Dt,p as xt,g as Tt,q as Bt,s as Vt,t as Ut,v as Lt,w as jt,x as Pt,y as Wt,e as kt,z as _t,A as zt,B as Nt,C as Gt,D as Ht,E as Jt}from"./BpLiSKgx.js";import{c as Xt}from"./CvGjimpO.js";import{aN as Yt,y as J,i as rt,x as Zt}from"./DkbXUtyG.js";import{u as it}from"./KNLP4aJU.js";import{S as $t,p as ft,r as A,s as X,a as k,n as te,i as mt,b as pt,t as ee,f as ae,c as se,d as bt,e as vt,g as ne,h as re}from"./MErlcOXj.js";var g,r,j,O,S,T,R,v,P,B,V,K,M,C,U,c,L,Y,Z,$,tt,et,at,st,At,Ft,ie=(Ft=class extends $t{constructor(t,a){super();f(this,c);f(this,g);f(this,r);f(this,j);f(this,O);f(this,S);f(this,T);f(this,R);f(this,v);f(this,P);f(this,B);f(this,V);f(this,K);f(this,M);f(this,C);f(this,U,new Set);this.options=a,l(this,g,t),l(this,v,null),l(this,R,ft()),this.options.experimental_prefetchInRender||n(this,R).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(n(this,r).addObserver(this),Ot(n(this,r),this.options)?y(this,c,L).call(this):this.updateResult(),y(this,c,tt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nt(n(this,r),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nt(n(this,r),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,y(this,c,et).call(this),y(this,c,at).call(this),n(this,r).removeObserver(this)}setOptions(t,a){const s=this.options,o=n(this,r);if(this.options=n(this,g).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof A(this.options.enabled,n(this,r))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");y(this,c,st).call(this),n(this,r).setOptions(this.options),s._defaulted&&!X(this.options,s)&&n(this,g).getQueryCache().notify({type:"observerOptionsUpdated",query:n(this,r),observer:this});const i=this.hasListeners();i&&gt(n(this,r),o,this.options,s)&&y(this,c,L).call(this),this.updateResult(a),i&&(n(this,r)!==o||A(this.options.enabled,n(this,r))!==A(s.enabled,n(this,r))||k(this.options.staleTime,n(this,r))!==k(s.staleTime,n(this,r)))&&y(this,c,Y).call(this);const u=y(this,c,Z).call(this);i&&(n(this,r)!==o||A(this.options.enabled,n(this,r))!==A(s.enabled,n(this,r))||u!==n(this,C))&&y(this,c,$).call(this,u)}getOptimisticResult(t){const a=n(this,g).getQueryCache().build(n(this,g),t),s=this.createResult(a,t);return ue(this,s)&&(l(this,O,s),l(this,T,this.options),l(this,S,n(this,r).state)),s}getCurrentResult(){return n(this,O)}trackResult(t,a){const s={};return Object.keys(t).forEach(o=>{Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),a==null||a(o),t[o])})}),s}trackProp(t){n(this,U).add(t)}getCurrentQuery(){return n(this,r)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=n(this,g).defaultQueryOptions(t),s=n(this,g).getQueryCache().build(n(this,g),a);return s.fetch().then(()=>this.createResult(s,a))}fetch(t){return y(this,c,L).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),n(this,O)))}createResult(t,a){var lt;const s=n(this,r),o=this.options,i=n(this,O),u=n(this,S),p=n(this,T),I=t!==s?t.state:n(this,j),{state:h}=t;let d={...h},Q=!1,w;if(a._optimisticResults){const b=this.hasListeners(),D=!b&&Ot(t,a),x=b&&gt(t,s,a,o);(D||x)&&(d={...d,...se(h.data,t.options)}),a._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:ut,errorUpdatedAt:ct,status:q}=d;if(a.select&&d.data!==void 0)if(i&&d.data===(u==null?void 0:u.data)&&a.select===n(this,P))w=n(this,B);else try{l(this,P,a.select),w=a.select(d.data),w=bt(i==null?void 0:i.data,w,a),l(this,B,w),l(this,v,null)}catch(b){l(this,v,b)}else w=d.data;if(a.placeholderData!==void 0&&w===void 0&&q==="pending"){let b;if(i!=null&&i.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData))b=i.data;else if(b=typeof a.placeholderData=="function"?a.placeholderData((lt=n(this,V))==null?void 0:lt.state.data,n(this,V)):a.placeholderData,a.select&&b!==void 0)try{b=a.select(b),l(this,v,null)}catch(D){l(this,v,D)}b!==void 0&&(q="success",w=bt(i==null?void 0:i.data,b,a),Q=!0)}n(this,v)&&(ut=n(this,v),w=n(this,B),ct=Date.now(),q="error");const z=d.fetchStatus==="fetching",N=q==="pending",G=q==="error",ht=N&&z,dt=w!==void 0,F={status:q,fetchStatus:d.fetchStatus,isPending:N,isSuccess:q==="success",isError:G,isInitialLoading:ht,isLoading:ht,data:w,dataUpdatedAt:d.dataUpdatedAt,error:ut,errorUpdatedAt:ct,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>I.dataUpdateCount||d.errorUpdateCount>I.errorUpdateCount,isFetching:z,isRefetching:z&&!N,isLoadingError:G&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:Q,isRefetchError:G&&dt,isStale:ot(t,a),refetch:this.refetch,promise:n(this,R)};if(this.options.experimental_prefetchInRender){const b=W=>{F.status==="error"?W.reject(F.error):F.data!==void 0&&W.resolve(F.data)},D=()=>{const W=l(this,R,F.promise=ft());b(W)},x=n(this,R);switch(x.status){case"pending":t.queryHash===s.queryHash&&b(x);break;case"fulfilled":(F.status==="error"||F.data!==x.value)&&D();break;case"rejected":(F.status!=="error"||F.error!==x.reason)&&D();break}}return F}updateResult(t){const a=n(this,O),s=this.createResult(n(this,r),this.options);if(l(this,S,n(this,r).state),l(this,T,this.options),n(this,S).data!==void 0&&l(this,V,n(this,r)),X(s,a))return;l(this,O,s);const o={},i=()=>{if(!a)return!0;const{notifyOnChangeProps:u}=this.options,p=typeof u=="function"?u():u;if(p==="all"||!p&&!n(this,U).size)return!0;const E=new Set(p??n(this,U));return this.options.throwOnError&&E.add("error"),Object.keys(n(this,O)).some(I=>{const h=I;return n(this,O)[h]!==a[h]&&E.has(h)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),y(this,c,At).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&y(this,c,tt).call(this)}},g=new WeakMap,r=new WeakMap,j=new WeakMap,O=new WeakMap,S=new WeakMap,T=new WeakMap,R=new WeakMap,v=new WeakMap,P=new WeakMap,B=new WeakMap,V=new WeakMap,K=new WeakMap,M=new WeakMap,C=new WeakMap,U=new WeakMap,c=new WeakSet,L=function(t){y(this,c,st).call(this);let a=n(this,r).fetch(this.options,t);return t!=null&&t.throwOnError||(a=a.catch(te)),a},Y=function(){y(this,c,et).call(this);const t=k(this.options.staleTime,n(this,r));if(mt||n(this,O).isStale||!pt(t))return;const s=ee(n(this,O).dataUpdatedAt,t)+1;l(this,K,setTimeout(()=>{n(this,O).isStale||this.updateResult()},s))},Z=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(n(this,r)):this.options.refetchInterval)??!1},$=function(t){y(this,c,at).call(this),l(this,C,t),!(mt||A(this.options.enabled,n(this,r))===!1||!pt(n(this,C))||n(this,C)===0)&&l(this,M,setInterval(()=>{(this.options.refetchIntervalInBackground||ae.isFocused())&&y(this,c,L).call(this)},n(this,C)))},tt=function(){y(this,c,Y).call(this),y(this,c,$).call(this,y(this,c,Z).call(this))},et=function(){n(this,K)&&(clearTimeout(n(this,K)),l(this,K,void 0))},at=function(){n(this,M)&&(clearInterval(n(this,M)),l(this,M,void 0))},st=function(){const t=n(this,g).getQueryCache().build(n(this,g),this.options);if(t===n(this,r))return;const a=n(this,r);l(this,r,t),l(this,j,t.state),this.hasListeners()&&(a==null||a.removeObserver(this),t.addObserver(this))},At=function(t){vt.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a(n(this,O))}),n(this,g).getQueryCache().notify({query:n(this,r),type:"observerResultsUpdated"})})},Ft);function oe(e,t){return A(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ot(e,t){return oe(e,t)||e.state.data!==void 0&&nt(e,t,t.refetchOnMount)}function nt(e,t,a){if(A(t.enabled,e)!==!1){const s=typeof a=="function"?a(e):a;return s==="always"||s!==!1&&ot(e,t)}return!1}function gt(e,t,a,s){return(e!==t||A(s.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&ot(e,a)}function ot(e,t){return A(t.enabled,e)!==!1&&e.isStaleByTime(k(t.staleTime,e))}function ue(e,t){return!X(e.getCurrentResult(),t)}function ce(){return ne()}function he(e){return re()}function de(e){return"subscribe"in e&&typeof e.subscribe=="function"}function le(){}function ye(e,t,a){const s=he(),o=ce(),i=de(e)?e:Yt(e),u=J([i,o],([h,d])=>{const Q=s.defaultQueryOptions(h);return Q._optimisticResults=d?"isRestoring":"optimistic",Q}),p=new t(s,rt(u));u.subscribe(h=>{p.setOptions(h,{listeners:!1})});const E=J(o,(h,d)=>{const Q=h?le:p.subscribe(vt.batchCalls(d));return p.updateResult(),Q}),{subscribe:I}=J([E,u],([h,d])=>(h=p.getOptimisticResult(d),d.notifyOnChangeProps?h:p.trackResult(h)));return{subscribe:I}}function fe(e,t){return ye(e,ie)}function We(e){return e}const m=(e,t,a)=>{const s={_id:e,baseUrl:(t==null?void 0:t.baseUrl)||((t==null?void 0:t.client)??Xt).getConfig().baseUrl};return a&&(s._infinite=a),t!=null&&t.body&&(s.body=t.body),t!=null&&t.headers&&(s.headers=t.headers),t!=null&&t.path&&(s.path=t.path),t!=null&&t.query&&(s.query=t.query),[s]},_=(e,t)=>{const a={...e[0]};return t.body&&(a.body={...e[0].body,...t.body}),t.headers&&(a.headers={...e[0].headers,...t.headers}),t.path&&(a.path={...e[0].path,...t.path}),t.query&&(a.query={...e[0].query,...t.query}),a},me=e=>m("readRootDataset",e),ke=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Mt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:me(e)}),pe=e=>m("readImage",e),_e=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Kt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:pe(e)}),be=e=>m("readSamples",e,!0),ze=e=>({queryFn:async({pageParam:t,queryKey:a,signal:s})=>{const i=_(a,typeof t=="object"?t:{query:{cursor:t}}),{data:u}=await Wt({...e,...i,signal:s,throwOnError:!0});return u},queryKey:be(e)}),Ne=e=>({mutationFn:async a=>{const{data:s}=await Rt({...e,...a,throwOnError:!0});return s}}),Oe=e=>m("readAnnotationLabels",e),Ge=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Dt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Oe(e)}),He=e=>({mutationFn:async a=>{const{data:s}=await Qt({...e,...a,throwOnError:!0});return s}}),Je=e=>({mutationFn:async a=>{const{data:s}=await Ct({...e,...a,throwOnError:!0});return s}}),Xe=e=>({mutationFn:async a=>{const{data:s}=await St({...e,...a,throwOnError:!0});return s}}),ge=e=>m("countAnnotationsByDataset",e),Ye=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Vt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:ge(e)}),we=e=>m("readAnnotationsWithPayload",e,!0),Ze=e=>({queryFn:async({pageParam:t,queryKey:a,signal:s})=>{const i=_(a,typeof t=="object"?t:{query:{cursor:t}}),{data:u}=await Bt({...e,...i,signal:s,throwOnError:!0});return u},queryKey:we(e)}),$e=e=>({mutationFn:async a=>{const{data:s}=await Jt({...e,...a,throwOnError:!0});return s}}),ta=e=>({mutationFn:async a=>{const{data:s}=await It({...e,...a,throwOnError:!0});return s}}),Fe=e=>m("getAnnotation",e),ea=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await zt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Fe(e)}),ve=e=>m("getAnnotationWithPayload",e),aa=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Pt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:ve(e)}),sa=e=>({mutationFn:async a=>{const{data:s}=await Et({...e,...a,throwOnError:!0});return s}}),Ae=e=>m("getCaption",e),na=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Nt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Ae(e)}),ra=e=>({mutationFn:async a=>{const{data:s}=await Gt({...e,...a,throwOnError:!0});return s}}),ia=e=>({mutationFn:async a=>{const{data:s}=await qt({...e,...a,throwOnError:!0});return s}}),Ie=e=>m("embedText",e),oa=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Ut({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Ie(e)}),Ee=e=>m("get2dEmbeddings",e),ua=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Ht({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Ee(e)}),Re=e=>m("getMetadataInfo",e),Ce=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await xt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Re(e)}),Qe=e=>m("getAllFrames",e,!0),ca=e=>({queryFn:async({pageParam:t,queryKey:a,signal:s})=>{const i=_(a,typeof t=="object"?t:{query:{cursor:t}}),{data:u}=await kt({...e,...i,signal:s,throwOnError:!0});return u},queryKey:Qe(e)}),qe=e=>m("getFrameById",e),ha=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await _t({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:qe(e)}),Se=e=>m("countVideoFrameAnnotations",e),da=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await Lt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Se(e)}),Ke=e=>m("countVideoFrameAnnotationsByVideoDataset",e),la=e=>({queryFn:async({queryKey:t,signal:a})=>{const{data:s}=await jt({...e,...t[0],signal:a,throwOnError:!0});return s},queryKey:Ke(e)}),Me=e=>m("getAllVideos",e,!0),ya=e=>({queryFn:async({pageParam:t,queryKey:a,signal:s})=>{const i=_(a,typeof t=="object"?t:{query:{cursor:t}}),{data:u}=await Tt({...e,...i,signal:s,throwOnError:!0});return u},queryKey:Me(e)}),wt=Zt(),De=async e=>{if(rt(wt)==e)return;const t=Ce({path:{dataset_id:e}});fe(t).subscribe(s=>{if(s.data){const o=s.data,{updateMetadataBounds:i,updateMetadataValues:u,updateMetadataInfo:p}=it(),E={},I={};o.forEach(h=>{(h.type==="integer"||h.type==="float")&&h.min!=null&&h.max!=null&&(E[h.name]={min:h.min,max:h.max},I[h.name]={min:h.min,max:h.max})}),i(E),u(I),p(o),wt.set(e)}})},xe=e=>{const t=[],{metadataBounds:a}=it();for(const[s,o]of Object.entries(e)){const u=rt(a)[s];u&&(o.min>u.min&&t.push({key:s,value:o.min,op:">="}),o.max<u.max&&t.push({key:s,value:o.max,op:"<="}))}return t},fa=e=>{e&&De(e);const{metadataBounds:t,metadataValues:a,metadataInfo:s,updateMetadataValues:o,updateMetadataBounds:i,updateMetadataInfo:u}=it();return{metadataBounds:t,metadataValues:a,metadataInfo:s,updateMetadataValues:o,updateMetadataBounds:i,updateMetadataInfo:u,createMetadataFilters:xe}};export{le as A,Xe as B,Ze as C,ea as D,na as E,ra as F,We as G,ie as Q,ke as a,ia as b,fe as c,sa as d,xe as e,fa as f,ze as g,ca as h,Je as i,He as j,ta as k,ya as l,ha as m,_e as n,$e as o,aa as p,Ge as q,Ne as r,Ye as s,oa as t,he as u,ua as v,la as w,da as x,ye as y,de as z};
@@ -0,0 +1 @@
1
+ import{A as o,E as f,B as i,j as p,C as c,D as d,F as h}from"./DkbXUtyG.js";function _(e,n,...t){var s=e,r=p,a;o(()=>{r!==(r=n())&&(a&&(c(a),a=null),a=i(()=>r(s,...t)))},f),d&&(s=h)}export{_ as s};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import{p as S,d as x,e as h,u as v,g as e,h as d,c as a,s as u,r,a as V}from"./DkbXUtyG.js";import{f as j,a as A}from"./CmLg0ys7.js";import{p as _}from"./DuUalyFS.js";import{S as b}from"./CGY1p9L4.js";var B=j('<div class="flex items-center gap-6"><div class="flex items-center gap-2"><span class="text-sm text-muted-foreground">Brightness</span> <div class="slider-small w-28 svelte-v1a6wr"><!></div></div> <div class="flex items-center gap-2"><span class="text-sm text-muted-foreground">Contrast</span> <div class="slider-small w-28 svelte-v1a6wr"><!></div></div></div>');function E(w,m){S(m,!0);let i=_(m,"brightness",15,1),l=_(m,"contrast",15,1),s=x(h([i()])),t=x(h([l()]));v(()=>{i(e(s)[0])}),v(()=>{l(e(t)[0])}),v(()=>{i()!==e(s)[0]&&d(s,[i()],!0)}),v(()=>{l()!==e(t)[0]&&d(t,[l()],!0)});var n=B(),o=a(n),c=u(a(o),2),y=a(c);b(y,{type:"multiple",min:.2,max:2,step:.05,get value(){return e(s)},set value(p){d(s,p,!0)}}),r(c),r(o);var f=u(o,2),g=u(a(f),2),I=a(g);b(I,{type:"multiple",min:.2,max:2,step:.05,get value(){return e(t)},set value(p){d(t,p,!0)}}),r(g),r(f),r(n),A(w,n),V()}export{E as I};
@@ -0,0 +1 @@
1
+ import{i as f,x as n,y as S,z as o}from"./DkbXUtyG.js";import{a as L}from"./BpLiSKgx.js";import{u as b}from"./KNLP4aJU.js";const i=n({});function v(w){const{dataset_id:e,kind:l}=w,{tags:c}=b(),d=n(!1),g=n(null),r=n(!1),u=()=>{f(r)||(r.set(!0),L({path:{dataset_id:e}}).then(t=>{if(t.error)throw new Error(JSON.stringify(t.error));t.data&&c.set(t.data)}).catch(t=>{g.set(t)}).finally(()=>{r.set(!1)}))};!f(d)&&e&&(u(),d.set(!0));const m=S(c,t=>{const a=t??[];return l?a.filter(y=>l.includes(y.kind)):a}),T=S(i,t=>t[e]??new Set),h=t=>{i.update(a=>{const s=a[e]??new Set;return s.has(t)?s.delete(t):s.add(t),{...a,[e]:new Set([...s])}})},p=()=>{i.update(t=>({...t,[e]:new Set}))};return{tags:o(m),loadTags:u,tagsSelected:o(T),tagSelectionToggle:h,clearTagsSelected:p,isLoading:o(r),error:g}}export{v as u};
@@ -0,0 +1,2 @@
1
+ var Re=Object.defineProperty;var ae=t=>{throw TypeError(t)};var ke=(t,e,n)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var oe=(t,e,n)=>ke(t,typeof e!="symbol"?e+"":e,n),J=(t,e,n)=>e.has(t)||ae("Cannot "+n);var s=(t,e,n)=>(J(t,e,"read from private field"),n?n.call(t):e.get(t)),o=(t,e,n)=>e.has(t)?ae("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),i=(t,e,n,r)=>(J(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),g=(t,e,n)=>(J(t,e,"access private method"),n);import{an as Ne,g as _e,ao as pe,a9 as Se,m as De,ap as le,H as Z,F as w,D as T,aq as Fe,O as W,A as ve,P as Ce,a7 as K,R as Oe,B as F,ar as x,_ as X,L as ue,K as B,as as he,at as Ie,N as de,k as ge,au as Le,C as Q,T as P,n as Ve,S as Pe,av as fe,aw as He,E as Me,ax as xe,ay as Be,az as U,aA as Ye,V as ye,aB as We,aC as me,U as V,a2 as Ee,aD as ee,aE as te,aF as je,aG as qe,aH as Ue,aI as ze,p as Ge,aJ as Ke,aK as $e,a as Je}from"./DkbXUtyG.js";import{a as Xe,r as ce,h as Y}from"./D9SC3jBb.js";import{d as Qe}from"./CmLg0ys7.js";function Ze(t){let e=0,n=pe(0),r;return()=>{Ne()&&(_e(n),Se(()=>(e===0&&(r=De(()=>t(()=>le(n)))),e+=1,()=>{Z(()=>{e-=1,e===0&&(r==null||r(),r=void 0,le(n))})})))}}var et=Me|xe|Be;function tt(t,e,n){new st(t,e,n)}var y,f,M,m,C,E,v,h,b,A,O,R,I,k,z,G,l,be,Te,j,q,se;class st{constructor(e,n,r){o(this,l);oe(this,"parent");o(this,y,!1);o(this,f);o(this,M,T?w:null);o(this,m);o(this,C);o(this,E);o(this,v,null);o(this,h,null);o(this,b,null);o(this,A,null);o(this,O,0);o(this,R,0);o(this,I,!1);o(this,k,null);o(this,z,()=>{s(this,k)&&Fe(s(this,k),s(this,O))});o(this,G,Ze(()=>(i(this,k,pe(s(this,O))),()=>{i(this,k,null)})));i(this,f,e),i(this,m,n),i(this,C,r),this.parent=W.b,i(this,y,!!s(this,m).pending),i(this,E,ve(()=>{if(W.b=this,T){const u=s(this,M);Ce(),u.nodeType===K&&u.data===Oe?g(this,l,Te).call(this):g(this,l,be).call(this)}else{try{i(this,v,F(()=>r(s(this,f))))}catch(u){this.error(u)}s(this,R)>0?g(this,l,q).call(this):i(this,y,!1)}},et)),T&&i(this,f,w)}is_pending(){return s(this,y)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!s(this,m).pending}update_pending_count(e){g(this,l,se).call(this,e),i(this,O,s(this,O)+e),Le.add(s(this,z))}get_effect_pending(){return s(this,G).call(this),_e(s(this,k))}error(e){var n=s(this,m).onerror;let r=s(this,m).failed;if(s(this,I)||!n&&!r)throw e;s(this,v)&&(Q(s(this,v)),i(this,v,null)),s(this,h)&&(Q(s(this,h)),i(this,h,null)),s(this,b)&&(Q(s(this,b)),i(this,b,null)),T&&(P(s(this,M)),Ve(),P(Pe()));var u=!1,a=!1;const c=()=>{if(u){Ye();return}u=!0,a&&He(),x.ensure(),i(this,O,0),s(this,b)!==null&&X(s(this,b),()=>{i(this,b,null)}),i(this,y,this.has_pending_snippet()),i(this,v,g(this,l,j).call(this,()=>(i(this,I,!1),F(()=>s(this,C).call(this,s(this,f)))))),s(this,R)>0?g(this,l,q).call(this):i(this,y,!1)};var N=de;try{B(null),a=!0,n==null||n(e,c),a=!1}catch(S){fe(S,s(this,E)&&s(this,E).parent)}finally{B(N)}r&&Z(()=>{i(this,b,g(this,l,j).call(this,()=>{i(this,I,!0);try{return F(()=>{r(s(this,f),()=>e,()=>c)})}catch(S){return fe(S,s(this,E).parent),null}finally{i(this,I,!1)}}))})}}y=new WeakMap,f=new WeakMap,M=new WeakMap,m=new WeakMap,C=new WeakMap,E=new WeakMap,v=new WeakMap,h=new WeakMap,b=new WeakMap,A=new WeakMap,O=new WeakMap,R=new WeakMap,I=new WeakMap,k=new WeakMap,z=new WeakMap,G=new WeakMap,l=new WeakSet,be=function(){try{i(this,v,F(()=>s(this,C).call(this,s(this,f))))}catch(e){this.error(e)}i(this,y,!1)},Te=function(){const e=s(this,m).pending;e&&(i(this,h,F(()=>e(s(this,f)))),x.enqueue(()=>{i(this,v,g(this,l,j).call(this,()=>(x.ensure(),F(()=>s(this,C).call(this,s(this,f)))))),s(this,R)>0?g(this,l,q).call(this):(X(s(this,h),()=>{i(this,h,null)}),i(this,y,!1))}))},j=function(e){var n=W,r=de,u=ge;ue(s(this,E)),B(s(this,E)),he(s(this,E).ctx);try{return e()}catch(a){return Ie(a),null}finally{ue(n),B(r),he(u)}},q=function(){const e=s(this,m).pending;s(this,v)!==null&&(i(this,A,document.createDocumentFragment()),nt(s(this,v),s(this,A))),s(this,h)===null&&i(this,h,F(()=>e(s(this,f))))},se=function(e){var n;if(!this.has_pending_snippet()){this.parent&&g(n=this.parent,l,se).call(n,e);return}i(this,R,s(this,R)+e),s(this,R)===0&&(i(this,y,!1),s(this,h)&&X(s(this,h),()=>{i(this,h,null)}),s(this,A)&&(s(this,f).before(s(this,A)),i(this,A,null)),Z(()=>{x.ensure().flush()}))};function nt(t,e){for(var n=t.nodes_start,r=t.nodes_end;n!==null;){var u=n===r?null:U(n);e.append(n),n=u}}function pt(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const it=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function vt(t){return it.includes(t)}const rt={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function gt(t){return t=t.toLowerCase(),rt[t]??t}const at=["touchstart","touchmove"];function ot(t){return at.includes(t)}const lt=["textarea","script","style","title"];function yt(t){return lt.includes(t)}let p;function ut(){p=void 0}function mt(t){let e=null,n=T;var r;if(T){for(e=w,p===void 0&&(p=Ee(document.head));p!==null&&(p.nodeType!==K||p.data!==me);)p=U(p);p===null?V(!1):p=P(U(p))}T||(r=document.head.appendChild(ye()));try{ve(()=>t(r),We)}finally{n&&(V(!0),p=w,P(e))}}let ne=!0;function Et(t){ne=t}function bt(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function ht(t,e){return we(t,e)}function Tt(t,e){ee(),e.intro=e.intro??!1;const n=e.target,r=T,u=w;try{for(var a=Ee(n);a&&(a.nodeType!==K||a.data!==me);)a=U(a);if(!a)throw te;V(!0),P(a);const c=we(t,{...e,anchor:a});return V(!1),c}catch(c){if(c instanceof Error&&c.message.split(`
2
+ `).some(N=>N.startsWith("https://svelte.dev/e/")))throw c;return c!==te&&console.warn("Failed to hydrate: ",c),e.recover===!1&&je(),ee(),qe(n),V(!1),ht(t,e)}finally{V(r),P(u),ut()}}const L=new Map;function we(t,{target:e,anchor:n,props:r={},events:u,context:a,intro:c=!0}){ee();var N=new Set,S=D=>{for(var _=0;_<D.length;_++){var d=D[_];if(!N.has(d)){N.add(d);var H=ot(d);e.addEventListener(d,Y,{passive:H});var re=L.get(d);re===void 0?(document.addEventListener(d,Y,{passive:H}),L.set(d,1)):L.set(d,re+1)}}};S(Ue(Xe)),ce.add(S);var $=void 0,Ae=ze(()=>{var D=n??e.appendChild(ye());return tt(D,{pending:()=>{}},_=>{if(a){Ge({});var d=ge;d.c=a}if(u&&(r.$$events=u),T&&Qe(_,null),ne=c,$=t(_,r)||{},ne=!0,T&&(W.nodes_end=w,w===null||w.nodeType!==K||w.data!==Ke))throw $e(),te;a&&Je()}),()=>{var H;for(var _ of N){e.removeEventListener(_,Y);var d=L.get(_);--d===0?(document.removeEventListener(_,Y),L.delete(_)):L.set(_,d)}ce.delete(S),D!==n&&((H=D.parentNode)==null||H.removeChild(D))}});return ie.set($,Ae),$}let ie=new WeakMap;function wt(t,e){const n=ie.get(t);return n?(ie.delete(t),n(e)):Promise.resolve()}export{vt as a,mt as b,Ze as c,yt as d,Et as e,ne as f,Tt as h,pt as i,ht as m,gt as n,bt as s,wt as u};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import{p as w,$ as f,f as g,s as b,a as k}from"./DkbXUtyG.js";import{d as m,e as y}from"./D9SC3jBb.js";import{f as n,a as r}from"./CmLg0ys7.js";import{i as c}from"./B_1cpokE.js";var x=n('<button class="absolute left-4 top-1/2 z-30 -translate-y-1/2 rounded-full bg-black/30 p-2 text-white opacity-50 transition-opacity hover:opacity-100" aria-label="Previous sample"><svg 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"><path d="m15 18-6-6 6-6"></path></svg></button>'),_=n('<button class="absolute right-4 top-1/2 z-30 -translate-y-1/2 rounded-full bg-black/30 p-2 text-white opacity-50 transition-opacity hover:opacity-100" aria-label="Next sample"><svg 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"><path d="m9 18 6-6-6-6"></path></svg></button>'),N=n("<!> <!>",1);function C(h,o){w(o,!0);const u=t=>{switch(t.key){case"ArrowRight":o.onNext();break;case"ArrowLeft":o.onPrevious();break}};var s=N();y("keydown",f,u);var l=g(s);{var v=t=>{var a=x();a.__click=function(...i){var e;(e=o.onPrevious)==null||e.apply(this,i)},r(t,a)};c(l,t=>{o.hasPrevious&&t(v)})}var p=b(l,2);{var d=t=>{var a=_();a.__click=function(...i){var e;(e=o.onNext)==null||e.apply(this,i)},r(t,a)};c(p,t=>{o.hasNext&&t(d)})}r(h,s),k()}m(["click"]);export{C as S};
@@ -0,0 +1 @@
1
+ import{k as d,l as g,u as i,m,o as v,q as l,g as p,v as b,w as k}from"./DkbXUtyG.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>b(s.s);if(n){let o=0,t={};const _=k(()=>{let c=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],c=!0);return c&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),i(()=>{const o=m(()=>e.m.map(v));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&i(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
@@ -0,0 +1,20 @@
1
+ import"./CWj6FrbW.js";import{p as n,f as l,j as m,a as i}from"./DkbXUtyG.js";import{c as d,a as c}from"./CmLg0ys7.js";import{s as f}from"./VqWvU2yF.js";import{s as h,r as u}from"./DuUalyFS.js";import{I as $}from"./CGY1p9L4.js";function N(t,a){n(a,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * 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.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let r=u(a,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"}]];$(t,h({name:"component"},()=>r,{get iconNode(){return s},children:(p,z)=>{var o=d(),e=l(o);f(e,()=>a.children??m),c(p,o)},$$slots:{default:!0}})),i()}export{N as C};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import{p as x,s as i,c as a,r as s,t as v,a as u}from"./DkbXUtyG.js";import{s as p}from"./eAy8rZzC.js";import{f as b,a as h}from"./CmLg0ys7.js";import{b as g}from"./CGY1p9L4.js";import"./CvGjimpO.js";import"./KNLP4aJU.js";import"./C8mfFM-u.js";import"./D_FFv0Oe.js";import"./69_IOA4Y.js";import"./C80h3dJx.js";import"./xGHZQ1pe.js";import"./DtWZc_tl.js";var k=b('<div class="grid grid-cols-[6rem_1fr] gap-y-3 text-diffuse-foreground"><span class="text-sm" title="Width">Number:</span> <span class="break-all text-sm"> </span> <span class="text-sm" title="Timestamp">Timestamp:</span> <span class="break-all text-sm"> </span> <span class="text-sm" title="Video file path">Video file path:</span> <span class="break-all text-sm"> </span></div>');function B(o,t){x(t,!0),g(o,{title:"Video frame details",children:(n,F)=>{var e=k(),r=i(a(e),2),f=a(r,!0);s(r);var m=i(r,4),d=a(m);s(m);var l=i(m,4),c=a(l,!0);s(l),s(e),v(_=>{p(f,t.sample.frame_number),p(d,`${_??""} seconds`),p(c,t.sample.video.file_path_abs)},[()=>t.sample.frame_timestamp_s.toFixed(2)]),h(n,e)}}),u()}export{B as F};