sqlmesh 0.217.1.dev1__py3-none-any.whl → 0.227.2.dev4__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 (183) hide show
  1. sqlmesh/__init__.py +12 -2
  2. sqlmesh/_version.py +2 -2
  3. sqlmesh/cli/project_init.py +10 -2
  4. sqlmesh/core/_typing.py +1 -0
  5. sqlmesh/core/audit/definition.py +8 -2
  6. sqlmesh/core/config/__init__.py +1 -1
  7. sqlmesh/core/config/connection.py +17 -5
  8. sqlmesh/core/config/dbt.py +13 -0
  9. sqlmesh/core/config/janitor.py +12 -0
  10. sqlmesh/core/config/loader.py +7 -0
  11. sqlmesh/core/config/model.py +2 -0
  12. sqlmesh/core/config/root.py +3 -0
  13. sqlmesh/core/console.py +80 -2
  14. sqlmesh/core/constants.py +1 -1
  15. sqlmesh/core/context.py +61 -25
  16. sqlmesh/core/dialect.py +3 -0
  17. sqlmesh/core/engine_adapter/_typing.py +2 -0
  18. sqlmesh/core/engine_adapter/base.py +322 -22
  19. sqlmesh/core/engine_adapter/base_postgres.py +17 -1
  20. sqlmesh/core/engine_adapter/bigquery.py +146 -7
  21. sqlmesh/core/engine_adapter/clickhouse.py +17 -13
  22. sqlmesh/core/engine_adapter/databricks.py +33 -2
  23. sqlmesh/core/engine_adapter/fabric.py +1 -29
  24. sqlmesh/core/engine_adapter/mixins.py +142 -48
  25. sqlmesh/core/engine_adapter/mssql.py +15 -4
  26. sqlmesh/core/engine_adapter/mysql.py +2 -2
  27. sqlmesh/core/engine_adapter/postgres.py +9 -3
  28. sqlmesh/core/engine_adapter/redshift.py +4 -0
  29. sqlmesh/core/engine_adapter/risingwave.py +1 -0
  30. sqlmesh/core/engine_adapter/shared.py +6 -0
  31. sqlmesh/core/engine_adapter/snowflake.py +82 -11
  32. sqlmesh/core/engine_adapter/spark.py +14 -10
  33. sqlmesh/core/engine_adapter/trino.py +4 -2
  34. sqlmesh/core/janitor.py +181 -0
  35. sqlmesh/core/lineage.py +1 -0
  36. sqlmesh/core/macros.py +35 -13
  37. sqlmesh/core/model/common.py +2 -0
  38. sqlmesh/core/model/definition.py +65 -4
  39. sqlmesh/core/model/kind.py +66 -2
  40. sqlmesh/core/model/meta.py +107 -2
  41. sqlmesh/core/node.py +101 -2
  42. sqlmesh/core/plan/builder.py +15 -10
  43. sqlmesh/core/plan/common.py +196 -2
  44. sqlmesh/core/plan/definition.py +21 -6
  45. sqlmesh/core/plan/evaluator.py +72 -113
  46. sqlmesh/core/plan/explainer.py +90 -8
  47. sqlmesh/core/plan/stages.py +42 -21
  48. sqlmesh/core/renderer.py +26 -18
  49. sqlmesh/core/scheduler.py +60 -19
  50. sqlmesh/core/selector.py +137 -9
  51. sqlmesh/core/signal.py +64 -1
  52. sqlmesh/core/snapshot/__init__.py +1 -0
  53. sqlmesh/core/snapshot/definition.py +109 -25
  54. sqlmesh/core/snapshot/evaluator.py +610 -50
  55. sqlmesh/core/state_sync/__init__.py +0 -1
  56. sqlmesh/core/state_sync/base.py +31 -27
  57. sqlmesh/core/state_sync/cache.py +12 -4
  58. sqlmesh/core/state_sync/common.py +216 -111
  59. sqlmesh/core/state_sync/db/facade.py +30 -15
  60. sqlmesh/core/state_sync/db/interval.py +27 -7
  61. sqlmesh/core/state_sync/db/migrator.py +14 -8
  62. sqlmesh/core/state_sync/db/snapshot.py +119 -87
  63. sqlmesh/core/table_diff.py +2 -2
  64. sqlmesh/core/test/definition.py +14 -9
  65. sqlmesh/dbt/adapter.py +20 -11
  66. sqlmesh/dbt/basemodel.py +52 -41
  67. sqlmesh/dbt/builtin.py +27 -11
  68. sqlmesh/dbt/column.py +17 -5
  69. sqlmesh/dbt/common.py +4 -2
  70. sqlmesh/dbt/context.py +14 -1
  71. sqlmesh/dbt/loader.py +60 -8
  72. sqlmesh/dbt/manifest.py +136 -8
  73. sqlmesh/dbt/model.py +105 -25
  74. sqlmesh/dbt/package.py +16 -1
  75. sqlmesh/dbt/profile.py +3 -3
  76. sqlmesh/dbt/project.py +12 -7
  77. sqlmesh/dbt/seed.py +1 -1
  78. sqlmesh/dbt/source.py +6 -1
  79. sqlmesh/dbt/target.py +25 -6
  80. sqlmesh/dbt/test.py +31 -1
  81. sqlmesh/migrations/v0000_baseline.py +3 -6
  82. sqlmesh/migrations/v0061_mysql_fix_blob_text_type.py +2 -5
  83. sqlmesh/migrations/v0062_add_model_gateway.py +2 -2
  84. sqlmesh/migrations/v0063_change_signals.py +2 -4
  85. sqlmesh/migrations/v0064_join_when_matched_strings.py +2 -4
  86. sqlmesh/migrations/v0065_add_model_optimize.py +2 -2
  87. sqlmesh/migrations/v0066_add_auto_restatements.py +2 -6
  88. sqlmesh/migrations/v0067_add_tsql_date_full_precision.py +2 -2
  89. sqlmesh/migrations/v0068_include_unrendered_query_in_metadata_hash.py +2 -2
  90. sqlmesh/migrations/v0069_update_dev_table_suffix.py +2 -4
  91. sqlmesh/migrations/v0070_include_grains_in_metadata_hash.py +2 -2
  92. sqlmesh/migrations/v0071_add_dev_version_to_intervals.py +2 -6
  93. sqlmesh/migrations/v0072_add_environment_statements.py +2 -4
  94. sqlmesh/migrations/v0073_remove_symbolic_disable_restatement.py +2 -4
  95. sqlmesh/migrations/v0074_add_partition_by_time_column_property.py +2 -2
  96. sqlmesh/migrations/v0075_remove_validate_query.py +2 -4
  97. sqlmesh/migrations/v0076_add_cron_tz.py +2 -2
  98. sqlmesh/migrations/v0077_fix_column_type_hash_calculation.py +2 -2
  99. sqlmesh/migrations/v0078_warn_if_non_migratable_python_env.py +2 -4
  100. sqlmesh/migrations/v0079_add_gateway_managed_property.py +7 -9
  101. sqlmesh/migrations/v0080_add_batch_size_to_scd_type_2_models.py +2 -2
  102. sqlmesh/migrations/v0081_update_partitioned_by.py +2 -4
  103. sqlmesh/migrations/v0082_warn_if_incorrectly_duplicated_statements.py +2 -4
  104. sqlmesh/migrations/v0083_use_sql_for_scd_time_data_type_data_hash.py +2 -2
  105. sqlmesh/migrations/v0084_normalize_quote_when_matched_and_merge_filter.py +2 -2
  106. sqlmesh/migrations/v0085_deterministic_repr.py +2 -4
  107. sqlmesh/migrations/v0086_check_deterministic_bug.py +2 -4
  108. sqlmesh/migrations/v0087_normalize_blueprint_variables.py +2 -4
  109. sqlmesh/migrations/v0088_warn_about_variable_python_env_diffs.py +2 -4
  110. sqlmesh/migrations/v0089_add_virtual_environment_mode.py +2 -2
  111. sqlmesh/migrations/v0090_add_forward_only_column.py +2 -6
  112. sqlmesh/migrations/v0091_on_additive_change.py +2 -2
  113. sqlmesh/migrations/v0092_warn_about_dbt_data_type_diff.py +2 -4
  114. sqlmesh/migrations/v0093_use_raw_sql_in_fingerprint.py +2 -2
  115. sqlmesh/migrations/v0094_add_dev_version_and_fingerprint_columns.py +2 -6
  116. sqlmesh/migrations/v0095_warn_about_dbt_raw_sql_diff.py +2 -4
  117. sqlmesh/migrations/v0096_remove_plan_dags_table.py +2 -4
  118. sqlmesh/migrations/v0097_add_dbt_name_in_node.py +2 -2
  119. sqlmesh/migrations/v0098_add_dbt_node_info_in_node.py +103 -0
  120. sqlmesh/migrations/v0099_add_last_altered_to_intervals.py +25 -0
  121. sqlmesh/migrations/v0100_add_grants_and_grants_target_layer.py +9 -0
  122. sqlmesh/utils/__init__.py +8 -1
  123. sqlmesh/utils/cache.py +5 -1
  124. sqlmesh/utils/date.py +1 -1
  125. sqlmesh/utils/errors.py +4 -0
  126. sqlmesh/utils/jinja.py +25 -2
  127. sqlmesh/utils/pydantic.py +6 -6
  128. sqlmesh/utils/windows.py +13 -3
  129. {sqlmesh-0.217.1.dev1.dist-info → sqlmesh-0.227.2.dev4.dist-info}/METADATA +5 -5
  130. {sqlmesh-0.217.1.dev1.dist-info → sqlmesh-0.227.2.dev4.dist-info}/RECORD +181 -176
  131. sqlmesh_dbt/cli.py +70 -7
  132. sqlmesh_dbt/console.py +14 -6
  133. sqlmesh_dbt/operations.py +103 -24
  134. sqlmesh_dbt/selectors.py +39 -1
  135. web/client/dist/assets/{Audits-Ucsx1GzF.js → Audits-CBiYyyx-.js} +1 -1
  136. web/client/dist/assets/{Banner-BWDzvavM.js → Banner-DSRbUlO5.js} +1 -1
  137. web/client/dist/assets/{ChevronDownIcon-D2VL13Ah.js → ChevronDownIcon-MK_nrjD_.js} +1 -1
  138. web/client/dist/assets/{ChevronRightIcon-DWGYbf1l.js → ChevronRightIcon-CLWtT22Q.js} +1 -1
  139. web/client/dist/assets/{Content-DdHDZM3I.js → Content-BNuGZN5l.js} +1 -1
  140. web/client/dist/assets/{Content-Bikfy8fh.js → Content-CSHJyW0n.js} +1 -1
  141. web/client/dist/assets/{Data-CzAJH7rW.js → Data-C1oRDbLx.js} +1 -1
  142. web/client/dist/assets/{DataCatalog-BJF11g8f.js → DataCatalog-HXyX2-_j.js} +1 -1
  143. web/client/dist/assets/{Editor-s0SBpV2y.js → Editor-BDyfpUuw.js} +1 -1
  144. web/client/dist/assets/{Editor-DgLhgKnm.js → Editor-D0jNItwC.js} +1 -1
  145. web/client/dist/assets/{Errors-D0m0O1d3.js → Errors-BfuFLcPi.js} +1 -1
  146. web/client/dist/assets/{FileExplorer-CEv0vXkt.js → FileExplorer-BR9IE3he.js} +1 -1
  147. web/client/dist/assets/{Footer-BwzXn8Ew.js → Footer-CgBEtiAh.js} +1 -1
  148. web/client/dist/assets/{Header-6heDkEqG.js → Header-DSqR6nSO.js} +1 -1
  149. web/client/dist/assets/{Input-obuJsD6k.js → Input-B-oZ6fGO.js} +1 -1
  150. web/client/dist/assets/Lineage-DYQVwDbD.js +1 -0
  151. web/client/dist/assets/{ListboxShow-HM9_qyrt.js → ListboxShow-BE5-xevs.js} +1 -1
  152. web/client/dist/assets/{ModelLineage-zWdKo0U2.js → ModelLineage-DkIFAYo4.js} +1 -1
  153. web/client/dist/assets/{Models-Bcu66SRz.js → Models-D5dWr8RB.js} +1 -1
  154. web/client/dist/assets/{Page-BWEEQfIt.js → Page-C-XfU5BR.js} +1 -1
  155. web/client/dist/assets/{Plan-C4gXCqlf.js → Plan-ZEuTINBq.js} +1 -1
  156. web/client/dist/assets/{PlusCircleIcon-CVDO651q.js → PlusCircleIcon-DVXAHG8_.js} +1 -1
  157. web/client/dist/assets/{ReportErrors-BT6xFwAr.js → ReportErrors-B7FEPzMB.js} +1 -1
  158. web/client/dist/assets/{Root-ryJoBK4h.js → Root-8aZyhPxF.js} +1 -1
  159. web/client/dist/assets/{SearchList-DB04sPb9.js → SearchList-W_iT2G82.js} +1 -1
  160. web/client/dist/assets/{SelectEnvironment-CUYcXUu6.js → SelectEnvironment-C65jALmO.js} +1 -1
  161. web/client/dist/assets/{SourceList-Doo_9ZGp.js → SourceList-DSLO6nVJ.js} +1 -1
  162. web/client/dist/assets/{SourceListItem-D5Mj7Dly.js → SourceListItem-BHt8d9-I.js} +1 -1
  163. web/client/dist/assets/{SplitPane-qHmkD1qy.js → SplitPane-CViaZmw6.js} +1 -1
  164. web/client/dist/assets/{Tests-DH1Z74ML.js → Tests-DhaVt5t1.js} +1 -1
  165. web/client/dist/assets/{Welcome-DqUJUNMF.js → Welcome-DvpjH-_4.js} +1 -1
  166. web/client/dist/assets/context-BctCsyGb.js +71 -0
  167. web/client/dist/assets/{context-Dr54UHLi.js → context-DFNeGsFF.js} +1 -1
  168. web/client/dist/assets/{editor-DYIP1yQ4.js → editor-CcO28cqd.js} +1 -1
  169. web/client/dist/assets/{file-DarlIDVi.js → file-CvJN3aZO.js} +1 -1
  170. web/client/dist/assets/{floating-ui.react-dom-BH3TFvkM.js → floating-ui.react-dom-CjE-JNW1.js} +1 -1
  171. web/client/dist/assets/{help-Bl8wqaQc.js → help-DuPhjipa.js} +1 -1
  172. web/client/dist/assets/{index-D1sR7wpN.js → index-C-dJH7yZ.js} +1 -1
  173. web/client/dist/assets/{index-O3mjYpnE.js → index-Dj0i1-CA.js} +2 -2
  174. web/client/dist/assets/{plan-CehRrJUG.js → plan-BTRSbjKn.js} +1 -1
  175. web/client/dist/assets/{popover-CqgMRE0G.js → popover-_Sf0yvOI.js} +1 -1
  176. web/client/dist/assets/{project-6gxepOhm.js → project-BvSOI8MY.js} +1 -1
  177. web/client/dist/index.html +1 -1
  178. web/client/dist/assets/Lineage-D0Hgdz2v.js +0 -1
  179. web/client/dist/assets/context-DgX0fp2E.js +0 -68
  180. {sqlmesh-0.217.1.dev1.dist-info → sqlmesh-0.227.2.dev4.dist-info}/WHEEL +0 -0
  181. {sqlmesh-0.217.1.dev1.dist-info → sqlmesh-0.227.2.dev4.dist-info}/entry_points.txt +0 -0
  182. {sqlmesh-0.217.1.dev1.dist-info → sqlmesh-0.227.2.dev4.dist-info}/licenses/LICENSE +0 -0
  183. {sqlmesh-0.217.1.dev1.dist-info → sqlmesh-0.227.2.dev4.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
1
- import{r as c,j as a,a1 as Kn,c as P,V as _t,b as H,v as Vn,g as qn,a as Yn,z as Wn,L as Xn,S as zn,l as Zn,R as Qn}from"./index-O3mjYpnE.js";import{u as N,M as Ke}from"./project-6gxepOhm.js";import{u as te,a as mt,c as Qe,b as At,d as Jn,P as Z,e as T,f as jt,g as er,h as be,i as Ft,A as tr,j as nr,k as rr,R as or,l as sr,F as ir,D as ar,C as cr,m as ur,n as lr,o as dr,p as fr,q as gr}from"./Input-obuJsD6k.js";import{M as hr}from"./file-DarlIDVi.js";import{useFileExplorer as Ie}from"./context-Dr54UHLi.js";import{u as Lt,S as pr}from"./SearchList-DB04sPb9.js";import{u as Fe}from"./editor-DYIP1yQ4.js";import{F as mr}from"./ChevronDownIcon-D2VL13Ah.js";import{F as vr}from"./ChevronRightIcon-DWGYbf1l.js";import"./floating-ui.react-dom-BH3TFvkM.js";import"./help-B59vE3aE.js";import"./popover-CqgMRE0G.js";function xr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),c.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const Dr=c.forwardRef(xr);function Cr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"}))}const Sr=c.forwardRef(Cr);function yr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const wr=c.forwardRef(yr);function Tr(t,e){return c.useReducer((n,r)=>e[n][r]??n,t)}var he=t=>{const{present:e,children:n}=t,r=br(e),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=te(r.ref,Ir(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};he.displayName="Presence";function br(t){const[e,n]=c.useState(),r=c.useRef(null),o=c.useRef(t),s=c.useRef("none"),i=t?"mounted":"unmounted",[u,d]=Tr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const h=xe(r.current);s.current=u==="mounted"?h:"none"},[u]),mt(()=>{const h=r.current,f=o.current;if(f!==t){const l=s.current,p=xe(h);t?d("MOUNT"):p==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(f&&l!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),mt(()=>{if(e){let h;const f=e.ownerDocument.defaultView??window,g=p=>{const S=xe(r.current).includes(p.animationName);if(p.target===e&&S&&(d("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",h=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},l=p=>{p.target===e&&(s.current=xe(r.current))};return e.addEventListener("animationstart",l),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{f.clearTimeout(h),e.removeEventListener("animationstart",l),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:c.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function xe(t){return(t==null?void 0:t.animationName)||"none"}function Ir(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Le="rovingFocusGroup.onEntryFocus",Or={bubbles:!1,cancelable:!0},pe="RovingFocusGroup",[Ve,kt,Er]=At(pe),[Mr,Ut]=Qe(pe,[Er]),[Rr,Pr]=Mr(pe),Ht=c.forwardRef((t,e)=>a.jsx(Ve.Provider,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Ve.Slot,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Nr,{...t,ref:e})})}));Ht.displayName=pe;var Nr=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:f=!1,...g}=t,l=c.useRef(null),p=te(e,l),D=jt(s),[S,x]=er({prop:i,defaultProp:u??null,onChange:d,caller:pe}),[w,I]=c.useState(!1),b=be(h),M=kt(n),K=c.useRef(!1),[V,A]=c.useState(0);return c.useEffect(()=>{const R=l.current;if(R)return R.addEventListener(Le,b),()=>R.removeEventListener(Le,b)},[b]),a.jsx(Rr,{scope:n,orientation:r,dir:D,loop:o,currentTabStopId:S,onItemFocus:c.useCallback(R=>x(R),[x]),onItemShiftTab:c.useCallback(()=>I(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>A(R=>R-1),[]),children:a.jsx(Z.div,{tabIndex:w||V===0?-1:0,"data-orientation":r,...g,ref:p,style:{outline:"none",...t.style},onMouseDown:T(t.onMouseDown,()=>{K.current=!0}),onFocus:T(t.onFocus,R=>{const j=!K.current;if(R.target===R.currentTarget&&j&&!w){const L=new CustomEvent(Le,Or);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const C=M().filter(q=>q.focusable),E=C.find(q=>q.active),X=C.find(q=>q.id===S),se=[E,X,...C].filter(Boolean).map(q=>q.ref.current);Bt(se,f)}}K.current=!1}),onBlur:T(t.onBlur,()=>I(!1))})})}),Gt="RovingFocusGroupItem",$t=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...u}=t,d=Jn(),h=s||d,f=Pr(Gt,n),g=f.currentTabStopId===h,l=kt(n),{onFocusableItemAdd:p,onFocusableItemRemove:D,currentTabStopId:S}=f;return c.useEffect(()=>{if(r)return p(),()=>D()},[r,p,D]),a.jsx(Ve.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:a.jsx(Z.span,{tabIndex:g?0:-1,"data-orientation":f.orientation,...u,ref:e,onMouseDown:T(t.onMouseDown,x=>{r?f.onItemFocus(h):x.preventDefault()}),onFocus:T(t.onFocus,()=>f.onItemFocus(h)),onKeyDown:T(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=jr(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=l().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const M=b.indexOf(x.currentTarget);b=f.loop?Fr(b,M+1):b.slice(M+1)}setTimeout(()=>Bt(b))}}),children:typeof i=="function"?i({isCurrentTabStop:g,hasTabStop:S!=null}):i})})});$t.displayName=Gt;var _r={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ar(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function jr(t,e,n){const r=Ar(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _r[r]}function Bt(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Fr(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Lr=Ht,kr=$t,qe=["Enter"," "],Ur=["ArrowDown","PageUp","Home"],Kt=["ArrowUp","PageDown","End"],Hr=[...Ur,...Kt],Gr={ltr:[...qe,"ArrowRight"],rtl:[...qe,"ArrowLeft"]},$r={ltr:["ArrowLeft"],rtl:["ArrowRight"]},me="Menu",[de,Br,Kr]=At(me),[ne,Vt]=Qe(me,[Kr,Ft,Ut]),Oe=Ft(),qt=Ut(),[Vr,re]=ne(me),[qr,ve]=ne(me),Yt=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=t,u=Oe(e),[d,h]=c.useState(null),f=c.useRef(!1),g=be(s),l=jt(o);return c.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",D,{capture:!0,once:!0}),document.addEventListener("pointermove",D,{capture:!0,once:!0})},D=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",D,{capture:!0}),document.removeEventListener("pointermove",D,{capture:!0})}},[]),a.jsx(fr,{...u,children:a.jsx(Vr,{scope:e,open:n,onOpenChange:g,content:d,onContentChange:h,children:a.jsx(qr,{scope:e,onClose:c.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:f,dir:l,modal:i,children:r})})})};Yt.displayName=me;var Yr="MenuAnchor",Je=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(tr,{...o,...r,ref:e})});Je.displayName=Yr;var et="MenuPortal",[Wr,Wt]=ne(et,{forceMount:void 0}),Xt=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=re(et,e);return a.jsx(Wr,{scope:e,forceMount:n,children:a.jsx(he,{present:n||s.open,children:a.jsx(gr,{asChild:!0,container:o,children:r})})})};Xt.displayName=et;var B="MenuContent",[Xr,tt]=ne(B),zt=c.forwardRef((t,e)=>{const n=Wt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:i.modal?a.jsx(zr,{...o,ref:e}):a.jsx(Zr,{...o,ref:e})})})})}),zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu),r=c.useRef(null),o=te(e,r);return c.useEffect(()=>{const s=r.current;if(s)return nr(s)},[]),a.jsx(nt,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:T(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu);return a.jsx(nt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qr=sr("MenuContent.ScrollLock"),nt=c.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,disableOutsideScroll:D,...S}=t,x=re(B,n),w=ve(B,n),I=Oe(n),b=qt(n),M=Br(n),[K,V]=c.useState(null),A=c.useRef(null),R=te(e,A,x.onContentChange),j=c.useRef(0),L=c.useRef(""),C=c.useRef(0),E=c.useRef(null),X=c.useRef("right"),Q=c.useRef(0),se=D?or:c.Fragment,q=D?{as:Qr,allowPinchZoom:!0}:void 0,Y=m=>{var ie,ht;const O=L.current+m,_=M().filter(z=>!z.disabled),U=document.activeElement,Ae=(ie=_.find(z=>z.ref.current===U))==null?void 0:ie.textValue,je=_.map(z=>z.textValue),gt=lo(je,O,Ae),ce=(ht=_.find(z=>z.textValue===gt))==null?void 0:ht.ref.current;(function z(pt){L.current=pt,window.clearTimeout(j.current),pt!==""&&(j.current=window.setTimeout(()=>z(""),1e3))})(O),ce&&setTimeout(()=>ce.focus())};c.useEffect(()=>()=>window.clearTimeout(j.current),[]),rr();const v=c.useCallback(m=>{var _,U;return X.current===((_=E.current)==null?void 0:_.side)&&go(m,(U=E.current)==null?void 0:U.area)},[]);return a.jsx(Xr,{scope:n,searchRef:L,onItemEnter:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),onItemLeave:c.useCallback(m=>{var O;v(m)||((O=A.current)==null||O.focus(),V(null))},[v]),onTriggerLeave:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),pointerGraceTimerRef:C,onPointerGraceIntentChange:c.useCallback(m=>{E.current=m},[]),children:a.jsx(se,{...q,children:a.jsx(ir,{asChild:!0,trapped:o,onMountAutoFocus:T(s,m=>{var O;m.preventDefault(),(O=A.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(ar,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,children:a.jsx(Lr,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:K,onCurrentTabStopIdChange:V,onEntryFocus:T(d,m=>{w.isUsingKeyboardRef.current||m.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(cr,{role:"menu","aria-orientation":"vertical","data-state":gn(x.open),"data-radix-menu-content":"",dir:w.dir,...I,...S,ref:R,style:{outline:"none",...S.style},onKeyDown:T(S.onKeyDown,m=>{const _=m.target.closest("[data-radix-menu-content]")===m.currentTarget,U=m.ctrlKey||m.altKey||m.metaKey,Ae=m.key.length===1;_&&(m.key==="Tab"&&m.preventDefault(),!U&&Ae&&Y(m.key));const je=A.current;if(m.target!==je||!Hr.includes(m.key))return;m.preventDefault();const ce=M().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Kt.includes(m.key)&&ce.reverse(),co(ce)}),onBlur:T(t.onBlur,m=>{m.currentTarget.contains(m.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:T(t.onPointerMove,fe(m=>{const O=m.target,_=Q.current!==m.clientX;if(m.currentTarget.contains(O)&&_){const U=m.clientX>Q.current?"right":"left";X.current=U,Q.current=m.clientX}}))})})})})})})});zt.displayName=B;var Jr="MenuGroup",rt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"group",...r,ref:e})});rt.displayName=Jr;var eo="MenuLabel",Zt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{...r,ref:e})});Zt.displayName=eo;var we="MenuItem",vt="menu.itemSelect",Ee=c.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...o}=t,s=c.useRef(null),i=ve(we,t.__scopeMenu),u=tt(we,t.__scopeMenu),d=te(e,s),h=c.useRef(!1),f=()=>{const g=s.current;if(!n&&g){const l=new CustomEvent(vt,{bubbles:!0,cancelable:!0});g.addEventListener(vt,p=>r==null?void 0:r(p),{once:!0}),dr(g,l),l.defaultPrevented?h.current=!1:i.onClose()}};return a.jsx(Qt,{...o,ref:d,disabled:n,onClick:T(t.onClick,f),onPointerDown:g=>{var l;(l=t.onPointerDown)==null||l.call(t,g),h.current=!0},onPointerUp:T(t.onPointerUp,g=>{var l;h.current||(l=g.currentTarget)==null||l.click()}),onKeyDown:T(t.onKeyDown,g=>{const l=u.searchRef.current!=="";n||l&&g.key===" "||qe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Ee.displayName=we;var Qt=c.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=t,i=tt(we,n),u=qt(n),d=c.useRef(null),h=te(e,d),[f,g]=c.useState(!1),[l,p]=c.useState("");return c.useEffect(()=>{const D=d.current;D&&p((D.textContent??"").trim())},[s.children]),a.jsx(de.ItemSlot,{scope:n,disabled:r,textValue:o??l,children:a.jsx(kr,{asChild:!0,...u,focusable:!r,children:a.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:h,onPointerMove:T(t.onPointerMove,fe(D=>{r?i.onItemLeave(D):(i.onItemEnter(D),D.defaultPrevented||D.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:T(t.onPointerLeave,fe(D=>i.onItemLeave(D))),onFocus:T(t.onFocus,()=>g(!0)),onBlur:T(t.onBlur,()=>g(!1))})})})}),to="MenuCheckboxItem",Jt=c.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...o}=t;return a.jsx(on,{scope:t.__scopeMenu,checked:n,children:a.jsx(Ee,{role:"menuitemcheckbox","aria-checked":Te(n)?"mixed":n,...o,ref:e,"data-state":st(n),onSelect:T(o.onSelect,()=>r==null?void 0:r(Te(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jt.displayName=to;var en="MenuRadioGroup",[no,ro]=ne(en,{value:void 0,onValueChange:()=>{}}),tn=c.forwardRef((t,e)=>{const{value:n,onValueChange:r,...o}=t,s=be(r);return a.jsx(no,{scope:t.__scopeMenu,value:n,onValueChange:s,children:a.jsx(rt,{...o,ref:e})})});tn.displayName=en;var nn="MenuRadioItem",rn=c.forwardRef((t,e)=>{const{value:n,...r}=t,o=ro(nn,t.__scopeMenu),s=n===o.value;return a.jsx(on,{scope:t.__scopeMenu,checked:s,children:a.jsx(Ee,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":st(s),onSelect:T(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});rn.displayName=nn;var ot="MenuItemIndicator",[on,oo]=ne(ot,{checked:!1}),sn=c.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...o}=t,s=oo(ot,n);return a.jsx(he,{present:r||Te(s.checked)||s.checked===!0,children:a.jsx(Z.span,{...o,ref:e,"data-state":st(s.checked)})})});sn.displayName=ot;var so="MenuSeparator",an=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});an.displayName=so;var io="MenuArrow",cn=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(ur,{...o,...r,ref:e})});cn.displayName=io;var ao="MenuSub",[Aa,un]=ne(ao),ue="MenuSubTrigger",ln=c.forwardRef((t,e)=>{const n=re(ue,t.__scopeMenu),r=ve(ue,t.__scopeMenu),o=un(ue,t.__scopeMenu),s=tt(ue,t.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=s,h={__scopeMenu:t.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const g=u.current;return()=>{window.clearTimeout(g),d(null)}},[u,d]),a.jsx(Je,{asChild:!0,...h,children:a.jsx(Qt,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gn(n.open),...t,ref:lr(e,o.onTriggerChange),onClick:g=>{var l;(l=t.onClick)==null||l.call(t,g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:T(t.onPointerMove,fe(g=>{s.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:T(t.onPointerLeave,fe(g=>{var p,D;f();const l=(p=n.content)==null?void 0:p.getBoundingClientRect();if(l){const S=(D=n.content)==null?void 0:D.dataset.side,x=S==="right",w=x?-5:5,I=l[x?"left":"right"],b=l[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:g.clientX+w,y:g.clientY},{x:I,y:l.top},{x:b,y:l.top},{x:b,y:l.bottom},{x:I,y:l.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(g),g.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:T(t.onKeyDown,g=>{var p;const l=s.searchRef.current!=="";t.disabled||l&&g.key===" "||Gr[r.dir].includes(g.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),g.preventDefault())})})})});ln.displayName=ue;var dn="MenuSubContent",fn=c.forwardRef((t,e)=>{const n=Wt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu),u=un(dn,t.__scopeMenu),d=c.useRef(null),h=te(e,d);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:a.jsx(nt,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:h,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var g;i.isUsingKeyboardRef.current&&((g=d.current)==null||g.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:T(t.onFocusOutside,f=>{f.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:T(t.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:T(t.onKeyDown,f=>{var p;const g=f.currentTarget.contains(f.target),l=$r[i.dir].includes(f.key);g&&l&&(s.onOpenChange(!1),(p=u.trigger)==null||p.focus(),f.preventDefault())})})})})})});fn.displayName=dn;function gn(t){return t?"open":"closed"}function Te(t){return t==="indeterminate"}function st(t){return Te(t)?"indeterminate":t?"checked":"unchecked"}function co(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function uo(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function lo(t,e,n){const o=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=uo(t,Math.max(s,0));o.length===1&&(i=i.filter(h=>h!==n));const d=i.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function fo(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const u=e[s],d=e[i],h=u.x,f=u.y,g=d.x,l=d.y;f>r!=l>r&&n<(g-h)*(r-f)/(l-f)+h&&(o=!o)}return o}function go(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return fo(n,e)}function fe(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ho=Yt,po=Je,mo=Xt,vo=zt,xo=rt,Do=Zt,Co=Ee,So=Jt,yo=tn,wo=rn,To=sn,bo=an,Io=cn,Oo=ln,Eo=fn,it="ContextMenu",[Mo,ja]=Qe(it,[Vt]),F=Vt(),[Ro,hn]=Mo(it),pn=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:s=!0}=t,[i,u]=c.useState(!1),d=F(e),h=be(r),f=c.useCallback(g=>{u(g),h(g)},[h]);return a.jsx(Ro,{scope:e,open:i,onOpenChange:f,modal:s,children:a.jsx(ho,{...d,dir:o,open:i,onOpenChange:f,modal:s,children:n})})};pn.displayName=it;var mn="ContextMenuTrigger",vn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,s=hn(mn,n),i=F(n),u=c.useRef({x:0,y:0}),d=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),h=c.useRef(0),f=c.useCallback(()=>window.clearTimeout(h.current),[]),g=l=>{u.current={x:l.clientX,y:l.clientY},s.onOpenChange(!0)};return c.useEffect(()=>f,[f]),c.useEffect(()=>void(r&&f()),[r,f]),a.jsxs(a.Fragment,{children:[a.jsx(po,{...i,virtualRef:d}),a.jsx(Z.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:T(t.onContextMenu,l=>{f(),g(l),l.preventDefault()}),onPointerDown:r?t.onPointerDown:T(t.onPointerDown,De(l=>{f(),h.current=window.setTimeout(()=>g(l),700)})),onPointerMove:r?t.onPointerMove:T(t.onPointerMove,De(f)),onPointerCancel:r?t.onPointerCancel:T(t.onPointerCancel,De(f)),onPointerUp:r?t.onPointerUp:T(t.onPointerUp,De(f))})]})});vn.displayName=mn;var Po="ContextMenuPortal",xn=t=>{const{__scopeContextMenu:e,...n}=t,r=F(e);return a.jsx(mo,{...r,...n})};xn.displayName=Po;var Dn="ContextMenuContent",Cn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=hn(Dn,n),s=F(n),i=c.useRef(!1);return a.jsx(vo,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{var d;(d=t.onCloseAutoFocus)==null||d.call(t,u),!u.defaultPrevented&&i.current&&u.preventDefault(),i.current=!1},onInteractOutside:u=>{var d;(d=t.onInteractOutside)==null||d.call(t,u),!u.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cn.displayName=Dn;var No="ContextMenuGroup",_o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(xo,{...o,...r,ref:e})});_o.displayName=No;var Ao="ContextMenuLabel",jo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Do,{...o,...r,ref:e})});jo.displayName=Ao;var Fo="ContextMenuItem",Sn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Co,{...o,...r,ref:e})});Sn.displayName=Fo;var Lo="ContextMenuCheckboxItem",ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(So,{...o,...r,ref:e})});ko.displayName=Lo;var Uo="ContextMenuRadioGroup",Ho=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(yo,{...o,...r,ref:e})});Ho.displayName=Uo;var Go="ContextMenuRadioItem",$o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(wo,{...o,...r,ref:e})});$o.displayName=Go;var Bo="ContextMenuItemIndicator",Ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(To,{...o,...r,ref:e})});Ko.displayName=Bo;var Vo="ContextMenuSeparator",yn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(bo,{...o,...r,ref:e})});yn.displayName=Vo;var qo="ContextMenuArrow",Yo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Io,{...o,...r,ref:e})});Yo.displayName=qo;var Wo="ContextMenuSubTrigger",Xo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Oo,{...o,...r,ref:e})});Xo.displayName=Wo;var zo="ContextMenuSubContent",Zo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Eo,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zo.displayName=zo;function De(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Qo=pn,Jo=vn,es=xn,ts=Cn,W=Sn,xt=yn;const wn=c.createContext({dragDropManager:void 0});function G(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ct=function(){return Math.random().toString(36).substring(7).split("").join(".")},St={INIT:"@@redux/INIT"+Ct(),REPLACE:"@@redux/REPLACE"+Ct()};function ns(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Tn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(G(1));return n(Tn)(t,e)}if(typeof t!="function")throw new Error(G(2));var o=t,s=e,i=[],u=i,d=!1;function h(){u===i&&(u=i.slice())}function f(){if(d)throw new Error(G(3));return s}function g(S){if(typeof S!="function")throw new Error(G(4));if(d)throw new Error(G(5));var x=!0;return h(),u.push(S),function(){if(x){if(d)throw new Error(G(6));x=!1,h();var I=u.indexOf(S);u.splice(I,1),i=null}}}function l(S){if(!ns(S))throw new Error(G(7));if(typeof S.type>"u")throw new Error(G(8));if(d)throw new Error(G(9));try{d=!0,s=o(s,S)}finally{d=!1}for(var x=i=u,w=0;w<x.length;w++){var I=x[w];I()}return S}function p(S){if(typeof S!="function")throw new Error(G(10));o=S,l({type:St.REPLACE})}function D(){var S,x=g;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(G(11));function b(){I.next&&I.next(f())}b();var M=x(b);return{unsubscribe:M}}},S[Dt]=function(){return this},S}return l({type:St.INIT}),r={dispatch:l,subscribe:g,getState:f,replaceReducer:p},r[Dt]=D,r}function y(t,e,...n){if(rs()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(e.replace(/%s/g,function(){return n[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function rs(){return typeof process<"u"&&!0}function os(t,e,n){return e.split(".").reduce((r,o)=>r&&r[o]?r[o]:n||null,t)}function ss(t,e){return t.filter(n=>n!==e)}function bn(t){return typeof t=="object"}function is(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const o=[];return n.forEach((s,i)=>{s===1&&o.push(i)}),o}function as(t,e){return t.filter(n=>e.indexOf(n)>-1)}const at="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",ct="dnd-core/PUBLISH_DRAG_SOURCE",Re="dnd-core/HOVER",Pe="dnd-core/DROP",Ne="dnd-core/END_DRAG";function yt(t,e){return{type:at,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const cs={type:at,payload:{clientOffset:null,sourceClientOffset:null}};function us(t){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:i}=r,u=t.getMonitor(),d=t.getRegistry();t.dispatch(yt(s)),ls(n,u,d);const h=gs(n,u);if(h==null){t.dispatch(cs);return}let f=null;if(s){if(!i)throw new Error("getSourceClientOffset must be defined");ds(i),f=i(h)}t.dispatch(yt(s,f));const l=d.getSource(h).beginDrag(u,h);if(l==null)return;fs(l),d.pinSource(h);const p=d.getSourceType(h);return{type:Me,payload:{itemType:p,item:l,sourceId:h,clientOffset:s||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}function ls(t,e,n){y(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){y(n.getSource(r),"Expected sourceIds to be registered.")})}function ds(t){y(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function fs(t){y(bn(t),"Item must be an object.")}function gs(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function hs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ps(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){hs(t,o,n[o])})}return t}function ms(t){return function(n={}){const r=t.getMonitor(),o=t.getRegistry();vs(r),Cs(r).forEach((i,u)=>{const d=xs(i,u,o,r),h={type:Pe,payload:{dropResult:ps({},n,d)}};t.dispatch(h)})}}function vs(t){y(t.isDragging(),"Cannot call drop while not dragging."),y(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function xs(t,e,n,r){const o=n.getTarget(t);let s=o?o.drop(r,t):void 0;return Ds(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function Ds(t){y(typeof t>"u"||bn(t),"Drop result must either be an object or undefined.")}function Cs(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Ss(t){return function(){const n=t.getMonitor(),r=t.getRegistry();ys(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:Ne}}}function ys(t){y(t.isDragging(),"Cannot call endDrag while not dragging.")}function Ye(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function ws(t){return function(n,{clientOffset:r}={}){Ts(n);const o=n.slice(0),s=t.getMonitor(),i=t.getRegistry(),u=s.getItemType();return Is(o,i,u),bs(o,s,i),Os(o,s,i),{type:Re,payload:{targetIds:o,clientOffset:r||null}}}}function Ts(t){y(Array.isArray(t),"Expected targetIds to be an array.")}function bs(t,e,n){y(e.isDragging(),"Cannot call hover while not dragging."),y(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const o=t[r];y(t.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");const s=n.getTarget(o);y(s,"Expected targetIds to be registered.")}}function Is(t,e,n){for(let r=t.length-1;r>=0;r--){const o=t[r],s=e.getTargetType(o);Ye(s,n)||t.splice(r,1)}}function Os(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Es(t){return function(){if(t.getMonitor().isDragging())return{type:ct}}}function Ms(t){return{beginDrag:us(t),publishDragSource:Es(t),hover:ws(t),drop:ms(t),endDrag:Ss(t)}}class Rs{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...i)=>{const u=s.apply(e,i);typeof u<"u"&&n(u)}}const o=Ms(this);return Object.keys(o).reduce((s,i)=>{const u=o[i];return s[i]=r(u),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Ps(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ns(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Ps(e,r),n)}function _s(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const le=[],ut=[];le.__IS_NONE__=!0;ut.__IS_ALL__=!0;function As(t,e){return t===le?!1:t===ut||typeof e>"u"?!0:as(e,t).length>0}class js{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;y(typeof e=="function","listener must be a function."),y(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const i=this.store.getState(),u=i.stateId;try{u===o||u===o+1&&!As(i.dirtyHandlerIds,r)||e()}finally{o=u}};return this.store.subscribe(s)}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return y(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(y(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return Ye(r,o)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(y(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!Ye(o,s))return!1;const i=this.getTargetIds();if(!i.length)return!1;const u=i.indexOf(e);return r?u===i.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ns(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _s(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const wt=typeof global<"u"?global:self,On=wt.MutationObserver||wt.WebKitMutationObserver;function En(t){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),t()}}}function Fs(t){let e=1;const n=new On(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ls=typeof On=="function"?Fs:En;class ks{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,o=e.length-this.index;r<o;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ls(this.flush),this.requestErrorThrow=En(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Us{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Hs{create(e){const n=this.freeTasks,r=n.length?n.pop():new Us(this.onError,o=>n[n.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Mn=new ks,Gs=new Hs(Mn.registerPendingError);function $s(t){Mn.enqueueTask(Gs.create(t))}const lt="dnd-core/ADD_SOURCE",dt="dnd-core/ADD_TARGET",ft="dnd-core/REMOVE_SOURCE",_e="dnd-core/REMOVE_TARGET";function Bs(t){return{type:lt,payload:{sourceId:t}}}function Ks(t){return{type:dt,payload:{targetId:t}}}function Vs(t){return{type:ft,payload:{sourceId:t}}}function qs(t){return{type:_e,payload:{targetId:t}}}function Ys(t){y(typeof t.canDrag=="function","Expected canDrag to be a function."),y(typeof t.beginDrag=="function","Expected beginDrag to be a function."),y(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Ws(t){y(typeof t.canDrop=="function","Expected canDrop to be a function."),y(typeof t.hover=="function","Expected hover to be a function."),y(typeof t.drop=="function","Expected beginDrag to be a function.")}function We(t,e){if(e&&Array.isArray(t)){t.forEach(n=>We(n,!1));return}y(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var $;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($||($={}));let Xs=0;function zs(){return Xs++}function Zs(t){const e=zs().toString();switch(t){case $.SOURCE:return`S${e}`;case $.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Tt(t){switch(t[0]){case"S":return $.SOURCE;case"T":return $.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function bt(t,e){const n=t.entries();let r=!1;do{const{done:o,value:[,s]}=n.next();if(s===e)return!0;r=!!o}while(!r);return!1}class Qs{addSource(e,n){We(e),Ys(n);const r=this.addHandler($.SOURCE,e,n);return this.store.dispatch(Bs(r)),r}addTarget(e,n){We(e,!0),Ws(n);const r=this.addHandler($.TARGET,e,n);return this.store.dispatch(Ks(r)),r}containsHandler(e){return bt(this.dragSources,e)||bt(this.dropTargets,e)}getSource(e,n=!1){return y(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Tt(e)===$.SOURCE}isTargetId(e){return Tt(e)===$.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(Vs(e)),$s(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(qs(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);y(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const o=Zs(e);return this.types.set(o,n),e===$.SOURCE?this.dragSources.set(o,r):e===$.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Js=(t,e)=>t===e;function ei(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function ti(t,e,n=Js){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function ni(t=le,e){switch(e.type){case Re:break;case lt:case dt:case _e:case ft:return le;case Me:case ct:case Ne:case Pe:default:return ut}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,o=is(n,r);if(!(o.length>0||!ti(n,r)))return le;const i=r[r.length-1],u=n[n.length-1];return i!==u&&(i&&o.push(i),u&&o.push(u)),o}function ri(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ri(t,o,n[o])})}return t}const It={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function si(t=It,e){const{payload:n}=e;switch(e.type){case at:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Re:return ei(t.clientOffset,n.clientOffset)?t:oi({},t,{clientOffset:n.clientOffset});case Ne:case Pe:return It;default:return t}}function ii(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ae(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ii(t,o,n[o])})}return t}const ai={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ci(t=ai,e){const{payload:n}=e;switch(e.type){case Me:return ae({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ct:return ae({},t,{isSourcePublic:!0});case Re:return ae({},t,{targetIds:n.targetIds});case _e:return t.targetIds.indexOf(n.targetId)===-1?t:ae({},t,{targetIds:ss(t.targetIds,n.targetId)});case Pe:return ae({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ne:return ae({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function ui(t=0,e){switch(e.type){case lt:case dt:return t+1;case ft:case _e:return t-1;default:return t}}function li(t=0){return t+1}function di(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){di(t,o,n[o])})}return t}function gi(t={},e){return{dirtyHandlerIds:ni(t.dirtyHandlerIds,{type:e.type,payload:fi({},e.payload,{prevTargetIds:os(t,"dragOperation.targetIds",[])})}),dragOffset:si(t.dragOffset,e),refCount:ui(t.refCount,e),dragOperation:ci(t.dragOperation,e),stateId:li(t.stateId)}}function hi(t,e=void 0,n={},r=!1){const o=pi(r),s=new js(o,new Qs(o)),i=new Rs(o,s),u=t(i,e,n);return i.receiveBackend(u),i}function pi(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tn(gi,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function mi(t,e){if(t==null)return{};var n=vi(t,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vi(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}let Ot=0;const ye=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var xi=c.memo(function(e){var{children:n}=e,r=mi(e,["children"]);const[o,s]=Di(r);return c.useEffect(()=>{if(s){const i=Rn();return++Ot,()=>{--Ot===0&&(i[ye]=null)}}},[]),a.jsx(wn.Provider,{value:o,children:n})});function Di(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Ci(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function Ci(t,e=Rn(),n,r){const o=e;return o[ye]||(o[ye]={dragDropManager:hi(t,e,n,r)}),o[ye]}function Rn(){return typeof global<"u"?global:window}var ke,Et;function Si(){return Et||(Et=1,ke=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}),ke}var yi=Si();const wi=Kn(yi),J=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Pn(t,e,n){const[r,o]=c.useState(()=>e(t)),s=c.useCallback(()=>{const i=e(t);wi(r,i)||(o(i),n&&n())},[r,t,n]);return J(s),[r,s]}function Ti(t,e,n){const[r,o]=Pn(t,e,n);return J(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(o,{handlerIds:[i]})},[t,o]),r}function Nn(t,e,n){return Ti(e,t||(()=>({})),()=>n.reconnect())}function _n(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),c.useMemo(()=>typeof t=="function"?t():t,n)}function bi(t){return c.useMemo(()=>t.hooks.dragSource(),[t])}function Ii(t){return c.useMemo(()=>t.hooks.dragPreview(),[t])}let Ue=!1,He=!1;class Oi{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Ue,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ue=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ue=!1}}isDragging(){if(!this.sourceId)return!1;y(!He,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return He=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{He=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Ge=!1;class Ei{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;y(!Ge,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ge=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ge=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Mi(t,e,n){const r=n.getRegistry(),o=r.addTarget(t,e);return[o,()=>r.removeTarget(o)]}function Ri(t,e,n){const r=n.getRegistry(),o=r.addSource(t,e);return[o,()=>r.removeSource(o)]}function Xe(t,e,n,r){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;const u=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<s.length;d++){const h=s[d];if(!u(h))return!1;const f=t[h],g=e[h];if(o=void 0,o===!1||o===void 0&&f!==g)return!1}return!0}function ze(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Pi(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ni(t){return(e=null,n=null)=>{if(!c.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return Pi(r),_i(r,n?s=>t(s,n):t)}}function An(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const o=Ni(r);e[n]=()=>o}}),e}function Mt(t,e){typeof t=="function"?t(e):t.current=e}function _i(t,e){const n=t.ref;return y(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?c.cloneElement(t,{ref:r=>{Mt(n,r),Mt(e,r)}}):c.cloneElement(t,{ref:e})}class Ai{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Xe(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Xe(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=An({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,ze(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,ze(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class ji{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Xe(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=An({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,ze(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function oe(){const{dragDropManager:t}=c.useContext(wn);return y(t!=null,"Expected drag drop context"),t}function Fi(t,e){const n=oe(),r=c.useMemo(()=>new Ai(n.getBackend()),[n]);return J(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),J(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Li(){const t=oe();return c.useMemo(()=>new Oi(t),[t])}class ki{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:o}=e;o&&o(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Ui(t,e,n){const r=c.useMemo(()=>new ki(t,e,n),[e,n]);return c.useEffect(()=>{r.spec=t},[t]),r}function Hi(t){return c.useMemo(()=>{const e=t.type;return y(e!=null,"spec.type must be defined"),e},[t])}function Gi(t,e,n){const r=oe(),o=Ui(t,e,n),s=Hi(t);J(function(){if(s!=null){const[u,d]=Ri(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d}},[r,e,n,o,s])}function jn(t,e){const n=_n(t,e);y(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Li(),o=Fi(n.options,n.previewOptions);return Gi(n,r,o),[Nn(n.collect,r,o),bi(o),Ii(o)]}function $i(t){const n=oe().getMonitor(),[r,o]=Pn(n,t);return c.useEffect(()=>n.subscribeToOffsetChange(o)),c.useEffect(()=>n.subscribeToStateChange(o)),r}function Bi(t){return c.useMemo(()=>t.hooks.dropTarget(),[t])}function Ki(t){const e=oe(),n=c.useMemo(()=>new ji(e.getBackend()),[e]);return J(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function Vi(){const t=oe();return c.useMemo(()=>new Ei(t),[t])}function qi(t){const{accept:e}=t;return c.useMemo(()=>(y(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Yi{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Wi(t,e){const n=c.useMemo(()=>new Yi(t,e),[e]);return c.useEffect(()=>{n.spec=t},[t]),n}function Xi(t,e,n){const r=oe(),o=Wi(t,e),s=qi(t);J(function(){const[u,d]=Mi(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d},[r,e,o,n,s.map(i=>i.toString()).join("|")])}function zi(t,e){const n=_n(t,e),r=Vi(),o=Ki(n.options);return Xi(n,r,o),[Nn(n.collect,r,o),Bi(o)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function Zi(t,e){return t.filter(n=>n!==e)}function Qi(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const o=[];return n.forEach(s=>o.push(s)),o}class Ji{enter(e){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=Qi(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Zi(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ea{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Ln="__NATIVE_FILE__",kn="__NATIVE_URL__",Un="__NATIVE_TEXT__",Hn="__NATIVE_HTML__",Rt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Ln,HTML:Hn,TEXT:Un,URL:kn},Symbol.toStringTag,{value:"Module"}));function $e(t,e,n){const r=e.reduce((o,s)=>o||t.getData(s),"");return r??n}const Ze={[Ln]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Hn]:{exposeProperties:{html:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[kn]:{exposeProperties:{urls:(t,e)=>$e(t,e,"").split(`
1
+ import{r as c,j as a,a1 as Kn,c as P,V as _t,b as H,v as Vn,g as qn,a as Yn,z as Wn,L as Xn,S as zn,l as Zn,R as Qn}from"./index-Dj0i1-CA.js";import{u as N,M as Ke}from"./project-BvSOI8MY.js";import{u as te,a as mt,c as Qe,b as At,d as Jn,P as Z,e as T,f as jt,g as er,h as be,i as Ft,A as tr,j as nr,k as rr,R as or,l as sr,F as ir,D as ar,C as cr,m as ur,n as lr,o as dr,p as fr,q as gr}from"./Input-B-oZ6fGO.js";import{M as hr}from"./file-CvJN3aZO.js";import{useFileExplorer as Ie}from"./context-DFNeGsFF.js";import{u as Lt,S as pr}from"./SearchList-W_iT2G82.js";import{u as Fe}from"./editor-CcO28cqd.js";import{F as mr}from"./ChevronDownIcon-MK_nrjD_.js";import{F as vr}from"./ChevronRightIcon-CLWtT22Q.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./help-B59vE3aE.js";import"./popover-_Sf0yvOI.js";function xr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),c.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const Dr=c.forwardRef(xr);function Cr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"}))}const Sr=c.forwardRef(Cr);function yr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const wr=c.forwardRef(yr);function Tr(t,e){return c.useReducer((n,r)=>e[n][r]??n,t)}var he=t=>{const{present:e,children:n}=t,r=br(e),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=te(r.ref,Ir(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};he.displayName="Presence";function br(t){const[e,n]=c.useState(),r=c.useRef(null),o=c.useRef(t),s=c.useRef("none"),i=t?"mounted":"unmounted",[u,d]=Tr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const h=xe(r.current);s.current=u==="mounted"?h:"none"},[u]),mt(()=>{const h=r.current,f=o.current;if(f!==t){const l=s.current,p=xe(h);t?d("MOUNT"):p==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(f&&l!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),mt(()=>{if(e){let h;const f=e.ownerDocument.defaultView??window,g=p=>{const S=xe(r.current).includes(p.animationName);if(p.target===e&&S&&(d("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",h=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},l=p=>{p.target===e&&(s.current=xe(r.current))};return e.addEventListener("animationstart",l),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{f.clearTimeout(h),e.removeEventListener("animationstart",l),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:c.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function xe(t){return(t==null?void 0:t.animationName)||"none"}function Ir(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Le="rovingFocusGroup.onEntryFocus",Or={bubbles:!1,cancelable:!0},pe="RovingFocusGroup",[Ve,kt,Er]=At(pe),[Mr,Ut]=Qe(pe,[Er]),[Rr,Pr]=Mr(pe),Ht=c.forwardRef((t,e)=>a.jsx(Ve.Provider,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Ve.Slot,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Nr,{...t,ref:e})})}));Ht.displayName=pe;var Nr=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:f=!1,...g}=t,l=c.useRef(null),p=te(e,l),D=jt(s),[S,x]=er({prop:i,defaultProp:u??null,onChange:d,caller:pe}),[w,I]=c.useState(!1),b=be(h),M=kt(n),K=c.useRef(!1),[V,A]=c.useState(0);return c.useEffect(()=>{const R=l.current;if(R)return R.addEventListener(Le,b),()=>R.removeEventListener(Le,b)},[b]),a.jsx(Rr,{scope:n,orientation:r,dir:D,loop:o,currentTabStopId:S,onItemFocus:c.useCallback(R=>x(R),[x]),onItemShiftTab:c.useCallback(()=>I(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>A(R=>R-1),[]),children:a.jsx(Z.div,{tabIndex:w||V===0?-1:0,"data-orientation":r,...g,ref:p,style:{outline:"none",...t.style},onMouseDown:T(t.onMouseDown,()=>{K.current=!0}),onFocus:T(t.onFocus,R=>{const j=!K.current;if(R.target===R.currentTarget&&j&&!w){const L=new CustomEvent(Le,Or);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const C=M().filter(q=>q.focusable),E=C.find(q=>q.active),X=C.find(q=>q.id===S),se=[E,X,...C].filter(Boolean).map(q=>q.ref.current);Bt(se,f)}}K.current=!1}),onBlur:T(t.onBlur,()=>I(!1))})})}),Gt="RovingFocusGroupItem",$t=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...u}=t,d=Jn(),h=s||d,f=Pr(Gt,n),g=f.currentTabStopId===h,l=kt(n),{onFocusableItemAdd:p,onFocusableItemRemove:D,currentTabStopId:S}=f;return c.useEffect(()=>{if(r)return p(),()=>D()},[r,p,D]),a.jsx(Ve.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:a.jsx(Z.span,{tabIndex:g?0:-1,"data-orientation":f.orientation,...u,ref:e,onMouseDown:T(t.onMouseDown,x=>{r?f.onItemFocus(h):x.preventDefault()}),onFocus:T(t.onFocus,()=>f.onItemFocus(h)),onKeyDown:T(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=jr(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=l().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const M=b.indexOf(x.currentTarget);b=f.loop?Fr(b,M+1):b.slice(M+1)}setTimeout(()=>Bt(b))}}),children:typeof i=="function"?i({isCurrentTabStop:g,hasTabStop:S!=null}):i})})});$t.displayName=Gt;var _r={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ar(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function jr(t,e,n){const r=Ar(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _r[r]}function Bt(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Fr(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Lr=Ht,kr=$t,qe=["Enter"," "],Ur=["ArrowDown","PageUp","Home"],Kt=["ArrowUp","PageDown","End"],Hr=[...Ur,...Kt],Gr={ltr:[...qe,"ArrowRight"],rtl:[...qe,"ArrowLeft"]},$r={ltr:["ArrowLeft"],rtl:["ArrowRight"]},me="Menu",[de,Br,Kr]=At(me),[ne,Vt]=Qe(me,[Kr,Ft,Ut]),Oe=Ft(),qt=Ut(),[Vr,re]=ne(me),[qr,ve]=ne(me),Yt=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=t,u=Oe(e),[d,h]=c.useState(null),f=c.useRef(!1),g=be(s),l=jt(o);return c.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",D,{capture:!0,once:!0}),document.addEventListener("pointermove",D,{capture:!0,once:!0})},D=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",D,{capture:!0}),document.removeEventListener("pointermove",D,{capture:!0})}},[]),a.jsx(fr,{...u,children:a.jsx(Vr,{scope:e,open:n,onOpenChange:g,content:d,onContentChange:h,children:a.jsx(qr,{scope:e,onClose:c.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:f,dir:l,modal:i,children:r})})})};Yt.displayName=me;var Yr="MenuAnchor",Je=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(tr,{...o,...r,ref:e})});Je.displayName=Yr;var et="MenuPortal",[Wr,Wt]=ne(et,{forceMount:void 0}),Xt=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=re(et,e);return a.jsx(Wr,{scope:e,forceMount:n,children:a.jsx(he,{present:n||s.open,children:a.jsx(gr,{asChild:!0,container:o,children:r})})})};Xt.displayName=et;var B="MenuContent",[Xr,tt]=ne(B),zt=c.forwardRef((t,e)=>{const n=Wt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:i.modal?a.jsx(zr,{...o,ref:e}):a.jsx(Zr,{...o,ref:e})})})})}),zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu),r=c.useRef(null),o=te(e,r);return c.useEffect(()=>{const s=r.current;if(s)return nr(s)},[]),a.jsx(nt,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:T(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu);return a.jsx(nt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qr=sr("MenuContent.ScrollLock"),nt=c.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,disableOutsideScroll:D,...S}=t,x=re(B,n),w=ve(B,n),I=Oe(n),b=qt(n),M=Br(n),[K,V]=c.useState(null),A=c.useRef(null),R=te(e,A,x.onContentChange),j=c.useRef(0),L=c.useRef(""),C=c.useRef(0),E=c.useRef(null),X=c.useRef("right"),Q=c.useRef(0),se=D?or:c.Fragment,q=D?{as:Qr,allowPinchZoom:!0}:void 0,Y=m=>{var ie,ht;const O=L.current+m,_=M().filter(z=>!z.disabled),U=document.activeElement,Ae=(ie=_.find(z=>z.ref.current===U))==null?void 0:ie.textValue,je=_.map(z=>z.textValue),gt=lo(je,O,Ae),ce=(ht=_.find(z=>z.textValue===gt))==null?void 0:ht.ref.current;(function z(pt){L.current=pt,window.clearTimeout(j.current),pt!==""&&(j.current=window.setTimeout(()=>z(""),1e3))})(O),ce&&setTimeout(()=>ce.focus())};c.useEffect(()=>()=>window.clearTimeout(j.current),[]),rr();const v=c.useCallback(m=>{var _,U;return X.current===((_=E.current)==null?void 0:_.side)&&go(m,(U=E.current)==null?void 0:U.area)},[]);return a.jsx(Xr,{scope:n,searchRef:L,onItemEnter:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),onItemLeave:c.useCallback(m=>{var O;v(m)||((O=A.current)==null||O.focus(),V(null))},[v]),onTriggerLeave:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),pointerGraceTimerRef:C,onPointerGraceIntentChange:c.useCallback(m=>{E.current=m},[]),children:a.jsx(se,{...q,children:a.jsx(ir,{asChild:!0,trapped:o,onMountAutoFocus:T(s,m=>{var O;m.preventDefault(),(O=A.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(ar,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,children:a.jsx(Lr,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:K,onCurrentTabStopIdChange:V,onEntryFocus:T(d,m=>{w.isUsingKeyboardRef.current||m.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(cr,{role:"menu","aria-orientation":"vertical","data-state":gn(x.open),"data-radix-menu-content":"",dir:w.dir,...I,...S,ref:R,style:{outline:"none",...S.style},onKeyDown:T(S.onKeyDown,m=>{const _=m.target.closest("[data-radix-menu-content]")===m.currentTarget,U=m.ctrlKey||m.altKey||m.metaKey,Ae=m.key.length===1;_&&(m.key==="Tab"&&m.preventDefault(),!U&&Ae&&Y(m.key));const je=A.current;if(m.target!==je||!Hr.includes(m.key))return;m.preventDefault();const ce=M().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Kt.includes(m.key)&&ce.reverse(),co(ce)}),onBlur:T(t.onBlur,m=>{m.currentTarget.contains(m.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:T(t.onPointerMove,fe(m=>{const O=m.target,_=Q.current!==m.clientX;if(m.currentTarget.contains(O)&&_){const U=m.clientX>Q.current?"right":"left";X.current=U,Q.current=m.clientX}}))})})})})})})});zt.displayName=B;var Jr="MenuGroup",rt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"group",...r,ref:e})});rt.displayName=Jr;var eo="MenuLabel",Zt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{...r,ref:e})});Zt.displayName=eo;var we="MenuItem",vt="menu.itemSelect",Ee=c.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...o}=t,s=c.useRef(null),i=ve(we,t.__scopeMenu),u=tt(we,t.__scopeMenu),d=te(e,s),h=c.useRef(!1),f=()=>{const g=s.current;if(!n&&g){const l=new CustomEvent(vt,{bubbles:!0,cancelable:!0});g.addEventListener(vt,p=>r==null?void 0:r(p),{once:!0}),dr(g,l),l.defaultPrevented?h.current=!1:i.onClose()}};return a.jsx(Qt,{...o,ref:d,disabled:n,onClick:T(t.onClick,f),onPointerDown:g=>{var l;(l=t.onPointerDown)==null||l.call(t,g),h.current=!0},onPointerUp:T(t.onPointerUp,g=>{var l;h.current||(l=g.currentTarget)==null||l.click()}),onKeyDown:T(t.onKeyDown,g=>{const l=u.searchRef.current!=="";n||l&&g.key===" "||qe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Ee.displayName=we;var Qt=c.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=t,i=tt(we,n),u=qt(n),d=c.useRef(null),h=te(e,d),[f,g]=c.useState(!1),[l,p]=c.useState("");return c.useEffect(()=>{const D=d.current;D&&p((D.textContent??"").trim())},[s.children]),a.jsx(de.ItemSlot,{scope:n,disabled:r,textValue:o??l,children:a.jsx(kr,{asChild:!0,...u,focusable:!r,children:a.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:h,onPointerMove:T(t.onPointerMove,fe(D=>{r?i.onItemLeave(D):(i.onItemEnter(D),D.defaultPrevented||D.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:T(t.onPointerLeave,fe(D=>i.onItemLeave(D))),onFocus:T(t.onFocus,()=>g(!0)),onBlur:T(t.onBlur,()=>g(!1))})})})}),to="MenuCheckboxItem",Jt=c.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...o}=t;return a.jsx(on,{scope:t.__scopeMenu,checked:n,children:a.jsx(Ee,{role:"menuitemcheckbox","aria-checked":Te(n)?"mixed":n,...o,ref:e,"data-state":st(n),onSelect:T(o.onSelect,()=>r==null?void 0:r(Te(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jt.displayName=to;var en="MenuRadioGroup",[no,ro]=ne(en,{value:void 0,onValueChange:()=>{}}),tn=c.forwardRef((t,e)=>{const{value:n,onValueChange:r,...o}=t,s=be(r);return a.jsx(no,{scope:t.__scopeMenu,value:n,onValueChange:s,children:a.jsx(rt,{...o,ref:e})})});tn.displayName=en;var nn="MenuRadioItem",rn=c.forwardRef((t,e)=>{const{value:n,...r}=t,o=ro(nn,t.__scopeMenu),s=n===o.value;return a.jsx(on,{scope:t.__scopeMenu,checked:s,children:a.jsx(Ee,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":st(s),onSelect:T(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});rn.displayName=nn;var ot="MenuItemIndicator",[on,oo]=ne(ot,{checked:!1}),sn=c.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...o}=t,s=oo(ot,n);return a.jsx(he,{present:r||Te(s.checked)||s.checked===!0,children:a.jsx(Z.span,{...o,ref:e,"data-state":st(s.checked)})})});sn.displayName=ot;var so="MenuSeparator",an=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});an.displayName=so;var io="MenuArrow",cn=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(ur,{...o,...r,ref:e})});cn.displayName=io;var ao="MenuSub",[Aa,un]=ne(ao),ue="MenuSubTrigger",ln=c.forwardRef((t,e)=>{const n=re(ue,t.__scopeMenu),r=ve(ue,t.__scopeMenu),o=un(ue,t.__scopeMenu),s=tt(ue,t.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=s,h={__scopeMenu:t.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const g=u.current;return()=>{window.clearTimeout(g),d(null)}},[u,d]),a.jsx(Je,{asChild:!0,...h,children:a.jsx(Qt,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gn(n.open),...t,ref:lr(e,o.onTriggerChange),onClick:g=>{var l;(l=t.onClick)==null||l.call(t,g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:T(t.onPointerMove,fe(g=>{s.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:T(t.onPointerLeave,fe(g=>{var p,D;f();const l=(p=n.content)==null?void 0:p.getBoundingClientRect();if(l){const S=(D=n.content)==null?void 0:D.dataset.side,x=S==="right",w=x?-5:5,I=l[x?"left":"right"],b=l[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:g.clientX+w,y:g.clientY},{x:I,y:l.top},{x:b,y:l.top},{x:b,y:l.bottom},{x:I,y:l.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(g),g.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:T(t.onKeyDown,g=>{var p;const l=s.searchRef.current!=="";t.disabled||l&&g.key===" "||Gr[r.dir].includes(g.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),g.preventDefault())})})})});ln.displayName=ue;var dn="MenuSubContent",fn=c.forwardRef((t,e)=>{const n=Wt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu),u=un(dn,t.__scopeMenu),d=c.useRef(null),h=te(e,d);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:a.jsx(nt,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:h,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var g;i.isUsingKeyboardRef.current&&((g=d.current)==null||g.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:T(t.onFocusOutside,f=>{f.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:T(t.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:T(t.onKeyDown,f=>{var p;const g=f.currentTarget.contains(f.target),l=$r[i.dir].includes(f.key);g&&l&&(s.onOpenChange(!1),(p=u.trigger)==null||p.focus(),f.preventDefault())})})})})})});fn.displayName=dn;function gn(t){return t?"open":"closed"}function Te(t){return t==="indeterminate"}function st(t){return Te(t)?"indeterminate":t?"checked":"unchecked"}function co(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function uo(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function lo(t,e,n){const o=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=uo(t,Math.max(s,0));o.length===1&&(i=i.filter(h=>h!==n));const d=i.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function fo(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const u=e[s],d=e[i],h=u.x,f=u.y,g=d.x,l=d.y;f>r!=l>r&&n<(g-h)*(r-f)/(l-f)+h&&(o=!o)}return o}function go(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return fo(n,e)}function fe(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ho=Yt,po=Je,mo=Xt,vo=zt,xo=rt,Do=Zt,Co=Ee,So=Jt,yo=tn,wo=rn,To=sn,bo=an,Io=cn,Oo=ln,Eo=fn,it="ContextMenu",[Mo,ja]=Qe(it,[Vt]),F=Vt(),[Ro,hn]=Mo(it),pn=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:s=!0}=t,[i,u]=c.useState(!1),d=F(e),h=be(r),f=c.useCallback(g=>{u(g),h(g)},[h]);return a.jsx(Ro,{scope:e,open:i,onOpenChange:f,modal:s,children:a.jsx(ho,{...d,dir:o,open:i,onOpenChange:f,modal:s,children:n})})};pn.displayName=it;var mn="ContextMenuTrigger",vn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,s=hn(mn,n),i=F(n),u=c.useRef({x:0,y:0}),d=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),h=c.useRef(0),f=c.useCallback(()=>window.clearTimeout(h.current),[]),g=l=>{u.current={x:l.clientX,y:l.clientY},s.onOpenChange(!0)};return c.useEffect(()=>f,[f]),c.useEffect(()=>void(r&&f()),[r,f]),a.jsxs(a.Fragment,{children:[a.jsx(po,{...i,virtualRef:d}),a.jsx(Z.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:T(t.onContextMenu,l=>{f(),g(l),l.preventDefault()}),onPointerDown:r?t.onPointerDown:T(t.onPointerDown,De(l=>{f(),h.current=window.setTimeout(()=>g(l),700)})),onPointerMove:r?t.onPointerMove:T(t.onPointerMove,De(f)),onPointerCancel:r?t.onPointerCancel:T(t.onPointerCancel,De(f)),onPointerUp:r?t.onPointerUp:T(t.onPointerUp,De(f))})]})});vn.displayName=mn;var Po="ContextMenuPortal",xn=t=>{const{__scopeContextMenu:e,...n}=t,r=F(e);return a.jsx(mo,{...r,...n})};xn.displayName=Po;var Dn="ContextMenuContent",Cn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=hn(Dn,n),s=F(n),i=c.useRef(!1);return a.jsx(vo,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{var d;(d=t.onCloseAutoFocus)==null||d.call(t,u),!u.defaultPrevented&&i.current&&u.preventDefault(),i.current=!1},onInteractOutside:u=>{var d;(d=t.onInteractOutside)==null||d.call(t,u),!u.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cn.displayName=Dn;var No="ContextMenuGroup",_o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(xo,{...o,...r,ref:e})});_o.displayName=No;var Ao="ContextMenuLabel",jo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Do,{...o,...r,ref:e})});jo.displayName=Ao;var Fo="ContextMenuItem",Sn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Co,{...o,...r,ref:e})});Sn.displayName=Fo;var Lo="ContextMenuCheckboxItem",ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(So,{...o,...r,ref:e})});ko.displayName=Lo;var Uo="ContextMenuRadioGroup",Ho=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(yo,{...o,...r,ref:e})});Ho.displayName=Uo;var Go="ContextMenuRadioItem",$o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(wo,{...o,...r,ref:e})});$o.displayName=Go;var Bo="ContextMenuItemIndicator",Ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(To,{...o,...r,ref:e})});Ko.displayName=Bo;var Vo="ContextMenuSeparator",yn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(bo,{...o,...r,ref:e})});yn.displayName=Vo;var qo="ContextMenuArrow",Yo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Io,{...o,...r,ref:e})});Yo.displayName=qo;var Wo="ContextMenuSubTrigger",Xo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Oo,{...o,...r,ref:e})});Xo.displayName=Wo;var zo="ContextMenuSubContent",Zo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Eo,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zo.displayName=zo;function De(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Qo=pn,Jo=vn,es=xn,ts=Cn,W=Sn,xt=yn;const wn=c.createContext({dragDropManager:void 0});function G(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ct=function(){return Math.random().toString(36).substring(7).split("").join(".")},St={INIT:"@@redux/INIT"+Ct(),REPLACE:"@@redux/REPLACE"+Ct()};function ns(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Tn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(G(1));return n(Tn)(t,e)}if(typeof t!="function")throw new Error(G(2));var o=t,s=e,i=[],u=i,d=!1;function h(){u===i&&(u=i.slice())}function f(){if(d)throw new Error(G(3));return s}function g(S){if(typeof S!="function")throw new Error(G(4));if(d)throw new Error(G(5));var x=!0;return h(),u.push(S),function(){if(x){if(d)throw new Error(G(6));x=!1,h();var I=u.indexOf(S);u.splice(I,1),i=null}}}function l(S){if(!ns(S))throw new Error(G(7));if(typeof S.type>"u")throw new Error(G(8));if(d)throw new Error(G(9));try{d=!0,s=o(s,S)}finally{d=!1}for(var x=i=u,w=0;w<x.length;w++){var I=x[w];I()}return S}function p(S){if(typeof S!="function")throw new Error(G(10));o=S,l({type:St.REPLACE})}function D(){var S,x=g;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(G(11));function b(){I.next&&I.next(f())}b();var M=x(b);return{unsubscribe:M}}},S[Dt]=function(){return this},S}return l({type:St.INIT}),r={dispatch:l,subscribe:g,getState:f,replaceReducer:p},r[Dt]=D,r}function y(t,e,...n){if(rs()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(e.replace(/%s/g,function(){return n[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function rs(){return typeof process<"u"&&!0}function os(t,e,n){return e.split(".").reduce((r,o)=>r&&r[o]?r[o]:n||null,t)}function ss(t,e){return t.filter(n=>n!==e)}function bn(t){return typeof t=="object"}function is(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const o=[];return n.forEach((s,i)=>{s===1&&o.push(i)}),o}function as(t,e){return t.filter(n=>e.indexOf(n)>-1)}const at="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",ct="dnd-core/PUBLISH_DRAG_SOURCE",Re="dnd-core/HOVER",Pe="dnd-core/DROP",Ne="dnd-core/END_DRAG";function yt(t,e){return{type:at,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const cs={type:at,payload:{clientOffset:null,sourceClientOffset:null}};function us(t){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:i}=r,u=t.getMonitor(),d=t.getRegistry();t.dispatch(yt(s)),ls(n,u,d);const h=gs(n,u);if(h==null){t.dispatch(cs);return}let f=null;if(s){if(!i)throw new Error("getSourceClientOffset must be defined");ds(i),f=i(h)}t.dispatch(yt(s,f));const l=d.getSource(h).beginDrag(u,h);if(l==null)return;fs(l),d.pinSource(h);const p=d.getSourceType(h);return{type:Me,payload:{itemType:p,item:l,sourceId:h,clientOffset:s||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}function ls(t,e,n){y(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){y(n.getSource(r),"Expected sourceIds to be registered.")})}function ds(t){y(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function fs(t){y(bn(t),"Item must be an object.")}function gs(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function hs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ps(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){hs(t,o,n[o])})}return t}function ms(t){return function(n={}){const r=t.getMonitor(),o=t.getRegistry();vs(r),Cs(r).forEach((i,u)=>{const d=xs(i,u,o,r),h={type:Pe,payload:{dropResult:ps({},n,d)}};t.dispatch(h)})}}function vs(t){y(t.isDragging(),"Cannot call drop while not dragging."),y(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function xs(t,e,n,r){const o=n.getTarget(t);let s=o?o.drop(r,t):void 0;return Ds(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function Ds(t){y(typeof t>"u"||bn(t),"Drop result must either be an object or undefined.")}function Cs(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Ss(t){return function(){const n=t.getMonitor(),r=t.getRegistry();ys(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:Ne}}}function ys(t){y(t.isDragging(),"Cannot call endDrag while not dragging.")}function Ye(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function ws(t){return function(n,{clientOffset:r}={}){Ts(n);const o=n.slice(0),s=t.getMonitor(),i=t.getRegistry(),u=s.getItemType();return Is(o,i,u),bs(o,s,i),Os(o,s,i),{type:Re,payload:{targetIds:o,clientOffset:r||null}}}}function Ts(t){y(Array.isArray(t),"Expected targetIds to be an array.")}function bs(t,e,n){y(e.isDragging(),"Cannot call hover while not dragging."),y(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const o=t[r];y(t.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");const s=n.getTarget(o);y(s,"Expected targetIds to be registered.")}}function Is(t,e,n){for(let r=t.length-1;r>=0;r--){const o=t[r],s=e.getTargetType(o);Ye(s,n)||t.splice(r,1)}}function Os(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Es(t){return function(){if(t.getMonitor().isDragging())return{type:ct}}}function Ms(t){return{beginDrag:us(t),publishDragSource:Es(t),hover:ws(t),drop:ms(t),endDrag:Ss(t)}}class Rs{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...i)=>{const u=s.apply(e,i);typeof u<"u"&&n(u)}}const o=Ms(this);return Object.keys(o).reduce((s,i)=>{const u=o[i];return s[i]=r(u),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Ps(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ns(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Ps(e,r),n)}function _s(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const le=[],ut=[];le.__IS_NONE__=!0;ut.__IS_ALL__=!0;function As(t,e){return t===le?!1:t===ut||typeof e>"u"?!0:as(e,t).length>0}class js{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;y(typeof e=="function","listener must be a function."),y(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const i=this.store.getState(),u=i.stateId;try{u===o||u===o+1&&!As(i.dirtyHandlerIds,r)||e()}finally{o=u}};return this.store.subscribe(s)}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return y(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(y(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return Ye(r,o)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(y(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!Ye(o,s))return!1;const i=this.getTargetIds();if(!i.length)return!1;const u=i.indexOf(e);return r?u===i.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ns(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _s(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const wt=typeof global<"u"?global:self,On=wt.MutationObserver||wt.WebKitMutationObserver;function En(t){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),t()}}}function Fs(t){let e=1;const n=new On(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ls=typeof On=="function"?Fs:En;class ks{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,o=e.length-this.index;r<o;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ls(this.flush),this.requestErrorThrow=En(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Us{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Hs{create(e){const n=this.freeTasks,r=n.length?n.pop():new Us(this.onError,o=>n[n.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Mn=new ks,Gs=new Hs(Mn.registerPendingError);function $s(t){Mn.enqueueTask(Gs.create(t))}const lt="dnd-core/ADD_SOURCE",dt="dnd-core/ADD_TARGET",ft="dnd-core/REMOVE_SOURCE",_e="dnd-core/REMOVE_TARGET";function Bs(t){return{type:lt,payload:{sourceId:t}}}function Ks(t){return{type:dt,payload:{targetId:t}}}function Vs(t){return{type:ft,payload:{sourceId:t}}}function qs(t){return{type:_e,payload:{targetId:t}}}function Ys(t){y(typeof t.canDrag=="function","Expected canDrag to be a function."),y(typeof t.beginDrag=="function","Expected beginDrag to be a function."),y(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Ws(t){y(typeof t.canDrop=="function","Expected canDrop to be a function."),y(typeof t.hover=="function","Expected hover to be a function."),y(typeof t.drop=="function","Expected beginDrag to be a function.")}function We(t,e){if(e&&Array.isArray(t)){t.forEach(n=>We(n,!1));return}y(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var $;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($||($={}));let Xs=0;function zs(){return Xs++}function Zs(t){const e=zs().toString();switch(t){case $.SOURCE:return`S${e}`;case $.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Tt(t){switch(t[0]){case"S":return $.SOURCE;case"T":return $.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function bt(t,e){const n=t.entries();let r=!1;do{const{done:o,value:[,s]}=n.next();if(s===e)return!0;r=!!o}while(!r);return!1}class Qs{addSource(e,n){We(e),Ys(n);const r=this.addHandler($.SOURCE,e,n);return this.store.dispatch(Bs(r)),r}addTarget(e,n){We(e,!0),Ws(n);const r=this.addHandler($.TARGET,e,n);return this.store.dispatch(Ks(r)),r}containsHandler(e){return bt(this.dragSources,e)||bt(this.dropTargets,e)}getSource(e,n=!1){return y(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Tt(e)===$.SOURCE}isTargetId(e){return Tt(e)===$.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(Vs(e)),$s(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(qs(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);y(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const o=Zs(e);return this.types.set(o,n),e===$.SOURCE?this.dragSources.set(o,r):e===$.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Js=(t,e)=>t===e;function ei(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function ti(t,e,n=Js){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function ni(t=le,e){switch(e.type){case Re:break;case lt:case dt:case _e:case ft:return le;case Me:case ct:case Ne:case Pe:default:return ut}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,o=is(n,r);if(!(o.length>0||!ti(n,r)))return le;const i=r[r.length-1],u=n[n.length-1];return i!==u&&(i&&o.push(i),u&&o.push(u)),o}function ri(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ri(t,o,n[o])})}return t}const It={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function si(t=It,e){const{payload:n}=e;switch(e.type){case at:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Re:return ei(t.clientOffset,n.clientOffset)?t:oi({},t,{clientOffset:n.clientOffset});case Ne:case Pe:return It;default:return t}}function ii(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ae(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ii(t,o,n[o])})}return t}const ai={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ci(t=ai,e){const{payload:n}=e;switch(e.type){case Me:return ae({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ct:return ae({},t,{isSourcePublic:!0});case Re:return ae({},t,{targetIds:n.targetIds});case _e:return t.targetIds.indexOf(n.targetId)===-1?t:ae({},t,{targetIds:ss(t.targetIds,n.targetId)});case Pe:return ae({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ne:return ae({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function ui(t=0,e){switch(e.type){case lt:case dt:return t+1;case ft:case _e:return t-1;default:return t}}function li(t=0){return t+1}function di(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){di(t,o,n[o])})}return t}function gi(t={},e){return{dirtyHandlerIds:ni(t.dirtyHandlerIds,{type:e.type,payload:fi({},e.payload,{prevTargetIds:os(t,"dragOperation.targetIds",[])})}),dragOffset:si(t.dragOffset,e),refCount:ui(t.refCount,e),dragOperation:ci(t.dragOperation,e),stateId:li(t.stateId)}}function hi(t,e=void 0,n={},r=!1){const o=pi(r),s=new js(o,new Qs(o)),i=new Rs(o,s),u=t(i,e,n);return i.receiveBackend(u),i}function pi(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tn(gi,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function mi(t,e){if(t==null)return{};var n=vi(t,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vi(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}let Ot=0;const ye=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var xi=c.memo(function(e){var{children:n}=e,r=mi(e,["children"]);const[o,s]=Di(r);return c.useEffect(()=>{if(s){const i=Rn();return++Ot,()=>{--Ot===0&&(i[ye]=null)}}},[]),a.jsx(wn.Provider,{value:o,children:n})});function Di(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Ci(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function Ci(t,e=Rn(),n,r){const o=e;return o[ye]||(o[ye]={dragDropManager:hi(t,e,n,r)}),o[ye]}function Rn(){return typeof global<"u"?global:window}var ke,Et;function Si(){return Et||(Et=1,ke=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}),ke}var yi=Si();const wi=Kn(yi),J=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Pn(t,e,n){const[r,o]=c.useState(()=>e(t)),s=c.useCallback(()=>{const i=e(t);wi(r,i)||(o(i),n&&n())},[r,t,n]);return J(s),[r,s]}function Ti(t,e,n){const[r,o]=Pn(t,e,n);return J(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(o,{handlerIds:[i]})},[t,o]),r}function Nn(t,e,n){return Ti(e,t||(()=>({})),()=>n.reconnect())}function _n(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),c.useMemo(()=>typeof t=="function"?t():t,n)}function bi(t){return c.useMemo(()=>t.hooks.dragSource(),[t])}function Ii(t){return c.useMemo(()=>t.hooks.dragPreview(),[t])}let Ue=!1,He=!1;class Oi{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Ue,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ue=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ue=!1}}isDragging(){if(!this.sourceId)return!1;y(!He,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return He=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{He=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Ge=!1;class Ei{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;y(!Ge,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ge=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ge=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Mi(t,e,n){const r=n.getRegistry(),o=r.addTarget(t,e);return[o,()=>r.removeTarget(o)]}function Ri(t,e,n){const r=n.getRegistry(),o=r.addSource(t,e);return[o,()=>r.removeSource(o)]}function Xe(t,e,n,r){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;const u=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<s.length;d++){const h=s[d];if(!u(h))return!1;const f=t[h],g=e[h];if(o=void 0,o===!1||o===void 0&&f!==g)return!1}return!0}function ze(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Pi(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ni(t){return(e=null,n=null)=>{if(!c.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return Pi(r),_i(r,n?s=>t(s,n):t)}}function An(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const o=Ni(r);e[n]=()=>o}}),e}function Mt(t,e){typeof t=="function"?t(e):t.current=e}function _i(t,e){const n=t.ref;return y(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?c.cloneElement(t,{ref:r=>{Mt(n,r),Mt(e,r)}}):c.cloneElement(t,{ref:e})}class Ai{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Xe(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Xe(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=An({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,ze(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,ze(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class ji{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Xe(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=An({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,ze(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function oe(){const{dragDropManager:t}=c.useContext(wn);return y(t!=null,"Expected drag drop context"),t}function Fi(t,e){const n=oe(),r=c.useMemo(()=>new Ai(n.getBackend()),[n]);return J(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),J(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Li(){const t=oe();return c.useMemo(()=>new Oi(t),[t])}class ki{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:o}=e;o&&o(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Ui(t,e,n){const r=c.useMemo(()=>new ki(t,e,n),[e,n]);return c.useEffect(()=>{r.spec=t},[t]),r}function Hi(t){return c.useMemo(()=>{const e=t.type;return y(e!=null,"spec.type must be defined"),e},[t])}function Gi(t,e,n){const r=oe(),o=Ui(t,e,n),s=Hi(t);J(function(){if(s!=null){const[u,d]=Ri(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d}},[r,e,n,o,s])}function jn(t,e){const n=_n(t,e);y(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Li(),o=Fi(n.options,n.previewOptions);return Gi(n,r,o),[Nn(n.collect,r,o),bi(o),Ii(o)]}function $i(t){const n=oe().getMonitor(),[r,o]=Pn(n,t);return c.useEffect(()=>n.subscribeToOffsetChange(o)),c.useEffect(()=>n.subscribeToStateChange(o)),r}function Bi(t){return c.useMemo(()=>t.hooks.dropTarget(),[t])}function Ki(t){const e=oe(),n=c.useMemo(()=>new ji(e.getBackend()),[e]);return J(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function Vi(){const t=oe();return c.useMemo(()=>new Ei(t),[t])}function qi(t){const{accept:e}=t;return c.useMemo(()=>(y(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Yi{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Wi(t,e){const n=c.useMemo(()=>new Yi(t,e),[e]);return c.useEffect(()=>{n.spec=t},[t]),n}function Xi(t,e,n){const r=oe(),o=Wi(t,e),s=qi(t);J(function(){const[u,d]=Mi(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d},[r,e,o,n,s.map(i=>i.toString()).join("|")])}function zi(t,e){const n=_n(t,e),r=Vi(),o=Ki(n.options);return Xi(n,r,o),[Nn(n.collect,r,o),Bi(o)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function Zi(t,e){return t.filter(n=>n!==e)}function Qi(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const o=[];return n.forEach(s=>o.push(s)),o}class Ji{enter(e){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=Qi(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Zi(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ea{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Ln="__NATIVE_FILE__",kn="__NATIVE_URL__",Un="__NATIVE_TEXT__",Hn="__NATIVE_HTML__",Rt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Ln,HTML:Hn,TEXT:Un,URL:kn},Symbol.toStringTag,{value:"Module"}));function $e(t,e,n){const r=e.reduce((o,s)=>o||t.getData(s),"");return r??n}const Ze={[Ln]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Hn]:{exposeProperties:{html:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[kn]:{exposeProperties:{urls:(t,e)=>$e(t,e,"").split(`
2
2
  `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Un]:{exposeProperties:{text:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function ta(t,e){const n=Ze[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new ea(n);return r.loadDataTransfer(e),r}function Be(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Ze).filter(n=>{const r=Ze[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const na=Fn(()=>/firefox/i.test(navigator.userAgent)),Gn=Fn(()=>!!window.safari);class Pt{interpolate(e){const{xs:n,ys:r,c1s:o,c2s:s,c3s:i}=this;let u=n.length-1;if(e===n[u])return r[u];let d=0,h=i.length-1,f;for(;d<=h;){f=Math.floor(.5*(d+h));const p=n[f];if(p<e)d=f+1;else if(p>e)h=f-1;else return r[f]}u=Math.max(0,h);const g=e-n[u],l=g*g;return r[u]+o[u]*g+s[u]*l+i[u]*g*l}constructor(e,n){const{length:r}=e,o=[];for(let p=0;p<r;p++)o.push(p);o.sort((p,D)=>e[p]<e[D]?-1:1);const s=[],i=[];let u,d;for(let p=0;p<r-1;p++)u=e[p+1]-e[p],d=n[p+1]-n[p],s.push(u),i.push(d/u);const h=[i[0]];for(let p=0;p<s.length-1;p++){const D=i[p],S=i[p+1];if(D*S<=0)h.push(0);else{u=s[p];const x=s[p+1],w=u+x;h.push(3*w/((w+x)/D+(w+u)/S))}}h.push(i[i.length-1]);const f=[],g=[];let l;for(let p=0;p<h.length-1;p++){l=i[p];const D=h[p],S=1/s[p],x=D+h[p+1]-l-l;f.push((l-D-x)*S),g.push(x*S*S)}this.xs=e,this.ys=n,this.c1s=h,this.c2s=f,this.c3s=g}}const ra=1;function $n(t){const e=t.nodeType===ra?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Ce(t){return{x:t.clientX,y:t.clientY}}function oa(t){var e;return t.nodeName==="IMG"&&(na()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function sa(t,e,n,r){let o=t?e.width:n,s=t?e.height:r;return Gn()&&t&&(s/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:s}}function ia(t,e,n,r,o){const s=oa(e),u=$n(s?t:e),d={x:n.x-u.x,y:n.y-u.y},{offsetWidth:h,offsetHeight:f}=t,{anchorX:g,anchorY:l}=r,{dragPreviewWidth:p,dragPreviewHeight:D}=sa(s,e,h,f),S=()=>{let V=new Pt([0,.5,1],[d.y,d.y/f*D,d.y+D-f]).interpolate(l);return Gn()&&s&&(V+=(window.devicePixelRatio-1)*D),V},x=()=>new Pt([0,.5,1],[d.x,d.x/h*p,d.x+p-h]).interpolate(g),{offsetX:w,offsetY:I}=o,b=w===0||w,M=I===0||I;return{x:b?w:x(),y:M?I:S()}}class aa{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function ca(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){ca(t,o,n[o])})}return t}class ua{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const o=i=>this.handleDragStart(i,e),s=i=>this.handleSelectStart(i);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=i=>this.handleDragEnter(i,e),o=i=>this.handleDragOver(i,e),s=i=>this.handleDrop(i,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",o),n.addEventListener("drop",s),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",o),n.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Nt({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Nt({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Rt).some(n=>Rt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=ta(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const s=this.sourceNodes.get(o);return s&&$n(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const i=Ce(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});const{dataTransfer:u}=o,d=Be(u);if(this.monitor.isDragging()){if(u&&typeof u.setDragImage=="function"){const f=this.monitor.getSourceId(),g=this.sourceNodes.get(f),l=this.sourcePreviewNodes.get(f)||g;if(l){const{anchorX:p,anchorY:D,offsetX:S,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),b=ia(g,l,i,{anchorX:p,anchorY:D},{offsetX:S,offsetY:x});u.setDragImage(l,b.x,b.y)}}try{u==null||u.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:h}=this.getCurrentSourcePreviewNodeOptions();h?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(u&&!u.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:u}=o,d=Be(u);d&&this.beginDragNativeItem(d,u)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,s.length>0&&this.actions.hover(s,{clientOffset:Ce(o)}),s.some(u=>this.monitor.canDropOnTarget(u))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=Ce(o),this.scheduleHover(s),(s||[]).some(u=>this.monitor.canDropOnTarget(u))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;o.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else Be(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:Ce(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))},this.options=new aa(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Ji(this.isNodeInDocument)}}let Se;function Bn(){return Se||(Se=new Image,Se.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Se}const la=function(e,n,r){return new ua(e,n,r)};function ee({file:t,className:e,style:n}){const r=N(C=>C.selectedFile),o=N(C=>C.setSelectedFile),s=N(C=>C.activeRange),i=N(C=>C.setActiveRange),u=N(C=>C.inActiveRange),d=Fe(C=>C.addTab),h=Fe(C=>C.selectTab),f=Fe(C=>C.createTab),[g,l]=c.useState(!1),p=Lt(()=>l(!0),{threshold:50,onFinish(){l(!1)},onCancel(){l(!1)}}),{setArtifactRename:D,renameArtifact:S,artifactRename:x,selectArtifactsInRange:w,removeArtifactWithConfirmation:I}=Ie(),[b,M]=c.useState(!1),[{isDragging:K},V,A]=jn(()=>({type:"artifact",item:t,end(){l(!1)},canDrag(){return x!==t&&g},collect(C){return{isDragging:C.isDragging()}}}),[t,x,g]);c.useEffect(()=>{A(Bn(),{captureDraggingState:!0})},[A]);function R(C){C.stopPropagation(),C.shiftKey&&C.preventDefault();let E=s;C.metaKey?(u(t)?E=E.filter(X=>X!==t):E.push(t),i(E)):C.shiftKey&&E.length>0?w(t):(E.length>0&&(E=[]),E.push(t),i(E),o(t))}function j(){const C=f(t);d(C),h(C)}const L=s.length>1&&u(t);return a.jsx("div",{...p,ref:V,children:a.jsxs(k.Container,{artifact:t,isSelected:r===t,className:P(x===t&&"bg-primary-10",b&&"bg-primary-10",g&&"bg-primary-10 !cursor-grabbing outline-2 !outline-primary-500",K&&"opacity-50",e),style:n,onDoubleClick:C=>{C.stopPropagation(),j()},handleSelect:R,children:[a.jsx(ee.Icons,{}),x===t?a.jsx(k.Rename,{artifact:x,rename:S,close:()=>D(void 0)}):a.jsxs(k.ContextMenu,{trigger:a.jsx(k.ContextMenuTrigger,{children:a.jsx(ee.Display,{file:t})}),onOpenChange:M,children:[r!==t&&a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",L?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:L,onClick:C=>{C.stopPropagation()},onSelect:C=>{C.stopPropagation(),j()},children:["Open in New Tab",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",L?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:L,onClick:C=>{C.stopPropagation()},onSelect:C=>{C.stopPropagation(),D(t)},children:["Rename",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:C=>{C.stopPropagation(),I(t)},children:["Remove ",u(t)?s.length:"",a.jsx("div",{className:"ml-auto pl-5"})]})]})]})})}function da({file:t}){return a.jsx("span",{title:t.name,className:P("inline-block overflow-hidden overflow-ellipsis py-[0.125rem]"),children:_t(t.name,50,20)})}function fa(){return a.jsx("div",{className:"flex items-center",children:a.jsx(Dr,{className:"inline-block w-3 ml-1 mr-2"})})}ee.Display=da;ee.Icons=fa;const ge=function t({directory:e,className:n,style:r}){const o=N(v=>v.selectedFile),s=N(v=>v.activeRange),i=N(v=>v.setActiveRange),u=N(v=>v.inActiveRange),[d,h]=c.useState(e.isOpened),[f,g]=c.useState(!1),[l,p]=c.useState(!1),D=Lt(()=>p(!0),{threshold:50,onFinish(){p(!1)},onCancel(){p(!1)}}),{setArtifactRename:S,renameArtifact:x,artifactRename:w,createDirectory:I,createFile:b,moveArtifacts:M,removeArtifactWithConfirmation:K,selectArtifactsInRange:V}=Ie(),[{isOver:A},R]=zi(()=>({accept:"artifact",drop(v,m){if(H(m.canDrop()))return;const O=u(v)?s:[v];M(O,e),e.open()},canDrop(v,m){const O=u(v)?s:[v];return m.isOver({shallow:!0})&&qn(O)&&O.reduce((_,U)=>!(H(_)||U.parent===e||U===e||U instanceof Ke&&U.hasDirectory(e)),!0)},collect(v){return{isOver:v.isOver({shallow:!0})&&v.canDrop()}}}),[s]),[{isDragging:j},L,C]=jn(()=>({type:"artifact",item:e,end(){p(!1)},canDrag(){return w!==e&&l},collect(v){return{isDragging:v.isDragging()}}}),[e,w,l]),[E,X,Q,se]=c.useMemo(()=>{if(s.length<2)return[!1,!1,!1,!1];let v=!0,m=!0,O=!0;for(const _ of Array.from(s))_ instanceof Ke&&v?(m&&(m=_.isOpened),O&&(O=_.isClosed)):v=!1;return[v,m,O,H(m)&&H(O)]},[s]);c.useEffect(()=>{e.syncStateOpen=h},[e]),c.useEffect(()=>{C(Bn(),{captureDraggingState:!0})},[C]),c.useEffect(()=>{Vn(o)||d||e.hasFile(o)&&e.open()},[o]);function q(v){v.stopPropagation(),v.shiftKey||v.metaKey?v.preventDefault():e.toggle();let m=s;v.metaKey?(u(e)?m=m.filter(O=>O!==e):m.push(e),i(m)):v.shiftKey&&m.length>0?V(e):(m.length>0&&(m=[]),m.push(e),i(m))}const Y=s.length>1&&u(e);return a.jsx("div",{className:P("h-full",j&&"opacity-50"),children:a.jsxs("div",{ref:R,className:P(A&&H(j)&&"bg-primary-5"),children:[e.withParent&&a.jsx("div",{...D,ref:e.withParent?L:void 0,children:a.jsxs(k.Container,{artifact:e,className:P(w===e&&"bg-primary-10",l&&"bg-primary-10 !cursor-grabbing",f&&"bg-primary-10",n),style:r,handleSelect:q,children:[a.jsx(t.Icons,{isOpen:d||A&&H(j)}),w===e?a.jsx(k.Rename,{artifact:w,rename:x,close:()=>S(void 0)}):a.jsxs(k.ContextMenu,{trigger:a.jsx(k.ContextMenuTrigger,{children:a.jsx(t.Display,{directory:e})}),onOpenChange:g,children:[a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y&&H(E)?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y&&H(E),onSelect:v=>{v.stopPropagation(),s.length>1&&u(e)?s.forEach(m=>{X?m.collapse():Q?m.expand():se&&(m.isOpened?m.collapse():m.expand())}):e.isOpened?e.collapse():e.expand(),i([])},children:[E&&X&&"Collapse All",E&&Q&&"Expand All",E&&se&&"Toggle All",H(E)&&e.isOpened&&"Collapse",H(E)&&e.isClosed&&"Expand",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsx(xt,{className:"h-[1px] bg-accent-200 m-2"}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y,onSelect:v=>{v.stopPropagation(),b(e)},children:["New File",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y,onSelect:v=>{v.stopPropagation(),I(e)},children:["New Folder",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsx(xt,{className:"h-[1px] bg-accent-200 m-2"}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y,onClick:v=>{v.stopPropagation()},onSelect:v=>{v.stopPropagation(),S(e)},children:["Rename",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:v=>{v.stopPropagation(),K(e)},children:["Remove ",u(e)?s.length:"",a.jsx("div",{className:"ml-auto pl-5"})]})]})]})}),(A&&H(j)||d||!e.withParent)&&e.withDirectories&&a.jsx("ul",{className:P(u(e)&&"bg-primary-5"),children:e.directories.map(v=>a.jsx("li",{title:v.name,children:a.jsx(t,{directory:v,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},v.id)},v.id))}),(A&&H(j)||d||!e.withParent)&&e.withFiles&&a.jsx("ul",{className:P(u(e)&&"bg-primary-5"),children:e.files.map(v=>a.jsx("li",{title:v.name,children:a.jsx(ee,{file:v,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},v.id)},v.id))})]})})};function ga({directory:t}){return a.jsxs("div",{className:"w-full flex justify-between items-center py-[0.125rem]",children:[a.jsx("span",{title:t.name,className:"overflow-hidden overflow-ellipsis whitespace-nowrap",children:_t(t.name,50,20)}),a.jsx("span",{className:"inline-block text-xs rounded-full px-2 bg-neutral-10 ml-2",children:t.directories.length+t.files.length})]})}function ha({hasChevron:t=!0,hasFolder:e=!0,isOpen:n=!1,className:r}){const o=n?mr:vr,s=n?Sr:wr;return a.jsxs("div",{className:P("flex items-center mr-2",r),children:[t&&a.jsx(o,{className:"inline-block w-5"}),e&&a.jsx(s,{className:"inline-block w-4 fill-primary-500"})]})}ge.Icons=ha;ge.Display=ga;const pa={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function ma(){const t=N(i=>i.activeRange),e=N(i=>i.inActiveRange),{isDragging:n,currentOffset:r,artifact:o}=$i(i=>({artifact:i.getItem(),isDragging:i.isDragging(),currentOffset:i.getSourceClientOffset()})),s=c.useMemo(()=>Array.from(e(o)?t:new Set([o])).filter(Boolean),[t,o]);return a.jsx(a.Fragment,{children:n&&a.jsx("div",{style:pa,children:a.jsx("div",{style:va(r),className:"!cursor-grabbing !rounded-lg overflow-hidden",children:s.map(i=>a.jsxs("span",{children:[i instanceof Ke&&a.jsxs(k.Container,{artifact:i,className:"bg-theme",children:[a.jsx(ge.Icons,{hasChevron:!1}),a.jsx(ge.Display,{directory:i})]},i.path),i instanceof hr&&a.jsxs(k.Container,{artifact:i,className:"bg-theme",children:[a.jsx(ee.Icons,{}),a.jsx(ee.Display,{file:i})]},i.path)]},i.id))})})})}function va(t){if(t==null)return{display:"none"};const{x:e,y:n}=t;return{display:"inline-block",transform:`translate(${e}px, ${n}px)`,filter:"drop-shadow(0 2px 12px rgba(0,0,0,0.45))"}}const k=function t({className:e}){const n=N(l=>l.project),r=N(l=>l.setSelectedFile),o=N(l=>l.activeRange),s=N(l=>l.setActiveRange),i=Yn(l=>l.addConfirmation),{isFetching:u}=Wn(),{removeArtifacts:d,createDirectory:h,createFile:f}=Ie();function g(l){l.key==="Escape"&&s([]),l.ctrlKey&&l.key==="Backspace"&&o.length>0&&i({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${o.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:Array.from(o).map(p=>p.path),action:()=>{d(o)}})}return a.jsx("div",{tabIndex:0,className:P("flex flex-col w-full h-full overflow-hidden text-sm text-neutral-500 dark:text-neutral-400 font-regular select-none",e),onKeyDown:g,children:u?a.jsx("div",{className:"flex justify-center items-center w-full h-full",children:a.jsxs(Xn,{className:"inline-block",children:[a.jsx(zn,{className:"w-3 h-3 border border-neutral-10 mr-2"}),a.jsx("h3",{className:"text-md",children:"Getting Project Files..."})]})}):a.jsxs(a.Fragment,{children:[a.jsx(pr,{list:n.allFiles,searchBy:"path",displayBy:"name",size:Zn.sm,onSelect:r,direction:"top",isFullWidth:!0}),a.jsxs(t.ContextMenu,{trigger:a.jsx(t.ContextMenuTrigger,{className:"h-full pb-1",children:a.jsx(xi,{backend:la,children:a.jsxs("div",{className:"w-full relative h-full px-1 overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:[a.jsx(ma,{}),a.jsx(ge,{className:"z-20 relative",directory:n},n.id)]})})}),children:[a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:l=>{l.stopPropagation(),f(n)},children:["New File",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:l=>{l.stopPropagation(),h(n)},children:["New Folder",a.jsx("div",{className:"ml-auto pl-5"})]})]},n.id)]})})};function xa({trigger:t,children:e,onOpenChange:n}){return a.jsxs(Qo,{onOpenChange:n,children:[t,a.jsx(es,{children:a.jsx(ts,{className:"bg-light rounded-md overflow-hidden shadow-lg py-2 px-1 z-50",onClick:r=>{r.stopPropagation()},children:e})})]})}function Da({children:t,className:e}){return a.jsx(Jo,{className:P("flex w-full overflow-hidden",e),onContextMenu:n=>{n.stopPropagation()},children:t})}function Ca({artifact:t,rename:e,close:n}){const r=Qn.useRef(null),[o,s]=c.useState("");return c.useEffect(()=>{s(t.name),setTimeout(()=>{var i;(i=r.current)==null||i.focus()},100)},[t]),a.jsx("div",{className:"w-full flex items-center py-[0.125rem] pr-2",children:a.jsx("input",{ref:r,type:"text",className:"w-full overflow-hidden overflow-ellipsis bg-primary-900 text-primary-100",value:o,onInput:i=>{i.stopPropagation(),s(i.target.value)},onBlur:i=>{i.stopPropagation(),n()},onKeyDown:i=>{i.key==="Enter"&&(i.stopPropagation(),o.trim()!==""&&o!==t.name&&e(t,o),n()),i.key==="Escape"&&(i.stopPropagation(),n())}})})}function Sa({artifact:t,children:e,isSelected:n=!1,className:r,style:o,handleSelect:s,onDoubleClick:i}){const{setArtifactRename:u,isBottomGroupInActiveRange:d,isTopGroupInActiveRange:h,isMiddleGroupInActiveRange:f}=Ie(),g=N(p=>p.activeRange),l=N(p=>p.inActiveRange);return a.jsx("span",{tabIndex:0,className:P("w-full flex items-center group/file px-2",r,h(t)?"rounded-t-md":d(t)?"rounded-b-md":f(t)?"":l(t)&&"rounded-md",l(t)&&g.length>1&&g.indexOf(t)<g.length-1?"border-b border-primary-400":"border-b border-transparent",l(t)?"bg-primary-10 dark:bg-primary-20":n&&"rounded-md bg-neutral-10 text-neutral-600 dark:bg-dark-lighter dark:text-primary-500"),style:o,onClick:s,onDoubleClick:i,onKeyDown:p=>{p.key==="Enter"&&(p.stopPropagation(),u(t),s==null||s(p)),p.key===" "&&(p.stopPropagation(),s==null||s(p))},children:e})}k.ContextMenu=xa;k.ContextMenuTrigger=Da;k.Rename=Ca;k.Container=Sa;export{k as default};
@@ -1 +1 @@
1
- import{a as n,j as e,i as r}from"./index-O3mjYpnE.js";function i(){const s=n(t=>t.version);return e.jsxs("footer",{className:"px-2 py-1 text-xs flex justify-between",children:[e.jsx("span",{children:r(s)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hidden sm:inline",children:"SQLMesh: "}),e.jsx("span",{title:"SQLMesh Version",className:"font-black inline-block mr-4",children:s})]})}),e.jsxs("small",{className:"text-xs",children:["© ",new Date().getFullYear()," ",e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",className:"underline",title:"Tobiko Data website",children:"Tobiko Data, Inc."}),"  All rights reserved."]})]})}export{i as default};
1
+ import{a as n,j as e,i as r}from"./index-Dj0i1-CA.js";function i(){const s=n(t=>t.version);return e.jsxs("footer",{className:"px-2 py-1 text-xs flex justify-between",children:[e.jsx("span",{children:r(s)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hidden sm:inline",children:"SQLMesh: "}),e.jsx("span",{title:"SQLMesh Version",className:"font-black inline-block mr-4",children:s})]})}),e.jsxs("small",{className:"text-xs",children:["© ",new Date().getFullYear()," ",e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",className:"underline",title:"Tobiko Data website",children:"Tobiko Data, Inc."}),"  All rights reserved."]})]})}export{i as default};
@@ -1 +1 @@
1
- import{r as a,j as e,u as o,c as i,E as r}from"./index-O3mjYpnE.js";function n({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{fillRule:"evenodd",d:"M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z",clipRule:"evenodd"}))}const h=a.forwardRef(n);function d({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{d:"M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"}))}const c=a.forwardRef(d);function x({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,role:"img","aria-labelledby":"tobikoDataTitle",viewBox:"0 0 194 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"tobikoDataTitle",children:"Tobiko Data logo"}),e.jsx("path",{d:"M99.6773 18.8812H90.4835V43H85.3891V18.8812H76.1953V14.4236H99.6773V18.8812ZM116.433 32.5724C116.433 39.0598 112.254 43.4378 106.364 43.4378C100.473 43.4378 96.2943 39.0598 96.2943 32.5724C96.2943 26.085 100.473 21.707 106.364 21.707C112.254 21.707 116.433 26.085 116.433 32.5724ZM101.11 32.5724C101.11 36.831 103.14 39.418 106.364 39.418C109.587 39.418 111.617 36.831 111.617 32.5724C111.617 28.3138 109.587 25.7268 106.364 25.7268C103.14 25.7268 101.11 28.3138 101.11 32.5724ZM130.538 43.4378C127.832 43.4378 125.842 42.3632 124.529 40.811V43H119.753V14.4236H124.529V24.3338C125.842 22.7816 127.832 21.707 130.538 21.707C136.389 21.707 139.732 26.6422 139.732 32.5724C139.732 38.5026 136.389 43.4378 130.538 43.4378ZM124.409 31.9754V33.2092C124.409 37.0698 126.638 39.2588 129.583 39.2588C133.046 39.2588 134.916 36.5524 134.916 32.5724C134.916 28.5924 133.046 25.886 129.583 25.886C126.638 25.886 124.409 28.0352 124.409 31.9754ZM142.945 19.319V14.4236H147.88V19.319H142.945ZM147.801 22.105V43H143.025V22.105H147.801ZM157.197 14.4236V30.9008L165.237 22.105H171.088L163.207 30.2242L171.724 43H166.192L159.944 33.5674L157.197 36.3534V43H152.421V14.4236H157.197ZM191.565 32.5724C191.565 39.0598 187.386 43.4378 181.496 43.4378C175.605 43.4378 171.426 39.0598 171.426 32.5724C171.426 26.085 175.605 21.707 181.496 21.707C187.386 21.707 191.565 26.085 191.565 32.5724ZM176.242 32.5724C176.242 36.831 178.272 39.418 181.496 39.418C184.719 39.418 186.749 36.831 186.749 32.5724C186.749 28.3138 184.719 25.7268 181.496 25.7268C178.272 25.7268 176.242 28.3138 176.242 32.5724Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{d:"M7.59874 35.2C11.5752 35.2 14.7987 31.9765 14.7987 28C14.7987 24.0236 11.5752 20.8 7.59874 20.8C3.62229 20.8 0.398743 24.0236 0.398743 28C0.398743 31.9765 3.62229 35.2 7.59874 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 15.2928C14.378 15.2928 17.2792 12.3916 17.2792 8.81276C17.2792 5.23397 14.378 2.33276 10.7992 2.33276C7.22041 2.33276 4.31921 5.23397 4.31921 8.81276C4.31921 12.3916 7.22041 15.2928 10.7992 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 53.6929C14.378 53.6929 17.2792 50.7917 17.2792 47.2129C17.2792 43.6341 14.378 40.7329 10.7992 40.7329C7.22041 40.7329 4.31921 43.6341 4.31921 47.2129C4.31921 50.7917 7.22041 53.6929 10.7992 53.6929Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 28C36.2016 31.9765 32.978 35.2 29.0016 35.2C25.0251 35.2 21.8016 31.9765 21.8016 28C21.8016 24.0236 25.0251 20.8 29.0016 20.8C32.978 20.8 36.2016 24.0236 36.2016 28Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 7.2C36.2016 11.1764 32.978 14.4 29.0016 14.4C25.0251 14.4 21.8016 11.1764 21.8016 7.2C21.8016 3.22356 25.0251 0 29.0016 0C32.978 0 36.2016 3.22356 36.2016 7.2Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 48.7999C36.2016 52.7763 32.978 55.9999 29.0016 55.9999C25.0251 55.9999 21.8016 52.7763 21.8016 48.7999C21.8016 44.8234 25.0251 41.5999 29.0016 41.5999C32.978 41.5999 36.2016 44.8234 36.2016 48.7999Z",fill:"#F74808"}),e.jsx("path",{d:"M50.4054 35.2C54.3818 35.2 57.6054 31.9765 57.6054 28C57.6054 24.0236 54.3818 20.8 50.4054 20.8C46.4289 20.8 43.2054 24.0236 43.2054 28C43.2054 31.9765 46.4289 35.2 50.4054 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 15.2928C50.7841 15.2928 53.6853 12.3916 53.6853 8.81276C53.6853 5.23397 50.7841 2.33276 47.2053 2.33276C43.6265 2.33276 40.7253 5.23397 40.7253 8.81276C40.7253 12.3916 43.6265 15.2928 47.2053 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 53.6929C50.7841 53.6929 53.6853 50.7917 53.6853 47.2129C53.6853 43.6341 50.7841 40.7329 47.2053 40.7329C43.6265 40.7329 40.7253 43.6341 40.7253 47.2129C40.7253 50.7917 43.6265 53.6929 47.2053 53.6929Z",fill:"#F74808"})]})}const m=a.memo(x);function M({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,viewBox:"0 0 246 56",fill:"none",role:"img","aria-labelledby":"sqlmeshTitle",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"sqlmeshTitle",children:"SQLMesh logo"}),e.jsx("path",{d:"M75.6874 37.4246L79.5901 34.1988C81.5814 37.3051 84.5682 39.0972 87.8338 39.0972C91.0595 39.0972 93.4888 37.6237 93.4888 34.8758C93.4888 31.9687 90.502 31.5704 86.2408 30.535C81.9398 29.4996 77.3202 28.2252 77.3202 22.6498C77.3202 17.3531 81.8601 13.9681 87.6346 13.9681C92.533 13.9681 96.3562 16.2779 98.2677 19.2647L94.5243 22.4905C92.9313 20.0214 90.8206 18.3089 87.4754 18.3089C84.4089 18.3089 82.2982 19.8621 82.2982 22.1321C82.2982 24.641 84.4885 25.1587 88.3515 26.0348C92.9711 27.0703 98.5067 28.1455 98.5067 34.3581C98.5067 39.9734 93.5685 43.4381 87.6745 43.4381C82.7761 43.4381 77.9175 41.0884 75.6874 37.4246ZM100.213 28.7031C100.213 20.0214 105.788 13.9681 113.514 13.9681C121.24 13.9681 126.816 20.0214 126.816 28.7031C126.816 34.0395 124.705 38.3804 121.28 40.969C122.435 42.4823 124.386 43.6372 126.656 44.1947L123.709 47.8187C121.081 47.0621 118.413 45.1107 117.218 42.9204C116.063 43.2788 114.828 43.4381 113.514 43.4381C105.788 43.4381 100.213 37.3848 100.213 28.7031ZM121.718 28.7031C121.718 22.4905 118.333 18.4682 113.514 18.4682C108.695 18.4682 105.31 22.4905 105.31 28.7031C105.31 34.9157 108.695 38.9379 113.514 38.9379C118.333 38.9379 121.718 34.9157 121.718 28.7031ZM130.379 43V14.4061H135.476V38.5397H148.937V43H130.379ZM168.205 43H164.063L156.576 20.8975V43H151.837V14.4061H158.846L166.214 36.3095L173.581 14.4061H180.431V43H175.692V20.8975L168.205 43ZM194.071 43.4381C188.098 43.4381 183.916 39.0176 183.916 32.566C183.916 26.4331 188.058 21.694 193.872 21.694C199.926 21.694 203.151 26.2738 203.151 32.0085V33.6015H188.496C188.854 37.1856 191.005 39.376 194.071 39.376C196.421 39.376 198.293 38.1813 198.93 36.0307L203.032 37.5839C201.558 41.2477 198.253 43.4381 194.071 43.4381ZM193.832 25.7162C191.363 25.7162 189.452 27.1897 188.735 30.0173H198.333C198.293 27.7075 196.859 25.7162 193.832 25.7162ZM204.148 39.0176L207.733 36.1502C208.967 38.1813 211.357 39.5353 213.786 39.5353C215.817 39.5353 217.689 38.8184 217.689 36.9467C217.689 35.1546 215.936 34.9555 212.631 34.2785C209.326 33.6015 205.542 32.7652 205.542 28.3048C205.542 24.4817 208.888 21.694 213.706 21.694C217.37 21.694 220.636 23.3268 222.149 25.6366L218.923 28.5438C217.729 26.672 215.737 25.5968 213.428 25.5968C211.476 25.5968 210.202 26.4729 210.202 27.8668C210.202 29.3801 211.715 29.6589 214.343 30.2164C217.888 30.9731 222.348 31.7297 222.348 36.5086C222.348 40.73 218.485 43.4381 213.746 43.4381C209.883 43.4381 206.02 41.8849 204.148 39.0176ZM225.619 43V14.4061H230.398V24.3224C231.593 22.9285 233.465 21.694 236.173 21.694C240.553 21.694 243.182 24.7206 243.182 29.2208V43H238.403V30.6146C238.403 28.0261 237.368 26.1543 234.739 26.1543C232.589 26.1543 230.398 27.7473 230.398 30.7341V43H225.619Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{opacity:"0.2",d:"M29.1758 28.2007V15.7497C29.1758 9.83436 24.3135 5.03906 18.3983 5.03906V5.03906C12.483 5.03906 7.62072 9.83436 7.62072 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.4",d:"M50.5964 28.2007V15.7497C50.5964 9.83436 45.8011 5.03906 39.8858 5.03906H18.3308C12.4155 5.03906 7.6202 9.83436 7.6202 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M29.0398 27.7988V40.2499C29.0398 46.1651 33.902 50.9604 39.8173 50.9604V50.9604C45.7326 50.9604 50.5949 46.1652 50.5949 40.2499V29.2931",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.2",d:"M7.61914 27.799V40.2501C7.61914 46.1654 12.4144 50.9607 18.3297 50.9607H39.8848C45.8001 50.9607 50.5954 46.1654 50.5954 40.2501V29.2933",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M7.61972 35.1497C11.6126 35.1497 14.8496 31.9129 14.8496 27.9201C14.8496 23.9273 11.6126 20.6904 7.61972 20.6904C3.6268 20.6904 0.389893 23.9273 0.389893 27.9201C0.389893 31.9129 3.6268 35.1497 7.61972 35.1497Z",fill:"#0830F7"}),e.jsx("path",{d:"M36.3908 27.9201C36.3908 31.9129 33.1539 35.1497 29.161 35.1497C25.1681 35.1497 21.9312 31.9129 21.9312 27.9201C21.9312 23.9273 25.1681 20.6904 29.161 20.6904C33.1539 20.6904 36.3908 23.9273 36.3908 27.9201Z",fill:"#0830F7"}),e.jsx("path",{d:"M50.5958 35.1497C54.5887 35.1497 57.8256 31.9129 57.8256 27.9201C57.8256 23.9273 54.5887 20.6904 50.5958 20.6904C46.6029 20.6904 43.366 23.9273 43.366 27.9201C43.366 31.9129 46.6029 35.1497 50.5958 35.1497Z",fill:"#0830F7"})]})}const f=a.memo(M);function j(){const{mode:l,toggleColorScheme:t}=o(),s=l===r.Light?h:c;return e.jsxs("header",{className:"min-h-[2rem] px-2 flex justify-between items-center",children:[e.jsxs("div",{className:"flex h-full items-center",children:[e.jsx("a",{href:"/",title:"Home",children:e.jsx(f,{style:{height:"20px"},mode:l})}),e.jsx("span",{className:"inline-block mx-1.5 text-xs font-bold pt-[3px]",children:"by"}),e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",title:"Tobiko Data website",children:e.jsx(m,{style:{height:"20px"},mode:l})})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("nav",{children:e.jsx("ul",{className:"flex items-center",children:e.jsx("li",{className:"px-2",children:e.jsx("a",{href:"http://sqlmesh.readthedocs.io/en/stable/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-xs",children:"Documentation"})})})}),e.jsx("button",{className:i("p-1 cursor-pointer rounded-full hover:bg-theme-darker","dark:hover:bg-theme-lighter"),onClick:()=>{t==null||t()},"aria-label":l===r.Light?"Use Dark Theme":"Use Light Theme",children:e.jsx(s,{className:"h-4 w-4 text-primary-500"})})]})]})}export{j as default};
1
+ import{r as a,j as e,u as o,c as i,E as r}from"./index-Dj0i1-CA.js";function n({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{fillRule:"evenodd",d:"M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z",clipRule:"evenodd"}))}const h=a.forwardRef(n);function d({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{d:"M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"}))}const c=a.forwardRef(d);function x({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,role:"img","aria-labelledby":"tobikoDataTitle",viewBox:"0 0 194 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"tobikoDataTitle",children:"Tobiko Data logo"}),e.jsx("path",{d:"M99.6773 18.8812H90.4835V43H85.3891V18.8812H76.1953V14.4236H99.6773V18.8812ZM116.433 32.5724C116.433 39.0598 112.254 43.4378 106.364 43.4378C100.473 43.4378 96.2943 39.0598 96.2943 32.5724C96.2943 26.085 100.473 21.707 106.364 21.707C112.254 21.707 116.433 26.085 116.433 32.5724ZM101.11 32.5724C101.11 36.831 103.14 39.418 106.364 39.418C109.587 39.418 111.617 36.831 111.617 32.5724C111.617 28.3138 109.587 25.7268 106.364 25.7268C103.14 25.7268 101.11 28.3138 101.11 32.5724ZM130.538 43.4378C127.832 43.4378 125.842 42.3632 124.529 40.811V43H119.753V14.4236H124.529V24.3338C125.842 22.7816 127.832 21.707 130.538 21.707C136.389 21.707 139.732 26.6422 139.732 32.5724C139.732 38.5026 136.389 43.4378 130.538 43.4378ZM124.409 31.9754V33.2092C124.409 37.0698 126.638 39.2588 129.583 39.2588C133.046 39.2588 134.916 36.5524 134.916 32.5724C134.916 28.5924 133.046 25.886 129.583 25.886C126.638 25.886 124.409 28.0352 124.409 31.9754ZM142.945 19.319V14.4236H147.88V19.319H142.945ZM147.801 22.105V43H143.025V22.105H147.801ZM157.197 14.4236V30.9008L165.237 22.105H171.088L163.207 30.2242L171.724 43H166.192L159.944 33.5674L157.197 36.3534V43H152.421V14.4236H157.197ZM191.565 32.5724C191.565 39.0598 187.386 43.4378 181.496 43.4378C175.605 43.4378 171.426 39.0598 171.426 32.5724C171.426 26.085 175.605 21.707 181.496 21.707C187.386 21.707 191.565 26.085 191.565 32.5724ZM176.242 32.5724C176.242 36.831 178.272 39.418 181.496 39.418C184.719 39.418 186.749 36.831 186.749 32.5724C186.749 28.3138 184.719 25.7268 181.496 25.7268C178.272 25.7268 176.242 28.3138 176.242 32.5724Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{d:"M7.59874 35.2C11.5752 35.2 14.7987 31.9765 14.7987 28C14.7987 24.0236 11.5752 20.8 7.59874 20.8C3.62229 20.8 0.398743 24.0236 0.398743 28C0.398743 31.9765 3.62229 35.2 7.59874 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 15.2928C14.378 15.2928 17.2792 12.3916 17.2792 8.81276C17.2792 5.23397 14.378 2.33276 10.7992 2.33276C7.22041 2.33276 4.31921 5.23397 4.31921 8.81276C4.31921 12.3916 7.22041 15.2928 10.7992 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 53.6929C14.378 53.6929 17.2792 50.7917 17.2792 47.2129C17.2792 43.6341 14.378 40.7329 10.7992 40.7329C7.22041 40.7329 4.31921 43.6341 4.31921 47.2129C4.31921 50.7917 7.22041 53.6929 10.7992 53.6929Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 28C36.2016 31.9765 32.978 35.2 29.0016 35.2C25.0251 35.2 21.8016 31.9765 21.8016 28C21.8016 24.0236 25.0251 20.8 29.0016 20.8C32.978 20.8 36.2016 24.0236 36.2016 28Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 7.2C36.2016 11.1764 32.978 14.4 29.0016 14.4C25.0251 14.4 21.8016 11.1764 21.8016 7.2C21.8016 3.22356 25.0251 0 29.0016 0C32.978 0 36.2016 3.22356 36.2016 7.2Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 48.7999C36.2016 52.7763 32.978 55.9999 29.0016 55.9999C25.0251 55.9999 21.8016 52.7763 21.8016 48.7999C21.8016 44.8234 25.0251 41.5999 29.0016 41.5999C32.978 41.5999 36.2016 44.8234 36.2016 48.7999Z",fill:"#F74808"}),e.jsx("path",{d:"M50.4054 35.2C54.3818 35.2 57.6054 31.9765 57.6054 28C57.6054 24.0236 54.3818 20.8 50.4054 20.8C46.4289 20.8 43.2054 24.0236 43.2054 28C43.2054 31.9765 46.4289 35.2 50.4054 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 15.2928C50.7841 15.2928 53.6853 12.3916 53.6853 8.81276C53.6853 5.23397 50.7841 2.33276 47.2053 2.33276C43.6265 2.33276 40.7253 5.23397 40.7253 8.81276C40.7253 12.3916 43.6265 15.2928 47.2053 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 53.6929C50.7841 53.6929 53.6853 50.7917 53.6853 47.2129C53.6853 43.6341 50.7841 40.7329 47.2053 40.7329C43.6265 40.7329 40.7253 43.6341 40.7253 47.2129C40.7253 50.7917 43.6265 53.6929 47.2053 53.6929Z",fill:"#F74808"})]})}const m=a.memo(x);function M({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,viewBox:"0 0 246 56",fill:"none",role:"img","aria-labelledby":"sqlmeshTitle",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"sqlmeshTitle",children:"SQLMesh logo"}),e.jsx("path",{d:"M75.6874 37.4246L79.5901 34.1988C81.5814 37.3051 84.5682 39.0972 87.8338 39.0972C91.0595 39.0972 93.4888 37.6237 93.4888 34.8758C93.4888 31.9687 90.502 31.5704 86.2408 30.535C81.9398 29.4996 77.3202 28.2252 77.3202 22.6498C77.3202 17.3531 81.8601 13.9681 87.6346 13.9681C92.533 13.9681 96.3562 16.2779 98.2677 19.2647L94.5243 22.4905C92.9313 20.0214 90.8206 18.3089 87.4754 18.3089C84.4089 18.3089 82.2982 19.8621 82.2982 22.1321C82.2982 24.641 84.4885 25.1587 88.3515 26.0348C92.9711 27.0703 98.5067 28.1455 98.5067 34.3581C98.5067 39.9734 93.5685 43.4381 87.6745 43.4381C82.7761 43.4381 77.9175 41.0884 75.6874 37.4246ZM100.213 28.7031C100.213 20.0214 105.788 13.9681 113.514 13.9681C121.24 13.9681 126.816 20.0214 126.816 28.7031C126.816 34.0395 124.705 38.3804 121.28 40.969C122.435 42.4823 124.386 43.6372 126.656 44.1947L123.709 47.8187C121.081 47.0621 118.413 45.1107 117.218 42.9204C116.063 43.2788 114.828 43.4381 113.514 43.4381C105.788 43.4381 100.213 37.3848 100.213 28.7031ZM121.718 28.7031C121.718 22.4905 118.333 18.4682 113.514 18.4682C108.695 18.4682 105.31 22.4905 105.31 28.7031C105.31 34.9157 108.695 38.9379 113.514 38.9379C118.333 38.9379 121.718 34.9157 121.718 28.7031ZM130.379 43V14.4061H135.476V38.5397H148.937V43H130.379ZM168.205 43H164.063L156.576 20.8975V43H151.837V14.4061H158.846L166.214 36.3095L173.581 14.4061H180.431V43H175.692V20.8975L168.205 43ZM194.071 43.4381C188.098 43.4381 183.916 39.0176 183.916 32.566C183.916 26.4331 188.058 21.694 193.872 21.694C199.926 21.694 203.151 26.2738 203.151 32.0085V33.6015H188.496C188.854 37.1856 191.005 39.376 194.071 39.376C196.421 39.376 198.293 38.1813 198.93 36.0307L203.032 37.5839C201.558 41.2477 198.253 43.4381 194.071 43.4381ZM193.832 25.7162C191.363 25.7162 189.452 27.1897 188.735 30.0173H198.333C198.293 27.7075 196.859 25.7162 193.832 25.7162ZM204.148 39.0176L207.733 36.1502C208.967 38.1813 211.357 39.5353 213.786 39.5353C215.817 39.5353 217.689 38.8184 217.689 36.9467C217.689 35.1546 215.936 34.9555 212.631 34.2785C209.326 33.6015 205.542 32.7652 205.542 28.3048C205.542 24.4817 208.888 21.694 213.706 21.694C217.37 21.694 220.636 23.3268 222.149 25.6366L218.923 28.5438C217.729 26.672 215.737 25.5968 213.428 25.5968C211.476 25.5968 210.202 26.4729 210.202 27.8668C210.202 29.3801 211.715 29.6589 214.343 30.2164C217.888 30.9731 222.348 31.7297 222.348 36.5086C222.348 40.73 218.485 43.4381 213.746 43.4381C209.883 43.4381 206.02 41.8849 204.148 39.0176ZM225.619 43V14.4061H230.398V24.3224C231.593 22.9285 233.465 21.694 236.173 21.694C240.553 21.694 243.182 24.7206 243.182 29.2208V43H238.403V30.6146C238.403 28.0261 237.368 26.1543 234.739 26.1543C232.589 26.1543 230.398 27.7473 230.398 30.7341V43H225.619Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{opacity:"0.2",d:"M29.1758 28.2007V15.7497C29.1758 9.83436 24.3135 5.03906 18.3983 5.03906V5.03906C12.483 5.03906 7.62072 9.83436 7.62072 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.4",d:"M50.5964 28.2007V15.7497C50.5964 9.83436 45.8011 5.03906 39.8858 5.03906H18.3308C12.4155 5.03906 7.6202 9.83436 7.6202 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M29.0398 27.7988V40.2499C29.0398 46.1651 33.902 50.9604 39.8173 50.9604V50.9604C45.7326 50.9604 50.5949 46.1652 50.5949 40.2499V29.2931",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.2",d:"M7.61914 27.799V40.2501C7.61914 46.1654 12.4144 50.9607 18.3297 50.9607H39.8848C45.8001 50.9607 50.5954 46.1654 50.5954 40.2501V29.2933",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M7.61972 35.1497C11.6126 35.1497 14.8496 31.9129 14.8496 27.9201C14.8496 23.9273 11.6126 20.6904 7.61972 20.6904C3.6268 20.6904 0.389893 23.9273 0.389893 27.9201C0.389893 31.9129 3.6268 35.1497 7.61972 35.1497Z",fill:"#0830F7"}),e.jsx("path",{d:"M36.3908 27.9201C36.3908 31.9129 33.1539 35.1497 29.161 35.1497C25.1681 35.1497 21.9312 31.9129 21.9312 27.9201C21.9312 23.9273 25.1681 20.6904 29.161 20.6904C33.1539 20.6904 36.3908 23.9273 36.3908 27.9201Z",fill:"#0830F7"}),e.jsx("path",{d:"M50.5958 35.1497C54.5887 35.1497 57.8256 31.9129 57.8256 27.9201C57.8256 23.9273 54.5887 20.6904 50.5958 20.6904C46.6029 20.6904 43.366 23.9273 43.366 27.9201C43.366 31.9129 46.6029 35.1497 50.5958 35.1497Z",fill:"#0830F7"})]})}const f=a.memo(M);function j(){const{mode:l,toggleColorScheme:t}=o(),s=l===r.Light?h:c;return e.jsxs("header",{className:"min-h-[2rem] px-2 flex justify-between items-center",children:[e.jsxs("div",{className:"flex h-full items-center",children:[e.jsx("a",{href:"/",title:"Home",children:e.jsx(f,{style:{height:"20px"},mode:l})}),e.jsx("span",{className:"inline-block mx-1.5 text-xs font-bold pt-[3px]",children:"by"}),e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",title:"Tobiko Data website",children:e.jsx(m,{style:{height:"20px"},mode:l})})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("nav",{children:e.jsx("ul",{className:"flex items-center",children:e.jsx("li",{className:"px-2",children:e.jsx("a",{href:"http://sqlmesh.readthedocs.io/en/stable/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-xs",children:"Documentation"})})})}),e.jsx("button",{className:i("p-1 cursor-pointer rounded-full hover:bg-theme-darker","dark:hover:bg-theme-lighter"),onClick:()=>{t==null||t()},"aria-label":l===r.Light?"Use Dark Theme":"Use Light Theme",children:e.jsx(s,{className:"h-4 w-4 text-primary-500"})})]})]})}export{j as default};