zigbee2mqtt-windfront 2.4.0 → 2.4.2
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.
- package/dist/assets/{About-BjjkLPGF.js → About-BECKqY6K.js} +1 -1
- package/dist/assets/About-BECKqY6K.js.br +0 -0
- package/dist/assets/{ActivityPage-D8tN_mhu.js → ActivityPage-CSSHkR-d.js} +1 -1
- package/dist/assets/ActivityPage-CSSHkR-d.js.br +0 -0
- package/dist/assets/{Availability-ChpD5KfG.js → Availability-CvHBs7oh.js} +1 -1
- package/dist/assets/Availability-CvHBs7oh.js.br +0 -0
- package/dist/assets/{Bind-DCoy61S7.js → Bind-CIGpz2VC.js} +1 -1
- package/dist/assets/Bind-CIGpz2VC.js.br +0 -0
- package/dist/assets/{BindRow-nmfFVYoP.js → BindRow-Cs1sVcpM.js} +1 -1
- package/dist/assets/BindRow-Cs1sVcpM.js.br +0 -0
- package/dist/assets/{BindingsPage-NlmNzolq.js → BindingsPage-R8TY0Hrz.js} +1 -1
- package/dist/assets/BindingsPage-R8TY0Hrz.js.br +0 -0
- package/dist/assets/Bridge-_Dqz0S6H.js +1 -0
- package/dist/assets/Bridge-_Dqz0S6H.js.br +0 -0
- package/dist/assets/{CheckboxField-BG1LLMGl.js → CheckboxField-BxtT6ttj.js} +1 -1
- package/dist/assets/CheckboxField-BxtT6ttj.js.br +0 -0
- package/dist/assets/{ClusterSinglePicker-BftJs6_P.js → ClusterSinglePicker-CdbXM_JY.js} +1 -1
- package/dist/assets/ClusterSinglePicker-CdbXM_JY.js.br +0 -0
- package/dist/assets/{Clusters-Cv06_EfE.js → Clusters-De_zV5zK.js} +1 -1
- package/dist/assets/Clusters-De_zV5zK.js.br +0 -0
- package/dist/assets/{ContributePage-DgB19g-n.js → ContributePage-BQW1e3tc.js} +1 -1
- package/dist/assets/ContributePage-BQW1e3tc.js.br +0 -0
- package/dist/assets/{Dashboard-D8eCMg1E.js → Dashboard-D-a-wKK8.js} +1 -1
- package/dist/assets/Dashboard-D-a-wKK8.js.br +0 -0
- package/dist/assets/{DashboardFeatureWrapper-BneTc8AG.js → DashboardFeatureWrapper-DSvHZUwh.js} +1 -1
- package/dist/assets/DashboardFeatureWrapper-DSvHZUwh.js.br +0 -0
- package/dist/assets/{DebouncedInput-DiI3jY3Y.js → DebouncedInput-B8gvkj6A.js} +1 -1
- package/dist/assets/DebouncedInput-B8gvkj6A.js.br +0 -0
- package/dist/assets/{DevConsole-DPZ5Q1SV.js → DevConsole-C8IWIn5P.js} +1 -1
- package/dist/assets/DevConsole-C8IWIn5P.js.br +0 -0
- package/dist/assets/{DevConsole-BuvrFNnY.js → DevConsole-LvSvkafL.js} +1 -1
- package/dist/assets/DevConsole-LvSvkafL.js.br +0 -0
- package/dist/assets/{DeviceCard-CbA-Muhm.js → DeviceCard-C89jjCiz.js} +1 -1
- package/dist/assets/DeviceCard-C89jjCiz.js.br +0 -0
- package/dist/assets/{DeviceImage-2MDqGl5C.js → DeviceImage-Bs0M9j-k.js} +1 -1
- package/dist/assets/DeviceImage-Bs0M9j-k.js.br +0 -0
- package/dist/assets/{DeviceInfo-2jbuHZ-h.js → DeviceInfo-WODXyX_f.js} +1 -1
- package/dist/assets/DeviceInfo-WODXyX_f.js.br +0 -0
- package/dist/assets/{DevicePage-ZszWuDsI.js → DevicePage-CNcVtzgs.js} +2 -2
- package/dist/assets/DevicePage-CNcVtzgs.js.br +0 -0
- package/dist/assets/{DevicePicker-B_PDo9wi.js → DevicePicker-0T64KBIx.js} +1 -1
- package/dist/assets/DevicePicker-0T64KBIx.js.br +0 -0
- package/dist/assets/{DeviceSettings-DWB0mi-3.js → DeviceSettings-mPRv-tnF.js} +1 -1
- package/dist/assets/DeviceSettings-mPRv-tnF.js.br +0 -0
- package/dist/assets/{DeviceSpecificSettings-DjEM0kVL.js → DeviceSpecificSettings-Cx9yFF1T.js} +1 -1
- package/dist/assets/DeviceSpecificSettings-Cx9yFF1T.js.br +0 -0
- package/dist/assets/{Devices-JfRo8T0C.js → Devices-CKrLjR7l.js} +1 -1
- package/dist/assets/Devices-CKrLjR7l.js.br +0 -0
- package/dist/assets/{DevicesPage-XrSyXmD5.js → DevicesPage-CNYZ7gZW.js} +1 -1
- package/dist/assets/DevicesPage-CNYZ7gZW.js.br +0 -0
- package/dist/assets/{DisplayValue-CApLeme3.js → DisplayValue-qZ7xyN8v.js} +1 -1
- package/dist/assets/DisplayValue-qZ7xyN8v.js.br +0 -0
- package/dist/assets/{Duration-B_1JBNda.js → Duration-CJDh_0iP.js} +1 -1
- package/dist/assets/Duration-CJDh_0iP.js.br +0 -0
- package/dist/assets/{EndpointPicker-CrX12uJY.js → EndpointPicker-xjSURnYy.js} +1 -1
- package/dist/assets/EndpointPicker-xjSURnYy.js.br +0 -0
- package/dist/assets/{Exposes-DER69NVK.js → Exposes-Ck1RvrgF.js} +1 -1
- package/dist/assets/Exposes-Ck1RvrgF.js.br +0 -0
- package/dist/assets/{Feature-DYcNfxa0.js → Feature-C2pFQwpi.js} +1 -1
- package/dist/assets/Feature-C2pFQwpi.js.br +0 -0
- package/dist/assets/{FrontendSettingsPage-D8hy8YoU.js → FrontendSettingsPage-TBuuFxPS.js} +1 -1
- package/dist/assets/FrontendSettingsPage-TBuuFxPS.js.br +0 -0
- package/dist/assets/{GroupPage-BFXg0-R1.js → GroupPage-BGL4RysQ.js} +2 -2
- package/dist/assets/GroupPage-BGL4RysQ.js.br +0 -0
- package/dist/assets/{GroupSettings-KjnM44Jv.js → GroupSettings-BGUugnNe.js} +1 -1
- package/dist/assets/GroupSettings-BGUugnNe.js.br +0 -0
- package/dist/assets/{Groups-Da6Rz4iJ.js → Groups-piTsZDoh.js} +1 -1
- package/dist/assets/Groups-piTsZDoh.js.br +0 -0
- package/dist/assets/{GroupsPage-Cwb8IGSP.js → GroupsPage-WEbNlJz8.js} +1 -1
- package/dist/assets/GroupsPage-WEbNlJz8.js.br +0 -0
- package/dist/assets/{Health-BgieGgKo.js → Health-B5TOTzGW.js} +1 -1
- package/dist/assets/Health-B5TOTzGW.js.br +0 -0
- package/dist/assets/HomePage-BDldmGYp.js +1 -0
- package/dist/assets/HomePage-BDldmGYp.js.br +0 -0
- package/dist/assets/{IndeterminateCheckbox-C3pUYBaD.js → IndeterminateCheckbox-D1n4j0hH.js} +1 -1
- package/dist/assets/IndeterminateCheckbox-D1n4j0hH.js.br +2 -0
- package/dist/assets/InfoAlert-DaX4x_1T.js +1 -0
- package/dist/assets/InfoAlert-DaX4x_1T.js.br +0 -0
- package/dist/assets/{InputField-D-x1inWL.js → InputField-CqTVHKf8.js} +1 -1
- package/dist/assets/InputField-CqTVHKf8.js.br +0 -0
- package/dist/assets/{Json-BMewAsAW.js → Json-a0ZE4H4E.js} +1 -1
- package/dist/assets/Json-a0ZE4H4E.js.br +0 -0
- package/dist/assets/{LastSeen-Dn358ZkP.js → LastSeen-BOY7jIoe.js} +1 -1
- package/dist/assets/LastSeen-BOY7jIoe.js.br +0 -0
- package/dist/assets/{LogsPage-DzKwBLUx.js → LogsPage-EYs1SJzR.js} +1 -1
- package/dist/assets/LogsPage-EYs1SJzR.js.br +0 -0
- package/dist/assets/Lqi-B1ebT_rM.js +1 -0
- package/dist/assets/Lqi-B1ebT_rM.js.br +0 -0
- package/dist/assets/{NetworkPage-B9T2nSXp.js → NetworkPage-DpRCzAbY.js} +2 -2
- package/dist/assets/NetworkPage-DpRCzAbY.js.br +0 -0
- package/dist/assets/{NumberField-C3FamvUt.js → NumberField-Bv80Uoa9.js} +1 -1
- package/dist/assets/NumberField-Bv80Uoa9.js.br +0 -0
- package/dist/assets/{OtaPage-Ch0houzc.js → OtaPage-wLq1usgO.js} +1 -1
- package/dist/assets/OtaPage-wLq1usgO.js.br +0 -0
- package/dist/assets/PowerSource--PK2quZc.js +1 -0
- package/dist/assets/PowerSource--PK2quZc.js.br +0 -0
- package/dist/assets/{RawNetworkData-D2vUMp1M.js → RawNetworkData-BJIP6cto.js} +1 -1
- package/dist/assets/RawNetworkData-BJIP6cto.js.br +0 -0
- package/dist/assets/{RawNetworkMap-BIzbLBhk.js → RawNetworkMap-DstcSS7K.js} +184 -184
- package/dist/assets/RawNetworkMap-DstcSS7K.js.br +0 -0
- package/dist/assets/{RecallRemove-BPgeFxBf.js → RecallRemove-CnNFF1IW.js} +1 -1
- package/dist/assets/RecallRemove-CnNFF1IW.js.br +0 -0
- package/dist/assets/{RemoveDeviceModal-BYx8ukJs.js → RemoveDeviceModal-Dcccpw6_.js} +1 -1
- package/dist/assets/RemoveDeviceModal-Dcccpw6_.js.br +0 -0
- package/dist/assets/{Reporting-CW5TBnNZ.js → Reporting-C47QuChS.js} +1 -1
- package/dist/assets/Reporting-C47QuChS.js.br +0 -0
- package/dist/assets/{ReportingPage-DPwg661I.js → ReportingPage-Ctik1tyk.js} +1 -1
- package/dist/assets/ReportingPage-Ctik1tyk.js.br +0 -0
- package/dist/assets/{ReportingRow-CCSmWGA-.js → ReportingRow-M-kyd_5k.js} +1 -1
- package/dist/assets/ReportingRow-M-kyd_5k.js.br +0 -0
- package/dist/assets/{Scene-CDTm8d_V.js → Scene-CkLZA6Hz.js} +1 -1
- package/dist/assets/Scene-CkLZA6Hz.js.br +0 -0
- package/dist/assets/{SelectField-Cy49-kUL.js → SelectField-WiB6Edsu.js} +1 -1
- package/dist/assets/SelectField-WiB6Edsu.js.br +0 -0
- package/dist/assets/{Settings-DqV5iq7V.js → Settings-C0i2GffX.js} +1 -1
- package/dist/assets/Settings-C0i2GffX.js.br +0 -0
- package/dist/assets/{SettingsList-etcr6VWn.js → SettingsList-B14Dp6bl.js} +1 -1
- package/dist/assets/SettingsList-B14Dp6bl.js.br +0 -0
- package/dist/assets/{SettingsPage-CIr69H-r.js → SettingsPage-CY9wNz1L.js} +2 -2
- package/dist/assets/SettingsPage-CY9wNz1L.js.br +0 -0
- package/dist/assets/State-B8oSE6DX.js +1 -0
- package/dist/assets/State-B8oSE6DX.js.br +0 -0
- package/dist/assets/{Table-BKRTiwxS.js → Table-BikCpRDP.js} +1 -1
- package/dist/assets/Table-BikCpRDP.js.br +0 -0
- package/dist/assets/{TextareaField-CnqB7i_A.js → TextareaField-BeRpIFjo.js} +1 -1
- package/dist/assets/TextareaField-BeRpIFjo.js.br +0 -0
- package/dist/assets/{TimeAgo-DfV_oP-E.js → TimeAgo-55eetS_D.js} +1 -1
- package/dist/assets/TimeAgo-55eetS_D.js.br +0 -0
- package/dist/assets/{Tools-BdpmwKVP.js → Tools-Cqc7mfYu.js} +1 -1
- package/dist/assets/Tools-Cqc7mfYu.js.br +0 -0
- package/dist/assets/TouchlinkPage-DtReDVOA.js +1 -0
- package/dist/assets/TouchlinkPage-DtReDVOA.js.br +0 -0
- package/dist/assets/{VendorLink-BuoMohq1.js → VendorLink-C93xowAR.js} +1 -1
- package/dist/assets/VendorLink-C93xowAR.js.br +0 -0
- package/dist/assets/{_createCompounder-Cpit22M8.js → _createCompounder-CDQ_1ElC.js} +1 -1
- package/dist/assets/_createCompounder-CDQ_1ElC.js.br +0 -0
- package/dist/assets/{floating-ui.react-CwAhhbbA.js → floating-ui.react-BfzwIwuD.js} +1 -1
- package/dist/assets/floating-ui.react-BfzwIwuD.js.br +0 -0
- package/dist/assets/{index-Du_VEcSu.js → index-C8QGyin-.js} +1 -1
- package/dist/assets/index-C8QGyin-.js.br +1 -0
- package/dist/assets/{index-oBzWmaJ3.js → index-CQLnbJQy.js} +1 -1
- package/dist/assets/index-CQLnbJQy.js.br +0 -0
- package/dist/assets/index-ClCsMWbS.js +581 -0
- package/dist/assets/index-ClCsMWbS.js.br +0 -0
- package/dist/assets/{isObjectLike-BbV-G3AH.js → isObjectLike-D4auEUP9.js} +1 -1
- package/dist/assets/isObjectLike-D4auEUP9.js.br +0 -0
- package/dist/assets/{jszip.min-DpqEU-AC.js → jszip.min-BDHr47Lr.js} +1 -1
- package/dist/assets/jszip.min-BDHr47Lr.js.br +0 -0
- package/dist/assets/{merge-BrLzJdog.js → merge-CXAZHnE2.js} +1 -1
- package/dist/assets/merge-CXAZHnE2.js.br +0 -0
- package/dist/assets/snakeCase-D0nOJtgb.js +1 -0
- package/dist/assets/snakeCase-D0nOJtgb.js.br +0 -0
- package/dist/assets/useColumnCount-BIzxc4Aw.js +1 -0
- package/dist/assets/useColumnCount-BIzxc4Aw.js.br +0 -0
- package/dist/assets/{useSearch-RmJYqgpp.js → useSearch-BeB1_fQX.js} +1 -1
- package/dist/assets/useSearch-BeB1_fQX.js.br +0 -0
- package/dist/assets/{useTable-veJjfSQc.js → useTable-Bu98B1Qm.js} +1 -1
- package/dist/assets/useTable-Bu98B1Qm.js.br +0 -0
- package/dist/index.html +1 -1
- package/dist/index.html.br +0 -0
- package/package.json +8 -8
- package/dist/assets/About-BjjkLPGF.js.br +0 -0
- package/dist/assets/ActivityPage-D8tN_mhu.js.br +0 -0
- package/dist/assets/Availability-ChpD5KfG.js.br +0 -0
- package/dist/assets/Bind-DCoy61S7.js.br +0 -0
- package/dist/assets/BindRow-nmfFVYoP.js.br +0 -0
- package/dist/assets/BindingsPage-NlmNzolq.js.br +0 -0
- package/dist/assets/Bridge-DFI7IofN.js +0 -1
- package/dist/assets/Bridge-DFI7IofN.js.br +0 -0
- package/dist/assets/CheckboxField-BG1LLMGl.js.br +0 -2
- package/dist/assets/ClusterSinglePicker-BftJs6_P.js.br +0 -0
- package/dist/assets/Clusters-Cv06_EfE.js.br +0 -0
- package/dist/assets/ContributePage-DgB19g-n.js.br +0 -0
- package/dist/assets/Dashboard-D8eCMg1E.js.br +0 -0
- package/dist/assets/DashboardFeatureWrapper-BneTc8AG.js.br +0 -0
- package/dist/assets/DebouncedInput-DiI3jY3Y.js.br +0 -0
- package/dist/assets/DevConsole-BuvrFNnY.js.br +0 -0
- package/dist/assets/DevConsole-DPZ5Q1SV.js.br +0 -0
- package/dist/assets/DeviceCard-CbA-Muhm.js.br +0 -0
- package/dist/assets/DeviceImage-2MDqGl5C.js.br +0 -0
- package/dist/assets/DeviceInfo-2jbuHZ-h.js.br +0 -0
- package/dist/assets/DevicePage-ZszWuDsI.js.br +0 -0
- package/dist/assets/DevicePicker-B_PDo9wi.js.br +0 -0
- package/dist/assets/DeviceSettings-DWB0mi-3.js.br +0 -0
- package/dist/assets/DeviceSpecificSettings-DjEM0kVL.js.br +0 -0
- package/dist/assets/Devices-JfRo8T0C.js.br +0 -0
- package/dist/assets/DevicesPage-XrSyXmD5.js.br +0 -0
- package/dist/assets/DisplayValue-CApLeme3.js.br +0 -0
- package/dist/assets/Duration-B_1JBNda.js.br +0 -0
- package/dist/assets/EndpointPicker-CrX12uJY.js.br +0 -0
- package/dist/assets/Exposes-DER69NVK.js.br +0 -0
- package/dist/assets/Feature-DYcNfxa0.js.br +0 -0
- package/dist/assets/FrontendSettingsPage-D8hy8YoU.js.br +0 -0
- package/dist/assets/GroupPage-BFXg0-R1.js.br +0 -0
- package/dist/assets/GroupSettings-KjnM44Jv.js.br +0 -0
- package/dist/assets/Groups-Da6Rz4iJ.js.br +0 -0
- package/dist/assets/GroupsPage-Cwb8IGSP.js.br +0 -0
- package/dist/assets/Health-BgieGgKo.js.br +0 -0
- package/dist/assets/HomePage-McIsQE6S.js +0 -1
- package/dist/assets/HomePage-McIsQE6S.js.br +0 -0
- package/dist/assets/IndeterminateCheckbox-C3pUYBaD.js.br +0 -1
- package/dist/assets/InfoAlert-vRBz3Nln.js +0 -1
- package/dist/assets/InfoAlert-vRBz3Nln.js.br +0 -0
- package/dist/assets/InputField-D-x1inWL.js.br +0 -0
- package/dist/assets/Json-BMewAsAW.js.br +0 -0
- package/dist/assets/LastSeen-Dn358ZkP.js.br +0 -0
- package/dist/assets/LogsPage-DzKwBLUx.js.br +0 -0
- package/dist/assets/Lqi-79tfQuJa.js +0 -1
- package/dist/assets/Lqi-79tfQuJa.js.br +0 -0
- package/dist/assets/NetworkPage-B9T2nSXp.js.br +0 -0
- package/dist/assets/NumberField-C3FamvUt.js.br +0 -0
- package/dist/assets/OtaPage-Ch0houzc.js.br +0 -0
- package/dist/assets/PowerSource-CCIOw1ZA.js +0 -1
- package/dist/assets/PowerSource-CCIOw1ZA.js.br +0 -0
- package/dist/assets/RawNetworkData-D2vUMp1M.js.br +0 -0
- package/dist/assets/RawNetworkMap-BIzbLBhk.js.br +0 -0
- package/dist/assets/RecallRemove-BPgeFxBf.js.br +0 -0
- package/dist/assets/RemoveDeviceModal-BYx8ukJs.js.br +0 -0
- package/dist/assets/Reporting-CW5TBnNZ.js.br +0 -0
- package/dist/assets/ReportingPage-DPwg661I.js.br +0 -0
- package/dist/assets/ReportingRow-CCSmWGA-.js.br +0 -0
- package/dist/assets/Scene-CDTm8d_V.js.br +0 -0
- package/dist/assets/SelectField-Cy49-kUL.js.br +0 -0
- package/dist/assets/Settings-DqV5iq7V.js.br +0 -2
- package/dist/assets/SettingsList-etcr6VWn.js.br +0 -0
- package/dist/assets/SettingsPage-CIr69H-r.js.br +0 -0
- package/dist/assets/State-IcdNV1n6.js +0 -1
- package/dist/assets/State-IcdNV1n6.js.br +0 -0
- package/dist/assets/Table-BKRTiwxS.js.br +0 -0
- package/dist/assets/TextareaField-CnqB7i_A.js.br +0 -0
- package/dist/assets/TimeAgo-DfV_oP-E.js.br +0 -0
- package/dist/assets/Tools-BdpmwKVP.js.br +0 -0
- package/dist/assets/TouchlinkPage-CgvNTyev.js +0 -1
- package/dist/assets/TouchlinkPage-CgvNTyev.js.br +0 -0
- package/dist/assets/VendorLink-BuoMohq1.js.br +0 -0
- package/dist/assets/_createCompounder-Cpit22M8.js.br +0 -0
- package/dist/assets/floating-ui.react-CwAhhbbA.js.br +0 -0
- package/dist/assets/index-Du_VEcSu.js.br +0 -0
- package/dist/assets/index-DvPcNtN4.js +0 -579
- package/dist/assets/index-DvPcNtN4.js.br +0 -0
- package/dist/assets/index-oBzWmaJ3.js.br +0 -0
- package/dist/assets/isObjectLike-BbV-G3AH.js.br +0 -0
- package/dist/assets/jszip.min-DpqEU-AC.js.br +0 -0
- package/dist/assets/merge-BrLzJdog.js.br +0 -0
- package/dist/assets/snakeCase-tFFG4Nty.js +0 -1
- package/dist/assets/snakeCase-tFFG4Nty.js.br +0 -0
- package/dist/assets/useColumnCount-D651_cRH.js +0 -1
- package/dist/assets/useColumnCount-D651_cRH.js.br +0 -0
- package/dist/assets/useSearch-RmJYqgpp.js.br +0 -0
- package/dist/assets/useTable-veJjfSQc.js.br +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as k,a3 as _,u as f,r as m,j as n,a4 as h,B as l,s as g,a as u,E as p,
|
|
1
|
+
import{Y as k,a3 as _,u as f,r as m,j as n,a4 as h,B as l,s as g,a as u,E as p,bb as y,a6 as x,dh as C}from"./index-ClCsMWbS.js";import{I as N}from"./InputField-CqTVHKf8.js";import{g as v}from"./index-C8QGyin-.js";import"./envs-CSqIi4cL.js";const z=k.create(t=>{const{addInstallCode:o}=t,s=_(),{t:i}=f(["settings","common"]),[r,c]=m.useState("");return m.useEffect(()=>{const a=d=>{d.key==="Escape"&&(d.preventDefault(),s.remove())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s]),n.jsx(h,{isOpen:s.visible,title:i(a=>a.add_install_code),footer:n.jsxs(n.Fragment,{children:[n.jsx(l,{className:"btn btn-neutral",onClick:s.remove,children:i(a=>a.cancel,{ns:"common"})}),n.jsx(l,{className:"btn btn-primary ms-1",onClick:async()=>{r&&(s.remove(),await o(r))},children:i(a=>a.add_install_code)})]}),children:n.jsx("div",{className:"flex flex-col gap-2",children:n.jsx(N,{name:"install_code",label:i(a=>a.install_code),onChange:a=>c(a.target.value),value:r,type:"text",required:!0})})})});async function S(t){return await new Promise((o,s)=>{const i=new FileReader;i.onloadend=()=>o(i.result),i.onerror=r=>s(r),i.readAsDataURL(t)})}async function B(t){const o=await fetch(t);if(o.ok){const s=await o.blob();return await S(s)}return Promise.reject(o.status)}function E({sourceIdx:t,devices:o}){const[s,i]=m.useState("none"),[r,c]=m.useState({}),{t:a}=f(["settings","common","zigbee"]),d=m.useCallback(async e=>{c(w=>({...w,[e.ieee_address]:"init"}));const b=v(e),j=await B(b);return await g(t,"bridge/request/device/options",{id:e.ieee_address,options:{icon:j}}),c(w=>({...w,[e.ieee_address]:"done"})),!0},[t]);switch(m.useEffect(()=>{if(s==="start"){for(const e of o)e.type!=="Coordinator"&&d(e).catch(b=>{console.error("Error localising image",b),c(j=>({...j,[e.ieee_address]:"error"}))}).then();i("inprogress")}},[s,o,d]),s){case"none":return n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:()=>i("start"),children:a(e=>e.localise_images)});case"inprogress":return n.jsx("ul",{className:"menu menu-xs bg-base-200 max-w-xs w-full join-item",children:o.map(e=>n.jsxs("li",{className:"flex-row justify-between items-center border-b py-0.5",children:[e.friendly_name,n.jsx("span",{className:"badge badge-xs",children:a(b=>b[r[e.ieee_address]],{ns:"common"})})]},`${t}-${e.ieee_address}-${e.friendly_name}`))});case"done":return n.jsx("div",{children:a(e=>e.unknown,{ns:"zigbee"})})}return n.jsx("div",{children:a(e=>e.unknown,{ns:"zigbee"})})}function A({sourceIdx:t}){const o=u(e=>e.setBackupPreparing),s=u(p(e=>e.bridgeInfo[t])),i=u(p(e=>e.backup[t])),r=u(p(e=>e.preparingBackup[t])),c=u(p(e=>e.devices[t])),{t:a}=f(["settings","common"]),d=m.useCallback(()=>{const e=`z2m-backup.${s.version}.${Date.now()}.zip`;y(`data:application/zip;base64,${i}`,e)},[i,s.version]);return n.jsxs("div",{className:"join join-vertical",children:[n.jsx(x,{className:"btn btn-outline btn-error join-item mb-2",onClick:async()=>await g(t,"bridge/request/restart",""),title:a(e=>e.restart_zigbee2mqtt),modalDescription:a(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:a(e=>e.cancel,{ns:"common"}),children:a(e=>e.restart_zigbee2mqtt)}),n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:async()=>await C(u.getState(),"state.json"),children:a(e=>e.download_state)}),r?n.jsx(l,{className:"btn btn-primary join-item disabled",children:n.jsx("span",{className:"loading loading-dots loading-xl"})}):i?n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:d,children:a(e=>e.download_z2m_backup)}):n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:async()=>{o(t),await g(t,"bridge/request/backup","")},children:a(e=>e.request_z2m_backup)}),n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:async()=>await k.show(z,{addInstallCode:async e=>await g(t,"bridge/request/install_code/add",{value:e})}),children:a(e=>e.add_install_code)}),n.jsx(E,{sourceIdx:t,devices:c})]})}export{A as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,j as s,F as m,B as v,f as G,ag as U,u as J,a as l,A as K,s as F,q as T,S as Q,v as W,L as X,ah as q,ai as Y,aj as Z,N as ee,M as R,ak as se,al as ae}from"./index-ClCsMWbS.js";import{u as ne,g as te,d as ie,c as le,e as re,F as ce,f as oe,o as E,a as de,s as D,b as H}from"./floating-ui.react-BfzwIwuD.js";import{I as O}from"./InputField-CqTVHKf8.js";import{S as V}from"./SelectField-WiB6Edsu.js";import{T as ue}from"./Table-BikCpRDP.js";import{u as me,T as he}from"./useTable-Bu98B1Qm.js";import"./envs-CSqIi4cL.js";import"./DebouncedInput-B8gvkj6A.js";function fe({placement:n,buttonClassName:w,buttonIcon:b,buttonTitle:x,title:_,onApply:g,canApply:y,children:N}){const h=t.useRef(null),[p,i]=t.useState(!1),{refs:j,floatingStyles:r,context:d}=ne({open:p,onOpenChange:i,placement:n,middleware:n?[E(8),D({padding:16,crossAxis:!0}),H({element:h})]:[E(8),de({padding:16,crossAxis:!0}),D({padding:16,crossAxis:!0}),H({element:h})]}),f=te(d,{event:"click"}),S=ie(d),c=le(d),{getReferenceProps:I,getFloatingProps:A}=re([f,S,c]),P=t.useCallback(async(...C)=>{await g?.(...C),i(!1)},[g]);return s.jsxs(s.Fragment,{children:[s.jsxs("button",{ref:j.setReference,type:"button",className:w,...I(),children:[b?s.jsx(m,{icon:b}):null,x?s.jsx("span",{children:x}):null]}),p?s.jsx(ce,{children:s.jsxs("aside",{ref:j.setFloating,style:r,...A({className:"card bg-base-200 shadow-lg border border-base-300 w-[min(32rem,calc(100vw-2.5rem))] max-h-[80vh] z-11"}),children:[s.jsxs("div",{className:"card-body px-4 py-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"card-title",children:_}),s.jsx(v,{onClick:()=>i(!1),className:"btn btn-ghost btn-sm",children:s.jsx(m,{icon:G})})]}),N,s.jsx("div",{className:"card-actions justify-end",children:s.jsx(v,{onClick:P,className:"btn btn-outline btn-primary btn-square btn-sm",disabled:!y,children:s.jsx(m,{icon:U})})})]}),s.jsx(oe,{ref:h,context:d,className:"fill-base-200 [&>path:first-of-type]:stroke-base-300 [&>path:last-of-type]:stroke-base-300"})]})}):null]})}function ye(){const{t:n}=J(["touchlink","common","zigbee","settings"]),w=l(e=>e.bridgeInfo),b=l(e=>e.touchlinkDevices),x=l(e=>e.devices),_=l(e=>e.touchlinkIdentifyInProgress),g=l(e=>e.touchlinkResetInProgress),y=l(e=>Object.values(e.touchlinkScanInProgress).some(a=>a)),N=l(e=>e.setTouchlinkIdentifyInProgress),h=l(e=>e.setTouchlinkResetInProgress),p=l(e=>e.setTouchlinkScan),[i,j]=t.useState(0),[r,d]=t.useState(""),[f,S]=t.useState(""),[c,I]=t.useState([]);t.useEffect(()=>{d(w[i].network?.extended_pan_id??"")},[i]),t.useEffect(()=>{I(f?f.replaceAll(" ","").split(","):[])},[f]);const A=t.useMemo(()=>{const e=[];for(let a=0;a<K.length;a++){const o=x[a];for(const u of b[a])e.push({sourceIdx:a,touchlinkDevice:u,friendlyName:o.find(k=>k.ieee_address===u.ieee_address)?.friendly_name,identifyInProgress:_[a],resetInProgress:g[a]})}return e},[x,b,_,g]),P=t.useCallback(async e=>{p(e,{inProgress:!0,devices:[]}),await F(e,"bridge/request/touchlink/scan","")},[p]),C=t.useCallback(async([e,a])=>{N(e,!0),await F(e,"bridge/request/touchlink/identify",a)},[N]),M=t.useCallback(async([e,a])=>{h(e,!0),await F(e,"bridge/request/touchlink/factory_reset",a)},[h]),B=t.useCallback(async()=>{await F(i,"bridge/request/action",{action:"philips_hue_factory_reset",params:{extended_pan_id:r,serial_numbers:c}}),S("")},[i,r,c]),L=t.useMemo(()=>(!r||/^0x[a-fA-F0-9]{16}$/.test(r))&&Array.isArray(c)&&c.length>0?c.every(e=>/^[a-fA-F0-9]{6}$/.test(e)):!1,[r,c]),$=t.useMemo(()=>[{id:"source",size:60,header:()=>s.jsx("span",{title:n(e=>e.source,{ns:"common"}),children:s.jsx(m,{icon:W})}),accessorFn:({sourceIdx:e})=>T[e],cell:({row:{original:{sourceIdx:e}}})=>s.jsx(Q,{idx:e,nameClassName:"hidden md:inline-block"}),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"ieee_address",minSize:175,header:n(e=>e.ieee_address,{ns:"zigbee"}),accessorFn:({touchlinkDevice:e})=>e.ieee_address,cell:({row:{original:{sourceIdx:e,touchlinkDevice:a,friendlyName:o}}})=>o?s.jsx("div",{className:"min-w-0",children:s.jsx(X,{to:`/device/${e}/${a.ieee_address}/info`,className:"link link-hover truncate",children:a.ieee_address})}):a.ieee_address,sortingFn:(e,a)=>e.original.touchlinkDevice.ieee_address.localeCompare(a.original.touchlinkDevice.ieee_address),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"friendly_name",minSize:175,header:n(e=>e.friendly_name,{ns:"common"}),accessorFn:({friendlyName:e})=>e,filterFn:"includesString",sortingFn:(e,a)=>(e.original.friendlyName??e.original.touchlinkDevice.ieee_address).localeCompare(a.original.friendlyName??a.original.touchlinkDevice.ieee_address),meta:{filterVariant:"text",textFaceted:!0}},{id:"channel",minSize:175,header:n(e=>e.channel,{ns:"zigbee"}),accessorFn:({touchlinkDevice:e})=>e.channel,filterFn:"weakEquals",meta:{filterVariant:"select"}},{id:"actions",minSize:130,cell:({row:{original:{sourceIdx:e,touchlinkDevice:a,resetInProgress:o,identifyInProgress:u}}})=>s.jsxs("div",{className:"join join-horizontal",children:[s.jsx(v,{disabled:o||u,item:[e,a],title:n(k=>k.identify),className:"btn btn-sm btn-square btn-outline btn-primary join-item",onClick:C,children:s.jsx(m,{icon:u?q:Y,spin:u})}),s.jsx(v,{disabled:o||u,item:[e,a],title:n(k=>k.factory_reset),className:"btn btn-sm btn-square btn-outline btn-error join-item",onClick:M,children:s.jsx(m,{icon:o?q:Z,spin:o})})]}),enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1}],[n,C,M]),z=me({id:"touchlink-devices",columns:$,data:A,visibleColumns:{source:R},sorting:[{id:"friendly_name",desc:!1}]});return y?s.jsx("div",{className:"flex flex-row justify-center items-center gap-2",children:s.jsx("span",{className:"loading loading-infinity loading-xl"})}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{children:s.jsx(he,{...z})}),s.jsxs("div",{className:"flex flex-row flex-wrap justify-center items-center gap-2 mb-3",children:[R&&s.jsxs(V,{name:"scan_idx_picker",label:n(e=>e.scan_source),value:i,onChange:e=>!e.target.validationMessage&&!!e.target.value&&j(Number.parseInt(e.target.value,10)),className:"select",children:[s.jsx("option",{value:"",disabled:!0,children:n(e=>e.select_scan_source)}),T.map((e,a)=>s.jsx("option",{value:a,children:e},e))]}),s.jsx("fieldset",{className:"fieldset self-end",children:s.jsxs(v,{className:"btn btn-outline btn-primary",item:i,onClick:P,disabled:y,children:[s.jsx(m,{icon:se}),n(e=>e.scan)]})}),s.jsx("fieldset",{className:"fieldset self-end ml-auto",children:s.jsxs(fe,{placement:"bottom-end",canApply:L,onApply:B,buttonClassName:"btn btn-outline btn-error",buttonIcon:ae,buttonTitle:n(e=>e.philips_hue_reset),title:n(e=>e.philips_hue_reset),children:[R&&s.jsxs(V,{name:"scan_idx_picker",label:n(e=>e.source,{ns:"common"}),value:i,onChange:e=>!e.target.validationMessage&&!!e.target.value&&j(Number.parseInt(e.target.value,10)),className:"select",children:[s.jsx("option",{value:"",disabled:!0,children:n(e=>e.source,{ns:"common"})}),T.map((e,a)=>s.jsx("option",{value:a,children:e},e))]}),s.jsx(O,{name:"serial_numbers",label:n(e=>e.serial_numbers),type:"text",value:f,onChange:e=>!e.target.validationMessage&&S(e.target.value)}),s.jsxs("div",{className:"collapse collapse-arrow",children:[s.jsx("input",{type:"checkbox"}),s.jsx("div",{className:"collapse-title font-semibold px-0",children:n(e=>e.advanced,{ns:"settings"})}),s.jsx("div",{className:"collapse-content text-sm pb-2 px-2",children:s.jsx(O,{name:"extended_pan_id",label:n(e=>e.extended_pan_id,{ns:"zigbee"}),type:"text",value:r,onChange:e=>!e.target.validationMessage&&d(e.target.value)})})]})]})})]}),s.jsx("div",{className:"mb-5",children:s.jsx(ue,{id:"touchlink-devices",...z})})]})}export{ye as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,u as l,j as a,L as d,aT as p}from"./index-
|
|
1
|
+
import{r as s,u as l,j as a,L as d,aT as p}from"./index-ClCsMWbS.js";const i=e=>{const o="[/| |:]",n=new RegExp(o,"g");return e.replace(n,"_")},f=s.memo(({device:e})=>{const{t:o}=l("zigbee");let n=e.model_id||o(r=>r.unknown),t=p;if(e.supported&&e.definition){const r=[encodeURIComponent(e.definition.vendor.toLowerCase()),encodeURIComponent(e.definition.model.toLowerCase())].join("-");t=`https://www.zigbee2mqtt.io/devices/${encodeURIComponent(i(e.definition.model))}.html#${encodeURIComponent(i(r))}`,n=e.definition.model}return a.jsx(d,{target:"_blank",rel:"noopener noreferrer",to:t,className:"link link-hover",children:n})}),u=s.memo(({device:e})=>{const{t:o}=l("zigbee");let n=o(r=>r.unsupported),t=p;return e.supported&&e.definition&&(t=`https://www.zigbee2mqtt.io/supported-devices/#v=${encodeURIComponent(e.definition.vendor)}`,n=e.definition.vendor),a.jsx(d,{target:"_blank",rel:"noopener noreferrer",to:t,className:"link link-hover",children:n})});export{f as M,u as V};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as Rr,b as pr,e as vr,d as _r}from"./isObjectLike-
|
|
1
|
+
import{r as Rr,b as pr,e as vr,d as _r}from"./isObjectLike-D4auEUP9.js";var c,Z;function hr(){if(Z)return c;Z=1;function u(r,e,a,o){var n=-1,i=r==null?0:r.length;for(o&&i&&(a=r[++n]);++n<i;)a=e(a,r[n],n,r);return a}return c=u,c}var b,j;function lr(){if(j)return b;j=1;function u(r){return function(e){return r?.[e]}}return b=u,b}var g,N;function mr(){if(N)return g;N=1;var u=lr(),r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=u(r);return g=e,g}var R,P;function yr(){if(P)return R;P=1;function u(r,e){for(var a=-1,o=r==null?0:r.length,n=Array(o);++a<o;)n[a]=e(r[a],a,r);return n}return R=u,R}var p,G;function Sr(){if(G)return p;G=1;var u=Rr(),r=pr(),e="[object Symbol]";function a(o){return typeof o=="symbol"||r(o)&&u(o)==e}return p=a,p}var v,H;function qr(){if(H)return v;H=1;var u=vr(),r=yr(),e=_r(),a=Sr(),o=u?u.prototype:void 0,n=o?o.toString:void 0;function i(d){if(typeof d=="string")return d;if(e(d))return r(d,i)+"";if(a(d))return n?n.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return v=i,v}var _,J;function Q(){if(J)return _;J=1;var u=qr();function r(e){return e==null?"":u(e)}return _=r,_}var h,V;function Ar(){if(V)return h;V=1;var u=mr(),r=Q(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=a+o+n,d="["+i+"]",f=RegExp(d,"g");function x(t){return t=r(t),t&&t.replace(e,u).replace(f,"")}return h=x,h}var l,Y;function Or(){if(Y)return l;Y=1;var u=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r(e){return e.match(u)||[]}return l=r,l}var m,B;function Cr(){if(B)return m;B=1;var u=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function r(e){return u.test(e)}return m=r,m}var y,$;function Ur(){if($)return y;$=1;var u="\\ud800-\\udfff",r="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",o=r+e+a,n="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",d="\\xac\\xb1\\xd7\\xf7",f="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",x="\\u2000-\\u206f",t=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="A-Z\\xc0-\\xd6\\xd8-\\xde",X="\\ufe0e\\ufe0f",O=d+f+x+t,C="['’]",U="["+O+"]",rr="["+o+"]",W="\\d+",ur="["+n+"]",L="["+i+"]",T="[^"+u+O+W+n+i+A+"]",er="\\ud83c[\\udffb-\\udfff]",nr="(?:"+rr+"|"+er+")",ar="[^"+u+"]",M="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",s="["+A+"]",or="\\u200d",I="(?:"+L+"|"+T+")",ir="(?:"+s+"|"+T+")",k="(?:"+C+"(?:d|ll|m|re|s|t|ve))?",w="(?:"+C+"(?:D|LL|M|RE|S|T|VE))?",z=nr+"?",D="["+X+"]?",dr="(?:"+or+"(?:"+[ar,M,E].join("|")+")"+D+z+")*",fr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sr=D+z+dr,xr="(?:"+[ur,M,E].join("|")+")"+sr,cr=RegExp([s+"?"+L+"+"+k+"(?="+[U,s,"$"].join("|")+")",ir+"+"+w+"(?="+[U,s+I,"$"].join("|")+")",s+"?"+I+"+"+k,s+"+"+w,tr,fr,W,xr].join("|"),"g");function br(gr){return gr.match(cr)||[]}return y=br,y}var S,F;function Wr(){if(F)return S;F=1;var u=Or(),r=Cr(),e=Q(),a=Ur();function o(n,i,d){return n=e(n),i=d?void 0:i,i===void 0?r(n)?a(n):u(n):n.match(i)||[]}return S=o,S}var q,K;function Tr(){if(K)return q;K=1;var u=hr(),r=Ar(),e=Wr(),a="['’]",o=RegExp(a,"g");function n(i){return function(d){return u(e(r(d).replace(o,"")),i,"")}}return q=n,q}export{Q as a,Tr as b,Sr as r};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,b1 as gt,b2 as mt,j as H}from"./index-DvPcNtN4.js";function ye(){return typeof window<"u"}function ne(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){var t;return(t=($e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $e(e){return ye()?e instanceof Node||e instanceof V(e).Node:!1}function L(e){return ye()?e instanceof Element||e instanceof V(e).Element:!1}function _(e){return ye()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function De(e){return!ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}const Xt=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=j(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Xt.has(r)}const Ut=new Set(["table","td","th"]);function qt(e){return Ut.has(ne(e))}const Gt=[":popover-open",":modal"];function we(e){return Gt.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zt=["transform","translate","scale","rotate","perspective"],zt=["transform","translate","scale","rotate","perspective","filter"],Qt=["paint","layout","strict","content"];function Be(e){const t=xe(),n=L(e)?j(e):e;return Zt.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||zt.some(o=>(n.willChange||"").includes(o))||Qt.some(o=>(n.contain||"").includes(o))}function Jt(e){let t=q(e);for(;_(t)&&!X(t);){if(Be(t))return t;if(we(t))return null;t=q(t)}return null}function xe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const en=new Set(["html","body","#document"]);function X(e){return en.has(ne(e))}function j(e){return V(e).getComputedStyle(e)}function Re(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||De(e)&&e.host||G(e);return De(t)?t.host:t}function pt(e){const t=q(e);return X(t)?e.ownerDocument?e.ownerDocument.body:e.body:_(t)&&fe(t)?t:pt(t)}function J(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=pt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=V(r);if(i){const c=ke(s);return t.concat(s,s.visualViewport||[],fe(r)?r:[],c&&n?J(c):[])}return t.concat(r,J(r,[],n))}function ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const tn=["top","right","bottom","left"],Ke=["start","end"],Ye=tn.reduce((e,t)=>e.concat(t,t+"-"+Ke[0],t+"-"+Ke[1]),[]),se=Math.min,ee=Math.max,pe=Math.round,K=e=>({x:e,y:e}),nn={left:"right",right:"left",bottom:"top",top:"bottom"},on={start:"end",end:"start"};function Le(e,t,n){return ee(e,se(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function ht(e){return e==="x"?"y":"x"}function _e(e){return e==="y"?"height":"width"}const rn=new Set(["top","bottom"]);function Ee(e){return rn.has(oe(e))?"y":"x"}function We(e){return ht(Ee(e))}function sn(e,t,n){n===void 0&&(n=!1);const o=U(e),r=We(e),i=_e(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Xe(s)),[s,Xe(s)]}function cn(e){return e.replace(/start|end/g,t=>on[t])}function Xe(e){return e.replace(/left|right|bottom|top/g,t=>nn[t])}function ln(e){return{top:0,right:0,bottom:0,left:0,...e}}function vt(e){return typeof e!="number"?ln(e):{top:e,right:e,bottom:e,left:e}}function he(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}var an=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Me=an.join(","),bt=typeof Element>"u",ce=bt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ve=!bt&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},le=function(t,n){var o;n===void 0&&(n=!0);var r=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),i=r===""||r==="true",s=i||n&&t&&le(t.parentNode);return s},un=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},fn=function(t,n,o){if(le(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Me));return n&&ce.call(t,Me)&&r.unshift(t),r=r.filter(o),r},Fe=function(t,n,o){for(var r=[],i=Array.from(t);i.length;){var s=i.shift();if(!le(s,!1))if(s.tagName==="SLOT"){var c=s.assignedElements(),l=c.length?c:s.children,a=Fe(l,!0,o);o.flatten?r.push.apply(r,a):r.push({scopeParent:s,candidates:a})}else{var u=ce.call(s,Me);u&&o.filter(s)&&(n||!t.includes(s))&&r.push(s);var f=s.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(s),m=!le(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(s));if(f&&m){var d=Fe(f===!0?s.children:f.children,!0,o);o.flatten?r.push.apply(r,d):r.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return r},yt=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},wt=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||un(t))&&!yt(t)?0:t.tabIndex},dn=function(t,n){var o=wt(t);return o<0&&n&&!yt(t)?0:o},gn=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xt=function(t){return t.tagName==="INPUT"},mn=function(t){return xt(t)&&t.type==="hidden"},pn=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},hn=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},vn=function(t){if(!t.name)return!0;var n=t.form||ve(t),o=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(t.name));else try{r=o(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=hn(r,t.form);return!i||i===t},bn=function(t){return xt(t)&&t.type==="radio"},yn=function(t){return bn(t)&&!vn(t)},wn=function(t){var n,o=t&&ve(t),r=(n=o)===null||n===void 0?void 0:n.host,i=!1;if(o&&o!==t){var s,c,l;for(i=!!((s=r)!==null&&s!==void 0&&(c=s.ownerDocument)!==null&&c!==void 0&&c.contains(r)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&r;){var a,u,f;o=ve(r),r=(a=o)===null||a===void 0?void 0:a.host,i=!!((u=r)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(r))}}return i},Ue=function(t){var n=t.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},xn=function(t,n){var o=n.displayCheck,r=n.getShadowRoot;if(o==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=ce.call(t,"details>summary:first-of-type"),c=s?t.parentElement:t;if(ce.call(c,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=t;t;){var a=t.parentElement,u=ve(t);if(a&&!a.shadowRoot&&r(a)===!0)return Ue(t);t.assignedSlot?t=t.assignedSlot:!a&&u!==t.ownerDocument?t=u.host:t=a}t=l}if(wn(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Ue(t);return!1},Rn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return ce.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},En=function(t,n){return!(n.disabled||le(n)||mn(n)||xn(n,t)||pn(n)||Rn(n))},qe=function(t,n){return!(yn(n)||wt(n)<0||!En(t,n))},Sn=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Rt=function(t){var n=[],o=[];return t.forEach(function(r,i){var s=!!r.scopeParent,c=s?r.scopeParent:r,l=dn(c,s),a=s?Rt(r.candidates):c;l===0?s?n.push.apply(n,a):n.push(c):o.push({documentOrder:i,tabIndex:l,item:r,isScope:s,content:a})}),o.sort(gn).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(n)},Et=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Fe([t],n.includeContainer,{filter:qe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Sn}):o=fn(t,n.includeContainer,qe.bind(null,n)),Rt(o)};function Cn(){return/apple/i.test(navigator.vendor)}const Ge="data-floating-ui-focusable",Tn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ne(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&De(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function ie(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Te(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function On(e){return e.matches("html,body")}function ae(e){return e?.ownerDocument||document}function An(e){return _(e)&&e.matches(Tn)}function In(e){return e?e.hasAttribute(Ge)?e:e.querySelector("["+Ge+"]")||e:null}function ge(e,t,n){return n===void 0&&(n=!0),e.filter(r=>{var i;return r.parentId===t&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...ge(e,r.id,n)])}function Dn(e){return"nativeEvent"in e}function Ze(e,t){return["mouse","pen"].includes(e)}var kn=typeof document<"u",Ln=function(){},z=kn?p.useLayoutEffect:Ln;const Mn={...gt},Fn=Mn.useInsertionEffect,Nn=Fn||(e=>e());function Q(e){const t=p.useRef(()=>{});return Nn(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}const St=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ct(e,t){const n=Et(e,St()),o=n.length;if(o===0)return;const r=Pn(ae(e)),i=n.indexOf(r),s=i===-1?t===1?0:o-1:i+t;return n[s]}function $n(e){return Ct(ae(e).body,1)||e}function Bn(e){return Ct(ae(e).body,-1)||e}function Pe(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!Ne(n,o)}function _n(e){Et(e,St()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ze(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}function Qe(e,t,n){let{reference:o,floating:r}=e;const i=Ee(t),s=We(t),c=_e(s),l=oe(t),a=i==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:u,y:o.y-r.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(U(t)){case"start":d[s]-=m*(n&&a?-1:1);break;case"end":d[s]+=m*(n&&a?-1:1);break}return d}const Wn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=Qe(a,o,l),m=o,d={},h=0;for(let g=0;g<c.length;g++){const{name:v,fn:w}=c[g],{x:b,y:x,data:S,reset:E}=await w({x:u,y:f,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:e,floating:t}});u=b??u,f=x??f,d={...d,[v]:{...d[v],...S}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(a=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=Qe(a,m,l)),g=-1)}return{x:u,y:f,placement:m,strategy:r,middlewareData:d}};async function Tt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=!1,padding:d=0}=de(t,e),h=vt(d),v=c[m?f==="floating"?"reference":"floating":f],w=he(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),b=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=he(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:x,strategy:l}):b);return{top:(w.top-E.top+h.top)/S.y,bottom:(E.bottom-w.bottom+h.bottom)/S.y,left:(w.left-E.left+h.left)/S.x,right:(E.right-w.right+h.right)/S.x}}const Vn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=t,{element:a,padding:u=0}=de(e,t)||{};if(a==null)return{};const f=vt(u),m={x:n,y:o},d=We(r),h=_e(d),g=await s.getDimensions(a),v=d==="y",w=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[d]-m[d]-i.floating[h],E=m[d]-i.reference[d],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let C=A?A[x]:0;(!C||!await(s.isElement==null?void 0:s.isElement(A)))&&(C=c.floating[x]||i.floating[h]);const O=S/2-E/2,B=C/2-g[h]/2-1,P=se(f[w],B),N=se(f[b],B),M=P,$=C-g[h]-N,R=C/2-g[h]/2+O,I=Le(M,R,$),T=!l.arrow&&U(r)!=null&&R!==I&&i.reference[h]/2-(R<M?P:N)-g[h]/2<0,D=T?R<M?R-M:R-$:0;return{[d]:m[d]+D,data:{[d]:I,centerOffset:R-I-D,...T&&{alignmentOffset:D}},reset:T}}});function jn(e,t,n){return(e?[...n.filter(r=>U(r)===e),...n.filter(r=>U(r)!==e)]:n.filter(r=>oe(r)===r)).filter(r=>e?U(r)===e||(t?cn(r)!==r:!1):!0)}const Hn=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:s,placement:c,platform:l,elements:a}=t,{crossAxis:u=!1,alignment:f,allowedPlacements:m=Ye,autoAlignment:d=!0,...h}=de(e,t),g=f!==void 0||m===Ye?jn(f||null,d,m):m,v=await Tt(t,h),w=((n=s.autoPlacement)==null?void 0:n.index)||0,b=g[w];if(b==null)return{};const x=sn(b,i,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==b)return{reset:{placement:g[0]}};const S=[v[oe(b)],v[x[0]],v[x[1]]],E=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:b,overflows:S}],A=g[w+1];if(A)return{data:{index:w+1,overflows:E},reset:{placement:A}};const C=E.map(P=>{const N=U(P.placement);return[P.placement,N&&u?P.overflows.slice(0,2).reduce((M,$)=>M+$,0):P.overflows[0],P.overflows]}).sort((P,N)=>P[1]-N[1]),B=((r=C.filter(P=>P[2].slice(0,U(P[0])?2:3).every(N=>N<=0))[0])==null?void 0:r[0])||C[0][0];return B!==c?{data:{index:w+1,overflows:E},reset:{placement:B}}:{}}}},Kn=new Set(["left","top"]);async function Yn(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=oe(n),c=U(n),l=Ee(n)==="y",a=Kn.has(s)?-1:1,u=i&&l?-1:1,f=de(t,e);let{mainAxis:m,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),l?{x:d*u,y:m*a}:{x:m*a,y:d*u}}const Xn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,l=await Yn(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Un=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:w,y:b}=v;return{x:w,y:b}}},...l}=de(e,t),a={x:n,y:o},u=await Tt(t,l),f=Ee(oe(r)),m=ht(f);let d=a[m],h=a[f];if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=d+u[v],x=d-u[w];d=Le(b,d,x)}if(s){const v=f==="y"?"top":"left",w=f==="y"?"bottom":"right",b=h+u[v],x=h-u[w];h=Le(b,h,x)}const g=c.fn({...t,[m]:d,[f]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:i,[f]:s}}}}}};function Pt(e){const t=j(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=_(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=pe(n)!==i||pe(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Ot(e){return L(e)?e:e.contextElement}function te(e){const t=Ot(e);if(!_(t))return K(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Pt(t);let s=(i?pe(n.width):n.width)/o,c=(i?pe(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const qn=K(0);function At(e){const t=V(e);return!xe()||!t.visualViewport?qn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function ue(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Ot(e);let s=K(1);t&&(o?L(o)&&(s=te(o)):s=te(e));const c=Gn(i,n,o)?At(i):K(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,u=r.width/s.x,f=r.height/s.y;if(i){const m=V(i),d=o&&L(o)?V(o):o;let h=m,g=ke(h);for(;g&&o&&d!==h;){const v=te(g),w=g.getBoundingClientRect(),b=j(g),x=w.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,a*=v.y,u*=v.x,f*=v.y,l+=x,a+=S,h=V(g),g=ke(h)}}return he({width:u,height:f,x:l,y:a})}function Se(e,t){const n=Re(e).scrollLeft;return t?t.left+n:ue(G(e)).left+n}function It(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Se(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Zn(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=G(o),c=t?we(t.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=K(1);const u=K(0),f=_(o);if((f||!f&&!i)&&((ne(o)!=="body"||fe(s))&&(l=Re(o)),_(o))){const d=ue(o);a=te(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const m=s&&!f&&!i?It(s,l):K(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+m.x,y:n.y*a.y-l.scrollTop*a.y+u.y+m.y}}function zn(e){return Array.from(e.getClientRects())}function Qn(e){const t=G(e),n=Re(e),o=e.ownerDocument.body,r=ee(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ee(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Se(e);const c=-n.scrollTop;return j(o).direction==="rtl"&&(s+=ee(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Je=25;function Jn(e,t){const n=V(e),o=G(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const u=xe();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=Se(o);if(a<=0){const u=o.ownerDocument,f=u.body,m=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-f.clientWidth-d);h<=Je&&(i-=h)}else a<=Je&&(i+=a);return{width:i,height:s,x:c,y:l}}const eo=new Set(["absolute","fixed"]);function to(e,t){const n=ue(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=_(e)?te(e):K(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function et(e,t,n){let o;if(t==="viewport")o=Jn(e,n);else if(t==="document")o=Qn(G(e));else if(L(t))o=to(t,n);else{const r=At(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return he(o)}function Dt(e,t){const n=q(e);return n===t||!L(n)||X(n)?!1:j(n).position==="fixed"||Dt(n,t)}function no(e,t){const n=t.get(e);if(n)return n;let o=J(e,[],!1).filter(c=>L(c)&&ne(c)!=="body"),r=null;const i=j(e).position==="fixed";let s=i?q(e):e;for(;L(s)&&!X(s);){const c=j(s),l=Be(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&eo.has(r.position)||fe(s)&&!l&&Dt(e,s))?o=o.filter(u=>u!==s):r=c,s=q(s)}return t.set(e,o),o}function oo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?we(t)?[]:no(t,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,u)=>{const f=et(t,u,r);return a.top=ee(f.top,a.top),a.right=se(f.right,a.right),a.bottom=se(f.bottom,a.bottom),a.left=ee(f.left,a.left),a},et(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ro(e){const{width:t,height:n}=Pt(e);return{width:t,height:n}}function io(e,t,n){const o=_(t),r=G(t),i=n==="fixed",s=ue(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=K(0);function a(){l.x=Se(r)}if(o||!o&&!i)if((ne(t)!=="body"||fe(r))&&(c=Re(t)),o){const d=ue(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else r&&a();i&&!o&&r&&a();const u=r&&!o&&!i?It(r,c):K(0),f=s.left+c.scrollLeft-l.x-u.x,m=s.top+c.scrollTop-l.y-u.y;return{x:f,y:m,width:s.width,height:s.height}}function Oe(e){return j(e).position==="static"}function tt(e,t){if(!_(e)||j(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function kt(e,t){const n=V(e);if(we(e))return n;if(!_(e)){let r=q(e);for(;r&&!X(r);){if(L(r)&&!Oe(r))return r;r=q(r)}return n}let o=tt(e,t);for(;o&&qt(o)&&Oe(o);)o=tt(o,t);return o&&X(o)&&Oe(o)&&!Be(o)?n:o||Jt(e)||n}const so=async function(e){const t=this.getOffsetParent||kt,n=this.getDimensions,o=await n(e.floating);return{reference:io(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function co(e){return j(e).direction==="rtl"}const lo={convertOffsetParentRelativeRectToViewportRelativeRect:Zn,getDocumentElement:G,getClippingRect:oo,getOffsetParent:kt,getElementRects:so,getClientRects:zn,getDimensions:ro,getScale:te,isElement:L,isRTL:co},ao=Xn,uo=Hn,fo=Un,nt=Vn,go=(e,t,n)=>{const o=new Map,r={platform:lo,...n},i={...r.platform,_c:o};return Wn(e,t,{...r,platform:i})};var mo=typeof document<"u",po=function(){},me=mo?p.useLayoutEffect:po;function be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!be(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!be(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Lt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ot(e,t){const n=Lt(e);return Math.round(t*n)/n}function Ae(e){const t=p.useRef(e);return me(()=>{t.current=e}),t}function ho(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,d]=p.useState(o);be(m,o)||d(o);const[h,g]=p.useState(null),[v,w]=p.useState(null),b=p.useCallback(y=>{y!==A.current&&(A.current=y,g(y))},[]),x=p.useCallback(y=>{y!==C.current&&(C.current=y,w(y))},[]),S=i||h,E=s||v,A=p.useRef(null),C=p.useRef(null),O=p.useRef(u),B=l!=null,P=Ae(l),N=Ae(r),M=Ae(a),$=p.useCallback(()=>{if(!A.current||!C.current)return;const y={placement:t,strategy:n,middleware:m};N.current&&(y.platform=N.current),go(A.current,C.current,y).then(k=>{const F={...k,isPositioned:M.current!==!1};R.current&&!be(O.current,F)&&(O.current=F,mt.flushSync(()=>{f(F)}))})},[m,t,n,N,M]);me(()=>{a===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(y=>({...y,isPositioned:!1})))},[a]);const R=p.useRef(!1);me(()=>(R.current=!0,()=>{R.current=!1}),[]),me(()=>{if(S&&(A.current=S),E&&(C.current=E),S&&E){if(P.current)return P.current(S,E,$);$()}},[S,E,$,P,B]);const I=p.useMemo(()=>({reference:A,floating:C,setReference:b,setFloating:x}),[b,x]),T=p.useMemo(()=>({reference:S,floating:E}),[S,E]),D=p.useMemo(()=>{const y={position:n,left:0,top:0};if(!T.floating)return y;const k=ot(T.floating,u.x),F=ot(T.floating,u.y);return c?{...y,transform:"translate("+k+"px, "+F+"px)",...Lt(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:F}},[n,c,T.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:$,refs:I,elements:T,floatingStyles:D}),[u,$,I,T,D])}const vo=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?nt({element:o.current,padding:r}).fn(n):{}:o?nt({element:o,padding:r}).fn(n):{}}}},Mo=(e,t)=>({...ao(e),options:[e,t]}),Fo=(e,t)=>({...fo(e),options:[e,t]}),No=(e,t)=>({...uo(e),options:[e,t]}),$o=(e,t)=>({...vo(e),options:[e,t]}),bo="data-floating-ui-focusable",rt="active",it="selected",yo={...gt};let st=!1,wo=0;const ct=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wo++;function xo(){const[e,t]=p.useState(()=>st?ct():void 0);return z(()=>{e==null&&t(ct())},[]),p.useEffect(()=>{st=!0},[]),e}const Ro=yo.useId,Ce=Ro||xo,Bo=p.forwardRef(function(t,n){const{context:{placement:o,elements:{floating:r},middlewareData:{arrow:i,shift:s}},width:c=14,height:l=7,tipRadius:a=0,strokeWidth:u=0,staticOffset:f,stroke:m,d,style:{transform:h,...g}={},...v}=t,w=Ce(),[b,x]=p.useState(!1);if(z(()=>{if(!r)return;j(r).direction==="rtl"&&x(!0)},[r]),!r)return null;const[S,E]=o.split("-"),A=S==="top"||S==="bottom";let C=f;(A&&s!=null&&s.x||!A&&s!=null&&s.y)&&(C=null);const O=u*2,B=O/2,P=c/2*(a/-8+1),N=l/2*a/4,M=!!d,$=C&&E==="end"?"bottom":"top";let R=C&&E==="end"?"right":"left";C&&b&&(R=E==="end"?"left":"right");const I=i?.x!=null?C||i.x:"",T=i?.y!=null?C||i.y:"",D=d||"M0,0"+(" H"+c)+(" L"+(c-P)+","+(l-N))+(" Q"+c/2+","+l+" "+P+","+(l-N))+" Z",y={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[S];return H.jsxs("svg",{...v,"aria-hidden":!0,ref:n,width:M?c:c+O,height:c,viewBox:"0 0 "+c+" "+(l>c?l:c),style:{position:"absolute",pointerEvents:"none",[R]:I,[$]:T,[S]:A||M?"100%":"calc(100% - "+O/2+"px)",transform:[y,h].filter(k=>!!k).join(" "),...g},children:[O>0&&H.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:m,strokeWidth:O+(d?0:1),d:D}),H.jsx("path",{stroke:O&&!d?v.fill:"none",d:D}),H.jsx("clipPath",{id:w,children:H.jsx("rect",{x:-B,y:B*(M?-1:1),width:c+O,height:c})})]})});function Eo(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const So=p.createContext(null),Co=p.createContext(null),Mt=()=>{var e;return((e=p.useContext(So))==null?void 0:e.id)||null},Ft=()=>p.useContext(Co);function Ve(e){return"data-floating-ui-"+e}const Nt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},lt=p.forwardRef(function(t,n){const[o,r]=p.useState();z(()=>{Cn()&&r("button")},[]);const i={ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[Ve("focus-guard")]:"",style:Nt};return H.jsx("span",{...t,...i})}),$t=p.createContext(null),at=Ve("portal");function To(e){e===void 0&&(e={});const{id:t,root:n}=e,o=Ce(),r=Po(),[i,s]=p.useState(null),c=p.useRef(null);return z(()=>()=>{i?.remove(),queueMicrotask(()=>{c.current=null})},[i]),z(()=>{if(!o||c.current)return;const l=t?document.getElementById(t):null;if(!l)return;const a=document.createElement("div");a.id=o,a.setAttribute(at,""),l.appendChild(a),c.current=a,s(a)},[t,o]),z(()=>{if(n===null||!o||c.current)return;let l=n||r?.portalNode;l&&!$e(l)&&(l=l.current),l=l||document.body;let a=null;t&&(a=document.createElement("div"),a.id=t,l.appendChild(a));const u=document.createElement("div");u.id=o,u.setAttribute(at,""),l=a||l,l.appendChild(u),c.current=u,s(u)},[t,n,o,r]),i}function _o(e){const{children:t,id:n,root:o,preserveTabOrder:r=!0}=e,i=To({id:n,root:o}),[s,c]=p.useState(null),l=p.useRef(null),a=p.useRef(null),u=p.useRef(null),f=p.useRef(null),m=s?.modal,d=s?.open,h=!!s&&!s.modal&&s.open&&r&&!!(o||i);return p.useEffect(()=>{if(!i||!r||m)return;function g(v){i&&Pe(v)&&(v.type==="focusin"?ze:_n)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,r,m]),p.useEffect(()=>{i&&(d||ze(i))},[d,i]),H.jsxs($t.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:a,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:c}),[r,i]),children:[h&&i&&H.jsx(lt,{"data-type":"outside",ref:l,onFocus:g=>{if(Pe(g,i)){var v;(v=u.current)==null||v.focus()}else{const w=s?s.domReference:null,b=Bn(w);b?.focus()}}}),h&&i&&H.jsx("span",{"aria-owns":i.id,style:Nt}),i&&mt.createPortal(t,i),h&&i&&H.jsx(lt,{"data-type":"outside",ref:a,onFocus:g=>{if(Pe(g,i)){var v;(v=f.current)==null||v.focus()}else{const w=s?s.domReference:null,b=$n(w);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Po=()=>p.useContext($t);function ut(e){return _(e.target)&&e.target.tagName==="BUTTON"}function Oo(e){return _(e.target)&&e.target.tagName==="A"}function ft(e){return An(e)}function Wo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,elements:{domReference:i}}=e,{enabled:s=!0,event:c="click",toggle:l=!0,ignoreMouse:a=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,m=p.useRef(),d=p.useRef(!1),h=p.useMemo(()=>({onPointerDown(g){m.current=g.pointerType},onMouseDown(g){const v=m.current;g.button===0&&c!=="click"&&(Ze(v)&&a||(n&&l&&(!(r.current.openEvent&&f)||r.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const v=m.current;if(c==="mousedown"&&m.current){m.current=void 0;return}Ze(v)&&a||(n&&l&&(!(r.current.openEvent&&f)||r.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){m.current=void 0,!(g.defaultPrevented||!u||ut(g))&&(g.key===" "&&!ft(i)&&(g.preventDefault(),d.current=!0),!Oo(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||ut(g)||ft(i)||g.key===" "&&d.current&&(d.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[r,i,c,a,u,o,n,f,l]);return p.useMemo(()=>s?{reference:h}:{},[s,h])}const Ao={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Io={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},dt=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Vo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:r,dataRef:i}=e,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:a="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:d,capture:h}=t,g=Ft(),v=Q(typeof l=="function"?l:()=>!1),w=typeof l=="function"?v:l,b=p.useRef(!1),{escapeKey:x,outsidePress:S}=dt(d),{escapeKey:E,outsidePress:A}=dt(h),C=p.useRef(!1),O=Q(R=>{var I;if(!n||!s||!c||R.key!=="Escape"||C.current)return;const T=(I=i.current.floatingContext)==null?void 0:I.nodeId,D=g?ge(g.nodesRef.current,T):[];if(!x&&(R.stopPropagation(),D.length>0)){let y=!0;if(D.forEach(k=>{var F;if((F=k.context)!=null&&F.open&&!k.context.dataRef.current.__escapeKeyBubbles){y=!1;return}}),!y)return}o(!1,Dn(R)?R.nativeEvent:R,"escape-key")}),B=Q(R=>{var I;const T=()=>{var D;O(R),(D=ie(R))==null||D.removeEventListener("keydown",T)};(I=ie(R))==null||I.addEventListener("keydown",T)}),P=Q(R=>{var I;const T=i.current.insideReactTree;i.current.insideReactTree=!1;const D=b.current;if(b.current=!1,a==="click"&&D||T||typeof w=="function"&&!w(R))return;const y=ie(R),k="["+Ve("inert")+"]",F=ae(r.floating).querySelectorAll(k);let Z=L(y)?y:null;for(;Z&&!X(Z);){const W=q(Z);if(X(W)||!L(W))break;Z=W}if(F.length&&L(y)&&!On(y)&&!Ne(y,r.floating)&&Array.from(F).every(W=>!Ne(Z,W)))return;if(_(y)&&$){const W=X(y),Y=j(y),re=/auto|scroll/,_t=W||re.test(Y.overflowX),Wt=W||re.test(Y.overflowY),Vt=_t&&y.clientWidth>0&&y.scrollWidth>y.clientWidth,jt=Wt&&y.clientHeight>0&&y.scrollHeight>y.clientHeight,Ht=Y.direction==="rtl",Kt=jt&&(Ht?R.offsetX<=y.offsetWidth-y.clientWidth:R.offsetX>y.clientWidth),Yt=Vt&&R.offsetY>y.clientHeight;if(Kt||Yt)return}const je=(I=i.current.floatingContext)==null?void 0:I.nodeId,Bt=g&&ge(g.nodesRef.current,je).some(W=>{var Y;return Te(R,(Y=W.context)==null?void 0:Y.elements.floating)});if(Te(R,r.floating)||Te(R,r.domReference)||Bt)return;const He=g?ge(g.nodesRef.current,je):[];if(He.length>0){let W=!0;if(He.forEach(Y=>{var re;if((re=Y.context)!=null&&re.open&&!Y.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}o(!1,R,"outside-press")}),N=Q(R=>{var I;const T=()=>{var D;P(R),(D=ie(R))==null||D.removeEventListener(a,T)};(I=ie(R))==null||I.addEventListener(a,T)});p.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=S;let R=-1;function I(F){o(!1,F,"ancestor-scroll")}function T(){window.clearTimeout(R),C.current=!0}function D(){R=window.setTimeout(()=>{C.current=!1},xe()?5:0)}const y=ae(r.floating);c&&(y.addEventListener("keydown",E?B:O,E),y.addEventListener("compositionstart",T),y.addEventListener("compositionend",D)),w&&y.addEventListener(a,A?N:P,A);let k=[];return m&&(L(r.domReference)&&(k=J(r.domReference)),L(r.floating)&&(k=k.concat(J(r.floating))),!L(r.reference)&&r.reference&&r.reference.contextElement&&(k=k.concat(J(r.reference.contextElement)))),k=k.filter(F=>{var Z;return F!==((Z=y.defaultView)==null?void 0:Z.visualViewport)}),k.forEach(F=>{F.addEventListener("scroll",I,{passive:!0})}),()=>{c&&(y.removeEventListener("keydown",E?B:O,E),y.removeEventListener("compositionstart",T),y.removeEventListener("compositionend",D)),w&&y.removeEventListener(a,A?N:P,A),k.forEach(F=>{F.removeEventListener("scroll",I)}),window.clearTimeout(R)}},[i,r,c,w,a,n,o,m,s,x,S,O,E,B,P,A,N]),p.useEffect(()=>{i.current.insideReactTree=!1},[i,w,a]);const M=p.useMemo(()=>({onKeyDown:O,...u&&{[Ao[f]]:R=>{o(!1,R.nativeEvent,"reference-press")},...f!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[O,o,u,f]),$=p.useMemo(()=>({onKeyDown:O,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Io[a]]:()=>{i.current.insideReactTree=!0}}),[O,a,i]);return p.useMemo(()=>s?{reference:M,floating:$}:{},[s,M,$])}function Do(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=Ce(),i=p.useRef({}),[s]=p.useState(()=>Eo()),c=Mt()!=null,[l,a]=p.useState(o.reference),u=Q((d,h,g)=>{i.current.openEvent=d?h:void 0,s.emit("openchange",{open:d,event:h,reason:g,nested:c}),n?.(d,h,g)}),f=p.useMemo(()=>({setPositionReference:a}),[]),m=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:m,events:s,floatingId:r,refs:f}),[t,u,m,s,r,f])}function jo(e){e===void 0&&(e={});const{nodeId:t}=e,n=Do({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[i,s]=p.useState(null),[c,l]=p.useState(null),u=r?.domReference||i,f=p.useRef(null),m=Ft();z(()=>{u&&(f.current=u)},[u]);const d=ho({...e,elements:{...r,...c&&{reference:c}}}),h=p.useCallback(x=>{const S=L(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(S),d.refs.setReference(S)},[d.refs]),g=p.useCallback(x=>{(L(x)||x===null)&&(f.current=x,s(x)),(L(d.refs.reference.current)||d.refs.reference.current===null||x!==null&&!L(x))&&d.refs.setReference(x)},[d.refs]),v=p.useMemo(()=>({...d.refs,setReference:g,setPositionReference:h,domReference:f}),[d.refs,g,h]),w=p.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),b=p.useMemo(()=>({...d,...o,refs:v,elements:w,nodeId:t}),[d,v,w,t,o]);return z(()=>{o.dataRef.current.floatingContext=b;const x=m?.nodesRef.current.find(S=>S.id===t);x&&(x.context=b)}),p.useMemo(()=>({...d,context:b,refs:v,elements:w}),[d,v,w,b])}function Ie(e,t,n){const o=new Map,r=n==="item";let i=e;if(r&&e){const{[rt]:s,[it]:c,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[bo]:""},...i,...t.map(s=>{const c=s?s[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((s,c)=>(c&&Object.entries(c).forEach(l=>{let[a,u]=l;if(!(r&&[rt,it].includes(a)))if(a.indexOf("on")===0){if(o.has(a)||o.set(a,[]),typeof u=="function"){var f;(f=o.get(a))==null||f.push(u),s[a]=function(){for(var m,d=arguments.length,h=new Array(d),g=0;g<d;g++)h[g]=arguments[g];return(m=o.get(a))==null?void 0:m.map(v=>v(...h)).find(v=>v!==void 0)}}}else s[a]=u}),s),{})}}function Ho(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),o=e.map(c=>c?.item),r=p.useCallback(c=>Ie(c,e,"reference"),t),i=p.useCallback(c=>Ie(c,e,"floating"),n),s=p.useCallback(c=>Ie(c,e,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}const ko=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ko(e,t){var n,o;t===void 0&&(t={});const{open:r,elements:i,floatingId:s}=e,{enabled:c=!0,role:l="dialog"}=t,a=Ce(),u=((n=i.domReference)==null?void 0:n.id)||a,f=p.useMemo(()=>{var b;return((b=In(i.floating))==null?void 0:b.id)||s},[i.floating,s]),m=(o=ko.get(l))!=null?o:l,h=Mt()!=null,g=p.useMemo(()=>m==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?f:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":r?f:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:u},...m==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[m,f,h,r,u,l]),v=p.useMemo(()=>{const b={id:f,...m&&{role:m}};return m==="tooltip"||l==="label"?b:{...b,...m==="menu"&&{"aria-labelledby":u}}},[m,f,u,l]),w=p.useCallback(b=>{let{active:x,selected:S}=b;const E={role:"option",...x&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":S}}return{}},[f,l]);return p.useMemo(()=>c?{reference:g,floating:v,item:w}:{},[c,g,v,w])}export{_o as F,No as a,$o as b,Ko as c,Vo as d,Ho as e,Bo as f,Wo as g,Mo as o,Fo as s,jo as u};
|
|
1
|
+
import{r as p,b1 as gt,b2 as mt,j as H}from"./index-ClCsMWbS.js";function ye(){return typeof window<"u"}function ne(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){var t;return(t=($e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $e(e){return ye()?e instanceof Node||e instanceof V(e).Node:!1}function L(e){return ye()?e instanceof Element||e instanceof V(e).Element:!1}function _(e){return ye()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function De(e){return!ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}const Xt=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=j(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Xt.has(r)}const Ut=new Set(["table","td","th"]);function qt(e){return Ut.has(ne(e))}const Gt=[":popover-open",":modal"];function we(e){return Gt.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zt=["transform","translate","scale","rotate","perspective"],zt=["transform","translate","scale","rotate","perspective","filter"],Qt=["paint","layout","strict","content"];function Be(e){const t=xe(),n=L(e)?j(e):e;return Zt.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||zt.some(o=>(n.willChange||"").includes(o))||Qt.some(o=>(n.contain||"").includes(o))}function Jt(e){let t=q(e);for(;_(t)&&!X(t);){if(Be(t))return t;if(we(t))return null;t=q(t)}return null}function xe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const en=new Set(["html","body","#document"]);function X(e){return en.has(ne(e))}function j(e){return V(e).getComputedStyle(e)}function Re(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||De(e)&&e.host||G(e);return De(t)?t.host:t}function pt(e){const t=q(e);return X(t)?e.ownerDocument?e.ownerDocument.body:e.body:_(t)&&fe(t)?t:pt(t)}function J(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=pt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=V(r);if(i){const c=ke(s);return t.concat(s,s.visualViewport||[],fe(r)?r:[],c&&n?J(c):[])}return t.concat(r,J(r,[],n))}function ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const tn=["top","right","bottom","left"],Ke=["start","end"],Ye=tn.reduce((e,t)=>e.concat(t,t+"-"+Ke[0],t+"-"+Ke[1]),[]),se=Math.min,ee=Math.max,pe=Math.round,K=e=>({x:e,y:e}),nn={left:"right",right:"left",bottom:"top",top:"bottom"},on={start:"end",end:"start"};function Le(e,t,n){return ee(e,se(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function oe(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function ht(e){return e==="x"?"y":"x"}function _e(e){return e==="y"?"height":"width"}const rn=new Set(["top","bottom"]);function Ee(e){return rn.has(oe(e))?"y":"x"}function We(e){return ht(Ee(e))}function sn(e,t,n){n===void 0&&(n=!1);const o=U(e),r=We(e),i=_e(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Xe(s)),[s,Xe(s)]}function cn(e){return e.replace(/start|end/g,t=>on[t])}function Xe(e){return e.replace(/left|right|bottom|top/g,t=>nn[t])}function ln(e){return{top:0,right:0,bottom:0,left:0,...e}}function vt(e){return typeof e!="number"?ln(e):{top:e,right:e,bottom:e,left:e}}function he(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}var an=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Me=an.join(","),bt=typeof Element>"u",ce=bt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ve=!bt&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},le=function(t,n){var o;n===void 0&&(n=!0);var r=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),i=r===""||r==="true",s=i||n&&t&&le(t.parentNode);return s},un=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},fn=function(t,n,o){if(le(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Me));return n&&ce.call(t,Me)&&r.unshift(t),r=r.filter(o),r},Fe=function(t,n,o){for(var r=[],i=Array.from(t);i.length;){var s=i.shift();if(!le(s,!1))if(s.tagName==="SLOT"){var c=s.assignedElements(),l=c.length?c:s.children,a=Fe(l,!0,o);o.flatten?r.push.apply(r,a):r.push({scopeParent:s,candidates:a})}else{var u=ce.call(s,Me);u&&o.filter(s)&&(n||!t.includes(s))&&r.push(s);var f=s.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(s),m=!le(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(s));if(f&&m){var d=Fe(f===!0?s.children:f.children,!0,o);o.flatten?r.push.apply(r,d):r.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return r},yt=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},wt=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||un(t))&&!yt(t)?0:t.tabIndex},dn=function(t,n){var o=wt(t);return o<0&&n&&!yt(t)?0:o},gn=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xt=function(t){return t.tagName==="INPUT"},mn=function(t){return xt(t)&&t.type==="hidden"},pn=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},hn=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},vn=function(t){if(!t.name)return!0;var n=t.form||ve(t),o=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(t.name));else try{r=o(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=hn(r,t.form);return!i||i===t},bn=function(t){return xt(t)&&t.type==="radio"},yn=function(t){return bn(t)&&!vn(t)},wn=function(t){var n,o=t&&ve(t),r=(n=o)===null||n===void 0?void 0:n.host,i=!1;if(o&&o!==t){var s,c,l;for(i=!!((s=r)!==null&&s!==void 0&&(c=s.ownerDocument)!==null&&c!==void 0&&c.contains(r)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&r;){var a,u,f;o=ve(r),r=(a=o)===null||a===void 0?void 0:a.host,i=!!((u=r)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(r))}}return i},Ue=function(t){var n=t.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},xn=function(t,n){var o=n.displayCheck,r=n.getShadowRoot;if(o==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=ce.call(t,"details>summary:first-of-type"),c=s?t.parentElement:t;if(ce.call(c,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=t;t;){var a=t.parentElement,u=ve(t);if(a&&!a.shadowRoot&&r(a)===!0)return Ue(t);t.assignedSlot?t=t.assignedSlot:!a&&u!==t.ownerDocument?t=u.host:t=a}t=l}if(wn(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Ue(t);return!1},Rn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return ce.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},En=function(t,n){return!(n.disabled||le(n)||mn(n)||xn(n,t)||pn(n)||Rn(n))},qe=function(t,n){return!(yn(n)||wt(n)<0||!En(t,n))},Sn=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Rt=function(t){var n=[],o=[];return t.forEach(function(r,i){var s=!!r.scopeParent,c=s?r.scopeParent:r,l=dn(c,s),a=s?Rt(r.candidates):c;l===0?s?n.push.apply(n,a):n.push(c):o.push({documentOrder:i,tabIndex:l,item:r,isScope:s,content:a})}),o.sort(gn).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(n)},Et=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Fe([t],n.includeContainer,{filter:qe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Sn}):o=fn(t,n.includeContainer,qe.bind(null,n)),Rt(o)};function Cn(){return/apple/i.test(navigator.vendor)}const Ge="data-floating-ui-focusable",Tn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ne(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&De(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function ie(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Te(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function On(e){return e.matches("html,body")}function ae(e){return e?.ownerDocument||document}function An(e){return _(e)&&e.matches(Tn)}function In(e){return e?e.hasAttribute(Ge)?e:e.querySelector("["+Ge+"]")||e:null}function ge(e,t,n){return n===void 0&&(n=!0),e.filter(r=>{var i;return r.parentId===t&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...ge(e,r.id,n)])}function Dn(e){return"nativeEvent"in e}function Ze(e,t){return["mouse","pen"].includes(e)}var kn=typeof document<"u",Ln=function(){},z=kn?p.useLayoutEffect:Ln;const Mn={...gt},Fn=Mn.useInsertionEffect,Nn=Fn||(e=>e());function Q(e){const t=p.useRef(()=>{});return Nn(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}const St=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ct(e,t){const n=Et(e,St()),o=n.length;if(o===0)return;const r=Pn(ae(e)),i=n.indexOf(r),s=i===-1?t===1?0:o-1:i+t;return n[s]}function $n(e){return Ct(ae(e).body,1)||e}function Bn(e){return Ct(ae(e).body,-1)||e}function Pe(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!Ne(n,o)}function _n(e){Et(e,St()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ze(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}function Qe(e,t,n){let{reference:o,floating:r}=e;const i=Ee(t),s=We(t),c=_e(s),l=oe(t),a=i==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:u,y:o.y-r.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(U(t)){case"start":d[s]-=m*(n&&a?-1:1);break;case"end":d[s]+=m*(n&&a?-1:1);break}return d}const Wn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=Qe(a,o,l),m=o,d={},h=0;for(let g=0;g<c.length;g++){const{name:v,fn:w}=c[g],{x:b,y:x,data:S,reset:E}=await w({x:u,y:f,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:e,floating:t}});u=b??u,f=x??f,d={...d,[v]:{...d[v],...S}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(a=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=Qe(a,m,l)),g=-1)}return{x:u,y:f,placement:m,strategy:r,middlewareData:d}};async function Tt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=!1,padding:d=0}=de(t,e),h=vt(d),v=c[m?f==="floating"?"reference":"floating":f],w=he(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),b=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=he(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:x,strategy:l}):b);return{top:(w.top-E.top+h.top)/S.y,bottom:(E.bottom-w.bottom+h.bottom)/S.y,left:(w.left-E.left+h.left)/S.x,right:(E.right-w.right+h.right)/S.x}}const Vn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=t,{element:a,padding:u=0}=de(e,t)||{};if(a==null)return{};const f=vt(u),m={x:n,y:o},d=We(r),h=_e(d),g=await s.getDimensions(a),v=d==="y",w=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[d]-m[d]-i.floating[h],E=m[d]-i.reference[d],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let C=A?A[x]:0;(!C||!await(s.isElement==null?void 0:s.isElement(A)))&&(C=c.floating[x]||i.floating[h]);const O=S/2-E/2,B=C/2-g[h]/2-1,P=se(f[w],B),N=se(f[b],B),M=P,$=C-g[h]-N,R=C/2-g[h]/2+O,I=Le(M,R,$),T=!l.arrow&&U(r)!=null&&R!==I&&i.reference[h]/2-(R<M?P:N)-g[h]/2<0,D=T?R<M?R-M:R-$:0;return{[d]:m[d]+D,data:{[d]:I,centerOffset:R-I-D,...T&&{alignmentOffset:D}},reset:T}}});function jn(e,t,n){return(e?[...n.filter(r=>U(r)===e),...n.filter(r=>U(r)!==e)]:n.filter(r=>oe(r)===r)).filter(r=>e?U(r)===e||(t?cn(r)!==r:!1):!0)}const Hn=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:s,placement:c,platform:l,elements:a}=t,{crossAxis:u=!1,alignment:f,allowedPlacements:m=Ye,autoAlignment:d=!0,...h}=de(e,t),g=f!==void 0||m===Ye?jn(f||null,d,m):m,v=await Tt(t,h),w=((n=s.autoPlacement)==null?void 0:n.index)||0,b=g[w];if(b==null)return{};const x=sn(b,i,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==b)return{reset:{placement:g[0]}};const S=[v[oe(b)],v[x[0]],v[x[1]]],E=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:b,overflows:S}],A=g[w+1];if(A)return{data:{index:w+1,overflows:E},reset:{placement:A}};const C=E.map(P=>{const N=U(P.placement);return[P.placement,N&&u?P.overflows.slice(0,2).reduce((M,$)=>M+$,0):P.overflows[0],P.overflows]}).sort((P,N)=>P[1]-N[1]),B=((r=C.filter(P=>P[2].slice(0,U(P[0])?2:3).every(N=>N<=0))[0])==null?void 0:r[0])||C[0][0];return B!==c?{data:{index:w+1,overflows:E},reset:{placement:B}}:{}}}},Kn=new Set(["left","top"]);async function Yn(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=oe(n),c=U(n),l=Ee(n)==="y",a=Kn.has(s)?-1:1,u=i&&l?-1:1,f=de(t,e);let{mainAxis:m,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),l?{x:d*u,y:m*a}:{x:m*a,y:d*u}}const Xn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,l=await Yn(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Un=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:w,y:b}=v;return{x:w,y:b}}},...l}=de(e,t),a={x:n,y:o},u=await Tt(t,l),f=Ee(oe(r)),m=ht(f);let d=a[m],h=a[f];if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=d+u[v],x=d-u[w];d=Le(b,d,x)}if(s){const v=f==="y"?"top":"left",w=f==="y"?"bottom":"right",b=h+u[v],x=h-u[w];h=Le(b,h,x)}const g=c.fn({...t,[m]:d,[f]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:i,[f]:s}}}}}};function Pt(e){const t=j(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=_(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=pe(n)!==i||pe(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Ot(e){return L(e)?e:e.contextElement}function te(e){const t=Ot(e);if(!_(t))return K(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Pt(t);let s=(i?pe(n.width):n.width)/o,c=(i?pe(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const qn=K(0);function At(e){const t=V(e);return!xe()||!t.visualViewport?qn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function ue(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Ot(e);let s=K(1);t&&(o?L(o)&&(s=te(o)):s=te(e));const c=Gn(i,n,o)?At(i):K(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,u=r.width/s.x,f=r.height/s.y;if(i){const m=V(i),d=o&&L(o)?V(o):o;let h=m,g=ke(h);for(;g&&o&&d!==h;){const v=te(g),w=g.getBoundingClientRect(),b=j(g),x=w.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,a*=v.y,u*=v.x,f*=v.y,l+=x,a+=S,h=V(g),g=ke(h)}}return he({width:u,height:f,x:l,y:a})}function Se(e,t){const n=Re(e).scrollLeft;return t?t.left+n:ue(G(e)).left+n}function It(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Se(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Zn(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=G(o),c=t?we(t.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=K(1);const u=K(0),f=_(o);if((f||!f&&!i)&&((ne(o)!=="body"||fe(s))&&(l=Re(o)),_(o))){const d=ue(o);a=te(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const m=s&&!f&&!i?It(s,l):K(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+m.x,y:n.y*a.y-l.scrollTop*a.y+u.y+m.y}}function zn(e){return Array.from(e.getClientRects())}function Qn(e){const t=G(e),n=Re(e),o=e.ownerDocument.body,r=ee(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ee(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Se(e);const c=-n.scrollTop;return j(o).direction==="rtl"&&(s+=ee(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Je=25;function Jn(e,t){const n=V(e),o=G(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const u=xe();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=Se(o);if(a<=0){const u=o.ownerDocument,f=u.body,m=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-f.clientWidth-d);h<=Je&&(i-=h)}else a<=Je&&(i+=a);return{width:i,height:s,x:c,y:l}}const eo=new Set(["absolute","fixed"]);function to(e,t){const n=ue(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=_(e)?te(e):K(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function et(e,t,n){let o;if(t==="viewport")o=Jn(e,n);else if(t==="document")o=Qn(G(e));else if(L(t))o=to(t,n);else{const r=At(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return he(o)}function Dt(e,t){const n=q(e);return n===t||!L(n)||X(n)?!1:j(n).position==="fixed"||Dt(n,t)}function no(e,t){const n=t.get(e);if(n)return n;let o=J(e,[],!1).filter(c=>L(c)&&ne(c)!=="body"),r=null;const i=j(e).position==="fixed";let s=i?q(e):e;for(;L(s)&&!X(s);){const c=j(s),l=Be(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&eo.has(r.position)||fe(s)&&!l&&Dt(e,s))?o=o.filter(u=>u!==s):r=c,s=q(s)}return t.set(e,o),o}function oo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?we(t)?[]:no(t,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,u)=>{const f=et(t,u,r);return a.top=ee(f.top,a.top),a.right=se(f.right,a.right),a.bottom=se(f.bottom,a.bottom),a.left=ee(f.left,a.left),a},et(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ro(e){const{width:t,height:n}=Pt(e);return{width:t,height:n}}function io(e,t,n){const o=_(t),r=G(t),i=n==="fixed",s=ue(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=K(0);function a(){l.x=Se(r)}if(o||!o&&!i)if((ne(t)!=="body"||fe(r))&&(c=Re(t)),o){const d=ue(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else r&&a();i&&!o&&r&&a();const u=r&&!o&&!i?It(r,c):K(0),f=s.left+c.scrollLeft-l.x-u.x,m=s.top+c.scrollTop-l.y-u.y;return{x:f,y:m,width:s.width,height:s.height}}function Oe(e){return j(e).position==="static"}function tt(e,t){if(!_(e)||j(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function kt(e,t){const n=V(e);if(we(e))return n;if(!_(e)){let r=q(e);for(;r&&!X(r);){if(L(r)&&!Oe(r))return r;r=q(r)}return n}let o=tt(e,t);for(;o&&qt(o)&&Oe(o);)o=tt(o,t);return o&&X(o)&&Oe(o)&&!Be(o)?n:o||Jt(e)||n}const so=async function(e){const t=this.getOffsetParent||kt,n=this.getDimensions,o=await n(e.floating);return{reference:io(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function co(e){return j(e).direction==="rtl"}const lo={convertOffsetParentRelativeRectToViewportRelativeRect:Zn,getDocumentElement:G,getClippingRect:oo,getOffsetParent:kt,getElementRects:so,getClientRects:zn,getDimensions:ro,getScale:te,isElement:L,isRTL:co},ao=Xn,uo=Hn,fo=Un,nt=Vn,go=(e,t,n)=>{const o=new Map,r={platform:lo,...n},i={...r.platform,_c:o};return Wn(e,t,{...r,platform:i})};var mo=typeof document<"u",po=function(){},me=mo?p.useLayoutEffect:po;function be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!be(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!be(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Lt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ot(e,t){const n=Lt(e);return Math.round(t*n)/n}function Ae(e){const t=p.useRef(e);return me(()=>{t.current=e}),t}function ho(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,d]=p.useState(o);be(m,o)||d(o);const[h,g]=p.useState(null),[v,w]=p.useState(null),b=p.useCallback(y=>{y!==A.current&&(A.current=y,g(y))},[]),x=p.useCallback(y=>{y!==C.current&&(C.current=y,w(y))},[]),S=i||h,E=s||v,A=p.useRef(null),C=p.useRef(null),O=p.useRef(u),B=l!=null,P=Ae(l),N=Ae(r),M=Ae(a),$=p.useCallback(()=>{if(!A.current||!C.current)return;const y={placement:t,strategy:n,middleware:m};N.current&&(y.platform=N.current),go(A.current,C.current,y).then(k=>{const F={...k,isPositioned:M.current!==!1};R.current&&!be(O.current,F)&&(O.current=F,mt.flushSync(()=>{f(F)}))})},[m,t,n,N,M]);me(()=>{a===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(y=>({...y,isPositioned:!1})))},[a]);const R=p.useRef(!1);me(()=>(R.current=!0,()=>{R.current=!1}),[]),me(()=>{if(S&&(A.current=S),E&&(C.current=E),S&&E){if(P.current)return P.current(S,E,$);$()}},[S,E,$,P,B]);const I=p.useMemo(()=>({reference:A,floating:C,setReference:b,setFloating:x}),[b,x]),T=p.useMemo(()=>({reference:S,floating:E}),[S,E]),D=p.useMemo(()=>{const y={position:n,left:0,top:0};if(!T.floating)return y;const k=ot(T.floating,u.x),F=ot(T.floating,u.y);return c?{...y,transform:"translate("+k+"px, "+F+"px)",...Lt(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:F}},[n,c,T.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:$,refs:I,elements:T,floatingStyles:D}),[u,$,I,T,D])}const vo=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?nt({element:o.current,padding:r}).fn(n):{}:o?nt({element:o,padding:r}).fn(n):{}}}},Mo=(e,t)=>({...ao(e),options:[e,t]}),Fo=(e,t)=>({...fo(e),options:[e,t]}),No=(e,t)=>({...uo(e),options:[e,t]}),$o=(e,t)=>({...vo(e),options:[e,t]}),bo="data-floating-ui-focusable",rt="active",it="selected",yo={...gt};let st=!1,wo=0;const ct=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wo++;function xo(){const[e,t]=p.useState(()=>st?ct():void 0);return z(()=>{e==null&&t(ct())},[]),p.useEffect(()=>{st=!0},[]),e}const Ro=yo.useId,Ce=Ro||xo,Bo=p.forwardRef(function(t,n){const{context:{placement:o,elements:{floating:r},middlewareData:{arrow:i,shift:s}},width:c=14,height:l=7,tipRadius:a=0,strokeWidth:u=0,staticOffset:f,stroke:m,d,style:{transform:h,...g}={},...v}=t,w=Ce(),[b,x]=p.useState(!1);if(z(()=>{if(!r)return;j(r).direction==="rtl"&&x(!0)},[r]),!r)return null;const[S,E]=o.split("-"),A=S==="top"||S==="bottom";let C=f;(A&&s!=null&&s.x||!A&&s!=null&&s.y)&&(C=null);const O=u*2,B=O/2,P=c/2*(a/-8+1),N=l/2*a/4,M=!!d,$=C&&E==="end"?"bottom":"top";let R=C&&E==="end"?"right":"left";C&&b&&(R=E==="end"?"left":"right");const I=i?.x!=null?C||i.x:"",T=i?.y!=null?C||i.y:"",D=d||"M0,0"+(" H"+c)+(" L"+(c-P)+","+(l-N))+(" Q"+c/2+","+l+" "+P+","+(l-N))+" Z",y={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[S];return H.jsxs("svg",{...v,"aria-hidden":!0,ref:n,width:M?c:c+O,height:c,viewBox:"0 0 "+c+" "+(l>c?l:c),style:{position:"absolute",pointerEvents:"none",[R]:I,[$]:T,[S]:A||M?"100%":"calc(100% - "+O/2+"px)",transform:[y,h].filter(k=>!!k).join(" "),...g},children:[O>0&&H.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:m,strokeWidth:O+(d?0:1),d:D}),H.jsx("path",{stroke:O&&!d?v.fill:"none",d:D}),H.jsx("clipPath",{id:w,children:H.jsx("rect",{x:-B,y:B*(M?-1:1),width:c+O,height:c})})]})});function Eo(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const So=p.createContext(null),Co=p.createContext(null),Mt=()=>{var e;return((e=p.useContext(So))==null?void 0:e.id)||null},Ft=()=>p.useContext(Co);function Ve(e){return"data-floating-ui-"+e}const Nt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},lt=p.forwardRef(function(t,n){const[o,r]=p.useState();z(()=>{Cn()&&r("button")},[]);const i={ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[Ve("focus-guard")]:"",style:Nt};return H.jsx("span",{...t,...i})}),$t=p.createContext(null),at=Ve("portal");function To(e){e===void 0&&(e={});const{id:t,root:n}=e,o=Ce(),r=Po(),[i,s]=p.useState(null),c=p.useRef(null);return z(()=>()=>{i?.remove(),queueMicrotask(()=>{c.current=null})},[i]),z(()=>{if(!o||c.current)return;const l=t?document.getElementById(t):null;if(!l)return;const a=document.createElement("div");a.id=o,a.setAttribute(at,""),l.appendChild(a),c.current=a,s(a)},[t,o]),z(()=>{if(n===null||!o||c.current)return;let l=n||r?.portalNode;l&&!$e(l)&&(l=l.current),l=l||document.body;let a=null;t&&(a=document.createElement("div"),a.id=t,l.appendChild(a));const u=document.createElement("div");u.id=o,u.setAttribute(at,""),l=a||l,l.appendChild(u),c.current=u,s(u)},[t,n,o,r]),i}function _o(e){const{children:t,id:n,root:o,preserveTabOrder:r=!0}=e,i=To({id:n,root:o}),[s,c]=p.useState(null),l=p.useRef(null),a=p.useRef(null),u=p.useRef(null),f=p.useRef(null),m=s?.modal,d=s?.open,h=!!s&&!s.modal&&s.open&&r&&!!(o||i);return p.useEffect(()=>{if(!i||!r||m)return;function g(v){i&&Pe(v)&&(v.type==="focusin"?ze:_n)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,r,m]),p.useEffect(()=>{i&&(d||ze(i))},[d,i]),H.jsxs($t.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:a,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:c}),[r,i]),children:[h&&i&&H.jsx(lt,{"data-type":"outside",ref:l,onFocus:g=>{if(Pe(g,i)){var v;(v=u.current)==null||v.focus()}else{const w=s?s.domReference:null,b=Bn(w);b?.focus()}}}),h&&i&&H.jsx("span",{"aria-owns":i.id,style:Nt}),i&&mt.createPortal(t,i),h&&i&&H.jsx(lt,{"data-type":"outside",ref:a,onFocus:g=>{if(Pe(g,i)){var v;(v=f.current)==null||v.focus()}else{const w=s?s.domReference:null,b=$n(w);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,g.nativeEvent,"focus-out")}}})]})}const Po=()=>p.useContext($t);function ut(e){return _(e.target)&&e.target.tagName==="BUTTON"}function Oo(e){return _(e.target)&&e.target.tagName==="A"}function ft(e){return An(e)}function Wo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,elements:{domReference:i}}=e,{enabled:s=!0,event:c="click",toggle:l=!0,ignoreMouse:a=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,m=p.useRef(),d=p.useRef(!1),h=p.useMemo(()=>({onPointerDown(g){m.current=g.pointerType},onMouseDown(g){const v=m.current;g.button===0&&c!=="click"&&(Ze(v)&&a||(n&&l&&(!(r.current.openEvent&&f)||r.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const v=m.current;if(c==="mousedown"&&m.current){m.current=void 0;return}Ze(v)&&a||(n&&l&&(!(r.current.openEvent&&f)||r.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){m.current=void 0,!(g.defaultPrevented||!u||ut(g))&&(g.key===" "&&!ft(i)&&(g.preventDefault(),d.current=!0),!Oo(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||ut(g)||ft(i)||g.key===" "&&d.current&&(d.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[r,i,c,a,u,o,n,f,l]);return p.useMemo(()=>s?{reference:h}:{},[s,h])}const Ao={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Io={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},dt=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Vo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:r,dataRef:i}=e,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:a="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:d,capture:h}=t,g=Ft(),v=Q(typeof l=="function"?l:()=>!1),w=typeof l=="function"?v:l,b=p.useRef(!1),{escapeKey:x,outsidePress:S}=dt(d),{escapeKey:E,outsidePress:A}=dt(h),C=p.useRef(!1),O=Q(R=>{var I;if(!n||!s||!c||R.key!=="Escape"||C.current)return;const T=(I=i.current.floatingContext)==null?void 0:I.nodeId,D=g?ge(g.nodesRef.current,T):[];if(!x&&(R.stopPropagation(),D.length>0)){let y=!0;if(D.forEach(k=>{var F;if((F=k.context)!=null&&F.open&&!k.context.dataRef.current.__escapeKeyBubbles){y=!1;return}}),!y)return}o(!1,Dn(R)?R.nativeEvent:R,"escape-key")}),B=Q(R=>{var I;const T=()=>{var D;O(R),(D=ie(R))==null||D.removeEventListener("keydown",T)};(I=ie(R))==null||I.addEventListener("keydown",T)}),P=Q(R=>{var I;const T=i.current.insideReactTree;i.current.insideReactTree=!1;const D=b.current;if(b.current=!1,a==="click"&&D||T||typeof w=="function"&&!w(R))return;const y=ie(R),k="["+Ve("inert")+"]",F=ae(r.floating).querySelectorAll(k);let Z=L(y)?y:null;for(;Z&&!X(Z);){const W=q(Z);if(X(W)||!L(W))break;Z=W}if(F.length&&L(y)&&!On(y)&&!Ne(y,r.floating)&&Array.from(F).every(W=>!Ne(Z,W)))return;if(_(y)&&$){const W=X(y),Y=j(y),re=/auto|scroll/,_t=W||re.test(Y.overflowX),Wt=W||re.test(Y.overflowY),Vt=_t&&y.clientWidth>0&&y.scrollWidth>y.clientWidth,jt=Wt&&y.clientHeight>0&&y.scrollHeight>y.clientHeight,Ht=Y.direction==="rtl",Kt=jt&&(Ht?R.offsetX<=y.offsetWidth-y.clientWidth:R.offsetX>y.clientWidth),Yt=Vt&&R.offsetY>y.clientHeight;if(Kt||Yt)return}const je=(I=i.current.floatingContext)==null?void 0:I.nodeId,Bt=g&&ge(g.nodesRef.current,je).some(W=>{var Y;return Te(R,(Y=W.context)==null?void 0:Y.elements.floating)});if(Te(R,r.floating)||Te(R,r.domReference)||Bt)return;const He=g?ge(g.nodesRef.current,je):[];if(He.length>0){let W=!0;if(He.forEach(Y=>{var re;if((re=Y.context)!=null&&re.open&&!Y.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}o(!1,R,"outside-press")}),N=Q(R=>{var I;const T=()=>{var D;P(R),(D=ie(R))==null||D.removeEventListener(a,T)};(I=ie(R))==null||I.addEventListener(a,T)});p.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=S;let R=-1;function I(F){o(!1,F,"ancestor-scroll")}function T(){window.clearTimeout(R),C.current=!0}function D(){R=window.setTimeout(()=>{C.current=!1},xe()?5:0)}const y=ae(r.floating);c&&(y.addEventListener("keydown",E?B:O,E),y.addEventListener("compositionstart",T),y.addEventListener("compositionend",D)),w&&y.addEventListener(a,A?N:P,A);let k=[];return m&&(L(r.domReference)&&(k=J(r.domReference)),L(r.floating)&&(k=k.concat(J(r.floating))),!L(r.reference)&&r.reference&&r.reference.contextElement&&(k=k.concat(J(r.reference.contextElement)))),k=k.filter(F=>{var Z;return F!==((Z=y.defaultView)==null?void 0:Z.visualViewport)}),k.forEach(F=>{F.addEventListener("scroll",I,{passive:!0})}),()=>{c&&(y.removeEventListener("keydown",E?B:O,E),y.removeEventListener("compositionstart",T),y.removeEventListener("compositionend",D)),w&&y.removeEventListener(a,A?N:P,A),k.forEach(F=>{F.removeEventListener("scroll",I)}),window.clearTimeout(R)}},[i,r,c,w,a,n,o,m,s,x,S,O,E,B,P,A,N]),p.useEffect(()=>{i.current.insideReactTree=!1},[i,w,a]);const M=p.useMemo(()=>({onKeyDown:O,...u&&{[Ao[f]]:R=>{o(!1,R.nativeEvent,"reference-press")},...f!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[O,o,u,f]),$=p.useMemo(()=>({onKeyDown:O,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Io[a]]:()=>{i.current.insideReactTree=!0}}),[O,a,i]);return p.useMemo(()=>s?{reference:M,floating:$}:{},[s,M,$])}function Do(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=Ce(),i=p.useRef({}),[s]=p.useState(()=>Eo()),c=Mt()!=null,[l,a]=p.useState(o.reference),u=Q((d,h,g)=>{i.current.openEvent=d?h:void 0,s.emit("openchange",{open:d,event:h,reason:g,nested:c}),n?.(d,h,g)}),f=p.useMemo(()=>({setPositionReference:a}),[]),m=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:m,events:s,floatingId:r,refs:f}),[t,u,m,s,r,f])}function jo(e){e===void 0&&(e={});const{nodeId:t}=e,n=Do({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[i,s]=p.useState(null),[c,l]=p.useState(null),u=r?.domReference||i,f=p.useRef(null),m=Ft();z(()=>{u&&(f.current=u)},[u]);const d=ho({...e,elements:{...r,...c&&{reference:c}}}),h=p.useCallback(x=>{const S=L(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(S),d.refs.setReference(S)},[d.refs]),g=p.useCallback(x=>{(L(x)||x===null)&&(f.current=x,s(x)),(L(d.refs.reference.current)||d.refs.reference.current===null||x!==null&&!L(x))&&d.refs.setReference(x)},[d.refs]),v=p.useMemo(()=>({...d.refs,setReference:g,setPositionReference:h,domReference:f}),[d.refs,g,h]),w=p.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),b=p.useMemo(()=>({...d,...o,refs:v,elements:w,nodeId:t}),[d,v,w,t,o]);return z(()=>{o.dataRef.current.floatingContext=b;const x=m?.nodesRef.current.find(S=>S.id===t);x&&(x.context=b)}),p.useMemo(()=>({...d,context:b,refs:v,elements:w}),[d,v,w,b])}function Ie(e,t,n){const o=new Map,r=n==="item";let i=e;if(r&&e){const{[rt]:s,[it]:c,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[bo]:""},...i,...t.map(s=>{const c=s?s[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((s,c)=>(c&&Object.entries(c).forEach(l=>{let[a,u]=l;if(!(r&&[rt,it].includes(a)))if(a.indexOf("on")===0){if(o.has(a)||o.set(a,[]),typeof u=="function"){var f;(f=o.get(a))==null||f.push(u),s[a]=function(){for(var m,d=arguments.length,h=new Array(d),g=0;g<d;g++)h[g]=arguments[g];return(m=o.get(a))==null?void 0:m.map(v=>v(...h)).find(v=>v!==void 0)}}}else s[a]=u}),s),{})}}function Ho(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),o=e.map(c=>c?.item),r=p.useCallback(c=>Ie(c,e,"reference"),t),i=p.useCallback(c=>Ie(c,e,"floating"),n),s=p.useCallback(c=>Ie(c,e,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}const ko=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ko(e,t){var n,o;t===void 0&&(t={});const{open:r,elements:i,floatingId:s}=e,{enabled:c=!0,role:l="dialog"}=t,a=Ce(),u=((n=i.domReference)==null?void 0:n.id)||a,f=p.useMemo(()=>{var b;return((b=In(i.floating))==null?void 0:b.id)||s},[i.floating,s]),m=(o=ko.get(l))!=null?o:l,h=Mt()!=null,g=p.useMemo(()=>m==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?f:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":m==="alertdialog"?"dialog":m,"aria-controls":r?f:void 0,...m==="listbox"&&{role:"combobox"},...m==="menu"&&{id:u},...m==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[m,f,h,r,u,l]),v=p.useMemo(()=>{const b={id:f,...m&&{role:m}};return m==="tooltip"||l==="label"?b:{...b,...m==="menu"&&{"aria-labelledby":u}}},[m,f,u,l]),w=p.useCallback(b=>{let{active:x,selected:S}=b;const E={role:"option",...x&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":S}}return{}},[f,l]);return p.useMemo(()=>c?{reference:g,floating:v,item:w}:{},[c,g,v,w])}export{_o as F,No as a,$o as b,Ko as c,Vo as d,Ho as e,Bo as f,Wo as g,Mo as o,Fo as s,jo as u};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d2 as t}from"./index-ClCsMWbS.js";const n=""+new URL("generic-zigbee-device-Dj-9sUqG.png",import.meta.url).href,s="https://www.zigbee2mqtt.io/images/devices/",c=i=>{const e=t(i.definition?.model);return e==="NA"?n:`${s}${e}.png`};export{n as a,c as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
��`�0˝�6�5�&ݐ����ZU��1���.���������;���w�m��X@��ڌG�V�?sV����!'�@S���qz=���k���?���gs��=r�V���
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as ma,
|
|
1
|
+
import{d as ma,bv as pa,bw as E,bx as M,by as L,bz as b,bA as U,bB as ga,bC as P,bD as G,bE as h,bF as ba,bh as ha,bG as O,bH as I,bI as R,bJ as V,bK as Q,bL as W,bM as x,aa as K,bN as ya,bO as wa,bP as ka,bQ as C,bR as X,b as Y,bS as va,bT as xa,Q as Ca,bU as Ta,bV as Sa,bW as l,bX as Z,bY as o,bZ as z,b_ as T,b$ as Fa,c0 as A,c1 as D,c2 as Ha,ag as Ba,c3 as da,c4 as j,c5 as La,a1 as Pa,c6 as S,c7 as u,c8 as Ia,c9 as Ra,ca as J,cb as F,cc as Wa,cd as za,ce as n,cf as aa,cg as ea,ch as ta,ad as i,ci as f,cj as Aa,bj as Da,ck as qa,cl as Na,cm as $a,cn as ra,co as Ea,cp as Ma,cq as sa,cr as y,cs as p,ct as H,cu as q,cv as N,cw as $,cx as oa,cy as Ua,cz as Ga,cA as ia,cB as g,cC as m,cD as Oa,cE as w,cF as Va,cG as Qa,cH as d,cI as Ka,cJ as Xa,cK as _,cL as Ya,cM as ca,cN as na,cO as Za,cP as B,cQ as ja,cR as la,cS as Ja,cT as c,bu as k,cU as ae,bk as ee,cV as fa,cW as te,cX as re,cY as se,cZ as oe,bq as _a,br as ie,bs as ua,bt as ce,c_ as ne}from"./index-ClCsMWbS.js";const le={action:ae,battery_low:k,rms_voltage:c,over_voltage:c,under_voltage:c,voltage:c,overpower:c,overcurrent:c,current:c,reactive_energy:c,signed_power:c,power:c,energy:c,watt:c,frequency:Ja,power_factor:R,heating_stop:B,heat_protect:B,warm_floor:B,cold_water:la,frost:la,cool:ja,hot_water:B,pressure:Za,humidity:na,moisture:na,soil_moisture:b,co2:_,eco2:_,pm25:_,pm10:_,voc:_,aqi:_,air_quality:_,hcho:ca,formaldehyd:ca,gas:_,smoke:Ya,carbon_monoxide:_,active_water_leak:d,water_leak:d,leakage:d,leak:d,rainwater:Xa,rain:Ka,irrigation:b,watering:b,tank_level:d,tds:d,salinity:d,ph:d,orp:d,free_chlorine:d,flow:Qa,away_mode:Va,mmwave:w,motionless:m,motion:w,movement:w,moving:w,radar:w,vibration:Oa,presence:m,occupancy:m,occupied:m,vacancy:m,vacant:m,human:m,people:m,keypad:g,child_lock:g,button_lock:g,lock_mode:g,hooks_lock:g,lock:g,pin_code:ia,master_pin:ia,rfid:Ga,permission:Ua,admin:oa,master:oa,garage_door:O,door_state:$,door:$,window_open:N,window:N,fixed_window_sash:N,relay:q,switch:q,toggle:q,electric_valve:H,valve:H,flow_switch:H,pump:H,led_disabled:y,led:y,backlight:y,brightness:p,luminance:p,illuminance:p,illuminance_lux:p,illuminance_raw:p,lux_value:p,white_brightness:p,light_mode:y,light:y,rgb_light:h,color:h,color_hs:h,color_temp:sa,color_temp_startup:sa,color_xy:h,gradient:Ma,orientation:Ea,target_distance:l,distance:l,position:C,tilt:ra,direction:ra,axis:l,location_x:l,range:l,angle_x:$a,angle_y:Na,angle_z:qa,approach_distance:Da,side:Aa,timestamp:i,countdown:i,timer:i,schedule:f,weekdays:f,monday:f,tuesday:f,wednesday:f,thursday:f,friday:f,saturday:f,sunday:f,week:f,dayTime:i,hour:i,minute:i,time_format:i,time:i,uptime:i,interval:i,duration:i,delay:i,holidays_schedule:ta,workdays_schedule:ta,gradient_scene:ea,scene:ea,individual_led_effect:aa,effect:aa,ringtone:n,melody:n,sound_volume:n,volume:n,buzzer:n,beep:n,handlesound:n,keysound:n,play_voice:n,pulse_command:n,squawk:n,siren_and_light:za,sound:Wa,humidity_alarm:u,sos:u,broadcast_alarm:u,linkage_alarm:u,alarm:u,alert_behaviour:u,warning:u,clear_fault:j,fault:F,error:F,breaker:F,trouble:F,supervision:J,protection:J,power_outage_count:Ra,tamper:Ia,temperature_alarm:u,factory_reset:S,restore_default:S,reset_switch:S,powerup_status:S,status:Pa,state:La,enabled:j,online:D,lifecycle:da,test:Ba,trigger_count:Ha,wifi:D,rssi:D,transmit_power:A,radio_strength:A,rf_pairing:A,ip_address:Fa,update_frequency:T,refresh_rate:T,forceupdate:T,update:T,data_report:z,data:z,payload:z,config:o,settings_reset:o,settings:o,setup:o,adaptation_run_settings:o,adaptation:o,regulator_mode:o,operating_mode:o,operation_mode:o,manual_mode:o,automatic_mode:o,mode:o,options:o,advanced:o,algorithm:Z,control_algorithm:Z,calibration:l,calibrate:l,limits_calibration:l,set_upper_limit:l,limit:l,level_config:Sa,sensitivity:Ta,system_mode:Ca,identify:xa,heartbeat:Y,breathing_rate:va,pulse:Y,strength:X,force:X,percent_state:C,percent:C,percentage:C,play:ka,pause:wa,stop:ya,restart:K,relaunch:K,serial_number:x,meter_id:x,sceneid:x,id:x,group:W,zone:W,zones:W,region:Q,sub_region:Q,contract:V,contract_type:V,production:R,producer:R,model:I,name:I,type:I,station:O,icon_application:ha,font_size:ba,theme:h,language:G,translation:G,learn_ir_code:P,spatial_learning:P,learning:P,fan_speed:ga,speed:U,supported_max_motor_speed:U,fertility:b,feed:b,replace_filter:L,filter_age:L,filter:L,radiation_dose_per_hour:E,radioactive_events_per_minute:M,radioactive_events:M,radiation:E,weather:pa},fe=a=>{let e=k,t="";return a==null?[e,t]:(a>=85?(e=_a,t="text-success"):a>=65?e=ie:a>=40?e=ua:a>=20?e=ce:(e=k,t="text-error"),[e,t])},de=a=>{let e=k,t="";switch(a){case"high":{e=_a,t="text-success";break}case"medium":{e=ua;break}case"low":{e=k,t="text-error";break}}return[e,t]},_e=(a,e)=>{let t=fa,r="";return a==null?[t,r]:(e==="°F"&&(a=(a-32)/1.8),a>=30?(t=te,r="text-error"):a>=25?t=re:a>=20?t=se:a>=15?t=oe:a<5&&(t=fa,r="text-info"),[t,r])},ue=a=>{let e="";return a!=null&&(a<75?e="text-error":a<125?e="text-warning":a>200&&(e="text-success")),[ma,e]},pe=(a,e,t)=>{let r,s="";switch(a){case"linkquality":{[r,s]=ue(e);break}case"battery":{[r,s]=fe(e);break}case"battery_state":{[r,s]=de(e);break}case"battery_low":case"tamper":{e&&(s="text-error");break}case"cpu_temperature":case"device_temperature":case"temperature":case"local_temperature":{[r,s]=_e(e,t);break}case"humidity":{e!=null&&e>60&&(s="text-info");break}case"contact":{r=e?$:ne,e||(s="text-primary");break}case"occupancy":case"presence":{e&&(s="text-warning");break}case"water_leak":case"vibration":{e&&(s="text-primary");break}default:{a.includes("cyclic")&&(r=da);break}}return r?[r,s]:(r=le[a],r?[r,s]:[ee,"opacity-0"])},ge=a=>`${a.type}-${a.name}-${a.label}-${a.property}-${a.access}-${a.category}-${a.endpoint}`;function be(a,e,t,r){if(e!==void 0&&a.length<e){const s=r(e);for(let v=0;v<a.length;v++)s[v]=a[v];return s}return t!==void 0&&a.length>t?a.slice(0,t):a}export{pe as a,ue as b,be as c,ge as g};
|
|
Binary file
|