relationalai 0.13.0.dev0__py3-none-any.whl → 0.13.2__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 (838) hide show
  1. frontend/debugger/dist/.gitignore +2 -0
  2. frontend/debugger/dist/assets/favicon-Dy0ZgA6N.png +0 -0
  3. frontend/debugger/dist/assets/index-Cssla-O7.js +208 -0
  4. frontend/debugger/dist/assets/index-DlHsYx1V.css +9 -0
  5. frontend/debugger/dist/index.html +17 -0
  6. relationalai/__init__.py +256 -1
  7. relationalai/clients/__init__.py +18 -0
  8. relationalai/clients/client.py +947 -0
  9. relationalai/clients/config.py +673 -0
  10. relationalai/clients/direct_access_client.py +118 -0
  11. relationalai/clients/exec_txn_poller.py +91 -0
  12. relationalai/clients/hash_util.py +31 -0
  13. relationalai/clients/local.py +586 -0
  14. relationalai/clients/profile_polling.py +73 -0
  15. relationalai/clients/resources/__init__.py +8 -0
  16. relationalai/clients/resources/azure/azure.py +502 -0
  17. relationalai/clients/resources/snowflake/__init__.py +20 -0
  18. relationalai/clients/resources/snowflake/cli_resources.py +98 -0
  19. relationalai/clients/resources/snowflake/direct_access_resources.py +734 -0
  20. relationalai/clients/resources/snowflake/engine_service.py +381 -0
  21. relationalai/clients/resources/snowflake/engine_state_handlers.py +315 -0
  22. relationalai/clients/resources/snowflake/error_handlers.py +240 -0
  23. relationalai/clients/resources/snowflake/export_procedure.py.jinja +249 -0
  24. relationalai/clients/resources/snowflake/resources_factory.py +99 -0
  25. relationalai/clients/resources/snowflake/snowflake.py +3185 -0
  26. relationalai/clients/resources/snowflake/use_index_poller.py +1019 -0
  27. relationalai/clients/resources/snowflake/use_index_resources.py +188 -0
  28. relationalai/clients/resources/snowflake/util.py +387 -0
  29. relationalai/clients/result_helpers.py +420 -0
  30. relationalai/clients/types.py +118 -0
  31. relationalai/clients/util.py +356 -0
  32. relationalai/debugging.py +389 -0
  33. relationalai/dsl.py +1749 -0
  34. relationalai/early_access/builder/__init__.py +30 -0
  35. relationalai/early_access/builder/builder/__init__.py +35 -0
  36. relationalai/early_access/builder/snowflake/__init__.py +12 -0
  37. relationalai/early_access/builder/std/__init__.py +25 -0
  38. relationalai/early_access/builder/std/decimals/__init__.py +12 -0
  39. relationalai/early_access/builder/std/integers/__init__.py +12 -0
  40. relationalai/early_access/builder/std/math/__init__.py +12 -0
  41. relationalai/early_access/builder/std/strings/__init__.py +14 -0
  42. relationalai/early_access/devtools/__init__.py +12 -0
  43. relationalai/early_access/devtools/benchmark_lqp/__init__.py +12 -0
  44. relationalai/early_access/devtools/extract_lqp/__init__.py +12 -0
  45. relationalai/early_access/dsl/adapters/orm/adapter_qb.py +427 -0
  46. relationalai/early_access/dsl/adapters/orm/parser.py +636 -0
  47. relationalai/early_access/dsl/adapters/owl/adapter.py +176 -0
  48. relationalai/early_access/dsl/adapters/owl/parser.py +160 -0
  49. relationalai/early_access/dsl/bindings/common.py +402 -0
  50. relationalai/early_access/dsl/bindings/csv.py +170 -0
  51. relationalai/early_access/dsl/bindings/legacy/binding_models.py +143 -0
  52. relationalai/early_access/dsl/bindings/snowflake.py +64 -0
  53. relationalai/early_access/dsl/codegen/binder.py +411 -0
  54. relationalai/early_access/dsl/codegen/common.py +79 -0
  55. relationalai/early_access/dsl/codegen/helpers.py +23 -0
  56. relationalai/early_access/dsl/codegen/relations.py +700 -0
  57. relationalai/early_access/dsl/codegen/weaver.py +417 -0
  58. relationalai/early_access/dsl/core/builders/__init__.py +47 -0
  59. relationalai/early_access/dsl/core/builders/logic.py +19 -0
  60. relationalai/early_access/dsl/core/builders/scalar_constraint.py +11 -0
  61. relationalai/early_access/dsl/core/constraints/predicate/atomic.py +455 -0
  62. relationalai/early_access/dsl/core/constraints/predicate/universal.py +73 -0
  63. relationalai/early_access/dsl/core/constraints/scalar.py +310 -0
  64. relationalai/early_access/dsl/core/context.py +13 -0
  65. relationalai/early_access/dsl/core/cset.py +132 -0
  66. relationalai/early_access/dsl/core/exprs/__init__.py +116 -0
  67. relationalai/early_access/dsl/core/exprs/relational.py +18 -0
  68. relationalai/early_access/dsl/core/exprs/scalar.py +412 -0
  69. relationalai/early_access/dsl/core/instances.py +44 -0
  70. relationalai/early_access/dsl/core/logic/__init__.py +193 -0
  71. relationalai/early_access/dsl/core/logic/aggregation.py +98 -0
  72. relationalai/early_access/dsl/core/logic/exists.py +223 -0
  73. relationalai/early_access/dsl/core/logic/helper.py +163 -0
  74. relationalai/early_access/dsl/core/namespaces.py +32 -0
  75. relationalai/early_access/dsl/core/relations.py +276 -0
  76. relationalai/early_access/dsl/core/rules.py +112 -0
  77. relationalai/early_access/dsl/core/std/__init__.py +45 -0
  78. relationalai/early_access/dsl/core/temporal/recall.py +6 -0
  79. relationalai/early_access/dsl/core/types/__init__.py +270 -0
  80. relationalai/early_access/dsl/core/types/concepts.py +128 -0
  81. relationalai/early_access/dsl/core/types/constrained/__init__.py +267 -0
  82. relationalai/early_access/dsl/core/types/constrained/nominal.py +143 -0
  83. relationalai/early_access/dsl/core/types/constrained/subtype.py +124 -0
  84. relationalai/early_access/dsl/core/types/standard.py +92 -0
  85. relationalai/early_access/dsl/core/types/unconstrained.py +50 -0
  86. relationalai/early_access/dsl/core/types/variables.py +203 -0
  87. relationalai/early_access/dsl/ir/compiler.py +318 -0
  88. relationalai/early_access/dsl/ir/executor.py +260 -0
  89. relationalai/early_access/dsl/ontologies/constraints.py +88 -0
  90. relationalai/early_access/dsl/ontologies/export.py +30 -0
  91. relationalai/early_access/dsl/ontologies/models.py +453 -0
  92. relationalai/early_access/dsl/ontologies/python_printer.py +303 -0
  93. relationalai/early_access/dsl/ontologies/readings.py +60 -0
  94. relationalai/early_access/dsl/ontologies/relationships.py +322 -0
  95. relationalai/early_access/dsl/ontologies/roles.py +87 -0
  96. relationalai/early_access/dsl/ontologies/subtyping.py +55 -0
  97. relationalai/early_access/dsl/orm/constraints.py +438 -0
  98. relationalai/early_access/dsl/orm/measures/dimensions.py +200 -0
  99. relationalai/early_access/dsl/orm/measures/initializer.py +16 -0
  100. relationalai/early_access/dsl/orm/measures/measure_rules.py +275 -0
  101. relationalai/early_access/dsl/orm/measures/measures.py +299 -0
  102. relationalai/early_access/dsl/orm/measures/role_exprs.py +268 -0
  103. relationalai/early_access/dsl/orm/models.py +256 -0
  104. relationalai/early_access/dsl/orm/object_oriented_printer.py +344 -0
  105. relationalai/early_access/dsl/orm/printer.py +469 -0
  106. relationalai/early_access/dsl/orm/reasoners.py +480 -0
  107. relationalai/early_access/dsl/orm/relations.py +19 -0
  108. relationalai/early_access/dsl/orm/relationships.py +251 -0
  109. relationalai/early_access/dsl/orm/types.py +42 -0
  110. relationalai/early_access/dsl/orm/utils.py +79 -0
  111. relationalai/early_access/dsl/orm/verb.py +204 -0
  112. relationalai/early_access/dsl/physical_metadata/tables.py +133 -0
  113. relationalai/early_access/dsl/relations.py +170 -0
  114. relationalai/early_access/dsl/rulesets.py +69 -0
  115. relationalai/early_access/dsl/schemas/__init__.py +450 -0
  116. relationalai/early_access/dsl/schemas/builder.py +48 -0
  117. relationalai/early_access/dsl/schemas/comp_names.py +51 -0
  118. relationalai/early_access/dsl/schemas/components.py +203 -0
  119. relationalai/early_access/dsl/schemas/contexts.py +156 -0
  120. relationalai/early_access/dsl/schemas/exprs.py +89 -0
  121. relationalai/early_access/dsl/schemas/fragments.py +464 -0
  122. relationalai/early_access/dsl/serialization.py +79 -0
  123. relationalai/early_access/dsl/serialize/exporter.py +163 -0
  124. relationalai/early_access/dsl/snow/api.py +105 -0
  125. relationalai/early_access/dsl/snow/common.py +76 -0
  126. relationalai/early_access/dsl/state_mgmt/__init__.py +129 -0
  127. relationalai/early_access/dsl/state_mgmt/state_charts.py +125 -0
  128. relationalai/early_access/dsl/state_mgmt/transitions.py +130 -0
  129. relationalai/early_access/dsl/types/__init__.py +40 -0
  130. relationalai/early_access/dsl/types/concepts.py +12 -0
  131. relationalai/early_access/dsl/types/entities.py +135 -0
  132. relationalai/early_access/dsl/types/values.py +17 -0
  133. relationalai/early_access/dsl/utils.py +102 -0
  134. relationalai/early_access/graphs/__init__.py +13 -0
  135. relationalai/early_access/lqp/__init__.py +12 -0
  136. relationalai/early_access/lqp/compiler/__init__.py +12 -0
  137. relationalai/early_access/lqp/constructors/__init__.py +18 -0
  138. relationalai/early_access/lqp/executor/__init__.py +12 -0
  139. relationalai/early_access/lqp/ir/__init__.py +12 -0
  140. relationalai/early_access/lqp/passes/__init__.py +12 -0
  141. relationalai/early_access/lqp/pragmas/__init__.py +12 -0
  142. relationalai/early_access/lqp/primitives/__init__.py +12 -0
  143. relationalai/early_access/lqp/types/__init__.py +12 -0
  144. relationalai/early_access/lqp/utils/__init__.py +12 -0
  145. relationalai/early_access/lqp/validators/__init__.py +12 -0
  146. relationalai/early_access/metamodel/__init__.py +58 -0
  147. relationalai/early_access/metamodel/builtins/__init__.py +12 -0
  148. relationalai/early_access/metamodel/compiler/__init__.py +12 -0
  149. relationalai/early_access/metamodel/dependency/__init__.py +12 -0
  150. relationalai/early_access/metamodel/factory/__init__.py +17 -0
  151. relationalai/early_access/metamodel/helpers/__init__.py +12 -0
  152. relationalai/early_access/metamodel/ir/__init__.py +14 -0
  153. relationalai/early_access/metamodel/rewrite/__init__.py +7 -0
  154. relationalai/early_access/metamodel/typer/__init__.py +3 -0
  155. relationalai/early_access/metamodel/typer/typer/__init__.py +12 -0
  156. relationalai/early_access/metamodel/types/__init__.py +15 -0
  157. relationalai/early_access/metamodel/util/__init__.py +15 -0
  158. relationalai/early_access/metamodel/visitor/__init__.py +12 -0
  159. relationalai/early_access/rel/__init__.py +12 -0
  160. relationalai/early_access/rel/executor/__init__.py +12 -0
  161. relationalai/early_access/rel/rel_utils/__init__.py +12 -0
  162. relationalai/early_access/rel/rewrite/__init__.py +7 -0
  163. relationalai/early_access/solvers/__init__.py +19 -0
  164. relationalai/early_access/sql/__init__.py +11 -0
  165. relationalai/early_access/sql/executor/__init__.py +3 -0
  166. relationalai/early_access/sql/rewrite/__init__.py +3 -0
  167. relationalai/early_access/tests/logging/__init__.py +12 -0
  168. relationalai/early_access/tests/test_snapshot_base/__init__.py +12 -0
  169. relationalai/early_access/tests/utils/__init__.py +12 -0
  170. relationalai/environments/__init__.py +35 -0
  171. relationalai/environments/base.py +381 -0
  172. relationalai/environments/colab.py +14 -0
  173. relationalai/environments/generic.py +71 -0
  174. relationalai/environments/ipython.py +68 -0
  175. relationalai/environments/jupyter.py +9 -0
  176. relationalai/environments/snowbook.py +169 -0
  177. relationalai/errors.py +2496 -0
  178. relationalai/experimental/SF.py +38 -0
  179. relationalai/experimental/inspect.py +47 -0
  180. relationalai/experimental/pathfinder/__init__.py +158 -0
  181. relationalai/experimental/pathfinder/api.py +160 -0
  182. relationalai/experimental/pathfinder/automaton.py +584 -0
  183. relationalai/experimental/pathfinder/bridge.py +226 -0
  184. relationalai/experimental/pathfinder/compiler.py +416 -0
  185. relationalai/experimental/pathfinder/datalog.py +214 -0
  186. relationalai/experimental/pathfinder/diagnostics.py +56 -0
  187. relationalai/experimental/pathfinder/filter.py +236 -0
  188. relationalai/experimental/pathfinder/glushkov.py +439 -0
  189. relationalai/experimental/pathfinder/options.py +265 -0
  190. relationalai/experimental/pathfinder/pathfinder-v0.7.0.rel +1951 -0
  191. relationalai/experimental/pathfinder/rpq.py +344 -0
  192. relationalai/experimental/pathfinder/transition.py +200 -0
  193. relationalai/experimental/pathfinder/utils.py +26 -0
  194. relationalai/experimental/paths/README.md +107 -0
  195. relationalai/experimental/paths/api.py +143 -0
  196. relationalai/experimental/paths/benchmarks/grid_graph.py +37 -0
  197. relationalai/experimental/paths/code_organization.md +2 -0
  198. relationalai/experimental/paths/examples/Movies.ipynb +16328 -0
  199. relationalai/experimental/paths/examples/basic_example.py +40 -0
  200. relationalai/experimental/paths/examples/minimal_engine_warmup.py +3 -0
  201. relationalai/experimental/paths/examples/movie_example.py +77 -0
  202. relationalai/experimental/paths/examples/movies_data/actedin.csv +193 -0
  203. relationalai/experimental/paths/examples/movies_data/directed.csv +45 -0
  204. relationalai/experimental/paths/examples/movies_data/follows.csv +7 -0
  205. relationalai/experimental/paths/examples/movies_data/movies.csv +39 -0
  206. relationalai/experimental/paths/examples/movies_data/person.csv +134 -0
  207. relationalai/experimental/paths/examples/movies_data/produced.csv +16 -0
  208. relationalai/experimental/paths/examples/movies_data/ratings.csv +10 -0
  209. relationalai/experimental/paths/examples/movies_data/wrote.csv +11 -0
  210. relationalai/experimental/paths/examples/paths_benchmark.py +115 -0
  211. relationalai/experimental/paths/examples/paths_example.py +116 -0
  212. relationalai/experimental/paths/examples/pattern_to_automaton.py +28 -0
  213. relationalai/experimental/paths/find_paths_via_automaton.py +85 -0
  214. relationalai/experimental/paths/graph.py +185 -0
  215. relationalai/experimental/paths/path_algorithms/find_paths.py +280 -0
  216. relationalai/experimental/paths/path_algorithms/one_sided_ball_repetition.py +26 -0
  217. relationalai/experimental/paths/path_algorithms/one_sided_ball_upto.py +111 -0
  218. relationalai/experimental/paths/path_algorithms/single.py +59 -0
  219. relationalai/experimental/paths/path_algorithms/two_sided_balls_repetition.py +39 -0
  220. relationalai/experimental/paths/path_algorithms/two_sided_balls_upto.py +103 -0
  221. relationalai/experimental/paths/path_algorithms/usp-old.py +130 -0
  222. relationalai/experimental/paths/path_algorithms/usp-tuple.py +183 -0
  223. relationalai/experimental/paths/path_algorithms/usp.py +150 -0
  224. relationalai/experimental/paths/product_graph.py +93 -0
  225. relationalai/experimental/paths/rpq/automaton.py +584 -0
  226. relationalai/experimental/paths/rpq/diagnostics.py +56 -0
  227. relationalai/experimental/paths/rpq/rpq.py +378 -0
  228. relationalai/experimental/paths/tests/tests_limit_sp_max_length.py +90 -0
  229. relationalai/experimental/paths/tests/tests_limit_sp_multiple.py +119 -0
  230. relationalai/experimental/paths/tests/tests_limit_sp_single.py +104 -0
  231. relationalai/experimental/paths/tests/tests_limit_walks_multiple.py +113 -0
  232. relationalai/experimental/paths/tests/tests_limit_walks_single.py +149 -0
  233. relationalai/experimental/paths/tests/tests_one_sided_ball_repetition_multiple.py +70 -0
  234. relationalai/experimental/paths/tests/tests_one_sided_ball_repetition_single.py +64 -0
  235. relationalai/experimental/paths/tests/tests_one_sided_ball_upto_multiple.py +115 -0
  236. relationalai/experimental/paths/tests/tests_one_sided_ball_upto_single.py +75 -0
  237. relationalai/experimental/paths/tests/tests_single_paths.py +152 -0
  238. relationalai/experimental/paths/tests/tests_single_walks.py +208 -0
  239. relationalai/experimental/paths/tests/tests_single_walks_undirected.py +297 -0
  240. relationalai/experimental/paths/tests/tests_two_sided_balls_repetition_multiple.py +107 -0
  241. relationalai/experimental/paths/tests/tests_two_sided_balls_repetition_single.py +76 -0
  242. relationalai/experimental/paths/tests/tests_two_sided_balls_upto_multiple.py +76 -0
  243. relationalai/experimental/paths/tests/tests_two_sided_balls_upto_single.py +110 -0
  244. relationalai/experimental/paths/tests/tests_usp_nsp_multiple.py +229 -0
  245. relationalai/experimental/paths/tests/tests_usp_nsp_single.py +108 -0
  246. relationalai/experimental/paths/tree_agg.py +168 -0
  247. relationalai/experimental/paths/utilities/iterators.py +27 -0
  248. relationalai/experimental/paths/utilities/prefix_sum.py +91 -0
  249. relationalai/experimental/solvers.py +1087 -0
  250. relationalai/loaders/csv.py +195 -0
  251. relationalai/loaders/loader.py +177 -0
  252. relationalai/loaders/types.py +23 -0
  253. relationalai/rel_emitter.py +373 -0
  254. relationalai/rel_utils.py +185 -0
  255. relationalai/semantics/__init__.py +22 -146
  256. relationalai/semantics/designs/query_builder/identify_by.md +106 -0
  257. relationalai/semantics/devtools/benchmark_lqp.py +535 -0
  258. relationalai/semantics/devtools/compilation_manager.py +294 -0
  259. relationalai/semantics/devtools/extract_lqp.py +110 -0
  260. relationalai/semantics/internal/internal.py +3785 -0
  261. relationalai/semantics/internal/snowflake.py +325 -0
  262. relationalai/semantics/lqp/README.md +34 -0
  263. relationalai/semantics/lqp/builtins.py +16 -0
  264. relationalai/semantics/lqp/compiler.py +22 -0
  265. relationalai/semantics/lqp/constructors.py +68 -0
  266. relationalai/semantics/lqp/executor.py +469 -0
  267. relationalai/semantics/lqp/intrinsics.py +24 -0
  268. relationalai/semantics/lqp/model2lqp.py +877 -0
  269. relationalai/semantics/lqp/passes.py +680 -0
  270. relationalai/semantics/lqp/primitives.py +252 -0
  271. relationalai/semantics/lqp/result_helpers.py +202 -0
  272. relationalai/semantics/lqp/rewrite/annotate_constraints.py +57 -0
  273. relationalai/semantics/lqp/rewrite/cdc.py +216 -0
  274. relationalai/semantics/lqp/rewrite/extract_common.py +338 -0
  275. relationalai/semantics/lqp/rewrite/extract_keys.py +512 -0
  276. relationalai/semantics/lqp/rewrite/function_annotations.py +114 -0
  277. relationalai/semantics/lqp/rewrite/functional_dependencies.py +314 -0
  278. relationalai/semantics/lqp/rewrite/quantify_vars.py +296 -0
  279. relationalai/semantics/lqp/rewrite/splinter.py +76 -0
  280. relationalai/semantics/lqp/types.py +101 -0
  281. relationalai/semantics/lqp/utils.py +160 -0
  282. relationalai/semantics/lqp/validators.py +57 -0
  283. relationalai/semantics/metamodel/__init__.py +40 -6
  284. relationalai/semantics/metamodel/builtins.py +771 -205
  285. relationalai/semantics/metamodel/compiler.py +133 -0
  286. relationalai/semantics/metamodel/dependency.py +862 -0
  287. relationalai/semantics/metamodel/executor.py +61 -0
  288. relationalai/semantics/metamodel/factory.py +287 -0
  289. relationalai/semantics/metamodel/helpers.py +361 -0
  290. relationalai/semantics/metamodel/rewrite/discharge_constraints.py +39 -0
  291. relationalai/semantics/metamodel/rewrite/dnf_union_splitter.py +210 -0
  292. relationalai/semantics/metamodel/rewrite/extract_nested_logicals.py +78 -0
  293. relationalai/semantics/metamodel/rewrite/flatten.py +554 -0
  294. relationalai/semantics/metamodel/rewrite/format_outputs.py +165 -0
  295. relationalai/semantics/metamodel/typer/checker.py +353 -0
  296. relationalai/semantics/metamodel/typer/typer.py +1399 -0
  297. relationalai/semantics/metamodel/util.py +506 -0
  298. relationalai/semantics/reasoners/__init__.py +10 -0
  299. relationalai/semantics/reasoners/graph/README.md +620 -0
  300. relationalai/semantics/reasoners/graph/__init__.py +37 -0
  301. relationalai/semantics/reasoners/graph/core.py +9019 -0
  302. relationalai/semantics/reasoners/graph/design/beyond_demand_transform.md +797 -0
  303. relationalai/semantics/reasoners/graph/tests/README.md +21 -0
  304. relationalai/semantics/reasoners/optimization/__init__.py +68 -0
  305. relationalai/semantics/reasoners/optimization/common.py +88 -0
  306. relationalai/semantics/reasoners/optimization/solvers_dev.py +568 -0
  307. relationalai/semantics/reasoners/optimization/solvers_pb.py +1414 -0
  308. relationalai/semantics/rel/builtins.py +40 -0
  309. relationalai/semantics/rel/compiler.py +989 -0
  310. relationalai/semantics/rel/executor.py +362 -0
  311. relationalai/semantics/rel/rel.py +482 -0
  312. relationalai/semantics/rel/rel_utils.py +276 -0
  313. relationalai/semantics/snowflake/__init__.py +3 -0
  314. relationalai/semantics/sql/compiler.py +2503 -0
  315. relationalai/semantics/sql/executor/duck_db.py +52 -0
  316. relationalai/semantics/sql/executor/result_helpers.py +64 -0
  317. relationalai/semantics/sql/executor/snowflake.py +149 -0
  318. relationalai/semantics/sql/rewrite/denormalize.py +222 -0
  319. relationalai/semantics/sql/rewrite/double_negation.py +49 -0
  320. relationalai/semantics/sql/rewrite/recursive_union.py +127 -0
  321. relationalai/semantics/sql/rewrite/sort_output_query.py +246 -0
  322. relationalai/semantics/sql/sql.py +504 -0
  323. relationalai/semantics/std/__init__.py +40 -60
  324. relationalai/semantics/std/constraints.py +43 -37
  325. relationalai/semantics/std/datetime.py +135 -246
  326. relationalai/semantics/std/decimals.py +52 -45
  327. relationalai/semantics/std/floats.py +5 -13
  328. relationalai/semantics/std/integers.py +11 -26
  329. relationalai/semantics/std/math.py +112 -183
  330. relationalai/semantics/std/pragmas.py +11 -0
  331. relationalai/semantics/std/re.py +62 -80
  332. relationalai/semantics/std/std.py +14 -0
  333. relationalai/semantics/std/strings.py +60 -117
  334. relationalai/semantics/tests/test_snapshot_abstract.py +143 -0
  335. relationalai/semantics/tests/test_snapshot_base.py +9 -0
  336. relationalai/semantics/tests/utils.py +46 -0
  337. relationalai/std/__init__.py +70 -0
  338. relationalai/tools/cli.py +2089 -0
  339. relationalai/tools/cli_controls.py +1826 -0
  340. relationalai/tools/cli_helpers.py +802 -0
  341. relationalai/tools/debugger.py +183 -289
  342. relationalai/tools/debugger_client.py +109 -0
  343. relationalai/tools/debugger_server.py +302 -0
  344. relationalai/tools/dev.py +685 -0
  345. relationalai/tools/notes +7 -0
  346. relationalai/tools/qb_debugger.py +425 -0
  347. relationalai/util/clean_up_databases.py +95 -0
  348. relationalai/util/format.py +106 -48
  349. relationalai/util/list_databases.py +9 -0
  350. relationalai/util/otel_configuration.py +26 -0
  351. relationalai/util/otel_handler.py +484 -0
  352. relationalai/util/snowflake_handler.py +88 -0
  353. relationalai/util/span_format_test.py +43 -0
  354. relationalai/util/span_tracker.py +207 -0
  355. relationalai/util/spans_file_handler.py +72 -0
  356. relationalai/util/tracing_handler.py +34 -0
  357. relationalai-0.13.2.dist-info/METADATA +74 -0
  358. relationalai-0.13.2.dist-info/RECORD +460 -0
  359. relationalai-0.13.2.dist-info/WHEEL +4 -0
  360. relationalai-0.13.2.dist-info/entry_points.txt +3 -0
  361. relationalai-0.13.2.dist-info/licenses/LICENSE +202 -0
  362. relationalai_test_util/__init__.py +4 -0
  363. relationalai_test_util/fixtures.py +233 -0
  364. relationalai_test_util/snapshot.py +252 -0
  365. relationalai_test_util/traceback.py +118 -0
  366. relationalai/config/__init__.py +0 -56
  367. relationalai/config/config.py +0 -289
  368. relationalai/config/config_fields.py +0 -86
  369. relationalai/config/connections/__init__.py +0 -46
  370. relationalai/config/connections/base.py +0 -23
  371. relationalai/config/connections/duckdb.py +0 -29
  372. relationalai/config/connections/snowflake.py +0 -243
  373. relationalai/config/external/__init__.py +0 -17
  374. relationalai/config/external/dbt_converter.py +0 -101
  375. relationalai/config/external/dbt_models.py +0 -93
  376. relationalai/config/external/snowflake_converter.py +0 -41
  377. relationalai/config/external/snowflake_models.py +0 -85
  378. relationalai/config/external/utils.py +0 -19
  379. relationalai/semantics/backends/lqp/annotations.py +0 -11
  380. relationalai/semantics/backends/sql/sql_compiler.py +0 -327
  381. relationalai/semantics/frontend/base.py +0 -1707
  382. relationalai/semantics/frontend/core.py +0 -179
  383. relationalai/semantics/frontend/front_compiler.py +0 -1313
  384. relationalai/semantics/frontend/pprint.py +0 -408
  385. relationalai/semantics/metamodel/metamodel.py +0 -437
  386. relationalai/semantics/metamodel/metamodel_analyzer.py +0 -519
  387. relationalai/semantics/metamodel/metamodel_compiler.py +0 -0
  388. relationalai/semantics/metamodel/pprint.py +0 -412
  389. relationalai/semantics/metamodel/rewriter.py +0 -266
  390. relationalai/semantics/metamodel/typer.py +0 -1378
  391. relationalai/semantics/std/aggregates.py +0 -149
  392. relationalai/semantics/std/common.py +0 -44
  393. relationalai/semantics/std/numbers.py +0 -86
  394. relationalai/shims/executor.py +0 -147
  395. relationalai/shims/helpers.py +0 -126
  396. relationalai/shims/hoister.py +0 -221
  397. relationalai/shims/mm2v0.py +0 -1290
  398. relationalai/tools/cli/__init__.py +0 -6
  399. relationalai/tools/cli/cli.py +0 -90
  400. relationalai/tools/cli/components/__init__.py +0 -5
  401. relationalai/tools/cli/components/progress_reader.py +0 -1524
  402. relationalai/tools/cli/components/utils.py +0 -58
  403. relationalai/tools/cli/config_template.py +0 -45
  404. relationalai/tools/cli/dev.py +0 -19
  405. relationalai/tools/typer_debugger.py +0 -93
  406. relationalai/util/dataclasses.py +0 -43
  407. relationalai/util/docutils.py +0 -40
  408. relationalai/util/error.py +0 -199
  409. relationalai/util/naming.py +0 -145
  410. relationalai/util/python.py +0 -35
  411. relationalai/util/runtime.py +0 -156
  412. relationalai/util/schema.py +0 -197
  413. relationalai/util/source.py +0 -185
  414. relationalai/util/structures.py +0 -163
  415. relationalai/util/tracing.py +0 -261
  416. relationalai-0.13.0.dev0.dist-info/METADATA +0 -46
  417. relationalai-0.13.0.dev0.dist-info/RECORD +0 -488
  418. relationalai-0.13.0.dev0.dist-info/WHEEL +0 -5
  419. relationalai-0.13.0.dev0.dist-info/entry_points.txt +0 -3
  420. relationalai-0.13.0.dev0.dist-info/top_level.txt +0 -2
  421. v0/relationalai/__init__.py +0 -216
  422. v0/relationalai/clients/__init__.py +0 -5
  423. v0/relationalai/clients/azure.py +0 -477
  424. v0/relationalai/clients/client.py +0 -912
  425. v0/relationalai/clients/config.py +0 -673
  426. v0/relationalai/clients/direct_access_client.py +0 -118
  427. v0/relationalai/clients/hash_util.py +0 -31
  428. v0/relationalai/clients/local.py +0 -571
  429. v0/relationalai/clients/profile_polling.py +0 -73
  430. v0/relationalai/clients/result_helpers.py +0 -420
  431. v0/relationalai/clients/snowflake.py +0 -3869
  432. v0/relationalai/clients/types.py +0 -113
  433. v0/relationalai/clients/use_index_poller.py +0 -980
  434. v0/relationalai/clients/util.py +0 -356
  435. v0/relationalai/debugging.py +0 -389
  436. v0/relationalai/dsl.py +0 -1749
  437. v0/relationalai/early_access/builder/__init__.py +0 -30
  438. v0/relationalai/early_access/builder/builder/__init__.py +0 -35
  439. v0/relationalai/early_access/builder/snowflake/__init__.py +0 -12
  440. v0/relationalai/early_access/builder/std/__init__.py +0 -25
  441. v0/relationalai/early_access/builder/std/decimals/__init__.py +0 -12
  442. v0/relationalai/early_access/builder/std/integers/__init__.py +0 -12
  443. v0/relationalai/early_access/builder/std/math/__init__.py +0 -12
  444. v0/relationalai/early_access/builder/std/strings/__init__.py +0 -14
  445. v0/relationalai/early_access/devtools/__init__.py +0 -12
  446. v0/relationalai/early_access/devtools/benchmark_lqp/__init__.py +0 -12
  447. v0/relationalai/early_access/devtools/extract_lqp/__init__.py +0 -12
  448. v0/relationalai/early_access/dsl/adapters/orm/adapter_qb.py +0 -427
  449. v0/relationalai/early_access/dsl/adapters/orm/parser.py +0 -636
  450. v0/relationalai/early_access/dsl/adapters/owl/adapter.py +0 -176
  451. v0/relationalai/early_access/dsl/adapters/owl/parser.py +0 -160
  452. v0/relationalai/early_access/dsl/bindings/common.py +0 -402
  453. v0/relationalai/early_access/dsl/bindings/csv.py +0 -170
  454. v0/relationalai/early_access/dsl/bindings/legacy/binding_models.py +0 -143
  455. v0/relationalai/early_access/dsl/bindings/snowflake.py +0 -64
  456. v0/relationalai/early_access/dsl/codegen/binder.py +0 -411
  457. v0/relationalai/early_access/dsl/codegen/common.py +0 -79
  458. v0/relationalai/early_access/dsl/codegen/helpers.py +0 -23
  459. v0/relationalai/early_access/dsl/codegen/relations.py +0 -700
  460. v0/relationalai/early_access/dsl/codegen/weaver.py +0 -417
  461. v0/relationalai/early_access/dsl/core/builders/__init__.py +0 -47
  462. v0/relationalai/early_access/dsl/core/builders/logic.py +0 -19
  463. v0/relationalai/early_access/dsl/core/builders/scalar_constraint.py +0 -11
  464. v0/relationalai/early_access/dsl/core/constraints/predicate/atomic.py +0 -455
  465. v0/relationalai/early_access/dsl/core/constraints/predicate/universal.py +0 -73
  466. v0/relationalai/early_access/dsl/core/constraints/scalar.py +0 -310
  467. v0/relationalai/early_access/dsl/core/context.py +0 -13
  468. v0/relationalai/early_access/dsl/core/cset.py +0 -132
  469. v0/relationalai/early_access/dsl/core/exprs/__init__.py +0 -116
  470. v0/relationalai/early_access/dsl/core/exprs/relational.py +0 -18
  471. v0/relationalai/early_access/dsl/core/exprs/scalar.py +0 -412
  472. v0/relationalai/early_access/dsl/core/instances.py +0 -44
  473. v0/relationalai/early_access/dsl/core/logic/__init__.py +0 -193
  474. v0/relationalai/early_access/dsl/core/logic/aggregation.py +0 -98
  475. v0/relationalai/early_access/dsl/core/logic/exists.py +0 -223
  476. v0/relationalai/early_access/dsl/core/logic/helper.py +0 -163
  477. v0/relationalai/early_access/dsl/core/namespaces.py +0 -32
  478. v0/relationalai/early_access/dsl/core/relations.py +0 -276
  479. v0/relationalai/early_access/dsl/core/rules.py +0 -112
  480. v0/relationalai/early_access/dsl/core/std/__init__.py +0 -45
  481. v0/relationalai/early_access/dsl/core/temporal/recall.py +0 -6
  482. v0/relationalai/early_access/dsl/core/types/__init__.py +0 -270
  483. v0/relationalai/early_access/dsl/core/types/concepts.py +0 -128
  484. v0/relationalai/early_access/dsl/core/types/constrained/__init__.py +0 -267
  485. v0/relationalai/early_access/dsl/core/types/constrained/nominal.py +0 -143
  486. v0/relationalai/early_access/dsl/core/types/constrained/subtype.py +0 -124
  487. v0/relationalai/early_access/dsl/core/types/standard.py +0 -92
  488. v0/relationalai/early_access/dsl/core/types/unconstrained.py +0 -50
  489. v0/relationalai/early_access/dsl/core/types/variables.py +0 -203
  490. v0/relationalai/early_access/dsl/ir/compiler.py +0 -318
  491. v0/relationalai/early_access/dsl/ir/executor.py +0 -260
  492. v0/relationalai/early_access/dsl/ontologies/constraints.py +0 -88
  493. v0/relationalai/early_access/dsl/ontologies/export.py +0 -30
  494. v0/relationalai/early_access/dsl/ontologies/models.py +0 -453
  495. v0/relationalai/early_access/dsl/ontologies/python_printer.py +0 -303
  496. v0/relationalai/early_access/dsl/ontologies/readings.py +0 -60
  497. v0/relationalai/early_access/dsl/ontologies/relationships.py +0 -322
  498. v0/relationalai/early_access/dsl/ontologies/roles.py +0 -87
  499. v0/relationalai/early_access/dsl/ontologies/subtyping.py +0 -55
  500. v0/relationalai/early_access/dsl/orm/constraints.py +0 -438
  501. v0/relationalai/early_access/dsl/orm/measures/dimensions.py +0 -200
  502. v0/relationalai/early_access/dsl/orm/measures/initializer.py +0 -16
  503. v0/relationalai/early_access/dsl/orm/measures/measure_rules.py +0 -275
  504. v0/relationalai/early_access/dsl/orm/measures/measures.py +0 -299
  505. v0/relationalai/early_access/dsl/orm/measures/role_exprs.py +0 -268
  506. v0/relationalai/early_access/dsl/orm/models.py +0 -256
  507. v0/relationalai/early_access/dsl/orm/object_oriented_printer.py +0 -344
  508. v0/relationalai/early_access/dsl/orm/printer.py +0 -469
  509. v0/relationalai/early_access/dsl/orm/reasoners.py +0 -480
  510. v0/relationalai/early_access/dsl/orm/relations.py +0 -19
  511. v0/relationalai/early_access/dsl/orm/relationships.py +0 -251
  512. v0/relationalai/early_access/dsl/orm/types.py +0 -42
  513. v0/relationalai/early_access/dsl/orm/utils.py +0 -79
  514. v0/relationalai/early_access/dsl/orm/verb.py +0 -204
  515. v0/relationalai/early_access/dsl/physical_metadata/tables.py +0 -133
  516. v0/relationalai/early_access/dsl/relations.py +0 -170
  517. v0/relationalai/early_access/dsl/rulesets.py +0 -69
  518. v0/relationalai/early_access/dsl/schemas/__init__.py +0 -450
  519. v0/relationalai/early_access/dsl/schemas/builder.py +0 -48
  520. v0/relationalai/early_access/dsl/schemas/comp_names.py +0 -51
  521. v0/relationalai/early_access/dsl/schemas/components.py +0 -203
  522. v0/relationalai/early_access/dsl/schemas/contexts.py +0 -156
  523. v0/relationalai/early_access/dsl/schemas/exprs.py +0 -89
  524. v0/relationalai/early_access/dsl/schemas/fragments.py +0 -464
  525. v0/relationalai/early_access/dsl/serialization.py +0 -79
  526. v0/relationalai/early_access/dsl/serialize/exporter.py +0 -163
  527. v0/relationalai/early_access/dsl/snow/api.py +0 -104
  528. v0/relationalai/early_access/dsl/snow/common.py +0 -76
  529. v0/relationalai/early_access/dsl/state_mgmt/__init__.py +0 -129
  530. v0/relationalai/early_access/dsl/state_mgmt/state_charts.py +0 -125
  531. v0/relationalai/early_access/dsl/state_mgmt/transitions.py +0 -130
  532. v0/relationalai/early_access/dsl/types/__init__.py +0 -40
  533. v0/relationalai/early_access/dsl/types/concepts.py +0 -12
  534. v0/relationalai/early_access/dsl/types/entities.py +0 -135
  535. v0/relationalai/early_access/dsl/types/values.py +0 -17
  536. v0/relationalai/early_access/dsl/utils.py +0 -102
  537. v0/relationalai/early_access/graphs/__init__.py +0 -13
  538. v0/relationalai/early_access/lqp/__init__.py +0 -12
  539. v0/relationalai/early_access/lqp/compiler/__init__.py +0 -12
  540. v0/relationalai/early_access/lqp/constructors/__init__.py +0 -18
  541. v0/relationalai/early_access/lqp/executor/__init__.py +0 -12
  542. v0/relationalai/early_access/lqp/ir/__init__.py +0 -12
  543. v0/relationalai/early_access/lqp/passes/__init__.py +0 -12
  544. v0/relationalai/early_access/lqp/pragmas/__init__.py +0 -12
  545. v0/relationalai/early_access/lqp/primitives/__init__.py +0 -12
  546. v0/relationalai/early_access/lqp/types/__init__.py +0 -12
  547. v0/relationalai/early_access/lqp/utils/__init__.py +0 -12
  548. v0/relationalai/early_access/lqp/validators/__init__.py +0 -12
  549. v0/relationalai/early_access/metamodel/__init__.py +0 -58
  550. v0/relationalai/early_access/metamodel/builtins/__init__.py +0 -12
  551. v0/relationalai/early_access/metamodel/compiler/__init__.py +0 -12
  552. v0/relationalai/early_access/metamodel/dependency/__init__.py +0 -12
  553. v0/relationalai/early_access/metamodel/factory/__init__.py +0 -17
  554. v0/relationalai/early_access/metamodel/helpers/__init__.py +0 -12
  555. v0/relationalai/early_access/metamodel/ir/__init__.py +0 -14
  556. v0/relationalai/early_access/metamodel/rewrite/__init__.py +0 -7
  557. v0/relationalai/early_access/metamodel/typer/__init__.py +0 -3
  558. v0/relationalai/early_access/metamodel/typer/typer/__init__.py +0 -12
  559. v0/relationalai/early_access/metamodel/types/__init__.py +0 -15
  560. v0/relationalai/early_access/metamodel/util/__init__.py +0 -15
  561. v0/relationalai/early_access/metamodel/visitor/__init__.py +0 -12
  562. v0/relationalai/early_access/rel/__init__.py +0 -12
  563. v0/relationalai/early_access/rel/executor/__init__.py +0 -12
  564. v0/relationalai/early_access/rel/rel_utils/__init__.py +0 -12
  565. v0/relationalai/early_access/rel/rewrite/__init__.py +0 -7
  566. v0/relationalai/early_access/solvers/__init__.py +0 -19
  567. v0/relationalai/early_access/sql/__init__.py +0 -11
  568. v0/relationalai/early_access/sql/executor/__init__.py +0 -3
  569. v0/relationalai/early_access/sql/rewrite/__init__.py +0 -3
  570. v0/relationalai/early_access/tests/logging/__init__.py +0 -12
  571. v0/relationalai/early_access/tests/test_snapshot_base/__init__.py +0 -12
  572. v0/relationalai/early_access/tests/utils/__init__.py +0 -12
  573. v0/relationalai/environments/__init__.py +0 -35
  574. v0/relationalai/environments/base.py +0 -381
  575. v0/relationalai/environments/colab.py +0 -14
  576. v0/relationalai/environments/generic.py +0 -71
  577. v0/relationalai/environments/ipython.py +0 -68
  578. v0/relationalai/environments/jupyter.py +0 -9
  579. v0/relationalai/environments/snowbook.py +0 -169
  580. v0/relationalai/errors.py +0 -2455
  581. v0/relationalai/experimental/SF.py +0 -38
  582. v0/relationalai/experimental/inspect.py +0 -47
  583. v0/relationalai/experimental/pathfinder/__init__.py +0 -158
  584. v0/relationalai/experimental/pathfinder/api.py +0 -160
  585. v0/relationalai/experimental/pathfinder/automaton.py +0 -584
  586. v0/relationalai/experimental/pathfinder/bridge.py +0 -226
  587. v0/relationalai/experimental/pathfinder/compiler.py +0 -416
  588. v0/relationalai/experimental/pathfinder/datalog.py +0 -214
  589. v0/relationalai/experimental/pathfinder/diagnostics.py +0 -56
  590. v0/relationalai/experimental/pathfinder/filter.py +0 -236
  591. v0/relationalai/experimental/pathfinder/glushkov.py +0 -439
  592. v0/relationalai/experimental/pathfinder/options.py +0 -265
  593. v0/relationalai/experimental/pathfinder/rpq.py +0 -344
  594. v0/relationalai/experimental/pathfinder/transition.py +0 -200
  595. v0/relationalai/experimental/pathfinder/utils.py +0 -26
  596. v0/relationalai/experimental/paths/api.py +0 -143
  597. v0/relationalai/experimental/paths/benchmarks/grid_graph.py +0 -37
  598. v0/relationalai/experimental/paths/examples/basic_example.py +0 -40
  599. v0/relationalai/experimental/paths/examples/minimal_engine_warmup.py +0 -3
  600. v0/relationalai/experimental/paths/examples/movie_example.py +0 -77
  601. v0/relationalai/experimental/paths/examples/paths_benchmark.py +0 -115
  602. v0/relationalai/experimental/paths/examples/paths_example.py +0 -116
  603. v0/relationalai/experimental/paths/examples/pattern_to_automaton.py +0 -28
  604. v0/relationalai/experimental/paths/find_paths_via_automaton.py +0 -85
  605. v0/relationalai/experimental/paths/graph.py +0 -185
  606. v0/relationalai/experimental/paths/path_algorithms/find_paths.py +0 -280
  607. v0/relationalai/experimental/paths/path_algorithms/one_sided_ball_repetition.py +0 -26
  608. v0/relationalai/experimental/paths/path_algorithms/one_sided_ball_upto.py +0 -111
  609. v0/relationalai/experimental/paths/path_algorithms/single.py +0 -59
  610. v0/relationalai/experimental/paths/path_algorithms/two_sided_balls_repetition.py +0 -39
  611. v0/relationalai/experimental/paths/path_algorithms/two_sided_balls_upto.py +0 -103
  612. v0/relationalai/experimental/paths/path_algorithms/usp-old.py +0 -130
  613. v0/relationalai/experimental/paths/path_algorithms/usp-tuple.py +0 -183
  614. v0/relationalai/experimental/paths/path_algorithms/usp.py +0 -150
  615. v0/relationalai/experimental/paths/product_graph.py +0 -93
  616. v0/relationalai/experimental/paths/rpq/automaton.py +0 -584
  617. v0/relationalai/experimental/paths/rpq/diagnostics.py +0 -56
  618. v0/relationalai/experimental/paths/rpq/rpq.py +0 -378
  619. v0/relationalai/experimental/paths/tests/tests_limit_sp_max_length.py +0 -90
  620. v0/relationalai/experimental/paths/tests/tests_limit_sp_multiple.py +0 -119
  621. v0/relationalai/experimental/paths/tests/tests_limit_sp_single.py +0 -104
  622. v0/relationalai/experimental/paths/tests/tests_limit_walks_multiple.py +0 -113
  623. v0/relationalai/experimental/paths/tests/tests_limit_walks_single.py +0 -149
  624. v0/relationalai/experimental/paths/tests/tests_one_sided_ball_repetition_multiple.py +0 -70
  625. v0/relationalai/experimental/paths/tests/tests_one_sided_ball_repetition_single.py +0 -64
  626. v0/relationalai/experimental/paths/tests/tests_one_sided_ball_upto_multiple.py +0 -115
  627. v0/relationalai/experimental/paths/tests/tests_one_sided_ball_upto_single.py +0 -75
  628. v0/relationalai/experimental/paths/tests/tests_single_paths.py +0 -152
  629. v0/relationalai/experimental/paths/tests/tests_single_walks.py +0 -208
  630. v0/relationalai/experimental/paths/tests/tests_single_walks_undirected.py +0 -297
  631. v0/relationalai/experimental/paths/tests/tests_two_sided_balls_repetition_multiple.py +0 -107
  632. v0/relationalai/experimental/paths/tests/tests_two_sided_balls_repetition_single.py +0 -76
  633. v0/relationalai/experimental/paths/tests/tests_two_sided_balls_upto_multiple.py +0 -76
  634. v0/relationalai/experimental/paths/tests/tests_two_sided_balls_upto_single.py +0 -110
  635. v0/relationalai/experimental/paths/tests/tests_usp_nsp_multiple.py +0 -229
  636. v0/relationalai/experimental/paths/tests/tests_usp_nsp_single.py +0 -108
  637. v0/relationalai/experimental/paths/tree_agg.py +0 -168
  638. v0/relationalai/experimental/paths/utilities/iterators.py +0 -27
  639. v0/relationalai/experimental/paths/utilities/prefix_sum.py +0 -91
  640. v0/relationalai/experimental/solvers.py +0 -1087
  641. v0/relationalai/loaders/csv.py +0 -195
  642. v0/relationalai/loaders/loader.py +0 -177
  643. v0/relationalai/loaders/types.py +0 -23
  644. v0/relationalai/rel_emitter.py +0 -373
  645. v0/relationalai/rel_utils.py +0 -185
  646. v0/relationalai/semantics/__init__.py +0 -29
  647. v0/relationalai/semantics/devtools/benchmark_lqp.py +0 -536
  648. v0/relationalai/semantics/devtools/compilation_manager.py +0 -294
  649. v0/relationalai/semantics/devtools/extract_lqp.py +0 -110
  650. v0/relationalai/semantics/internal/internal.py +0 -3785
  651. v0/relationalai/semantics/internal/snowflake.py +0 -324
  652. v0/relationalai/semantics/lqp/builtins.py +0 -16
  653. v0/relationalai/semantics/lqp/compiler.py +0 -22
  654. v0/relationalai/semantics/lqp/constructors.py +0 -68
  655. v0/relationalai/semantics/lqp/executor.py +0 -469
  656. v0/relationalai/semantics/lqp/intrinsics.py +0 -24
  657. v0/relationalai/semantics/lqp/model2lqp.py +0 -839
  658. v0/relationalai/semantics/lqp/passes.py +0 -680
  659. v0/relationalai/semantics/lqp/primitives.py +0 -252
  660. v0/relationalai/semantics/lqp/result_helpers.py +0 -202
  661. v0/relationalai/semantics/lqp/rewrite/annotate_constraints.py +0 -57
  662. v0/relationalai/semantics/lqp/rewrite/cdc.py +0 -216
  663. v0/relationalai/semantics/lqp/rewrite/extract_common.py +0 -338
  664. v0/relationalai/semantics/lqp/rewrite/extract_keys.py +0 -449
  665. v0/relationalai/semantics/lqp/rewrite/function_annotations.py +0 -114
  666. v0/relationalai/semantics/lqp/rewrite/functional_dependencies.py +0 -314
  667. v0/relationalai/semantics/lqp/rewrite/quantify_vars.py +0 -296
  668. v0/relationalai/semantics/lqp/rewrite/splinter.py +0 -76
  669. v0/relationalai/semantics/lqp/types.py +0 -101
  670. v0/relationalai/semantics/lqp/utils.py +0 -160
  671. v0/relationalai/semantics/lqp/validators.py +0 -57
  672. v0/relationalai/semantics/metamodel/__init__.py +0 -40
  673. v0/relationalai/semantics/metamodel/builtins.py +0 -774
  674. v0/relationalai/semantics/metamodel/compiler.py +0 -133
  675. v0/relationalai/semantics/metamodel/dependency.py +0 -862
  676. v0/relationalai/semantics/metamodel/executor.py +0 -61
  677. v0/relationalai/semantics/metamodel/factory.py +0 -287
  678. v0/relationalai/semantics/metamodel/helpers.py +0 -361
  679. v0/relationalai/semantics/metamodel/rewrite/discharge_constraints.py +0 -39
  680. v0/relationalai/semantics/metamodel/rewrite/dnf_union_splitter.py +0 -210
  681. v0/relationalai/semantics/metamodel/rewrite/extract_nested_logicals.py +0 -78
  682. v0/relationalai/semantics/metamodel/rewrite/flatten.py +0 -549
  683. v0/relationalai/semantics/metamodel/rewrite/format_outputs.py +0 -165
  684. v0/relationalai/semantics/metamodel/typer/checker.py +0 -353
  685. v0/relationalai/semantics/metamodel/typer/typer.py +0 -1395
  686. v0/relationalai/semantics/metamodel/util.py +0 -505
  687. v0/relationalai/semantics/reasoners/__init__.py +0 -10
  688. v0/relationalai/semantics/reasoners/graph/__init__.py +0 -37
  689. v0/relationalai/semantics/reasoners/graph/core.py +0 -9020
  690. v0/relationalai/semantics/reasoners/optimization/__init__.py +0 -68
  691. v0/relationalai/semantics/reasoners/optimization/common.py +0 -88
  692. v0/relationalai/semantics/reasoners/optimization/solvers_dev.py +0 -568
  693. v0/relationalai/semantics/reasoners/optimization/solvers_pb.py +0 -1163
  694. v0/relationalai/semantics/rel/builtins.py +0 -40
  695. v0/relationalai/semantics/rel/compiler.py +0 -989
  696. v0/relationalai/semantics/rel/executor.py +0 -359
  697. v0/relationalai/semantics/rel/rel.py +0 -482
  698. v0/relationalai/semantics/rel/rel_utils.py +0 -276
  699. v0/relationalai/semantics/snowflake/__init__.py +0 -3
  700. v0/relationalai/semantics/sql/compiler.py +0 -2503
  701. v0/relationalai/semantics/sql/executor/duck_db.py +0 -52
  702. v0/relationalai/semantics/sql/executor/result_helpers.py +0 -64
  703. v0/relationalai/semantics/sql/executor/snowflake.py +0 -145
  704. v0/relationalai/semantics/sql/rewrite/denormalize.py +0 -222
  705. v0/relationalai/semantics/sql/rewrite/double_negation.py +0 -49
  706. v0/relationalai/semantics/sql/rewrite/recursive_union.py +0 -127
  707. v0/relationalai/semantics/sql/rewrite/sort_output_query.py +0 -246
  708. v0/relationalai/semantics/sql/sql.py +0 -504
  709. v0/relationalai/semantics/std/__init__.py +0 -54
  710. v0/relationalai/semantics/std/constraints.py +0 -43
  711. v0/relationalai/semantics/std/datetime.py +0 -363
  712. v0/relationalai/semantics/std/decimals.py +0 -62
  713. v0/relationalai/semantics/std/floats.py +0 -7
  714. v0/relationalai/semantics/std/integers.py +0 -22
  715. v0/relationalai/semantics/std/math.py +0 -141
  716. v0/relationalai/semantics/std/pragmas.py +0 -11
  717. v0/relationalai/semantics/std/re.py +0 -83
  718. v0/relationalai/semantics/std/std.py +0 -14
  719. v0/relationalai/semantics/std/strings.py +0 -63
  720. v0/relationalai/semantics/tests/__init__.py +0 -0
  721. v0/relationalai/semantics/tests/test_snapshot_abstract.py +0 -143
  722. v0/relationalai/semantics/tests/test_snapshot_base.py +0 -9
  723. v0/relationalai/semantics/tests/utils.py +0 -46
  724. v0/relationalai/std/__init__.py +0 -70
  725. v0/relationalai/tools/__init__.py +0 -0
  726. v0/relationalai/tools/cli.py +0 -1940
  727. v0/relationalai/tools/cli_controls.py +0 -1826
  728. v0/relationalai/tools/cli_helpers.py +0 -390
  729. v0/relationalai/tools/debugger.py +0 -183
  730. v0/relationalai/tools/debugger_client.py +0 -109
  731. v0/relationalai/tools/debugger_server.py +0 -302
  732. v0/relationalai/tools/dev.py +0 -685
  733. v0/relationalai/tools/qb_debugger.py +0 -425
  734. v0/relationalai/util/clean_up_databases.py +0 -95
  735. v0/relationalai/util/format.py +0 -123
  736. v0/relationalai/util/list_databases.py +0 -9
  737. v0/relationalai/util/otel_configuration.py +0 -25
  738. v0/relationalai/util/otel_handler.py +0 -484
  739. v0/relationalai/util/snowflake_handler.py +0 -88
  740. v0/relationalai/util/span_format_test.py +0 -43
  741. v0/relationalai/util/span_tracker.py +0 -207
  742. v0/relationalai/util/spans_file_handler.py +0 -72
  743. v0/relationalai/util/tracing_handler.py +0 -34
  744. /relationalai/{semantics/frontend → analysis}/__init__.py +0 -0
  745. {v0/relationalai → relationalai}/analysis/mechanistic.py +0 -0
  746. {v0/relationalai → relationalai}/analysis/whynot.py +0 -0
  747. /relationalai/{shims → auth}/__init__.py +0 -0
  748. {v0/relationalai → relationalai}/auth/jwt_generator.py +0 -0
  749. {v0/relationalai → relationalai}/auth/oauth_callback_server.py +0 -0
  750. {v0/relationalai → relationalai}/auth/token_handler.py +0 -0
  751. {v0/relationalai → relationalai}/auth/util.py +0 -0
  752. {v0/relationalai/clients → relationalai/clients/resources/snowflake}/cache_store.py +0 -0
  753. {v0/relationalai → relationalai}/compiler.py +0 -0
  754. {v0/relationalai → relationalai}/dependencies.py +0 -0
  755. {v0/relationalai → relationalai}/docutils.py +0 -0
  756. {v0/relationalai/analysis → relationalai/early_access}/__init__.py +0 -0
  757. {v0/relationalai → relationalai}/early_access/dsl/__init__.py +0 -0
  758. {v0/relationalai/auth → relationalai/early_access/dsl/adapters}/__init__.py +0 -0
  759. {v0/relationalai/early_access → relationalai/early_access/dsl/adapters/orm}/__init__.py +0 -0
  760. {v0/relationalai → relationalai}/early_access/dsl/adapters/orm/model.py +0 -0
  761. {v0/relationalai/early_access/dsl/adapters → relationalai/early_access/dsl/adapters/owl}/__init__.py +0 -0
  762. {v0/relationalai → relationalai}/early_access/dsl/adapters/owl/model.py +0 -0
  763. {v0/relationalai/early_access/dsl/adapters/orm → relationalai/early_access/dsl/bindings}/__init__.py +0 -0
  764. {v0/relationalai/early_access/dsl/adapters/owl → relationalai/early_access/dsl/bindings/legacy}/__init__.py +0 -0
  765. {v0/relationalai/early_access/dsl/bindings → relationalai/early_access/dsl/codegen}/__init__.py +0 -0
  766. {v0/relationalai → relationalai}/early_access/dsl/constants.py +0 -0
  767. {v0/relationalai → relationalai}/early_access/dsl/core/__init__.py +0 -0
  768. {v0/relationalai → relationalai}/early_access/dsl/core/constraints/__init__.py +0 -0
  769. {v0/relationalai → relationalai}/early_access/dsl/core/constraints/predicate/__init__.py +0 -0
  770. {v0/relationalai → relationalai}/early_access/dsl/core/stack.py +0 -0
  771. {v0/relationalai/early_access/dsl/bindings/legacy → relationalai/early_access/dsl/core/temporal}/__init__.py +0 -0
  772. {v0/relationalai → relationalai}/early_access/dsl/core/utils.py +0 -0
  773. {v0/relationalai/early_access/dsl/codegen → relationalai/early_access/dsl/ir}/__init__.py +0 -0
  774. {v0/relationalai/early_access/dsl/core/temporal → relationalai/early_access/dsl/ontologies}/__init__.py +0 -0
  775. {v0/relationalai → relationalai}/early_access/dsl/ontologies/raw_source.py +0 -0
  776. {v0/relationalai/early_access/dsl/ir → relationalai/early_access/dsl/orm}/__init__.py +0 -0
  777. {v0/relationalai/early_access/dsl/ontologies → relationalai/early_access/dsl/orm/measures}/__init__.py +0 -0
  778. {v0/relationalai → relationalai}/early_access/dsl/orm/reasoner_errors.py +0 -0
  779. {v0/relationalai/early_access/dsl/orm → relationalai/early_access/dsl/physical_metadata}/__init__.py +0 -0
  780. {v0/relationalai/early_access/dsl/orm/measures → relationalai/early_access/dsl/serialize}/__init__.py +0 -0
  781. {v0/relationalai → relationalai}/early_access/dsl/serialize/binding_model.py +0 -0
  782. {v0/relationalai → relationalai}/early_access/dsl/serialize/model.py +0 -0
  783. {v0/relationalai/early_access/dsl/physical_metadata → relationalai/early_access/dsl/snow}/__init__.py +0 -0
  784. {v0/relationalai → relationalai}/early_access/tests/__init__.py +0 -0
  785. {v0/relationalai → relationalai}/environments/ci.py +0 -0
  786. {v0/relationalai → relationalai}/environments/hex.py +0 -0
  787. {v0/relationalai → relationalai}/environments/terminal.py +0 -0
  788. {v0/relationalai → relationalai}/experimental/__init__.py +0 -0
  789. {v0/relationalai → relationalai}/experimental/graphs.py +0 -0
  790. {v0/relationalai → relationalai}/experimental/paths/__init__.py +0 -0
  791. {v0/relationalai → relationalai}/experimental/paths/benchmarks/__init__.py +0 -0
  792. {v0/relationalai → relationalai}/experimental/paths/path_algorithms/__init__.py +0 -0
  793. {v0/relationalai → relationalai}/experimental/paths/rpq/__init__.py +0 -0
  794. {v0/relationalai → relationalai}/experimental/paths/rpq/filter.py +0 -0
  795. {v0/relationalai → relationalai}/experimental/paths/rpq/glushkov.py +0 -0
  796. {v0/relationalai → relationalai}/experimental/paths/rpq/transition.py +0 -0
  797. {v0/relationalai → relationalai}/experimental/paths/utilities/__init__.py +0 -0
  798. {v0/relationalai → relationalai}/experimental/paths/utilities/utilities.py +0 -0
  799. {v0/relationalai/early_access/dsl/serialize → relationalai/loaders}/__init__.py +0 -0
  800. {v0/relationalai → relationalai}/metagen.py +0 -0
  801. {v0/relationalai → relationalai}/metamodel.py +0 -0
  802. {v0/relationalai → relationalai}/rel.py +0 -0
  803. {v0/relationalai → relationalai}/semantics/devtools/__init__.py +0 -0
  804. {v0/relationalai → relationalai}/semantics/internal/__init__.py +0 -0
  805. {v0/relationalai → relationalai}/semantics/internal/annotations.py +0 -0
  806. {v0/relationalai → relationalai}/semantics/lqp/__init__.py +0 -0
  807. {v0/relationalai → relationalai}/semantics/lqp/ir.py +0 -0
  808. {v0/relationalai → relationalai}/semantics/lqp/pragmas.py +0 -0
  809. {v0/relationalai → relationalai}/semantics/lqp/rewrite/__init__.py +0 -0
  810. {v0/relationalai → relationalai}/semantics/metamodel/dataflow.py +0 -0
  811. {v0/relationalai → relationalai}/semantics/metamodel/ir.py +0 -0
  812. {v0/relationalai → relationalai}/semantics/metamodel/rewrite/__init__.py +0 -0
  813. {v0/relationalai → relationalai}/semantics/metamodel/typer/__init__.py +0 -0
  814. {v0/relationalai → relationalai}/semantics/metamodel/types.py +0 -0
  815. {v0/relationalai → relationalai}/semantics/metamodel/visitor.py +0 -0
  816. {v0/relationalai → relationalai}/semantics/reasoners/experimental/__init__.py +0 -0
  817. {v0/relationalai → relationalai}/semantics/rel/__init__.py +0 -0
  818. {v0/relationalai → relationalai}/semantics/sql/__init__.py +0 -0
  819. {v0/relationalai → relationalai}/semantics/sql/executor/__init__.py +0 -0
  820. {v0/relationalai → relationalai}/semantics/sql/rewrite/__init__.py +0 -0
  821. {v0/relationalai/early_access/dsl/snow → relationalai/semantics/tests}/__init__.py +0 -0
  822. {v0/relationalai → relationalai}/semantics/tests/logging.py +0 -0
  823. {v0/relationalai → relationalai}/std/aggregates.py +0 -0
  824. {v0/relationalai → relationalai}/std/dates.py +0 -0
  825. {v0/relationalai → relationalai}/std/graphs.py +0 -0
  826. {v0/relationalai → relationalai}/std/inspect.py +0 -0
  827. {v0/relationalai → relationalai}/std/math.py +0 -0
  828. {v0/relationalai → relationalai}/std/re.py +0 -0
  829. {v0/relationalai → relationalai}/std/strings.py +0 -0
  830. {v0/relationalai/loaders → relationalai/tools}/__init__.py +0 -0
  831. {v0/relationalai → relationalai}/tools/cleanup_snapshots.py +0 -0
  832. {v0/relationalai → relationalai}/tools/constants.py +0 -0
  833. {v0/relationalai → relationalai}/tools/query_utils.py +0 -0
  834. {v0/relationalai → relationalai}/tools/snapshot_viewer.py +0 -0
  835. {v0/relationalai → relationalai}/util/__init__.py +0 -0
  836. {v0/relationalai → relationalai}/util/constants.py +0 -0
  837. {v0/relationalai → relationalai}/util/graph.py +0 -0
  838. {v0/relationalai → relationalai}/util/timeout.py +0 -0
@@ -0,0 +1,208 @@
1
+ var nh=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var FS=nh((Ht,zt)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Ee={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ll(this.context.count)},getNextContextId(){return Ll(this.context.count++)}};function Ll(e){const t=String(e),n=t.length-1;return Ee.context.id+(n?String.fromCharCode(96+n):"")+t}function rh(e){Ee.context=e}const oh=!1,ih=(e,t)=>e===t,pt=Symbol("solid-proxy"),Oa=typeof Proxy=="function",ji=Symbol("solid-track"),yo={equals:ih};let Aa=La;const Qt=1,bo=2,Ia={owned:null,cleanups:null,context:null,owner:null};var ce=null;let Ei=null,sh=null,he=null,He=null,Ut=null,qo=0;function Sr(e,t){const n=he,r=ce,o=e.length===0,i=t===void 0?r:t,s=o?Ia:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=o?e:()=>e(()=>de(()=>Pr(s)));ce=s,he=null;try{return bn(l,!0)}finally{he=n,ce=r}}function K(e,t){t=t?Object.assign({},yo,t):yo;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),ka(n,o));return[Da.bind(n),r]}function As(e,t,n){const r=Wo(e,t,!0,Qt);lr(r)}function pe(e,t,n){const r=Wo(e,t,!1,Qt);lr(r)}function V(e,t,n){Aa=hh;const r=Wo(e,t,!1,Qt);(!n||!n.render)&&(r.user=!0),Ut?Ut.push(r):lr(r)}function N(e,t,n){n=n?Object.assign({},yo,n):yo;const r=Wo(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,lr(r),Da.bind(r)}function Tt(e){return bn(e,!1)}function de(e){if(he===null)return e();const t=he;he=null;try{return e()}finally{he=t}}function Be(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let l;if(r){l=Array(e.length);for(let a=0;a<e.length;a++)l[a]=e[a]()}else l=e();if(i)return i=!1,s;const c=de(()=>t(l,o,s));return o=l,c}}function An(e){V(()=>de(e))}function te(e){return ce===null||(ce.cleanups===null?ce.cleanups=[e]:ce.cleanups.push(e)),e}function Hi(){return he}function Ml(){return ce}function lh(e,t){const n=ce,r=he;ce=e,he=null;try{return bn(t,!0)}catch(o){Is(o)}finally{ce=n,he=r}}function ch(e){const t=he,n=ce;return Promise.resolve().then(()=>{he=t,ce=n;let r;return bn(e,!1),he=ce=null,r?r.done:void 0})}const[ah,BS]=K(!1);function uh(){return[ah,ch]}function Ne(e,t){const n=Symbol("context");return{id:n,Provider:ph(n),defaultValue:e}}function Te(e){let t;return ce&&ce.context&&(t=ce.context[e.id])!==void 0?t:e.defaultValue}function Yn(e){const t=N(e),n=N(()=>zi(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}function Da(){if(this.sources&&this.state)if(this.state===Qt)lr(this);else{const e=He;He=null,bn(()=>_o(this),!1),He=e}if(he){const e=this.observers?this.observers.length:0;he.sources?(he.sources.push(this),he.sourceSlots.push(e)):(he.sources=[this],he.sourceSlots=[e]),this.observers?(this.observers.push(he),this.observerSlots.push(he.sources.length-1)):(this.observers=[he],this.observerSlots=[he.sources.length-1])}return this.value}function ka(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&bn(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=Ei&&Ei.running;s&&Ei.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?He.push(i):Ut.push(i),i.observers&&Ma(i)),s||(i.state=Qt)}if(He.length>1e6)throw He=[],new Error},!1)),t}function lr(e){if(!e.fn)return;Pr(e);const t=qo;dh(e,e.value,t)}function dh(e,t,n){let r;const o=ce,i=he;he=ce=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=Qt,e.owned&&e.owned.forEach(Pr),e.owned=null),e.updatedAt=n+1,Is(s)}finally{he=i,ce=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ka(e,r):e.value=r,e.updatedAt=n)}function Wo(e,t,n,r=Qt,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ce,context:ce?ce.context:null,pure:n};return ce===null||ce!==Ia&&(ce.owned?ce.owned.push(i):ce.owned=[i]),i}function wo(e){if(e.state===0)return;if(e.state===bo)return _o(e);if(e.suspense&&de(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<qo);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Qt)lr(e);else if(e.state===bo){const r=He;He=null,bn(()=>_o(e,t[0]),!1),He=r}}function bn(e,t){if(He)return e();let n=!1;t||(He=[]),Ut?n=!0:Ut=[],qo++;try{const r=e();return fh(n),r}catch(r){n||(Ut=null),He=null,Is(r)}}function fh(e){if(He&&(La(He),He=null),e)return;const t=Ut;Ut=null,t.length&&bn(()=>Aa(t),!1)}function La(e){for(let t=0;t<e.length;t++)wo(e[t])}function hh(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:wo(r)}if(Ee.context){if(Ee.count){Ee.effects||(Ee.effects=[]),Ee.effects.push(...e.slice(0,n));return}rh()}for(Ee.effects&&!Ee.count&&(e=[...Ee.effects,...e],n+=Ee.effects.length,delete Ee.effects),t=0;t<n;t++)wo(e[t])}function _o(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===Qt?r!==t&&(!r.updatedAt||r.updatedAt<qo)&&wo(r):o===bo&&_o(r,t)}}}function Ma(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=bo,n.pure?He.push(n):Ut.push(n),n.observers&&Ma(n))}}function Pr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Pr(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Pr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function gh(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Is(e,t=ce){throw gh(e)}function zi(e){if(typeof e=="function"&&!e.length)return zi(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=zi(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ph(e,t){return function(r){let o;return pe(()=>o=de(()=>(ce.context={...ce.context,[e]:r.value},Yn(()=>r.children))),void 0),o}}const mh=Symbol("fallback");function Nl(e){for(let t=0;t<e.length;t++)e[t]()}function vh(e,t,n={}){let r=[],o=[],i=[],s=0,l=t.length>1?[]:null;return te(()=>Nl(i)),()=>{let c=e()||[],a=c.length,u,d;return c[ji],de(()=>{let h,g,p,_,w,v,y,b,S;if(a===0)s!==0&&(Nl(i),i=[],r=[],o=[],s=0,l&&(l=[])),n.fallback&&(r=[mh],o[0]=Sr(x=>(i[0]=x,n.fallback())),s=1);else if(s===0){for(o=new Array(a),d=0;d<a;d++)r[d]=c[d],o[d]=Sr(f);s=a}else{for(p=new Array(a),_=new Array(a),l&&(w=new Array(a)),v=0,y=Math.min(s,a);v<y&&r[v]===c[v];v++);for(y=s-1,b=a-1;y>=v&&b>=v&&r[y]===c[b];y--,b--)p[b]=o[y],_[b]=i[y],l&&(w[b]=l[y]);for(h=new Map,g=new Array(b+1),d=b;d>=v;d--)S=c[d],u=h.get(S),g[d]=u===void 0?-1:u,h.set(S,d);for(u=v;u<=y;u++)S=r[u],d=h.get(S),d!==void 0&&d!==-1?(p[d]=o[u],_[d]=i[u],l&&(w[d]=l[u]),d=g[d],h.set(S,d)):i[u]();for(d=v;d<a;d++)d in p?(o[d]=p[d],i[d]=_[d],l&&(l[d]=w[d],l[d](d))):o[d]=Sr(f);o=o.slice(0,s=a),r=c.slice(0)}return o});function f(h){if(i[d]=h,l){const[g,p]=K(d);return l[d]=p,t(c[d],g)}return t(c[d])}}}function m(e,t){return de(()=>e(t||{}))}function eo(){return!0}const Ui={get(e,t,n){return t===pt?n:e.get(t)},has(e,t){return t===pt?!0:e.has(t)},set:eo,deleteProperty:eo,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:eo,deleteProperty:eo}},ownKeys(e){return e.keys()}};function $i(e){return(e=typeof e=="function"?e():e)?e:{}}function yh(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function I(...e){let t=!1;for(let s=0;s<e.length;s++){const l=e[s];t=t||!!l&&pt in l,e[s]=typeof l=="function"?(t=!0,N(l)):l}if(Oa&&t)return new Proxy({get(s){for(let l=e.length-1;l>=0;l--){const c=$i(e[l])[s];if(c!==void 0)return c}},has(s){for(let l=e.length-1;l>=0;l--)if(s in $i(e[l]))return!0;return!1},keys(){const s=[];for(let l=0;l<e.length;l++)s.push(...Object.keys($i(e[l])));return[...new Set(s)]}},Ui);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const l=e[s];if(!l)continue;const c=Object.getOwnPropertyNames(l);for(let a=c.length-1;a>=0;a--){const u=c[a];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(l,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:yh.bind(n[u]=[d.get.bind(l)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(l)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const l=i[s],c=r[l];c&&c.get?Object.defineProperty(o,l,c):o[l]=c?c.value:void 0}return o}function B(e,...t){if(Oa&&pt in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(l){return s.includes(l)?e[l]:void 0},has(l){return s.includes(l)&&l in e},keys(){return s.filter(l=>l in e)}},Ui));return i.push(new Proxy({get(s){return o.has(s)?void 0:e[s]},has(s){return o.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.has(s))}},Ui)),i}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let l=!1,c=0;for(const a of t)a.includes(o)&&(l=!0,s?r[c][o]=i.value:Object.defineProperty(r[c],o,i)),++c;l||(s?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}let bh=0;function xt(){return Ee.context?Ee.getNextContextId():`cl-${bh++}`}const Na=e=>`Stale read from <${e}>.`;function xe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return N(vh(()=>e.each,e.children,t||void 0))}function X(e){const t=e.keyed,n=N(()=>e.when,void 0,void 0),r=t?n:N(n,void 0,{equals:(o,i)=>!o==!i});return N(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?de(()=>i(t?o:()=>{if(!de(r))throw Na("Show");return n()})):i}return e.fallback},void 0,void 0)}function Go(e){const t=Yn(()=>e.children),n=N(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const l=s,c=o[s],a=i,u=N(()=>a()?void 0:c.when,void 0,void 0),d=c.keyed?u:N(u,void 0,{equals:(f,h)=>!f==!h});i=()=>a()||(d()?[l,u,c]:void 0)}return i});return N(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,l=s.children;return typeof l=="function"&&l.length>0?de(()=>l(s.keyed?i():()=>{if(de(n)()?.[0]!==o)throw Na("Match");return i()})):l},void 0,void 0)}function Pt(e){return e}const wh=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],_h=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...wh]),xh=new Set(["innerHTML","textContent","innerText","children"]),Sh=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Ch=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Eh(e,t){const n=Ch[e];return typeof n=="object"?n[t]?n.$:void 0:n}const $h=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Th=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Ph={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Oh(e,t,n){let r=n.length,o=t.length,i=r,s=0,l=0,c=t[o-1].nextSibling,a=null;for(;s<o||l<i;){if(t[s]===n[l]){s++,l++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const u=i<r?l?n[l-1].nextSibling:n[i-l]:c;for(;l<i;)e.insertBefore(n[l++],u)}else if(i===l)for(;s<o;)(!a||!a.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[l]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!a){a=new Map;let d=l;for(;d<i;)a.set(n[d],d++)}const u=a.get(t[s]);if(u!=null)if(l<u&&u<i){let d=s,f=1,h;for(;++d<o&&d<i&&!((h=a.get(t[d]))==null||h!==u+f);)f++;if(f>u-l){const g=t[s];for(;l<u;)e.insertBefore(n[l++],g)}else e.replaceChild(n[l++],t[s++])}else s++;else t[s++].remove()}}}const Rl="_$DX_DELEGATE";function Ah(e,t,n,r={}){let o;return Sr(i=>{o=i,t===document?e():P(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function F(e,t,n,r){let o;const i=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Yo(e,t=window.document){const n=t[Rl]||(t[Rl]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Fh))}}function Gt(e,t,n){In(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ih(e,t,n,r){In(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Dh(e,t,n){In(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function en(e,t){In(e)||(t==null?e.removeAttribute("class"):e.className=t)}function kh(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Lh(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const l=o[i];!l||l==="undefined"||t[l]||(Fl(e,l,!1),delete n[l])}for(i=0,s=r.length;i<s;i++){const l=r[i],c=!!t[l];!l||l==="undefined"||n[l]===c||!c||(Fl(e,l,!0),n[l]=c)}return n}function Xo(e,t,n){if(!t)return n?Gt(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function vt(e,t={},n,r){const o={};return r||pe(()=>o.children=Or(e,t.children,o.children)),pe(()=>typeof t.ref=="function"&&Tn(t.ref,e)),pe(()=>Mh(e,t,n,!0,o,!0)),o}function Tn(e,t,n){return de(()=>e(t,n))}function P(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Or(e,t,r,n);pe(o=>Or(e,t(),o,n),r)}function Mh(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Kl(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const l=t[s];o[s]=Kl(e,s,l,o[s],n,i,t)}}function Nh(e){let t,n;return!In()||!(t=Ee.registry.get(n=Kh()))?e():(Ee.completed&&Ee.completed.add(t),Ee.registry.delete(n),t)}function In(e){return!!Ee.context&&!Ee.done&&(!e||e.isConnected)}function Rh(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Fl(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Kl(e,t,n,r,o,i,s){let l,c,a,u,d;if(t==="style")return Xo(e,n,r);if(t==="classList")return Lh(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=$h.has(f);if(!h&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(h||n)&&(kh(e,f,n,h),h&&Yo([f]))}else if(t.slice(0,5)==="attr:")Gt(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Dh(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(a=xh.has(t))||!o&&((u=Eh(t,e.tagName))||(c=_h.has(t)))||(l=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),c=!0;else if(In(e))return n;t==="class"||t==="className"?en(e,n):l&&!c&&!a?e[Rh(t)]=n:e[u||t]=n}else{const f=o&&t.indexOf(":")>-1&&Ph[t.split(":")[0]];f?Ih(e,f,t,n):Gt(e,Sh[t]||t,n)}return n}function Fh(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=c=>Object.defineProperty(e,"target",{configurable:!0,value:c}),s=()=>{const c=t[n];if(c&&!t.disabled){const a=t[`${n}Data`];if(a!==void 0?c.call(t,a,e):c.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},l=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const c=e.composedPath();i(c[0]);for(let a=0;a<c.length-2&&(t=c[a],!!s());a++){if(t._$host){t=t._$host,l();break}if(t.parentNode===o)break}}else l();i(r)}function Or(e,t,n,r,o){const i=In(e);if(i){!n&&(n=[...e.childNodes]);let c=[];for(let a=0;a<n.length;a++){const u=n[a];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():c.push(u)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,l=r!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(l){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=Fn(e,n,r,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=Fn(e,n,r)}else{if(s==="function")return pe(()=>{let c=t();for(;typeof c=="function";)c=c();n=Or(e,c,n,r)}),()=>n;if(Array.isArray(t)){const c=[],a=n&&Array.isArray(n);if(qi(c,t,n,o))return pe(()=>n=Or(e,c,n,r,!0)),()=>n;if(i){if(!c.length)return n;if(r===void 0)return n=[...e.childNodes];let u=c[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(c.length===0){if(n=Fn(e,n,r),l)return n}else a?n.length===0?Bl(e,c,r):Oh(e,n,c):(n&&Fn(e),Bl(e,c));n=c}else if(t.nodeType){if(i&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)return n=Fn(e,n,r,t);Fn(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function qi(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let l=t[i],c=n&&n[e.length],a;if(!(l==null||l===!0||l===!1))if((a=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))o=qi(e,l,c)||o;else if(a==="function")if(r){for(;typeof l=="function";)l=l();o=qi(e,Array.isArray(l)?l:[l],Array.isArray(c)?c:[c])||o}else e.push(l),o=!0;else{const u=String(l);c&&c.nodeType===3&&c.data===u?e.push(c):e.push(document.createTextNode(u))}}return o}function Bl(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Fn(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const l=t[s];if(o!==l){const c=l.parentNode===e;!i&&!s?c?e.replaceChild(o,l):e.insertBefore(o,n):c&&l.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Kh(){return Ee.getNextContextId()}const Bh=!1,Vh="http://www.w3.org/2000/svg";function Ra(e,t=!1){return t?document.createElementNS(Vh,e):document.createElement(e)}function Fa(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Ml();let i,s=!!Ee.context;return V(()=>{s&&(Ml().user=s=!1),i||(i=lh(o,()=>N(()=>e.children)));const l=r();if(l instanceof HTMLHeadElement){const[c,a]=K(!1),u=()=>a(!0);Sr(d=>P(l,()=>c()?d():i(),null)),te(u)}else{const c=Ra(e.isSVG?"g":"div",e.isSVG),a=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),P(a,i),l.appendChild(c),e.ref&&e.ref(c),te(()=>l.removeChild(c))}},void 0,{render:!s}),n}function jh(e,t){const n=N(e);return N(()=>{const r=n();switch(typeof r){case"function":return de(()=>r(t));case"string":const o=Th.has(r),i=Ee.context?Nh():Ra(r,o);return vt(i,t,o),i}})}function wt(e){const[,t]=B(e,["component"]);return jh(()=>e.component,t)}function Hh(){const e=navigator.platform.toLowerCase();return e.startsWith("mac")?"mac":e.startsWith("win")?"windows":"other"}const Ka=Hh();function zh(){const e=navigator.userAgent.toLowerCase(),t=navigator.vendor.toLowerCase(),n=(r,o)=>r.indexOf(o)>-1;return n(e,"edg/")?"edge":n(t,"google")&&n(e,"chrome")?"chrome":n(e,"firefox")?"firefox":n(t,"apple")&&n(e,"safari")?"safari":n(e,"opr/")||n(e,"opera")?"opera":n(e,"trident/")?"ie":"other"}const Uh=zh(),xo=Symbol("store-raw"),zn=Symbol("store-node"),Bt=Symbol("store-has"),Ba=Symbol("store-self");function Va(e){let t=e[pt];if(!t&&(Object.defineProperty(e,pt,{value:t=new Proxy(e,Gh)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const s=n[o];r[s].get&&Object.defineProperty(e,s,{enumerable:r[s].enumerable,get:r[s].get.bind(t)})}}return t}function Xn(e){let t;return e!=null&&typeof e=="object"&&(e[pt]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ot(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[xo])return n;if(!Xn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,l=e.length;s<l;s++)o=e[s],(r=Ot(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let c=0,a=s.length;c<a;c++)i=s[c],!l[i].get&&(o=e[i],(r=Ot(o,t))!==o&&(e[i]=r))}return e}function So(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Ar(e,t,n){if(e[t])return e[t];const[r,o]=K(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function qh(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===pt||t===zn||(delete n.value,delete n.writable,n.get=()=>e[pt][t]),n}function ja(e){Hi()&&Ar(So(e,zn),Ba)()}function Wh(e){return ja(e),Reflect.ownKeys(e)}const Gh={get(e,t,n){if(t===xo)return e;if(t===pt)return n;if(t===ji)return ja(e),n;const r=So(e,zn),o=r[t];let i=o?o():e[t];if(t===zn||t===Bt||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Hi()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=Ar(r,t,i)())}return Xn(i)?Va(i):i},has(e,t){return t===xo||t===pt||t===ji||t===zn||t===Bt||t==="__proto__"?!0:(Hi()&&Ar(So(e,Bt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Wh,getOwnPropertyDescriptor:qh};function Zn(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[Bt]&&e[Bt][t]&&o!==void 0&&e[Bt][t].$()):(e[t]=n,e[Bt]&&e[Bt][t]&&o===void 0&&e[Bt][t].$());let s=So(e,zn),l;if((l=Ar(s,t,o))&&l.$(()=>n),Array.isArray(e)&&e.length!==i){for(let c=e.length;c<i;c++)(l=s[c])&&l.$();(l=Ar(s,"length",i))&&l.$(e.length)}(l=s[Ba])&&l.$()}function Ha(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Zn(e,o,t[o])}}function Yh(e,t){if(typeof t=="function"&&(t=t(e)),t=Ot(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Zn(e,n,o)}Zn(e,"length",r)}else Ha(e,t)}function wr(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,l=Array.isArray(e);if(Array.isArray(r)){for(let c=0;c<r.length;c++)wr(e,[r[c]].concat(t),n);return}else if(l&&s==="function"){for(let c=0;c<e.length;c++)r(e[c],c)&&wr(e,[c].concat(t),n);return}else if(l&&s==="object"){const{from:c=0,to:a=e.length-1,by:u=1}=r;for(let d=c;d<=a;d+=u)wr(e,[d].concat(t),n);return}else if(t.length>1){wr(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Ot(i),r===void 0||Xn(o)&&Xn(i)&&!Array.isArray(i)?Ha(o,i):Zn(e,r,i))}function Zo(...[e,t]){const n=Ot(e||{}),r=Array.isArray(n),o=Va(n);function i(...s){Tt(()=>{r&&s.length===1?Yh(n,s[0]):wr(n,s)})}return[o,i]}const Co=new WeakMap,za={get(e,t){if(t===xo)return e;const n=e[t];let r;return Xn(n)?Co.get(n)||(Co.set(n,r=new Proxy(n,za)),r):n},set(e,t,n){return Zn(e,t,Ot(n)),!0},deleteProperty(e,t){return Zn(e,t,void 0,!0),!0}};function Un(e){return t=>{if(Xn(t)){let n;(n=Co.get(t))||Co.set(t,n=new Proxy(t,za)),e(n)}return t}}function Xh(e){return new WebSocket(e)}function Zh(e,t,n){localStorage.setItem(e,JSON.stringify(t,n))}function Jh(e,t){const n=localStorage.getItem(e);return n?JSON.parse(n,t):void 0}function Ds(e,t,n,r){const[o,i]=Zo(Jh(e,r)??t,{name:e});return[o,(...l)=>{const c=i.apply(null,l);return Zh(e,o,n),c}]}const Wi=new Set;function Qh(e){for(const t of Wi)t(e)}function ks(e,t,n){const[r,o]=Zo(t,{name:e}),i=l=>o(Un(c=>n(c,l)));return Wi.add(i),[r,o,()=>Wi.delete(i),i]}const eg={url:`ws://${location.host}/ws/client`,poll_interval:2e3},[Ir,Vl]=Ds("connection",eg);function Ua(e,t){let n=e;for(let r of t)n=n?.events?.[r];return n}function jl(e){return typeof e=="object"&&e.event==="placeholder"}var ue;(e=>{function t(f){return f?.event==="time"}e.is_time=t;function n(f){return f?.event==="source_map"}e.is_source_mapping=n;function r(f){return f?.event==="source_map"||f?.event==="time"&&f.source_map}e.has_source_map=r;function o(f){return f.event==="profile_events"}e.is_profile_events=o;function i(f){return f?.event==="error"}e.is_error=i;function s(f){return f?.event==="warn"}e.is_warn=s;function l(f){return f?.event==="compilation"}e.is_compilation=l;function c(f){return f?.event==="transaction_created"}e.is_transaction_created=c;function a(f){return f?.event==="job_created"}e.is_job_created=a;function u(f){return f?.event==="program_disconnected"}e.is_program_disconnected=u;function d(f){return"event"in f&&!("span_type"in f)&&"time"in f}e.is_event=d})(ue||(ue={}));var oe;(e=>{function t(a){return a?.event==="span"&&Array.isArray(a.events)}e.is_span=t;function n(a){return t(a)&&a.span_type==="program"}e.is_program=n;function r(a){return t(a)&&a.span_type==="rule_batch"}e.is_rule_batch=r;function o(a){return t(a)&&(a.span_type==="rule"||a.span_type==="query")}e.is_block=o;function i(a){return t(a)&&a.span_type==="rule"}e.is_rule=i;function s(a){return t(a)&&a.span_type==="query"}e.is_query=s;function l(a){return t(a)&&a.span_type==="transaction"}e.is_transaction=l;function c(a){return t(a)&&a.span_type==="job"}e.is_job=c})(oe||(oe={}));class tg{connection;messages;set_messages;root;set_root;spans(){return this.root.events}connected;set_connected;path=[];spans_by_id=new Map;latest;profileBuilderByTransactionID=new Map;constructor(t){this.connection=new rg(t),[this.messages,this.set_messages]=K([],{equals:()=>!1}),[this.root,this.set_root]=Zo({id:"root",event:"span",span_type:"root",span:[],start_time:new Date(0),events:[],selection_path:[]}),[this.connected,this.set_connected]=K(!1,{equals:()=>!1}),this.latest=()=>this.spans().findLast(oe.is_program),this.connection.onreceive=this.handle_message,this.connection.onconnect=this.set_connected}clear(){return Tt(()=>{this.spans_by_id=new Map,this.set_messages([]),this.set_root({event:"span",span_type:"root",span:[],start_time:new Date(0),events:[],selection_path:[]})}),this.send.clear()}exportData=(t=!1)=>{let n=Ot(this.messages());t&&(n=n.map(ng));const r=JSON.stringify({version:3,sanitized:t,messages:n}),o=new Blob([r],{type:"application/json"}),i=document.createElement("a"),s=URL.createObjectURL(o);i.href=s,i.download="debugger_data.json",document.body.appendChild(i),i.click(),document.body.removeChild(i)};importData=t=>{if(Array.isArray(t)&&(t={version:t[0]?.version??2,messages:t}),t.version>=2)Tt(()=>{this.set_messages([]),this.set_root("events",[])}),this.handle_message(t.messages,!0);else if(t.version===void 0){let n=[t];const r=new Set;for(;n.length;){const o=n.pop();for(let i of o.events||[])r.has(i)||(r.add(i),Object.defineProperty(i,"parent",{value:o,enumerable:!1,configurable:!0,writable:!0}),n.push(i))}this.set_root(t)}};send={clear:()=>this._send({type:"clear"}),list_transactions:(t=20,n=!1)=>this._send({type:"list_transactions",limit:t,only_active:n}),list_imports:()=>this._send({type:"list_imports"}),get_imports_status:()=>this._send({type:"get_imports_status"})};rpc_callbacks=new Map;_next_rpc_id=1;_send(t){const n=t.rpc_id=this._next_rpc_id++;return this.connection.send(JSON.stringify(t)),new Promise((r,o)=>{this.rpc_callbacks.set(n,i=>{i.status==="error"?o(i):r(i),this.rpc_callbacks.delete(n)})})}get_event_by_path(t){let n=this.root;for(const r of t)n=n.events?.[r];return n}get_span(t,n){if(t==null)return n;const r=this.spans_by_id.get(t);if(r)return Ua(n,r?.selection_path)}handle_span_start(t){this.set_root(Un(n=>{const r=this.get_span(t.span.parent_id,n);if(!r||!oe.is_span(r))throw new Error(`Parent '${t.span.parent_id}' not found for span '${t.span.id}'`);let o={...t.span.attrs,id:t.span.id,start_time:new Date(t.span.start_timestamp),end_time:void 0,span_type:t.span.type,event:"span",selection_path:[...r.selection_path,r.events.length],events:[]};r.end_time&&console.warn("adding a child to a closed span",{parent:r,sub:o}),this.spans_by_id.set(t.span.id,o),Object.defineProperty(o,"parent",{value:Ot(r),enumerable:!1,configurable:!0,writable:!0}),r.events.push(o)}))}handle_span_end(t){this.set_root(Un(n=>{let r=this.get_span(t.id,n);if(!r||!oe.is_span(r)){console.error(`Open span not found for close '${t.id}', ignoring.`);return}r.end_time=new Date(t.end_timestamp),r.elapsed=r.end_time.getTime()-r.start_time.getTime();for(let o in t.end_attrs)o==="span"||o==="event"||(r[o]=t[o])}))}handle_event(t){if(ue.is_program_disconnected(t)){const n=this.spans_by_id.get(t.id);if(n){const r=[],o=[n];for(;o.length;){const i=o.pop();i.end_time||r.push({event:"span_end",id:i.id,end_timestamp:new Date().toISOString(),end_attrs:{synthetic_close:"program_disconnected",synthetic_close_source:t.id}});for(let s of i.events)oe.is_span(s)&&o.push(s)}r.length&&(console.info("Program disconnected with opened spans. Injecting synthetic closes:",r),this.handle_message(r.reverse()))}}this.set_root(Un(n=>{const r=this.get_span(t.parent_id,n);if(!r||!oe.is_span(r))throw new Error(`Parent '${t.parent_id}' not found for event '${t.event}'`);t.time=new Date(t.timestamp),t.selection_path=[...r.selection_path,r.events.length],Object.defineProperty(t,"parent",{value:Ot(r),enumerable:!1,configurable:!0,writable:!0}),r.events.push(t)}))}handle_rpc_response(t){const n=this.rpc_callbacks.get(t.rpc_id);if(!n)throw new Error(`Got RPC response for unsent RPC: ${t.rpc_id}`);n(t)}handle_single_message=(t,n=!1)=>{if(t.event==="span_start")this.handle_span_start(t);else if(t.event==="span_end")this.handle_span_end(t);else if(t.event==="rpc_response"){if(n)return;this.handle_rpc_response(t)}else this.handle_event(t);Qh(t)};handle_message=(t,n=!1)=>{Tt(()=>{for(let r of t)this.handle_single_message(r,n);this.set_messages(r=>{for(let o of t)r.push(o);return r})})}}function ng(e){return ue.is_time(e)&&e.results?{...e,results:{...e.results,values:[],sanitized:!0}}:e}class rg{socket=null;shouldReconnect=!0;active=!1;ws_url;reconnectInterval;onreceive;onconnect;buffered_sends=[];constructor(t,n=1e3){this.ws_url=t,this.reconnectInterval=n,this.connect()}connect(){this.socket=Xh(this.ws_url),this.socket.addEventListener("open",()=>{this.active=!0,this.onconnect?.(!0);for(let t of this.buffered_sends)this.send(t);this.buffered_sends=[]}),this.socket.addEventListener("message",t=>{let n;try{n=JSON.parse(t.data)}catch{console.warn("Failed to parse message:",t.data)}n.event==="span_end"&&n.span?.length===1&&n.span[0]==="program"&&(this.active=!1),this.onreceive?.(n)}),this.socket.addEventListener("close",()=>{this.onconnect?.(!1),this.active&&(console.warn("Disconnected unexpectedly from the WebSocket server"),this.active=!1),this.shouldReconnect&&setTimeout(()=>this.connect(),this.reconnectInterval)}),this.socket.addEventListener("error",t=>{this.socket&&this.socket.close()})}send(t){this.active?this.socket?.send(t):this.buffered_sends.push(t)}disconnect(){this.socket&&this.socket.close()}close(){this.shouldReconnect=!1,this.disconnect()}}const Me=new tg(Ir.url);V(()=>Me.connection.reconnectInterval=Ir.poll_interval);V(()=>{Me.connection.ws_url=Ir.url,Me.connection.disconnect()});globalThis.client=Me;function og(e,t){return e===t}let ig=class{constructor(t,n=og,r){this.name=t,this.eq=n;let[o,i]=K([]);this.selected=o,this.onChange=r,this.set_selected=s=>{this.onChange?.(s),i(s)}}selected;set_selected;onChange;primary(){return this.selected()[0]}last(){const t=this.selected();return t[t.length-1]}is_selected(t){for(let n of this.selected())if(this.eq(n,t))return!0;return!1}clear=()=>(this.set_selected([]),this);select=(...t)=>(this.set_selected(t),this);add=(...t)=>{for(let n of t){if(this.is_selected(n))continue;const r=this.selected();this.set_selected([...r,n])}return this};remove=t=>{const n=this.selected();for(let r=0;r<n.length;r+=1)if(this.eq(n[r],t)){this.set_selected(n.toSpliced(r,1));break}return this};toggle=(t,n=!this.is_selected(t))=>n?this.add(t):this.remove(t)};function qa(e,t,n){return Ne(new ig(e,t,n))}let Gi=!1;const Jn=qa("EventList",(e,t)=>e.selection_path?.join(".")===t.selection_path?.join("."),e=>{Gi||window.history.pushState({event_list:Ot(e.map(t=>t?.selection_path)).filter(t=>t)},"",window.location.toString())});window.addEventListener("popstate",e=>{Gi=!0;const t=e.state?.event_list;t&&Jn.defaultValue.select(...t.map(n=>Me.get_event_by_path(n))),Gi=!1});qa("EventDetail");var Hl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wa={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
2
+ * Prism: Lightweight, robust, elegant syntax highlighting
3
+ *
4
+ * @license MIT <https://opensource.org/licenses/MIT>
5
+ * @author Lea Verou <https://lea.verou.me>
6
+ * @namespace
7
+ * @public
8
+ */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function v(y){return y instanceof c?new c(y.type,v(y.content),y.alias):Array.isArray(y)?y.map(v):y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,"__id",{value:++i}),v.__id},clone:function v(y,b){b=b||{};var S,x;switch(l.util.type(y)){case"Object":if(x=l.util.objId(y),b[x])return b[x];S={},b[x]=S;for(var C in y)y.hasOwnProperty(C)&&(S[C]=v(y[C],b));return S;case"Array":return x=l.util.objId(y),b[x]?b[x]:(S=[],b[x]=S,y.forEach(function(A,$){S[$]=v(A,b)}),S);default:return y}},getLanguage:function(v){for(;v;){var y=o.exec(v.className);if(y)return y[1].toLowerCase();v=v.parentElement}return"none"},setLanguage:function(v,y){v.className=v.className.replace(RegExp(o,"gi"),""),v.classList.add("language-"+y)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(S){var v=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack)||[])[1];if(v){var y=document.getElementsByTagName("script");for(var b in y)if(y[b].src==v)return y[b]}return null}},isActive:function(v,y,b){for(var S="no-"+y;v;){var x=v.classList;if(x.contains(y))return!0;if(x.contains(S))return!1;v=v.parentElement}return!!b}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(v,y){var b=l.util.clone(l.languages[v]);for(var S in y)b[S]=y[S];return b},insertBefore:function(v,y,b,S){S=S||l.languages;var x=S[v],C={};for(var A in x)if(x.hasOwnProperty(A)){if(A==y)for(var $ in b)b.hasOwnProperty($)&&(C[$]=b[$]);b.hasOwnProperty(A)||(C[A]=x[A])}var E=S[v];return S[v]=C,l.languages.DFS(l.languages,function(T,R){R===E&&T!=v&&(this[T]=C)}),C},DFS:function v(y,b,S,x){x=x||{};var C=l.util.objId;for(var A in y)if(y.hasOwnProperty(A)){b.call(y,A,y[A],S||A);var $=y[A],E=l.util.type($);E==="Object"&&!x[C($)]?(x[C($)]=!0,v($,b,null,x)):E==="Array"&&!x[C($)]&&(x[C($)]=!0,v($,b,A,x))}}},plugins:{},highlightAll:function(v,y){l.highlightAllUnder(document,v,y)},highlightAllUnder:function(v,y,b){var S={callback:b,container:v,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),l.hooks.run("before-all-elements-highlight",S);for(var x=0,C;C=S.elements[x++];)l.highlightElement(C,y===!0,S.callback)},highlightElement:function(v,y,b){var S=l.util.getLanguage(v),x=l.languages[S];l.util.setLanguage(v,S);var C=v.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(C,S);var A=v.textContent,$={element:v,language:S,grammar:x,code:A};function E(R){$.highlightedCode=R,l.hooks.run("before-insert",$),$.element.innerHTML=$.highlightedCode,l.hooks.run("after-highlight",$),l.hooks.run("complete",$),b&&b.call($.element)}if(l.hooks.run("before-sanity-check",$),C=$.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!$.code){l.hooks.run("complete",$),b&&b.call($.element);return}if(l.hooks.run("before-highlight",$),!$.grammar){E(l.util.encode($.code));return}if(y&&r.Worker){var T=new Worker(l.filename);T.onmessage=function(R){E(R.data)},T.postMessage(JSON.stringify({language:$.language,code:$.code,immediateClose:!0}))}else E(l.highlight($.code,$.grammar,$.language))},highlight:function(v,y,b){var S={code:v,grammar:y,language:b};if(l.hooks.run("before-tokenize",S),!S.grammar)throw new Error('The language "'+S.language+'" has no grammar.');return S.tokens=l.tokenize(S.code,S.grammar),l.hooks.run("after-tokenize",S),c.stringify(l.util.encode(S.tokens),S.language)},tokenize:function(v,y){var b=y.rest;if(b){for(var S in b)y[S]=b[S];delete y.rest}var x=new d;return f(x,x.head,v),u(v,x,y,x.head,0),g(x)},hooks:{all:{},add:function(v,y){var b=l.hooks.all;b[v]=b[v]||[],b[v].push(y)},run:function(v,y){var b=l.hooks.all[v];if(!(!b||!b.length))for(var S=0,x;x=b[S++];)x(y)}},Token:c};r.Prism=l;function c(v,y,b,S){this.type=v,this.content=y,this.alias=b,this.length=(S||"").length|0}c.stringify=function v(y,b){if(typeof y=="string")return y;if(Array.isArray(y)){var S="";return y.forEach(function(E){S+=v(E,b)}),S}var x={type:y.type,content:v(y.content,b),tag:"span",classes:["token",y.type],attributes:{},language:b},C=y.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(x.classes,C):x.classes.push(C)),l.hooks.run("wrap",x);var A="";for(var $ in x.attributes)A+=" "+$+'="'+(x.attributes[$]||"").replace(/"/g,"&quot;")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+A+">"+x.content+"</"+x.tag+">"};function a(v,y,b,S){v.lastIndex=y;var x=v.exec(b);if(x&&S&&x[1]){var C=x[1].length;x.index+=C,x[0]=x[0].slice(C)}return x}function u(v,y,b,S,x,C){for(var A in b)if(!(!b.hasOwnProperty(A)||!b[A])){var $=b[A];$=Array.isArray($)?$:[$];for(var E=0;E<$.length;++E){if(C&&C.cause==A+","+E)return;var T=$[E],R=T.inside,q=!!T.lookbehind,L=!!T.greedy,U=T.alias;if(L&&!T.pattern.global){var j=T.pattern.toString().match(/[imsuy]*$/)[0];T.pattern=RegExp(T.pattern.source,j+"g")}for(var Y=T.pattern||T,J=S.next,ee=x;J!==y.tail&&!(C&&ee>=C.reach);ee+=J.value.length,J=J.next){var se=J.value;if(y.length>v.length)return;if(!(se instanceof c)){var M=1,k;if(L){if(k=a(Y,ee,v,q),!k||k.index>=v.length)break;var G=k.index,H=k.index+k[0].length,z=ee;for(z+=J.value.length;G>=z;)J=J.next,z+=J.value.length;if(z-=J.value.length,ee=z,J.value instanceof c)continue;for(var D=J;D!==y.tail&&(z<H||typeof D.value=="string");D=D.next)M++,z+=D.value.length;M--,se=v.slice(ee,z),k.index-=ee}else if(k=a(Y,0,se,q),!k)continue;var G=k.index,W=k[0],Z=se.slice(0,G),re=se.slice(G+W.length),le=ee+se.length;C&&le>C.reach&&(C.reach=le);var me=J.prev;Z&&(me=f(y,me,Z),ee+=Z.length),h(y,me,M);var ve=new c(A,R?l.tokenize(W,R):W,U,W);if(J=f(y,me,ve),re&&f(y,J,re),M>1){var Oe={cause:A+","+E,reach:le};u(v,y,b,J.prev,ee,Oe),C&&Oe.reach>C.reach&&(C.reach=Oe.reach)}}}}}}function d(){var v={value:null,prev:null,next:null},y={value:null,prev:v,next:null};v.next=y,this.head=v,this.tail=y,this.length=0}function f(v,y,b){var S=y.next,x={value:b,prev:y,next:S};return y.next=x,S.prev=x,v.length++,x}function h(v,y,b){for(var S=y.next,x=0;x<b&&S!==v.tail;x++)S=S.next;y.next=S,S.prev=y,v.length-=x}function g(v){for(var y=[],b=v.head.next;b!==v.tail;)y.push(b.value),b=b.next;return y}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(v){var y=JSON.parse(v.data),b=y.language,S=y.code,x=y.immediateClose;r.postMessage(l.highlight(S,l.languages[b],b)),x&&r.close()},!1)),l;var p=l.util.currentScript();p&&(l.filename=p.src,p.hasAttribute("data-manual")&&(l.manual=!0));function _(){l.manual||l.highlightAll()}if(!l.manual){var w=document.readyState;w==="loading"||w==="interactive"&&p&&p.defer?document.addEventListener("DOMContentLoaded",_):window.requestAnimationFrame?window.requestAnimationFrame(_):window.setTimeout(_,16)}return l}(t);e.exports&&(e.exports=n),typeof Hl<"u"&&(Hl.Prism=n)})(Wa);var lg=Wa.exports;const Yi=sg(lg);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(){if(typeof Prism>"u"||typeof document>"u")return;var e="line-numbers",t=/\n(?!$)/g,n=Prism.plugins.lineNumbers={getLine:function(s,l){if(!(s.tagName!=="PRE"||!s.classList.contains(e))){var c=s.querySelector(".line-numbers-rows");if(c){var a=parseInt(s.getAttribute("data-start"),10)||1,u=a+(c.children.length-1);l<a&&(l=a),l>u&&(l=u);var d=l-a;return c.children[d]}}},resize:function(s){r([s])},assumeViewportIndependence:!0};function r(s){if(s=s.filter(function(c){var a=o(c),u=a["white-space"];return u==="pre-wrap"||u==="pre-line"}),s.length!=0){var l=s.map(function(c){var a=c.querySelector("code"),u=c.querySelector(".line-numbers-rows");if(!(!a||!u)){var d=c.querySelector(".line-numbers-sizer"),f=a.textContent.split(t);d||(d=document.createElement("span"),d.className="line-numbers-sizer",a.appendChild(d)),d.innerHTML="0",d.style.display="block";var h=d.getBoundingClientRect().height;return d.innerHTML="",{element:c,lines:f,lineHeights:[],oneLinerHeight:h,sizer:d}}}).filter(Boolean);l.forEach(function(c){var a=c.sizer,u=c.lines,d=c.lineHeights,f=c.oneLinerHeight;d[u.length-1]=void 0,u.forEach(function(h,g){if(h&&h.length>1){var p=a.appendChild(document.createElement("span"));p.style.display="block",p.textContent=h}else d[g]=f})}),l.forEach(function(c){for(var a=c.sizer,u=c.lineHeights,d=0,f=0;f<u.length;f++)u[f]===void 0&&(u[f]=a.children[d++].getBoundingClientRect().height)}),l.forEach(function(c){var a=c.sizer,u=c.element.querySelector(".line-numbers-rows");a.style.display="none",a.innerHTML="",c.lineHeights.forEach(function(d,f){u.children[f].style.height=d+"px"})})}}function o(s){return s?window.getComputedStyle?getComputedStyle(s):s.currentStyle||null:null}var i=void 0;window.addEventListener("resize",function(){n.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre."+e))))}),Prism.hooks.add("complete",function(s){if(s.code){var l=s.element,c=l.parentNode;if(!(!c||!/pre/i.test(c.nodeName))&&!l.querySelector(".line-numbers-rows")&&Prism.util.isActive(l,e)){l.classList.remove(e),c.classList.add(e);var a=s.code.match(t),u=a?a.length+1:1,d,f=new Array(u+1).join("<span></span>");d=document.createElement("span"),d.setAttribute("aria-hidden","true"),d.className="line-numbers-rows",d.innerHTML=f,c.hasAttribute("data-start")&&(c.style.counterReset="linenumber "+(parseInt(c.getAttribute("data-start"),10)-1)),s.element.appendChild(d),r([c]),Prism.hooks.run("line-numbers",s)}}}),Prism.hooks.add("line-numbers",function(s){s.plugins=s.plugins||{},s.plugins.lineNumbers=!0})})();(function(){if(typeof Prism>"u"||typeof document>"u"||!document.querySelector)return;var e="line-numbers",t="linkable-line-numbers",n=/\n(?!$)/g;function r(f,h){return Array.prototype.slice.call((h||document).querySelectorAll(f))}function o(f,h){return f.classList.contains(h)}function i(f){f()}var s=function(){var f;return function(){if(typeof f>"u"){var h=document.createElement("div");h.style.fontSize="13px",h.style.lineHeight="1.5",h.style.padding="0",h.style.border="0",h.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(h),f=h.offsetHeight===38,document.body.removeChild(h)}return f}}();function l(f,h){var g=getComputedStyle(f),p=getComputedStyle(h);function _(w){return+w.substr(0,w.length-2)}return h.offsetTop+_(p.borderTopWidth)+_(p.paddingTop)-_(g.paddingTop)}function c(f){return!f||!/pre/i.test(f.nodeName)?!1:!!(f.hasAttribute("data-line")||f.id&&Prism.util.isActive(f,t))}var a=!0;Prism.plugins.lineHighlight={highlightLines:function(h,g,p){g=typeof g=="string"?g:h.getAttribute("data-line")||"";var _=g.replace(/\s+/g,"").split(",").filter(Boolean),w=+h.getAttribute("data-line-offset")||0,v=s()?parseInt:parseFloat,y=v(getComputedStyle(h).lineHeight),b=Prism.util.isActive(h,e),S=h.querySelector("code"),x=b?h:S||h,C=[],A=S.textContent.match(n),$=A?A.length+1:1,E=!S||x==S?0:l(h,S);_.forEach(function(q){var L=q.split("-"),U=+L[0],j=+L[1]||U;if(j=Math.min($+w,j),!(j<U)){var Y=h.querySelector('.line-highlight[data-range="'+q+'"]')||document.createElement("div");if(C.push(function(){Y.setAttribute("aria-hidden","true"),Y.setAttribute("data-range",q),Y.className=(p||"")+" line-highlight"}),b&&Prism.plugins.lineNumbers){var J=Prism.plugins.lineNumbers.getLine(h,U),ee=Prism.plugins.lineNumbers.getLine(h,j);if(J){var se=J.offsetTop+E+"px";C.push(function(){Y.style.top=se})}if(ee){var M=ee.offsetTop-J.offsetTop+ee.offsetHeight+"px";C.push(function(){Y.style.height=M})}}else C.push(function(){Y.setAttribute("data-start",String(U)),j>U&&Y.setAttribute("data-end",String(j)),Y.style.top=(U-w-1)*y+E+"px",Y.textContent=new Array(j-U+2).join(`
9
+ `)});C.push(function(){Y.style.width=h.scrollWidth+"px"}),C.push(function(){x.appendChild(Y)})}});var T=h.id;if(b&&Prism.util.isActive(h,t)&&T){o(h,t)||C.push(function(){h.classList.add(t)});var R=parseInt(h.getAttribute("data-start")||"1");r(".line-numbers-rows > span",h).forEach(function(q,L){var U=L+R;q.onclick=function(){var j=T+"."+U;a=!1,location.hash=j,setTimeout(function(){a=!0},1)}})}return function(){C.forEach(i)}}};function u(){var f=location.hash.slice(1);r(".temporary.line-highlight").forEach(function(w){w.parentNode.removeChild(w)});var h=(f.match(/\.([\d,-]+)$/)||[,""])[1];if(!(!h||document.getElementById(f))){var g=f.slice(0,f.lastIndexOf(".")),p=document.getElementById(g);if(p){p.hasAttribute("data-line")||p.setAttribute("data-line","");var _=Prism.plugins.lineHighlight.highlightLines(p,h,"temporary ");_(),a&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}var d=0;Prism.hooks.add("before-sanity-check",function(f){var h=f.element.parentElement;if(c(h)){var g=0;r(".line-highlight",h).forEach(function(p){g+=p.textContent.length,p.parentNode.removeChild(p)}),g&&/^(?: \n)+$/.test(f.code.slice(-g))&&(f.code=f.code.slice(0,-g))}}),Prism.hooks.add("complete",function f(h){var g=h.element.parentElement;if(c(g)){clearTimeout(d);var p=Prism.plugins.lineNumbers,_=h.plugins&&h.plugins.lineNumbers;if(o(g,e)&&p&&!_)Prism.hooks.add("line-numbers",f);else{var w=Prism.plugins.lineHighlight.highlightLines(g);w(),d=setTimeout(u,1)}}}),window.addEventListener("hashchange",u),window.addEventListener("resize",function(){var f=r("pre").filter(c).map(function(h){return Prism.plugins.lineHighlight.highlightLines(h)});f.forEach(i)})})();var cg={equals:!1};function Ga(e){return(...t)=>{for(const n of e)n&&n(...t)}}function ag(e){return(...t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n];r&&r(...t)}}}var O=e=>typeof e=="function"&&!e.length?e():e,zl=e=>Array.isArray(e)?e:e?[e]:[];function Ya(e,...t){return typeof e=="function"?e(...t):e}var ug=te;function dg(e,t,n,r){return e.addEventListener(t,n,r),ug(e.removeEventListener.bind(e,t,n,r))}function fg(e,t,n,r){const o=()=>{zl(O(e)).forEach(i=>{i&&zl(O(t)).forEach(s=>dg(i,s,n,r))})};typeof e=="function"?V(o):pe(o)}function to(){return!0}var hg={get(e,t,n){return t===pt?n:e.get(t)},has(e,t){return e.has(t)},set:to,deleteProperty:to,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:to,deleteProperty:to}},ownKeys(e){return e.keys()}},gg=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Ul(e){const t={};let n;for(;n=gg.exec(e);)t[n[1]]=n[2];return t}function pg(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Ul(e)}else typeof t=="string"&&(t=Ul(t));return{...e,...t}}var Ti=(e,t,n)=>{let r;for(const o of e){const i=O(o)[t];r?i&&(r=n(r,i)):r=i}return r};function mg(...e){const t=Array.isArray(e[0]),n=t?e[0]:e;if(n.length===1)return n[0];const r=t&&e[1]?.reverseEventHandlers?ag:Ga,o={};for(const s of n){const l=O(s);for(const c in l)if(c[0]==="o"&&c[1]==="n"&&c[2]){const a=l[c],u=c.toLowerCase(),d=typeof a=="function"?a:Array.isArray(a)?a.length===1?a[0]:a[0].bind(void 0,a[1]):void 0;d?o[u]?o[u].push(d):o[u]=[d]:delete o[u]}}const i=I(...n);return new Proxy({get(s){if(typeof s!="string")return Reflect.get(i,s);if(s==="style")return Ti(n,"style",pg);if(s==="ref"){const l=[];for(const c of n){const a=O(c)[s];typeof a=="function"&&l.push(a)}return r(l)}if(s[0]==="o"&&s[1]==="n"&&s[2]){const l=o[s.toLowerCase()];return l?r(l):Reflect.get(i,s)}return s==="class"||s==="className"?Ti(n,s,(l,c)=>`${l} ${c}`):s==="classList"?Ti(n,s,(l,c)=>({...l,...c})):Reflect.get(i,s)},has(s){return Reflect.has(i,s)},keys(){return Object.keys(i)}},hg)}function Ae(...e){return Ga(e)}var ql=e=>e instanceof Element;function Xi(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return Xi(e(),t);if(Array.isArray(e))for(const n of e){const r=Xi(n,t);if(r)return r}return null}function vg(e,t=ql,n=ql){const r=N(e);return N(()=>Xi(r(),t))}function yg(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Wl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bg(e){return typeof e=="number"}function wg(e){return Array.isArray(e)}function Vn(e){return Object.prototype.toString.call(e)==="[object String]"}function _g(e){return typeof e=="function"}function Dn(e){return t=>`${e()}-${t}`}function at(e,t){return e?e===t||e.contains(t):!1}function _r(e,t=!1){const{activeElement:n}=rt(e);if(!n?.nodeName)return null;if(Za(n)&&n.contentDocument)return _r(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=rt(n).getElementById(r);if(o)return o}}return n}function Xa(e){return rt(e).defaultView||window}function rt(e){return e?e.ownerDocument||e:document}function Za(e){return e.tagName==="IFRAME"}var Ls=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Ls||{});function Ja(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Ms(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Jo(){return Ms(/^Mac/i)}function xg(){return Ms(/^iPhone/i)}function Sg(){return Ms(/^iPad/i)||Jo()&&navigator.maxTouchPoints>1}function Cg(){return xg()||Sg()}function Eg(){return Jo()||Cg()}function $g(){return Ja(/AppleWebKit/i)&&!Tg()}function Tg(){return Ja(/Chrome/i)}function we(e,t){return t&&(_g(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function Ue(e){return t=>{for(const n of e)we(t,n)}}function Pg(e){return Jo()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Ge(e){if(e)if(Og())e.focus({preventScroll:!0});else{const t=Ag(e);e.focus(),Ig(t)}}var no=null;function Og(){if(no==null){no=!1;try{document.createElement("div").focus({get preventScroll(){return no=!0,!0}})}catch{}}return no}function Ag(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Ig(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Qa=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],Dg=[...Qa,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Ns=Qa.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",kg=Dg.join(':not([hidden]):not([tabindex="-1"]),');function eu(e,t){const r=Array.from(e.querySelectorAll(Ns)).filter(Gl);return t&&Gl(e)&&r.unshift(e),r.forEach((o,i)=>{if(Za(o)&&o.contentDocument){const s=o.contentDocument.body,l=eu(s,!1);r.splice(i,1,...l)}}),r}function Gl(e){return tu(e)&&!Lg(e)}function tu(e){return e.matches(Ns)&&Rs(e)}function Lg(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function Rs(e,t){return e.nodeName!=="#comment"&&Mg(e)&&Ng(e,t)&&(!e.parentElement||Rs(e.parentElement,e))}function Mg(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function Ng(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function nu(e,t,n){const r=t?.tabbable?kg:Ns,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Rs(i)&&!n&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Rg(){}function Fg(e){return[e.clientX,e.clientY]}function Kg(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,l=0,c=s-1;l<s;c=l++){const[a,u]=t[l],[d,f]=t[c],[,h]=t[c===0?s-1:c-1]||[0,0],g=(u-f)*(n-a)-(a-d)*(r-u);if(f<u){if(r>=f&&r<u){if(g===0)return!0;g>0&&(r===f?r>h&&(o=!o):o=!o)}}else if(u<f){if(r>u&&r<=f){if(g===0)return!0;g<0&&(r===f?r<h&&(o=!o):o=!o)}}else if(r==u&&(n>=d&&n<=a||n>=a&&n<=d))return!0}return o}function ae(e,t){return I(e,t)}var mr=new Map,Yl=new Set;function Xl(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=mr.get(n.target);r||(r=new Set,mr.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=mr.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),mr.delete(n.target)),mr.size===0)){for(const o of Yl)o();Yl.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Xl():document.addEventListener("DOMContentLoaded",Xl));function Zl(e,t){const n=Jl(e,t,"left"),r=Jl(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,l=e.scrollTop;const c=s+e.offsetWidth,a=l+e.offsetHeight;n<=s?s=n:n+o>c&&(s+=n+o-c),r<=l?l=r:r+i>a&&(l+=r+i-a),e.scrollLeft=s,e.scrollTop=l}function Jl(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}var Qo={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function Zi(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=c=>{if(c==null)return"";const a=e.getKey??"key",u=Vn(a)?c[a]:a(c);return u!=null?String(u):""},i=c=>{if(c==null)return"";const a=e.getTextValue??"textValue",u=Vn(a)?c[a]:a(c);return u!=null?String(u):""},s=c=>{if(c==null)return!1;const a=e.getDisabled??"disabled";return(Vn(a)?c[a]:a(c))??!1},l=c=>{if(c!=null)return Vn(e.getSectionChildren)?c[e.getSectionChildren]:e.getSectionChildren?.(c)};for(const c of e.dataSource){if(Vn(c)||bg(c)){r.push({type:"item",rawValue:c,key:String(c),textValue:String(c),disabled:s(c),level:n,index:t}),t++;continue}if(l(c)!=null){r.push({type:"section",rawValue:c,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const a=l(c)??[];if(a.length>0){const u=Zi({dataSource:a,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...u),t+=u.length}}else r.push({type:"item",rawValue:c,key:o(c),textValue:i(c),disabled:s(c),level:n,index:t}),t++}return r}/*!
10
+ * Portions of this file are based on code from react-spectrum.
11
+ * Apache License Version 2.0, Copyright 2020 Adobe.
12
+ *
13
+ * Credits to the React Spectrum team:
14
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/collections/src/useCollection.ts
15
+ */function Bg(e,t=[]){const n=Zi({dataSource:O(e.dataSource),getKey:O(e.getKey),getTextValue:O(e.getTextValue),getDisabled:O(e.getDisabled),getSectionChildren:O(e.getSectionChildren)}),[r,o]=K(e.factory(n));return V(Be([()=>O(e.dataSource),()=>O(e.getKey),()=>O(e.getTextValue),()=>O(e.getDisabled),()=>O(e.getSectionChildren),()=>e.factory,...t],([i,s,l,c,a,u])=>{const d=Zi({dataSource:i,getKey:s,getTextValue:l,getDisabled:c,getSectionChildren:a});o(()=>u(d))},{defer:!0})),r}function kn(e){const[t,n]=K(e.defaultValue?.()),r=N(()=>e.value?.()!==void 0),o=N(()=>r()?e.value?.():t());return[o,s=>{de(()=>{const l=Ya(s,o());return Object.is(l,o())||(r()||n(l),e.onChange?.(l)),l})}]}function Vg(e){const[t,n]=kn(e);return[()=>t()??!1,n]}function jg(e){const[t,n]=kn(e);return[()=>t()??[],n]}function Fs(e={}){const[t,n]=Vg({value:()=>O(e.open),defaultValue:()=>!!O(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function Hg(e){const t=n=>{n.key===Ls.Escape&&e.onEscapeKeyDown?.(n)};V(()=>{if(O(e.isDisabled))return;const n=e.ownerDocument?.()??rt();n.addEventListener("keydown",t),te(()=>{n.removeEventListener("keydown",t)})})}/*!
16
+ * Portions of this file are based on code from radix-ui-primitives.
17
+ * MIT Licensed, Copyright (c) 2022 WorkOS.
18
+ *
19
+ * Credits to the Radix UI team:
20
+ * https://github.com/radix-ui/primitives/blob/81b25f4b40c54f72aeb106ca0e64e1e09655153e/packages/react/dismissable-layer/src/DismissableLayer.tsx
21
+ *
22
+ * Portions of this file are based on code from zag.
23
+ * MIT Licensed, Copyright (c) 2021 Chakra UI.
24
+ *
25
+ * Credits to the Chakra UI team:
26
+ * https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/dismissable/src/layer-stack.ts
27
+ */const Eo="data-kb-top-layer";let ru,Ji=!1;const Yt=[];function Dr(e){return Yt.findIndex(t=>t.node===e)}function zg(e){return Yt[Dr(e)]}function Ug(e){return Yt[Yt.length-1].node===e}function ou(){return Yt.filter(e=>e.isPointerBlocking)}function qg(){return[...ou()].slice(-1)[0]}function Ks(){return ou().length>0}function iu(e){const t=Dr(qg()?.node);return Dr(e)<t}function Wg(e){Yt.push(e)}function Gg(e){const t=Dr(e);t<0||Yt.splice(t,1)}function Yg(){for(const{node:e}of Yt)e.style.pointerEvents=iu(e)?"none":"auto"}function Xg(e){if(Ks()&&!Ji){const t=rt(e);ru=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Ji=!0}}function Zg(e){if(Ks())return;const t=rt(e);t.body.style.pointerEvents=ru,t.body.style.length===0&&t.body.removeAttribute("style"),Ji=!1}const Xe={layers:Yt,isTopMostLayer:Ug,hasPointerBlockingLayer:Ks,isBelowPointerBlockingLayer:iu,addLayer:Wg,removeLayer:Gg,indexOf:Dr,find:zg,assignPointerEventToLayers:Yg,disableBodyPointerEvents:Xg,restoreBodyPointerEvents:Zg};/*!
28
+ * Portions of this file are based on code from radix-ui-primitives.
29
+ * MIT Licensed, Copyright (c) 2022 WorkOS.
30
+ *
31
+ * Credits to the Radix UI team:
32
+ * https://github.com/radix-ui/primitives/blob/81b25f4b40c54f72aeb106ca0e64e1e09655153e/packages/react/focus-scope/src/FocusScope.tsx
33
+ *
34
+ * Portions of this file are based on code from zag.
35
+ * MIT Licensed, Copyright (c) 2021 Chakra UI.
36
+ *
37
+ * Credits to the Chakra UI team:
38
+ * https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/focus-scope/src/focus-on-child-unmount.ts
39
+ * https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/focus-scope/src/focus-containment.ts
40
+ */const Pi="focusScope.autoFocusOnMount",Oi="focusScope.autoFocusOnUnmount",Ql={bubbles:!1,cancelable:!0},ec={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=Wl(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=Wl(this.stack,e),this.active()?.resume()}};function Jg(e,t){const[n,r]=K(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=g=>e.onMountAutoFocus?.(g),l=g=>e.onUnmountAutoFocus?.(g),c=()=>rt(t()),a=()=>{const g=c().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,Qo),g},u=()=>{const g=t();return g?eu(g,!0).filter(p=>!p.hasAttribute("data-focus-trap")):[]},d=()=>{const g=u();return g.length>0?g[0]:null},f=()=>{const g=u();return g.length>0?g[g.length-1]:null},h=()=>{const g=t();if(!g)return!1;const p=_r(g);return!p||at(g,p)?!1:tu(p)};V(()=>{const g=t();if(!g)return;ec.add(o);const p=_r(g);if(!at(g,p)){const w=new CustomEvent(Pi,Ql);g.addEventListener(Pi,s),g.dispatchEvent(w),w.defaultPrevented||setTimeout(()=>{Ge(d()),_r(g)===p&&Ge(g)},0)}te(()=>{g.removeEventListener(Pi,s),setTimeout(()=>{const w=new CustomEvent(Oi,Ql);h()&&w.preventDefault(),g.addEventListener(Oi,l),g.dispatchEvent(w),w.defaultPrevented||Ge(p??c().body),g.removeEventListener(Oi,l),ec.remove(o)},0)})}),V(()=>{const g=t();if(!g||!O(e.trapFocus)||n())return;const p=w=>{const v=w.target;v?.closest(`[${Eo}]`)||(at(g,v)?i=v:Ge(i))},_=w=>{const y=w.relatedTarget??_r(g);y?.closest(`[${Eo}]`)||at(g,y)||Ge(i)};c().addEventListener("focusin",p),c().addEventListener("focusout",_),te(()=>{c().removeEventListener("focusin",p),c().removeEventListener("focusout",_)})}),V(()=>{const g=t();if(!g||!O(e.trapFocus)||n())return;const p=a();g.insertAdjacentElement("afterbegin",p);const _=a();g.insertAdjacentElement("beforeend",_);function w(y){const b=d(),S=f();y.relatedTarget===b?Ge(S):Ge(b)}p.addEventListener("focusin",w),_.addEventListener("focusin",w);const v=new MutationObserver(y=>{for(const b of y)b.previousSibling===_&&(_.remove(),g.insertAdjacentElement("beforeend",_)),b.nextSibling===p&&(p.remove(),g.insertAdjacentElement("afterbegin",p))});v.observe(g,{childList:!0,subtree:!1}),te(()=>{p.removeEventListener("focusin",w),_.removeEventListener("focusin",w),p.remove(),_.remove(),v.disconnect()})})}/*!
41
+ * Portions of this file are based on code from zag.
42
+ * MIT Licensed, Copyright (c) 2021 Chakra UI.
43
+ *
44
+ * Credits to the zag team:
45
+ * https://github.com/chakra-ui/zag/blob/c1e6c7689b22bf58741ded7cf224dd9baec2a046/packages/utilities/form-utils/src/form.ts
46
+ */function Bs(e,t){V(Be(e,n=>{if(n==null)return;const r=Qg(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),te(()=>{r.removeEventListener("reset",t)}))}))}function Qg(e){return ep(e)?e.form:e.closest("form")}function ep(e){return e.matches("textarea, input, select, button")}/*!
47
+ * Portions of this file are based on code from react-spectrum.
48
+ * Apache License Version 2.0, Copyright 2020 Adobe.
49
+ *
50
+ * Credits to the React Spectrum team:
51
+ * https://github.com/adobe/react-spectrum/blob/15e101b74966bd5eb719c6529ce71ce57eaed430/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx
52
+ */const su=7e3;let Cr=null;const tp="data-live-announcer";function np(e,t="assertive",n=su){Cr||(Cr=new op),Cr.announce(e,t,n)}function rp(e){Cr&&Cr.clear(e)}class op{node;assertiveLog;politeLog;constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,Qo),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}createLog(t){const n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=su){if(!this.node)return;const o=document.createElement("div");o.textContent=t,n==="assertive"?this.assertiveLog.appendChild(o):this.politeLog.appendChild(o),t!==""&&setTimeout(()=>{o.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}}/*!
53
+ * This file is based on code from react-spectrum.
54
+ * Apache License Version 2.0, Copyright 2020 Adobe.
55
+ *
56
+ * Credits to the React Spectrum team:
57
+ * https://github.com/adobe/react-spectrum/blob/810579b671791f1593108f62cdc1893de3a220e3/packages/@react-aria/overlays/src/ariaHideOutside.ts
58
+ */function ip(e){V(()=>{O(e.isDisabled)||te(sp(O(e.targets),O(e.root)))})}const vr=new WeakMap,ct=[];function sp(e,t=document.body){const n=new Set(e),r=new Set,o=c=>{for(const f of c.querySelectorAll(`[${tp}], [${Eo}]`))n.add(f);const a=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT,{acceptNode:a}),d=a(c);if(d===NodeFilter.FILTER_ACCEPT&&i(c),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)i(f),f=u.nextNode()}},i=c=>{const a=vr.get(c)??0;c.getAttribute("aria-hidden")==="true"&&a===0||(a===0&&c.setAttribute("aria-hidden","true"),r.add(c),vr.set(c,a+1))};ct.length&&ct[ct.length-1].disconnect(),o(t);const s=new MutationObserver(c=>{for(const a of c)if(!(a.type!=="childList"||a.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(a.target))){for(const u of a.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of a.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&o(u)}});s.observe(t,{childList:!0,subtree:!0});const l={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return ct.push(l),()=>{s.disconnect();for(const c of r){const a=vr.get(c);if(a==null)return;a===1?(c.removeAttribute("aria-hidden"),vr.delete(c)):vr.set(c,a-1)}l===ct[ct.length-1]?(ct.pop(),ct.length&&ct[ct.length-1].observe()):ct.splice(ct.indexOf(l),1)}}/*!
59
+ * Portions of this file are based on code from radix-ui-primitives.
60
+ * MIT Licensed, Copyright (c) 2022 WorkOS.
61
+ *
62
+ * Credits to the Radix UI team:
63
+ * https://github.com/radix-ui/primitives/blob/81b25f4b40c54f72aeb106ca0e64e1e09655153e/packages/react/dismissable-layer/src/DismissableLayer.tsx
64
+ *
65
+ * Portions of this file are based on code from zag.
66
+ * MIT Licensed, Copyright (c) 2021 Chakra UI.
67
+ *
68
+ * Credits to the Chakra UI team:
69
+ * https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/interact-outside/src/index.ts
70
+ */const tc="interactOutside.pointerDownOutside",nc="interactOutside.focusOutside";function lp(e,t){let n,r=Rg;const o=()=>rt(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),l=d=>e.onInteractOutside?.(d),c=d=>{const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${Eo}]`)||!at(o(),f)||at(t(),f)?!1:!e.shouldExcludeElement?.(f)},a=d=>{function f(){const h=t(),g=d.target;if(!h||!g||!c(d))return;const p=Ue([i,l]);g.addEventListener(tc,p,{once:!0});const _=new CustomEvent(tc,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Pg(d)&&d.button===0}});g.dispatchEvent(_)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!c(d))return;const g=Ue([s,l]);h.addEventListener(nc,g,{once:!0});const p=new CustomEvent(nc,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(p)};V(()=>{O(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",a,!0)},0),o().addEventListener("focusin",u,!0),te(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",a,!0),o().removeEventListener("focusin",u,!0)}))})}/*!
71
+ * Portions of this file are based on code from radix-ui-primitives.
72
+ * MIT Licensed, Copyright (c) 2022 WorkOS.
73
+ *
74
+ * Credits to the Radix UI team:
75
+ * https://github.com/radix-ui/primitives/blob/21a7c97dc8efa79fecca36428eec49f187294085/packages/react/presence/src/Presence.tsx
76
+ * https://github.com/radix-ui/primitives/blob/21a7c97dc8efa79fecca36428eec49f187294085/packages/react/presence/src/useStateMachine.tsx
77
+ */function ei(e){const[t,n]=K();let r={},o=e(),i="none";const[s,l]=cp(e()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(Be(s,c=>{const a=ro(r);i=c==="mounted"?a:"none"})),V(Be(e,c=>{if(o===c)return;const a=ro(r);c?l("MOUNT"):r?.display==="none"?l("UNMOUNT"):l(o&&i!==a?"ANIMATION_OUT":"UNMOUNT"),o=c})),V(Be(t,c=>{if(c){const a=d=>{const h=ro(r).includes(d.animationName);d.target===c&&h&&l("ANIMATION_END")},u=d=>{d.target===c&&(i=ro(r))};c.addEventListener("animationstart",u),c.addEventListener("animationcancel",a),c.addEventListener("animationend",a),te(()=>{c.removeEventListener("animationstart",u),c.removeEventListener("animationcancel",a),c.removeEventListener("animationend",a)})}else l("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(s()),setRef:c=>{c&&(r=getComputedStyle(c)),n(c)}}}function ro(e){return e?.animationName||"none"}function cp(e,t){const n=(s,l)=>t[s][l]??s,[r,o]=K(e);return[r,s=>{o(l=>n(l,s))}]}function ut(e){return t=>(e(t),()=>e(void 0))}/*!
78
+ * Portions of this file are based on code from ariakit.
79
+ * MIT Licensed, Copyright (c) Diego Haz.
80
+ *
81
+ * Credits to the ariakit team:
82
+ * https://github.com/ariakit/ariakit/blob/8a13899ff807bbf39f3d89d2d5964042ba4d5287/packages/ariakit-react-utils/src/hooks.ts
83
+ */function lu(e,t){const[n,r]=K(rc(t?.()));return V(()=>{r(e()?.tagName.toLowerCase()||rc(t?.()))}),n}function rc(e){return Vn(e)?e:void 0}/*!
84
+ * Portions of this file are based on code from react-spectrum.
85
+ * Apache License Version 2.0, Copyright 2020 Adobe.
86
+ *
87
+ * Credits to the React Spectrum team:
88
+ * https://github.com/adobe/react-spectrum/blob/70e7caf1946c423bc9aa9cb0e50dbdbe953d239b/packages/@react-aria/label/src/useField.ts
89
+ */const Vs=["id","name","validationState","required","disabled","readOnly"];function js(e){const t=`form-control-${xt()}`,n=ae({id:t},e),[r,o]=K(),[i,s]=K(),[l,c]=K(),[a,u]=K(),d=(p,_,w)=>{const v=w!=null||r()!=null;return[w,r(),v&&_!=null?p:void 0].filter(Boolean).join(" ")||void 0},f=p=>[l(),a(),p].filter(Boolean).join(" ")||void 0,h=N(()=>({"data-valid":O(n.validationState)==="valid"?"":void 0,"data-invalid":O(n.validationState)==="invalid"?"":void 0,"data-required":O(n.required)?"":void 0,"data-disabled":O(n.disabled)?"":void 0,"data-readonly":O(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>O(n.name)??O(n.id),dataset:h,validationState:()=>O(n.validationState),isRequired:()=>O(n.required),isDisabled:()=>O(n.disabled),isReadOnly:()=>O(n.readOnly),labelId:r,fieldId:i,descriptionId:l,errorMessageId:a,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Dn(()=>O(n.id)),registerLabel:ut(o),registerField:ut(s),registerDescription:ut(c),registerErrorMessage:ut(u)}}}const ti=Ne();function Lt(){const e=Te(ti);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}const cu=["id","aria-label","aria-labelledby","aria-describedby"];function au(e){const t=Lt(),n=ae({id:t.generateId("field")},e);return V(()=>te(t.registerField(O(n.id)))),{fieldProps:{id:()=>O(n.id),ariaLabel:()=>O(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(O(n.id),O(n["aria-label"]),O(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(O(n["aria-describedby"]))}}}function Se(e){const[t,n]=B(e,["asChild","as","children"]);if(!t.asChild)return m(wt,I({get component(){return t.as}},n,{get children(){return t.children}}));const r=Yn(()=>t.children);if(oc(r())){const o=ic(n,r()?.props??{});return m(wt,o)}if(wg(r())){const o=r().find(oc);if(o){const i=()=>m(xe,{get each(){return r()},children:l=>m(X,{when:l===o,fallback:l,get children(){return o.props.children}})}),s=ic(n,o?.props??{});return m(wt,I(s,{children:i}))}}throw new Error("[kobalte]: Component is expected to render `asChild` but no children `As` component was found.")}const uu=Symbol("$$KobalteAsComponent");function ap(e){return{[uu]:!0,props:e}}function oc(e){return e?.[uu]===!0}function ic(e,t){return mg([e,t],{reverseEventHandlers:!0})}function du(e){const t=Lt(),n=ae({id:t.generateId("description")},e);return V(()=>te(t.registerDescription(n.id))),m(Se,I({as:"div"},()=>t.dataset(),n))}function fu(e){const t=Lt(),n=ae({id:t.generateId("error-message")},e),[r,o]=B(n,["forceMount"]),i=()=>t.validationState()==="invalid";return V(()=>{i()&&te(t.registerErrorMessage(o.id))}),m(X,{get when(){return r.forceMount||i()},get children(){return m(Se,I({as:"div"},()=>t.dataset(),o))}})}function Hs(e){let t;const n=Lt(),r=ae({id:n.generateId("label")},e),[o,i]=B(r,["ref"]),s=lu(()=>t,()=>"label");return V(()=>te(n.registerLabel(i.id))),m(Se,I({as:"label",ref(l){var c=Ae(a=>t=a,o.ref);typeof c=="function"&&c(l)},get for(){return N(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}/*!
90
+ * Portions of this file are based on code from react-spectrum.
91
+ * Apache License Version 2.0, Copyright 2020 Adobe.
92
+ *
93
+ * Credits to the React Spectrum team:
94
+ * https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/utils.ts
95
+ */const up=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),dp=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fp(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return up.has(n)}const t=e.split("-")[0];return dp.has(t)}function hp(e){return fp(e)?"rtl":"ltr"}/*!
96
+ * Portions of this file are based on code from react-spectrum.
97
+ * Apache License Version 2.0, Copyright 2020 Adobe.
98
+ *
99
+ * Credits to the React Spectrum team:
100
+ * https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/useDefaultLocale.ts
101
+ */function hu(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:hp(e)}}let Qi=hu();const xr=new Set;function sc(){Qi=hu();for(const e of xr)e(Qi)}function gp(){const[e,t]=K(Qi),n=N(()=>e());return An(()=>{xr.size===0&&window.addEventListener("languagechange",sc),xr.add(t),te(()=>{xr.delete(t),xr.size===0&&window.removeEventListener("languagechange",sc)})}),{locale:()=>n().locale,direction:()=>n().direction}}const pp=Ne();function Vr(){const e=gp();return Te(pp)||e}let Ai=new Map,es=!1;try{es=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let $o=!1;try{$o=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const gu={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class pu{format(t){let n="";if(!es&&this.options.signDisplay!=null?n=vp(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!$o){var r;let{unit:o,unitDisplay:i="short",locale:s}=this.resolvedOptions();if(!o)return n;let l=(r=gu[o])===null||r===void 0?void 0:r[i];n+=l[s]||l.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!es&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!$o&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=mp(t,n),this.options=n}}function mp(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!$o){var r;let{unit:s,unitDisplay:l="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=gu[s])===null||r===void 0)&&r[l]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${l}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((s,l)=>s[0]<l[0]?-1:1).join():"");if(Ai.has(o))return Ai.get(o);let i=new Intl.NumberFormat(e,t);return Ai.set(o,i),i}function vp(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=e.format(-n),i=e.format(n),s=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(n)}}const yp=new RegExp("^.*\\(.*\\).*$"),bp=["latn","arab","hanidec"];class mu{parse(t){return Ii(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Ii(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Ii(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const lc=new Map;function Ii(e,t,n){let r=cc(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let o of bp)if(o!==r.options.numberingSystem){let i=cc(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(i.isValidPartialNumber(n))return i}}return r}function cc(e,t){let n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():""),r=lc.get(n);return r||(r=new wp(e,t),lc.set(n,r)),r}class wp{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=oo(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let o=n.indexOf("-");n=n.replace("-","");let i=n.indexOf(".");i===-1&&(i=n.length),n=n.replace(".",""),i-2===0?n=`0.${n}`:i-2===-1?n=`0.0${n}`:i-2===-2?n="0.00":n=`${n.slice(0,i-2)}.${n.slice(i-2)}`,o>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){let o={...this.options,style:"decimal",minimumFractionDigits:Math.min(this.options.minimumFractionDigits+2,20),maximumFractionDigits:Math.min(this.options.maximumFractionDigits+2,20)};return new mu(this.locale,o).parse(new pu(this.locale,o).format(r))}return this.options.currencySign==="accounting"&&yp.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=oo(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=oo(t,"."," ")),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=oo(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=xp(t,this.formatter,this.options,n);var r,o;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const ac=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),_p=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function xp(e,t,n,r){var o,i,s,l;let c=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),a=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=_p.map(E=>c.formatToParts(E));var f;let h=(f=(o=a.find(E=>E.type==="minusSign"))===null||o===void 0?void 0:o.value)!==null&&f!==void 0?f:"-",g=(i=u.find(E=>E.type==="plusSign"))===null||i===void 0?void 0:i.value;!g&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(g="+");let _=(s=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(E=>E.type==="decimal"))===null||s===void 0?void 0:s.value,w=(l=a.find(E=>E.type==="group"))===null||l===void 0?void 0:l.value,v=a.filter(E=>!ac.has(E.type)).map(E=>uc(E.value)),y=d.flatMap(E=>E.filter(T=>!ac.has(T.type)).map(T=>uc(T.value))),b=[...new Set([...v,...y])].sort((E,T)=>T.length-E.length),S=b.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${b.join("|")}|[\\p{White_Space}]`,"gu"),x=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),C=new Map(x.map((E,T)=>[E,T])),A=new RegExp(`[${x.join("")}]`,"g");return{minusSign:h,plusSign:g,decimal:_,group:w,literals:S,numeral:A,index:E=>String(C.get(E))}}function oo(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function uc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}/*!
102
+ * Portions of this file are based on code from react-spectrum.
103
+ * Apache License Version 2.0, Copyright 2020 Adobe.
104
+ *
105
+ * Credits to the React Spectrum team:
106
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/Selection.ts
107
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/types.ts
108
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-types/shared/src/selection.d.ts
109
+ */class bt extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof bt?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function Sp(e){const[t,n]=kn(e);return[()=>t()??new bt,n]}/*!
110
+ * Portions of this file are based on code from react-spectrum.
111
+ * Apache License Version 2.0, Copyright 2020 Adobe.
112
+ *
113
+ * Credits to the React Spectrum team:
114
+ * https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/utils.ts
115
+ */function vu(e){return Eg()?e.altKey:e.ctrlKey}function jn(e){return Jo()?e.metaKey:e.ctrlKey}function dc(e){return new bt(e)}function Cp(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}/*!
116
+ * Portions of this file are based on code from react-spectrum.
117
+ * Apache License Version 2.0, Copyright 2020 Adobe.
118
+ *
119
+ * Credits to the React Spectrum team:
120
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/useMultipleSelectionState.ts
121
+ */function Ep(e){const t=ae({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=K(!1),[o,i]=K(),s=N(()=>{const p=O(t.selectedKeys);return p!=null?dc(p):p}),l=N(()=>{const p=O(t.defaultSelectedKeys);return p!=null?dc(p):new bt}),[c,a]=Sp({value:s,defaultValue:l,onChange:p=>t.onSelectionChange?.(p)}),[u,d]=K(O(t.selectionBehavior)),f=()=>O(t.selectionMode),h=()=>O(t.disallowEmptySelection)??!1,g=p=>{(O(t.allowDuplicateSelectionEvents)||!Cp(p,c()))&&a(p)};return V(()=>{const p=c();O(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof p=="object"&&p.size===0&&d("replace")}),V(()=>{d(O(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:c,setSelectedKeys:g}}/*!
122
+ * Portions of this file are based on code from react-spectrum.
123
+ * Apache License Version 2.0, Copyright 2020 Adobe.
124
+ *
125
+ * Credits to the React Spectrum team:
126
+ * https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useTypeSelect.ts
127
+ */function $p(e){const[t,n]=K(""),[r,o]=K(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(O(e.isDisabled))return;const l=O(e.keyboardDelegate),c=O(e.selectionManager);if(!l.getKeyForSearch)return;const a=Tp(s.key);if(!a||s.ctrlKey||s.metaKey)return;a===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let u=n(f=>f+a),d=l.getKeyForSearch(u,c.focusedKey())??l.getKeyForSearch(u);d==null&&Pp(u)&&(u=u[0],d=l.getKeyForSearch(u,c.focusedKey())??l.getKeyForSearch(u)),d!=null&&(c.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Tp(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Pp(e){return e.split("").every(t=>t===e[0])}/*!
128
+ * Portions of this file are based on code from react-spectrum.
129
+ * Apache License Version 2.0, Copyright 2020 Adobe.
130
+ *
131
+ * Credits to the React Spectrum team:
132
+ * https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableCollection.ts
133
+ */function Op(e,t,n){const o=I({selectOnFocus:()=>O(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=Vr();let l={top:0,left:0};fg(()=>O(o.isVirtualized)?void 0:i(),"scroll",()=>{const p=i();p&&(l={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:c}=$p({isDisabled:()=>O(o.disallowTypeAhead),keyboardDelegate:()=>O(o.keyboardDelegate),selectionManager:()=>O(o.selectionManager)}),a=p=>{we(p,c.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const _=t();if(!_?.contains(p.target))return;const w=O(o.selectionManager),v=O(o.selectOnFocus),y=C=>{C!=null&&(w.setFocusedKey(C),p.shiftKey&&w.selectionMode()==="multiple"?w.extendSelection(C):v&&!vu(p)&&w.replaceSelection(C))},b=O(o.keyboardDelegate),S=O(o.shouldFocusWrap),x=w.focusedKey();switch(p.key){case"ArrowDown":{if(b.getKeyBelow){p.preventDefault();let C;x!=null?C=b.getKeyBelow(x):C=b.getFirstKey?.(),C==null&&S&&(C=b.getFirstKey?.(x)),y(C)}break}case"ArrowUp":{if(b.getKeyAbove){p.preventDefault();let C;x!=null?C=b.getKeyAbove(x):C=b.getLastKey?.(),C==null&&S&&(C=b.getLastKey?.(x)),y(C)}break}case"ArrowLeft":{if(b.getKeyLeftOf){p.preventDefault();const C=s()==="rtl";let A;x!=null?A=b.getKeyLeftOf(x):A=C?b.getFirstKey?.():b.getLastKey?.(),y(A)}break}case"ArrowRight":{if(b.getKeyRightOf){p.preventDefault();const C=s()==="rtl";let A;x!=null?A=b.getKeyRightOf(x):A=C?b.getLastKey?.():b.getFirstKey?.(),y(A)}break}case"Home":if(b.getFirstKey){p.preventDefault();const C=b.getFirstKey(x,jn(p));C!=null&&(w.setFocusedKey(C),jn(p)&&p.shiftKey&&w.selectionMode()==="multiple"?w.extendSelection(C):v&&w.replaceSelection(C))}break;case"End":if(b.getLastKey){p.preventDefault();const C=b.getLastKey(x,jn(p));C!=null&&(w.setFocusedKey(C),jn(p)&&p.shiftKey&&w.selectionMode()==="multiple"?w.extendSelection(C):v&&w.replaceSelection(C))}break;case"PageDown":if(b.getKeyPageBelow&&x!=null){p.preventDefault();const C=b.getKeyPageBelow(x);y(C)}break;case"PageUp":if(b.getKeyPageAbove&&x!=null){p.preventDefault();const C=b.getKeyPageAbove(x);y(C)}break;case"a":jn(p)&&w.selectionMode()==="multiple"&&O(o.disallowSelectAll)!==!0&&(p.preventDefault(),w.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),O(o.disallowEmptySelection)||w.clearSelection());break;case"Tab":if(!O(o.allowsTabNavigation)){if(p.shiftKey)_.focus();else{const C=nu(_,{tabbable:!0});let A,$;do $=C.lastChild(),$&&(A=$);while($);A&&!A.contains(document.activeElement)&&Ge(A)}break}}},u=p=>{const _=O(o.selectionManager),w=O(o.keyboardDelegate),v=O(o.selectOnFocus);if(_.isFocused()){p.currentTarget.contains(p.target)||_.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(_.setFocused(!0),_.focusedKey()==null){const y=S=>{S!=null&&(_.setFocusedKey(S),v&&_.replaceSelection(S))},b=p.relatedTarget;b&&p.currentTarget.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?y(_.lastSelectedKey()??w.getLastKey?.()):y(_.firstSelectedKey()??w.getFirstKey?.())}else if(!O(o.isVirtualized)){const y=i();if(y){y.scrollTop=l.top,y.scrollLeft=l.left;const b=y.querySelector(`[data-key="${_.focusedKey()}"]`);b&&(Ge(b),Zl(y,b))}}}},d=p=>{const _=O(o.selectionManager);p.currentTarget.contains(p.relatedTarget)||_.setFocused(!1)},f=p=>{i()===p.target&&p.preventDefault()},h=()=>{const p=O(o.autoFocus);if(!p)return;const _=O(o.selectionManager),w=O(o.keyboardDelegate);let v;p==="first"&&(v=w.getFirstKey?.()),p==="last"&&(v=w.getLastKey?.());const y=_.selectedKeys();y.size&&(v=y.values().next().value),_.setFocused(!0),_.setFocusedKey(v);const b=t();b&&v==null&&!O(o.shouldUseVirtualFocus)&&Ge(b)};return An(()=>{o.deferAutoFocus?setTimeout(h,0):h()}),V(Be([i,()=>O(o.isVirtualized),()=>O(o.selectionManager).focusedKey()],p=>{const[_,w,v]=p;if(w)v&&o.scrollToKey?.(v);else if(v&&_){const y=_.querySelector(`[data-key="${v}"]`);y&&Zl(_,y)}})),{tabIndex:N(()=>{if(!O(o.shouldUseVirtualFocus))return O(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:a,onMouseDown:f,onFocusIn:u,onFocusOut:d}}/*!
134
+ * Portions of this file are based on code from react-spectrum.
135
+ * Apache License Version 2.0, Copyright 2020 Adobe.
136
+ *
137
+ * Credits to the React Spectrum team:
138
+ * https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableItem.ts
139
+ */function Ap(e,t){const n=()=>O(e.selectionManager),r=()=>O(e.key),o=()=>O(e.shouldUseVirtualFocus),i=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||jn(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),l=()=>O(e.disabled)||n().isDisabled(r()),c=()=>!l()&&n().canSelectItem(r());let a=null;const u=v=>{c()&&(a=v.pointerType,v.pointerType==="mouse"&&v.button===0&&!O(e.shouldSelectOnPressUp)&&i(v))},d=v=>{c()&&v.pointerType==="mouse"&&v.button===0&&O(e.shouldSelectOnPressUp)&&O(e.allowsDifferentPressOrigin)&&i(v)},f=v=>{c()&&(O(e.shouldSelectOnPressUp)&&!O(e.allowsDifferentPressOrigin)||a!=="mouse")&&i(v)},h=v=>{!c()||!["Enter"," "].includes(v.key)||(vu(v)?n().toggleSelection(r()):i(v))},g=v=>{l()&&v.preventDefault()},p=v=>{const y=t();o()||l()||!y||v.target===y&&n().setFocusedKey(r())},_=N(()=>{if(!(o()||l()))return r()===n().focusedKey()?0:-1}),w=N(()=>O(e.virtualized)?void 0:r());return V(Be([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([v,y,b,S,x])=>{v&&y===S&&x&&!b&&document.activeElement!==v&&(e.focus?e.focus():Ge(v))})),{isSelected:s,isDisabled:l,allowsSelection:c,tabIndex:_,dataKey:w,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:g,onFocus:p}}/*!
140
+ * Portions of this file are based on code from react-spectrum.
141
+ * Apache License Version 2.0, Copyright 2020 Adobe.
142
+ *
143
+ * Credits to the React Spectrum team:
144
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/SelectionManager.ts
145
+ */class Ip{collection;state;constructor(t,n){this.collection=t,this.state=n}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}isFocused(){return this.state.isFocused()}setFocused(t){this.state.setFocused(t)}focusedKey(){return this.state.focusedKey()}setFocusedKey(t){(t==null||this.collection().getItem(t))&&this.state.setFocusedKey(t)}selectedKeys(){return this.state.selectedKeys()}isSelected(t){if(this.state.selectionMode()==="none")return!1;const n=this.getKey(t);return n==null?!1:this.state.selectedKeys().has(n)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const t=this.state.selectedKeys();return this.getAllSelectableKeys().every(n=>t.has(n))}firstSelectedKey(){let t;for(const n of this.state.selectedKeys()){const r=this.collection().getItem(n),o=r?.index!=null&&t?.index!=null&&r.index<t.index;(!t||o)&&(t=r)}return t?.key}lastSelectedKey(){let t;for(const n of this.state.selectedKeys()){const r=this.collection().getItem(n),o=r?.index!=null&&t?.index!=null&&r.index>t.index;(!t||o)&&(t=r)}return t?.key}extendSelection(t){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(t);return}const n=this.getKey(t);if(n==null)return;const r=this.state.selectedKeys(),o=r.anchorKey||n,i=new bt(r,o,n);for(const s of this.getKeyRange(o,r.currentKey||n))i.delete(s);for(const s of this.getKeyRange(n,o))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(t,n){const r=this.collection().getItem(t),o=this.collection().getItem(n);return r&&o?r.index!=null&&o.index!=null&&r.index<=o.index?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){const r=[];let o=t;for(;o!=null;){const i=this.collection().getItem(o);if(i&&i.type==="item"&&r.push(o),o===n)return r;o=this.collection().getKeyAfter(o)}return[]}getKey(t){const n=this.collection().getItem(t);return n?!n||n.type!=="item"?null:n.key:t}toggleSelection(t){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}const n=this.getKey(t);if(n==null)return;const r=new bt(this.state.selectedKeys());r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection()&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode()==="none")return;const n=this.getKey(t);if(n==null)return;const r=this.canSelectItem(n)?new bt([n],n,n):new bt;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode()==="none")return;const n=new bt;for(const r of t){const o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode()==="single"))break}this.state.setSelectedKeys(n)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const t=this.state.selectedKeys();!this.disallowEmptySelection()&&t.size>0&&this.state.setSelectedKeys(new bt)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(t)&&!this.disallowEmptySelection()?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior()==="toggle"||n&&n.pointerType==="touch"?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys())return!0;const n=this.selectedKeys();if(t.size!==n.size)return!1;for(const r of t)if(!n.has(r))return!1;for(const r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){if(this.state.selectionMode()==="none")return!1;const n=this.collection().getItem(t);return n!=null&&!n.disabled}isDisabled(t){const n=this.collection().getItem(t);return!n||n.disabled}getAllSelectableKeys(){const t=[];return(r=>{for(;r!=null;){if(this.canSelectItem(r)){const o=this.collection().getItem(r);if(!o)continue;o.type==="item"&&t.push(r)}r=this.collection().getKeyAfter(r)}})(this.collection().getFirstKey()),t}}/*!
146
+ * Portions of this file are based on code from react-spectrum.
147
+ * Apache License Version 2.0, Copyright 2020 Adobe.
148
+ *
149
+ * Credits to the React Spectrum team:
150
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/list/src/ListCollection.ts
151
+ */class fc{keyMap=new Map;iterable;firstKey;lastKey;constructor(t){this.iterable=t;for(const o of t)this.keyMap.set(o.key,o);if(this.keyMap.size===0)return;let n,r=0;for(const[o,i]of this.keyMap)n?(n.nextKey=o,i.prevKey=n.key):(this.firstKey=o,i.prevKey=void 0),i.type==="item"&&(i.index=r++),n=i,n.nextKey=void 0;this.lastKey=n.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){return this.keyMap.get(t)?.prevKey}getKeyAfter(t){return this.keyMap.get(t)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}}/*!
152
+ * Portions of this file are based on code from react-spectrum.
153
+ * Apache License Version 2.0, Copyright 2020 Adobe.
154
+ *
155
+ * Credits to the React Spectrum team:
156
+ * https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/list/src/useListState.ts
157
+ */function Dp(e){const t=Ep(e),r=Bg({dataSource:()=>O(e.dataSource),getKey:()=>O(e.getKey),getTextValue:()=>O(e.getTextValue),getDisabled:()=>O(e.getDisabled),getSectionChildren:()=>O(e.getSectionChildren),factory:i=>e.filter?new fc(e.filter(i)):new fc(i)},[()=>e.filter]),o=new Ip(r,t);return As(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}/*!
158
+ * Portions of this file are based on code from react-spectrum.
159
+ * Apache License Version 2.0, Copyright 2020 Adobe.
160
+ *
161
+ * Credits to the React Spectrum team:
162
+ * https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-stately/list/src/useSingleSelectListState.ts
163
+ */function kp(e){const[t,n]=kn({value:()=>O(e.selectedKey),defaultValue:()=>O(e.defaultSelectedKey),onChange:a=>e.onSelectionChange?.(a)}),r=N(()=>{const a=t();return a!=null?[a]:[]}),[,o]=B(e,["onSelectionChange"]),i=I(o,{selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:a=>{const u=a.values().next().value;u===t()&&e.onSelectionChange?.(u),n(u)}}),{collection:s,selectionManager:l}=Dp(i),c=N(()=>{const a=t();return a!=null?s().getItem(a):void 0});return{collection:s,selectionManager:l,selectedKey:t,setSelectedKey:n,selectedItem:c}}const yu=Ne();function Lp(){const e=Te(yu);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Mp(e){const t=`collapsible-${xt()}`,n=ae({id:t},e),[r,o]=B(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=K(),l=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:u=>r.onOpenChange?.(u)}),c=N(()=>({"data-expanded":l.isOpen()?"":void 0,"data-closed":l.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),a={dataset:c,isOpen:l.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||l.isOpen(),contentId:i,toggle:l.toggle,generateId:Dn(()=>o.id),registerContentId:ut(s)};return m(yu.Provider,{value:a,get children(){return m(Se,I({as:"div"},c,o))}})}/*!
164
+ * Portions of this file are based on code from ariakit
165
+ * MIT Licensed, Copyright (c) Diego Haz.
166
+ *
167
+ * Credits to the ariakit team:
168
+ * https://github.com/hope-ui/hope-ui/blob/54125b130195f37161dbeeea0c21dc3b198bc3ac/packages/core/src/button/is-button.ts
169
+ */const Np=["button","color","file","image","reset","submit"];function Rp(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Np.indexOf(e.type)!==-1:!1}function Qn(e){let t;const n=ae({type:"button"},e),[r,o]=B(n,["ref","type","disabled"]),i=lu(()=>t,()=>"button"),s=N(()=>{const a=i();return a==null?!1:Rp({tagName:a,type:r.type})}),l=N(()=>i()==="input"),c=N(()=>i()==="a"&&t?.getAttribute("href")!=null);return m(Se,I({as:"button",ref(a){var u=Ae(d=>t=d,r.ref);typeof u=="function"&&u(a)},get type(){return s()||l()?r.type:void 0},get role(){return!s()&&!c()?"button":void 0},get tabIndex(){return!s()&&!c()&&!r.disabled?0:void 0},get disabled(){return s()||l()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!l()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}function Fp(e){const t=Lp(),[n,r]=B(e,["onClick"]);return m(Qn,I({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return N(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{we(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}const bu=Ne();function Kp(){return Te(bu)}function Bp(){const e=Kp();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}/*!
170
+ * Portions of this file are based on code from ariakit.
171
+ * MIT Licensed, Copyright (c) Diego Haz.
172
+ *
173
+ * Credits to the Ariakit team:
174
+ * https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection-state.ts
175
+ */function wu(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Vp(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&wu(o,n))return r+1}return 0}function jp(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const l=o.ref(),c=s.ref();return l===c||!l||!c?0:wu(l,c)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function _u(e,t){const n=jp(e);e!==n&&t(n)}function Hp(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return rt(r).body}function zp(e,t){V(()=>{const n=setTimeout(()=>{_u(e(),t)});te(()=>clearTimeout(n))})}function Up(e,t){if(typeof IntersectionObserver!="function"){zp(e,t);return}let n=[];V(()=>{const r=()=>{const s=!!n.length;n=e(),s&&_u(e(),t)},o=Hp(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const l=s.ref();l&&i.observe(l)}te(()=>i.disconnect())})}/*!
176
+ * Portions of this file are based on code from ariakit.
177
+ * MIT Licensed, Copyright (c) Diego Haz.
178
+ *
179
+ * Credits to the Ariakit team:
180
+ * https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection.tsx
181
+ * https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection-state.ts
182
+ * https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection-item.ts
183
+ */function qp(e={}){const[t,n]=jg({value:()=>O(e.items),onChange:i=>e.onItemsChange?.(i)});Up(t,n);const r=i=>(n(s=>{const l=Vp(s,i);return yg(s,i,l)}),()=>{n(s=>{const l=s.filter(c=>c.ref()!==i.ref());return s.length===l.length?s:l})});return{DomCollectionProvider:i=>m(bu.Provider,{value:{registerItem:r},get children(){return i.children}})}}function Wp(e){const t=Bp(),n=ae({shouldRegisterItem:!0},e);V(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());te(r)})}var yt=e=>typeof e=="function"?e():e,io=new Map,Gp=e=>{V(()=>{const t=yt(e.style)??{},n=yt(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=io.get(e.key);o?o.activeCount++:io.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);te(()=>{const i=io.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}io.delete(e.key);for(const[s,l]of Object.entries(i.originalStyles))e.element.style[s]=l;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},hc=Gp,Yp=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Xp=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Zp=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,l=!1;do{const[c,a,u]=Yp(o,t),d=u-c-r*a;(a!==0||d!==0)&&Xp(o,t)&&(i+=d,s+=a),o===(n??document.documentElement)?l=!0:o=o._$host??o.parentElement}while(o&&!l);return[i,s]},[gc,pc]=K([]),Jp=e=>gc().indexOf(e)===gc().length-1,Qp=e=>{const t=I({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",allowPinchZoom:!1},e),n=xt();let r=[0,0],o=null,i=null;V(()=>{yt(t.enabled)&&(pc(a=>[...a,n]),te(()=>{pc(a=>a.filter(u=>u!==n))}))}),V(()=>{if(!yt(t.enabled)||!yt(t.hideScrollbar))return;const{body:a}=document,u=window.innerWidth-a.offsetWidth;if(hc({key:"prevent-scroll-overflow",element:a,style:{overflow:"hidden"}}),yt(t.preventScrollbarShift)){const d={},f=[];u>0&&(yt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(a).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(a).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,g=window.scrollX;hc({key:"prevent-scroll-scrollbar",element:a,style:d,properties:f,cleanup:()=>{u>0&&window.scrollTo(g,h)}})}}),V(()=>{!Jp(n)||!yt(t.enabled)||(document.addEventListener("wheel",l,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",c,{passive:!1}),te(()=>{document.removeEventListener("wheel",l),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",c)}))});const s=a=>{r=mc(a),o=null,i=null},l=a=>{const u=a.target,d=yt(t.element),f=em(a),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=h==="x"?f[0]:f[1],p=vc(u,h,g,d);let _;d&&ts(d,u)?_=!p:_=!0,_&&a.cancelable&&a.preventDefault()},c=a=>{const u=yt(t.element),d=a.target;let f;if(a.touches.length===2)f=!yt(t.allowPinchZoom);else{if(o==null||i===null){const h=mc(a).map((p,_)=>r[_]-p),g=Math.abs(h[0])>Math.abs(h[1])?"x":"y";o=g,i=g==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=vc(d,o,i,u);u&&ts(u,d)?f=!h:f=!0}}f&&a.cancelable&&a.preventDefault()}},em=e=>[e.deltaX,e.deltaY],mc=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],vc=(e,t,n,r)=>{const o=r&&ts(r,e),[i,s]=Zp(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},ts=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},tm=Qp,nm=tm;const xu=Ne();function rm(){return Te(xu)}function Su(e){let t;const n=rm(),[r,o]=B(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n?.registerNestedLayer(d);return()=>{i.delete(d),f?.()}};lp({shouldExcludeElement:d=>t?r.excludedElements?.some(f=>at(f(),d))||[...i].some(f=>at(f,d)):!1,onPointerDownOutside:d=>{!t||Xe.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Xe.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),Hg({ownerDocument:()=>rt(t),onEscapeKeyDown:d=>{!t||!Xe.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),An(()=>{if(!t)return;Xe.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);Xe.assignPointerEventToLayers(),Xe.disableBodyPointerEvents(t),te(()=>{t&&(Xe.removeLayer(t),d?.(),Xe.assignPointerEventToLayers(),Xe.restoreBodyPointerEvents(t))})}),V(Be([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=Xe.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,Xe.assignPointerEventToLayers()),f&&Xe.disableBodyPointerEvents(d),te(()=>{Xe.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:s};return m(xu.Provider,{value:u,get children(){return m(Se,I({as:"div",ref(d){var f=Ae(h=>t=h,r.ref);typeof f=="function"&&f(d)}},o))}})}const Cu=Ne();function Eu(){const e=Te(Cu);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var om=F('<svg display=block viewBox="0 0 30 30"><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>');const ns=30,yc=ns/2,im={top:180,right:-90,bottom:0,left:90};function $u(e){const t=Eu(),n=ae({size:ns},e),[r,o]=B(n,["ref","style","children","size"]),i=()=>t.currentPlacement().split("-")[0],s=sm(t.contentRef),l=()=>s()?.getPropertyValue("background-color")||"none",c=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",a=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",u=()=>parseInt(a())*2*(ns/r.size),d=()=>`rotate(${im[i()]} ${yc} ${yc})`;return m(Se,I({as:"div",ref(f){var h=Ae(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return{position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:l(),stroke:c(),"stroke-width":u(),...r.style}}},o,{get children(){var f=om(),h=f.firstChild,g=h.firstChild;return g.nextSibling,pe(()=>Gt(h,"transform",d())),f}}))}function sm(e){const[t,n]=K();return V(()=>{const r=e();r&&n(Xa(r).getComputedStyle(r))}),t}function Tu(e){const t=Eu(),[n,r]=B(e,["ref","style"]);return m(Se,I({as:"div",ref(o){var i=Ae(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},r))}const lm=["top","right","bottom","left"],hn=Math.min,Je=Math.max,To=Math.round,so=Math.floor,gn=e=>({x:e,y:e}),cm={left:"right",right:"left",bottom:"top",top:"bottom"},am={start:"end",end:"start"};function rs(e,t,n){return Je(e,hn(t,n))}function Ln(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function cr(e){return e.split("-")[1]}function Pu(e){return e==="x"?"y":"x"}function zs(e){return e==="y"?"height":"width"}function jr(e){return["top","bottom"].includes(pn(e))?"y":"x"}function Us(e){return Pu(jr(e))}function um(e,t,n){n===void 0&&(n=!1);const r=cr(e),o=Us(e),i=zs(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Po(s)),[s,Po(s)]}function dm(e){const t=Po(e);return[os(e),t,os(t)]}function os(e){return e.replace(/start|end/g,t=>am[t])}function fm(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function hm(e,t,n,r){const o=cr(e);let i=fm(pn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(os)))),i}function Po(e){return e.replace(/left|right|bottom|top/g,t=>cm[t])}function gm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ou(e){return typeof e!="number"?gm(e):{top:e,right:e,bottom:e,left:e}}function Oo(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function bc(e,t,n){let{reference:r,floating:o}=e;const i=jr(t),s=Us(t),l=zs(s),c=pn(t),a=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let h;switch(c){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(cr(t)){case"start":h[s]-=f*(n&&a?-1:1);break;case"end":h[s]+=f*(n&&a?-1:1);break}return h}const pm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=bc(a,r,c),f=r,h={},g=0;for(let p=0;p<l.length;p++){const{name:_,fn:w}=l[p],{x:v,y,data:b,reset:S}=await w({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:a,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,h={...h,[_]:{...h[_],...b}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(a=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=bc(a,f,c)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function kr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ln(t,e),g=Ou(h),_=l[f?d==="floating"?"reference":"floating":d],w=Oo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:c})),v=d==="floating"?{...s.floating,x:r,y:o}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Oo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:c}):v);return{top:(w.top-S.top+g.top)/b.y,bottom:(S.bottom-w.bottom+g.bottom)/b.y,left:(w.left-S.left+g.left)/b.x,right:(S.right-w.right+g.right)/b.x}}const mm=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:a,padding:u=0}=Ln(e,t)||{};if(a==null)return{};const d=Ou(u),f={x:n,y:r},h=Us(o),g=zs(h),p=await s.getDimensions(a),_=h==="y",w=_?"top":"left",v=_?"bottom":"right",y=_?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[h]-f[h]-i.floating[g],S=f[h]-i.reference[h],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let C=x?x[y]:0;(!C||!await(s.isElement==null?void 0:s.isElement(x)))&&(C=l.floating[y]||i.floating[g]);const A=b/2-S/2,$=C/2-p[g]/2-1,E=hn(d[w],$),T=hn(d[v],$),R=E,q=C-p[g]-T,L=C/2-p[g]/2+A,U=rs(R,L,q),j=!c.arrow&&cr(o)!=null&&L!==U&&i.reference[g]/2-(L<R?E:T)-p[g]/2<0,Y=j?L<R?L-R:L-q:0;return{[h]:f[h]+Y,data:{[h]:U,centerOffset:L-U-Y,...j&&{alignmentOffset:Y}},reset:j}}}),vm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,..._}=Ln(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=pn(o),v=pn(l)===l,y=await(c.isRTL==null?void 0:c.isRTL(a.floating)),b=f||(v||!p?[Po(l)]:dm(l));!f&&g!=="none"&&b.push(...hm(l,p,g,y));const S=[l,...b],x=await kr(t,_),C=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&C.push(x[w]),d){const R=um(o,s,y);C.push(x[R[0]],x[R[1]])}if(A=[...A,{placement:o,overflows:C}],!C.every(R=>R<=0)){var $,E;const R=((($=i.flip)==null?void 0:$.index)||0)+1,q=S[R];if(q)return{data:{index:R,overflows:A},reset:{placement:q}};let L=(E=A.filter(U=>U.overflows[0]<=0).sort((U,j)=>U.overflows[1]-j.overflows[1])[0])==null?void 0:E.placement;if(!L)switch(h){case"bestFit":{var T;const U=(T=A.map(j=>[j.placement,j.overflows.filter(Y=>Y>0).reduce((Y,J)=>Y+J,0)]).sort((j,Y)=>j[1]-Y[1])[0])==null?void 0:T[0];U&&(L=U);break}case"initialPlacement":L=l;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function wc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _c(e){return lm.some(t=>e[t]>=0)}const ym=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ln(e,t);switch(r){case"referenceHidden":{const i=await kr(t,{...o,elementContext:"reference"}),s=wc(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:_c(s)}}}case"escaped":{const i=await kr(t,{...o,altBoundary:!0}),s=wc(i,n.floating);return{data:{escapedOffsets:s,escaped:_c(s)}}}default:return{}}}}};async function bm(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=pn(n),l=cr(n),c=jr(n)==="y",a=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,d=Ln(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*u,y:f*a}:{x:f*a,y:h*u}}const wm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,c=await bm(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},_m=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:_=>{let{x:w,y:v}=_;return{x:w,y:v}}},...c}=Ln(e,t),a={x:n,y:r},u=await kr(t,c),d=jr(pn(o)),f=Pu(d);let h=a[f],g=a[d];if(i){const _=f==="y"?"top":"left",w=f==="y"?"bottom":"right",v=h+u[_],y=h-u[w];h=rs(v,h,y)}if(s){const _=d==="y"?"top":"left",w=d==="y"?"bottom":"right",v=g+u[_],y=g-u[w];g=rs(v,g,y)}const p=l.fn({...t,[f]:h,[d]:g});return{...p,data:{x:p.x-n,y:p.y-r}}}}},xm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...l}=Ln(e,t),c=await kr(t,l),a=pn(n),u=cr(n),d=jr(n)==="y",{width:f,height:h}=r.floating;let g,p;a==="top"||a==="bottom"?(g=a,p=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=a,g=u==="end"?"top":"bottom");const _=h-c[g],w=f-c[p],v=!t.middlewareData.shift;let y=_,b=w;if(d){const x=f-c.left-c.right;b=u||v?hn(w,x):x}else{const x=h-c.top-c.bottom;y=u||v?hn(_,x):x}if(v&&!u){const x=Je(c.left,0),C=Je(c.right,0),A=Je(c.top,0),$=Je(c.bottom,0);d?b=f-2*(x!==0||C!==0?x+C:Je(c.left,c.right)):y=h-2*(A!==0||$!==0?A+$:Je(c.top,c.bottom))}await s({...t,availableWidth:b,availableHeight:y});const S=await o.getDimensions(i.floating);return f!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function mn(e){return Au(e)?(e.nodeName||"").toLowerCase():"#document"}function tt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tn(e){var t;return(t=(Au(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Au(e){return e instanceof Node||e instanceof tt(e).Node}function Xt(e){return e instanceof Element||e instanceof tt(e).Element}function Dt(e){return e instanceof HTMLElement||e instanceof tt(e).HTMLElement}function xc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tt(e).ShadowRoot}function Hr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Sm(e){return["table","td","th"].includes(mn(e))}function qs(e){const t=Ws(),n=mt(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Cm(e){let t=er(e);for(;Dt(t)&&!ni(t);){if(qs(t))return t;t=er(t)}return null}function Ws(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ni(e){return["html","body","#document"].includes(mn(e))}function mt(e){return tt(e).getComputedStyle(e)}function ri(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function er(e){if(mn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xc(e)&&e.host||tn(e);return xc(t)?t.host:t}function Iu(e){const t=er(e);return ni(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dt(t)&&Hr(t)?t:Iu(t)}function Lr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Iu(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=tt(o);return i?t.concat(s,s.visualViewport||[],Hr(o)?o:[],s.frameElement&&n?Lr(s.frameElement):[]):t.concat(o,Lr(o,[],n))}function Du(e){const t=mt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Dt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=To(n)!==i||To(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Gs(e){return Xt(e)?e:e.contextElement}function qn(e){const t=Gs(e);if(!Dt(t))return gn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Du(t);let s=(i?To(n.width):n.width)/r,l=(i?To(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Em=gn(0);function ku(e){const t=tt(e);return!Ws()||!t.visualViewport?Em:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $m(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tt(e)?!1:t}function Pn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Gs(e);let s=gn(1);t&&(r?Xt(r)&&(s=qn(r)):s=qn(e));const l=$m(i,n,r)?ku(i):gn(0);let c=(o.left+l.x)/s.x,a=(o.top+l.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=tt(i),h=r&&Xt(r)?tt(r):r;let g=f,p=g.frameElement;for(;p&&r&&h!==g;){const _=qn(p),w=p.getBoundingClientRect(),v=mt(p),y=w.left+(p.clientLeft+parseFloat(v.paddingLeft))*_.x,b=w.top+(p.clientTop+parseFloat(v.paddingTop))*_.y;c*=_.x,a*=_.y,u*=_.x,d*=_.y,c+=y,a+=b,g=tt(p),p=g.frameElement}}return Oo({width:u,height:d,x:c,y:a})}const Tm=[":popover-open",":modal"];function Lu(e){return Tm.some(t=>{try{return e.matches(t)}catch{return!1}})}function Pm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=tn(r),l=t?Lu(t.floating):!1;if(r===s||l&&i)return n;let c={scrollLeft:0,scrollTop:0},a=gn(1);const u=gn(0),d=Dt(r);if((d||!d&&!i)&&((mn(r)!=="body"||Hr(s))&&(c=ri(r)),Dt(r))){const f=Pn(r);a=qn(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+u.x,y:n.y*a.y-c.scrollTop*a.y+u.y}}function Om(e){return Array.from(e.getClientRects())}function Mu(e){return Pn(tn(e)).left+ri(e).scrollLeft}function Am(e){const t=tn(e),n=ri(e),r=e.ownerDocument.body,o=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Mu(e);const l=-n.scrollTop;return mt(r).direction==="rtl"&&(s+=Je(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}function Im(e,t){const n=tt(e),r=tn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){i=o.width,s=o.height;const a=Ws();(!a||a&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:l,y:c}}function Dm(e,t){const n=Pn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Dt(e)?qn(e):gn(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=o*i.x,a=r*i.y;return{width:s,height:l,x:c,y:a}}function Sc(e,t,n){let r;if(t==="viewport")r=Im(e,n);else if(t==="document")r=Am(tn(e));else if(Xt(t))r=Dm(t,n);else{const o=ku(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Oo(r)}function Nu(e,t){const n=er(e);return n===t||!Xt(n)||ni(n)?!1:mt(n).position==="fixed"||Nu(n,t)}function km(e,t){const n=t.get(e);if(n)return n;let r=Lr(e,[],!1).filter(l=>Xt(l)&&mn(l)!=="body"),o=null;const i=mt(e).position==="fixed";let s=i?er(e):e;for(;Xt(s)&&!ni(s);){const l=mt(s),c=qs(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Hr(s)&&!c&&Nu(e,s))?r=r.filter(u=>u!==s):o=l,s=er(s)}return t.set(e,r),r}function Lm(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?km(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((a,u)=>{const d=Sc(t,u,o);return a.top=Je(d.top,a.top),a.right=hn(d.right,a.right),a.bottom=hn(d.bottom,a.bottom),a.left=Je(d.left,a.left),a},Sc(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Mm(e){const{width:t,height:n}=Du(e);return{width:t,height:n}}function Nm(e,t,n){const r=Dt(t),o=tn(t),i=n==="fixed",s=Pn(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=gn(0);if(r||!r&&!i)if((mn(t)!=="body"||Hr(o))&&(l=ri(t)),r){const d=Pn(t,!0,i,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else o&&(c.x=Mu(o));const a=s.left+l.scrollLeft-c.x,u=s.top+l.scrollTop-c.y;return{x:a,y:u,width:s.width,height:s.height}}function Cc(e,t){return!Dt(e)||mt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ru(e,t){const n=tt(e);if(!Dt(e)||Lu(e))return n;let r=Cc(e,t);for(;r&&Sm(r)&&mt(r).position==="static";)r=Cc(r,t);return r&&(mn(r)==="html"||mn(r)==="body"&&mt(r).position==="static"&&!qs(r))?n:r||Cm(e)||n}const Rm=async function(e){const t=this.getOffsetParent||Ru,n=this.getDimensions;return{reference:Nm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function Fm(e){return mt(e).direction==="rtl"}const Fu={convertOffsetParentRelativeRectToViewportRelativeRect:Pm,getDocumentElement:tn,getClippingRect:Lm,getOffsetParent:Ru,getElementRects:Rm,getClientRects:Om,getDimensions:Mm,getScale:qn,isElement:Xt,isRTL:Fm};function Km(e,t){let n=null,r;const o=tn(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:a,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const h=so(u),g=so(o.clientWidth-(a+d)),p=so(o.clientHeight-(u+f)),_=so(a),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-_+"px",threshold:Je(0,hn(1,c))||1};let y=!0;function b(S){const x=S[0].intersectionRatio;if(x!==c){if(!y)return s();x?s(!1,x):r=setTimeout(()=>{s(!1,1e-7)},100)}y=!1}try{n=new IntersectionObserver(b,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return s(!0),i}function Bm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,a=Gs(e),u=o||i?[...a?Lr(a):[],...Lr(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const d=a&&l?Km(a,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(w=>{let[v]=w;v&&v.target===a&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),a&&!c&&h.observe(a),h.observe(t));let g,p=c?Pn(e):null;c&&_();function _(){const w=Pn(e);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&n(),p=w,g=requestAnimationFrame(_)}return n(),()=>{var w;u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const Vm=_m,jm=vm,Hm=xm,zm=ym,Um=mm,qm=(e,t,n)=>{const r=new Map,o={platform:Fu,...n},i={...o.platform,_c:r};return pm(e,t,{...o,platform:i})};function Ec(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Wm(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Ec(r):e?e.getBoundingClientRect():Ec()}}}function Gm(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}const Ym={top:"bottom",right:"left",bottom:"top",left:"right"};function Xm(e,t){const[n,r]=e.split("-"),o=Ym[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Ku(e){const t=ae({getAnchorRect:f=>f?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=K(),[o,i]=K(),[s,l]=K(t.placement),c=()=>Wm(t.anchorRef(),t.getAnchorRect),{direction:a}=Vr();async function u(){const f=c(),h=n(),g=o();if(!f||!h)return;const p=(g?.clientHeight||0)/2,_=typeof t.gutter=="number"?t.gutter+p:t.gutter??p;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const w=[wm(({placement:x})=>{const C=!!x.split("-")[1];return{mainAxis:_,crossAxis:C?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const x=typeof t.flip=="string"?t.flip.split(" "):void 0;if(x!==void 0&&!x.every(Gm))throw new Error("`flip` expects a spaced-delimited list of placements");w.push(jm({padding:t.overflowPadding,fallbackPlacements:x}))}(t.slide||t.overlap)&&w.push(Vm({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),w.push(Hm({padding:t.overflowPadding,apply({availableWidth:x,availableHeight:C,rects:A}){const $=Math.round(A.reference.width);x=Math.floor(x),C=Math.floor(C),h.style.setProperty("--kb-popper-anchor-width",`${$}px`),h.style.setProperty("--kb-popper-content-available-width",`${x}px`),h.style.setProperty("--kb-popper-content-available-height",`${C}px`),t.sameWidth&&(h.style.width=`${$}px`),t.fitViewport&&(h.style.maxWidth=`${x}px`,h.style.maxHeight=`${C}px`)}})),t.hideWhenDetached&&w.push(zm({padding:t.detachedPadding})),g&&w.push(Um({element:g,padding:t.arrowPadding}));const v=await qm(f,h,{placement:t.placement,strategy:"absolute",middleware:w,platform:{...Fu,isRTL:()=>a()==="rtl"}});if(l(v.placement),t.onCurrentPlacementChange?.(v.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",Xm(v.placement,a()));const y=Math.round(v.x),b=Math.round(v.y);let S;if(t.hideWhenDetached&&(S=v.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${y}px, ${b}px, 0)`,visibility:S}),g&&v.middlewareData.arrow){const{x,y:C}=v.middlewareData.arrow,A=v.placement.split("-")[0];Object.assign(g.style,{left:x!=null?`${x}px`:"",top:C!=null?`${C}px`:"",[A]:"100%"})}}V(()=>{const f=c(),h=n();if(!f||!h)return;const g=Bm(f,h,u,{elementResize:typeof ResizeObserver=="function"});te(g)}),V(()=>{const f=n(),h=t.contentRef();!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef(),setPositionerRef:r,setArrowRef:i};return m(Cu.Provider,{value:d,get children(){return t.children}})}const Zm={empty:"Empty"};function Jm(e){const t=ae({translations:Zm},e),[n,r]=B(t,["translations","ref","value","textValue","minValue","maxValue","validationState","onIncrement","onIncrementPage","onDecrement","onDecrementPage","onDecrementToMin","onIncrementToMax","onKeyDown","onFocus","onBlur"]);let o=!1;const i=N(()=>n.textValue===""?n.translations?.empty:(n.textValue||`${n.value}`).replace("-","−")),s=a=>{if(we(a,n.onKeyDown),!(a.ctrlKey||a.metaKey||a.shiftKey||a.altKey||e.readOnly))switch(a.key){case"PageUp":if(n.onIncrementPage){a.preventDefault(),n.onIncrementPage();break}case"ArrowUp":case"Up":n.onIncrement&&(a.preventDefault(),n.onIncrement());break;case"PageDown":if(n.onDecrementPage){a.preventDefault(),n.onDecrementPage();break}case"ArrowDown":case"Down":n.onDecrement&&(a.preventDefault(),n.onDecrement());break;case"Home":n.onDecrementToMin&&(a.preventDefault(),n.onDecrementToMin());break;case"End":n.onIncrementToMax&&(a.preventDefault(),n.onIncrementToMax());break}},l=a=>{we(a,n.onFocus),o=!0},c=a=>{we(a,n.onBlur),o=!1};return V(Be(i,a=>{o&&(rp("assertive"),np(a??"","assertive"))})),m(Se,I({ref(a){var u=Ae(d=>d,n.ref);typeof u=="function"&&u(a)},as:"div",role:"spinbutton",get"aria-valuenow"(){return n.value!=null&&!Number.isNaN(n.value)?n.value:null},get"aria-valuetext"(){return i()},get"aria-valuemin"(){return n.minValue},get"aria-valuemax"(){return n.maxValue},get"aria-required"(){return e.required||void 0},get"aria-disabled"(){return e.disabled||void 0},get"aria-readonly"(){return e.readOnly||void 0},get"aria-invalid"(){return n.validationState==="invalid"||void 0},onKeyDown:s,onFocus:l,onBlur:c},r))}const Bu=Ne();function Ys(){const e=Te(Bu);if(e===void 0)throw new Error("[kobalte]: `useNumberFieldContext` must be used within a `NumberField` component");return e}function Vu(e){const t=Lt(),n=Ys(),[r,o]=B(e,["numberFieldVaryType","onClick"]);return m(Qn,I({tabIndex:-1,get disabled(){return t.isDisabled()||n.rawValue()===(r.numberFieldVaryType==="increment"?n.maxValue():n.minValue())},get"aria-controls"(){return t.fieldId()},onClick:i=>{we(i,r.onClick),n.varyValue(n.step()*(r.numberFieldVaryType==="increment"?1:-1)),n.inputRef()?.focus()}},o))}function Qm(e){return m(Vu,I({numberFieldVaryType:"decrement"},e))}var ev=F("<div aria-hidden=true><input type=text tabindex=-1>");function tv(e){const t=Ys(),[n,r]=B(e,["ref","onChange"]),o=Lt();return(()=>{var i=ev(),s=i.firstChild;s.addEventListener("change",c=>{we(c,n.onChange),Tt(()=>{t.setValue(c.target.value),t.format()})});var l=Ae(t.setHiddenInputRef,n.ref);return typeof l=="function"&&Tn(l,s),s.style.setProperty("font-size","16px"),vt(s,I({get name(){return o.name()},get value(){return N(()=>!!Number.isNaN(t.rawValue()))()?"":t.rawValue()},get required(){return o.isRequired()},get disabled(){return o.isDisabled()},get readOnly(){return o.isReadOnly()}},r),!1,!1),pe(c=>Xo(i,Qo,c)),i})()}function nv(e){return m(Vu,I({numberFieldVaryType:"increment"},e))}function rv(e){const t=Lt(),n=Ys(),r=ae({id:n.generateId("input"),inputMode:"decimal",autocomplete:"off",autocorrect:"off",spellcheck:!1},e),[o,i,s]=B(r,["ref","onInput","onChange","onWheel"],cu),{fieldProps:l}=au(i);return m(Jm,{get value(){return n.value()},get validationState(){return t.validationState()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readOnly(){return t.isReadOnly()},get textValue(){return n.textValue()},get minValue(){return n.minValue()},get maxValue(){return n.maxValue()},onIncrement:()=>{n.varyValue(n.step())},onIncrementPage:()=>{n.varyValue(n.largeStep())},onIncrementToMax:()=>{n.setValue(n.maxValue()),n.format()},onDecrement:()=>{n.varyValue(-n.step())},onDecrementPage:()=>{n.varyValue(-n.largeStep())},onDecrementToMin:()=>{n.setValue(n.minValue()),n.format()},get translations(){return n.translations()},asChild:!0,get children(){return m(ap,I({component:"input",type:"text",ref(c){var a=Ae(n.setInputRef,o.ref);typeof a=="function"&&a(c)},get id(){return l.id()},get value(){return N(()=>!!Number.isNaN(n.rawValue()))()?"":n.formatNumber(n.rawValue())},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readOnly(){return t.isReadOnly()},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return l.ariaLabelledBy()},get"aria-describedby"(){return l.ariaDescribedBy()},get onInput(){return Ue([o.onInput,n.onInput])},onChange:c=>{we(c,o.onChange),n.format()},onWheel:c=>{we(c,o.onWheel),!(!n.changeOnWheel()||document.activeElement!==n.inputRef())&&(c.preventDefault(),c.deltaY<0?n.varyValue(n.step()):n.varyValue(-n.step()))}},()=>t.dataset(),s))}})}function ov(e){let t;const n=`NumberField-${xt()}`,r=ae({id:n,format:!0,minValue:Number.MIN_SAFE_INTEGER,maxValue:Number.MAX_SAFE_INTEGER,step:1,changeOnWheel:!0},e),[o,i,s]=B(r,["ref","value","defaultValue","onChange","rawValue","onRawValueChange","translations","format","formatOptions","textValue","minValue","maxValue","step","largeStep","changeOnWheel","translations","allowedInput"],Vs),{locale:l}=Vr(),c=N(()=>new mu(l(),o.formatOptions)),a=N(()=>new pu(l(),o.formatOptions)),u=N(()=>[...a().formatToParts(-12345678901e-1),...a().formatToParts(1)]),d=["decimal","minusSign","plusSign"],f=["integer","group","percentSign"],h=()=>new Set(u().filter(E=>d.includes(E.type)).map(E=>E.value).join("").split("")),g=()=>new Set(u().filter(E=>f.includes(E.type)).map(E=>E.value).join("").split("")),p=E=>o.format&&typeof E!="number"?c().parse(E??""):Number(E??""),[_,w]=kn({value:()=>o.value,defaultValue:()=>o.defaultValue??o.rawValue,onChange:E=>{o.onChange?.(typeof E=="number"?a().format(E):E),o.onRawValueChange?.(p(E))}});o.onRawValueChange?.(p(_()));function v(E){if(o.allowedInput!==void 0)return o.allowedInput.test(E);if(g().has(E))return!0;if(h().has(E)){let T=_()??"";return typeof T=="number"&&(T=a().format(T)),!T.split("").includes(E)}return!1}const{formControlContext:y}=js(i);Bs(()=>t,()=>{w(o.defaultValue??"")});const[b,S]=K(),[x,C]=K(),A=E=>{if(y.isReadOnly()||y.isDisabled())return;const T=E.target;(E.inputType!=="insertText"||v(E.data||""))&&w(T.value),T.value=String(_()??"")},$={value:_,setValue:w,rawValue:()=>p(_()),generateId:Dn(()=>O(i.id)),formatNumber:E=>a().format(E),format:()=>{if(!o.format)return;let E=$.rawValue();if(Number.isNaN(E)){x()&&(x().value=""),o.onRawValueChange?.(E);return}$.minValue()&&(E=Math.max(E,$.minValue())),$.maxValue()&&(E=Math.min(E,$.maxValue()));const T=$.formatNumber(E);_()!=T&&w(T),b()&&(b().value=T),x()&&(x().value=String(E))},onInput:A,textValue:()=>o.textValue,minValue:()=>o.minValue,maxValue:()=>o.maxValue,step:()=>o.step,largeStep:()=>o.largeStep??o.step*10,changeOnWheel:()=>o.changeOnWheel,translations:()=>o.translations,inputRef:b,setInputRef:S,hiddenInputRef:x,setHiddenInputRef:C,varyValue:E=>{let T=$.rawValue()??0;Number.isNaN(T)&&(T=0),Tt(()=>{const R=Math.max(o.formatOptions?.minimumFractionDigits??0,o.formatOptions?.maximumFractionDigits??3),q=Number.parseFloat((T+E).toFixed(R));$.setValue(q),$.format()})}};return V(Be(()=>o.rawValue,E=>{if(E!==$.rawValue()){if(Number.isNaN(E))return;Tt(()=>{w(E??""),$.format()})}},{defer:!0})),m(ti.Provider,{value:y,get children(){return m(Bu.Provider,{value:$,get children(){return m(Se,I({as:"div",ref(E){var T=Ae(R=>t=R,o.ref);typeof T=="function"&&T(E)},role:"group",get id(){return O(i.id)}},()=>y.dataset(),s))}})}})}const ju=Ne();function ar(){const e=Te(ju);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function iv(e){const t=ar(),[n,r]=B(e,["aria-label","onClick"]);return m(Qn,I({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{we(i,n.onClick),t.close()}},()=>t.dataset(),r))}function sv(e){let t;const n=ar(),r=ae({id:n.generateId("content")},e),[o,i]=B(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,l=!1,c=!1;const a=h=>{o.onCloseAutoFocus?.(h),n.isModal()?(h.preventDefault(),s||Ge(n.triggerRef())):(h.defaultPrevented||(l||Ge(n.triggerRef()),h.preventDefault()),l=!1,c=!1)},u=h=>{o.onPointerDownOutside?.(h),n.isModal()&&(s=h.detail.isContextMenu)},d=h=>{o.onFocusOutside?.(h),n.isOpen()&&n.isModal()&&h.preventDefault()},f=h=>{o.onInteractOutside?.(h),!n.isModal()&&(h.defaultPrevented||(l=!0,h.detail.originalEvent.type==="pointerdown"&&(c=!0)),at(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&c&&h.preventDefault())};return ip({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),nm({element:()=>t??null,enabled:()=>n.isOpen()&&n.preventScroll()}),Jg({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:a},()=>t),V(()=>te(n.registerContentId(i.id))),m(X,{get when(){return n.contentPresence.isPresent()},get children(){return m(Tu,{get children(){return m(Su,I({ref(h){var g=Ae(p=>{n.setContentRef(p),n.contentPresence.setRef(p),t=p},o.ref);typeof g=="function"&&g(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return N(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return{"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...o.style}},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function lv(e){const t=ar(),n=ae({id:t.generateId("description")},e),[r,o]=B(n,["id"]);return V(()=>te(t.registerDescriptionId(r.id))),m(Se,I({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function cv(e){const t=ar();return m(X,{get when(){return t.contentPresence.isPresent()},get children(){return m(Fa,e)}})}const $c={dismiss:"Dismiss"};function av(e){const t=`popover-${xt()}`,n=ae({id:t,modal:!1,translations:$c},e),[r,o]=B(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=K(),[l,c]=K(),[a,u]=K(),[d,f]=K(),[h,g]=K(),[p,_]=K(),w=Fs({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:x=>r.onOpenChange?.(x)}),v=()=>r.anchorRef?.()??i()??l(),y=ei(()=>r.forceMount||w.isOpen()),b=N(()=>({"data-expanded":w.isOpen()?"":void 0,"data-closed":w.isOpen()?void 0:""})),S={translations:()=>r.translations??$c,dataset:b,isOpen:w.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??S.isModal(),contentPresence:y,triggerRef:l,contentId:d,titleId:h,descriptionId:p,setDefaultAnchorRef:s,setTriggerRef:c,setContentRef:u,close:w.close,toggle:w.toggle,generateId:Dn(()=>r.id),registerContentId:ut(f),registerTitleId:ut(g),registerDescriptionId:ut(_)};return m(ju.Provider,{value:S,get children(){return m(Ku,I({anchorRef:v,contentRef:a},o))}})}function uv(e){const t=ar(),n=ae({id:t.generateId("title")},e),[r,o]=B(n,["id"]);return V(()=>te(t.registerTitleId(r.id))),m(Se,I({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function dv(e){const t=ar(),[n,r]=B(e,["ref","onClick","onPointerDown"]);return m(Qn,I({ref(s){var l=Ae(t.setTriggerRef,n.ref);typeof l=="function"&&l(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return N(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{we(s,n.onPointerDown),s.preventDefault()},onClick:s=>{we(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}const Hu=Ne();function zu(){const e=Te(Hu);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}const Uu=Ne();function oi(){const e=Te(Uu);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function fv(e){const t=Lt(),n=zu(),r=`${t.generateId("item")}-${xt()}`,o=ae({id:r},e),[i,s]=B(o,["value","disabled","onPointerDown"]),[l,c]=K(),[a,u]=K(),[d,f]=K(),[h,g]=K(),[p,_]=K(!1),w=N(()=>n.isSelectedValue(i.value)),v=N(()=>i.disabled||t.isDisabled()||!1),y=x=>{we(x,i.onPointerDown),p()&&x.preventDefault()},b=N(()=>({...t.dataset(),"data-disabled":v()?"":void 0,"data-checked":w()?"":void 0})),S={value:()=>i.value,dataset:b,isSelected:w,isDisabled:v,inputId:l,labelId:a,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(i.value),generateId:Dn(()=>s.id),registerInput:ut(c),registerLabel:ut(u),registerDescription:ut(f),setIsFocused:_,setInputRef:g};return m(Uu.Provider,{value:S,get children(){return m(Se,I({as:"div",role:"group",onPointerDown:y},b,s))}})}function hv(e){const t=oi(),n=ae({id:t.generateId("control")},e),[r,o]=B(n,["onClick","onKeyDown"]);return m(Se,I({as:"div",onClick:l=>{we(l,r.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:l=>{we(l,r.onKeyDown),l.key===Ls.Space&&(t.select(),t.inputRef()?.focus())}},()=>t.dataset(),o))}function gv(e){const t=oi(),n=ae({id:t.generateId("indicator")},e),[r,o]=B(n,["ref","forceMount"]),i=ei(()=>r.forceMount||t.isSelected());return m(X,{get when(){return i.isPresent()},get children(){return m(Se,I({as:"div",ref(s){var l=Ae(i.setRef,r.ref);typeof l=="function"&&l(s)}},()=>t.dataset(),o))}})}var pv=F("<input type=radio>");function mv(e){const t=Lt(),n=zu(),r=oi(),o=ae({id:r.generateId("input")},e),[i,s]=B(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),l=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,c=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[a,u]=K(!1),d=g=>{if(we(g,i.onChange),g.stopPropagation(),!a()){n.setSelectedValue(r.value());const p=g.target;p.checked=r.isSelected()}u(!1)},f=g=>{we(g,i.onFocus),r.setIsFocused(!0)},h=g=>{we(g,i.onBlur),r.setIsFocused(!1)};return V(Be([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;u(!0);const p=r.inputRef();p?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),p?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),V(()=>te(r.registerInput(s.id))),(()=>{var g=pv();g.addEventListener("blur",h),g.addEventListener("focus",f),g.addEventListener("change",d);var p=Ae(r.setInputRef,i.ref);return typeof p=="function"&&Tn(p,g),vt(g,I({get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return{...Qo,...i.style}},get"aria-labelledby"(){return l()},get"aria-describedby"(){return c()}},()=>r.dataset(),s),!1,!1),g})()}var vv=F("<label>");function yv(e){const t=oi(),n=ae({id:t.generateId("label")},e);return V(()=>te(t.registerLabel(n.id))),(()=>{var r=vv();return vt(r,I({get for(){return t.inputId()}},()=>t.dataset(),n),!1,!1),r})()}function bv(e){return m(Hs,I({as:"span"},e))}function wv(e){let t;const n=`radiogroup-${xt()}`,r=ae({id:n,orientation:"vertical"},e),[o,i,s]=B(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Vs),[l,c]=kn({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:g=>o.onChange?.(g)}),{formControlContext:a}=js(i);Bs(()=>t,()=>c(o.defaultValue??""));const u=()=>a.getAriaLabelledBy(O(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>a.getAriaDescribedBy(o["aria-describedby"]),f=g=>g===l(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:g=>{if(!(a.isReadOnly()||a.isDisabled())&&(c(g),t))for(const p of t.querySelectorAll("[type='radio']")){const _=p;_.checked=f(_.value)}}};return m(ti.Provider,{value:a,get children(){return m(Hu.Provider,{value:h,get children(){return m(Se,I({as:"div",ref(g){var p=Ae(_=>t=_,o.ref);typeof p=="function"&&p(g)},role:"radiogroup",get id(){return O(i.id)},get"aria-invalid"(){return a.validationState()==="invalid"||void 0},get"aria-required"(){return a.isRequired()||void 0},get"aria-disabled"(){return a.isDisabled()||void 0},get"aria-readonly"(){return a.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>a.dataset(),s))}})}})}const qu=Ne();function ii(){const e=Te(qu);if(e===void 0)throw new Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function _v(e){let t;const n=ii(),[r,o]=B(e,["ref","id","value","forceMount"]),[i,s]=K(0),l=()=>r.id??n.generateContentId(r.value),c=()=>n.listState().selectedKey()===r.value,a=ei(()=>r.forceMount||c());return V(Be([()=>t,()=>a.isPresent()],([u,d])=>{if(u==null||!d)return;const f=()=>{const g=nu(u,{tabbable:!0});s(g.nextNode()?void 0:0)};f();const h=new MutationObserver(f);h.observe(u,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex","disabled"]}),te(()=>{h.disconnect()})})),V(Be([()=>r.value,l],([u,d])=>{n.contentIdsMap().set(u,d)})),m(X,{get when(){return a.isPresent()},get children(){return m(Se,I({as:"div",ref(u){var d=Ae(f=>{a.setRef(f),t=f},r.ref);typeof d=="function"&&d(u)},get id(){return l()},role:"tabpanel",get tabIndex(){return i()},get"aria-labelledby"(){return n.triggerIdsMap().get(r.value)},get"data-orientation"(){return n.orientation()},get"data-selected"(){return c()?"":void 0}},o))}})}function xv(e){const t=ii(),[n,r]=B(e,["style"]),[o,i]=K({width:void 0,height:void 0}),{direction:s}=Vr(),l=()=>{const c=t.selectedTab();if(c==null)return;const a={transform:void 0,width:void 0,height:void 0},u=s()==="rtl"?-1*(c.offsetParent?.offsetWidth-c.offsetWidth-c.offsetLeft):c.offsetLeft;a.transform=t.orientation()==="vertical"?`translateY(${c.offsetTop}px)`:`translateX(${u}px)`,t.orientation()==="horizontal"?a.width=`${c.offsetWidth}px`:a.height=`${c.offsetHeight}px`,i(a)};return An(()=>{queueMicrotask(()=>{l()})}),V(Be([t.selectedTab,t.orientation,s],()=>{l()},{defer:!0})),m(Se,I({as:"div",role:"presentation",get style(){return{...o(),...n.style}},get"data-orientation"(){return t.orientation()}},r))}/*!
184
+ * Portions of this file are based on code from react-spectrum.
185
+ * Apache License Version 2.0, Copyright 2020 Adobe.
186
+ *
187
+ * Credits to the React Spectrum team:
188
+ * https://github.com/adobe/react-spectrum/blob/6b51339cca0b8344507d3c8e81e7ad05d6e75f9b/packages/@react-aria/tabs/src/TabsKeyboardDelegate.ts
189
+ */class Sv{collection;direction;orientation;constructor(t,n,r){this.collection=t,this.direction=n,this.orientation=r}flipDirection(){return this.direction()==="rtl"&&this.orientation()==="horizontal"}getKeyLeftOf(t){if(this.flipDirection())return this.getNextKey(t);if(this.orientation()==="horizontal")return this.getPreviousKey(t)}getKeyRightOf(t){if(this.flipDirection())return this.getPreviousKey(t);if(this.orientation()==="horizontal")return this.getNextKey(t)}getKeyAbove(t){if(this.orientation()==="vertical")return this.getPreviousKey(t)}getKeyBelow(t){if(this.orientation()==="vertical")return this.getNextKey(t)}getFirstKey(){let t=this.collection().getFirstKey();return t==null?void 0:(this.collection().getItem(t)?.disabled&&(t=this.getNextKey(t)),t)}getLastKey(){let t=this.collection().getLastKey();return t==null?void 0:(this.collection().getItem(t)?.disabled&&(t=this.getPreviousKey(t)),t)}getNextKey(t){let n=t,r;do if(n=this.collection().getKeyAfter(n)??this.collection().getFirstKey(),n==null||(r=this.collection().getItem(n),r==null))return;while(r.disabled);return n}getPreviousKey(t){let n=t,r;do if(n=this.collection().getKeyBefore(n)??this.collection().getLastKey(),n==null||(r=this.collection().getItem(n),r==null))return;while(r.disabled);return n}}function Cv(e){let t;const n=ii(),[r,o]=B(e,["ref","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),{direction:i}=Vr(),s=new Sv(()=>n.listState().collection(),i,n.orientation),l=Op({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>s,selectOnFocus:()=>n.activationMode()==="automatic",shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return V(()=>{if(t==null)return;const c=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);c!=null&&n.setSelectedTab(c)}),m(Se,I({as:"div",ref(c){var a=Ae(u=>t=u,r.ref);typeof a=="function"&&a(c)},role:"tablist",get"aria-orientation"(){return n.orientation()},get"data-orientation"(){return n.orientation()},get onKeyDown(){return Ue([r.onKeyDown,l.onKeyDown])},get onMouseDown(){return Ue([r.onMouseDown,l.onMouseDown])},get onFocusIn(){return Ue([r.onFocusIn,l.onFocusIn])},get onFocusOut(){return Ue([r.onFocusOut,l.onFocusOut])}},o))}function Ev(e){const t=`tabs-${xt()}`,n=ae({id:t,orientation:"horizontal",activationMode:"automatic"},e),[r,o]=B(n,["value","defaultValue","onChange","orientation","activationMode","disabled"]),[i,s]=K([]),[l,c]=K(),{DomCollectionProvider:a}=qp({items:i,onItemsChange:s}),u=kp({selectedKey:()=>r.value,defaultSelectedKey:()=>r.defaultValue,onSelectionChange:p=>r.onChange?.(String(p)),dataSource:i});let d=u.selectedKey();V(Be([()=>u.selectionManager(),()=>u.collection(),()=>u.selectedKey()],([p,_,w])=>{let v=w;if(p.isEmpty()||v==null||!_.getItem(v)){v=_.getFirstKey();let y=v!=null?_.getItem(v):void 0;for(;y?.disabled&&y.key!==_.getLastKey();)v=_.getKeyAfter(y.key),y=v!=null?_.getItem(v):void 0;y?.disabled&&v===_.getLastKey()&&(v=_.getFirstKey()),v!=null&&p.setSelectedKeys([v])}(p.focusedKey()==null||!p.isFocused()&&v!==d)&&p.setFocusedKey(v),d=v}));const f=new Map,h=new Map,g={isDisabled:()=>r.disabled??!1,orientation:()=>r.orientation,activationMode:()=>r.activationMode,triggerIdsMap:()=>f,contentIdsMap:()=>h,listState:()=>u,selectedTab:l,setSelectedTab:c,generateTriggerId:p=>`${o.id}-trigger-${p}`,generateContentId:p=>`${o.id}-content-${p}`};return m(a,{get children(){return m(qu.Provider,{value:g,get children(){return m(Se,I({as:"div",get"data-orientation"(){return g.orientation()}},o))}})}})}function Tc(e){let t;const n=ii(),r=ae({type:"button"},e),[o,i]=B(r,["ref","id","value","disabled","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),s=()=>o.id??n.generateTriggerId(o.value),l=()=>n.listState().selectionManager().focusedKey()===o.value,c=()=>o.disabled||n.isDisabled(),a=()=>n.contentIdsMap().get(o.value);Wp({getItem:()=>({ref:()=>t,type:"item",key:o.value,textValue:"",disabled:c()})});const u=Ap({key:()=>o.value,selectionManager:()=>n.listState().selectionManager(),disabled:c},()=>t),d=f=>{$g()&&Ge(f.currentTarget)};return V(Be([()=>o.value,s],([f,h])=>{n.triggerIdsMap().set(f,h)})),m(Se,I({as:"button",ref(f){var h=Ae(g=>t=g,o.ref);typeof h=="function"&&h(f)},get id(){return s()},role:"tab",get tabIndex(){return N(()=>!c())()?u.tabIndex():void 0},get disabled(){return c()},get"aria-selected"(){return u.isSelected()},get"aria-disabled"(){return c()||void 0},get"aria-controls"(){return N(()=>!!u.isSelected())()?a():void 0},get"data-key"(){return u.dataKey()},get"data-orientation"(){return n.orientation()},get"data-selected"(){return u.isSelected()?"":void 0},get"data-highlighted"(){return l()?"":void 0},get"data-disabled"(){return c()?"":void 0},get onPointerDown(){return Ue([o.onPointerDown,u.onPointerDown])},get onPointerUp(){return Ue([o.onPointerUp,u.onPointerUp])},get onClick(){return Ue([o.onClick,u.onClick,d])},get onKeyDown(){return Ue([o.onKeyDown,u.onKeyDown])},get onMouseDown(){return Ue([o.onMouseDown,u.onMouseDown])},get onFocus(){return Ue([o.onFocus,u.onFocus])}},i))}const Wu=Ne();function Gu(){const e=Te(Wu);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function $v(e){return m(Yu,I({type:"text"},e))}function Yu(e){const t=Lt(),n=Gu(),r=ae({id:n.generateId("input")},e),[o,i,s]=B(r,["onInput"],cu),{fieldProps:l}=au(i);return m(Se,I({as:"input",get id(){return l.id()},get name(){return t.name()},get value(){return n.value()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return l.ariaLabelledBy()},get"aria-describedby"(){return l.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},get onInput(){return Ue([o.onInput,n.onInput])}},()=>t.dataset(),s))}function Tv(e){let t;const n=`textfield-${xt()}`,r=ae({id:n},e),[o,i,s]=B(r,["ref","value","defaultValue","onChange"],Vs),[l,c]=kn({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:f=>o.onChange?.(f)}),{formControlContext:a}=js(i);Bs(()=>t,()=>c(o.defaultValue??""));const u=f=>{if(a.isReadOnly()||a.isDisabled())return;const h=f.target;c(h.value),h.value=l()??""},d={value:l,generateId:Dn(()=>O(i.id)),onInput:u};return m(ti.Provider,{value:a,get children(){return m(Wu.Provider,{value:d,get children(){return m(Se,I({as:"div",ref(f){var h=Ae(g=>t=g,o.ref);typeof h=="function"&&h(f)},role:"group",get id(){return O(i.id)}},()=>a.dataset(),s))}})}})}function Pv(e){let t;const n=Gu(),r=ae({id:n.generateId("textarea")},e),[o,i]=B(r,["ref","autoResize","submitOnEnter","onKeyPress"]);V(Be([()=>t,()=>o.autoResize,()=>n.value()],([l,c])=>{!l||!c||Ov(l)}));const s=l=>{t&&o.submitOnEnter&&l.key==="Enter"&&!l.shiftKey&&t.form&&(t.form.requestSubmit(),l.preventDefault())};return m(Yu,I({as:"textarea",get"aria-multiline"(){return o.submitOnEnter?"false":void 0},get onKeyPress(){return Ue([o.onKeyPress,s])},ref(l){var c=Ae(a=>t=a,o.ref);typeof c=="function"&&c(l)}},i))}function Ov(e){const t=e.style.alignSelf,n=e.style.overflow;"MozAppearance"in e.style||(e.style.overflow="hidden"),e.style.alignSelf="start",e.style.height="auto",e.style.height=`${e.scrollHeight+(e.offsetHeight-e.clientHeight)}px`,e.style.overflow=n,e.style.alignSelf=t}const Xu=Ne();function Xs(){const e=Te(Xu);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Av(e){const t=Xs(),n=ae({id:t.generateId("content")},e),[r,o]=B(n,["ref","style"]);return V(()=>te(t.registerContentId(o.id))),m(X,{get when(){return t.contentPresence.isPresent()},get children(){return m(Tu,{get children(){return m(Su,I({ref(i){var s=Ae(l=>{t.setContentRef(l),t.contentPresence.setRef(l)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return{"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...r.style}},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function Iv(e){const t=Xs();return m(X,{get when(){return t.contentPresence.isPresent()},get children(){return m(Fa,e)}})}/*!
190
+ * Portions of this file are based on code from ariakit.
191
+ * MIT Licensed, Copyright (c) Diego Haz.
192
+ *
193
+ * Credits to the Ariakit team:
194
+ * https://github.com/ariakit/ariakit/blob/84e97943ad637a582c01c9b56d880cd95f595737/packages/ariakit/src/hovercard/__utils/polygon.ts
195
+ * https://github.com/ariakit/ariakit/blob/f2a96973de523d67e41eec983263936c489ef3e2/packages/ariakit/src/hovercard/__utils/debug-polygon.ts
196
+ */function Dv(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],l=o.left+o.width/2,c=o.top+o.height/2;switch(r){case"top":s.push([o.left,c]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,c]);break;case"right":s.push([l,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([l,o.bottom]);break;case"bottom":s.push([o.left,c]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,c]);break;case"left":s.push([l,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([l,o.bottom]);break}return s}const xn={};let kv=0,Kn=!1,Rt,yr;function Lv(e){const t=`tooltip-${xt()}`,n=`${++kv}`,r=ae({id:t,openDelay:700,closeDelay:300},e),[o,i]=B(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","ignoreSafeArea","forceMount"]);let s;const[l,c]=K(),[a,u]=K(),[d,f]=K(),[h,g]=K(i.placement),p=Fs({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:L=>o.onOpenChange?.(L)}),_=ei(()=>o.forceMount||p.isOpen()),w=()=>{xn[n]=y},v=()=>{for(const L in xn)L!==n&&(xn[L](!0),delete xn[L])},y=(L=!1)=>{L||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,p.close()):s||(s=window.setTimeout(()=>{s=void 0,p.close()},o.closeDelay)),window.clearTimeout(Rt),Rt=void 0,Kn&&(window.clearTimeout(yr),yr=window.setTimeout(()=>{delete xn[n],yr=void 0,Kn=!1},o.closeDelay))},b=()=>{clearTimeout(s),s=void 0,v(),w(),Kn=!0,p.open(),window.clearTimeout(Rt),Rt=void 0,window.clearTimeout(yr),yr=void 0},S=()=>{v(),w(),!p.isOpen()&&!Rt&&!Kn?Rt=window.setTimeout(()=>{Rt=void 0,Kn=!0,b()},o.openDelay):p.isOpen()||b()},x=(L=!1)=>{!L&&o.openDelay&&o.openDelay>0&&!s?S():b()},C=()=>{window.clearTimeout(Rt),Rt=void 0,Kn=!1},A=()=>{window.clearTimeout(s),s=void 0},$=L=>at(a(),L)||at(d(),L),E=L=>{const U=a(),j=d();if(!(!U||!j))return Dv(L,U,j)},T=L=>{const U=L.target;if($(U)){A();return}if(!o.ignoreSafeArea){const j=E(h());if(j&&Kg(Fg(L),j)){A();return}}s||y()};V(()=>{if(!p.isOpen())return;const L=rt();L.addEventListener("pointermove",T,!0),te(()=>{L.removeEventListener("pointermove",T,!0)})}),V(()=>{const L=a();if(!L||!p.isOpen())return;const U=Y=>{const J=Y.target;at(J,L)&&y(!0)},j=Xa();j.addEventListener("scroll",U,{capture:!0}),te(()=>{j.removeEventListener("scroll",U,{capture:!0})})}),te(()=>{clearTimeout(s),xn[n]&&delete xn[n]});const q={dataset:N(()=>({"data-expanded":p.isOpen()?"":void 0,"data-closed":p.isOpen()?void 0:""})),isOpen:p.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:l,contentPresence:_,openTooltip:x,hideTooltip:y,cancelOpening:C,generateId:Dn(()=>r.id),registerContentId:ut(c),isTargetOnTooltip:$,setTriggerRef:u,setContentRef:f};return m(Xu.Provider,{value:q,get children(){return m(Ku,I({anchorRef:a,contentRef:d,onCurrentPlacementChange:g},i))}})}function Mv(e){let t;const n=Xs(),[r,o]=B(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur","onTouchStart"]);let i=!1,s=!1,l=!1;const c=()=>{i=!1},a=()=>{!n.isOpen()&&(s||l)&&n.openTooltip(l)},u=w=>{n.isOpen()&&!s&&!l&&n.hideTooltip(w)},d=w=>{we(w,r.onPointerEnter),!(w.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||w.defaultPrevented)&&(s=!0,a())},f=w=>{we(w,r.onPointerLeave),w.pointerType!=="touch"&&(s=!1,l=!1,n.isOpen()?u():n.cancelOpening())},h=w=>{we(w,r.onPointerDown),i=!0,rt(t).addEventListener("pointerup",c,{once:!0})},g=w=>{we(w,r.onClick),s=!1,l=!1,u(!0)},p=w=>{we(w,r.onFocus),!(n.isDisabled()||w.defaultPrevented||i)&&(l=!0,a())},_=w=>{we(w,r.onBlur);const v=w.relatedTarget;n.isTargetOnTooltip(v)||(s=!1,l=!1,u(!0))};return te(()=>{rt(t).removeEventListener("pointerup",c)}),m(Se,I({as:"button",ref(w){var v=Ae(y=>{n.setTriggerRef(y),t=y},r.ref);typeof v=="function"&&v(w)},get"aria-describedby"(){return N(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:h,onClick:g,onFocus:p,onBlur:_},()=>n.dataset(),o))}var Nv=F("<div class=ui-tooltip-inner>");function ot(e){const[t,n]=B(e,["class","content","children"]);return m(Lv,I(n,{get children(){return[N(()=>t.children),m(Iv,{get children(){return m(Av,{get class(){return`ui-tooltip ${t.class||""}`},get children(){return[m($u,{class:"ui-tooltip-arrow"}),(()=>{var r=Nv();return P(r,()=>t.content),r})()]}})}})]}}))}ot.Trigger=Mv;function Zs(e){const[t,n]=B(e,["children","as"]),r=()=>t.as||n.class;return m(Go,{get children(){return[m(Pt,{get when(){return e.content},get children(){return m(ot,I(n,{get children(){return m(ot.Trigger,{get as(){return t.as??"div"},class:"ui-tooltip-trigger maybe",get children(){return t.children}})}}))}}),m(Pt,{get when(){return N(()=>!e.content)()&&r()},get children(){return m(wt,I({get component(){return t.as??"div"}},n,{get children(){return e.children}}))}}),m(Pt,{get when(){return!e.content&&!t.as},get children(){return e.children}})]}})}function ht(e){const[t,n]=B(e,["class","tooltip"]);return m(Go,{get children(){return[m(Pt,{get when(){return t.tooltip},get children(){return m(ot,{get content(){return t.tooltip},get children(){return m(ot.Trigger,I({get as(){return Qn},get class(){return`ui-button ${t.class||""}`}},n))}})}}),m(Pt,{when:!0,get children(){return m(Qn,I({get class(){return`ui-button ${t.class||""}`}},n))}})]}})}function Rv(e,t){let n=1,r=-1;for(;(r=e.indexOf(`
197
+ `,r+1))!==-1&&r<t;)n++;return n}function Fv(e){var t=document.createElement("textarea");return t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",new Promise((n,r)=>{try{document.body.appendChild(t),t.focus(),t.select();var o=document.execCommand("copy");setTimeout(()=>o?n():r(),1)}catch(i){setTimeout(()=>r(i),1)}document.body.removeChild(t)})}async function Kv(e){try{await navigator.clipboard.writeText(e);return}catch{await Fv(e)}}async function Bv(e){return new Promise(t=>{setTimeout(t,e)})}async function Zu(e){await Bv(0);const t=e.getAnimations({subtree:!0}).filter(n=>n.playState==="running"&&n.effect?.getComputedTiming()?.iterations!==1/0);if(t.length)return await Promise.all(t.map(n=>n.finished)),Zu(e)}var Vv=F("<svg stroke-width=0>");function ge(e,t){const n=I(e.a,t),[r,o]=B(n,["src"]),[i,s]=K(""),l=N(()=>t.title?`${e.c}<title>${t.title}</title>`:e.c);return V(()=>s(l())),te(()=>{s("")}),(()=>{var c=Vv();return vt(c,I({get stroke(){return e.a?.stroke},get color(){return t.color||"currentColor"},get fill(){return t.color||"currentColor"},get style(){return{...t.style,overflow:"visible"}}},o,{get height(){return t.size||"1em"},get width(){return t.size||"1em"},xmlns:"http://www.w3.org/2000/svg",get innerHTML(){return i()}}),!0,!0),P(c,()=>Bh),c})()}function jv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-ban",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/><path d="M5.7 5.7l12.6 12.6"/>'},e)}function Hv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-binary-tree-2",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"/><path d="M7 14a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"/><path d="M21 14a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"/><path d="M14 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"/><path d="M12 8v8"/><path d="M6.316 12.496l4.368 -4.992"/><path d="M17.684 12.496l-4.366 -4.99"/>'},e)}function Ju(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-chevron-down",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6"/>'},e)}function zv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-chevron-up",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 15l6 -6l6 6"/>'},e)}function Qu(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-clock",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"/><path d="M12 7v5l3 3"/>'},e)}function Uv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-copy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"/><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"/>'},e)}function qv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-database-import",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3"/><path d="M4 6v6c0 1.657 3.582 3 8 3c.856 0 1.68 -.05 2.454 -.144m5.546 -2.856v-6"/><path d="M4 12v6c0 1.657 3.582 3 8 3c.171 0 .341 -.002 .51 -.006"/><path d="M19 22v-6"/><path d="M22 19l-3 -3l-3 3"/>'},e)}function Wv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-database-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3"/><path d="M4 6v6c0 1.657 3.582 3 8 3c1.075 0 2.1 -.08 3.037 -.224"/><path d="M20 12v-6"/><path d="M4 12v6c0 1.657 3.582 3 8 3c.166 0 .331 -.002 .495 -.006"/><path d="M16 19h6"/><path d="M19 16v6"/>'},e)}function Gv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-database-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3"/><path d="M4 6v6c0 1.657 3.582 3 8 3m8 -3.5v-5.5"/><path d="M4 12v6c0 1.657 3.582 3 8 3"/><path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/><path d="M20.2 20.2l1.8 1.8"/>'},e)}function Yv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-database",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"/><path d="M4 6v6a8 3 0 0 0 16 0v-6"/><path d="M4 12v6a8 3 0 0 0 16 0v-6"/>'},e)}function Xv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-download",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"/><path d="M7 11l5 5l5 -5"/><path d="M12 4l0 12"/>'},e)}function ed(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-external-link",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"/><path d="M11 13l9 -9"/><path d="M15 4h5v5"/>'},e)}function td(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4"/><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/><path d="M9 9l1 0"/><path d="M9 13l6 0"/><path d="M9 17l6 0"/>'},e)}function Zv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-grid-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M19 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M5 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/><path d="M19 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/>'},e)}function Jv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-pin-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15.113 3.21l.094 .083l5.5 5.5a1 1 0 0 1 -1.175 1.59l-3.172 3.171l-1.424 3.797a1 1 0 0 1 -.158 .277l-.07 .08l-1.5 1.5a1 1 0 0 1 -1.32 .082l-.095 -.083l-2.793 -2.792l-3.793 3.792a1 1 0 0 1 -1.497 -1.32l.083 -.094l3.792 -3.793l-2.792 -2.793a1 1 0 0 1 -.083 -1.32l.083 -.094l1.5 -1.5a1 1 0 0 1 .258 -.187l.098 -.042l3.796 -1.425l3.171 -3.17a1 1 0 0 1 1.497 -1.26z" stroke-width="0" fill="currentColor"/>'},e)}function Qv(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-pin",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4"/><path d="M9 15l-4.5 4.5"/><path d="M14.5 4l5.5 5.5"/>'},e)}function ey(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-settings",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"/><path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"/>'},e)}function ty(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-viewfinder",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/><path d="M12 3l0 4"/><path d="M12 21l0 -3"/><path d="M3 12l4 0"/><path d="M21 12l-3 0"/><path d="M12 12l0 .01"/>'},e)}function ny(e){return ge({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-x",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12"/><path d="M6 6l12 12"/>'},e)}/*!
198
+ * OverlayScrollbars
199
+ * Version: 2.10.0
200
+ *
201
+ * Copyright (c) Rene Haas | KingSora.
202
+ * https://github.com/KingSora
203
+ *
204
+ * Released under the MIT license.
205
+ */const Ze=(e,t)=>{const{o:n,i:r,u:o}=e;let i=n,s;const l=(u,d)=>{const f=i,h=u,g=d||(r?!r(f,h):f!==h);return(g||o)&&(i=h,s=f),[i,g,s]};return[t?u=>l(t(i,s),u):l,u=>[i,!!u,s]]},ry=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,Ye=ry?window:{},Ao=Math.max,oy=Math.min,is=Math.round,Io=Math.abs,Pc=Math.sign,Js=Ye.cancelAnimationFrame,si=Ye.requestAnimationFrame,Do=Ye.setTimeout,ss=Ye.clearTimeout,li=e=>typeof Ye[e]<"u"?Ye[e]:void 0,iy=li("MutationObserver"),Oc=li("IntersectionObserver"),ko=li("ResizeObserver"),uo=li("ScrollTimeline"),Qs=e=>e===void 0,ci=e=>e===null,At=e=>typeof e=="number",zr=e=>typeof e=="string",el=e=>typeof e=="boolean",it=e=>typeof e=="function",kt=e=>Array.isArray(e),Lo=e=>typeof e=="object"&&!kt(e)&&!ci(e),tl=e=>{const t=!!e&&e.length,n=At(t)&&t>-1&&t%1==0;return kt(e)||!it(e)&&n?t>0&&Lo(e)?t-1 in e:!0:!1},Mo=e=>!!e&&e.constructor===Object,No=e=>e instanceof HTMLElement,ai=e=>e instanceof Element,Ac=()=>performance.now(),Di=(e,t,n,r,o)=>{let i=0;const s=Ac(),l=Ao(0,n),c=a=>{const u=Ac(),f=u-s>=l,h=a?1:1-(Ao(0,s+l-u)/l||0),g=(t-e)*(it(o)?o(h,h*l,0,1,l):h)+e,p=f||h===1;r&&r(g,h,p),i=p?0:si(()=>c())};return c(),a=>{Js(i),a&&c(a)}};function fe(e,t){if(tl(e))for(let n=0;n<e.length&&t(e[n],n,e)!==!1;n++);else e&&fe(Object.keys(e),n=>t(e[n],n,e));return e}const nd=(e,t)=>e.indexOf(t)>=0,Mr=(e,t)=>e.concat(t),$e=(e,t,n)=>(!zr(t)&&tl(t)?Array.prototype.push.apply(e,t):e.push(t),e),wn=e=>Array.from(e||[]),nl=e=>kt(e)?e:!zr(e)&&tl(e)?wn(e):[e],ls=e=>!!e&&!e.length,cs=e=>wn(new Set(e)),nt=(e,t,n)=>{fe(e,o=>o?o.apply(void 0,t||[]):!0),!n&&(e.length=0)},rd="paddingTop",od="paddingRight",id="paddingLeft",sd="paddingBottom",ld="marginLeft",cd="marginRight",ad="marginBottom",ud="overflowX",dd="overflowY",ui="width",di="height",an="visible",Sn="hidden",tr="scroll",sy=e=>{const t=String(e||"");return t?t[0].toUpperCase()+t.slice(1):""},fi=(e,t,n,r)=>{if(e&&t){let o=!0;return fe(n,i=>{const s=e[i],l=t[i];s!==l&&(o=!1)}),o}return!1},fd=(e,t)=>fi(e,t,["w","h"]),fo=(e,t)=>fi(e,t,["x","y"]),ly=(e,t)=>fi(e,t,["t","r","b","l"]),dn=()=>{},Q=(e,...t)=>e.bind(0,...t),Cn=e=>{let t;const n=e?Do:si,r=e?ss:Js;return[o=>{r(t),t=n(()=>o(),it(e)?e():e)},()=>r(t)]},as=(e,t)=>{const{_:n,v:r,p:o,S:i}=t||{};let s,l,c,a,u=dn;const d=function(_){u(),ss(s),a=s=l=void 0,u=dn,e.apply(this,_)},f=p=>i&&l?i(l,p):p,h=()=>{u!==dn&&d(f(c)||c)},g=function(){const _=wn(arguments),w=it(n)?n():n;if(At(w)&&w>=0){const y=it(r)?r():r,b=At(y)&&y>=0,S=w>0?Do:si,x=w>0?ss:Js,A=f(_)||_,$=d.bind(0,A);let E;u(),o&&!a?($(),a=!0,E=S(()=>a=void 0,w)):(E=S($,w),b&&!s&&(s=Do(h,y))),u=()=>x(E),l=c=A}else d(_)};return g.m=h,g},hd=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),_t=e=>e?Object.keys(e):[],ie=(e,t,n,r,o,i,s)=>{const l=[t,n,r,o,i,s];return(typeof e!="object"||ci(e))&&!it(e)&&(e={}),fe(l,c=>{fe(c,(a,u)=>{const d=c[u];if(e===d)return!0;const f=kt(d);if(d&&Mo(d)){const h=e[u];let g=h;f&&!kt(h)?g=[]:!f&&!Mo(h)&&(g={}),e[u]=ie(g,d)}else e[u]=f?d.slice():d})}),e},gd=(e,t)=>fe(ie({},e),(n,r,o)=>{n===void 0?delete o[r]:n&&Mo(n)&&(o[r]=gd(n))}),rl=e=>!_t(e).length,pd=(e,t,n)=>Ao(e,oy(t,n)),En=e=>cs((kt(e)?e:(e||"").split(" ")).filter(t=>t)),ol=(e,t)=>e&&e.getAttribute(t),Ic=(e,t)=>e&&e.hasAttribute(t),Ft=(e,t,n)=>{fe(En(t),r=>{e&&e.setAttribute(r,String(n||""))})},Et=(e,t)=>{fe(En(t),n=>e&&e.removeAttribute(n))},hi=(e,t)=>{const n=En(ol(e,t)),r=Q(Ft,e,t),o=(i,s)=>{const l=new Set(n);return fe(En(i),c=>{l[s](c)}),wn(l).join(" ")};return{O:i=>r(o(i,"delete")),$:i=>r(o(i,"add")),C:i=>{const s=En(i);return s.reduce((l,c)=>l&&n.includes(c),s.length>0)}}},md=(e,t,n)=>(hi(e,t).O(n),Q(il,e,t,n)),il=(e,t,n)=>(hi(e,t).$(n),Q(md,e,t,n)),Ro=(e,t,n,r)=>(r?il:md)(e,t,n),sl=(e,t,n)=>hi(e,t).C(n),vd=e=>hi(e,"class"),yd=(e,t)=>{vd(e).O(t)},ll=(e,t)=>(vd(e).$(t),Q(yd,e,t)),bd=(e,t)=>{const n=t?ai(t)&&t:document;return n?wn(n.querySelectorAll(e)):[]},cy=(e,t)=>{const n=t?ai(t)&&t:document;return n&&n.querySelector(e)},us=(e,t)=>ai(e)&&e.matches(t),wd=e=>us(e,"body"),ds=e=>e?wn(e.childNodes):[],Nr=e=>e&&e.parentElement,Hn=(e,t)=>ai(e)&&e.closest(t),fs=e=>document.activeElement,ay=(e,t,n)=>{const r=Hn(e,t),o=e&&cy(n,r),i=Hn(o,t)===r;return r&&o?r===e||o===e||i&&Hn(Hn(e,n),t)!==r:!1},nr=e=>{fe(nl(e),t=>{const n=Nr(t);t&&n&&n.removeChild(t)})},Qe=(e,t)=>Q(nr,e&&t&&fe(nl(t),n=>{n&&e.appendChild(n)})),Wn=e=>{const t=document.createElement("div");return Ft(t,"class",e),t},_d=e=>{const t=Wn();return t.innerHTML=e.trim(),fe(ds(t),n=>nr(n))},Dc=(e,t)=>e.getPropertyValue(t)||e[t]||"",xd=e=>{const t=e||0;return isFinite(t)?t:0},lo=e=>xd(parseFloat(e||"")),hs=e=>Math.round(e*1e4)/1e4,Sd=e=>`${hs(xd(e))}px`;function Rr(e,t){e&&t&&fe(t,(n,r)=>{try{const o=e.style,i=ci(n)||el(n)?"":At(n)?Sd(n):n;r.indexOf("--")===0?o.setProperty(r,i):o[r]=i}catch{}})}function Zt(e,t,n){const r=zr(t);let o=r?"":{};if(e){const i=Ye.getComputedStyle(e,n)||e.style;o=r?Dc(i,t):wn(t).reduce((s,l)=>(s[l]=Dc(i,l),s),o)}return o}const kc=(e,t,n)=>{const r=t?`${t}-`:"",o=n?`-${n}`:"",i=`${r}top${o}`,s=`${r}right${o}`,l=`${r}bottom${o}`,c=`${r}left${o}`,a=Zt(e,[i,s,l,c]);return{t:lo(a[i]),r:lo(a[s]),b:lo(a[l]),l:lo(a[c])}},uy=(e,t)=>`translate${Lo(e)?`(${e.x},${e.y})`:`Y(${e})`}`,dy=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),fy={w:0,h:0},gi=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:fy,hy=e=>gi("inner",e||Ye),Gn=Q(gi,"offset"),Cd=Q(gi,"client"),Fo=Q(gi,"scroll"),cl=e=>{const t=parseFloat(Zt(e,ui))||0,n=parseFloat(Zt(e,di))||0;return{w:t-is(t),h:n-is(n)}},ki=e=>e.getBoundingClientRect(),gy=e=>!!e&&dy(e),gs=e=>!!(e&&(e[di]||e[ui])),Ed=(e,t)=>{const n=gs(e);return!gs(t)&&n},Lc=(e,t,n,r)=>{fe(En(t),o=>{e&&e.removeEventListener(o,n,r)})},_e=(e,t,n,r)=>{var o;const i=(o=r&&r.H)!=null?o:!0,s=r&&r.I||!1,l=r&&r.A||!1,c={passive:i,capture:s};return Q(nt,En(t).map(a=>{const u=l?d=>{Lc(e,a,u,s),n&&n(d)}:n;return e&&e.addEventListener(a,u,c),Q(Lc,e,a,u,s)}))},$d=e=>e.stopPropagation(),ps=e=>e.preventDefault(),Td=e=>$d(e)||ps(e),$t=(e,t)=>{const{x:n,y:r}=At(t)?{x:t,y:t}:t||{};At(n)&&(e.scrollLeft=n),At(r)&&(e.scrollTop=r)},et=e=>({x:e.scrollLeft,y:e.scrollTop}),Pd=()=>({D:{x:0,y:0},M:{x:0,y:0}}),py=(e,t)=>{const{D:n,M:r}=e,{w:o,h:i}=t,s=(d,f,h)=>{let g=Pc(d)*h,p=Pc(f)*h;if(g===p){const _=Io(d),w=Io(f);p=_>w?0:p,g=_<w?0:g}return g=g===p?0:g,[g+0,p+0]},[l,c]=s(n.x,r.x,o),[a,u]=s(n.y,r.y,i);return{D:{x:l,y:a},M:{x:c,y:u}}},Mc=({D:e,M:t})=>{const n=(r,o)=>r===0&&r<=o;return{x:n(e.x,t.x),y:n(e.y,t.y)}},Nc=({D:e,M:t},n)=>{const r=(o,i,s)=>pd(0,1,(o-s)/(o-i)||0);return{x:r(e.x,t.x,n.x),y:r(e.y,t.y,n.y)}},ms=e=>{e&&e.focus&&e.focus({preventScroll:!0})},Rc=(e,t)=>{fe(nl(t),e)},vs=e=>{const t=new Map,n=(i,s)=>{if(i){const l=t.get(i);Rc(c=>{l&&l[c?"delete":"clear"](c)},s)}else t.forEach(l=>{l.clear()}),t.clear()},r=(i,s)=>{if(zr(i)){const a=t.get(i)||new Set;return t.set(i,a),Rc(u=>{it(u)&&a.add(u)},s),Q(n,i,s)}el(s)&&s&&n();const l=_t(i),c=[];return fe(l,a=>{const u=i[a];u&&$e(c,r(a,u))}),Q(nt,c)},o=(i,s)=>{fe(wn(t.get(i)),l=>{s&&!ls(s)?l.apply(0,s):l()})};return r(e||{}),[r,n,o]},Fc=e=>JSON.stringify(e,(t,n)=>{if(it(n))throw 0;return n}),Kc=(e,t)=>e?`${t}`.split(".").reduce((n,r)=>n&&hd(n,r)?n[r]:void 0,e):void 0,my={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},Od=(e,t)=>{const n={},r=Mr(_t(t),_t(e));return fe(r,o=>{const i=e[o],s=t[o];if(Lo(i)&&Lo(s))ie(n[o]={},Od(i,s)),rl(n[o])&&delete n[o];else if(hd(t,o)&&s!==i){let l=!0;if(kt(i)||kt(s))try{Fc(i)===Fc(s)&&(l=!1)}catch{}l&&(n[o]=s)}}),n},Bc=(e,t,n)=>r=>[Kc(e,r),n||Kc(t,r)!==void 0],ur="data-overlayscrollbars",ho="os-environment",co=`${ho}-scrollbar-hidden`,Li=`${ur}-initialize`,go="noClipping",Vc=`${ur}-body`,fn=ur,vy="host",Kt=`${ur}-viewport`,yy=ud,by=dd,wy="arrange",Ad="measuring",_y="scrolling",Id="scrollbarHidden",xy="noContent",ys=`${ur}-padding`,jc=`${ur}-content`,al="os-size-observer",Sy=`${al}-appear`,Cy=`${al}-listener`,Ey="os-trinsic-observer",$y="os-theme-none",lt="os-scrollbar",Ty=`${lt}-rtl`,Py=`${lt}-horizontal`,Oy=`${lt}-vertical`,Dd=`${lt}-track`,ul=`${lt}-handle`,Ay=`${lt}-visible`,Iy=`${lt}-cornerless`,Hc=`${lt}-interaction`,zc=`${lt}-unusable`,bs=`${lt}-auto-hide`,Uc=`${bs}-hidden`,qc=`${lt}-wheel`,Dy=`${Dd}-interactive`,ky=`${ul}-interactive`;let kd;const Ly=()=>kd,My=e=>{kd=e};let Mi;const Ny=()=>{const e=(b,S,x)=>{Qe(document.body,b),Qe(document.body,b);const C=Cd(b),A=Gn(b),$=cl(S);return x&&nr(b),{x:A.h-C.h+$.h,y:A.w-C.w+$.w}},t=b=>{let S=!1;const x=ll(b,co);try{S=Zt(b,"scrollbar-width")==="none"||Zt(b,"display","::-webkit-scrollbar")==="none"}catch{}return x(),S},n=`.${ho}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${ho} div{width:200%;height:200%;margin:10px 0}.${co}{scrollbar-width:none!important}.${co}::-webkit-scrollbar,.${co}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,o=_d(`<div class="${ho}"><div></div><style>${n}</style></div>`)[0],i=o.firstChild,s=o.lastChild,l=Ly();l&&(s.nonce=l);const[c,,a]=vs(),[u,d]=Ze({o:e(o,i),i:fo},Q(e,o,i,!0)),[f]=d(),h=t(o),g={x:f.x===0,y:f.y===0},p={elements:{host:null,padding:!h,viewport:b=>h&&wd(b)&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},_=ie({},my),w=Q(ie,{},_),v=Q(ie,{},p),y={T:f,k:g,R:h,V:!!uo,L:Q(c,"r"),U:v,P:b=>ie(p,b)&&v(),N:w,q:b=>ie(_,b)&&w(),B:ie({},p),F:ie({},_)};if(Et(o,"style"),nr(o),_e(Ye,"resize",()=>{a("r",[])}),it(Ye.matchMedia)&&!h&&(!g.x||!g.y)){const b=S=>{const x=Ye.matchMedia(`(resolution: ${Ye.devicePixelRatio}dppx)`);_e(x,"change",()=>{S(),b(S)},{A:!0})};b(()=>{const[S,x]=u();ie(y.T,S),a("r",[x])})}return y},Mt=()=>(Mi||(Mi=Ny()),Mi),Ld=(e,t)=>it(t)?t.apply(0,e):t,Ry=(e,t,n,r)=>{const o=Qs(r)?n:r;return Ld(e,o)||t.apply(0,e)},Md=(e,t,n,r)=>{const o=Qs(r)?n:r,i=Ld(e,o);return!!i&&(No(i)?i:t.apply(0,e))},Fy=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:r}=t||{},{k:o,R:i,U:s}=Mt(),{nativeScrollbarsOverlaid:l,body:c}=s().cancel,a=n??l,u=Qs(r)?c:r,d=(o.x||o.y)&&a,f=e&&(ci(u)?!i:u);return!!d||!!f},dl=new WeakMap,Ky=(e,t)=>{dl.set(e,t)},By=e=>{dl.delete(e)},Nd=e=>dl.get(e),Vy=(e,t,n)=>{let r=!1;const o=n?new WeakMap:!1,i=()=>{r=!0},s=l=>{if(o&&n){const c=n.map(a=>{const[u,d]=a||[];return[d&&u?(l||bd)(u,e):[],d]});fe(c,a=>fe(a[0],u=>{const d=a[1],f=o.get(u)||[];if(e.contains(u)&&d){const g=_e(u,d,p=>{r?(g(),o.delete(u)):t(p)});o.set(u,$e(f,g))}else nt(f),o.delete(u)}))}};return s(),[i,s]},Wc=(e,t,n,r)=>{let o=!1;const{j:i,X:s,Y:l,W:c,J:a,G:u}=r||{},d=as(()=>o&&n(!0),{_:33,v:99}),[f,h]=Vy(e,d,l),g=i||[],p=s||[],_=Mr(g,p),w=(y,b)=>{if(!ls(b)){const S=a||dn,x=u||dn,C=[],A=[];let $=!1,E=!1;if(fe(b,T=>{const{attributeName:R,target:q,type:L,oldValue:U,addedNodes:j,removedNodes:Y}=T,J=L==="attributes",ee=L==="childList",se=e===q,M=J&&R,k=M&&ol(q,R||""),H=zr(k)?k:null,z=M&&U!==H,D=nd(p,R)&&z;if(t&&(ee||!se)){const G=J&&z,W=G&&c&&us(q,c),re=(W?!S(q,R,U,H):!J||G)&&!x(T,!!W,e,r);fe(j,le=>$e(C,le)),fe(Y,le=>$e(C,le)),E=E||re}!t&&se&&z&&!S(q,R,U,H)&&($e(A,R),$=$||D)}),h(T=>cs(C).reduce((R,q)=>($e(R,bd(T,q)),us(q,T)?$e(R,q):R),[])),t)return!y&&E&&n(!1),[!1];if(!ls(A)||$){const T=[cs(A),$];return!y&&n.apply(0,T),T}}},v=new iy(Q(w,!1));return[()=>(v.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:_,subtree:t,childList:t,characterData:t}),o=!0,()=>{o&&(f(),v.disconnect(),o=!1)}),()=>{if(o)return d.m(),w(!0,v.takeRecords())}]},Rd={},Fd={},jy=e=>{fe(e,t=>fe(t,(n,r)=>{Rd[r]=t[r]}))},Kd=(e,t,n)=>_t(e).map(r=>{const{static:o,instance:i}=e[r],[s,l,c]=n||[],a=n?i:o;if(a){const u=n?a(s,l,t):a(t);return(c||Fd)[r]=u}}),Ur=e=>Fd[e],Hy="__osOptionsValidationPlugin",zy="__osSizeObserverPlugin",Uy=(e,t)=>{const{k:n}=t,[r,o]=e("showNativeOverlaidScrollbars");return[r&&n.x&&n.y,o]},rr=e=>e.indexOf(an)===0,qy=(e,t)=>{const n=(o,i,s,l)=>{const c=o===an?Sn:o.replace(`${an}-`,""),a=rr(o),u=rr(s);return!i&&!l?Sn:a&&u?an:a?i&&l?c:i?an:Sn:i?c:u&&l?an:Sn},r={x:n(t.x,e.x,t.y,e.y),y:n(t.y,e.y,t.x,e.x)};return{K:r,Z:{x:r.x===tr,y:r.y===tr}}},Bd="__osScrollbarsHidingPlugin",Vd="__osClickScrollPlugin",Wy={[Vd]:{static:()=>(e,t,n,r)=>{let o=!1,i=dn;const s=133,l=222,[c,a]=Cn(s),u=Math.sign(t),d=n*u,f=d/2,h=w=>1-(1-w)*(1-w),g=(w,v)=>Di(w,v,l,e,h),p=(w,v)=>Di(w,t-d,s*v,(y,b,S)=>{e(y),S&&(i=g(y,t))}),_=Di(0,d,l,(w,v,y)=>{if(e(w),y&&(r(o),!o)){const b=t-w;Math.sign(b-f)===u&&c(()=>{const x=b-d;i=Math.sign(x)===u?p(w,Math.abs(x)/n):g(w,t)})}},h);return w=>{o=!0,w&&_(),a(),i()}}}},jd=(e,t,n)=>{const{dt:r}=n||{},o=Ur(zy),[i]=Ze({o:!1,u:!0});return()=>{const s=[],c=_d(`<div class="${al}"><div class="${Cy}"></div></div>`)[0],a=c.firstChild,u=d=>{const f=d instanceof ResizeObserverEntry;let h=!1,g=!1;if(f){const[p,,_]=i(d.contentRect),w=gs(p);g=Ed(p,_),h=!g&&!w}else g=d===!0;h||t({ft:!0,dt:g})};if(ko){const d=new ko(f=>u(f.pop()));d.observe(a),$e(s,()=>{d.disconnect()})}else if(o){const[d,f]=o(a,u,r);$e(s,Mr([ll(c,Sy),_e(c,"animationstart",d)],f))}else return dn;return Q(nt,$e(s,Qe(e,c)))}},Gy=(e,t)=>{let n;const r=c=>c.h===0||c.isIntersecting||c.intersectionRatio>0,o=Wn(Ey),[i]=Ze({o:!1}),s=(c,a)=>{if(c){const u=i(r(c)),[,d]=u;return d&&!a&&t(u)&&[u]}},l=(c,a)=>s(a.pop(),c);return[()=>{const c=[];if(Oc)n=new Oc(Q(l,!1),{root:e}),n.observe(o),$e(c,()=>{n.disconnect()});else{const a=()=>{const u=Gn(o);s(u)};$e(c,jd(o,a)()),a()}return Q(nt,$e(c,Qe(e,o)))},()=>n&&l(!0,n.takeRecords())]},Yy=(e,t,n,r)=>{let o,i,s,l,c,a;const u=`[${fn}]`,d=`[${Kt}]`,f=["id","class","style","open","wrap","cols","rows"],{vt:h,ht:g,ot:p,gt:_,bt:w,nt:v,wt:y,yt:b,St:S,Ot:x}=e,C=D=>Zt(D,"direction")==="rtl",A={$t:!1,ct:C(h)},$=Mt(),E=Ur(Bd),[T]=Ze({i:fd,o:{w:0,h:0}},()=>{const D=E&&E.tt(e,t,A,$,n).ut,W=!(y&&v)&&sl(g,fn,go),Z=!v&&b(wy),re=Z&&et(_),le=re&&x(),me=S(Ad,W),ve=Z&&D&&D()[0],Oe=Fo(p),ne=cl(p);return ve&&ve(),$t(_,re),le&&le(),W&&me(),{w:Oe.w+ne.w,h:Oe.h+ne.h}}),R=as(r,{_:()=>o,v:()=>i,S(D,G){const[W]=D,[Z]=G;return[Mr(_t(W),_t(Z)).reduce((re,le)=>(re[le]=W[le]||Z[le],re),{})]}}),q=D=>{const G=C(h);ie(D,{Ct:a!==G}),ie(A,{ct:G}),a=G},L=(D,G)=>{const[W,Z]=D,re={xt:Z};return ie(A,{$t:W}),!G&&r(re),re},U=({ft:D,dt:G})=>{const Z=!(D&&!G)&&$.R?R:r,re={ft:D||G,dt:G};q(re),Z(re)},j=(D,G)=>{const[,W]=T(),Z={Ht:W};return q(Z),W&&!G&&(D?r:R)(Z),Z},Y=(D,G,W)=>{const Z={Et:G};return q(Z),G&&!W&&R(Z),Z},[J,ee]=w?Gy(g,L):[],se=!v&&jd(g,U,{dt:!0}),[M,k]=Wc(g,!1,Y,{X:f,j:f}),H=v&&ko&&new ko(D=>{const G=D[D.length-1].contentRect;U({ft:!0,dt:Ed(G,c)}),c=G}),z=as(()=>{const[,D]=T();r({Ht:D})},{_:222,p:!0});return[()=>{H&&H.observe(g);const D=se&&se(),G=J&&J(),W=M(),Z=$.L(re=>{re?R({zt:re}):z()});return()=>{H&&H.disconnect(),D&&D(),G&&G(),l&&l(),W(),Z()}},({It:D,At:G,Dt:W})=>{const Z={},[re]=D("update.ignoreMutation"),[le,me]=D("update.attributes"),[ve,Oe]=D("update.elementEvents"),[ne,Re]=D("update.debounce"),qe=Oe||me,ke=G||W,Fe=Pe=>it(re)&&re(Pe);if(qe){s&&s(),l&&l();const[Pe,De]=Wc(w||p,!0,j,{j:Mr(f,le||[]),Y:ve,W:u,G:(ye,Ce)=>{const{target:Le,attributeName:We}=ye;return(!Ce&&We&&!v?ay(Le,u,d):!1)||!!Hn(Le,`.${lt}`)||!!Fe(ye)}});l=Pe(),s=De}if(Re)if(R.m(),kt(ne)){const Pe=ne[0],De=ne[1];o=At(Pe)&&Pe,i=At(De)&&De}else At(ne)?(o=ne,i=!1):(o=!1,i=!1);if(ke){const Pe=k(),De=ee&&ee(),ye=s&&s();Pe&&ie(Z,Y(Pe[0],Pe[1],ke)),De&&ie(Z,L(De[0],ke)),ye&&ie(Z,j(ye[0],ke))}return q(Z),Z},A]},Xy=(e,t,n,r)=>{const o="--os-viewport-percent",i="--os-scroll-percent",s="--os-scroll-direction",{U:l}=Mt(),{scrollbars:c}=l(),{slot:a}=c,{vt:u,ht:d,ot:f,Mt:h,gt:g,wt:p,nt:_}=t,{scrollbars:w}=h?{}:e,{slot:v}=w||{},y=[],b=[],S=[],x=Md([u,d,f],()=>_&&p?u:d,a,v),C=M=>{if(uo){const k=new uo({source:g,axis:M});return{kt:z=>{const D=z.Tt.animate({clear:["left"],[i]:[0,1]},{timeline:k});return()=>D.cancel()}}}},A={x:C("x"),y:C("y")},$=()=>{const{Rt:M,Vt:k}=n,H=(z,D)=>pd(0,1,z/(z+D)||0);return{x:H(k.x,M.x),y:H(k.y,M.y)}},E=(M,k,H)=>{const z=H?ll:yd;fe(M,D=>{z(D.Tt,k)})},T=(M,k)=>{fe(M,H=>{const[z,D]=k(H);Rr(z,D)})},R=(M,k,H)=>{const z=el(H),D=z?H:!0,G=z?!H:!0;D&&E(b,M,k),G&&E(S,M,k)},q=()=>{const M=$(),k=H=>z=>[z.Tt,{[o]:hs(H)+""}];T(b,k(M.x)),T(S,k(M.y))},L=()=>{if(!uo){const{Lt:M}=n,k=Nc(M,et(g)),H=z=>D=>[D.Tt,{[i]:hs(z)+""}];T(b,H(k.x)),T(S,H(k.y))}},U=()=>{const{Lt:M}=n,k=Mc(M),H=z=>D=>[D.Tt,{[s]:z?"0":"1"}];T(b,H(k.x)),T(S,H(k.y))},j=()=>{if(_&&!p){const{Rt:M,Lt:k}=n,H=Mc(k),z=Nc(k,et(g)),D=G=>{const{Tt:W}=G,Z=Nr(W)===f&&W,re=(le,me,ve)=>{const Oe=me*le;return Sd(ve?Oe:-Oe)};return[Z,Z&&{transform:uy({x:re(z.x,M.x,H.x),y:re(z.y,M.y,H.y)})}]};T(b,D),T(S,D)}},Y=M=>{const k=M?"x":"y",z=Wn(`${lt} ${M?Py:Oy}`),D=Wn(Dd),G=Wn(ul),W={Tt:z,Ut:D,Pt:G},Z=A[k];return $e(M?b:S,W),$e(y,[Qe(z,D),Qe(D,G),Q(nr,z),Z&&Z.kt(W),r(W,R,M)]),W},J=Q(Y,!0),ee=Q(Y,!1),se=()=>(Qe(x,b[0].Tt),Qe(x,S[0].Tt),Q(nt,y));return J(),ee(),[{Nt:q,qt:L,Bt:U,Ft:j,jt:R,Xt:{Yt:b,Wt:J,Jt:Q(T,b)},Gt:{Yt:S,Wt:ee,Jt:Q(T,S)}},se]},Zy=(e,t,n,r)=>(o,i,s)=>{const{ht:l,ot:c,nt:a,gt:u,Kt:d,Ot:f}=t,{Tt:h,Ut:g,Pt:p}=o,[_,w]=Cn(333),[v,y]=Cn(444),b=C=>{it(u.scrollBy)&&u.scrollBy({behavior:"smooth",left:C.x,top:C.y})},S=()=>{const C="pointerup pointercancel lostpointercapture",A=`client${s?"X":"Y"}`,$=s?ui:di,E=s?"left":"top",T=s?"w":"h",R=s?"x":"y",q=(U,j)=>Y=>{const{Rt:J}=n,ee=Gn(g)[T]-Gn(p)[T],M=j*Y/ee*J[R];$t(u,{[R]:U+M})},L=[];return _e(g,"pointerdown",U=>{const j=Hn(U.target,`.${ul}`)===p,Y=j?p:g,J=e.scrollbars,ee=J[j?"dragScroll":"clickScroll"],{button:se,isPrimary:M,pointerType:k}=U,{pointers:H}=J;if(se===0&&M&&ee&&(H||[]).includes(k)){nt(L),y();const D=!j&&(U.shiftKey||ee==="instant"),G=Q(ki,p),W=Q(ki,g),Z=(Ce,Le)=>(Ce||G())[E]-(Le||W())[E],re=is(ki(u)[$])/Gn(u)[T]||1,le=q(et(u)[R],1/re),me=U[A],ve=G(),Oe=W(),ne=ve[$],Re=Z(ve,Oe)+ne/2,qe=me-Oe[E],ke=j?0:qe-Re,Fe=Ce=>{nt(ye),Y.releasePointerCapture(Ce.pointerId)},Pe=j||D,De=f(),ye=[_e(d,C,Fe),_e(d,"selectstart",Ce=>ps(Ce),{H:!1}),_e(g,C,Fe),Pe&&_e(g,"pointermove",Ce=>le(ke+(Ce[A]-me))),Pe&&(()=>{const Ce=et(u);De();const Le=et(u),We={x:Le.x-Ce.x,y:Le.y-Ce.y};(Io(We.x)>3||Io(We.y)>3)&&(f(),$t(u,Ce),b(We),v(De))})];if(Y.setPointerCapture(U.pointerId),D)le(ke);else if(!j){const Ce=Ur(Vd);if(Ce){const Le=Ce(le,ke,ne,We=>{We?De():$e(ye,De)});$e(ye,Le),$e(L,Q(Le,!0))}}}})};let x=!0;return Q(nt,[_e(p,"pointermove pointerleave",r),_e(h,"pointerenter",()=>{i(Hc,!0)}),_e(h,"pointerleave pointercancel",()=>{i(Hc,!1)}),!a&&_e(h,"mousedown",()=>{const C=fs();(Ic(C,Kt)||Ic(C,fn)||C===document.body)&&Do(Q(ms,c),25)}),_e(h,"wheel",C=>{const{deltaX:A,deltaY:$,deltaMode:E}=C;x&&E===0&&Nr(h)===l&&b({x:A,y:$}),x=!1,i(qc,!0),_(()=>{x=!0,i(qc)}),ps(C)},{H:!1,I:!0}),_e(h,"pointerdown",Q(_e,d,"click",Td,{A:!0,I:!0,H:!1}),{I:!0}),S(),w,y])},Jy=(e,t,n,r,o,i)=>{let s,l,c,a,u,d=dn,f=0;const h=M=>M.pointerType==="mouse",[g,p]=Cn(),[_,w]=Cn(100),[v,y]=Cn(100),[b,S]=Cn(()=>f),[x,C]=Xy(e,o,r,Zy(t,o,r,M=>h(M)&&Y())),{ht:A,Qt:$,wt:E}=o,{jt:T,Nt:R,qt:q,Bt:L,Ft:U}=x,j=(M,k)=>{if(S(),M)T(Uc);else{const H=Q(T,Uc,!0);f>0&&!k?b(H):H()}},Y=()=>{(c?!s:!a)&&(j(!0),_(()=>{j(!1)}))},J=M=>{T(bs,M,!0),T(bs,M,!1)},ee=M=>{h(M)&&(s=c,c&&j(!0))},se=[S,w,y,p,()=>d(),_e(A,"pointerover",ee,{A:!0}),_e(A,"pointerenter",ee),_e(A,"pointerleave",M=>{h(M)&&(s=!1,c&&j(!1))}),_e(A,"pointermove",M=>{h(M)&&l&&Y()}),_e($,"scroll",M=>{g(()=>{q(),Y()}),i(M),U()})];return[()=>Q(nt,$e(se,C())),({It:M,Dt:k,Zt:H,tn:z})=>{const{nn:D,sn:G,en:W,cn:Z}=z||{},{Ct:re,dt:le}=H||{},{ct:me}=n,{k:ve}=Mt(),{K:Oe,rn:ne}=r,[Re,qe]=M("showNativeOverlaidScrollbars"),[ke,Fe]=M("scrollbars.theme"),[Pe,De]=M("scrollbars.visibility"),[ye,Ce]=M("scrollbars.autoHide"),[Le,We]=M("scrollbars.autoHideSuspend"),[fr]=M("scrollbars.autoHideDelay"),[qr,Wr]=M("scrollbars.dragScroll"),[Gr,_n]=M("scrollbars.clickScroll"),[Rn,wi]=M("overflow"),_i=le&&!k,xi=ne.x||ne.y,Si=D||G||Z||re||k,Ct=W||De||wi,Ci=Re&&ve.x&&ve.y,hr=(gr,ln,Yr)=>{const pr=gr.includes(tr)&&(Pe===an||Pe==="auto"&&ln===tr);return T(Ay,pr,Yr),pr};if(f=fr,_i&&(Le&&xi?(J(!1),d(),v(()=>{d=_e($,"scroll",Q(J,!0),{A:!0})})):J(!0)),qe&&T($y,Ci),Fe&&(T(u),T(ke,!0),u=ke),We&&!Le&&J(!0),Ce&&(l=ye==="move",c=ye==="leave",a=ye==="never",j(a,!0)),Wr&&T(ky,qr),_n&&T(Dy,!!Gr),Ct){const gr=hr(Rn.x,Oe.x,!0),ln=hr(Rn.y,Oe.y,!1);T(Iy,!(gr&&ln))}Si&&(q(),R(),U(),Z&&L(),T(zc,!ne.x,!0),T(zc,!ne.y,!1),T(Ty,me&&!E))},{},x]},Qy=e=>{const t=Mt(),{U:n,R:r}=t,{elements:o}=n(),{padding:i,viewport:s,content:l}=o,c=No(e),a=c?{}:e,{elements:u}=a,{padding:d,viewport:f,content:h}=u||{},g=c?e:a.target,p=wd(g),_=g.ownerDocument,w=_.documentElement,v=()=>_.defaultView||Ye,y=Q(Ry,[g]),b=Q(Md,[g]),S=Q(Wn,""),x=Q(y,S,s),C=Q(b,S,l),A=ne=>{const Re=Gn(ne),qe=Fo(ne),ke=Zt(ne,ud),Fe=Zt(ne,dd);return qe.w-Re.w>0&&!rr(ke)||qe.h-Re.h>0&&!rr(Fe)},$=x(f),E=$===g,T=E&&p,R=!E&&C(h),q=!E&&$===R,L=T?w:$,U=T?L:g,j=!E&&b(S,i,d),Y=!q&&R,J=[Y,L,j,U].map(ne=>No(ne)&&!Nr(ne)&&ne),ee=ne=>ne&&nd(J,ne),se=!ee(L)&&A(L)?L:g,M=T?w:L,H={vt:g,ht:U,ot:L,ln:j,bt:Y,gt:M,Qt:T?_:L,an:p?w:se,Kt:_,wt:p,Mt:c,nt:E,un:v,yt:ne=>sl(L,Kt,ne),St:(ne,Re)=>Ro(L,Kt,ne,Re),Ot:()=>Ro(M,Kt,_y,!0)},{vt:z,ht:D,ln:G,ot:W,bt:Z}=H,re=[()=>{Et(D,[fn,Li]),Et(z,Li),p&&Et(w,[Li,fn])}];let le=ds([Z,W,G,D,z].find(ne=>ne&&!ee(ne)));const me=T?z:Z||W,ve=Q(nt,re);return[H,()=>{const ne=v(),Re=fs(),qe=ye=>{Qe(Nr(ye),ds(ye)),nr(ye)},ke=ye=>_e(ye,"focusin focusout focus blur",Td,{I:!0,H:!1}),Fe="tabindex",Pe=ol(W,Fe),De=ke(Re);return Ft(D,fn,E?"":vy),Ft(G,ys,""),Ft(W,Kt,""),Ft(Z,jc,""),E||(Ft(W,Fe,Pe||"-1"),p&&Ft(w,Vc,"")),Qe(me,le),Qe(D,G),Qe(G||D,!E&&W),Qe(W,Z),$e(re,[De,()=>{const ye=fs(),Ce=ee(W),Le=Ce&&ye===W?z:ye,We=ke(Le);Et(G,ys),Et(Z,jc),Et(W,Kt),p&&Et(w,Vc),Pe?Ft(W,Fe,Pe):Et(W,Fe),ee(Z)&&qe(Z),Ce&&qe(W),ee(G)&&qe(G),ms(Le),We()}]),r&&!E&&(il(W,Kt,Id),$e(re,Q(Et,W,Kt))),ms(!E&&p&&Re===z&&ne.top===ne?W:Re),De(),le=0,ve},ve]},eb=({bt:e})=>({Zt:t,_n:n,Dt:r})=>{const{xt:o}=t||{},{$t:i}=n;e&&(o||r)&&Rr(e,{[di]:i&&"100%"})},tb=({ht:e,ln:t,ot:n,nt:r},o)=>{const[i,s]=Ze({i:ly,o:kc()},Q(kc,e,"padding",""));return({It:l,Zt:c,_n:a,Dt:u})=>{let[d,f]=s(u);const{R:h}=Mt(),{ft:g,Ht:p,Ct:_}=c||{},{ct:w}=a,[v,y]=l("paddingAbsolute");(g||f||(u||p))&&([d,f]=i(u));const S=!r&&(y||_||f);if(S){const x=!v||!t&&!h,C=d.r+d.l,A=d.t+d.b,$={[cd]:x&&!w?-C:0,[ad]:x?-A:0,[ld]:x&&w?-C:0,top:x?-d.t:0,right:x?w?-d.r:"auto":0,left:x?w?"auto":-d.l:0,[ui]:x&&`calc(100% + ${C}px)`},E={[rd]:x?d.t:0,[od]:x?d.r:0,[sd]:x?d.b:0,[id]:x?d.l:0};Rr(t||n,$),Rr(n,E),ie(o,{ln:d,dn:!x,rt:t?E:ie({},$,E)})}return{fn:S}}},nb=(e,t)=>{const n=Mt(),{ht:r,ln:o,ot:i,nt:s,Qt:l,gt:c,wt:a,St:u,un:d}=e,{R:f}=n,h=a&&s,g=Q(Ao,0),p={display:()=>!1,direction:k=>k!=="ltr",flexDirection:k=>k.endsWith("-reverse"),writingMode:k=>k!=="horizontal-tb"},_=_t(p),w={i:fd,o:{w:0,h:0}},v={i:fo,o:{}},y=k=>{u(Ad,!h&&k)},b=k=>{if(!_.some(me=>{const ve=k[me];return ve&&p[me](ve)}))return{D:{x:0,y:0},M:{x:1,y:1}};y(!0);const z=et(c),D=u(xy,!0),G=_e(l,tr,me=>{const ve=et(c);me.isTrusted&&ve.x===z.x&&ve.y===z.y&&$d(me)},{I:!0,A:!0});$t(c,{x:0,y:0}),D();const W=et(c),Z=Fo(c);$t(c,{x:Z.w,y:Z.h});const re=et(c);$t(c,{x:re.x-W.x<1&&-Z.w,y:re.y-W.y<1&&-Z.h});const le=et(c);return $t(c,z),si(()=>G()),{D:W,M:le}},S=(k,H)=>{const z=Ye.devicePixelRatio%1!==0?1:0,D={w:g(k.w-H.w),h:g(k.h-H.h)};return{w:D.w>z?D.w:0,h:D.h>z?D.h:0}},[x,C]=Ze(w,Q(cl,i)),[A,$]=Ze(w,Q(Fo,i)),[E,T]=Ze(w),[R]=Ze(v),[q,L]=Ze(w),[U]=Ze(v),[j]=Ze({i:(k,H)=>fi(k,H,_),o:{}},()=>gy(i)?Zt(i,_):{}),[Y,J]=Ze({i:(k,H)=>fo(k.D,H.D)&&fo(k.M,H.M),o:Pd()}),ee=Ur(Bd),se=(k,H)=>`${H?yy:by}${sy(k)}`,M=k=>{const H=D=>[an,Sn,tr].map(G=>se(G,D)),z=H(!0).concat(H()).join(" ");u(z),u(_t(k).map(D=>se(k[D],D==="x")).join(" "),!0)};return({It:k,Zt:H,_n:z,Dt:D},{fn:G})=>{const{ft:W,Ht:Z,Ct:re,dt:le,zt:me}=H||{},ve=ee&&ee.tt(e,t,z,n,k),{it:Oe,ut:ne,_t:Re}=ve||{},[qe,ke]=Uy(k,n),[Fe,Pe]=k("overflow"),De=rr(Fe.x),ye=rr(Fe.y),Ce=!0;let Le=C(D),We=$(D),fr=T(D),qr=L(D);ke&&f&&u(Id,!qe);{sl(r,fn,go)&&y(!0);const[Dl]=ne?ne():[],[Xr]=Le=x(D),[Zr]=We=A(D),Jr=Cd(i),Qr=h&&hy(d()),th={w:g(Zr.w+Xr.w),h:g(Zr.h+Xr.h)},kl={w:g((Qr?Qr.w:Jr.w+g(Jr.w-Zr.w))+Xr.w),h:g((Qr?Qr.h:Jr.h+g(Jr.h-Zr.h))+Xr.h)};Dl&&Dl(),qr=q(kl),fr=E(S(th,kl),D)}const[Wr,Gr]=qr,[_n,Rn]=fr,[wi,_i]=We,[xi,Si]=Le,[Ct,Ci]=R({x:_n.w>0,y:_n.h>0}),hr=De&&ye&&(Ct.x||Ct.y)||De&&Ct.x&&!Ct.y||ye&&Ct.y&&!Ct.x,gr=G||re||me||Si||_i||Gr||Rn||Pe||ke||Ce,ln=qy(Ct,Fe),[Yr,pr]=U(ln.K),[Zf,Jf]=j(D),Il=re||le||Jf||Ci||D,[Qf,eh]=Il?Y(b(Zf),D):J();return gr&&(pr&&M(ln.K),Re&&Oe&&Rr(i,Re(ln,z,Oe(ln,wi,xi)))),y(!1),Ro(r,fn,go,hr),Ro(o,ys,go,hr),ie(t,{K:Yr,Vt:{x:Wr.w,y:Wr.h},Rt:{x:_n.w,y:_n.h},rn:Ct,Lt:py(Qf,_n)}),{en:pr,nn:Gr,sn:Rn,cn:eh||Rn,vn:Il}}},rb=e=>{const[t,n,r]=Qy(e),o={ln:{t:0,r:0,b:0,l:0},dn:!1,rt:{[cd]:0,[ad]:0,[ld]:0,[rd]:0,[od]:0,[sd]:0,[id]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},K:{x:Sn,y:Sn},rn:{x:!1,y:!1},Lt:Pd()},{vt:i,gt:s,nt:l,Ot:c}=t,{R:a,k:u}=Mt(),d=!a&&(u.x||u.y),f=[eb(t),tb(t,o),nb(t,o)];return[n,h=>{const g={},_=d&&et(s),w=_&&c();return fe(f,v=>{ie(g,v(h,g)||{})}),$t(s,_),w&&w(),!l&&$t(i,0),g},o,t,r]},ob=(e,t,n,r,o)=>{let i=!1;const s=Bc(t,{}),[l,c,a,u,d]=rb(e),[f,h,g]=Yy(u,a,s,b=>{y({},b)}),[p,_,,w]=Jy(e,t,g,a,u,o),v=b=>_t(b).some(S=>!!b[S]),y=(b,S)=>{if(n())return!1;const{pn:x,Dt:C,At:A,hn:$}=b,E=x||{},T=!!C||!i,R={It:Bc(t,E,T),pn:E,Dt:T};if($)return _(R),!1;const q=S||h(ie({},R,{At:A})),L=c(ie({},R,{_n:g,Zt:q}));_(ie({},R,{Zt:q,tn:L}));const U=v(q),j=v(L),Y=U||j||!rl(E)||T;return i=!0,Y&&r(b,{Zt:q,tn:L}),Y};return[()=>{const{an:b,gt:S,Ot:x}=u,C=et(b),A=[f(),l(),p()],$=x();return $t(S,C),$(),Q(nt,A)},y,()=>({gn:g,bn:a}),{wn:u,yn:w},d]},dt=(e,t,n)=>{const{N:r}=Mt(),o=No(e),i=o?e:e.target,s=Nd(i);if(t&&!s){let l=!1;const c=[],a={},u=E=>{const T=gd(E),R=Ur(Hy);return R?R(T,!0):T},d=ie({},r(),u(t)),[f,h,g]=vs(),[p,_,w]=vs(n),v=(E,T)=>{w(E,T),g(E,T)},[y,b,S,x,C]=ob(e,d,()=>l,({pn:E,Dt:T},{Zt:R,tn:q})=>{const{ft:L,Ct:U,xt:j,Ht:Y,Et:J,dt:ee}=R,{nn:se,sn:M,en:k,cn:H}=q;v("updated",[$,{updateHints:{sizeChanged:!!L,directionChanged:!!U,heightIntrinsicChanged:!!j,overflowEdgeChanged:!!se,overflowAmountChanged:!!M,overflowStyleChanged:!!k,scrollCoordinatesChanged:!!H,contentMutation:!!Y,hostMutation:!!J,appear:!!ee},changedOptions:E||{},force:!!T}])},E=>v("scroll",[$,E])),A=E=>{By(i),nt(c),l=!0,v("destroyed",[$,E]),h(),_()},$={options(E,T){if(E){const R=T?r():{},q=Od(d,ie(R,u(E)));rl(q)||(ie(d,q),b({pn:q}))}return ie({},d)},on:p,off:(E,T)=>{E&&T&&_(E,T)},state(){const{gn:E,bn:T}=S(),{ct:R}=E,{Vt:q,Rt:L,K:U,rn:j,ln:Y,dn:J,Lt:ee}=T;return ie({},{overflowEdge:q,overflowAmount:L,overflowStyle:U,hasOverflow:j,scrollCoordinates:{start:ee.D,end:ee.M},padding:Y,paddingAbsolute:J,directionRTL:R,destroyed:l})},elements(){const{vt:E,ht:T,ln:R,ot:q,bt:L,gt:U,Qt:j}=x.wn,{Xt:Y,Gt:J}=x.yn,ee=M=>{const{Pt:k,Ut:H,Tt:z}=M;return{scrollbar:z,track:H,handle:k}},se=M=>{const{Yt:k,Wt:H}=M,z=ee(k[0]);return ie({},z,{clone:()=>{const D=ee(H());return b({hn:!0}),D}})};return ie({},{target:E,host:T,padding:R||q,viewport:q,content:L||q,scrollOffsetElement:U,scrollEventElement:j,scrollbarHorizontal:se(Y),scrollbarVertical:se(J)})},update:E=>b({Dt:E,At:!0}),destroy:Q(A,!1),plugin:E=>a[_t(E)[0]]};return $e(c,[C]),Ky(i,$),Kd(Rd,dt,[$,f,a]),Fy(x.wn.wt,!o&&e.cancel)?(A(!0),$):($e(c,y()),v("initialized",[$]),$.update(),$)}return s};dt.plugin=e=>{const t=kt(e),n=t?e:[e],r=n.map(o=>Kd(o,dt)[0]);return jy(n),t?r:r[0]};dt.valid=e=>{const t=e&&e.elements,n=it(t)&&t();return Mo(n)&&!!Nd(n.target)};dt.env=()=>{const{T:e,k:t,R:n,V:r,B:o,F:i,U:s,P:l,N:c,q:a}=Mt();return ie({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,scrollTimeline:r,staticDefaultInitialization:o,staticDefaultOptions:i,getDefaultInitialization:s,setDefaultInitialization:l,getDefaultOptions:c,setDefaultOptions:a})};dt.nonce=My;const ib=()=>{if(typeof window>"u"){const a=()=>{};return[a,a]}let e,t;const n=window,r=typeof n.requestIdleCallback=="function",o=n.requestAnimationFrame,i=n.cancelAnimationFrame,s=r?n.requestIdleCallback:o,l=r?n.cancelIdleCallback:i,c=()=>{l(e),i(t)};return[(a,u)=>{c(),e=s(r?()=>{c(),t=o(a)}:a,typeof u=="object"?u:{timeout:2233})},c]},sb=e=>typeof e=="function",Bn=e=>sb(e)?e():e,lb=e=>{let t=null,n,r,o;const[i,s]=ib();return pe(()=>{o=Bn(Bn(e)?.defer)}),pe(()=>{n=Bn(Bn(e)?.options),dt.valid(t)&&t.options(n||{},!0)}),pe(()=>{r=Bn(Bn(e)?.events),dt.valid(t)&&t.on(r||{},!0)}),te(()=>{s(),t?.destroy()}),[l=>{if(dt.valid(t))return t;const c=()=>t=dt(l,n||{},r||{});o?i(c,o):c()},()=>t]};var cb=F('<div data-overlayscrollbars-contents="">');dt.plugin(Wy);dt.env().setDefaultOptions({scrollbars:{clickScroll:!0,theme:"os-theme-light"},showNativeOverlaidScrollbars:!0,update:{debounce:[0,33.333*4]}});function ab(e){const[t,n]=B(e,["as","ref","children","activate","eager","defer","options","events"]),r=()=>t.defer??(t.eager?!1:{timeout:200+Math.floor(Math.random()*20)*16.667}),[o,i]=K(),[s,l]=K(),[c,a]=lb({options:t.options,events:t.events,defer:r()});return V(()=>{const u=o(),d=s();u&&((t.activate===void 0||t.activate()&&!de(()=>a()))&&c(t.as==="body"?{target:u,cancel:{body:null}}:{target:u,elements:{viewport:d,content:d}}),te(()=>a()?.destroy()))}),pe(()=>{const u={osInstance:a,getElement:()=>o()||null};typeof t.ref=="function"?t.ref(u):t.ref=u}),m(wt,I({get component(){return t.as??"div"},"data-overlayscrollbars-initialize":"",ref:i},n,{get children(){return N(()=>t.as==="body")()?Yn(()=>t.children)():(()=>{var u=cb();return Tn(l,u),P(u,Yn(()=>t.children)),u})()}}))}function ub(e){let[t,n]=B(e,["scroll","children","as"]);return m(wt,I({get component(){return t.scroll&&Ka!=="mac"?ab:t.as??"div"},get as(){return t.as},get scroll(){return t.scroll}},n,{get children(){return t.children}}))}function db(e,t){t.observe(e)}function fb(e,t,n){const r=new IntersectionObserver(t,n),o=c=>db(c,r),i=c=>r.unobserve(c),s=()=>e.forEach(o),l=()=>r.takeRecords().forEach(c=>i(c.target));return s(),{add:o,remove:i,start:s,stop:te(()=>r.disconnect()),reset:l,instance:r}}function hb(...e){let t=[],n={};Array.isArray(e[0])||e[0]instanceof Function?e[1]instanceof Function?(t=O(e[0]).map(f=>[f,e[1]]),n=e[2]):(t=O(e[0]),n=e[1]):n=e[0];const r=new WeakMap,o=(f,h)=>f.forEach(g=>{const p=r.get(g.target)?.(g,h);p instanceof Function&&p(g,h)}),{add:i,remove:s,stop:l,instance:c}=fb([],o,n),a=(f,h)=>{i(f),r.set(f,h)},u=f=>{r.delete(f),s(f)},d=()=>t.forEach(([f,h])=>a(f,h));return An(d),[a,{remove:u,start:d,stop:l,instance:c}]}const gb={threshold:0,root:null,rootMargin:"0px"};function pb(e=gb){const[t,{remove:n,start:r,stop:o,instance:i}]=hb(e);return{observe:l=>{const[c,a]=K(!1),[u,d]=K(),f=g=>{a(g.isIntersecting),d(g)};let h;return V(()=>{const g=typeof l=="function"?l():l;g!==h&&(h&&n(h),h=g,g&&t(g,f))}),[c,u,()=>{const g=typeof l=="function"?l():l;g&&n(g)}]},start:r,stop:o,instance:i}}const mb=Ne(pb());function vb(){const e=Te(mb);if(!e)throw new Error("useViewport must be used within a ViewportProvider");return e}function yb(e){const{observe:t}=vb();return t(e)}var bb=F("<code> "),wb=F("<div class=code-controls>");Yi.languages.rel=Yi.languages.python;function _b(e){let t;const[n,r,o]=yb(()=>t);te(o),V(()=>{t.textContent=e.children??"",n()&&Yi.highlightElement(t)}),V(()=>e.onVisibilityChange?.(n()));const i=()=>e.lang?`language-${e.lang}`:"",s=l=>{t=l,typeof e.ref=="function"?e.ref(l):e.ref=l};return(()=>{var l=bb(),c=l.firstChild;return Tn(s,l),pe(a=>{var u=`ui-code ${i()} ${e.class||""}`,d=e.children;return u!==a.e&&en(l,a.e=u),d!==a.t&&(c.data=a.t=d),a},{e:void 0,t:void 0}),l})()}function Ko(e){const[t,n]=B(e,["no_copy","dense","class","controls","scroll"]),[r,o]=K(!1);let i;const s=()=>!t.no_copy||t.controls,l=()=>{const c=i.textContent;c&&Kv(c)};return m(ub,{as:"pre",get class(){return`ui-code-block ${t.dense?"dense":""} ${t.class||""}`},activate:r,get scroll(){return t.scroll},get children(){return[m(X,{get when(){return s()},get children(){var c=wb();return P(c,m(X,{get when(){return!t.no_copy},get children(){return m(ht,{class:"icon",tooltip:"copy to clipboard",onclick:l,get children(){return m(Uv,{})}})}}),null),P(c,()=>t.controls,null),c}}),m(_b,I({ref(c){var a=i;typeof a=="function"?a(c):i=c}},n,{onVisibilityChange:c=>c?o(!0):void 0}))]}})}function fl(e){return e.endsWith("y")?e.slice(0,-1)+"ies":e+"s"}function xb(e,t){return t===1?e:fl(e)}const Gc={};function Hd(e=3){let t=Gc[e];return t||(t=Gc[e]=new Intl.NumberFormat(void 0,{maximumFractionDigits:e})),t}function hl(e=3){const t=Hd(e);return n=>t.format(n)}function zd(e,t=3){return Hd(t).format(e)}function gl(e,t=zd,n){return function r(o,i=n,s){for(let l=s??e.length-1;l>=0;l--){const{unit:c,multiplier:a}=e[l];let u=o/a;if(u>=1||l===0&&s===void 0){let d="";if(typeof i=="function"&&(i=i(u,e[l])),i!==void 0){const f=Math.trunc(u),h=u-f;i>0&&(d=r(h*a,i-1,l-1)),u=f}return t(u)+c+d}if(s&&i!==void 0){if(typeof i=="function")throw new Error("Cannot use dynamic remainder depth in continuation");if(i-=1,i<=0)return""}}throw new Error("unreachable")}}const Sb=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!0});function Cb(e){return Sb.format(e).toLowerCase()}const pl=gl([{unit:"ms",multiplier:1},{unit:"s",multiplier:1e3},{unit:"m",multiplier:60*1e3},{unit:"h",multiplier:60*60*1e3},{unit:"d",multiplier:24*60*60*1e3}],hl(1),(e,t)=>t.multiplier>1e3?1:void 0),Ud=gl([{unit:" bytes",multiplier:1},{unit:"KB",multiplier:1e3},{unit:"MB",multiplier:1e3**2},{unit:"GB",multiplier:1e3**3},{unit:"TB",multiplier:1e3**4},{unit:"PB",multiplier:1e3**5}],hl(2)),Vt=gl([{unit:"",multiplier:1},{unit:"k",multiplier:1e3},{unit:"M",multiplier:1e3**2},{unit:"B",multiplier:1e3**3},{unit:"T",multiplier:1e3**4}],hl(2));var Eb=(e,t)=>e.length>0?()=>e(de(t)):e;function $b(e,t){let n=0;const r=e.map((o,i)=>N(()=>(n=i,o()),void 0,cg));return N(()=>r.map(o=>o())[n],void 0,t)}function Tb(e,t,n){let r=()=>t;const[o,i]=K(t),s=N(Eb(e,()=>r()),t);return[r=$b([o,s],n),l=>i(()=>typeof l=="function"?l(de(r)):l)]}var Ni=(e,t,n)=>{const r=n(e,t);return te(()=>clearInterval(r))},Pb=(e,t,n)=>{if(typeof t=="number"){Ni(e,t,n);return}let r=!1,o=performance.now(),i=0,s=!1;const l=()=>{de(e),o=performance.now(),r=n===setTimeout};V(c=>{if(r)return;const a=t();if(a===!1)return c&&(i+=(performance.now()-o)/c),a;if(c===!1&&(o=performance.now()),s){if(c&&(i+=(performance.now()-o)/c),o=performance.now(),i>=1)i=0,l();else if(i>0){const[u,d]=K(void 0,{equals:!1});return u(),Ni(()=>{i=0,s=!1,d(),l()},(1-i)*a,setTimeout),a}}return s=!0,Ni(l,a,n),a})};function qd(e,t,n,r){const[o,i]=K(de(e.bind(void 0,n)),r),s=()=>i(e);return Pb(s,t,setInterval),As(s),o}var Wd=6e4,Yc=36e5,Xc=e=>e instanceof Date?e:new Date(e),Ob=(e,t)=>t.getTime()-e.getTime(),Zc=e=>{const[t,n]=Tb(()=>Xc(O(e)));return[t,o=>n(i=>Xc(Ya(o,i)))]};function Ab(e=Wd/2){const[t,n]=K(void 0,{equals:!1});return[qd(()=>(t(),new Date),e,void 0,{equals:(o,i)=>o.getTime()===i.getTime()}),n]}function Ib(e,t){const[n]=Zc(e),[r]=Zc(t);return[N(()=>Ob(n(),r())),{from:n,to:r}]}function Db(e,t=n=>Math.abs(n)<=Yc?Wd/2:Yc/2){const n=typeof t=="function"?()=>t(i()):t,[r,o]=Ab(n),[i,{to:s}]=Ib(r,e);return[i,{update:o,target:s,now:r}]}var kb=F("<div class=container><div class=header><span> <!> </span><span></span></div><pre class=details>");const Lb=e=>{const t=o=>o.event==="error";t(e);const n=e.name||(t(e)?e.message||"Error":"Warning"),r=e.raw_content||(t(e)?e.err:"");return(()=>{var o=kb(),i=o.firstChild,s=i.firstChild,l=s.firstChild,c=l.nextSibling;c.nextSibling;var a=s.nextSibling,u=i.nextSibling;return P(s,n,c),P(a,()=>e.source&&e.source.file?` ${e.source.file}`:"",null),P(a,()=>e.source&&e.source.line?`: ${e.source.line}`:"",null),P(u,r),o})()};function Mb(e,t,n,r){const o=qd(e,t),[i,s]=K(n,r);return V(async()=>s(await o())),i}function Ie(...e){const t=[];for(const n of e)if(typeof n=="string")t.push(n);else if(typeof n=="object"&&n!==null)for(const r in n)n[r]&&t.push(r);return t.join(" ")}function St(e,t,n){return r=>{const o=`ui-${e}-${t}`;return"class"in r?r.class=`${r.class} ${o}`:r.class=o,n(r)}}const[Nb,Gd]=K(!1);let Jc=window.scrollY;window.addEventListener("scroll",e=>{const t=window.scrollY;if(Jc===t||(Jc=t,$n))return;const n=document.documentElement.scrollHeight,r=document.documentElement.clientHeight,o=Math.ceil(t+r)>=n-10;Gd(o)});let Rb=1,$n,ws=!1;function Yd(){if($n){ws=!0;return}$n=Rb++,setTimeout(()=>{window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"})},0),setTimeout(Xd,750,$n)}function Xd(e=$n){$n===e&&($n=void 0,ws&&Yd(),ws=!1)}window.addEventListener("scrollend",()=>Xd);const Zd=e=>{const t=[],n=r=>{for(const o of r)oe.is_span(o)?n(o.events):(ue.is_error(o)||ue.is_warn(o))&&t.push(o)};return n(e.events),t};var Fb=F('<table class="ui-table zfxn1"><thead><tr></tr></thead><tbody>'),Qc=F("<td>"),Kb=F("<tr>");function Bb(e){const t=()=>e.fields??Object.keys(e.rows[0]??{});return(()=>{var n=Fb(),r=n.firstChild,o=r.firstChild,i=r.nextSibling;return P(o,m(xe,{get each(){return t()},children:s=>(()=>{var l=Qc();return P(l,s),l})()})),P(i,m(xe,{get each(){return e.rows},children:s=>(()=>{var l=Kb();return P(l,m(xe,{get each(){return Object.entries(s)},children:([c,a])=>(()=>{var u=Qc();return P(u,a),u})()})),l})()})),n})()}var Jd=typeof global=="object"&&global&&global.Object===Object&&global,Vb=typeof self=="object"&&self&&self.Object===Object&&self,Nt=Jd||Vb||Function("return this")(),vn=Nt.Symbol,Qd=Object.prototype,jb=Qd.hasOwnProperty,Hb=Qd.toString,br=vn?vn.toStringTag:void 0;function zb(e){var t=jb.call(e,br),n=e[br];try{e[br]=void 0;var r=!0}catch{}var o=Hb.call(e);return r&&(t?e[br]=n:delete e[br]),o}var Ub=Object.prototype,qb=Ub.toString;function Wb(e){return qb.call(e)}var Gb="[object Null]",Yb="[object Undefined]",ea=vn?vn.toStringTag:void 0;function dr(e){return e==null?e===void 0?Yb:Gb:ea&&ea in Object(e)?zb(e):Wb(e)}function or(e){return e!=null&&typeof e=="object"}var Xb="[object Symbol]";function ir(e){return typeof e=="symbol"||or(e)&&dr(e)==Xb}function po(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var st=Array.isArray,Zb=1/0,ta=vn?vn.prototype:void 0,na=ta?ta.toString:void 0;function ef(e){if(typeof e=="string")return e;if(st(e))return po(e,ef)+"";if(ir(e))return na?na.call(e):"";var t=e+"";return t=="0"&&1/e==-Zb?"-0":t}var Jb=/\s/;function Qb(e){for(var t=e.length;t--&&Jb.test(e.charAt(t)););return t}var e0=/^\s+/;function t0(e){return e&&e.slice(0,Qb(e)+1).replace(e0,"")}function Fr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ra=NaN,n0=/^[-+]0x[0-9a-f]+$/i,r0=/^0b[01]+$/i,o0=/^0o[0-7]+$/i,i0=parseInt;function tf(e){if(typeof e=="number")return e;if(ir(e))return ra;if(Fr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=t0(e);var n=r0.test(e);return n||o0.test(e)?i0(e.slice(2),n?2:8):n0.test(e)?ra:+e}var oa=1/0,s0=17976931348623157e292;function l0(e){if(!e)return e===0?e:0;if(e=tf(e),e===oa||e===-oa){var t=e<0?-1:1;return t*s0}return e===e?e:0}function c0(e){var t=l0(e),n=t%1;return t===t?n?t-n:t:0}function nf(e){return e}var a0="[object AsyncFunction]",u0="[object Function]",d0="[object GeneratorFunction]",f0="[object Proxy]";function rf(e){if(!Fr(e))return!1;var t=dr(e);return t==u0||t==d0||t==a0||t==f0}var Ri=Nt["__core-js_shared__"],ia=function(){var e=/[^.]+$/.exec(Ri&&Ri.keys&&Ri.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function h0(e){return!!ia&&ia in e}var g0=Function.prototype,p0=g0.toString;function Mn(e){if(e!=null){try{return p0.call(e)}catch{}try{return e+""}catch{}}return""}var m0=/[\\^$.*+?()[\]{}|]/g,v0=/^\[object .+?Constructor\]$/,y0=Function.prototype,b0=Object.prototype,w0=y0.toString,_0=b0.hasOwnProperty,x0=RegExp("^"+w0.call(_0).replace(m0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function S0(e){if(!Fr(e)||h0(e))return!1;var t=rf(e)?x0:v0;return t.test(Mn(e))}function C0(e,t){return e?.[t]}function Nn(e,t){var n=C0(e,t);return S0(n)?n:void 0}var _s=Nn(Nt,"WeakMap"),sa=function(){try{var e=Nn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),E0=9007199254740991,$0=/^(?:0|[1-9]\d*)$/;function of(e,t){var n=typeof e;return t=t??E0,!!t&&(n=="number"||n!="symbol"&&$0.test(e))&&e>-1&&e%1==0&&e<t}function sf(e,t,n){t=="__proto__"&&sa?sa(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function lf(e,t){return e===t||e!==e&&t!==t}var T0=9007199254740991;function ml(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=T0}function vl(e){return e!=null&&ml(e.length)&&!rf(e)}var P0=Object.prototype;function O0(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||P0;return e===n}function A0(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var I0="[object Arguments]";function la(e){return or(e)&&dr(e)==I0}var cf=Object.prototype,D0=cf.hasOwnProperty,k0=cf.propertyIsEnumerable,af=la(function(){return arguments}())?la:function(e){return or(e)&&D0.call(e,"callee")&&!k0.call(e,"callee")};function L0(){return!1}var uf=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,ca=uf&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,M0=ca&&ca.exports===uf,aa=M0?Nt.Buffer:void 0,N0=aa?aa.isBuffer:void 0,xs=N0||L0,R0="[object Arguments]",F0="[object Array]",K0="[object Boolean]",B0="[object Date]",V0="[object Error]",j0="[object Function]",H0="[object Map]",z0="[object Number]",U0="[object Object]",q0="[object RegExp]",W0="[object Set]",G0="[object String]",Y0="[object WeakMap]",X0="[object ArrayBuffer]",Z0="[object DataView]",J0="[object Float32Array]",Q0="[object Float64Array]",e1="[object Int8Array]",t1="[object Int16Array]",n1="[object Int32Array]",r1="[object Uint8Array]",o1="[object Uint8ClampedArray]",i1="[object Uint16Array]",s1="[object Uint32Array]",be={};be[J0]=be[Q0]=be[e1]=be[t1]=be[n1]=be[r1]=be[o1]=be[i1]=be[s1]=!0;be[R0]=be[F0]=be[X0]=be[K0]=be[Z0]=be[B0]=be[V0]=be[j0]=be[H0]=be[z0]=be[U0]=be[q0]=be[W0]=be[G0]=be[Y0]=!1;function l1(e){return or(e)&&ml(e.length)&&!!be[dr(e)]}function df(e){return function(t){return e(t)}}var ff=typeof Ht=="object"&&Ht&&!Ht.nodeType&&Ht,Er=ff&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,c1=Er&&Er.exports===ff,Fi=c1&&Jd.process,ua=function(){try{var e=Er&&Er.require&&Er.require("util").types;return e||Fi&&Fi.binding&&Fi.binding("util")}catch{}}(),da=ua&&ua.isTypedArray,hf=da?df(da):l1,a1=Object.prototype,u1=a1.hasOwnProperty;function d1(e,t){var n=st(e),r=!n&&af(e),o=!n&&!r&&xs(e),i=!n&&!r&&!o&&hf(e),s=n||r||o||i,l=s?A0(e.length,String):[],c=l.length;for(var a in e)u1.call(e,a)&&!(s&&(a=="length"||o&&(a=="offset"||a=="parent")||i&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||of(a,c)))&&l.push(a);return l}function f1(e,t){return function(n){return e(t(n))}}var h1=f1(Object.keys,Object),g1=Object.prototype,p1=g1.hasOwnProperty;function m1(e){if(!O0(e))return h1(e);var t=[];for(var n in Object(e))p1.call(e,n)&&n!="constructor"&&t.push(n);return t}function yl(e){return vl(e)?d1(e):m1(e)}var v1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,y1=/^\w*$/;function bl(e,t){if(st(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ir(e)?!0:y1.test(e)||!v1.test(e)||t!=null&&e in Object(t)}var Kr=Nn(Object,"create");function b1(){this.__data__=Kr?Kr(null):{},this.size=0}function w1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _1="__lodash_hash_undefined__",x1=Object.prototype,S1=x1.hasOwnProperty;function C1(e){var t=this.__data__;if(Kr){var n=t[e];return n===_1?void 0:n}return S1.call(t,e)?t[e]:void 0}var E1=Object.prototype,$1=E1.hasOwnProperty;function T1(e){var t=this.__data__;return Kr?t[e]!==void 0:$1.call(t,e)}var P1="__lodash_hash_undefined__";function O1(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Kr&&t===void 0?P1:t,this}function On(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}On.prototype.clear=b1;On.prototype.delete=w1;On.prototype.get=C1;On.prototype.has=T1;On.prototype.set=O1;function A1(){this.__data__=[],this.size=0}function pi(e,t){for(var n=e.length;n--;)if(lf(e[n][0],t))return n;return-1}var I1=Array.prototype,D1=I1.splice;function k1(e){var t=this.__data__,n=pi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():D1.call(t,n,1),--this.size,!0}function L1(e){var t=this.__data__,n=pi(t,e);return n<0?void 0:t[n][1]}function M1(e){return pi(this.__data__,e)>-1}function N1(e,t){var n=this.__data__,r=pi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function nn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nn.prototype.clear=A1;nn.prototype.delete=k1;nn.prototype.get=L1;nn.prototype.has=M1;nn.prototype.set=N1;var Br=Nn(Nt,"Map");function R1(){this.size=0,this.__data__={hash:new On,map:new(Br||nn),string:new On}}function F1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function mi(e,t){var n=e.__data__;return F1(t)?n[typeof t=="string"?"string":"hash"]:n.map}function K1(e){var t=mi(this,e).delete(e);return this.size-=t?1:0,t}function B1(e){return mi(this,e).get(e)}function V1(e){return mi(this,e).has(e)}function j1(e,t){var n=mi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function rn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rn.prototype.clear=R1;rn.prototype.delete=K1;rn.prototype.get=B1;rn.prototype.has=V1;rn.prototype.set=j1;var H1="Expected a function";function wl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(H1);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(wl.Cache||rn),n}wl.Cache=rn;var z1=500;function U1(e){var t=wl(e,function(r){return n.size===z1&&n.clear(),r}),n=t.cache;return t}var q1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W1=/\\(\\)?/g,G1=U1(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(q1,function(n,r,o,i){t.push(o?i.replace(W1,"$1"):r||n)}),t});function Ss(e){return e==null?"":ef(e)}function gf(e,t){return st(e)?e:bl(e,t)?[e]:G1(Ss(e))}var Y1=1/0;function vi(e){if(typeof e=="string"||ir(e))return e;var t=e+"";return t=="0"&&1/e==-Y1?"-0":t}function _l(e,t){t=gf(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[vi(t[n++])];return n&&n==r?e:void 0}function X1(e,t,n){var r=e==null?void 0:_l(e,t);return r===void 0?n:r}function Z1(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var J1=Nt.isFinite,Q1=Math.min;function ew(e){var t=Math[e];return function(n,r){if(n=tf(n),r=r==null?0:Q1(c0(r),292),r&&J1(n)){var o=(Ss(n)+"e").split("e"),i=t(o[0]+"e"+(+o[1]+r));return o=(Ss(i)+"e").split("e"),+(o[0]+"e"+(+o[1]-r))}return t(n)}}function tw(){this.__data__=new nn,this.size=0}function nw(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function rw(e){return this.__data__.get(e)}function ow(e){return this.__data__.has(e)}var iw=200;function sw(e,t){var n=this.__data__;if(n instanceof nn){var r=n.__data__;if(!Br||r.length<iw-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rn(r)}return n.set(e,t),this.size=n.size,this}function qt(e){var t=this.__data__=new nn(e);this.size=t.size}qt.prototype.clear=tw;qt.prototype.delete=nw;qt.prototype.get=rw;qt.prototype.has=ow;qt.prototype.set=sw;function lw(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function cw(){return[]}var aw=Object.prototype,uw=aw.propertyIsEnumerable,fa=Object.getOwnPropertySymbols,dw=fa?function(e){return e==null?[]:(e=Object(e),lw(fa(e),function(t){return uw.call(e,t)}))}:cw;function fw(e,t,n){var r=t(e);return st(e)?r:Z1(r,n(e))}function ha(e){return fw(e,yl,dw)}var Cs=Nn(Nt,"DataView"),Es=Nn(Nt,"Promise"),$s=Nn(Nt,"Set"),ga="[object Map]",hw="[object Object]",pa="[object Promise]",ma="[object Set]",va="[object WeakMap]",ya="[object DataView]",gw=Mn(Cs),pw=Mn(Br),mw=Mn(Es),vw=Mn($s),yw=Mn(_s),cn=dr;(Cs&&cn(new Cs(new ArrayBuffer(1)))!=ya||Br&&cn(new Br)!=ga||Es&&cn(Es.resolve())!=pa||$s&&cn(new $s)!=ma||_s&&cn(new _s)!=va)&&(cn=function(e){var t=dr(e),n=t==hw?e.constructor:void 0,r=n?Mn(n):"";if(r)switch(r){case gw:return ya;case pw:return ga;case mw:return pa;case vw:return ma;case yw:return va}return t});var ba=Nt.Uint8Array,bw="__lodash_hash_undefined__";function ww(e){return this.__data__.set(e,bw),this}function _w(e){return this.__data__.has(e)}function Bo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new rn;++t<n;)this.add(e[t])}Bo.prototype.add=Bo.prototype.push=ww;Bo.prototype.has=_w;function xw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Sw(e,t){return e.has(t)}var Cw=1,Ew=2;function pf(e,t,n,r,o,i){var s=n&Cw,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var a=i.get(e),u=i.get(t);if(a&&u)return a==t&&u==e;var d=-1,f=!0,h=n&Ew?new Bo:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var g=e[d],p=t[d];if(r)var _=s?r(p,g,d,t,e,i):r(g,p,d,e,t,i);if(_!==void 0){if(_)continue;f=!1;break}if(h){if(!xw(t,function(w,v){if(!Sw(h,v)&&(g===w||o(g,w,n,r,i)))return h.push(v)})){f=!1;break}}else if(!(g===p||o(g,p,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function $w(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Tw(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Pw=1,Ow=2,Aw="[object Boolean]",Iw="[object Date]",Dw="[object Error]",kw="[object Map]",Lw="[object Number]",Mw="[object RegExp]",Nw="[object Set]",Rw="[object String]",Fw="[object Symbol]",Kw="[object ArrayBuffer]",Bw="[object DataView]",wa=vn?vn.prototype:void 0,Ki=wa?wa.valueOf:void 0;function Vw(e,t,n,r,o,i,s){switch(n){case Bw:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Kw:return!(e.byteLength!=t.byteLength||!i(new ba(e),new ba(t)));case Aw:case Iw:case Lw:return lf(+e,+t);case Dw:return e.name==t.name&&e.message==t.message;case Mw:case Rw:return e==t+"";case kw:var l=$w;case Nw:var c=r&Pw;if(l||(l=Tw),e.size!=t.size&&!c)return!1;var a=s.get(e);if(a)return a==t;r|=Ow,s.set(e,t);var u=pf(l(e),l(t),r,o,i,s);return s.delete(e),u;case Fw:if(Ki)return Ki.call(e)==Ki.call(t)}return!1}var jw=1,Hw=Object.prototype,zw=Hw.hasOwnProperty;function Uw(e,t,n,r,o,i){var s=n&jw,l=ha(e),c=l.length,a=ha(t),u=a.length;if(c!=u&&!s)return!1;for(var d=c;d--;){var f=l[d];if(!(s?f in t:zw.call(t,f)))return!1}var h=i.get(e),g=i.get(t);if(h&&g)return h==t&&g==e;var p=!0;i.set(e,t),i.set(t,e);for(var _=s;++d<c;){f=l[d];var w=e[f],v=t[f];if(r)var y=s?r(v,w,f,t,e,i):r(w,v,f,e,t,i);if(!(y===void 0?w===v||o(w,v,n,r,i):y)){p=!1;break}_||(_=f=="constructor")}if(p&&!_){var b=e.constructor,S=t.constructor;b!=S&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof S=="function"&&S instanceof S)&&(p=!1)}return i.delete(e),i.delete(t),p}var qw=1,_a="[object Arguments]",xa="[object Array]",ao="[object Object]",Ww=Object.prototype,Sa=Ww.hasOwnProperty;function Gw(e,t,n,r,o,i){var s=st(e),l=st(t),c=s?xa:cn(e),a=l?xa:cn(t);c=c==_a?ao:c,a=a==_a?ao:a;var u=c==ao,d=a==ao,f=c==a;if(f&&xs(e)){if(!xs(t))return!1;s=!0,u=!1}if(f&&!u)return i||(i=new qt),s||hf(e)?pf(e,t,n,r,o,i):Vw(e,t,c,n,r,o,i);if(!(n&qw)){var h=u&&Sa.call(e,"__wrapped__"),g=d&&Sa.call(t,"__wrapped__");if(h||g){var p=h?e.value():e,_=g?t.value():t;return i||(i=new qt),o(p,_,n,r,i)}}return f?(i||(i=new qt),Uw(e,t,n,r,o,i)):!1}function xl(e,t,n,r,o){return e===t?!0:e==null||t==null||!or(e)&&!or(t)?e!==e&&t!==t:Gw(e,t,n,r,xl,o)}var Yw=1,Xw=2;function Zw(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var s=n[o];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=n[o];var l=s[0],c=e[l],a=s[1];if(s[2]){if(c===void 0&&!(l in e))return!1}else{var u=new qt,d;if(!(d===void 0?xl(a,c,Yw|Xw,r,u):d))return!1}}return!0}function mf(e){return e===e&&!Fr(e)}function Jw(e){for(var t=yl(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,mf(o)]}return t}function vf(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Qw(e){var t=Jw(e);return t.length==1&&t[0][2]?vf(t[0][0],t[0][1]):function(n){return n===e||Zw(n,e,t)}}function e_(e,t){return e!=null&&t in Object(e)}function t_(e,t,n){t=gf(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var s=vi(t[r]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&ml(o)&&of(s,o)&&(st(e)||af(e)))}function n_(e,t){return e!=null&&t_(e,t,e_)}var r_=1,o_=2;function i_(e,t){return bl(e)&&mf(t)?vf(vi(e),t):function(n){var r=X1(n,e);return r===void 0&&r===t?n_(n,e):xl(t,r,r_|o_)}}function s_(e){return function(t){return t?.[e]}}function l_(e){return function(t){return _l(t,e)}}function c_(e){return bl(e)?s_(vi(e)):l_(e)}function Sl(e){return typeof e=="function"?e:e==null?nf:typeof e=="object"?st(e)?i_(e[0],e[1]):Qw(e):c_(e)}function a_(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;){var s=e[o];t(r,s,n(s),e)}return r}function u_(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),l=s.length;l--;){var c=s[++o];if(n(i[c],c,i)===!1)break}return t}}var d_=u_();function yf(e,t){return e&&d_(e,t,yl)}function f_(e,t){return function(n,r){if(n==null)return n;if(!vl(n))return e(n,r);for(var o=n.length,i=-1,s=Object(n);++i<o&&r(s[i],i,s)!==!1;);return n}}var bf=f_(yf);function h_(e,t,n,r){return bf(e,function(o,i,s){t(r,o,n(o),s)}),r}function g_(e,t){return function(n,r){var o=st(n)?a_:h_,i={};return o(n,e,Sl(r),i)}}function p_(e,t){var n=-1,r=vl(e)?Array(e.length):[];return bf(e,function(o,i,s){r[++n]=t(o,i,s)}),r}var m_=ew("floor"),v_=Object.prototype,y_=v_.hasOwnProperty,b_=g_(function(e,t,n){y_.call(e,n)?e[n].push(t):sf(e,n,[t])});function w_(e,t){var n={};return t=Sl(t),yf(e,function(r,o,i){sf(n,o,t(r,o,i))}),n}function __(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function x_(e,t){if(e!==t){var n=e!==void 0,r=e===null,o=e===e,i=ir(e),s=t!==void 0,l=t===null,c=t===t,a=ir(t);if(!l&&!a&&!i&&e>t||i&&s&&c&&!l&&!a||r&&s&&c||!n&&c||!o)return 1;if(!r&&!i&&!a&&e<t||a&&n&&o&&!r&&!i||l&&n&&o||!s&&o||!c)return-1}return 0}function S_(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,s=o.length,l=n.length;++r<s;){var c=x_(o[r],i[r]);if(c){if(r>=l)return c;var a=n[r];return c*(a=="desc"?-1:1)}}return e.index-t.index}function C_(e,t,n){t.length?t=po(t,function(i){return st(i)?function(s){return _l(s,i.length===1?i[0]:i)}:i}):t=[nf];var r=-1;t=po(t,df(Sl));var o=p_(e,function(i,s,l){var c=po(t,function(a){return a(i)});return{criteria:c,index:++r,value:i}});return __(o,function(i,s){return S_(i,s,n)})}function E_(e,t,n,r){return e==null?[]:(st(t)||(t=t==null?[]:[t]),n=n,st(n)||(n=n==null?[]:[n]),C_(e,t,n))}function $_(e){const t={};let n=1;for(const o of e){const i=o.core.category,l=(t[i]||0)+o.core.selfSampleTimeMS;n+=o.core.selfSampleTimeMS,t[i]=l}const r={};for(const o in t){const i=t[o];r[o]={value:i,label:o,percent:m_(i/n*100,2)}}return E_(Object.values(r),["percent"],["desc"])}function T_(e){return`${Vt(e.total_tuples_scanned)} tuples scanned, ${Vt(e.total_tuples_joined)} tuples joined, ${Vt(e.total_tuples_sorted)} tuples sorted, ${e.subdomains_started} work units started, ${e.subdomains_finished} work units finished`}function P_(e){const t={subdomains_started:0,subdomains_finished:0,total_tuples_joined:0,total_tuples_scanned:0,total_tuples_sorted:0};return e.forEach(n=>{const r=n.core.latestProgress,o=n.core.desc;r&&o.type==="ComputeRelation"&&(t.subdomains_started+=r.subdomains_started,t.subdomains_finished+=r.subdomains_finished,t.total_tuples_joined+=r.total_tuples_joined,t.total_tuples_scanned+=r.total_tuples_scanned,t.total_tuples_sorted+=r.total_tuples_sorted)}),t}function O_(e){const t=P_(e);return T_(t)}const A_={name:"Root",description:"Root overlay configuration",items:{}},[I_,D_]=Zo(A_),wf=I_;function on(e,t,n,r){const o=e.split(".");D_(Un(i=>{let s=i,l=i.default_value;for(let c of o){let a=s?.items?.[c];a||(s.items||(s.items={}),a=s.items[c]={name:"",description:"",items:{}}),s=a,l||=s.default_value}s.name=t,s.description=n,s.default_value=r,r===void 0&&(r=l)})),r!==void 0&&El(e,r,void 0,!0)}function Vo(e,t=wf){if(e===void 0)return t;let n=t;for(const r of e.split("."))n=n?.items?.[r];return n}const k_="DEBUGGER_OVERLAY_CONFIG";function L_(e,t){if(t&&typeof t=="object"){const n={...t};return It in t&&(n.$$GROUP_PATH=t[It]),n}return t}function M_(e,t){return t&&typeof t=="object"&&"$$GROUP_PATH"in t&&(t[It]=t.$$GROUP_PATH,delete t.$$GROUP_PATH),t}const It=Symbol("GROUP_PATH");var Ve=(e=>(e.HIDDEN="hidden",e.DETAIL="detail",e))(Ve||{});const[N_,R_]=Ds(k_,{},L_,M_),Cl=N_;function gt(e,t=Cl){return()=>_f(e,t)}function _f(e,t=Cl){let n=t;for(let r of e.split("."))n=n?.[r];return typeof n=="object"?F_(n):n}function F_(e){let t=null;const n=Vo(e[It]);if(n?.items){for(let r in n.items){const o=_f(r,e);if(t===null)t=o;else{if(o===t)continue;return}}return t!==null?t:void 0}}function El(e,t,n=Cl,r=!1){R_(Un(o=>{let i;if(n[It]&&(o=Bi(o,n[It]?.split(".")),i=Vo(n[It])),i=Vo(e,i),!i)throw new Error("Attempted to set overlay which has no schema");const s=e.split("."),l=s.pop();if(o=Bi(o,s),!l)throw new Error("Attempted to set overlay with no path");let c=o[l];typeof c!="object"&&Object.keys(i.items||{}).length>0&&(c=Bi(o,[l])),typeof c=="object"?K_(c,t):(!r||o[l]===void 0)&&(o[l]=t)}))}function K_(e,t,n=!1){const r=Vo(e[It]);if(r?.items)for(let o in r.items)El(o,t,e,n)}function Bi(e,t){if(!t?.length)return e;for(const n of t){const r=e[n];r!==void 0&&typeof r=="object"?e=r:e=e[n]={[It]:B_(e,n)}}return e}function B_(e,t){const n=e[It];return n?`${n}.${t}`:t}on("internal","System internals","Features intended for internal diagnostic use.");on("internal.timings","Include internal timings","Show durations for internal spans.","hidden");on("internal.trace","Include trace links","Link internal transactions to their logs.","detail");on("internal.compilation","Compilation details","Details about the rule compilation process.","detail");on("internal.compilation.emit","Show emitted IR","Show the IR executed by the engine.");on("internal.compilation.passes","Show Compilation Passes","Show the intermediate IRs produced during compilation.","hidden");on("internal.profiling.optimized","Show optimized IR","Show the fully optimized IR right before execution.","hidden");on("internal.profiling.detailed_metrics","Show Detailed Metrics","Show more profiling metrics which might be situationally useful.","hidden");on("internal.program_span_id","Show Run ID","Show the span ID of the program.","hidden");function jt(e){const[t,n]=B(e,["children","class"]);return m(Ev,I(n,{get class(){return`ui-tabs ${t.class||""}`},get children(){return t.children}}))}jt.Trigger=function(t){const[n,r]=B(t,["children","class","tooltip"]);return m(Go,{get children(){return[m(Pt,{get when(){return n.tooltip},get children(){return m(ot,{get content(){return n.tooltip},get children(){return m(ot.Trigger,I({get as(){return Tc},get class(){return`ui-tabs-trigger ${n.class||""}`}},r,{get children(){return n.children}}))}})}}),m(Pt,{when:!0,get children(){return m(Tc,I({get class(){return`ui-tabs-trigger ${n.class||""}`}},r,{get children(){return n.children}}))}})]}})};jt.List=St("tabs","list",Cv);jt.Indicator=St("tabs","indicator",xv);jt.Content=St("tabs","content",_v);function V_(e){return ge({a:{viewBox:"0 0 512 512"},c:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128 192 384 96 288"/>'},e)}function j_(e){return ge({a:{viewBox:"0 0 512 512"},c:'<path d="m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34Z"/>'},e)}function H_(e){return ge({a:{viewBox:"0 0 512 512"},c:'<path d="M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448ZM255.66 384c-41.49 0-81.5-12.28-118.92-36.5-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58 2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1 204.8 204.8 0 0 1-51.16 6.47ZM490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83 2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1 192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37 34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16 310.72 310.72 0 0 1-64.12 72.73 2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13 343.49 343.49 0 0 0 68.64-78.48 32.2 32.2 0 0 0-.1-34.78Z"/><path d="M256 160a95.88 95.88 0 0 0-21.37 2.4 2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160ZM165.78 233.66a2 2 0 0 0-3.38 1 96 96 0 0 0 115 115 2 2 0 0 0 1-3.38Z"/>'},e)}function z_(e){return ge({a:{viewBox:"0 0 512 512"},c:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112Z"/><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M256 176A80 80 0 1 0 256 336 80 80 0 1 0 256 176z"/>'},e)}function U_(e){return ge({a:{viewBox:"0 0 512 512"},c:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112.91 128A191.85 191.85 0 0 0 64 254c-1.18 106.35 85.65 193.8 192 194 106.2.2 192-85.83 192-192 0-104.54-83.55-189.61-187.5-192a4.36 4.36 0 0 0-4.5 4.37V152"/><path d="m233.38 278.63-79-113a8.13 8.13 0 0 1 11.32-11.32l113 79a32.5 32.5 0 0 1-37.25 53.26 33.21 33.21 0 0 1-8.07-7.94Z"/>'},e)}function xf(e){return ge({a:{viewBox:"0 0 576 512"},c:'<path d="M0 80v48c0 17.7 14.3 32 32 32h64V80c0-26.5-21.5-48-48-48S0 53.5 0 80zm112-48c10 13.4 16 30 16 48v304c0 35.3 28.7 64 64 64s64-28.7 64-64v-5.3c0-32.4 26.3-58.7 58.7-58.7H480V128c0-53-43-96-96-96H112zm352 448c61.9 0 112-50.1 112-112 0-8.8-7.2-16-16-16H314.7c-14.7 0-26.7 11.9-26.7 26.7v5.3c0 53-43 96-96 96h272z"/>'},e)}const q_={"ui-radio-group":"_ui-radio-group_4gg4c_1"};function je(e){const[t,n]=B(e,["children","class"]);return m(wv,I(n,{get class(){return Ie(q_["ui-radio-group"],"ui-radio-group",t.class)},get children(){return t.children}}))}je.Label=St("radio-group","label",bv);je.Description=St("radio-group","description",du);je.ErrorMessage=St("radio-group","error-message",fu);je.Item=St("radio-group","item",fv);je.ItemInput=St("radio-group","item-input",mv);je.ItemControl=St("radio-group","item-control",hv);je.ItemIndicator=St("radio-group","item-indicator",gv);je.ItemLabel=St("radio-group","item-label",yv);function W_(e){const[t,n]=B(e,["children","class"]),r=Ie("iconic",t.class);return m(je.Item,I({class:r},n,{get children(){return[m(je.ItemInput,{}),m(je.ItemControl,{get children(){return m(je.ItemIndicator,{})}}),m(je.ItemLabel,{get children(){return m(Zs,{get content(){return e.label},get children(){return e.children}})}})]}}))}je.IconicItem=W_;const G_={"metric-grid":"_metric-grid_16g93_1"},sr={"wire-tree-item-node":"_wire-tree-item-node_p6iko_27","wire-tree-item-wire":"_wire-tree-item-wire_p6iko_140","wire-tree-item":"_wire-tree-item_p6iko_27","wire-tree-item-content":"_wire-tree-item-content_p6iko_250"};var Y_=()=>{},Ca=(e,t)=>t();function X_(e,t){const n=de(e),r=n?[n]:[],{onEnter:o=Ca,onExit:i=Ca}=t,[s,l]=K(t.appear?[]:r),[c]=uh();let a,u=!1;function d(g,p){if(!g)return p&&p();u=!0,i(g,()=>{Tt(()=>{u=!1,l(_=>_.filter(w=>w!==g)),p&&p()})})}function f(g){const p=a;if(!p)return g&&g();a=void 0,l(_=>[p,..._]),o(p,g??Y_)}const h=t.mode==="out-in"?g=>u||d(g,f):t.mode==="in-out"?g=>f(()=>d(g)):g=>{d(g),f()};return As(g=>{const p=e();return de(c)?(c(),g):(p!==g&&(a=p,Tt(()=>de(()=>h(g)))),p)},t.appear?void 0:n),s}function Z_(e){return N(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function Sf(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function J_(e,t,n,r){const{onBeforeEnter:o,onEnter:i,onAfterEnter:s}=t;o?.(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return r?.();i?.(n,()=>l())}),Sf(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!i||i.length<2)&&(n.addEventListener("transitionend",l),n.addEventListener("animationend",l))});function l(c){(!c||c.target===n)&&(r?.(),n.removeEventListener("transitionend",l),n.removeEventListener("animationend",l),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),s?.(n))}}function Q_(e,t,n,r){const{onBeforeExit:o,onExit:i,onAfterExit:s}=t;if(!n.parentNode)return r?.();o?.(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),i?.(n,()=>l()),Sf(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!i||i.length<2)&&(n.addEventListener("transitionend",l),n.addEventListener("animationend",l))});function l(c){(!c||c.target===n)&&(r?.(),n.removeEventListener("transitionend",l),n.removeEventListener("animationend",l),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),s?.(n))}}var e2={inout:"in-out",outin:"out-in"},t2=e=>{const t=Z_(e);return X_(vg(()=>e.children),{mode:e2[e.mode],appear:e.appear,onEnter(n,r){J_(t(),e,n,r)},onExit(n,r){Q_(t(),e,n,r)}})},n2=F("<div class=ui-collapsible-inner>"),r2=F("<div>");const Cf=Ne();function o2(){const e=Te(Cf);if(e===void 0)throw new Error("`useCollapsibleContext` must be used within a `Collapsible` component");return e}function i2(e){let[t,n]=B(e,["class","children"]);return m(Fp,I({as:ht,get class(){return`ui-collapsible-trigger ${t.class??""}`}},n,{get children(){return t.children}}))}function s2(){return m(Ju,{class:"ui-collapsible-trigger-icon"})}function l2(e){let[t,n]=B(e,["class","children","appear"]);const r=o2(),o=async(i,s)=>{try{await Zu(i.parentElement)}catch{}s()};return(()=>{var i=r2();return vt(i,I({get class(){return`ui-collapsible-content ${t.class??""}`}},n),!1,!0),P(i,m(t2,{name:"collapse",get appear(){return t.appear},onExit:o,get children(){return m(X,{get when(){return r.open()},get children(){var s=n2();return P(s,()=>t.children),s}})}})),i})()}function Wt(e){let[t,n]=B(e,["class","side","children","open","onOpenChange"]);const[r,o]=K(e.defaultOpen??!1),i=()=>t.open??r(),s=c=>(t.onOpenChange?.(c),o(c)),l={open:i};return m(Mp,I(n,{get open(){return i()},onOpenChange:s,get class(){return`ui-collapsible ${t.side} ${t.class??""}`},get children(){return m(Cf.Provider,{value:l,get children(){return t.children}})}}))}Wt.Trigger=i2;Wt.TriggerIcon=s2;Wt.Content=l2;const Ef={};var c2=F("<div>");function a2(e){const[t,n]=B(e,["children","class","style"]),r=Te(jo),o=()=>r?.depth??0;return(()=>{var i=c2();return vt(i,I({get class(){return Ie(Ef["tree-item"],"tree-item leaf tree-item-content",t.class)},get"data-depth"(){return o()},get style(){return{...t.style??{},"--tree-item-depth":o()}}},n),!1,!0),P(i,()=>t.children),i})()}function $f(e){const[t,n]=B(e,["children","class"]);return m(Wt.Trigger,I({as:"header",get class(){return Ie("tree-branch-header tree-item-content",t.class)}},n,{get children(){return t.children}}))}function Tf(e){const[t,n]=B(e,["class","children"]),r=Te(jo),o=()=>r?.depth??0;return m(Wt.Content,I({get class(){return Ie("tree-branch-children",t.class)},get appear(){return o()===0}},n,{get children(){return m(jo.Provider,{get value(){return{depth:o()+1}},get children(){return t.children}})}}))}function $l(e){const[t,n]=B(e,["children","class","style"]),r=Te(jo),o=()=>r?.depth??0;return m(Wt,I({side:"top",get class(){return Ie(Ef["tree-item"],"tree-item branch",t.class)},get"data-depth"(){return o()},get style(){return{...t.style??{},"--tree-item-depth":o()}}},n,{get children(){return t.children}}))}$l.Header=$f;$l.Children=Tf;const jo=Ne();var Vi=F("<div class=node>"),u2=F("<div class=active-overlay><div class=reflection-wrapper><div class=reflection></div></div><div class=spinner>"),d2=F("<div><div class=multi></div><div class=node>"),f2=F("<div><svg preserveAspectRatio=none class=wire-tree-item-wire-inner><path>"),Pf=F("<div>");function h2(e){const t=()=>e.multi||0,n=()=>e.radius||12;return(()=>{var r=d2(),o=r.firstChild;return o.nextSibling,P(o,m(X,{get when(){return t()>1},get children(){return Vi()}}),null),P(o,m(X,{get when(){return t()>2},get children(){return Vi()}}),null),P(o,m(X,{get when(){return t()>3},get children(){return Vi()}}),null),P(r,m(X,{get when(){return e.active},get children(){return u2()}}),null),pe(i=>{var s=Ie(sr["wire-tree-item-node"],"wire-tree-item-node",e.active?"active":""),l=`--base-radius: ${n()}px`;return s!==i.e&&en(r,i.e=s),i.t=Xo(r,l,i.t),i},{e:void 0,t:void 0}),r})()}function Of(e){let t,n;const[o,i]=K(200);function s(d,f){if(!f.pseudoElement.endsWith(":after"))return;const h=d.find(p=>p instanceof CSSTransition&&p.transitionProperty==="margin-left"),g=h?.effect;if(h&&g instanceof KeyframeEffect){const p=g.getKeyframes(),w=p[p.length-1].marginLeft,v=parseFloat(w);i(200+(isNaN(v)?0:v))}}const[l,c]=K(0);function a(d,f){const h=d.find(p=>!(!(p instanceof CSSTransition)||p.transitionProperty!=="flex-basis"||!(p.effect instanceof KeyframeEffect)||p.effect.pseudoElement)),g=h?.effect;if(h&&g instanceof KeyframeEffect){const p=g.getKeyframes(),w=p[p.length-1].flexBasis;w!==void 0&&c(parseFloat(w))}}function u(d){const f=t.getAnimations({subtree:!0});Tt(()=>{s(f,d),a(f)})}return An(()=>{const d=window.getComputedStyle(t,"::after");if(+d.getPropertyValue("flex-grow")!=1)return;const h=d.getPropertyValue("margin-left"),g=parseFloat(h);isNaN(g)||(i(200+g),c(40))}),(()=>{var d=f2(),f=d.firstChild,h=f.firstChild;d.addEventListener("transitionrun",u);var g=t;typeof g=="function"?Tn(g,d):t=d;var p=n;return typeof p=="function"?Tn(p,h):n=h,pe(_=>{var w=Ie(sr["wire-tree-item-wire"],"wire-tree-item-wire"),v=`M 200 0 ${o()} ${l()}`;return w!==_.e&&en(d,_.e=w),v!==_.t&&Gt(h,"d",_.t=v),_},{e:void 0,t:void 0}),d})()}function g2(e){const[t,n]=B(e,["children","class"]);return(()=>{var r=Pf();return vt(r,I({get class(){return Ie("wire-tree-item-before",t.class)}},n),!1,!0),P(r,()=>t.children),r})()}function p2(e){const[t,n]=B(e,["children","class"]);return m(a2,I({get class(){return Ie(sr["wire-tree-item"],sr["wire-tree-item-content"],t.class)}},n,{get children(){return[N(()=>t.children),m(Of,{})]}}))}function m2(e){const[t,n]=B(e,["children","class"]);return(()=>{var r=Pf();return vt(r,I({get class(){return Ie("wire-tree-item-after",t.class)}},n),!1,!0),P(r,()=>t.children),r})()}function v2(e){const[t,n]=B(e,["children","class"]);return m($f,I({get class(){return Ie(sr["wire-tree-item-content"],t.class)}},n,{get children(){return[N(()=>t.children),m(Of,{})]}}))}function y2(e){const[t,n]=B(e,["children","class"]);return m(Tf,I({get class(){return t.class}},n,{get children(){return t.children}}))}function yi(e){const[t,n]=B(e,["children","class"]);return m($l,I({get class(){return Ie(sr["wire-tree-item"],t.class)}},n,{get children(){return t.children}}))}yi.Header=v2;yi.Children=y2;function Ke(e){return m(yi,e)}Ke.Branch=yi;Ke.Leaf=p2;Ke.Before=g2;Ke.Node=h2;Ke.After=m2;function b2(e,t=Math){for(let n=e.length-1;n>0;n--){const r=Math.floor(t.random()*(n+1));[e[n],e[r]]=[e[r],e[n]]}return e}class w2{m=2**35-31;a=185852;c=1;state;constructor(t){this.state=t%this.m}next(){return this.state=(this.a*this.state+this.c)%this.m,this.state/this.m}random(){return this.next()}next_int(t,n){return Math.floor(this.next()*(n-t+1))+t}}const Af={"block-node":"_block-node_14gss_4"};function $r(e,...t){let n=e;for(const r of t)n[r]||(n[r]={}),n=n[r];return n}class Tr extends Error{message;event;constructor(t,n){super(t),this.message=t,this.event=n}toString(){return`${this.message} ${this.event?", event: "+JSON.stringify(this.event):""}`}}function _2(e){switch(e){case"InferTypes":case"Optimize":case"Outline":case"Simplify":case"Compile":return"Compile";case"DemandRelation":case"ComputeSCC":case"ComputeRelation":case"EvaluateSubdomain":case"ComputeDependencies":return"Evaluate";case"LoadCSV":case"DataLoad":case"HandleUpdates":case"Update Base Relations":return"Data Load";default:return"Other"}}function x2(e,t,n){const r=e[n];if(!r)throw new Tr(`Node ${n} is missing for profiler.FinishNode event`);r.core.finishedAt=t}function S2(e,t){const{node_id:n,progress:r}=t.event,o=e[n];if(!o)throw new Tr(`Node ${n} is missing for ${t.type} event`);o.core.latestProgress=r}function C2(e){return new Date(Date.parse(e))}const E2="0";function $2(e,t,n,r){const{type:o,timestamp:i,event:s}=r,l=C2(i);let c=null;switch(o){case"profiler.Sample":{for(const a in s.new_nodes){const u=s.new_nodes[a],d={core:{id:a,desc:u.desc.type==="Root"?{type:"Transaction"}:u.desc,category:T2(n,u.desc.type),latestProgress:null,startedAt:l,finishedAt:null,totalSampleTimeMS:0,selfSampleTimeMS:0,path:[]},parent:null,children:[]};e[a]=d,a===E2&&(c=d)}for(const a in s.new_nodes){const u=s.new_nodes[a],d=u.parent_id!==null?e[u.parent_id.toString()]:null;if(!d)continue;const f=e[a];if(!f)throw new Tr(`child ${a} not found; should have just been inserted`);d.children.push(f),f.parent=d}for(const a of s.active_leaves){let u=e[a.node_id.toString()]||null;if(u===null)throw new Tr(`node not found for sample event: ${a.node_id}`);u.core.selfSampleTimeMS+=s.period_ms;let d=0;for(;u!==null;)if(u.core.totalSampleTimeMS+=s.period_ms,u=u.parent,d++,d>100)throw new Tr("looping")}for(const a in s.latest_progress){const u=e[a];u&&(u.core.latestProgress=s.latest_progress[a])}break}case"profiler.UpdateNodeProgress":{S2(e,r);break}case"profiler.FinishNode":{if(s.node_id===0&&Object.keys(e).length===0)return console.warn("hit special case to mitigate RAI-20443"),c;const a=e[s.node_id.toString()];a&&(a.core.latestProgress=s.final_progress),x2(e,l,s.node_id.toString());break}case"profiler.VisibilityLevelMap":{for(const a in s.map){const u=s.map[a];a!==void 0&&u!==void 0&&(t[a]=u)}break}case"profiler.CategoryMap":for(const a in s.map){const u=s.map[a];a!==void 0&&u!==void 0&&(n[a]=u)}default:console.warn(`Unhandled event type of "${o}" in events to profile conversion`,{type:o,timestamp:i,event:s})}return c}function T2(e,t){return e[t]?e[t]:_2(t)}const P2="cross_product_plan",[If]=ks("profile",{},(e,t)=>{if(!ue.is_profile_events(t))return;const n=Tl(t),r=B2(t),o=t.txn_id;if(!n)return;const i=$r(e,n,o);i.nodes||(i.nodes={}),i.category_map||(i.category_map={}),i.visibility_map||(i.visibility_map={});let s=[];for(const l of t.profile_events)if($2(i.nodes,i.visibility_map,i.category_map,l),l.type==="profiler.Sample")for(const c in l.event.new_nodes){const a=l.event.new_nodes[c];if(a.desc.type!=="ComputeRelation")continue;const u=I2(n,a.desc,r);if(!u)continue;$r(i,"nodes",c).core.desc=a.desc;let d=a.desc.optimized_rel;d!==void 0&&s.push(d);const f=$r(i,"tasks",u.task_id);f[u.py_line]??=[],f[u.py_line].push(c)}i.optimized_rel=Array.from(new Set(s))});function O2(e){return e.core.latestProgress===null||e.core.desc.type!=="ComputeRelation"?Ho:{...e.core.latestProgress,elapsed:e.core.totalSampleTimeMS,done:e.core.finishedAt!==null,childNodes:[e],warnings:new Set(Object.keys(e.core.desc.attributes||{}))}}const[A2]=ks("source_map",{},(e,t)=>{if(!ue.has_source_map(t))return;const n=Tl(t);if(n){for(const r in t.source_map)$r(e,n)[r]=t.source_map[r];R2(t.code,t.source_map)}});function I2(e,t,n){let r=t.relation.location?.file;if(r===void 0)return console.warn("No file for node",t);if(r==="")if(n!==void 0)r=`query${n}`;else return console.warn("No file for node",t);const o=A2[e],i=D2(o,r,t.relation.location?.line);return i||console.warn("No python source for node",t)}function D2(e,t,n){const r=e?.[t];if(!r)return console.warn(`No source map for ${t}:${n}`);for(const o of r)if(o.rel_end_line>=n)return o}const[k2,jS,HS,L2]=ks("block_location",{},(e,t)=>{if(!ue.is_compilation(t))return;const n=Tl(t);if(!n)return;const r=t.source.task_id;if(!r){N2(t);return}n&&r!==void 0&&($r(e,n)[r]=t)});function M2(e,t){return k2[e]?.[t]??null}const mo=new Set;function N2(e){mo.add(e)}function R2(e,t){if(e&&mo.size)for(const n in t){const r=t[n];for(let o of mo){const i=o.emitted,s=e.indexOf(i);if(s===-1)continue;const l=Rv(e,s);for(let c of r)c.rel_end_line>l&&(o.source.task_id=c.task_id,mo.delete(o),L2(o))}}}function F2(e,t){const n={},r=If[e]?.[t];if(!r)return[];const{tasks:o={},nodes:i={}}=r;for(const s of Object.keys(o))for(const l in o[s]){const c=o[s][l],a=M2(e,s);if(!a)continue;let u;for(let d of c){const f=i[d],h=O2(f);u=u?V2(u,h):h}u&&(n[s]=K2(e,t,s,{block:a,stats:u}))}return Object.values(n)}const Ea={};function K2(e,t,n,r){const o=`${e}-${t}-${n}`,i=Ea[o];return i?(i.block=r.block,i.stats=r.stats,i):(Ea[o]=r,r)}function Tl(e){if(e.event==="span_start"&&e.span.type==="program")return e.span.id;let t=e.parent;for(;t&&t.span_type!=="program";)t=t.parent;return t?.id}function B2(e){if(e.event==="span_start"&&e.span.type==="query")return e?.span?.task_id;let t=e.parent;for(;t&&t.span_type!=="query";)t=t.parent;return t?.task_id}const Ho={total_tuples_joined:0,subdomains_finished:0,subdomains_started:0,total_tuples_scanned:0,total_tuples_sorted:0,elapsed:0,childNodes:[],warnings:new Set};function V2(e,t){return e=e||Ho,t=t||Ho,{total_tuples_joined:e.total_tuples_joined+t.total_tuples_joined,subdomains_finished:e.subdomains_finished+t.subdomains_finished,subdomains_started:e.subdomains_started+t.subdomains_started,total_tuples_scanned:e.total_tuples_scanned+t.total_tuples_scanned,total_tuples_sorted:e.total_tuples_sorted+t.total_tuples_sorted,elapsed:(e.elapsed??0)+(t.elapsed??0),done:e.done&&t.done,childNodes:[...e.childNodes,...t.childNodes],warnings:new Set([...e.warnings,...t.warnings])}}var j2=F("<div>"),H2=F("<h3>Cloned rule (<!> instances)"),z2=F("<div class=event-after>"),U2=F("<div class=featured-metrics><div class=max-tuples> </div><div><span class=work-units> work units started, <!> finished</span> ");function Df(e){const t=()=>e.block instanceof ft?e.block.rule():e.block,n=()=>un(t(),ue.is_compilation),r=()=>Mf(n()),o=()=>{const i=r(),s=n()?.source.block;if(s)return i?`# ${i}
206
+ ${s}`:s};return(()=>{var i=j2();return P(i,m(Ko,{lang:"python",get class(){return e.codeClass},get controls(){return e.controls},get scroll(){return e.scroll},get children(){return o()}}),null),P(i,()=>e.children,null),pe(()=>en(i,Ie(Af.block,"block",e.class))),i})()}function kf(e){const[t,n,r]=B(e,["nodes","class"],["before","unselectable","active"]),o=()=>e.block instanceof ft?e.block:void 0,i=()=>e.block instanceof ft?e.block.rule():e.block,s=()=>un(i(),ue.is_compilation),l=()=>e.block instanceof ft?e.block.instances.map(u=>u.events).filter(u=>u).flat():e.block.events,c=()=>l().filter(u=>!oe.is_transaction(u)&&!oe.is_job(u)),a=()=>m(xe,{get each(){return c()},children:u=>m(Jt,{event:u})});return m(X,{get when(){return s()?.source?.block},get children(){return m(sn,I({get event(){return i()},get nodes(){return t.nodes||a()}},n,{get class(){return Ie(Af["block-node"],"block-node",t.class)},get children(){var u=z2();return P(u,m(X,{get when(){return o()},get children(){var d=H2(),f=d.firstChild,h=f.nextSibling;return h.nextSibling,P(d,()=>o().instances.length,h),d}}),null),P(u,m(Df,I({get codeClass(){return e.codeClass??"dense borderless"}},r)),null),u}}))}})}function Lf(e){const t=Te(Jn),n=()=>m(Ff,{get item(){return e.item},get metric(){return e.metric}}),r=()=>(e.block instanceof ft?e.block.rule():e.block)?.parent;return m(kf,{class:"block-inspector",get block(){return e.block},unselectable:!0,codeClass:"",get before(){return n()},nodes:[],get controls(){return[m(ht,{class:"icon",tooltip:"jump to definition",onclick:()=>Cx(t,r()),get children(){return m(ty,{})}})]},get children(){return[N(()=>e.children),m(X,{get when(){return e.metrics.length>1},get children(){return m(nx,{get item(){return e.item},get metrics(){return e.metrics}})}})]}})}function q2(e){const t=()=>Math.max(e.stats.total_tuples_joined,e.stats.total_tuples_sorted,e.stats.total_tuples_scanned,0),[n,r]=K([]);return V(()=>{const o=new w2(e.block.source.line);if(de(()=>n()).length>=e.stats.subdomains_started)return;const s=[];for(let l=0;l<e.stats.subdomains_started;l+=1)s.push(l);r(b2(s,o))}),(()=>{var o=U2(),i=o.firstChild,s=i.firstChild,l=i.nextSibling,c=l.firstChild,a=c.firstChild,u=a.nextSibling;return u.nextSibling,c.nextSibling,o.$$click=d=>d.stopPropagation(),P(i,()=>zd(t()),s),P(i,()=>xb("tuple",t()),null),P(c,()=>e.stats.subdomains_started,a),P(c,()=>e.stats.subdomains_finished,u),P(l,m(X,{get when(){return e.stats.warnings.has(P2)},get children(){return m(ot,{content:"Rule contains variables which are not related to each other, computing all possible combinations.",get children(){return m(ot.Trigger,{as:"span",children:"⚠️ Cross Product"})}})}}),null),o})()}class ft{constructor(t){this.instances=t}rule(){const t=this.instances[0];if(oe.is_rule(t))return t}}function Mf(e){if(!e)return;const t=e.source?.file,n=e.source?.line;if(!(t===void 0||n===void 0))return`${t}:${n}`}function Nf(e){const t=[],n={};for(let r of e){const o=t.push(r)-1,i=un(r,ue.is_compilation);if(!i)continue;const s=Mf(i);if(!s)continue;const l=n[s];if(l!==void 0){const c=t[l];c instanceof ft?c.instances.push(r):t[l]=new ft([c,r]),t.pop()}else n[s]=o}return t}Yo(["click"]);var W2=F("<div class=suffix>"),G2=F('<div class="metric value">'),Rf=F("<div>"),Y2=F("<div><br>"),X2=F("<div class=metric-grid-row>"),Z2=F("<div class=metric-selector>"),J2=F("<div class=wire-tree-item-node>");const Q2=-1,ex=1,Pl=null;function tx(e,t){if(t.compare===Pl)return e;let n;return t.compare===ex||t.compare===void 0?n=(r,o)=>{const i=t.get(r),s=t.get(o);return typeof i=="number"&&typeof s=="number"?s-i:(""+s).localeCompare(""+i)}:t.compare===Q2?n=(r,o)=>{const i=t.get(r),s=t.get(o);return typeof i=="number"&&typeof s=="number"?i-s:(""+i).localeCompare(""+s)}:n=t.compare,e.toSorted(n)}function Ff(e){const t=()=>e.metric.get(e.item),n=()=>{const r=t();return e.metric.fmt?e.metric.fmt(r):r===void 0?"":""+r};return(()=>{var r=G2();return P(r,n,null),P(r,m(X,{get when(){return!e.unsuffixed},get children(){var o=W2();return P(o,()=>e.metric.suffix),o}}),null),r})()}function nx(e){return(()=>{var t=Rf();return P(t,m(xe,{get each(){return e.metrics},children:n=>{const r=n.detail?(()=>{var o=Y2(),i=o.firstChild;return P(o,()=>n.label,i),P(o,()=>n.detail,null),o})():n.label;return m(X,{get when(){return N(()=>!n.hidden)()&&n.get(e.item)!==void 0},get children(){var o=X2();return P(o,m(Zs,{content:r,get children(){return m(wt,{get component(){return n.icon}})}}),null),P(o,m(Ff,{get item(){return e.item},metric:n,unsuffixed:!0}),null),o}})}})),pe(()=>en(t,Ie("metric-grid",G_["metric-grid"]))),t})()}const vo=[{label:"Time Active",detail:"May be higher than elapsed time due to parallelism",icon:U_,get:e=>e.stats.elapsed,fmt:pl},{label:"Compile Size",icon:xf,get:e=>e.block.emitted.length,fmt:Ud},{label:"Max Tuples",icon:Yv,get:({stats:e})=>Math.max(e.total_tuples_scanned,e.total_tuples_sorted,e.total_tuples_joined),fmt:Vt,suffix:"tuples"},{label:"Tuples Read",icon:Gv,get:e=>e.stats.total_tuples_scanned,fmt:Vt,suffix:"tuples"},{label:"Tuples Sorted",icon:qv,get:e=>e.stats.total_tuples_sorted,fmt:Vt,suffix:"tuples"},{label:"Tuples Joined",icon:Wv,get:e=>e.stats.total_tuples_joined,fmt:Vt,suffix:"tuples"},{label:"Work Units",icon:Zv,get:e=>e.stats.subdomains_started,fmt:Vt,suffix:"work units"},{label:"Concurrency",icon:Hv,get:e=>e.stats.total_tuples_scanned/e.stats.subdomains_started,fmt:Vt,suffix:"tuples / work unit"},{label:"Source Order",icon:td,compare:({block:{source:e}},{block:{source:t}})=>e.file!==t.file?e.file<t.file?-1:1:e.line===t.line?0:e.line<t.line?-1:1,get:e=>`${e.block.source.file}:${e.block.source.line}`},{label:"Execution Order",icon:Qu,compare:Pl,get:()=>{},hidden:!0}],rx=[vo[0],vo[1],{...vo[2],label:"Tuples"}],Kf=[{label:"Compile Size",icon:xf,get(e){if(e instanceof ft){let t=0;for(let n of e.instances)t+=this.get(n)??0;return t}return un(e,ue.is_compilation)?.emitted?.length},fmt:Ud},{label:"Source Order",icon:td,compare:(e,t)=>{const n=un(e instanceof ft?e.rule():e,ue.is_compilation)?.source,r=un(t instanceof ft?t.rule():t,ue.is_compilation)?.source;return r?n?n.file!==r.file?n.file<r.file?-1:1:n.line===r.line?0:n.line<r.line?-1:1:1:-1},get:e=>{const t=un(e instanceof ft?e.rule():e,ue.is_compilation)?.source;return t?`${t.file}:${t.line}`:"Unknown"}},{label:"Execution Order",icon:Qu,compare:Pl,get:()=>{},hidden:!0}],ox=[Kf[0]];function ix(e){const t=()=>e.metrics.indexOf(e.value);return(()=>{var n=Z2();return P(n,m(je,{get value(){return""+t()},onChange:r=>e.onChange(e.metrics[+r]),orientation:"horizontal",get children(){return m(xe,{get each(){return e.metrics},children:(r,o)=>m(je.IconicItem,{get label(){return r.label},get value(){return""+o()},get children(){return m(wt,{get component(){return r.icon}})}})})}})),n})()}function Bf(e){const[t,n]=B(e,["items","metrics","force","class","children"]),[r,o]=K(t.metrics[0]),i=()=>tx(t.items,r());return(()=>{var s=Rf();return vt(s,I({get class(){return Ie("metric-sorter",t.class)}},n),!1,!0),P(s,m(X,{get when(){return t.metrics.length>1},get children(){return m(Ke.Leaf,{class:"metric-sorter-controls",get children(){return[(()=>{var l=J2();return P(l,m(ix,{get metrics(){return t.metrics},get value(){return r()},onChange:o})),l})(),m(Ke.After,{children:" "})]}})}}),null),P(s,m(xe,{get each(){return i()},children:(l,c)=>t.children(l,c,r)}),null),s})()}function $a(e){let t=e.map(s=>s.core.desc);function n(s){return s.optimized_rel!==void 0}return t.filter(n).map(s=>s.optimized_rel).join(`
207
+ `)}var sx=F("<div>"),lx=F("<div class=event-time>"),Vf=F("<div class=event-duration>"),cx=F("<span class=subtle>"),ax=F("<span class=event-after><span class=event-detail><span class=event-label></span><span class=sep>/"),Ts=F("<div class=event-after>"),bi=F("<div class=event-after><span class=event-detail>"),ux=F("<div class=event-after><span class=event-detail>Get graph index for "),dx=F("<div class=event-after><div class=event-detail> of <!> shown"),fx=F("<div class=describe-optimization-container>"),hx=F("<div class=event-after><div>installing new rules</div><div class=event-detail>"),gx=F("<p class=transaction-profile-node-progress>"),px=F("<div class=profiler-time-spent>"),mx=F("<div class=transaction-info><span class=transaction-id><label>Transaction</label> <span class=subtle></span></span><span class=transaction-profile-wrapper>"),vx=F("<span class=category><label></label><span class=value>%"),yx=F("<div class=transaction-info><span class=transaction-id><label>Job</label> <span class=subtle>"),bx=F("<span class=value>"),wx=F("<span class=unit>");function jf(e){if(oe.is_span(e)){if(e.elapsed)return()=>e.elapsed;{const[t]=Db(e.start_time,100);return()=>e.elapsed??-t()}}return()=>{}}const Ol=Ne();function _x(e){const t={shown:[0],should_show_timestamp:n=>{const r=t.shown,o=r[r.length-1];if(o>=n)return r.includes(n);let i=new Date(o),s=new Date(n);return i.getMinutes()!==s.getMinutes()||i.getHours()!==s.getHours()||i.getDate()!==s.getDate()}};return m(Ol.Provider,{value:t,get children(){return e.children}})}function xx(e){const t=()=>!!Te(Ol);return m(X,{get when(){return!t()},get fallback(){return e.children},get children(){return m(_x,{get initial(){return e.initial},get children(){return e.children}})}})}function Sx(e){const t=Te(Ol);return t?t.should_show_timestamp(e)?(t.shown.push(e),!0):!1:(console.error("check_time_visible must be used within a TimeProvider"),!0)}function Hf(e){let t=e;const n=[];for(;t;)n.push(t),t=t.parent;return n.reverse()}globalThis.all_ancestors=Hf;function un(e,t){if(e===void 0||t(e))return e;if(oe.is_span(e))for(const n of e.events){const r=un(n,t);if(r)return r}}function zf(e,t){let n=e;for(;n;){if(n===void 0||t(n))return n;n=n.parent}}function Cx(e,t){if(!t)return;e.select(...Hf(t));function n(){const r=t;for(;r?.selection_path;){const o=document.querySelector(`[data-sel="${r.selection_path.join(".")}"]`);if(o){o.scrollIntoView();break}}}setTimeout(n,100),setTimeout(n,600)}function Ex(e){return(()=>{var t=sx();return P(t,m(xx,{get children(){return m(xe,{get each(){return e.events},children:n=>m(Jt,{event:n,get depth(){return e.depth??0}})})}})),pe(()=>en(t,`event-list ${e.depth?"sub":""}`)),t})()}function Jt(e){const t=()=>{const n=e.event;if(oe.is_program(n))return Tx;if(oe.is_block(n))return Px;if(oe.is_rule_batch(n))return Ox;if(oe.is_span(n)&&n.span_type==="create_database")return Ax;if(oe.is_span(n)&&n.span_type==="transaction")return Lx;if(oe.is_span(n)&&n.span_type==="job")return Mx;if(oe.is_span(n)&&n.span_type==="install_batch")return Nx;if(ue.is_error(n)||ue.is_warn(n))return Dx;if(ue.is_time(n)&&n.type==="query")return kx;if(ue.is_compilation(n))return Rx;if(oe.is_span(n))return $x};return m(wt,{get component(){return t()},get event(){return e.event},get depth(){return e.depth}})}function $x(e){const t=gt("internal.timings");return[m(X,{get when(){return t()!==Ve.HIDDEN},get children(){return m(sn,{get event(){return e.event},get depth(){return e.depth},nodes:[],get children(){return e.event.span_type}})}}),m(xe,{get each(){return e.event.events},children:n=>m(Jt,{event:n,get depth(){return e.depth}})})]}function Uf(e){let t=!!e.time&&(Sx(e.time.getTime())||e.force)||!1;return(()=>{var n=lx();return(t?void 0:"none")!=null?n.style.setProperty("display",t?void 0:"none"):n.style.removeProperty("display"),P(n,()=>Cb(e.time)),n})()}function sn(e){const t=Te(Jn),n=()=>!e.unselectable&&t.is_selected(e.event),r=()=>e.active??!e.event.end_time,o=jf(e.event),i=()=>e.radius??12,[s,l]=K(n()||e.open),c=_=>{e.unselectable||t?.toggle(e.event,_),l(_)};V(()=>l(e.open)),V(()=>{if(e.unselectable)return;let _=n();de(()=>s())!==_&&de(()=>t.selected().length)&&l(_)});const a=()=>e.nodes??m(xe,{get each(){return e.event.events},children:_=>m(Jt,{event:_,get depth(){return(e.depth??0)+1}})}),u=N(()=>Zd(e.event)),d=()=>u().some(_=>ue.is_error(_)),f=()=>u().some(_=>ue.is_warn(_)),h=()=>d()&&f(),g=()=>Ie("event-list-item",e.event.event,e.event.span_type,e.class,{running:r(),selected:n(),"has-error-descendant":d()||h(),"has-warn-descendant":f()&&!h()}),p=()=>({"--node-height":`${2*i()}px`,"--depth":e.depth});return[m(Ke,{get open(){return s()},onOpenChange:c,get class(){return g()},get style(){return p()},get"data-sel"(){return e.event.selection_path.join(".")},get children(){return[m(Ke.Branch.Header,{class:"event-list-item-content",get children(){return[m(Ke.Before,{get children(){return m(X,{get when(){return!e.before},get fallback(){return e.before},get children(){return[m(Uf,{get time(){return de(()=>e.event.start_time)}}),(()=>{var _=Vf();return P(_,()=>pl(o())),_})()]}})}}),m(Ke.Node,{get radius(){return i()},get active(){return r()},get multi(){return e.multi}}),m(Ke.After,{get children(){return e.children}})]}}),m(Ke.Branch.Children,{get children(){return a()}})]}}),m(X,{get when(){return e.nodes!==void 0},get children(){return m(xe,{get each(){return u()},children:_=>m(Jt,{event:_})})}})]}function Tx(e){const t=()=>e.event.events.filter(oe.is_rule_batch).reduce((o,i)=>o+i.events.filter(oe.is_rule).filter(s=>s.name!=="pyrel_base").length,0),n=()=>e.event.events.filter(oe.is_query).length,r=gt("internal.program_span_id");return m(sn,I(e,{radius:18,get children(){var o=ax(),i=o.firstChild,s=i.firstChild,l=s.nextSibling;return P(s,()=>e.event.main),P(i,m(Ps,{get value(){return t()},unit:"rule"}),l),P(i,m(Ps,{get value(){return n()},unit:"query"}),null),P(i,m(X,{get when(){return r()!==Ve.HIDDEN},get children(){var c=cx();return P(c,()=>e.event.id),c}}),null),o}}))}function Px(e){if(e.event.name==="pyrel_base")return;const t=()=>e.event.events.find(ue.is_compilation);return m(X,{get when(){return t()?.source?.block},get children(){return m(sn,I(e,{class:"block",get children(){var n=Ts();return P(n,m(Df,{get block(){return e.event},codeClass:"dense borderless",scroll:!0})),n}}))}})}function Ox(e){const t=()=>e.event.events.filter(oe.is_rule).filter(o=>o.name!=="pyrel_base").length,n=()=>Nf(e.event.events),r=()=>m(xe,{get each(){return n()},children:o=>m(X,{get when(){return o instanceof ft||oe.is_block(o)},get fallback(){return m(Jt,{event:o,get depth(){return(e.depth??0)+1}})},get children(){return m(kf,{block:o,scroll:!0})}})});return m(sn,I(e,{get multi(){return t()},get nodes(){return r()},get children(){var o=bi(),i=o.firstChild;return P(i,m(Ps,{get value(){return t()},unit:"rule"})),o}}))}function Ax(e){return m(sn,I(e,{get children(){var t=ux(),n=t.firstChild;return n.firstChild,P(n,()=>e.event.source,null),t}}))}function zo(e){const t=Te(Jn),n=()=>t.is_selected(e.event),r=()=>{const p=e.event;if(oe.is_span(p))return p.start_time;if(ue.is_event(p))return p.time},o=()=>oe.is_span(e.event)&&!e.event.end_time,i=jf(e.event),s=()=>f().some(p=>ue.is_error(p)),l=()=>f().some(p=>ue.is_warn(p)),c=()=>s()&&l(),a=()=>Ie(e.event.event,e.event.span_type,e.class,{running:o(),selected:n(),"has-error-descendant":s()||c(),"has-warn-descendant":l()&&!c()}),u=()=>12,d=()=>({"--node-height":`${2*u()}px`,"--depth":e.depth}),f=N(()=>oe.is_span(e.event)?Zd(e.event):[]),h=()=>[m(Uf,{get time(){return de(()=>r())}}),m(X,{get when(){return i()},get children(){var p=Vf();return P(p,()=>pl(i())),p}})],g=Yn(()=>e.children);return[m(X,{get when(){return g()},get children(){return m(Ix,{get class(){return a()},get style(){return d()},get selection_path(){return e.event.selection_path},get before(){return h()},get children(){return g()}})}}),m(xe,{get each(){return f()},children:p=>m(Jt,{event:p,get depth(){return e.depth}})})]}function Ix(e){return m(Ke.Leaf,{get class(){return Ie("event-list-item leaf event-list-item-content",e.class)},get style(){return e.style},get"data-sel"(){return e.selection_path?.join(".")},get children(){return[m(Ke.Before,{get children(){return e.before}}),m(X,{get when(){return!e.node},get fallback(){return e.node},get children(){return m(Ke.Node,{get radius(){return e.radius}})}}),m(Ke.After,{get children(){return e.children}})]}})}function Dx(e){return m(zo,I(e,{get children(){var t=bi(),n=t.firstChild;return P(n,m(Lb,I(()=>e.event))),t}}))}function kx(e){const t=()=>e.event.results;return m(X,{get when(){return t()?.values?.length},get children(){return m(zo,I(e,{class:"query_results",get children(){var n=dx(),r=n.firstChild,o=r.firstChild,i=o.nextSibling;return i.nextSibling,P(n,m(Bb,{get rows(){return t()?.values}}),r),r.style.setProperty("margin-top","1em"),r.style.setProperty("text-align","right"),r.style.setProperty("display","block"),P(r,()=>t()?.values.length,o),P(r,()=>t()?.count,i),n}}))}})}function Lx(e){const t=gt("internal.timings"),n=gt("internal.profiling.detailed_metrics"),r=()=>n()===Ve.HIDDEN?rx:vo,o=()=>e.event.events.find(ue.is_transaction_created)?.txn_id,i=()=>zf(e.event,oe.is_program)?.id,s=()=>o()?F2(i(),o()):[],l=gt("internal.profiling.optimized"),c=()=>l()!==Ve.HIDDEN;return m(X,{get when(){return o()},get children(){return m(sn,I(e,{class:"transaction",get nodes(){return m(X,{get when(){return s().length},get children(){return m(Bf,{get items(){return s()},get metrics(){return r()},force:!0,children:(a,u,d)=>m(Lf,{get block(){return a.block.parent},item:a,get metric(){return d()},get metrics(){return r()},get children(){return[m(q2,{get block(){return a.block},get stats(){return a.stats}}),m(X,{get when(){return N(()=>!!c())()&&$a(a.stats.childNodes)!==""},get children(){var f=fx();return P(f,m(Ko,{lang:"python",class:"describe-optimization-code",get children(){return $a(a.stats.childNodes)}})),f}})]}})})}})},get children(){var a=bi(),u=a.firstChild;return a.$$click=d=>d.stopPropagation(),P(u,m(qf,{get event(){return e.event}})),P(a,m(X,{get when(){return t()!==Ve.HIDDEN},get children(){return m(xe,{get each(){return e.event.events},children:d=>m(Jt,{event:d})})}}),null),a}}))}})}function Mx(e){const t=gt("internal.timings"),n=()=>e.event.events.find(ue.is_job_created)?.job_id;return m(X,{get when(){return n()},get children(){return m(sn,I(e,{class:"transaction",get children(){var r=bi(),o=r.firstChild;return r.$$click=i=>i.stopPropagation(),P(o,m(Kx,{get event(){return e.event}})),P(r,m(X,{get when(){return t()!==Ve.HIDDEN},get children(){return m(xe,{get each(){return e.event.events},children:i=>m(Jt,{event:i})})}}),null),r}}))}})}function Nx(e){const t=gt("internal.profiling.detailed_metrics"),n=()=>t()===Ve.HIDDEN?ox:Kf,r=()=>e.event.events.find(l=>l.span_type==="transaction"),o=()=>e.event.parent?.events.filter(oe.is_rule),i=()=>Nf(o()??[]),s=()=>i()??[];return m(sn,I(e,{get nodes(){return m(Bf,{get items(){return s()},get metrics(){return n()},force:!0,children:(l,c,a)=>m(Lf,{block:l,item:l,get metric(){return a()},get metrics(){return n()}})})},get children(){var l=hx(),c=l.firstChild,a=c.nextSibling;return P(a,m(qf,{get event(){return r()}})),l}}))}function Rx(e){const t=gt("internal.compilation.emit"),n=()=>t()!==Ve.HIDDEN&&e.event.emitted?.trim(),r=()=>e.event.passes,o=gt("internal.compilation.passes"),i=()=>o()!==Ve.HIDDEN&&r();return[m(X,{get when(){return n()},get children(){return m(zo,I(e,{class:"compilation",get children(){var s=Ts();return P(s,m(Ko,{lang:"python",scroll:!0,get children(){return e.event.emitted}})),s}}))}}),m(X,{get when(){return i()},get children(){return m(zo,I(e,{class:"compilation",get children(){var s=Ts();return P(s,m(jt,{get children(){return[m(jt.List,{get children(){return[m(xe,{get each(){return r()},children:l=>m(jt.Trigger,{get value(){return l.name},get children(){return l.name}})}),m(jt.Indicator,{})]}}),m(xe,{get each(){return r()},children:l=>m(jt.Content,{get value(){return l.name},get children(){return m(Ko,{lang:"python",get children(){return l.task}})}})})]}})),s}}))}})]}const Fx={COMPILE:"Compile",EVALUATE:"Evaluate",DATA_LOAD:"Data Load",OTHER:"Other"};function qf(e){const t=gt("internal.trace"),n=()=>zf(e.event,oe.is_program)?.id,r=()=>e.event?.events.find(ue.is_transaction_created)?.txn_id,o=()=>{let a=e.event?.parent;for(;a&&!oe.is_program(a);)a=a.parent;return a},i=()=>`https://171608476159.observeinc.com/workspace/41759331/log-explorer?datasetId=41832558&filter-Transaction=${r()}&time-start=${o()?.start_time.getTime()}`,s=()=>{const a=n(),u=r();return!a||!u?{}:If[a]?.[u]?.nodes||{}},l=()=>O_(Object.values(s())),c=()=>$_(Object.values(s()));return m(X,{get when(){return e.event},get children(){var a=mx(),u=a.firstChild,d=u.firstChild,f=d.nextSibling,h=f.nextSibling,g=u.nextSibling;return P(h,r),P(u,m(X,{get when(){return N(()=>t()!==Ve.HIDDEN)()&&i()},get children(){return m(ht,{class:"icon",as:"a",get href(){return i()},target:"_blank",get children(){return m(ed,{})}})}}),null),P(g,m(X,{get when(){return Object.values(s()).length>0},get children(){return[m(X,{get when(){return l()},get children(){var p=gx();return P(p,l),p}}),(()=>{var p=px();return P(p,m(xe,{get each(){return Object.entries(Fx)},children:([_,w])=>{const v=()=>c().find(y=>y.label===_)?.percent||0;return(()=>{var y=vx(),b=y.firstChild,S=b.nextSibling,x=S.firstChild;return P(b,w),P(S,v,x),y})()}})),p})()]}})),a}})}function Kx(e){const t=gt("internal.trace"),n=()=>e.event?.events.find(ue.is_job_created)?.job_id,r=()=>{let i=e.event?.parent;for(;i&&!oe.is_program(i);)i=i.parent;return i},o=()=>`https://171608476159.observeinc.com/workspace/41759331/log-explorer?datasetId=41832558&opal=filter+attributes%5b%22rai.job_id%22%5d+%3d+%22${n()}%22&time-start=${r()?.start_time.getTime()}`;return m(X,{get when(){return e.event},get children(){var i=yx(),s=i.firstChild,l=s.firstChild,c=l.nextSibling,a=c.nextSibling;return P(a,n),P(s,m(X,{get when(){return N(()=>t()!==Ve.HIDDEN)()&&o()},get children(){return m(ht,{class:"icon",as:"a",get href(){return o()},target:"_blank",get children(){return m(ed,{})}})}}),null),i}})}function Ps(e){const t=()=>e.fmt?e.fmt(e.value):e.value,n=()=>e.value===1?e.unit:fl(e.unit);return[(()=>{var r=bx();return P(r,t),r})(),(()=>{var r=wx();return P(r,n),r})()]}Yo(["click"]);function Ta(e,t){return e==="time"&&typeof t=="string"?new Date(t):e==="start_time"&&typeof t=="string"?new Date(t):e==="end_time"&&typeof t=="string"?new Date(t):t}async function Bx(e){const n=Array.from(e.files).filter(r=>r.name.endsWith(".json")||r.name.endsWith(".jsonl"));if(n.length===0)throw new Error("No JSON files found in the drop zone");return Promise.all(n.map(Vx))}async function Vx(e){const t=await e.text();return e.name.endsWith(".jsonl")?t.trim().split(`
208
+ `).filter(r=>r.trim()).map(r=>JSON.parse(r,Ta)):JSON.parse(t,Ta)}var jx=F("<div class=overlay>"),Hx=F("<div class=drop-zone>");const zx=e=>{const[t,{children:n}]=B(e,["onFileDrop"]),[r,o]=K(!1),[i,s]=K(!1);An(()=>{let d;const f=g=>{g.dataTransfer?.types?.includes("Files")&&s(!0)},h=()=>{clearTimeout(d),d=setTimeout(()=>{s(!1)},500)};document.addEventListener("dragenter",f),document.addEventListener("dragover",h),te(()=>{clearTimeout(d),document.removeEventListener("dragenter",f),document.removeEventListener("dragover",h)})});const l=async d=>{if(d.preventDefault(),d.stopPropagation(),!!d.dataTransfer)try{const f=await Bx(d.dataTransfer);t.onFileDrop(f),o(!1),s(!1)}catch(f){console.error("Error reading JSON files:",f)}},c=d=>{d.preventDefault(),o(!0)},a=d=>{d.preventDefault(),o(!0)},u=d=>{d.preventDefault(),o(!1),s(!1)};return(()=>{var d=Hx();return P(d,n,null),P(d,m(X,{get when(){return r()||i()},get children(){var f=jx();return f.addEventListener("dragleave",u),f.addEventListener("dragenter",a),f.addEventListener("dragover",c),f.addEventListener("drop",l),f}}),null),pe(f=>{var h=!!i(),g=!!r();return h!==f.e&&d.classList.toggle("dragging",f.e=h),g!==f.t&&d.classList.toggle("draggingOver",f.t=g),f},{e:void 0,t:void 0}),d})()};var Ux=F('<svg xmlns=http://www.w3.org/2000/svg width=183 height=27 fill=none><path fill=#FF7557 d="M18.268 5.448 12.793 0 10.13 2.644l6.803 6.773a1.883 1.883 0 0 0 2.663 0l6.805-6.77L23.743.005l-5.48 5.448zM19.6 17.582a1.887 1.887 0 0 0-2.66 0l-6.801 6.764 2.658 2.645 5.471-5.441 5.479 5.445 2.659-2.649zM7.359 5.4l-6.81 6.781A1.86 1.86 0 0 0 0 13.505c0 .498.198.971.553 1.324l6.806 6.757 2.659-2.648-5.475-5.433 5.479-5.456-2.663-2.645zM35.98 14.825a1.868 1.868 0 0 0 .004-2.648L29.21 5.428l-2.663 2.645 5.446 5.424-5.474 5.433 2.658 2.648 6.806-6.757z"></path><path fill=#E2E2F8 d="M55.155 19.219q.002 1.486.372 2.889h-2.691q-.346-.981-.347-2.78V17.95q0-1.83-.944-2.648c-.63-.546-1.55-.823-2.756-.823h-4.474v7.632H41.57V4.49h8.473q2.742 0 4.208 1.272 1.464 1.27 1.464 3.498 0 1.752-.96 2.913-.957 1.168-2.505 1.565 1.489.476 2.198 1.284.707.808.706 2.532v1.669zm-2.997-7.523q.678-.77.678-2.251 0-2.757-3.09-2.757H44.31v5.774h5.539c1.081 0 1.852-.257 2.304-.77zM68.17 18.107h2.45q-.243 1.75-1.743 3.086-1.507 1.335-4.648 1.336-3.382 0-5.063-1.962-1.681-1.96-1.679-5.112 0-1.986.747-3.575a5.75 5.75 0 0 1 2.263-2.516q1.519-.926 3.728-.926 2.051.001 3.502.886a5.63 5.63 0 0 1 2.182 2.424c.489 1.023.735 2.183.735 3.47a7 7 0 0 1-.053 1.008H60.094q.16 2.357 1.25 3.35 1.092.994 2.958.995 3.195-.001 3.86-2.464zm-6.77-6.82q-1.038.887-1.278 3.005h7.964q-.187-3.895-3.837-3.896-1.811.001-2.848.886zM75.453 3.563v18.545H72.79V3.563zM78.935 21.418q-1.186-1.034-1.186-2.861 0-1.643.944-2.636c.629-.662 1.666-1.116 3.102-1.364l3.329-.558q.986-.157 1.424-.502.44-.343.44-1.035 0-.98-.654-1.496-.653-.518-2.28-.518-1.627.001-2.436.634-.812.637-.92 1.906h-2.663c.016-1.433.54-2.552 1.573-3.367 1.03-.81 2.478-1.22 4.341-1.22 1.865 0 3.156.37 4.091 1.112q1.399 1.114 1.4 2.993v6.572q0 1.456.134 3.022h-2.425a30 30 0 0 1-.162-2.994 4.85 4.85 0 0 1-1.65 2.384q-1.198.953-3.17.955c-1.316 0-2.446-.345-3.236-1.035zm6.939-2.344q1.118-1.337 1.118-3.402v-.795q-.48.345-1.041.542-.564.199-1.332.385l-1.84.426c-.835.192-1.44.465-1.811.806q-.558.519-.56 1.416c0 .598.21 1.1.625 1.445q.624.517 1.69.517 2.023 0 3.143-1.336zM94.722 21.698q-.865-.411-1.21-1.244-.347-.835-.348-2.238v-7.31h-2.53V9.528l2.772-.955 1.094-2.7h1.331v2.993h4.265v2.038h-4.265v9.088h3.998v2.119h-2.638q-1.599 0-2.465-.41zM104.626 4.49v2.383h-3.356V4.49zm-.347 4.373v13.245h-2.663V8.863zM109.444 21.606a5.87 5.87 0 0 1-2.32-2.532c-.517-1.067-.775-2.275-.775-3.615s.258-2.515.775-3.575a5.87 5.87 0 0 1 2.32-2.516q1.543-.926 3.784-.926c1.493 0 2.751.309 3.784.926a5.87 5.87 0 0 1 2.32 2.532q.775 1.6.775 3.563c0 1.308-.259 2.52-.775 3.591a5.94 5.94 0 0 1-2.32 2.544q-1.544.939-3.784.939-2.238 0-3.784-.927zm.601-2.347q.997 1.15 3.183 1.151 2.184-.001 3.183-1.151c.666-.77 1.001-2.026 1.001-3.776s-.335-3.005-1.001-3.775q-.999-1.153-3.183-1.152-2.186 0-3.183 1.152-1 1.15-1.001 3.775.001 2.626 1.001 3.776M133.392 9.79c.755.903 1.134 2.25 1.134 4.052v8.266h-2.663v-8.03c0-1.287-.258-2.186-.771-2.687q-.772-.754-2.186-.755c-1.352 0-2.36.47-3.038 1.405q-1.012 1.402-1.013 4.477v5.59h-2.663V8.863h2.663v2.969q1.385-3.39 4.821-3.39 2.585-.001 3.716 1.352zM137.79 21.418q-1.186-1.034-1.186-2.861 0-1.643.944-2.636c.629-.662 1.666-1.116 3.102-1.364l3.329-.558q.987-.157 1.424-.502.44-.343.439-1.035 0-.98-.653-1.496-.653-.518-2.28-.518-1.627.001-2.436.634-.812.637-.92 1.906h-2.663c.016-1.433.541-2.552 1.573-3.367 1.029-.81 2.478-1.22 4.342-1.22s3.159.37 4.09 1.112q1.399 1.114 1.4 2.993v6.572q0 1.456.134 3.022h-2.425a30 30 0 0 1-.162-2.994 4.85 4.85 0 0 1-1.65 2.384q-1.197.953-3.171.955c-1.315 0-2.445-.345-3.235-1.035zm6.939-2.344q1.119-1.337 1.118-3.402v-.795q-.478.345-1.041.542c-.372.133-.819.26-1.332.385l-1.839.426c-.836.192-1.441.465-1.812.806-.371.345-.561.819-.561 1.416 0 .598.21 1.1.626 1.445q.624.517 1.69.517 2.023 0 3.143-1.336zM153.581 3.563v18.545h-2.663V3.563zM168.093 17.285h-9.005l-1.864 4.823h-1.707l6.875-17.618h2.425l6.874 17.618h-1.73l-1.864-4.823zm-.533-1.376-3.97-10.176-3.97 10.176zM179.111 5.87V20.73H183v1.377h-9.457V20.73h3.889V5.87h-3.889V4.494H183V5.87z">');const qx=(e={})=>(()=>{var t=Ux();return vt(t,e,!0,!0),t})();class Wx{imports;grouped_imports;quarantined_import_count;suspended_import_count;errors_import_count;constructor(){this.imports=Mb(async t=>document.hidden?t:(await Me.send.list_imports())?.imports||t,1e4),this.grouped_imports=N(()=>{const t=b_(this.imports(),"model");return w_(t,n=>({QUARANTINED:n.filter(r=>r.status==="QUARANTINED").map(r=>r.name),SUSPENDED:n.filter(r=>r.status==="SUSPENDED").map(r=>r.name),ERRORS:n.filter(r=>r.errors?.length>0).map(r=>({name:r.name,error:r.errors?.join?.(", ")}))}))}),this.quarantined_import_count=N(()=>{const t=this.grouped_imports();return Object.values(t).reduce((n,r)=>n+r.QUARANTINED.length,0)}),this.suspended_import_count=N(()=>{const t=this.grouped_imports();return Object.values(t).reduce((n,r)=>n+r.SUSPENDED.length,0)}),this.errors_import_count=N(()=>{const t=this.grouped_imports();return Object.values(t).reduce((n,r)=>n+r.ERRORS.length,0)})}}const ze=new Wx;var Gx=F("<span>"),Yx=F("<span class=bold-text>"),Xx=F("<p><span>The stream for </span><span> is quarantined."),Zx=F("<p><span>The stream for </span><span> is suspended."),Jx=F("<div>"),Qx=F("<p><span class=bold-text></span> has the following errors:<span class=bold-text> "),eS=F("<div class=import-issues-list>"),tS=F("<div class=import-group><h2 class=import-model>");const Wf=e=>(()=>{var t=Gx();return P(t,m(xe,{get each(){return e.items},children:(n,r)=>[(()=>{var o=Yx();return P(o,n),o})(),m(X,{get when(){return r()<e.items.length-2},children:", "}),m(X,{get when(){return r()===e.items.length-2},children:" and "})]})),t})(),nS=e=>m(X,{get when(){return e.names?.length},get children(){var t=Xx(),n=t.firstChild,r=n.nextSibling;return P(t,m(Wf,{get items(){return e.names}}),r),t}}),rS=e=>m(X,{get when(){return e.names?.length},get children(){var t=Zx(),n=t.firstChild,r=n.nextSibling;return P(t,m(Wf,{get items(){return e.names}}),r),t}}),oS=e=>m(X,{get when(){return e.errors?.length},get children(){var t=Jx();return P(t,m(xe,{get each(){return e.errors},children:n=>(()=>{var r=Qx(),o=r.firstChild,i=o.nextSibling,s=i.nextSibling;return s.firstChild,P(o,()=>n.name),P(s,()=>n.error,null),r})()})),t}}),iS=()=>(()=>{var e=eS();return P(e,m(xe,{get each(){return Object.keys(ze.grouped_imports())},children:t=>m(X,{get when(){return ze.grouped_imports()[t].QUARANTINED.length||ze.grouped_imports()[t].SUSPENDED.length||ze.grouped_imports()[t].ERRORS.length},get children(){var n=tS(),r=n.firstChild;return P(r,t),P(n,m(nS,{get names(){return ze.grouped_imports()[t].QUARANTINED}}),null),P(n,m(rS,{get names(){return ze.grouped_imports()[t].SUSPENDED}}),null),P(n,m(oS,{get errors(){return ze.grouped_imports()[t].ERRORS}}),null),n}})})),e})();var sS=F("<div>");const lS=()=>{const e=(r,o)=>r>1?`${r} ${fl(o)}`:`${r} ${o}`,t=()=>Me.connected()?ze.errors_import_count()>0||ze.quarantined_import_count()>0?"error":ze.suspended_import_count()>0?"warning":"ok":"disconnected",n=()=>{switch(t()){case"ok":return"All systems operational";case"disconnected":return"Not connected to a running session";case"error":let r=`${e(ze.errors_import_count()+ze.quarantined_import_count(),"issue")} require immediate attention`;return ze.suspended_import_count()>0&&(r+=`, and ${e(ze.suspended_import_count(),"issue")} require attention`),r;case"warning":return`${e(ze.suspended_import_count(),"issue")} require attention`}};return m(ot,{get content(){return n()},get children(){return m(ot.Trigger,{as:"div",get children(){var r=sS();return pe(()=>en(r,`system-health-indicator ${t()}`)),r}})}})};var cS=F("<span class=ui-field-input><div class=ui-field-controls>"),aS=F("<span class=ui-field-input>");const uS={seconds:{style:"unit",unit:"second",unitDisplay:"long",minimumFractionDigits:0,maximumFractionDigits:1}};function dS(e){let[t,n]=B(e,["label","class","placeholder"]);return m(ov,I(n,{get class(){return`ui-field number ${t.class??""}`},get children(){return[m(Hs,{get children(){return t.label}}),m(tv,{}),(()=>{var r=cS(),o=r.firstChild;return P(r,m(rv,{class:"ui-field-value",get placeholder(){return t.placeholder}}),o),P(o,m(nv,{as:ht,class:"icon ui-field-input-increment",get children(){return m(zv,{size:"0.9em"})}}),null),P(o,m(Qm,{as:ht,class:"icon ui-field-input-decrement",get children(){return m(Ju,{size:"0.9em"})}}),null),r})()]}}))}function Al(e){let[t,n]=B(e,["label","type","class","placeholder","multiline","children"]);return m(Tv,I(n,{get class(){return`ui-field ${t.type??"text"} ${t.class??""}`},get children(){return[m(Hs,{get children(){return t.label}}),(()=>{var r=aS();return P(r,m(X,{get when(){return!t.multiline},get children(){return m($v,{class:"ui-field-value",get placeholder(){return t.placeholder}})}}),null),P(r,m(X,{get when(){return t.multiline},get children(){return m(Pv,{class:"ui-field-value multiline",get placeholder(){return t.placeholder}})}}),null),r})(),N(()=>t.children)]}}))}Al.Description=du;Al.ErrorMessage=fu;var Uo;(e=>{e.Text=Al,e.Number=dS})(Uo||(Uo={}));var fS=F("<header class=ui-popout-header>"),hS=F("<div>");function yn(e){const[t,n]=B(e,["title","content","children","class","style"]);return m(av,I(n,{get children(){return[N(()=>t.children),m(cv,{get children(){var r=hS();return P(r,m(sv,{class:"ui-popout-content",get children(){return[m($u,{class:"ui-popout-arrow"}),(()=>{var o=fS();return P(o,m(yn.Title,{class:"ui-popout-title",get children(){return t.title}}),null),P(o,m(yn.CloseButton,{as:ht,class:"ui-popout-close icon",get children(){return m(ny,{})}}),null),o})(),N(()=>t.content)]}})),pe(o=>{var i=`ui-popout ${t.class||""}`,s=t.style;return i!==o.e&&en(r,o.e=i),o.t=Xo(r,s,o.t),o},{e:void 0,t:void 0}),r}})]}}))}yn.Trigger=e=>dv(e);yn.Title=uv;yn.CloseButton=iv;yn.Description=lv;var gS=F("<div><div class=toggle-group__wrapper><div class=toggle-group__buttons>"),pS=F('<input type=radio class="icon toggle-group__button-input">'),mS=F("<span class=toggle-group__button>");const vS=[{value:!1,tooltip:"Off",icon:j_},{value:!0,tooltip:"On",icon:V_}];function Gf(e){const[t,n]=B(e,["class","as","value","on_change","name","options"]),r=()=>{if(t.options)return t.options;if(typeof t.value=="boolean")return vS;throw new Error("Non-boolean toggles must provide options")};return(()=>{var o=gS(),i=o.firstChild,s=i.firstChild;return o.$$click=l=>l.stopPropagation(),vt(o,I({get class(){return Ie("toggle-group",t.class)}},n),!1,!0),P(s,()=>r().map(l=>m(Zs,{get content(){return l.tooltip},as:"label",class:"toggle-group__button-label",get children(){return[(()=>{var c=pS();return c.addEventListener("change",()=>e.on_change?.(l.value)),pe(a=>{var u=e.id,d=e.name;return u!==a.e&&Gt(c,"id",a.e=u),d!==a.t&&Gt(c,"name",a.t=d),a},{e:void 0,t:void 0}),pe(()=>c.checked=t.value===l.value),c})(),(()=>{var c=mS();return P(c,m(wt,{get component(){return l.icon}})),c})()]}}))),o})()}Yo(["click"]);const yS={sanitize:!0},[Yf,bS]=Ds("general",yS);function wS(e){return ge({a:{viewBox:"0 0 16 16"},c:'<path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"/>'},e)}function _S(e){return ge({a:{viewBox:"0 0 16 16"},c:'<path d="M8.533.133a1.75 1.75 0 0 0-1.066 0l-2.091.67a.75.75 0 0 0 .457 1.428l2.09-.67a.25.25 0 0 1 .153 0l5.25 1.68a.25.25 0 0 1 .174.239V7c0 .233-.008.464-.025.694a.75.75 0 1 0 1.495.112c.02-.27.03-.538.03-.806V3.48a1.75 1.75 0 0 0-1.217-1.667L8.533.133ZM1 2.857l-.69-.5a.75.75 0 1 1 .88-1.214l14.5 10.5a.75.75 0 1 1-.88 1.214l-1.282-.928c-.995 1.397-2.553 2.624-4.864 3.608-.425.181-.905.18-1.329 0-2.447-1.042-4.049-2.356-5.032-3.855C1.32 10.182 1 8.566 1 7Zm1.5 1.086V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297.05.02.106.02.153 0 2.127-.905 3.439-1.982 4.237-3.108Z"/>'},e)}var xS=F("<div class=overlay-setting>"),SS=F("<div class=sub-items>"),CS=F("<section class=overlay-settings-pane><h2>Overlays</h2><div class=overlay-settings>"),ES=F('<section><h2>General</h2><div role=group class="ui-field boolean"><label>Strip sensitive data on export'),$S=F("<div class=settings-pane>");const TS=!0,PS={[Ve.HIDDEN]:H_,[Ve.DETAIL]:z_},OS={[Ve.HIDDEN]:"Never shown",[Ve.DETAIL]:"Shown when open"};function Xf(e){return`overlay--${e}`}function AS(e){const t=gt(e.path),n=o=>El(e.path,o),r=Object.values(Ve).map(o=>({value:o,tooltip:OS[o],icon:PS[o]}));return m(Gf,{class:"overlay-state-input",get value(){return t()},on_change:n,options:r,get name(){return e.path},get id(){return Xf(e.path)}})}function Pa(e){return m(X,{get when(){return e.path},get children(){return[m(ot,{get content(){return e.schema.description},get children(){return m(ot.Trigger,{as:"label",get for(){return Xf(e.path)},get children(){return e.schema.name}})}}),m(AS,{get path(){return e.path}})]}})}function Os(e){const t=()=>Object.keys(e.schema.items||{}).length;return m(Go,{get children(){return[m(Pt,{get when(){return N(()=>!!e.schema.name)()&&t()===0},get children(){var n=xS();return P(n,m(Pa,{get path(){return e.path},get schema(){return e.schema}})),pe(()=>Gt(n,"data-path",e.path)),n}}),m(Pt,{get when(){return N(()=>!TS)()&&t()>1},get children(){return m(Wt,{side:"top",class:"overlay-setting",get"attr:data-path"(){return e.path},get children(){return[m(Wt.Trigger,{as:"header",get children(){return m(Pa,{get path(){return e.path},get schema(){return e.schema}})}}),m(Wt.Content,{get children(){var n=SS();return P(n,m(xe,{get each(){return Object.entries(e.schema.items)},children:([r,o])=>m(Os,{get path(){return e.path?`${e.path}.${r}`:r},schema:o})})),n}})]}})}}),m(Pt,{when:!0,get children(){return m(xe,{get each(){return Object.entries(e.schema.items)},children:([n,r])=>m(Os,{get path(){return e.path?`${e.path}.${n}`:n},schema:r})})}})]}})}function IS(){return(()=>{var e=CS(),t=e.firstChild,n=t.nextSibling;return P(n,m(Os,{path:"",schema:wf})),e})()}function DS(){const e=xt();return(()=>{var t=ES(),n=t.firstChild,r=n.nextSibling,o=r.firstChild;return P(t,m(Uo.Number,{label:"Polling Interval",get formatOptions(){return uS.seconds},minValue:1,get defaultValue(){return Ir.poll_interval/1e3},onRawValueChange:i=>Vl("poll_interval",i*1e3)}),r),P(t,m(Uo.Text,{label:"Debug URL",placeholder:"ws://localhost:1234",get defaultValue(){return Ir.url},onChange:i=>Vl("url",i)}),r),Gt(o,"for",e),P(r,m(Gf,{name:"sanitize",id:e,get value(){return Yf.sanitize},on_change:i=>{bS("sanitize",i)},options:[{value:!1,tooltip:"Exports will preserve everything",icon:_S},{value:!0,tooltip:"Exports will be sanitized",icon:wS}]}),null),t})()}function kS(){return(()=>{var e=$S();return P(e,m(IS,{}),null),P(e,m(DS,{}),null),e})()}function LS(){return m(yn,{get content(){return m(kS,{})},class:"settings-popout",get children(){return m(yn.Trigger,{as:ht,class:"icon",tooltip:"settings",get children(){return m(ey,{})}})}})}var MS=F("<div class=app><header><div style=display:flex;justify-content:center;align-items:center;gap:16px></div><span style=flex:1></span><div class=hidden-controls>");function NS(){const e=Jn.defaultValue;globalThis.event_list_selection=e;const t=()=>{e.clear(),Me.clear()},n=()=>{Me.exportData(Yf.sanitize)},r=c=>{t(),Me.importData(c[0])},o=()=>Me.latest()&&!Me.latest()?.end_time,[i,s]=K(!0),l=()=>i()?Jv:Qv;return V(c=>{const a=Me.spans().length;if(!i()||a===c)return a;for(let u of de(()=>e.selected()))jl(u)||(e.remove(u),e.add({event:"placeholder",selection_path:[a-1,...u.selection_path.slice(1)]}));if(e.selected().length===0){let u=Me.latest();u&&u.span_type==="program"&&e.add(u)}return a}),V(c=>{const a=Me.messages().length;if(a===c)return a;for(let u of de(()=>e.selected())){if(!jl(u))continue;let d=Ua(Me.root,u.selection_path);d&&(e.remove(u),e.add(d))}return a}),V(c=>{const a=Me.messages().length;return a===c||Nb()&&Yd(),a}),V(()=>{e.selected(),Gd(!1)}),m(Jn.Provider,{value:e,get children(){return m(zx,{onFileDrop:r,get children(){var c=MS(),a=c.firstChild,u=a.firstChild,d=u.nextSibling,f=d.nextSibling;return P(u,m(qx,{}),null),P(u,m(lS,{}),null),P(f,m(ht,{class:"icon",onclick:t,get tooltip(){return o()?"cannot clear events while program is running":"clear events"},get disabled(){return o()},get children(){return m(jv,{})}}),null),P(f,m(ht,{class:"icon",tooltip:"Follow last run",onclick:()=>s(h=>!h),get children(){return m(wt,{get component(){return l()}})}}),null),P(a,m(ht,{class:"icon",tooltip:"Export events",onclick:n,get children(){return m(Xv,{})}}),null),P(a,m(LS,{}),null),P(c,m(iS,{}),null),P(c,m(Ex,{get events(){return Me.spans()}}),null),c}})}})}const RS=document.getElementById("root");document.body.classList.add(`os-${Ka}`);document.body.classList.add(`browser-${Uh}`);Ah(()=>m(NS,{}),RS)});export default FS();