db-studio 2.1.0 → 2.2.1
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/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-1KXlcJn5.js +1 -0
- package/dist/web-dist/assets/_pathlessLayout-D4dS7_ZZ.js +2 -0
- package/dist/web-dist/assets/_queryId-DfjPCkx7.js +1 -0
- package/dist/web-dist/assets/_table-ChX0JQnV.js +1 -0
- package/dist/web-dist/assets/{_table-BUNHOVIK.js → _table-DQvTfc38.js} +1 -1
- package/dist/web-dist/assets/_table-M7xRcFSl.js +1 -0
- package/dist/web-dist/assets/{abap-B-HzHdT_.js → abap-DYZIj1QT.js} +1 -1
- package/dist/web-dist/assets/{apex-t5VcK3BF.js → apex-CaiB2cHW.js} +1 -1
- package/dist/web-dist/assets/{azcli-Ce3iuV2p.js → azcli-BSMSllBA.js} +1 -1
- package/dist/web-dist/assets/{badge-COF6gx-2.js → badge-DAJ-55CZ.js} +1 -1
- package/dist/web-dist/assets/{bat-bOBZcLbK.js → bat-DslF3aSP.js} +1 -1
- package/dist/web-dist/assets/{bicep-TSicgsnM.js → bicep-BaONjKcy.js} +1 -1
- package/dist/web-dist/assets/{browser-B-fV6CZb.js → browser-BXjW1U6_.js} +1 -1
- package/dist/web-dist/assets/bundle-mjs-DGKUXiQC.js +1 -0
- package/dist/web-dist/assets/{cameligo-D-9xpPXV.js → cameligo-B-VCpHXR.js} +1 -1
- package/dist/web-dist/assets/chat-sidebar-DhhMmf_h.js +161 -0
- package/dist/web-dist/assets/{clojure-9X3x3csE.js → clojure-CQdNGvuT.js} +1 -1
- package/dist/web-dist/assets/{code-editor-tPwHd3zF.js → code-editor-B9_5weuZ.js} +2 -2
- package/dist/web-dist/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
- package/dist/web-dist/assets/{coffee-anOch8Z-.js → coffee-GJxdv8v9.js} +1 -1
- package/dist/web-dist/assets/connect-CCHOGwiQ.js +1 -0
- package/dist/web-dist/assets/constants-CJqw7w68.js +20 -0
- package/dist/web-dist/assets/{cpp-oW293AoF.js → cpp-bdOuYgjm.js} +1 -1
- package/dist/web-dist/assets/{csharp-BOXMgm5k.js → csharp-DtT4S3qG.js} +1 -1
- package/dist/web-dist/assets/{csp-D67JhNKT.js → csp-DcT8MidV.js} +1 -1
- package/dist/web-dist/assets/{css-Bk6H7_K_.js → css-aK0ks7hY.js} +1 -1
- package/dist/web-dist/assets/{css.worker-B-fFSVTK.js → css.worker-bHD0dlJO.js} +1507 -1453
- package/dist/web-dist/assets/cssMode-5aGt4Xk4.js +1 -0
- package/dist/web-dist/assets/{cypher-DB0LBjic.js → cypher-gkqrqdhb.js} +1 -1
- package/dist/web-dist/assets/{dart-CS3MbwLP.js → dart-D55faCn9.js} +1 -1
- package/dist/web-dist/assets/database.store-BOgNcBMG.js +57 -0
- package/dist/web-dist/assets/dist-BA0_BdMR.js +1 -0
- package/dist/web-dist/assets/dist-DAuUtATJ.js +2 -0
- package/dist/web-dist/assets/{dockerfile-BGz3qsmk.js → dockerfile-CsHs8WRI.js} +1 -1
- package/dist/web-dist/assets/{ecl-lt3qcklx.js → ecl-CQKiIf56.js} +1 -1
- package/dist/web-dist/assets/editor-g1MJRkXV.css +1 -0
- package/dist/web-dist/assets/editor.api-BZk1XbZs.js +926 -0
- package/dist/web-dist/assets/{editor.worker-BYfbSb3U.js → editor.worker-ByY_fgkM.js} +1328 -1274
- package/dist/web-dist/assets/{elixir-cMyUafed.js → elixir-CfFxQLCK.js} +1 -1
- package/dist/web-dist/assets/esm-BhcGPxbM.js +1 -0
- package/dist/web-dist/assets/{esm-B-4Q6MuQ.js → esm-C1Qg-CCP.js} +1 -1
- package/dist/web-dist/assets/{flow9-BI9V6TuS.js → flow9-CLkaJU-U.js} +1 -1
- package/dist/web-dist/assets/format-cell-value-BcH_SExw.js +1 -0
- package/dist/web-dist/assets/{freemarker2-mnCFA3xV.js → freemarker2-Dbf5KAvd.js} +2 -2
- package/dist/web-dist/assets/{fsharp-I1kqnt0E.js → fsharp-4RCsDl1X.js} +1 -1
- package/dist/web-dist/assets/{go-Cg4qMFVj.js → go-BCuLk40y.js} +1 -1
- package/dist/web-dist/assets/{graphql-CvtHcP49.js → graphql-Cuc1fjZl.js} +1 -1
- package/dist/web-dist/assets/{handlebars-BUcE6Uyy.js → handlebars-Bc8nHcpq.js} +1 -1
- package/dist/web-dist/assets/{hcl-BkvCdKNu.js → hcl-BqquCvZs.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-JLMTFACH-Q1Yc-gaw.js +1 -0
- package/dist/web-dist/assets/{html-BBqcfykD.js → html-ZcQmh2HM.js} +1 -1
- package/dist/web-dist/assets/{html.worker-CdalOg9p.js → html.worker-CHVREBCJ.js} +1527 -1473
- package/dist/web-dist/assets/{htmlMode-D8je66Rk.js → htmlMode-BkwHscgL.js} +1 -1
- package/dist/web-dist/assets/icons-IBpZgbE4.js +1 -0
- package/dist/web-dist/assets/index-DTVRtzpz.css +2 -0
- package/dist/web-dist/assets/index-DfnmlclA.js +34 -0
- package/dist/web-dist/assets/indexes-DUzB2YOr.js +1 -0
- package/dist/web-dist/assets/{ini-CPc8BCWu.js → ini-DK3PnweE.js} +1 -1
- package/dist/web-dist/assets/{java-C9Yie4SH.js → java-CCKilWzS.js} +1 -1
- package/dist/web-dist/assets/{javascript-CuGq5ydO.js → javascript-Cy_Mv9Jz.js} +1 -1
- package/dist/web-dist/assets/{json-editor-Dc1E8Fc-.js → json-editor-CE8bI5n-.js} +1 -1
- package/dist/web-dist/assets/{json.worker-DI02pyM8.js → json.worker-BKCy_srb.js} +2747 -2693
- package/dist/web-dist/assets/{jsonMode-BgdTmYik.js → jsonMode-wvGZQK-h.js} +4 -4
- package/dist/web-dist/assets/{julia--qJGRfN8.js → julia-yMXHdeoG.js} +1 -1
- package/dist/web-dist/assets/{keys-Bs0DRbCB.js → keys-B1bnQf8h.js} +1 -1
- package/dist/web-dist/assets/{kotlin-C3MSe-0N.js → kotlin-BbY6gpqm.js} +1 -1
- package/dist/web-dist/assets/{label-DzHJlGAx.js → label-B5lrF5vb.js} +1 -1
- package/dist/web-dist/assets/{less-DOBYgWSY.js → less-rp9k6ONg.js} +1 -1
- package/dist/web-dist/assets/{lexon-Djd2rGvJ.js → lexon-rRyNfudJ.js} +1 -1
- package/dist/web-dist/assets/{liquid-DXfHmR66.js → liquid-TDvflZF7.js} +1 -1
- package/dist/web-dist/assets/{logs-BortjBc-.js → logs-C2iyjCnP.js} +1 -1
- package/dist/web-dist/assets/{lspLanguageFeatures-C7-iyD6G.js → lspLanguageFeatures-DkWvqpF_.js} +1 -1
- package/dist/web-dist/assets/{lua-Ck8vNcPw.js → lua-DInTck7-.js} +1 -1
- package/dist/web-dist/assets/{m3-a6Kl4TV0.js → m3-D1zMDYBU.js} +1 -1
- package/dist/web-dist/assets/{markdown-DkcRBwO0.js → markdown-DTHzen51.js} +1 -1
- package/dist/web-dist/assets/{mdx-QI5o45qz.js → mdx-D9pd4Hjw.js} +1 -1
- package/dist/web-dist/assets/mermaid-WFAXDIZX-B2YMTdfH.js +1 -0
- package/dist/web-dist/assets/middleware-gB5jp1rF.js +1 -0
- package/dist/web-dist/assets/{mips-Cc1YVI2p.js → mips-7Slzy87X.js} +1 -1
- package/dist/web-dist/assets/module-BHjgyYxe.js +3 -0
- package/dist/web-dist/assets/monaco-theme-CFrVB-OG.js +68 -0
- package/dist/web-dist/assets/monaco-theme-DtsiNm_H.css +1 -0
- package/dist/web-dist/assets/{msdax-Bh41xUoQ.js → msdax-CVw_oFJe.js} +1 -1
- package/dist/web-dist/assets/{mysql-BZTZMxPa.js → mysql-92xfRPFN.js} +1 -1
- package/dist/web-dist/assets/{objective-c-CxZIMOHQ.js → objective-c-BXnCggXS.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-DsUdwZjE.js → overlay.store-wgNV6JkK.js} +1 -1
- package/dist/web-dist/assets/{pascal-I-WmLkmD.js → pascal-3fByeJdZ.js} +1 -1
- package/dist/web-dist/assets/{pascaligo-DEZ-6bwf.js → pascaligo-BdC4YsoB.js} +1 -1
- package/dist/web-dist/assets/{perl-DfeHQJxJ.js → perl-ClTLOqGp.js} +1 -1
- package/dist/web-dist/assets/{personal-preferences.store-DXSnKmVN.js → personal-preferences.store-dG5rDcRw.js} +1 -1
- package/dist/web-dist/assets/{pgsql-OdOoQYPW.js → pgsql-DEzB6Ucu.js} +1 -1
- package/dist/web-dist/assets/{php-CF1bUutw.js → php-DVFKZpKp.js} +1 -1
- package/dist/web-dist/assets/{pla-BHZr0GrY.js → pla-0ER0Ntvs.js} +1 -1
- package/dist/web-dist/assets/{postiats-BSB6a63H.js → postiats-CEuE_fTP.js} +1 -1
- package/dist/web-dist/assets/{powerquery-Bu0p84Ye.js → powerquery-IX0j-GcX.js} +1 -1
- package/dist/web-dist/assets/{powershell-Dcq3YM6T.js → powershell-PrZfSRSf.js} +1 -1
- package/dist/web-dist/assets/preload-helper-Bpqt02Xx.js +1 -0
- package/dist/web-dist/assets/{protobuf-CsWrQxqX.js → protobuf-CCWom7A4.js} +1 -1
- package/dist/web-dist/assets/{pug-DLQiv3Bp.js → pug-B-mwU8C7.js} +1 -1
- package/dist/web-dist/assets/{python-BvKEpyP9.js → python-B-RGw6sh.js} +1 -1
- package/dist/web-dist/assets/{qsharp-D8nrRUNu.js → qsharp-zXtiGbGZ.js} +1 -1
- package/dist/web-dist/assets/{queries.store-BaeyNA64.js → queries.store-CL_QZ9kV.js} +1 -1
- package/dist/web-dist/assets/query-runner-__vttAd8.js +17 -0
- package/dist/web-dist/assets/{r-xhyKpGTk.js → r-ff7AzNUE.js} +1 -1
- package/dist/web-dist/assets/radix-ui-BLYTVDm9.js +41 -0
- package/dist/web-dist/assets/{razor-Ceb9S1Rz.js → razor-f0SZhWBH.js} +1 -1
- package/dist/web-dist/assets/react-Cuc8VqJk.js +1 -0
- package/dist/web-dist/assets/react-dom-Cx6AFOpM.js +9 -0
- package/dist/web-dist/assets/{redis-BnpkEvbr.js → redis-3WrJd2UX.js} +1 -1
- package/dist/web-dist/assets/{redis-value-DMk0-Zuc.js → redis-value-DvCMBdEM.js} +1 -1
- package/dist/web-dist/assets/{redshift-BpxVXjAI.js → redshift-BFFZqrqe.js} +1 -1
- package/dist/web-dist/assets/{restructuredtext-5afXtW7D.js → restructuredtext-BRpKlTYP.js} +1 -1
- package/dist/web-dist/assets/rolldown-runtime-v8MIZ6et.js +1 -0
- package/dist/web-dist/assets/{ruby-CHaoWUHT.js → ruby-Dik41UlM.js} +1 -1
- package/dist/web-dist/assets/runner-DIQss6Kz.js +1 -0
- package/dist/web-dist/assets/{rust-Bw0WVsLy.js → rust-DADSh0Pc.js} +1 -1
- package/dist/web-dist/assets/{sb-CEjXmIyG.js → sb-DuvpHrMN.js} +1 -1
- package/dist/web-dist/assets/{scala-BuaCSaU6.js → scala-CtuFqcla.js} +1 -1
- package/dist/web-dist/assets/schema-BqwkN_6u.js +1 -0
- package/dist/web-dist/assets/schema-qGsKd6zv.js +1 -0
- package/dist/web-dist/assets/{scheme-DIKzlmFG.js → scheme-hPwS1w0C.js} +1 -1
- package/dist/web-dist/assets/{scss-C2_UsWzg.js → scss-477oFtwU.js} +1 -1
- package/dist/web-dist/assets/{select-C-nrz7Tx.js → select-DDjmR6pO.js} +1 -1
- package/dist/web-dist/assets/{separator-DnB61XAO.js → separator-CGjaYtx-.js} +1 -1
- package/dist/web-dist/assets/{sheet-sidebar-BGxJGRbd.js → sheet-sidebar-Cde4bLIJ.js} +1 -1
- package/dist/web-dist/assets/{shell-2aEL2EVH.js → shell-n9PWT21s.js} +1 -1
- package/dist/web-dist/assets/{solidity-D-5XfYE1.js → solidity-BUjaJYHp.js} +1 -1
- package/dist/web-dist/assets/{sophia-s4MFSvUF.js → sophia-BCcvs9t1.js} +1 -1
- package/dist/web-dist/assets/{sparql-Dkv46wS5.js → sparql-BflQKwzI.js} +1 -1
- package/dist/web-dist/assets/spinner-ioIImnLq.js +1 -0
- package/dist/web-dist/assets/{sql-Dz9Xhs8s.js → sql-B-t7xHK1.js} +1 -1
- package/dist/web-dist/assets/{st-Cbo0XVmr.js → st-CSYG-jYM.js} +1 -1
- package/dist/web-dist/assets/{swift-B66X97nW.js → swift-CKmn3JdQ.js} +1 -1
- package/dist/web-dist/assets/{systemverilog-gGKga8Gf.js → systemverilog-rn_hwEIB.js} +1 -1
- package/dist/web-dist/assets/table-BWy367NZ.js +1 -0
- package/dist/web-dist/assets/tables-geLC-tRf.js +16 -0
- package/dist/web-dist/assets/tanstack-2cKzRGRb.js +5 -0
- package/dist/web-dist/assets/{tcl-BtbeJsUN.js → tcl-Fn2CV_28.js} +1 -1
- package/dist/web-dist/assets/{ts.worker-r_qbh1JO.js → ts.worker-BLC4EdqU.js} +18311 -18257
- package/dist/web-dist/assets/{tsMode-BgtcNcpl.js → tsMode-C-8HcC0f.js} +4 -4
- package/dist/web-dist/assets/{twig-0_nXiuYs.js → twig-CLjUHOwE.js} +1 -1
- package/dist/web-dist/assets/{typescript-Cy_CzC_-.js → typescript-BubYBQa0.js} +1 -1
- package/dist/web-dist/assets/{typespec-DBO6_WMJ.js → typespec-IO61FhU-.js} +1 -1
- package/dist/web-dist/assets/use-database-engine-C1fvJDyS.js +1 -0
- package/dist/web-dist/assets/{use-theme-DBhPknw6.js → use-theme-uud1RcFP.js} +1 -1
- package/dist/web-dist/assets/utils-D49oYrWW.js +1 -0
- package/dist/web-dist/assets/{vb-DFJjBsW2.js → vb-Lm9DdJMK.js} +1 -1
- package/dist/web-dist/assets/visualizer-Bd-PB2Fm.js +1 -0
- package/dist/web-dist/assets/{wgsl-U3RBM2M0.js → wgsl-CG8088eu.js} +1 -1
- package/dist/web-dist/assets/{workers-ClRH6A2w.js → workers-H_G6sPzI.js} +1 -1
- package/dist/web-dist/assets/{xml-D11j3J2_.js → xml-Da0DCKCb.js} +1 -1
- package/dist/web-dist/assets/{yaml-D7Z_4mnx.js → yaml-C-84Dbfu.js} +1 -1
- package/dist/web-dist/index.html +31 -31
- package/package.json +22 -22
- package/dist/web-dist/assets/_pathlessLayout-CUDS1e28.js +0 -1
- package/dist/web-dist/assets/_pathlessLayout-WZkezfN7.js +0 -2
- package/dist/web-dist/assets/_queryId-CEJb62Vl.js +0 -1
- package/dist/web-dist/assets/_table-6SZEx92j.js +0 -1
- package/dist/web-dist/assets/_table-CwyP_2EP.js +0 -1
- package/dist/web-dist/assets/bundle-mjs-CZwf2xtr.js +0 -1
- package/dist/web-dist/assets/chat-sidebar-DwzCElBd.js +0 -132
- package/dist/web-dist/assets/connect-l3LjAClZ.js +0 -1
- package/dist/web-dist/assets/constants-CKAehpPm.js +0 -12
- package/dist/web-dist/assets/cssMode-G6latsS7.js +0 -1
- package/dist/web-dist/assets/database.store-BuqVJMY6.js +0 -57
- package/dist/web-dist/assets/dist-Bz0qAN0x.js +0 -2
- package/dist/web-dist/assets/dist-Cf0L32Jd.js +0 -1
- package/dist/web-dist/assets/editor-1FQrmyyI.css +0 -1
- package/dist/web-dist/assets/editor.api-BTIrAcm5.js +0 -865
- package/dist/web-dist/assets/format-cell-value-CgUtYv8B.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-t8UIAZOZ.js +0 -1
- package/dist/web-dist/assets/icons-DxFtdMXW.js +0 -1
- package/dist/web-dist/assets/index-QVi4Lb9U.css +0 -2
- package/dist/web-dist/assets/index-WFVurGCI.js +0 -34
- package/dist/web-dist/assets/indexes-C3Qddb5L.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-D35eppUc.js +0 -1
- package/dist/web-dist/assets/middleware-CXk7SlTF.js +0 -1
- package/dist/web-dist/assets/module-D_kjbMCc.js +0 -2
- package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +0 -1
- package/dist/web-dist/assets/monaco-theme-C2k_taVU.js +0 -64
- package/dist/web-dist/assets/preload-helper-DF7hIgef.js +0 -1
- package/dist/web-dist/assets/query-runner-f473QQSD.js +0 -17
- package/dist/web-dist/assets/radix-ui-CxCv--D1.js +0 -51
- package/dist/web-dist/assets/react-DEQ0BgTL.js +0 -1
- package/dist/web-dist/assets/react-dom-ITw3Lqwx.js +0 -9
- package/dist/web-dist/assets/rolldown-runtime-fzu9RN21.js +0 -1
- package/dist/web-dist/assets/runner-NsYjzIZs.js +0 -1
- package/dist/web-dist/assets/schema-CE1yGygf.js +0 -1
- package/dist/web-dist/assets/schema-rxLBue8Q.js +0 -1
- package/dist/web-dist/assets/spinner-CNnB5r0X.js +0 -1
- package/dist/web-dist/assets/table-C8WK3uAc.js +0 -1
- package/dist/web-dist/assets/tables-D98Kbmcb.js +0 -16
- package/dist/web-dist/assets/tanstack-RwHFfmqj.js +0 -8
- package/dist/web-dist/assets/use-database-engine-DZZj7-4J.js +0 -1
- package/dist/web-dist/assets/utils-EJLOIroS.js +0 -1
- package/dist/web-dist/assets/visualizer-CgYlDJ_-.js +0 -1
- package/dist/web-dist/assets/vscode-wuSgCuZI.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"db-studio@2.1.0"};var a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="fa4f4d91-00f5-48b9-b49a-0ddac185cd35",r._sentryDebugIdIdentifier="sentry-dbid-fa4f4d91-00f5-48b9-b49a-0ddac185cd35")}catch{}})();var y="modulepreload",p=function(r){return"/"+r},m={},g=function(a,l,h){let c=Promise.resolve();if(l&&l.length>0){let v=function(e){return Promise.all(e.map(s=>Promise.resolve(s).then(t=>({status:"fulfilled",value:t}),t=>({status:"rejected",reason:t}))))},b=function(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href};const o=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),u=n?.nonce||n?.getAttribute("nonce");c=v(l.map(e=>{if(e=p(e,h),e=b(e),e in m)return;m[e]=!0;const s=e.endsWith(".css");for(let i=o.length-1;i>=0;i--){const d=o[i];if(d.href===e&&(!s||d.rel==="stylesheet"))return}const t=document.createElement("link");if(t.rel=s?"stylesheet":y,s||(t.as="script"),t.crossOrigin="",t.href=e,u&&t.setAttribute("nonce",u),document.head.appendChild(t),s)return new Promise((i,d)=>{t.addEventListener("load",i),t.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${e}`)))})}).filter(e=>e!==void 0))}function f(o){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=o,window.dispatchEvent(n),!n.defaultPrevented)throw o}return c.then(o=>{for(const n of o||[])n.status==="rejected"&&f(n.reason);return a().catch(f)})};export{g as t};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-tPwHd3zF.js","assets/rolldown-runtime-fzu9RN21.js","assets/icons-DxFtdMXW.js","assets/radix-ui-CxCv--D1.js","assets/dist-Cf0L32Jd.js","assets/personal-preferences.store-DXSnKmVN.js","assets/react-DEQ0BgTL.js","assets/middleware-CXk7SlTF.js","assets/use-theme-DBhPknw6.js","assets/editor.api-BTIrAcm5.js","assets/preload-helper-DF7hIgef.js","assets/editor-1FQrmyyI.css","assets/monaco-theme-C2k_taVU.js","assets/monaco-theme-BnSsSzUH.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as G}from"./rolldown-runtime-fzu9RN21.js";import{C as P,a as K,i as Y,n as B,r as A,v as J}from"./tanstack-RwHFfmqj.js";import{C as Z,J as q,f as X,ft as ee,jt as re,lt as te,t as se,u as ae,v as oe,zt as ne}from"./icons-DxFtdMXW.js";import{jt as le}from"./radix-ui-CxCv--D1.js";import{n as j}from"./dist-Cf0L32Jd.js";import{t as ie}from"./spinner-CNnB5r0X.js";import{a as N,c as S,n as b,o as w,t as D}from"./overlay.store-DsUdwZjE.js";import{n as F}from"./dist-Bz0qAN0x.js";import{A as de,t as L}from"./constants-CKAehpPm.js";import{i as ce,t as ue}from"./database.store-BuqVJMY6.js";import{t as he}from"./preload-helper-DF7hIgef.js";import{t as me}from"./use-database-engine-DZZj7-4J.js";import{t as xe}from"./format-cell-value-CgUtYv8B.js";import{n as fe,t as be}from"./vscode-wuSgCuZI.js";import{C as O,o as ge,s as $}from"./index-WFVurGCI.js";import{t as pe}from"./queries.store-BaeyNA64.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"db-studio@2.1.0"};var o=new r.Error().stack;o&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[o]="ac2825fc-f0e3-40ea-9c3f-dff5ae4de166",r._sentryDebugIdIdentifier="sentry-dbid-ac2825fc-f0e3-40ea-9c3f-dff5ae4de166")}catch{}})();var n=G(ne(),1),ye={pgsql:`-- Your query here...
|
|
3
|
-
`,json:`{
|
|
4
|
-
"collection": "your_collection",
|
|
5
|
-
"operation": "find",
|
|
6
|
-
"filter": {},
|
|
7
|
-
"sort": { "_id": 1 },
|
|
8
|
-
"limit": 50
|
|
9
|
-
}`,plaintext:"PING"},e=le(),ve=({results:r})=>{const o=(0,n.useMemo)(()=>r?.columns?r.columns.map(s=>({id:s,accessorKey:s,header:s,cell:({row:t})=>(0,e.jsx)("div",{className:"font-medium truncate text-foreground",children:xe(t.getValue(s))})})):[],[r?.columns]),a=Y({columns:o,data:r?.rows??[],getCoreRowModel:K(),columnResizeMode:"onChange",enableColumnResizing:!0}),{rows:l}=a.getRowModel(),c=(0,n.useRef)(null),m=B({count:l.length,getScrollElement:()=>c.current,estimateSize:()=>35,overscan:10}),i=m.getVirtualItems(),u=a.getAllColumns().reduce((s,t)=>s+t.getSize(),0);return(0,e.jsxs)("div",{ref:c,className:"relative h-full overflow-auto w-full bg-background text-foreground",children:[(0,e.jsx)("div",{className:"sticky top-0 z-20 bg-muted/40 border-b border-border supports-backdrop-filter:backdrop-blur-sm",style:{width:`${u}px`,minWidth:"100%"},children:a.getHeaderGroups().map(s=>(0,e.jsx)("div",{className:"flex text-xs",children:s.headers.map(t=>(0,e.jsxs)("div",{className:"shrink-0 p-2 font-semibold text-muted-foreground border-r border-border relative",style:{width:`${t.getSize()}px`},children:[t.isPlaceholder?null:A(t.column.columnDef.header,t.getContext()),(0,e.jsx)("div",{role:"presentation",onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),className:`absolute top-0 right-0 h-full w-1 cursor-col-resize select-none touch-none hover:bg-blue-500 ${t.column.getIsResizing()?"bg-blue-500":""}`})]},t.id))},s.id))}),(0,e.jsx)("div",{style:{height:`${m.getTotalSize()}px`,width:`${u}px`,minWidth:"100%",position:"relative"},children:i.map(s=>{const t=l[s.index];return(0,e.jsx)("div",{style:{position:"absolute",top:0,left:0,width:`${u}px`,minWidth:"100%",height:`${s.size}px`,transform:`translateY(${s.start}px)`},className:"flex text-xs border-b border-border hover:bg-accent/20",children:t.getVisibleCells().map(d=>(0,e.jsx)("div",{className:"shrink-0 p-2 border-r border-border",style:{width:`${d.column.getSize()}px`},children:A(d.column.columnDef.cell,d.getContext())},d.id))},t.id)})}),l.length===0&&(0,e.jsx)("div",{className:"flex items-center justify-center h-24 text-muted-foreground",children:"No results."})]})},je=({results:r,isLoading:o,error:a,lastExecutedQuery:l})=>{const[c]=F(L.RUNNER_STATE_KEYS.SHOW_AS),{requestAssistant:m}=O(),{openOverlay:i}=D(),u=t=>{m(t),i("chat.assistant")},s=(0,n.useMemo)(()=>a?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,e.jsxs)("div",{children:["Error: ",a.message]}),(0,e.jsx)(b,{type:"button",variant:"outline",size:"sm",disabled:!l.trim(),onClick:()=>u(`Fix this failing query. Explain the cause and return the complete corrected query in a fenced code block.
|
|
10
|
-
|
|
11
|
-
Query:
|
|
12
|
-
${l}
|
|
13
|
-
|
|
14
|
-
Error:
|
|
15
|
-
${a.message}`),children:"Suggest fix"})]})}):r?.message?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsx)("p",{children:r.message})}):!r||r.rows.length===0?(0,e.jsx)("div",{className:"flex h-full p-2",children:(0,e.jsx)("p",{children:"Run the query to see the results"})}):c==="json"?(0,e.jsx)("div",{className:"p-2",children:(0,e.jsx)(fe,{value:r?.rows??[],objectSortKeys:!0,displayObjectSize:!1,displayDataTypes:!1,indentWidth:14,collapsed:2,shortenTextAfterLength:100,highlightUpdates:!1,style:be,enableClipboard:!1,className:"size-full"})}):(0,e.jsx)(ve,{results:r}),[c,r,a,l]);return(0,e.jsx)("div",{className:"absolute bottom-0 left-0 right-0 border-t border-border flex flex-col bg-background text-foreground w-full",style:{height:"calc(100vh - 400px)"},children:(0,e.jsx)("div",{className:"flex-1 overflow-auto w-full",children:o?(0,e.jsx)("div",{className:"flex items-center justify-center h-full overflow-auto",children:(0,e.jsx)(ie,{size:"size-8",color:"bg-[#d4d4d4]"})}):s})})},Ne=({isExecutingQuery:r,handleButtonClick:o,handleFormatQuery:a,handleSaveQuery:l,handleFavorite:c,isFavorite:m,queryId:i,hasUnsavedChanges:u,queryResult:s,currentQuery:t})=>{const[d,g]=F(L.RUNNER_STATE_KEYS.SHOW_AS),{requestAssistant:p}=O(),{openOverlay:C}=D(),y=f=>{p(f),C("chat.assistant")};return(0,e.jsxs)("header",{className:"max-h-8 overflow-hidden border-b border-border w-full flex items-center justify-between bg-background text-foreground sticky top-0 left-0 right-0 z-0",children:[(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsxs)(b,{type:"button",variant:"default",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none bg-green-700 text-white hover:bg-green-800 gap-1 disabled:opacity-50",onClick:o,disabled:r,"aria-label":"Run the query",children:["Run",(0,e.jsx)(ee,{className:"size-3"}),(0,e.jsx)(te,{className:"size-3"})]}),(0,e.jsxs)(N,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-zinc-800 rounded-none","aria-label":"Generate a query with AI",onClick:()=>y("Generate a query for this database. Ask me for the goal if it is unclear."),children:(0,e.jsx)(oe,{className:"size-3"})})}),(0,e.jsx)(w,{children:"Generate with AI"})]}),(0,e.jsxs)(N,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-zinc-800 rounded-none","aria-label":"Optimize the query with AI",disabled:!t.trim()||r,onClick:()=>y(`Suggest a faster, clearer version of this query. Explain the tradeoffs and return the complete query in a fenced code block.
|
|
16
|
-
|
|
17
|
-
${t}`),children:(0,e.jsx)(se,{className:"size-3"})})}),(0,e.jsx)(w,{children:"Optimize with AI"})]}),(0,e.jsxs)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Format the query",onClick:a,children:["Format ",(0,e.jsx)(ae,{className:"size-3"})]}),(0,e.jsxs)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Save the query",onClick:l,children:["Save ",(0,e.jsx)(Z,{className:"size-3"})]}),(0,e.jsx)(b,{type:"button",variant:"ghost",className:"h-8! border-l-0 border-y-0 border-r border-border rounded-none text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors","aria-label":"Favorite the query",onClick:c,children:m?(0,e.jsx)(q,{className:"size-3 fill-current"}):(0,e.jsx)(q,{className:"size-3"})}),i&&u&&(0,e.jsx)("span",{className:"text-xs px-2 text-muted-foreground",children:"Unsaved changes"})]}),(0,e.jsxs)("div",{className:"flex items-center",children:[s&&(0,e.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.data?.duration?.toFixed(2),"ms"]}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"•"}),(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.data?.rowCount??0," rows"]})]}),(0,e.jsxs)(ge,{type:"single",variant:"ghost",onValueChange:f=>{f!==d&&g(f)},value:d??void 0,className:"h-8! rounded-none! border-l! border-border!",children:[(0,e.jsxs)(N,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)($,{value:"table","aria-label":"Toggle table",className:"rounded-none! h-8! aspect-square!","data-selected":d==="table",children:(0,e.jsx)(X,{})})}),(0,e.jsx)(w,{children:(0,e.jsx)("p",{children:"View as a table"})})]}),(0,e.jsxs)(N,{children:[(0,e.jsx)(S,{asChild:!0,children:(0,e.jsx)($,{value:"json","aria-label":"Toggle JSON",className:"rounded-none! h-8! aspect-square!","data-selected":d==="json",children:(0,e.jsx)(re,{})})}),(0,e.jsx)(w,{children:(0,e.jsx)("p",{children:"View as a JSON"})})]})]})]})]})},Se=()=>{const{selectedDatabase:r,dbType:o}=ue(),{mutateAsync:a,isPending:l,error:c}=P({mutationFn:async({query:i})=>(await de({query:i,db:r})).data.data,onSuccess:()=>{o&&ce.capture("query_executed",{db_type:o})}});return{executeQuery:async({query:i})=>{try{return await a({query:i})}catch{return}},isExecutingQuery:l,executeQueryError:c}},we=(0,n.lazy)(()=>he(()=>import("./code-editor-tPwHd3zF.js").then(r=>({default:r.CodeEditor})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),He=({queryId:r,initialQuery:o})=>{const a=J(),[l,c]=(0,n.useState)(void 0),{getQuery:m,updateQuery:i,toggleFavorite:u,addQuery:s}=pe(),t=r?m(r):null,d=t?.isFavorite??!1,{executeQuery:g,isExecutingQuery:p,executeQueryError:C}=Se(),[y,f]=(0,n.useState)(!1),[x,V]=(0,n.useState)(""),[H,M]=(0,n.useState)(""),k=me(),z=k?.editorLanguage??"pgsql",E=k?.dataModel==="key-value",U=(0,n.useCallback)(()=>{if(o)return o;const h=ye[z];return t?t?.query??h:h},[t,z,o]),Q=(0,n.useCallback)(async h=>{if(!h.trim()){j.error("Query is empty!");return}const v=h.trim().match(/^\S+/)?.[0]?.toUpperCase();if(E&&(v==="FLUSHDB"||v==="FLUSHALL")&&window.prompt(`This permanently deletes Redis data. Type ${v} to continue.`)!==v)return;M(h);const R=await g({query:h});R&&c({data:R,queryId:r??""})},[E,g,r]),I=(0,n.useCallback)(()=>{if(!x.trim()){j.error("Query is empty!");return}Q(x)},[Q,x]),W=(0,n.useCallback)(()=>{r&&(u(r),j.success(d?"Query unfavorited":"Query favorited"))},[u,r,d]),T=(0,n.useCallback)(()=>{},[]),_=(0,n.useCallback)(()=>{if(x){if(r)i(r,{query:x});else{const h=s();i(h,{query:x}),a({to:"/runner/$queryId",params:{queryId:h}})}f(!1),j.success("Query saved")}},[x,r,i,s,a]);return(0,e.jsxs)("div",{className:"flex-1 relative w-full flex flex-col",children:[(0,e.jsx)(Ne,{isExecutingQuery:p,handleButtonClick:I,handleFormatQuery:T,handleSaveQuery:_,handleFavorite:W,isFavorite:d,queryId:r??"",hasUnsavedChanges:y,queryResult:l??null,currentQuery:x}),(0,e.jsx)(n.Suspense,{fallback:(0,e.jsx)("div",{className:"flex-1 bg-background size-full"}),children:(0,e.jsx)(we,{initialQuery:U(),queryId:r,savedQuery:t?.query??"",language:z,onQueryChange:V,onUnsavedChanges:f,onExecuteQuery:Q,onFormatQuery:T,onSaveQuery:_})}),(0,e.jsx)(je,{results:l?.data??null,isLoading:p,error:C,lastExecutedQuery:H})]})};export{He as t};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import{r as lo,t as zt}from"./rolldown-runtime-fzu9RN21.js";import{zt as uo}from"./icons-DxFtdMXW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.1.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e3278bc5-424f-427e-b347-85a69e221229",e._sentryDebugIdIdentifier="sentry-dbid-e3278bc5-424f-427e-b347-85a69e221229")}catch{}})();var Pc=zt((e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:t,type:o,key:c,ref:a!==void 0?a:null,props:i}}e.Fragment=n,e.jsx=r,e.jsxs=r})),_c=zt(((e,t)=>{t.exports=Pc()})),Tc=zt((e=>{var t=uo();function n(d){var l="https://react.dev/errors/"+d;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+d+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,l,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:v==null?null:""+v,children:d,containerInfo:l,implementation:f}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,l){if(d==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(d,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(n(299));return i(d,l,null,f)},e.flushSync=function(d){var l=c.T,f=o.p;try{if(c.T=null,o.p=2,d)return d()}finally{c.T=l,o.p=f,o.d.f()}},e.preconnect=function(d,l){typeof d=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,o.d.C(d,l))},e.prefetchDNS=function(d){typeof d=="string"&&o.d.D(d)},e.preinit=function(d,l){if(typeof d=="string"&&l&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin),m=typeof l.integrity=="string"?l.integrity:void 0,x=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;f==="style"?o.d.S(d,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:v,integrity:m,fetchPriority:x}):f==="script"&&o.d.X(d,{crossOrigin:v,integrity:m,fetchPriority:x,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},e.preinitModule=function(d,l){if(typeof d=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var f=u(l.as,l.crossOrigin);o.d.M(d,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l??o.d.M(d)},e.preload=function(d,l){if(typeof d=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin);o.d.L(d,f,{crossOrigin:v,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},e.preloadModule=function(d,l){if(typeof d=="string")if(l){var f=u(l.as,l.crossOrigin);o.d.m(d,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else o.d.m(d)},e.requestFormReset=function(d){o.d.r(d)},e.unstable_batchedUpdates=function(d,l){return d(l)},e.useFormState=function(d,l,f){return c.H.useFormState(d,l,f)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.5"})),Ac=zt(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}n(),t.exports=Tc()})),s=lo(uo(),1),Hv=!!(typeof window<"u"&&window.document&&window.document.createElement);function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Dr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Dr(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Dr(e[o],null)}}}}function D(...e){return s.useCallback(ft(...e),e)}var p=_c();function Mc(e,t){const n=s.createContext(t),r=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return(0,p.jsx)(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function q(e,t=[]){let n=[];function r(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=f=>{const{scope:v,children:m,...x}=f,h=v?.[e]?.[u]||c,g=s.useMemo(()=>x,Object.values(x));return(0,p.jsx)(h.Provider,{value:g,children:m})};d.displayName=a+"Provider";function l(f,v){const m=v?.[e]?.[u]||c,x=s.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[d,l]}const o=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Oc(o,...t)]}function Oc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:u,scopeName:d})=>{const l=u(a)[`__scope${d}`];return{...c,...l}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var pt=lo(Ac(),1);function ke(e){const t=Nc(e),n=s.forwardRef((r,o)=>{const{children:a,...i}=r,c=s.Children.toArray(a),u=c.find(Ic);if(u){const d=u.props.children,l=c.map(f=>f===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:f);return(0,p.jsx)(t,{...i,ref:o,children:s.isValidElement(d)?s.cloneElement(d,void 0,l):null})}return(0,p.jsx)(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Nc(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const i=jc(o),c=Dc(a,o.props);return o.type!==s.Fragment&&(c.ref=r?ft(r,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fo=Symbol("radix.slottable");function po(e){const t=({children:n})=>(0,p.jsx)(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=fo,t}function Ic(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fo}function Dc(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=ke(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vo(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}function K(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function Lc(e,t=globalThis?.document){const n=K(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kc="DismissableLayer",Dn="dismissableLayer.update",Fc="dismissableLayer.pointerDownOutside",$c="dismissableLayer.focusOutside",jr,ho=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(ho),[l,f]=s.useState(null),v=l?.ownerDocument??globalThis?.document,[,m]=s.useState({}),x=D(t,E=>f(E)),h=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),w=l?h.indexOf(l):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=w>=y,P=Hc(E=>{const M=E.target,A=[...d.branches].some(O=>O.contains(M));!b||A||(o?.(E),i?.(E),E.defaultPrevented||c?.())},v),R=Gc(E=>{const M=E.target;[...d.branches].some(A=>A.contains(M))||(a?.(E),i?.(E),E.defaultPrevented||c?.())},v);return Lc(E=>{w===d.layers.size-1&&(r?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},v),s.useEffect(()=>{if(l)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),Lr(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=jr)}},[l,v,n,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),Lr())},[l,d]),s.useEffect(()=>{const E=()=>m({});return document.addEventListener(Dn,E),()=>document.removeEventListener(Dn,E)},[]),(0,p.jsx)(T.div,{...u,ref:x,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,R.onFocusCapture),onBlurCapture:S(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,P.onPointerDownCapture)})});Qe.displayName=kc;var Bc="DismissableLayerBranch",Wc=s.forwardRef((e,t)=>{const n=s.useContext(ho),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),(0,p.jsx)(T.div,{...e,ref:o})});Wc.displayName=Bc;function Hc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let u=function(){mo(Fc,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&mo($c,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lr(){const e=new CustomEvent(Dn);document.dispatchEvent(e)}function mo(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vo(o,a):o.dispatchEvent(a)}var Y=globalThis?.document?s.useLayoutEffect:()=>{},Uc=s[" useId ".trim().toString()]||(()=>{}),Vc=0;function re(e){const[t,n]=s.useState(Uc());return Y(()=>{e||n(r=>r??String(Vc++))},[e]),e||(t?`radix-${t}`:"")}var Kc=["top","right","bottom","left"],Te=Math.min,se=Math.max,jt=Math.round,Rt=Math.floor,xe=e=>({x:e,y:e}),zc={left:"right",right:"left",bottom:"top",top:"bottom"};function jn(e,t,n){return se(e,Te(t,n))}function be(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function Xn(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zn(e){return Xn(ge(e))}function Yc(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Zn(e),a=qn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lt(i)),[i,Lt(i)]}function Xc(e){const t=Lt(e);return[Ln(e),t,Ln(t)]}function Ln(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var kr=["left","right"],Fr=["right","left"],qc=["top","bottom"],Zc=["bottom","top"];function Qc(e,t,n){switch(e){case"top":case"bottom":return n?t?Fr:kr:t?kr:Fr;case"left":case"right":return t?qc:Zc;default:return[]}}function Jc(e,t,n,r){const o=Je(e);let a=Qc(Se(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Ln)))),a}function Lt(e){const t=Se(e);return zc[t]+e.slice(t.length)}function el(e){return{top:0,right:0,bottom:0,left:0,...e}}function go(e){return typeof e!="number"?el(e):{top:e,right:e,bottom:e,left:e}}function kt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function $r(e,t,n){let{reference:r,floating:o}=e;const a=ge(t),i=Zn(t),c=qn(i),u=Se(t),d=a==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,v=r[c]/2-o[c]/2;let m;switch(u){case"top":m={x:l,y:r.y-o.height};break;case"bottom":m={x:l,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Je(t)){case"start":m[i]-=v*(n&&d?-1:1);break;case"end":m[i]+=v*(n&&d?-1:1)}return m}async function tl(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:v=!1,padding:m=0}=be(t,e),x=go(m),h=c[v?f==="floating"?"reference":"floating":f],g=kt(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:l,strategy:u})),y=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},b=kt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:w,strategy:u}):y);return{top:(g.top-b.top+x.top)/C.y,bottom:(b.bottom-g.bottom+x.bottom)/C.y,left:(g.left-b.left+x.left)/C.x,right:(b.right-g.right+x.right)/C.x}}var nl=50,rl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:tl},u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=$r(d,r,u),v=r,m=0;const x={};for(let h=0;h<a.length;h++){const g=a[h];if(!g)continue;const{name:y,fn:w}=g,{x:C,y:b,data:P,reset:R}=await w({x:l,y:f,initialPlacement:r,placement:v,strategy:o,middlewareData:x,rects:d,platform:c,elements:{reference:e,floating:t}});l=C??l,f=b??f,x[y]={...x[y],...P},R&&m<nl&&(m++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:l,y:f}=$r(d,v,u)),h=-1)}return{x:l,y:f,placement:v,strategy:o,middlewareData:x}},ol=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:l=0}=be(e,t)||{};if(d==null)return{};const f=go(l),v={x:n,y:r},m=Zn(o),x=qn(m),h=await i.getDimensions(d),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=a.reference[x]+a.reference[m]-v[m]-a.floating[x],P=v[m]-a.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let E=R?R[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(R)))&&(E=c.floating[C]||a.floating[x]);const M=b/2-P/2,A=E/2-h[x]/2-1,O=Te(f[y],A),j=Te(f[w],A),L=O,W=E-h[x]-j,F=E/2-h[x]/2+M,H=jn(L,F,W),k=!u.arrow&&Je(o)!=null&&F!==H&&a.reference[x]/2-(F<L?O:j)-h[x]/2<0,$=k?F<L?F-L:F-W:0;return{[m]:v[m]+$,data:{[m]:H,centerOffset:F-H-$,...k&&{alignmentOffset:$}},reset:k}}}),al=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=be(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(o),w=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=v||(C||!h?[Lt(c)]:Xc(c)),R=x!=="none";!v&&R&&P.push(...Jc(c,h,x,b));const E=[c,...P],M=await u.detectOverflow(t,g),A=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(l&&A.push(M[y]),f){const F=Yc(o,i,b);A.push(M[F[0]],M[F[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(F=>F<=0)){var j,L;const F=(((j=a.flip)==null?void 0:j.index)||0)+1,H=E[F];if(H&&(!(f==="alignment"&&w!==ge(H))||O.every($=>ge($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:H}};let k=(L=O.filter($=>$.overflows[0]<=0).sort(($,I)=>$.overflows[1]-I.overflows[1])[0])==null?void 0:L.placement;if(!k)switch(m){case"bestFit":{var W;const $=(W=O.filter(I=>{if(R){const _=ge(I.placement);return _===w||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];$&&(k=$);break}case"initialPlacement":k=c}if(o!==k)return{reset:{placement:k}}}return{}}}};function Br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wr(e){return Kc.some(t=>e[t]>=0)}var sl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=be(e,t);switch(o){case"referenceHidden":{const i=Br(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wr(i)}}}case"escaped":{const i=Br(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:i,escaped:Wr(i)}}}default:return{}}}}},xo=new Set(["left","top"]);async function il(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Se(n),c=Je(n),u=ge(n)==="y",d=xo.has(i)?-1:1,l=a&&u?-1:1,f=be(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof x=="number"&&(m=c==="end"?x*-1:x),u?{x:m*l,y:v*d}:{x:v*d,y:m*l}}var cl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:c}=t,u=await il(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},ll=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:y=>{let{x:w,y:C}=y;return{x:w,y:C}}},...d}=be(e,t),l={x:n,y:r},f=await a.detectOverflow(t,d),v=ge(Se(o)),m=Xn(v);let x=l[m],h=l[v];if(i){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=x+f[y],b=x-f[w];x=jn(C,x,b)}if(c){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",C=h+f[y],b=h-f[w];h=jn(C,h,b)}const g=u.fn({...t,[m]:x,[v]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:i,[v]:c}}}}}},ul=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=be(e,t),l={x:n,y:r},f=ge(o),v=Xn(f);let m=l[v],x=l[f];const h=be(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=v==="y"?"height":"width",b=a.reference[v]-a.floating[C]+g.mainAxis,P=a.reference[v]+a.reference[C]-g.mainAxis;m<b?m=b:m>P&&(m=P)}if(d){var y,w;const C=v==="y"?"width":"height",b=xo.has(Se(o)),P=a.reference[f]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),R=a.reference[f]+a.reference[C]+(b?0:((w=i.offset)==null?void 0:w[f])||0)-(b?g.crossAxis:0);x<P?x=P:x>R&&(x=R)}return{[v]:m,[f]:x}}}},dl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=be(e,t),l=await i.detectOverflow(t,d),f=Se(o),v=Je(o),m=ge(o)==="y",{width:x,height:h}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,g=v==="end"?"top":"bottom");const w=h-l.top-l.bottom,C=x-l.left-l.right,b=Te(h-l[g],w),P=Te(x-l[y],C),R=!t.middlewareData.shift;let E=b,M=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),R&&!v){const O=se(l.left,0),j=se(l.right,0),L=se(l.top,0),W=se(l.bottom,0);m?M=x-2*(O!==0||j!==0?O+j:se(l.left,l.right)):E=h-2*(L!==0||W!==0?L+W:se(l.top,l.bottom))}await u({...t,availableWidth:M,availableHeight:E});const A=await i.getDimensions(c.floating);return x!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function et(e){return wo(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(wo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wo(e){return Yt()?e instanceof Node||e instanceof ie(e).Node:!1}function fe(e){return Yt()?e instanceof Element||e instanceof ie(e).Element:!1}function Ee(e){return Yt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Hr(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function vt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function fl(e){return/^(table|td|th)$/.test(et(e))}function Xt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var pl=/transform|translate|scale|rotate|perspective|filter/,vl=/paint|layout|strict|content/,Le=e=>!!e&&e!=="none",Sn;function Qn(e){const t=fe(e)?pe(e):e;return Le(t.transform)||Le(t.translate)||Le(t.scale)||Le(t.rotate)||Le(t.perspective)||!Jn()&&(Le(t.backdropFilter)||Le(t.filter))||pl.test(t.willChange||"")||vl.test(t.contain||"")}function hl(e){let t=Ae(e);for(;Ee(t)&&!Ye(t);){if(Qn(t))return t;if(Xt(t))return null;t=Ae(t)}return null}function Jn(){return Sn==null&&(Sn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sn}function Ye(e){return/^(html|body|#document)$/.test(et(e))}function pe(e){return ie(e).getComputedStyle(e)}function qt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||we(e);return Hr(t)?t.host:t}function yo(e){const t=Ae(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&vt(t)?t:yo(t)}function ct(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yo(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ie(o);if(a){const c=kn(i);return t.concat(i,i.visualViewport||[],vt(o)?o:[],c&&n?ct(c):[])}else return t.concat(o,ct(o,[],n))}function kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Co(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=jt(n)!==a||jt(r)!==i;return c&&(n=a,r=i),{width:n,height:r,$:c}}function er(e){return fe(e)?e:e.contextElement}function Ke(e){const t=er(e);if(!Ee(t))return xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Co(t);let i=(a?jt(n.width):n.width)/r,c=(a?jt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}var ml=xe(0);function bo(e){const t=ie(e);return!Jn()||!t.visualViewport?ml:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function Fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=er(e);let i=xe(1);t&&(r?fe(r)&&(i=Ke(r)):i=Ke(e));const c=gl(a,n,r)?bo(a):xe(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(a){const v=ie(a),m=r&&fe(r)?ie(r):r;let x=v,h=kn(x);for(;h&&r&&m!==x;){const g=Ke(h),y=h.getBoundingClientRect(),w=pe(h),C=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*g.x,b=y.top+(h.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,l*=g.x,f*=g.y,u+=C,d+=b,x=ie(h),h=kn(x)}}return kt({width:l,height:f,x:u,y:d})}function Zt(e,t){const n=qt(e).scrollLeft;return t?t.left+n:Fe(we(e)).left+n}function So(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Zt(e,n),y:n.top+t.scrollTop}}function xl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=we(r),c=t?Xt(t.floating):!1;if(r===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=xe(1);const l=xe(0),f=Ee(r);if((f||!f&&!a)&&((et(r)!=="body"||vt(i))&&(u=qt(r)),f)){const m=Fe(r);d=Ke(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}const v=i&&!f&&!a?So(i,u):xe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-u.scrollTop*d.y+l.y+v.y}}function wl(e){return Array.from(e.getClientRects())}function yl(e){const t=we(e),n=qt(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Zt(e);const c=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:c}}var Gr=25;function Cl(e,t){const n=ie(e),r=we(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){a=o.width,i=o.height;const l=Jn();(!l||l&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=Zt(r);if(d<=0){const l=r.ownerDocument,f=l.body,v=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(r.clientWidth-f.clientWidth-m);x<=Gr&&(a-=x)}else d<=Gr&&(a+=d);return{width:a,height:i,x:c,y:u}}function bl(e,t){const n=Fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ee(e)?Ke(e):xe(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function Ur(e,t,n){let r;if(t==="viewport")r=Cl(e,n);else if(t==="document")r=yl(we(e));else if(fe(t))r=bl(t,n);else{const o=bo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return kt(r)}function Eo(e,t){const n=Ae(e);return n===t||!fe(n)||Ye(n)?!1:pe(n).position==="fixed"||Eo(n,t)}function Sl(e,t){const n=t.get(e);if(n)return n;let r=ct(e,[],!1).filter(c=>fe(c)&&et(c)!=="body"),o=null;const a=pe(e).position==="fixed";let i=a?Ae(e):e;for(;fe(i)&&!Ye(i);){const c=pe(i),u=Qn(i);!u&&c.position==="fixed"&&(o=null),(a?!u&&!o:!u&&c.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||vt(i)&&!u&&Eo(e,i))?r=r.filter(d=>d!==i):o=c,i=Ae(i)}return t.set(e,r),r}function El(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Xt(t)?[]:Sl(t,this._c):[].concat(n),r],i=Ur(t,a[0],o);let c=i.top,u=i.right,d=i.bottom,l=i.left;for(let f=1;f<a.length;f++){const v=Ur(t,a[f],o);c=se(v.top,c),u=Te(v.right,u),d=Te(v.bottom,d),l=se(v.left,l)}return{width:u-l,height:d-c,x:l,y:c}}function Rl(e){const{width:t,height:n}=Co(e);return{width:t,height:n}}function Pl(e,t,n){const r=Ee(t),o=we(t),a=n==="fixed",i=Fe(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=xe(0);function d(){u.x=Zt(o)}if(r||!r&&!a)if((et(t)!=="body"||vt(o))&&(c=qt(t)),r){const f=Fe(t,!0,a,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else o&&d();a&&!r&&o&&d();const l=o&&!r&&!a?So(o,c):xe(0);return{x:i.left+c.scrollLeft-u.x-l.x,y:i.top+c.scrollTop-u.y-l.y,width:i.width,height:i.height}}function En(e){return pe(e).position==="static"}function Vr(e,t){if(!Ee(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function Ro(e,t){const n=ie(e);if(Xt(e))return n;if(!Ee(e)){let o=Ae(e);for(;o&&!Ye(o);){if(fe(o)&&!En(o))return o;o=Ae(o)}return n}let r=Vr(e,t);for(;r&&fl(r)&&En(r);)r=Vr(r,t);return r&&Ye(r)&&En(r)&&!Qn(r)?n:r||hl(e)||n}var _l=async function(e){const t=this.getOffsetParent||Ro,n=this.getDimensions,r=await n(e.floating);return{reference:Pl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tl(e){return pe(e).direction==="rtl"}var Al={convertOffsetParentRelativeRectToViewportRelativeRect:xl,getDocumentElement:we,getClippingRect:El,getOffsetParent:Ro,getElementRects:_l,getClientRects:wl,getDimensions:Rl,getScale:Ke,isElement:fe,isRTL:Tl};function Po(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ml(e,t){let n=null,r;const o=we(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:l,top:f,width:v,height:m}=d;if(c||t(),!v||!m)return;const x=Rt(f),h=Rt(o.clientWidth-(l+v)),g=Rt(o.clientHeight-(f+m)),y=Rt(l),w={rootMargin:-x+"px "+-h+"px "+-g+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let C=!0;function b(P){const R=P[0].intersectionRatio;if(R!==u){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!Po(d,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return i(!0),a}function Ol(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=er(e),l=o||a?[...d?ct(d):[],...t?ct(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const f=d&&c?Ml(d,n):null;let v=-1,m=null;i&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let x,h=u?Fe(e):null;u&&g();function g(){const y=Fe(e);h&&!Po(h,y)&&n(),h=y,x=requestAnimationFrame(g)}return n(),()=>{var y;l.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(x)}}var Nl=cl,Il=ll,Dl=al,jl=dl,Ll=sl,Kr=ol,kl=ul,Fl=(e,t,n)=>{const r=new Map,o={platform:Al,...n},a={...o.platform,_c:r};return rl(e,t,{...o,platform:a})},Nt=typeof document<"u"?s.useLayoutEffect:function(){};function Ft(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ft(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Ft(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function _o(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zr(e,t){const n=_o(e);return Math.round(t*n)/n}function Rn(e){const t=s.useRef(e);return Nt(()=>{t.current=e}),t}function $l(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[l,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=s.useState(r);Ft(v,r)||m(r);const[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useCallback(I=>{I!==R.current&&(R.current=I,h(I))},[]),C=s.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),b=a||x,P=i||g,R=s.useRef(null),E=s.useRef(null),M=s.useRef(l),A=u!=null,O=Rn(u),j=Rn(o),L=Rn(d),W=s.useCallback(()=>{if(!R.current||!E.current)return;const I={placement:t,strategy:n,middleware:v};j.current&&(I.platform=j.current),Fl(R.current,E.current,I).then(_=>{const U={..._,isPositioned:L.current!==!1};F.current&&!Ft(M.current,U)&&(M.current=U,pt.flushSync(()=>{f(U)}))})},[v,t,n,j,L]);Nt(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[d]);const F=s.useRef(!1);Nt(()=>(F.current=!0,()=>{F.current=!1}),[]),Nt(()=>{if(b&&(R.current=b),P&&(E.current=P),b&&P){if(O.current)return O.current(b,P,W);W()}},[b,P,W,O,A]);const H=s.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:C}),[w,C]),k=s.useMemo(()=>({reference:b,floating:P}),[b,P]),$=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!k.floating)return I;const _=zr(k.floating,l.x),U=zr(k.floating,l.y);return c?{...I,transform:"translate("+_+"px, "+U+"px)",..._o(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:U}},[n,c,k.floating,l.x,l.y]);return s.useMemo(()=>({...l,update:W,refs:H,elements:k,floatingStyles:$}),[l,W,H,k,$])}var Bl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Kr({element:r.current,padding:o}).fn(n):{}:r?Kr({element:r,padding:o}).fn(n):{}}}},Wl=(e,t)=>{const n=Nl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hl=(e,t)=>{const n=Il(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gl=(e,t)=>({fn:kl(e).fn,options:[e,t]}),Ul=(e,t)=>{const n=Dl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vl=(e,t)=>{const n=jl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kl=(e,t)=>{const n=Ll(e);return{name:n.name,fn:n.fn,options:[e,t]}},zl=(e,t)=>{const n=Bl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yl="Arrow",To=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,p.jsx)(T.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,p.jsx)("polygon",{points:"0,0 30,0 15,10"})})});To.displayName=Yl;var Xl=To;function tr(e){const[t,n]=s.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var nr="Popper",[Ao,Me]=q(nr),[ql,Mo]=Ao(nr),Oo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return(0,p.jsx)(ql,{scope:t,anchor:r,onAnchorChange:o,children:n})};Oo.displayName=nr;var No="PopperAnchor",Io=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Mo(No,n),i=s.useRef(null),c=D(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=r?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),r?null:(0,p.jsx)(T.div,{...o,ref:c})});Io.displayName=No;var rr="PopperContent",[Zl,Ql]=Ao(rr),Do=s.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:x,...h}=e,g=Mo(rr,n),[y,w]=s.useState(null),C=D(t,N=>w(N)),[b,P]=s.useState(null),R=tr(b),E=R?.width??0,M=R?.height??0,A=r+(a!=="center"?"-"+a:""),O=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},j=Array.isArray(d)?d:[d],L=j.length>0,W={padding:O,boundary:j.filter(eu),altBoundary:L},{refs:F,floatingStyles:H,placement:k,isPositioned:$,middlewareData:I}=$l({strategy:"fixed",placement:A,whileElementsMounted:(...N)=>Ol(...N,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Wl({mainAxis:o+M,alignmentAxis:i}),u&&Hl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Gl():void 0,...W}),u&&Ul({...W}),Vl({...W,apply:({elements:N,rects:V,availableWidth:G,availableHeight:B})=>{const{width:Z,height:ne}=V.reference,he=N.floating.style;he.setProperty("--radix-popper-available-width",`${G}px`),he.setProperty("--radix-popper-available-height",`${B}px`),he.setProperty("--radix-popper-anchor-width",`${Z}px`),he.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),b&&zl({element:b,padding:c}),tu({arrowWidth:E,arrowHeight:M}),v&&Kl({strategy:"referenceHidden",...W})]}),[_,U]=ko(k),te=K(x);Y(()=>{$&&te?.()},[$,te]);const ue=I.arrow?.x,Ce=I.arrow?.y,oe=I.arrow?.centerOffset!==0,[ae,X]=s.useState();return Y(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),(0,p.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,p.jsx)(Zl,{scope:n,placedSide:_,onArrowChange:P,arrowX:ue,arrowY:Ce,shouldHideArrow:oe,children:(0,p.jsx)(T.div,{"data-side":_,"data-align":U,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});Do.displayName=rr;var jo="PopperArrow",Jl={top:"bottom",right:"left",bottom:"top",left:"right"},Lo=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ql(jo,r),i=Jl[a.placedSide];return(0,p.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,p.jsx)(Xl,{...o,ref:n,style:{...o.style,display:"block"}})})});Lo.displayName=jo;function eu(e){return e!==null}var tu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=ko(n),l={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+c/2;let m="",x="";return u==="bottom"?(m=a?l:`${f}px`,x=`${-c}px`):u==="top"?(m=a?l:`${f}px`,x=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,x=a?l:`${v}px`):u==="left"&&(m=`${r.floating.width+c}px`,x=a?l:`${v}px`),{data:{x:m,y:x}}}});function ko(e){const[t,n="center"]=e.split("-");return[t,n]}var ht=Oo,mt=Io,Qt=Do,Jt=Lo,nu="Portal",tt=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=s.useState(!1);Y(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?pt.createPortal((0,p.jsx)(T.div,{...r,ref:t}),i):null});tt.displayName=nu;function ru(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var z=e=>{const{present:t,children:n}=e,r=ou(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),a=D(r.ref,au(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:a}):null};z.displayName="Presence";function ou(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),[i,c]=ru(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Pt(r.current);a.current=i==="mounted"?u:"none"},[i]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const l=a.current,f=Pt(u);e?c("MOUNT"):f==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&l!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=v=>{const m=Pt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=v=>{v.target===t&&(a.current=Pt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Pt(e){return e?.animationName||"none"}function au(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var su=s[" useInsertionEffect ".trim().toString()]||Y;function Q({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=iu({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const l=d.current;l!==c&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,r])}return[u,s.useCallback(d=>{if(c){const l=cu(d)?d(e):d;l!==e&&i.current?.(l)}else a(d)},[c,e,a,i])]}function iu({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return su(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function cu(e){return typeof e=="function"}var Fo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),lu="VisuallyHidden",$o=s.forwardRef((e,t)=>(0,p.jsx)(T.span,{...e,ref:t,style:{...Fo,...e.style}}));$o.displayName=lu;var uu=$o,[en,Gv]=q("Tooltip",[Me]),tn=Me(),Bo="TooltipProvider",du=700,Fn="tooltip.open",[fu,or]=en(Bo),Wo=e=>{const{__scopeTooltip:t,delayDuration:n=du,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),(0,p.jsx)(fu,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:o,children:a})};Wo.displayName=Bo;var lt="Tooltip",[pu,gt]=en(lt),Ho=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=or(lt,e.__scopeTooltip),d=tn(t),[l,f]=s.useState(null),v=re(),m=s.useRef(0),x=i??u.disableHoverableContent,h=c??u.delayDuration,g=s.useRef(!1),[y,w]=Q({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(Fn))):u.onClose(),a?.(E)},caller:lt}),C=s.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,w(!0)},[w]),P=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),R=s.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},h)},[h,w]);return s.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,p.jsx)(ht,{...d,children:(0,p.jsx)(pu,{scope:t,contentId:v,open:y,stateAttribute:C,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?R():b()},[u.isOpenDelayedRef,R,b]),onTriggerLeave:s.useCallback(()=>{x?P():(window.clearTimeout(m.current),m.current=0)},[P,x]),onOpen:b,onClose:P,disableHoverableContent:x,children:n})})};Ho.displayName=lt;var $n="TooltipTrigger",Go=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gt($n,n),a=or($n,n),i=tn(n),c=s.useRef(null),u=D(t,c,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),(0,p.jsx)(mt,{asChild:!0,...i,children:(0,p.jsx)(T.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:S(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:S(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:S(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:S(e.onBlur,o.onClose),onClick:S(e.onClick,o.onClose)})})});Go.displayName=$n;var ar="TooltipPortal",[vu,hu]=en(ar,{forceMount:void 0}),Uo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=gt(ar,t);return(0,p.jsx)(vu,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};Uo.displayName=ar;var Xe="TooltipContent",Vo=s.forwardRef((e,t)=>{const n=hu(Xe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=gt(Xe,e.__scopeTooltip);return(0,p.jsx)(z,{present:r||i.open,children:i.disableHoverableContent?(0,p.jsx)(Ko,{side:o,...a,ref:t}):(0,p.jsx)(mu,{side:o,...a,ref:t})})}),mu=s.forwardRef((e,t)=>{const n=gt(Xe,e.__scopeTooltip),r=or(Xe,e.__scopeTooltip),o=s.useRef(null),a=D(t,o),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,l=o.current,{onPointerInTransitChange:f}=r,v=s.useCallback(()=>{c(null),f(!1)},[f]),m=s.useCallback((x,h)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},w=Cu(y,yu(y,g.getBoundingClientRect())),C=bu(h.getBoundingClientRect()),b=Eu([...w,...C]);c(b),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(u&&l){const x=g=>m(g,l),h=g=>m(g,u);return u.addEventListener("pointerleave",x),l.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",h)}}},[u,l,m,v]),s.useEffect(()=>{if(i){const x=h=>{const g=h.target,y={x:h.clientX,y:h.clientY},w=u?.contains(g)||l?.contains(g),C=!Su(y,i);w?v():C&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,l,i,d,v]),(0,p.jsx)(Ko,{...e,ref:a})}),[gu,xu]=en(lt,{isInside:!1}),wu=po("TooltipContent"),Ko=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=gt(Xe,n),d=tn(n),{onClose:l}=u;return s.useEffect(()=>(document.addEventListener(Fn,l),()=>document.removeEventListener(Fn,l)),[l]),s.useEffect(()=>{if(u.trigger){const f=v=>{v.target?.contains(u.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,l]),(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:(0,p.jsxs)(Qt,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(wu,{children:r}),(0,p.jsx)(gu,{scope:n,isInside:!0,children:(0,p.jsx)(uu,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Vo.displayName=Xe;var zo="TooltipArrow",Yo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tn(n);return xu(zo,n).isInside?null:(0,p.jsx)(Jt,{...o,...r,ref:t})});Yo.displayName=zo;function yu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Cu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function bu(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Su(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Eu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ru(t)}function Ru(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Uv=Wo,Vv=Ho,Kv=Go,zv=Uo,Yv=Vo,Xv=Yo,Pn="focusScope.autoFocusOnMount",_n="focusScope.autoFocusOnUnmount",Yr={bubbles:!1,cancelable:!0},Pu="FocusScope",xt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=K(o),l=K(a),f=s.useRef(null),v=D(t,h=>u(h)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let h=function(C){if(m.paused||!c)return;const b=C.target;c.contains(b)?f.current=b:Pe(f.current,{select:!0})},g=function(C){if(m.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||Pe(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const b of C)b.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),w.disconnect()}}},[r,c,m.paused]),s.useEffect(()=>{if(c){qr.add(m);const h=document.activeElement;if(!c.contains(h)){const g=new CustomEvent(Pn,Yr);c.addEventListener(Pn,d),c.dispatchEvent(g),g.defaultPrevented||(_u(Nu(Xo(c)),{select:!0}),document.activeElement===h&&Pe(c))}return()=>{c.removeEventListener(Pn,d),setTimeout(()=>{const g=new CustomEvent(_n,Yr);c.addEventListener(_n,l),c.dispatchEvent(g),g.defaultPrevented||Pe(h??document.body,{select:!0}),c.removeEventListener(_n,l),qr.remove(m)},0)}}},[c,d,l,m]);const x=s.useCallback(h=>{if(!n&&!r||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const w=h.currentTarget,[C,b]=Tu(w);C&&b?!h.shiftKey&&y===b?(h.preventDefault(),n&&Pe(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),n&&Pe(b,{select:!0})):y===w&&h.preventDefault()}},[n,r,m.paused]);return(0,p.jsx)(T.div,{tabIndex:-1,...i,ref:v,onKeyDown:x})});xt.displayName=Pu;function _u(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pe(r,{select:t}),document.activeElement!==n)return}function Tu(e){const t=Xo(e);return[Xr(t,e),Xr(t.reverse(),e)]}function Xo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xr(e,t){for(const n of e)if(!Au(n,{upTo:t}))return n}function Au(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mu(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mu(e)&&t&&e.select()}}var qr=Ou();function Ou(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Zr(e,t),e.unshift(t)},remove(t){e=Zr(e,t),e[0]?.resume()}}}function Zr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nu(e){return e.filter(t=>t.tagName!=="A")}var Tn=0;function nn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qr()),document.body.insertAdjacentElement("beforeend",e[1]??Qr()),Tn++,()=>{Tn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tn--}},[])}function Qr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},me.apply(this,arguments)};function qo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Iu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var It="right-scroll-bar-position",Dt="width-before-scroll-bar",Du="with-scroll-bars-hidden",ju="--removed-body-scroll-bar-size";function An(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lu(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ku=typeof window<"u"?s.useLayoutEffect:s.useEffect,Jr=new WeakMap;function Fu(e,t){var n=Lu(t||null,function(r){return e.forEach(function(o){return An(o,r)})});return ku(function(){var r=Jr.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(c){a.has(c)||An(c,null)}),a.forEach(function(c){o.has(c)||An(c,i)})}Jr.set(n,e)},[e]),n}function $u(e){return e}function Bu(e,t){t===void 0&&(t=$u);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(o),a=n}var c=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}}}function Wu(e){e===void 0&&(e={});var t=Bu(null);return t.options=me({async:!0,ssr:!1},e),t}var Zo=function(e){var t=e.sideCar,n=qo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,me({},n))};Zo.isSideCarExport=!0;function Hu(e,t){return e.useMedium(t),Zo}var Qo=Wu(),Mn=function(){},rn=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:Mn,onWheelCapture:Mn,onTouchMoveCapture:Mn}),o=r[0],a=r[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,l=e.enabled,f=e.shards,v=e.sideCar,m=e.noRelative,x=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,C=e.gapMode,b=qo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=v,R=Fu([n,t]),E=me(me({},b),o);return s.createElement(s.Fragment,null,l&&s.createElement(P,{sideCar:Qo,removeScrollBar:d,shards:f,noRelative:m,noIsolation:x,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),me(me({},E),{ref:R})):s.createElement(w,me({},E,{className:u,ref:R}),c))});rn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rn.classNames={fullWidth:Dt,zeroRight:It};var eo,Gu=function(){if(eo)return eo;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gu();return t&&e.setAttribute("nonce",t),e}function Vu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ku(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var zu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uu())&&(Vu(t,n),Ku(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yu=function(){var e=zu();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jo=function(){var e=Yu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xu={left:0,top:0,right:0,gap:0},On=function(e){return parseInt(e||"",10)||0},qu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[On(n),On(r),On(o)]},Zu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xu;var t=qu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qu=Jo(),it="data-scroll-locked",Ju=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(Du,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(it,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(a,`px;
|
|
12
|
-
padding-right: `).concat(i,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(It,` {
|
|
20
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(Dt,` {
|
|
24
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(It," .").concat(It,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(Dt," .").concat(Dt,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(it,`] {
|
|
36
|
-
`).concat(ju,": ").concat(c,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},to=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},ed=function(){s.useEffect(function(){return document.body.setAttribute(it,(to()+1).toString()),function(){var e=to()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},td=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ed();var a=s.useMemo(function(){return Zu(o)},[o]);return s.createElement(Qu,{styles:Ju(a,!t,o,n?"":"!important")})},Bn=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return Bn=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{Bn=!1}var Ge=Bn?{passive:!1}:!1,nd=function(e){return e.tagName==="TEXTAREA"},ea=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!nd(e)&&n[t]==="visible")},rd=function(e){return ea(e,"overflowY")},od=function(e){return ea(e,"overflowX")},no=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),ta(e,r)){var o=na(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ad=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},sd=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},ta=function(e,t){return e==="v"?rd(t):od(t)},na=function(e,t){return e==="v"?ad(t):sd(t)},id=function(e,t){return e==="h"&&t==="rtl"?-1:1},cd=function(e,t,n,r,o){var a=id(e,window.getComputedStyle(t).direction),i=a*r,c=n.target,u=t.contains(c),d=!1,l=i>0,f=0,v=0;do{if(!c)break;var m=na(e,c),x=m[0],h=m[1]-m[2]-a*x;(x||h)&&ta(e,c)&&(f+=h,v+=x);var g=c.parentNode;c=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(l&&(o&&Math.abs(f)<1||!o&&i>f)||!l&&(o&&Math.abs(v)<1||!o&&-i>v))&&(d=!0),d},Tt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ro=function(e){return[e.deltaX,e.deltaY]},oo=function(e){return e&&"current"in e?e.current:e},ld=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ud=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},dd=0,Ue=[];function fd(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(dd++)[0],a=s.useState(Jo)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Iu([e.lockRef.current],(e.shards||[]).map(oo),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=Tt(h),w=n.current,C="deltaX"in h?h.deltaX:w[0]-y[0],b="deltaY"in h?h.deltaY:w[1]-y[1],P,R=h.target,E=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in h&&E==="h"&&R.type==="range")return!1;var M=window.getSelection(),A=M&&M.anchorNode;if(A&&(A===R||A.contains(R)))return!1;var O=no(E,R);if(!O)return!0;if(O?P=E:(P=E==="v"?"h":"v",O=no(E,R)),!O)return!1;if(!r.current&&"changedTouches"in h&&(C||b)&&(r.current=P),!P)return!0;var j=r.current||P;return cd(j,g,h,j==="h"?C:b,!0)},[]),u=s.useCallback(function(h){var g=h;if(!(!Ue.length||Ue[Ue.length-1]!==a)){var y="deltaY"in g?ro(g):Tt(g),w=t.current.filter(function(b){return b.name===g.type&&(b.target===g.target||g.target===b.shadowParent)&&ld(b.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var C=(i.current.shards||[]).map(oo).filter(Boolean).filter(function(b){return b.contains(g.target)});(C.length>0?c(g,C[0]):!i.current.noIsolation)&&g.cancelable&&g.preventDefault()}}},[]),d=s.useCallback(function(h,g,y,w){var C={name:h,delta:g,target:y,should:w,shadowParent:pd(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),l=s.useCallback(function(h){n.current=Tt(h),r.current=void 0},[]),f=s.useCallback(function(h){d(h.type,ro(h),h.target,c(h,e.lockRef.current))},[]),v=s.useCallback(function(h){d(h.type,Tt(h),h.target,c(h,e.lockRef.current))},[]);s.useEffect(function(){return Ue.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ge),document.addEventListener("touchmove",u,Ge),document.addEventListener("touchstart",l,Ge),function(){Ue=Ue.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Ge),document.removeEventListener("touchmove",u,Ge),document.removeEventListener("touchstart",l,Ge)}},[]);var m=e.removeScrollBar,x=e.inert;return s.createElement(s.Fragment,null,x?s.createElement(a,{styles:ud(o)}):null,m?s.createElement(td,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vd=Hu(Qo,fd),wt=s.forwardRef(function(e,t){return s.createElement(rn,me({},e,{ref:t,sideCar:vd}))});wt.classNames=rn.classNames;var hd=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ve=new WeakMap,At=new WeakMap,Mt={},Nn=0,ra=function(e){return e&&(e.host||ra(e.parentNode))},md=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ra(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},gd=function(e,t,n,r){var o=md(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var a=Mt[n],i=[],c=new Set,u=new Set(o),d=function(f){!f||c.has(f)||(c.add(f),d(f.parentNode))};o.forEach(d);var l=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(v){if(c.has(v))l(v);else try{var m=v.getAttribute(r),x=m!==null&&m!=="false",h=(Ve.get(v)||0)+1,g=(a.get(v)||0)+1;Ve.set(v,h),a.set(v,g),i.push(v),h===1&&x&&At.set(v,!0),g===1&&v.setAttribute(n,"true"),x||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return l(t),c.clear(),Nn++,function(){i.forEach(function(f){var v=Ve.get(f)-1,m=a.get(f)-1;Ve.set(f,v),a.set(f,m),v||(At.has(f)||f.removeAttribute(r),At.delete(f)),m||f.removeAttribute(n)}),Nn--,Nn||(Ve=new WeakMap,Ve=new WeakMap,At=new WeakMap,Mt={})}},on=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||hd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),gd(r,o,n,"aria-hidden")):function(){return null}},an="Dialog",[oa,aa]=q(an),[xd,ve]=oa(an),sa=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,l]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:an});return(0,p.jsx)(xd,{scope:t,triggerRef:c,contentRef:u,contentId:re(),titleId:re(),descriptionId:re(),open:d,onOpenChange:l,onOpenToggle:s.useCallback(()=>l(f=>!f),[l]),modal:i,children:n})};sa.displayName=an;var ia="DialogTrigger",ca=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(ia,n),a=D(t,o.triggerRef);return(0,p.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cr(o.open),...r,ref:a,onClick:S(e.onClick,o.onOpenToggle)})});ca.displayName=ia;var sr="DialogPortal",[wd,la]=oa(sr,{forceMount:void 0}),ua=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ve(sr,t);return(0,p.jsx)(wd,{scope:t,forceMount:n,children:s.Children.map(r,i=>(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:i})}))})};ua.displayName=sr;var $t="DialogOverlay",da=s.forwardRef((e,t)=>{const n=la($t,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ve($t,e.__scopeDialog);return a.modal?(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(Cd,{...o,ref:t})}):null});da.displayName=$t;var yd=ke("DialogOverlay.RemoveScroll"),Cd=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve($t,n);return(0,p.jsx)(wt,{as:yd,allowPinchZoom:!0,shards:[o.contentRef],children:(0,p.jsx)(T.div,{"data-state":cr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),$e="DialogContent",fa=s.forwardRef((e,t)=>{const n=la($e,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ve($e,e.__scopeDialog);return(0,p.jsx)(z,{present:r||a.open,children:a.modal?(0,p.jsx)(bd,{...o,ref:t}):(0,p.jsx)(Sd,{...o,ref:t})})});fa.displayName=$e;var bd=s.forwardRef((e,t)=>{const n=ve($e,e.__scopeDialog),r=s.useRef(null),o=D(t,n.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return on(a)},[]),(0,p.jsx)(pa,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault())})}),Sd=s.forwardRef((e,t)=>{const n=ve($e,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return(0,p.jsx)(pa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),pa=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,c=ve($e,n),u=s.useRef(null),d=D(t,u);return nn(),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(xt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,p.jsx)(Qe,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":cr(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Rd,{titleId:c.titleId}),(0,p.jsx)(_d,{contentRef:u,descriptionId:c.descriptionId})]})]})}),ir="DialogTitle",va=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(ir,n);return(0,p.jsx)(T.h2,{id:o.titleId,...r,ref:t})});va.displayName=ir;var ha="DialogDescription",ma=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(ha,n);return(0,p.jsx)(T.p,{id:o.descriptionId,...r,ref:t})});ma.displayName=ha;var ga="DialogClose",xa=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(ga,n);return(0,p.jsx)(T.button,{type:"button",...r,ref:t,onClick:S(e.onClick,()=>o.onOpenChange(!1))})});xa.displayName=ga;function cr(e){return e?"open":"closed"}var wa="DialogTitleWarning",[Ed,ya]=Mc(wa,{contentName:$e,titleName:ir,docsSlug:"dialog"}),Rd=({titleId:e})=>{const t=ya(wa),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Pd="DialogDescriptionWarning",_d=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ya(Pd).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Td=sa,Ad=ca,Md=ua,Od=da,Nd=fa,Id=va,Dd=ma,Ca=xa,jd=Symbol.for("react.lazy"),Bt=s[" use ".trim().toString()];function Ld(e){return typeof e=="object"&&e!==null&&"then"in e}function ba(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===jd&&"_payload"in e&&Ld(e._payload)}function Sa(e){const t=kd(e),n=s.forwardRef((r,o)=>{let{children:a,...i}=r;ba(a)&&typeof Bt=="function"&&(a=Bt(a._payload));const c=s.Children.toArray(a),u=c.find($d);if(u){const d=u.props.children,l=c.map(f=>f===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:f);return(0,p.jsx)(t,{...i,ref:o,children:s.isValidElement(d)?s.cloneElement(d,void 0,l):null})}return(0,p.jsx)(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var qv=Sa("Slot");function kd(e){const t=s.forwardRef((n,r)=>{let{children:o,...a}=n;if(ba(o)&&typeof Bt=="function"&&(o=Bt(o._payload)),s.isValidElement(o)){const i=Wd(o),c=Bd(a,o.props);return o.type!==s.Fragment&&(c.ref=r?ft(r,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fd=Symbol("radix.slottable");function $d(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fd}function Bd(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Wd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ea=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Sa(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Hd="Label",Ra=s.forwardRef((e,t)=>(0,p.jsx)(Ea.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ra.displayName=Hd;var Zv=Ra;function Wn(e,[t,n]){return Math.min(n,Math.max(t,e))}function lr(e){const t=e+"CollectionProvider",[n,r]=q(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:y}=h,w=s.useRef(null),C=s.useRef(new Map).current;return(0,p.jsx)(o,{scope:g,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=ke(c),d=s.forwardRef((h,g)=>{const{scope:y,children:w}=h,C=a(c,y),b=D(g,C.collectionRef);return(0,p.jsx)(u,{ref:b,children:w})});d.displayName=c;const l=e+"CollectionItemSlot",f="data-radix-collection-item",v=ke(l),m=s.forwardRef((h,g)=>{const{scope:y,children:w,...C}=h,b=s.useRef(null),P=D(g,b),R=a(l,y);return s.useEffect(()=>(R.itemMap.set(b,{ref:b,...C}),()=>{R.itemMap.delete(b)})),(0,p.jsx)(v,{[f]:"",ref:P,children:w})});m.displayName=l;function x(h){const g=a(e+"CollectionConsumer",h);return s.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((C,b)=>w.indexOf(C.ref.current)-w.indexOf(b.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},x,r]}var Gd=s.createContext(void 0);function nt(e){const t=s.useContext(Gd);return e||t||"ltr"}function ur(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ud=[" ","Enter","ArrowUp","ArrowDown"],Vd=[" ","Enter"],Be="Select",[sn,cn,Kd]=lr(Be),[rt,Qv]=q(Be,[Kd,Me]),ln=Me(),[zd,Oe]=rt(Be),[Yd,Xd]=rt(Be),Pa=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:c,onValueChange:u,dir:d,name:l,autoComplete:f,disabled:v,required:m,form:x}=e,h=ln(t),[g,y]=s.useState(null),[w,C]=s.useState(null),[b,P]=s.useState(!1),R=nt(d),[E,M]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:Be}),[A,O]=Q({prop:i,defaultProp:c,onChange:u,caller:Be}),j=s.useRef(null),L=g?x||!!g.closest("form"):!0,[W,F]=s.useState(new Set),H=Array.from(W).map(k=>k.props.value).join(";");return(0,p.jsx)(ht,{...h,children:(0,p.jsxs)(zd,{required:m,scope:t,trigger:g,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:P,contentId:re(),value:A,onValueChange:O,open:E,onOpenChange:M,dir:R,triggerPointerDownPosRef:j,disabled:v,children:[(0,p.jsx)(sn.Provider,{scope:t,children:(0,p.jsx)(Yd,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(k=>{F($=>new Set($).add(k))},[]),onNativeOptionRemove:s.useCallback(k=>{F($=>{const I=new Set($);return I.delete(k),I})},[]),children:n})}),L?(0,p.jsxs)(Ya,{"aria-hidden":!0,required:m,tabIndex:-1,name:l,autoComplete:f,value:A,onChange:k=>O(k.target.value),disabled:v,form:x,children:[A===void 0?(0,p.jsx)("option",{value:""}):null,Array.from(W)]},H):null]})})};Pa.displayName=Be;var _a="SelectTrigger",Ta=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ln(n),i=Oe(_a,n),c=i.disabled||r,u=D(t,i.onTriggerChange),d=cn(n),l=s.useRef("touch"),[f,v,m]=qa(h=>{const g=d().filter(w=>!w.disabled),y=Za(g,h,g.find(w=>w.value===i.value));y!==void 0&&i.onValueChange(y.value)}),x=h=>{c||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return(0,p.jsx)(mt,{asChild:!0,...a,children:(0,p.jsx)(T.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Xa(i.value)?"":void 0,...o,ref:u,onClick:S(o.onClick,h=>{h.currentTarget.focus(),l.current!=="mouse"&&x(h)}),onPointerDown:S(o.onPointerDown,h=>{l.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:S(o.onKeyDown,h=>{const g=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&v(h.key),!(g&&h.key===" ")&&Ud.includes(h.key)&&(x(),h.preventDefault())})})})});Ta.displayName=_a;var Aa="SelectValue",Ma=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...c}=e,u=Oe(Aa,n),{onValueNodeHasChildrenChange:d}=u,l=a!==void 0,f=D(t,u.onValueNodeChange);return Y(()=>{d(l)},[d,l]),(0,p.jsx)(T.span,{...c,ref:f,style:{pointerEvents:"none"},children:Xa(u.value)?(0,p.jsx)(p.Fragment,{children:i}):a})});Ma.displayName=Aa;var qd="SelectIcon",Oa=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,p.jsx)(T.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Oa.displayName=qd;var Zd="SelectPortal",Na=e=>(0,p.jsx)(tt,{asChild:!0,...e});Na.displayName=Zd;var We="SelectContent",Ia=s.forwardRef((e,t)=>{const n=Oe(We,e.__scopeSelect),[r,o]=s.useState();if(Y(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?pt.createPortal((0,p.jsx)(Da,{scope:e.__scopeSelect,children:(0,p.jsx)(sn.Slot,{scope:e.__scopeSelect,children:(0,p.jsx)("div",{children:e.children})})}),a):null}return(0,p.jsx)(ja,{...e,ref:t})});Ia.displayName=We;var de=10,[Da,Ne]=rt(We),Qd="SelectContentImpl",Jd=ke("SelectContent.RemoveScroll"),ja=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:l,arrowPadding:f,collisionBoundary:v,collisionPadding:m,sticky:x,hideWhenDetached:h,avoidCollisions:g,...y}=e,w=Oe(We,n),[C,b]=s.useState(null),[P,R]=s.useState(null),E=D(t,N=>b(N)),[M,A]=s.useState(null),[O,j]=s.useState(null),L=cn(n),[W,F]=s.useState(!1),H=s.useRef(!1);s.useEffect(()=>{if(C)return on(C)},[C]),nn();const k=s.useCallback(N=>{const[V,...G]=L().map(ne=>ne.ref.current),[B]=G.slice(-1),Z=document.activeElement;for(const ne of N)if(ne===Z||(ne?.scrollIntoView({block:"nearest"}),ne===V&&P&&(P.scrollTop=0),ne===B&&P&&(P.scrollTop=P.scrollHeight),ne?.focus(),document.activeElement!==Z))return},[L,P]),$=s.useCallback(()=>k([M,C]),[k,M,C]);s.useEffect(()=>{W&&$()},[W,$]);const{onOpenChange:I,triggerPointerDownPosRef:_}=w;s.useEffect(()=>{if(C){let N={x:0,y:0};const V=B=>{N={x:Math.abs(Math.round(B.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(B.pageY)-(_.current?.y??0))}},G=B=>{N.x<=10&&N.y<=10?B.preventDefault():C.contains(B.target)||I(!1),document.removeEventListener("pointermove",V),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",G,{capture:!0})}}},[C,I,_]),s.useEffect(()=>{const N=()=>I(!1);return window.addEventListener("blur",N),window.addEventListener("resize",N),()=>{window.removeEventListener("blur",N),window.removeEventListener("resize",N)}},[I]);const[U,te]=qa(N=>{const V=L().filter(B=>!B.disabled),G=Za(V,N,V.find(B=>B.ref.current===document.activeElement));G&&setTimeout(()=>G.ref.current.focus())}),ue=s.useCallback((N,V,G)=>{const B=!H.current&&!G;(w.value!==void 0&&w.value===V||B)&&(A(N),B&&(H.current=!0))},[w.value]),Ce=s.useCallback(()=>C?.focus(),[C]),oe=s.useCallback((N,V,G)=>{const B=!H.current&&!G;(w.value!==void 0&&w.value===V||B)&&j(N)},[w.value]),ae=r==="popper"?Hn:La,X=ae===Hn?{side:c,sideOffset:u,align:d,alignOffset:l,arrowPadding:f,collisionBoundary:v,collisionPadding:m,sticky:x,hideWhenDetached:h,avoidCollisions:g}:{};return(0,p.jsx)(Da,{scope:n,content:C,viewport:P,onViewportChange:R,itemRefCallback:ue,selectedItem:M,onItemLeave:Ce,itemTextRefCallback:oe,focusSelectedItem:$,selectedItemText:O,position:r,isPositioned:W,searchRef:U,children:(0,p.jsx)(wt,{as:Jd,allowPinchZoom:!0,children:(0,p.jsx)(xt,{asChild:!0,trapped:w.open,onMountAutoFocus:N=>{N.preventDefault()},onUnmountAutoFocus:S(o,N=>{w.trigger?.focus({preventScroll:!0}),N.preventDefault()}),children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:N=>N.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,p.jsx)(ae,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:N=>N.preventDefault(),...y,...X,onPlaced:()=>F(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:S(y.onKeyDown,N=>{const V=N.ctrlKey||N.altKey||N.metaKey;if(N.key==="Tab"&&N.preventDefault(),!V&&N.key.length===1&&te(N.key),["ArrowUp","ArrowDown","Home","End"].includes(N.key)){let G=L().filter(B=>!B.disabled).map(B=>B.ref.current);if(["ArrowUp","End"].includes(N.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(N.key)){const B=N.target,Z=G.indexOf(B);G=G.slice(Z+1)}setTimeout(()=>k(G)),N.preventDefault()}})})})})})})});ja.displayName=Qd;var ef="SelectItemAlignedPosition",La=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Oe(We,n),i=Ne(We,n),[c,u]=s.useState(null),[d,l]=s.useState(null),f=D(t,E=>l(E)),v=cn(n),m=s.useRef(!1),x=s.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:y,focusSelectedItem:w}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&h&&g&&y){const E=a.trigger.getBoundingClientRect(),M=d.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(a.dir!=="rtl"){const B=O.left-M.left,Z=A.left-B,ne=E.left-Z,he=E.width+ne,yn=Math.max(he,M.width),Cn=window.innerWidth-de,bn=Wn(Z,[de,Math.max(de,Cn-yn)]);c.style.minWidth=he+"px",c.style.left=bn+"px"}else{const B=M.right-O.right,Z=window.innerWidth-A.right-B,ne=window.innerWidth-E.right-Z,he=E.width+ne,yn=Math.max(he,M.width),Cn=window.innerWidth-de,bn=Wn(Z,[de,Math.max(de,Cn-yn)]);c.style.minWidth=he+"px",c.style.right=bn+"px"}const j=v(),L=window.innerHeight-de*2,W=h.scrollHeight,F=window.getComputedStyle(d),H=parseInt(F.borderTopWidth,10),k=parseInt(F.paddingTop,10),$=parseInt(F.borderBottomWidth,10),I=parseInt(F.paddingBottom,10),_=H+k+W+I+$,U=Math.min(g.offsetHeight*5,_),te=window.getComputedStyle(h),ue=parseInt(te.paddingTop,10),Ce=parseInt(te.paddingBottom,10),oe=E.top+E.height/2-de,ae=L-oe,X=g.offsetHeight/2,N=g.offsetTop+X,V=H+k+N,G=_-V;if(V<=oe){const B=j.length>0&&g===j[j.length-1].ref.current;c.style.bottom="0px";const Z=d.clientHeight-h.offsetTop-h.offsetHeight,ne=V+Math.max(ae,X+(B?Ce:0)+Z+$);c.style.height=ne+"px"}else{const B=j.length>0&&g===j[0].ref.current;c.style.top="0px";const Z=Math.max(oe,H+h.offsetTop+(B?ue:0)+X)+G;c.style.height=Z+"px",h.scrollTop=V-oe+h.offsetTop}c.style.margin=`${de}px 0`,c.style.minHeight=U+"px",c.style.maxHeight=L+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[v,a.trigger,a.valueNode,c,d,h,g,y,a.dir,r]);Y(()=>C(),[C]);const[b,P]=s.useState();Y(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const R=s.useCallback(E=>{E&&x.current===!0&&(C(),w?.(),x.current=!1)},[C,w]);return(0,p.jsx)(nf,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:(0,p.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:(0,p.jsx)(T.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});La.displayName=ef;var tf="SelectPopperPosition",Hn=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=de,...a}=e,i=ln(n);return(0,p.jsx)(Qt,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Hn.displayName=tf;var[nf,dr]=rt(We,{}),Gn="SelectViewport",ka=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ne(Gn,n),i=dr(Gn,n),c=D(t,a.onViewportChange),u=s.useRef(0);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,p.jsx)(sn.Slot,{scope:n,children:(0,p.jsx)(T.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:S(o.onScroll,d=>{const l=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:v}=i;if(v?.current&&f){const m=Math.abs(u.current-l.scrollTop);if(m>0){const x=window.innerHeight-de*2,h=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(h,g);if(y<x){const w=y+m,C=Math.min(x,w),b=w-C;f.style.height=C+"px",f.style.bottom==="0px"&&(l.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}u.current=l.scrollTop})})})]})});ka.displayName=Gn;var Fa="SelectGroup",[rf,of]=rt(Fa),af=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=re();return(0,p.jsx)(rf,{scope:n,id:o,children:(0,p.jsx)(T.div,{role:"group","aria-labelledby":o,...r,ref:t})})});af.displayName=Fa;var $a="SelectLabel",sf=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=of($a,n);return(0,p.jsx)(T.div,{id:o.id,...r,ref:t})});sf.displayName=$a;var Wt="SelectItem",[cf,Ba]=rt(Wt),Wa=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,c=Oe(Wt,n),u=Ne(Wt,n),d=c.value===r,[l,f]=s.useState(a??""),[v,m]=s.useState(!1),x=D(t,w=>u.itemRefCallback?.(w,r,o)),h=re(),g=s.useRef("touch"),y=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,p.jsx)(cf,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:s.useCallback(w=>{f(C=>C||(w?.textContent??"").trim())},[]),children:(0,p.jsx)(sn.ItemSlot,{scope:n,value:r,disabled:o,textValue:l,children:(0,p.jsx)(T.div,{role:"option","aria-labelledby":h,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:S(i.onFocus,()=>m(!0)),onBlur:S(i.onBlur,()=>m(!1)),onClick:S(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:S(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:S(i.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:S(i.onPointerMove,w=>{g.current=w.pointerType,o?u.onItemLeave?.():g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:S(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:S(i.onKeyDown,w=>{u.searchRef?.current!==""&&w.key===" "||(Vd.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Wa.displayName=Wt;var at="SelectItemText",Ha=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Oe(at,n),c=Ne(at,n),u=Ba(at,n),d=Xd(at,n),[l,f]=s.useState(null),v=D(t,y=>f(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),m=l?.textContent,x=s.useMemo(()=>(0,p.jsx)("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=d;return Y(()=>(h(x),()=>g(x)),[h,g,x]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T.span,{id:u.textId,...a,ref:v}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(a.children,i.valueNode):null]})});Ha.displayName=at;var Ga="SelectItemIndicator",Ua=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ba(Ga,n).isSelected?(0,p.jsx)(T.span,{"aria-hidden":!0,...r,ref:t}):null});Ua.displayName=Ga;var Un="SelectScrollUpButton",Va=s.forwardRef((e,t)=>{const n=Ne(Un,e.__scopeSelect),r=dr(Un,e.__scopeSelect),[o,a]=s.useState(!1),i=D(t,r.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?(0,p.jsx)(za,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});Va.displayName=Un;var Vn="SelectScrollDownButton",Ka=s.forwardRef((e,t)=>{const n=Ne(Vn,e.__scopeSelect),r=dr(Vn,e.__scopeSelect),[o,a]=s.useState(!1),i=D(t,r.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,l=Math.ceil(u.scrollTop)<d;a(l)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?(0,p.jsx)(za,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Ka.displayName=Vn;var za=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ne("SelectScrollButton",n),i=s.useRef(null),c=cn(n),u=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),Y(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,p.jsx)(T.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:S(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:S(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:S(o.onPointerLeave,()=>{u()})})}),lf="SelectSeparator",uf=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,p.jsx)(T.div,{"aria-hidden":!0,...r,ref:t})});uf.displayName=lf;var Kn="SelectArrow",df=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ln(n),a=Oe(Kn,n),i=Ne(Kn,n);return a.open&&i.position==="popper"?(0,p.jsx)(Jt,{...o,...r,ref:t}):null});df.displayName=Kn;var ff="SelectBubbleInput",Ya=s.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=s.useRef(null),a=D(r,o),i=ur(t);return s.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&d){const l=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(l)}},[i,t]),(0,p.jsx)(T.select,{...n,style:{...Fo,...n.style},ref:a,defaultValue:t})});Ya.displayName=ff;function Xa(e){return e===""||e===void 0}function qa(e){const t=K(e),n=s.useRef(""),r=s.useRef(0),o=s.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Za(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=pf(e,Math.max(o,0));r.length===1&&(a=a.filter(c=>c!==n));const i=a.find(c=>c.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function pf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Jv=Pa,eh=Ta,th=Ma,nh=Oa,rh=Na,oh=Ia,ah=ka,sh=Wa,ih=Ha,ch=Ua,lh=Va,uh=Ka,Qa="AlertDialog",[vf,dh]=q(Qa,[aa]),Re=aa(),Ja=e=>{const{__scopeAlertDialog:t,...n}=e,r=Re(t);return(0,p.jsx)(Td,{...r,...n,modal:!0})};Ja.displayName=Qa;var hf="AlertDialogTrigger",mf=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(Ad,{...o,...r,ref:t})});mf.displayName=hf;var gf="AlertDialogPortal",es=e=>{const{__scopeAlertDialog:t,...n}=e,r=Re(t);return(0,p.jsx)(Md,{...r,...n})};es.displayName=gf;var xf="AlertDialogOverlay",ts=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(Od,{...o,...r,ref:t})});ts.displayName=xf;var ze="AlertDialogContent",[wf,yf]=vf(ze),Cf=po("AlertDialogContent"),ns=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=Re(n),i=s.useRef(null),c=D(t,i),u=s.useRef(null);return(0,p.jsx)(Ed,{contentName:ze,titleName:rs,docsSlug:"alert-dialog",children:(0,p.jsx)(wf,{scope:n,cancelRef:u,children:(0,p.jsxs)(Nd,{role:"alertdialog",...a,...o,ref:c,onOpenAutoFocus:S(o.onOpenAutoFocus,d=>{d.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[(0,p.jsx)(Cf,{children:r}),(0,p.jsx)(Sf,{contentRef:i})]})})})});ns.displayName=ze;var rs="AlertDialogTitle",os=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(Id,{...o,...r,ref:t})});os.displayName=rs;var as="AlertDialogDescription",ss=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(Dd,{...o,...r,ref:t})});ss.displayName=as;var bf="AlertDialogAction",is=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(Ca,{...o,...r,ref:t})});is.displayName=bf;var cs="AlertDialogCancel",ls=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=yf(cs,n),a=Re(n),i=D(t,o);return(0,p.jsx)(Ca,{...a,...r,ref:i})});ls.displayName=cs;var Sf=({contentRef:e})=>{const t=`\`${ze}\` requires a description for the component to be accessible for screen reader users.
|
|
46
|
-
|
|
47
|
-
You can add a description to the \`${ze}\` by passing a \`${as}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
48
|
-
|
|
49
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ze}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
|
-
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},fh=Ja,ph=es,vh=ts,hh=ns,mh=is,gh=ls,xh=os,wh=ss,un="Popover",[us,yh]=q(un,[Me]),yt=Me(),[Ef,Ie]=us(un),ds=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=yt(t),u=s.useRef(null),[d,l]=s.useState(!1),[f,v]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:un});return(0,p.jsx)(ht,{...c,children:(0,p.jsx)(Ef,{scope:t,contentId:re(),triggerRef:u,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>l(!0),[]),onCustomAnchorRemove:s.useCallback(()=>l(!1),[]),modal:i,children:n})})};ds.displayName=un;var fs="PopoverAnchor",ps=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(fs,n),a=yt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return s.useEffect(()=>(i(),()=>c()),[i,c]),(0,p.jsx)(mt,{...a,...r,ref:t})});ps.displayName=fs;var vs="PopoverTrigger",hs=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(vs,n),a=yt(n),i=D(t,o.triggerRef),c=(0,p.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ys(o.open),...r,ref:i,onClick:S(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:(0,p.jsx)(mt,{asChild:!0,...a,children:c})});hs.displayName=vs;var fr="PopoverPortal",[Rf,Pf]=us(fr,{forceMount:void 0}),ms=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ie(fr,t);return(0,p.jsx)(Rf,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};ms.displayName=fr;var qe="PopoverContent",gs=s.forwardRef((e,t)=>{const n=Pf(qe,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ie(qe,e.__scopePopover);return(0,p.jsx)(z,{present:r||a.open,children:a.modal?(0,p.jsx)(Tf,{...o,ref:t}):(0,p.jsx)(Af,{...o,ref:t})})});gs.displayName=qe;var _f=ke("PopoverContent.RemoveScroll"),Tf=s.forwardRef((e,t)=>{const n=Ie(qe,e.__scopePopover),r=s.useRef(null),o=D(t,r),a=s.useRef(!1);return s.useEffect(()=>{const i=r.current;if(i)return on(i)},[]),(0,p.jsx)(wt,{as:_f,allowPinchZoom:!0,children:(0,p.jsx)(xs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Af=s.forwardRef((e,t)=>{const n=Ie(qe,e.__scopePopover),r=s.useRef(!1),o=s.useRef(!1);return(0,p.jsx)(xs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),xs=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:l,...f}=e,v=Ie(qe,n),m=yt(n);return nn(),(0,p.jsx)(xt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:(0,p.jsx)(Qt,{"data-state":ys(v.open),role:"dialog",id:v.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ws="PopoverClose",Mf=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(ws,n);return(0,p.jsx)(T.button,{type:"button",...r,ref:t,onClick:S(e.onClick,()=>o.onOpenChange(!1))})});Mf.displayName=ws;var Of="PopoverArrow",Nf=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(n);return(0,p.jsx)(Jt,{...o,...r,ref:t})});Nf.displayName=Of;function ys(e){return e?"open":"closed"}var Ch=ds,bh=ps,Sh=hs,Eh=ms,Rh=gs,dn="Checkbox",[If,Ph]=q(dn),[Df,pr]=If(dn);function jf(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:l="on",internal_do_not_use_render:f}=e,[v,m]=Q({prop:n,defaultProp:o??!1,onChange:u,caller:dn}),[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useRef(!1),C=x?!!i||!!x.closest("form"):!0,b={checked:v,disabled:a,setChecked:m,control:x,setControl:h,name:c,form:i,value:l,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:_e(o)?!1:o,isFormControl:C,bubbleInput:g,setBubbleInput:y};return(0,p.jsx)(Df,{scope:t,...b,children:Ff(f)?f(b):r})}var Cs="CheckboxTrigger",bs=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:x}=pr(Cs,e),h=D(o,l),g=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const w=()=>f(g.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,f]),(0,p.jsx)(T.button,{type:"button",role:"checkbox","aria-checked":_e(u)?"mixed":u,"aria-required":d,"data-state":Ps(u),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:h,onKeyDown:S(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:S(n,y=>{f(w=>_e(w)?!0:!w),x&&m&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})})});bs.displayName=Cs;var Lf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:l,...f}=e;return(0,p.jsx)(jf,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:r,form:l,value:u,internal_do_not_use_render:({isFormControl:v})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(bs,{...f,ref:t,__scopeCheckbox:n}),v&&(0,p.jsx)(Rs,{__scopeCheckbox:n})]})})});Lf.displayName=dn;var Ss="CheckboxIndicator",kf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=pr(Ss,n);return(0,p.jsx)(z,{present:r||_e(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{"data-state":Ps(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});kf.displayName=Ss;var Es="CheckboxBubbleInput",Rs=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:l,form:f,bubbleInput:v,setBubbleInput:m}=pr(Es,e),x=D(n,m),h=ur(a),g=tr(r);s.useEffect(()=>{const w=v;if(!w)return;const C=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(C,"checked").set,P=!o.current;if(h!==a&&b){const R=new Event("click",{bubbles:P});w.indeterminate=_e(a),b.call(w,_e(a)?!1:a),w.dispatchEvent(R)}},[v,h,a,o]);const y=s.useRef(_e(a)?!1:a);return(0,p.jsx)(T.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:l,form:f,...t,tabIndex:-1,ref:x,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Rs.displayName=Es;function Ff(e){return typeof e=="function"}function _e(e){return e==="indeterminate"}function Ps(e){return _e(e)?"indeterminate":e?"checked":"unchecked"}var In="rovingFocusGroup.onEntryFocus",$f={bubbles:!1,cancelable:!0},Ct="RovingFocusGroup",[zn,_s,Bf]=lr(Ct),[Wf,ot]=q(Ct,[Bf]),[Hf,Gf]=Wf(Ct),Ts=s.forwardRef((e,t)=>(0,p.jsx)(zn.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(zn.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(Uf,{...e,ref:t})})}));Ts.displayName=Ct;var Uf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:l=!1,...f}=e,v=s.useRef(null),m=D(t,v),x=nt(a),[h,g]=Q({prop:i,defaultProp:c??null,onChange:u,caller:Ct}),[y,w]=s.useState(!1),C=K(d),b=_s(n),P=s.useRef(!1),[R,E]=s.useState(0);return s.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(In,C),()=>M.removeEventListener(In,C)},[C]),(0,p.jsx)(Hf,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(M=>g(M),[g]),onItemShiftTab:s.useCallback(()=>w(!0),[]),onFocusableItemAdd:s.useCallback(()=>E(M=>M+1),[]),onFocusableItemRemove:s.useCallback(()=>E(M=>M-1),[]),children:(0,p.jsx)(T.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{P.current=!0}),onFocus:S(e.onFocus,M=>{const A=!P.current;if(M.target===M.currentTarget&&A&&!y){const O=new CustomEvent(In,$f);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const j=b().filter(L=>L.focusable);Os([j.find(L=>L.active),j.find(L=>L.id===h),...j].filter(Boolean).map(L=>L.ref.current),l)}}P.current=!1}),onBlur:S(e.onBlur,()=>w(!1))})})}),As="RovingFocusGroupItem",Ms=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...c}=e,u=re(),d=a||u,l=Gf(As,n),f=l.currentTabStopId===d,v=_s(n),{onFocusableItemAdd:m,onFocusableItemRemove:x,currentTabStopId:h}=l;return s.useEffect(()=>{if(r)return m(),()=>x()},[r,m,x]),(0,p.jsx)(zn.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:(0,p.jsx)(T.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,g=>{r?l.onItemFocus(d):g.preventDefault()}),onFocus:S(e.onFocus,()=>l.onItemFocus(d)),onKeyDown:S(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=zf(g,l.orientation,l.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(g.currentTarget);w=l.loop?Yf(w,C+1):w.slice(C+1)}setTimeout(()=>Os(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});Ms.displayName=As;var Vf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zf(e,t,n){const r=Kf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vf[r]}function Os(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Yf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vr=Ts,hr=Ms,Yn=["Enter"," "],Xf=["ArrowDown","PageUp","Home"],Ns=["ArrowUp","PageDown","End"],qf=[...Xf,...Ns],Zf={ltr:[...Yn,"ArrowRight"],rtl:[...Yn,"ArrowLeft"]},Qf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[ut,Jf,ep]=lr(bt),[He,fn]=q(bt,[ep,Me,ot]),St=Me(),Is=ot(),[Ds,De]=He(bt),[tp,Et]=He(bt),js=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,c=St(t),[u,d]=s.useState(null),l=s.useRef(!1),f=K(a),v=nt(o);return s.useEffect(()=>{const m=()=>{l.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>l.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),(0,p.jsx)(ht,{...c,children:(0,p.jsx)(Ds,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:(0,p.jsx)(tp,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:l,dir:v,modal:i,children:r})})})};js.displayName=bt;var np="MenuAnchor",mr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(mt,{...o,...r,ref:t})});mr.displayName=np;var gr="MenuPortal",[rp,Ls]=He(gr,{forceMount:void 0}),ks=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=De(gr,t);return(0,p.jsx)(rp,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(tt,{asChild:!0,container:o,children:r})})})};ks.displayName=gr;var ce="MenuContent",[op,xr]=He(ce),Fs=s.forwardRef((e,t)=>{const n=Ls(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:i.modal?(0,p.jsx)(ap,{...o,ref:t}):(0,p.jsx)(sp,{...o,ref:t})})})})}),ap=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return on(a)},[]),(0,p.jsx)(wr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),sp=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu);return(0,p.jsx)(wr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ip=ke("MenuContent.ScrollLock"),wr=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,disableOutsideScroll:x,...h}=e,g=De(ce,n),y=Et(ce,n),w=St(n),C=Is(n),b=Jf(n),[P,R]=s.useState(null),E=s.useRef(null),M=D(t,E,g.onContentChange),A=s.useRef(0),O=s.useRef(""),j=s.useRef(0),L=s.useRef(null),W=s.useRef("right"),F=s.useRef(0),H=x?wt:s.Fragment,k=x?{as:ip,allowPinchZoom:!0}:void 0,$=_=>{const U=O.current+_,te=b().filter(X=>!X.disabled),ue=document.activeElement,Ce=te.find(X=>X.ref.current===ue)?.textValue,oe=wp(te.map(X=>X.textValue),U,Ce),ae=te.find(X=>X.textValue===oe)?.ref.current;(function X(N){O.current=N,window.clearTimeout(A.current),N!==""&&(A.current=window.setTimeout(()=>X(""),1e3))})(U),ae&&setTimeout(()=>ae.focus())};s.useEffect(()=>()=>window.clearTimeout(A.current),[]),nn();const I=s.useCallback(_=>W.current===L.current?.side&&Cp(_,L.current?.area),[]);return(0,p.jsx)(op,{scope:n,searchRef:O,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(E.current?.focus(),R(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:j,onPointerGraceIntentChange:s.useCallback(_=>{L.current=_},[]),children:(0,p.jsx)(H,{...k,children:(0,p.jsx)(xt,{asChild:!0,trapped:o,onMountAutoFocus:S(a,_=>{_.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,children:(0,p.jsx)(vr,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:R,onEntryFocus:S(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,p.jsx)(Qt,{role:"menu","aria-orientation":"vertical","data-state":ti(g.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,_=>{const U=_.target.closest("[data-radix-menu-content]")===_.currentTarget,te=_.ctrlKey||_.altKey||_.metaKey,ue=_.key.length===1;U&&(_.key==="Tab"&&_.preventDefault(),!te&&ue&&$(_.key));const Ce=E.current;if(_.target!==Ce||!qf.includes(_.key))return;_.preventDefault();const oe=b().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Ns.includes(_.key)&&oe.reverse(),gp(oe)}),onBlur:S(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:S(e.onPointerMove,dt(_=>{const U=_.target,te=F.current!==_.clientX;if(_.currentTarget.contains(U)&&te){const ue=_.clientX>F.current?"right":"left";W.current=ue,F.current=_.clientX}}))})})})})})})});Fs.displayName=ce;var cp="MenuGroup",yr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"group",...r,ref:t})});yr.displayName=cp;var lp="MenuLabel",$s=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{...r,ref:t})});$s.displayName=lp;var Ht="MenuItem",ao="menu.itemSelect",pn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=s.useRef(null),i=Et(Ht,e.__scopeMenu),c=xr(Ht,e.__scopeMenu),u=D(t,a),d=s.useRef(!1),l=()=>{const f=a.current;if(!n&&f){const v=new CustomEvent(ao,{bubbles:!0,cancelable:!0});f.addEventListener(ao,m=>r?.(m),{once:!0}),vo(f,v),v.defaultPrevented?d.current=!1:i.onClose()}};return(0,p.jsx)(Bs,{...o,ref:u,disabled:n,onClick:S(e.onClick,l),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:S(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,f=>{const v=c.searchRef.current!=="";n||v&&f.key===" "||Yn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});pn.displayName=Ht;var Bs=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=xr(Ht,n),c=Is(n),u=s.useRef(null),d=D(t,u),[l,f]=s.useState(!1),[v,m]=s.useState("");return s.useEffect(()=>{const x=u.current;x&&m((x.textContent??"").trim())},[a.children]),(0,p.jsx)(ut.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:(0,p.jsx)(hr,{asChild:!0,...c,focusable:!r,children:(0,p.jsx)(T.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:S(e.onPointerMove,dt(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,dt(x=>i.onItemLeave(x))),onFocus:S(e.onFocus,()=>f(!0)),onBlur:S(e.onBlur,()=>f(!1))})})})}),up="MenuCheckboxItem",Ws=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,p.jsx)(Ks,{scope:e.__scopeMenu,checked:n,children:(0,p.jsx)(pn,{role:"menuitemcheckbox","aria-checked":Gt(n)?"mixed":n,...o,ref:t,"data-state":Sr(n),onSelect:S(o.onSelect,()=>r?.(Gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ws.displayName=up;var Hs="MenuRadioGroup",[dp,fp]=He(Hs,{value:void 0,onValueChange:()=>{}}),Gs=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=K(r);return(0,p.jsx)(dp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,p.jsx)(yr,{...o,ref:t})})});Gs.displayName=Hs;var Us="MenuRadioItem",Vs=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=fp(Us,e.__scopeMenu),a=n===o.value;return(0,p.jsx)(Ks,{scope:e.__scopeMenu,checked:a,children:(0,p.jsx)(pn,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Sr(a),onSelect:S(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Vs.displayName=Us;var Cr="MenuItemIndicator",[Ks,pp]=He(Cr,{checked:!1}),zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=pp(Cr,n);return(0,p.jsx)(z,{present:r||Gt(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{...o,ref:t,"data-state":Sr(a.checked)})})});zs.displayName=Cr;var vp="MenuSeparator",Ys=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ys.displayName=vp;var hp="MenuArrow",Xs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(Jt,{...o,...r,ref:t})});Xs.displayName=hp;var br="MenuSub",[mp,qs]=He(br),Zs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=De(br,t),i=St(t),[c,u]=s.useState(null),[d,l]=s.useState(null),f=K(o);return s.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,p.jsx)(ht,{...i,children:(0,p.jsx)(Ds,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:l,children:(0,p.jsx)(mp,{scope:t,contentId:re(),triggerId:re(),trigger:c,onTriggerChange:u,children:n})})})};Zs.displayName=br;var st="MenuSubTrigger",Qs=s.forwardRef((e,t)=>{const n=De(st,e.__scopeMenu),r=Et(st,e.__scopeMenu),o=qs(st,e.__scopeMenu),a=xr(st,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},l=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>l,[l]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),(0,p.jsx)(mr,{asChild:!0,...d,children:(0,p.jsx)(Bs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ti(n.open),...e,ref:ft(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,dt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:S(e.onPointerLeave,dt(f=>{l();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,x=m==="right",h=x?-5:5,g=v[x?"left":"right"],y=v[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+h,y:f.clientY},{x:g,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:g,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,f=>{const v=a.searchRef.current!=="";e.disabled||v&&f.key===" "||Zf[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Qs.displayName=st;var Js="MenuSubContent",ei=s.forwardRef((e,t)=>{const n=Ls(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu),c=qs(Js,e.__scopeMenu),u=s.useRef(null),d=D(t,u);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:(0,p.jsx)(wr,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{i.isUsingKeyboardRef.current&&u.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:S(e.onFocusOutside,l=>{l.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,l=>{i.onClose(),l.preventDefault()}),onKeyDown:S(e.onKeyDown,l=>{const f=l.currentTarget.contains(l.target),v=Qf[i.dir].includes(l.key);f&&v&&(a.onOpenChange(!1),c.trigger?.focus(),l.preventDefault())})})})})})});ei.displayName=Js;function ti(e){return e?"open":"closed"}function Gt(e){return e==="indeterminate"}function Sr(e){return Gt(e)?"indeterminate":e?"checked":"unchecked"}function gp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wp(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=xp(e,Math.max(o,0));r.length===1&&(a=a.filter(c=>c!==n));const i=a.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function yp(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Cp(e,t){return t?yp({x:e.clientX,y:e.clientY},t):!1}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ni=js,ri=mr,oi=ks,ai=Fs,si=yr,ii=$s,ci=pn,li=Ws,ui=Gs,di=Vs,fi=zs,pi=Ys,vi=Xs,hi=Zs,mi=Qs,gi=ei,vn="DropdownMenu",[bp,_h]=q(vn,[fn]),J=fn(),[Sp,xi]=bp(vn),wi=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=J(t),d=s.useRef(null),[l,f]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:vn});return(0,p.jsx)(Sp,{scope:t,triggerId:re(),triggerRef:d,contentId:re(),open:l,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:c,children:(0,p.jsx)(ni,{...u,open:l,onOpenChange:f,dir:r,modal:c,children:n})})};wi.displayName=vn;var yi="DropdownMenuTrigger",Ci=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=xi(yi,n),i=J(n);return(0,p.jsx)(ri,{asChild:!0,...i,children:(0,p.jsx)(T.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ft(t,a.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ci.displayName=yi;var Ep="DropdownMenuPortal",bi=e=>{const{__scopeDropdownMenu:t,...n}=e,r=J(t);return(0,p.jsx)(oi,{...r,...n})};bi.displayName=Ep;var Si="DropdownMenuContent",Ei=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xi(Si,n),a=J(n),i=s.useRef(!1);return(0,p.jsx)(ai,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,l=u.button===2||d;(!o.modal||l)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ei.displayName=Si;var Rp="DropdownMenuGroup",Ri=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(si,{...o,...r,ref:t})});Ri.displayName=Rp;var Pp="DropdownMenuLabel",_p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});_p.displayName=Pp;var Tp="DropdownMenuItem",Pi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});Pi.displayName=Tp;var Ap="DropdownMenuCheckboxItem",_i=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(li,{...o,...r,ref:t})});_i.displayName=Ap;var Mp="DropdownMenuRadioGroup",Op=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});Op.displayName=Mp;var Np="DropdownMenuRadioItem",Ip=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(di,{...o,...r,ref:t})});Ip.displayName=Np;var Dp="DropdownMenuItemIndicator",Ti=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Ti.displayName=Dp;var jp="DropdownMenuSeparator",Ai=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});Ai.displayName=jp;var Lp="DropdownMenuArrow",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(vi,{...o,...r,ref:t})});kp.displayName=Lp;var Fp=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=J(t),[c,u]=Q({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,p.jsx)(hi,{...i,open:c,onOpenChange:u,children:n})},$p="DropdownMenuSubTrigger",Mi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(mi,{...o,...r,ref:t})});Mi.displayName=$p;var Bp="DropdownMenuSubContent",Oi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(gi,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oi.displayName=Bp;var Th=wi,Ah=Ci,Mh=bi,Oh=Ei,Nh=Ri,Ih=Pi,Dh=_i,jh=Ti,Lh=Ai,kh=Fp,Fh=Mi,$h=Oi;function Wp(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var Er="ScrollArea",[Ni,Bh]=q(Er),[Hp,le]=Ni(Er),Ii=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[c,u]=s.useState(null),[d,l]=s.useState(null),[f,v]=s.useState(null),[m,x]=s.useState(null),[h,g]=s.useState(null),[y,w]=s.useState(0),[C,b]=s.useState(0),[P,R]=s.useState(!1),[E,M]=s.useState(!1),A=D(t,j=>u(j)),O=nt(o);return(0,p.jsx)(Hp,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:l,content:f,onContentChange:v,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:P,onScrollbarXEnabledChange:R,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:M,onCornerWidthChange:w,onCornerHeightChange:b,children:(0,p.jsx)(T.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Ii.displayName=Er;var Di="ScrollAreaViewport",ji=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=le(Di,n),c=s.useRef(null),u=D(t,c,i.onViewportChange);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,p.jsx)(T.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,p.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ji.displayName=Di;var ye="ScrollAreaScrollbar",Gp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return s.useEffect(()=>(c?a(!0):i(!0),()=>{c?a(!1):i(!1)}),[c,a,i]),o.type==="hover"?(0,p.jsx)(Up,{...r,ref:t,forceMount:n}):o.type==="scroll"?(0,p.jsx)(Vp,{...r,ref:t,forceMount:n}):o.type==="auto"?(0,p.jsx)(Li,{...r,ref:t,forceMount:n}):o.type==="always"?(0,p.jsx)(Rr,{...r,ref:t}):null});Gp.displayName=ye;var Up=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),[a,i]=s.useState(!1);return s.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const d=()=>{window.clearTimeout(u),i(!0)},l=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",l),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",l)}}},[o.scrollArea,o.scrollHideDelay]),(0,p.jsx)(z,{present:n||a,children:(0,p.jsx)(Li,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Vp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),a=e.orientation==="horizontal",i=mn(()=>u("SCROLL_END"),100),[c,u]=Wp("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return s.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,u]),s.useEffect(()=>{const d=o.viewport,l=a?"scrollLeft":"scrollTop";if(d){let f=d[l];const v=()=>{const m=d[l];f!==m&&(u("SCROLL"),i()),f=m};return d.addEventListener("scroll",v),()=>d.removeEventListener("scroll",v)}},[o.viewport,a,u,i]),(0,p.jsx)(z,{present:n||c!=="hidden",children:(0,p.jsx)(Rr,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:S(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:S(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Li=s.forwardRef((e,t)=>{const n=le(ye,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=s.useState(!1),c=e.orientation==="horizontal",u=mn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,l=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?d:l)}},10);return Ze(n.viewport,u),Ze(n.content,u),(0,p.jsx)(z,{present:r||a,children:(0,p.jsx)(Rr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Rr=s.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=le(ye,e.__scopeScrollArea),a=s.useRef(null),i=s.useRef(0),[c,u]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Bi(c.viewport,c.content),l={...r,sizes:c,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:v=>a.current=v,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:v=>i.current=v};function f(v,m){return Qp(v,i.current,c,m)}return n==="horizontal"?(0,p.jsx)(Kp,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollLeft,m=so(v,c,o.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=f(v,o.dir))}}):n==="vertical"?(0,p.jsx)(zp,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollTop,m=so(v,c);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=f(v))}}):null}),Kp=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarXChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Fi,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hn(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.x),onDragScroll:l=>e.onDragScroll(l.x),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollLeft+l.deltaX;e.onWheelScroll(v),Hi(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Vt(i.paddingLeft),paddingEnd:Vt(i.paddingRight)}})}})}),zp=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarYChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Fi,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hn(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.y),onDragScroll:l=>e.onDragScroll(l.y),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollTop+l.deltaY;e.onWheelScroll(v),Hi(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Vt(i.paddingTop),paddingEnd:Vt(i.paddingBottom)}})}})}),[Yp,ki]=Ni(ye),Fi=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:l,onResize:f,...v}=e,m=le(ye,n),[x,h]=s.useState(null),g=D(t,A=>h(A)),y=s.useRef(null),w=s.useRef(""),C=m.viewport,b=r.content-r.viewport,P=K(l),R=K(u),E=mn(f,10);function M(A){if(y.current){const O=A.clientX-y.current.left,j=A.clientY-y.current.top;d({x:O,y:j})}}return s.useEffect(()=>{const A=O=>{const j=O.target;x?.contains(j)&&P(O,b)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[C,x,b,P]),s.useEffect(R,[r,R]),Ze(x,E),Ze(m.content,E),(0,p.jsx)(Yp,{scope:n,scrollbar:x,hasThumb:o,onThumbChange:K(a),onThumbPointerUp:K(i),onThumbPositionChange:R,onThumbPointerDown:K(c),children:(0,p.jsx)(T.div,{...v,ref:g,style:{position:"absolute",...v.style},onPointerDown:S(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),M(A))}),onPointerMove:S(e.onPointerMove,M),onPointerUp:S(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Ut="ScrollAreaThumb",Xp=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ki(Ut,e.__scopeScrollArea);return(0,p.jsx)(z,{present:n||o.hasThumb,children:(0,p.jsx)(qp,{ref:t,...r})})}),qp=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=le(Ut,n),i=ki(Ut,n),{onThumbPositionChange:c}=i,u=D(t,f=>i.onThumbChange(f)),d=s.useRef(void 0),l=mn(()=>{d.current&&(d.current(),d.current=void 0)},100);return s.useEffect(()=>{const f=a.viewport;if(f){const v=()=>{if(l(),!d.current){const m=Jp(f,c);d.current=m,c()}};return c(),f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[a.viewport,l,c]),(0,p.jsx)(T.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:S(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),m=f.clientX-v.left,x=f.clientY-v.top;i.onThumbPointerDown({x:m,y:x})}),onPointerUp:S(e.onPointerUp,i.onThumbPointerUp)})});Xp.displayName=Ut;var Pr="ScrollAreaCorner",$i=s.forwardRef((e,t)=>{const n=le(Pr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?(0,p.jsx)(Zp,{...e,ref:t}):null});$i.displayName=Pr;var Zp=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=le(Pr,n),[a,i]=s.useState(0),[c,u]=s.useState(0),d=!!(a&&c);return Ze(o.scrollbarX,()=>{const l=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(l),u(l)}),Ze(o.scrollbarY,()=>{const l=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(l),i(l)}),d?(0,p.jsx)(T.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Vt(e){return e?parseInt(e,10):0}function Bi(e,t){const n=e/t;return isNaN(n)?0:n}function hn(e){const t=Bi(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Qp(e,t,n,r="ltr"){const o=hn(n),a=o/2,i=t||a,c=o-i,u=n.scrollbar.paddingStart+i,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,l=n.content-n.viewport,f=r==="ltr"?[0,l]:[l*-1,0];return Wi([u,d],f)(e)}function so(e,t,n="ltr"){const r=hn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,c=a-r,u=n==="ltr"?[0,i]:[i*-1,0],d=Wn(e,u);return Wi([0,i],[0,c])(d)}function Wi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Hi(e,t){return e>0&&e<t}var Jp=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,c=n.top!==a.top;(i||c)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function mn(e,t){const n=K(e),r=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),s.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ze(e,t){const n=K(t);Y(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Wh=Ii,Hh=ji,Gh=$i,gn="Switch",[ev,Uh]=q(gn),[tv,nv]=ev(gn),Gi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u="on",onCheckedChange:d,form:l,...f}=e,[v,m]=s.useState(null),x=D(t,C=>m(C)),h=s.useRef(!1),g=v?l||!!v.closest("form"):!0,[y,w]=Q({prop:o,defaultProp:a??!1,onChange:d,caller:gn});return(0,p.jsxs)(tv,{scope:n,checked:y,disabled:c,children:[(0,p.jsx)(T.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":zi(y),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:x,onClick:S(e.onClick,C=>{w(b=>!b),g&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),g&&(0,p.jsx)(Ki,{control:v,bubbles:!h.current,name:r,value:u,checked:y,required:i,disabled:c,form:l,style:{transform:"translateX(-100%)"}})]})});Gi.displayName=gn;var Ui="SwitchThumb",Vi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=nv(Ui,n);return(0,p.jsx)(T.span,{"data-state":zi(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Vi.displayName=Ui;var rv="SwitchBubbleInput",Ki=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=s.useRef(null),c=D(i,a),u=ur(n),d=tr(t);return s.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&v){const m=new Event("click",{bubbles:r});v.call(l,n),l.dispatchEvent(m)}},[u,n,r]),(0,p.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ki.displayName=rv;function zi(e){return e?"checked":"unchecked"}var Vh=Gi,Kh=Vi,xn="Tabs",[ov,zh]=q(xn,[ot]),Yi=ot(),[av,_r]=ov(xn),Xi=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:u="automatic",...d}=e,l=nt(c),[f,v]=Q({prop:r,onChange:o,defaultProp:a??"",caller:xn});return(0,p.jsx)(av,{scope:n,baseId:re(),value:f,onValueChange:v,orientation:i,dir:l,activationMode:u,children:(0,p.jsx)(T.div,{dir:l,"data-orientation":i,...d,ref:t})})});Xi.displayName=xn;var qi="TabsList",Zi=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=_r(qi,n),i=Yi(n);return(0,p.jsx)(vr,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,p.jsx)(T.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Zi.displayName=qi;var Qi="TabsTrigger",Ji=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=_r(Qi,n),c=Yi(n),u=nc(i.baseId,r),d=rc(i.baseId,r),l=r===i.value;return(0,p.jsx)(hr,{asChild:!0,...c,focusable:!o,active:l,children:(0,p.jsx)(T.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":d,"data-state":l?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:S(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:S(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:S(e.onFocus,()=>{const f=i.activationMode!=="manual";!l&&!o&&f&&i.onValueChange(r)})})})});Ji.displayName=Qi;var ec="TabsContent",tc=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,c=_r(ec,n),u=nc(c.baseId,r),d=rc(c.baseId,r),l=r===c.value,f=s.useRef(l);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),(0,p.jsx)(z,{present:o||l,children:({present:v})=>(0,p.jsx)(T.div,{"data-state":l?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});tc.displayName=ec;function nc(e,t){return`${e}-trigger-${t}`}function rc(e,t){return`${e}-content-${t}`}var Yh=Xi,Xh=Zi,qh=Ji,Zh=tc,sv="Separator",io="horizontal",iv=["horizontal","vertical"],oc=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=io,...o}=e,a=cv(r)?r:io,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,p.jsx)(Ea.div,{"data-orientation":a,...i,...o,ref:t})});oc.displayName=sv;function cv(e){return iv.includes(e)}var Qh=oc,Tr="ContextMenu",[lv,Jh]=q(Tr,[fn]),ee=fn(),[uv,ac]=lv(Tr),sc=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[i,c]=s.useState(!1),u=ee(t),d=K(r),l=s.useCallback(f=>{c(f),d(f)},[d]);return(0,p.jsx)(uv,{scope:t,open:i,onOpenChange:l,modal:a,children:(0,p.jsx)(ni,{...u,dir:o,open:i,onOpenChange:l,modal:a,children:n})})};sc.displayName=Tr;var ic="ContextMenuTrigger",cc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=ac(ic,n),i=ee(n),c=s.useRef({x:0,y:0}),u=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),d=s.useRef(0),l=s.useCallback(()=>window.clearTimeout(d.current),[]),f=v=>{c.current={x:v.clientX,y:v.clientY},a.onOpenChange(!0)};return s.useEffect(()=>l,[l]),s.useEffect(()=>{r&&l()},[r,l]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ri,{...i,virtualRef:u}),(0,p.jsx)(T.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:S(e.onContextMenu,v=>{l(),f(v),v.preventDefault()}),onPointerDown:r?e.onPointerDown:S(e.onPointerDown,Ot(v=>{l(),d.current=window.setTimeout(()=>f(v),700)})),onPointerMove:r?e.onPointerMove:S(e.onPointerMove,Ot(l)),onPointerCancel:r?e.onPointerCancel:S(e.onPointerCancel,Ot(l)),onPointerUp:r?e.onPointerUp:S(e.onPointerUp,Ot(l))})]})});cc.displayName=ic;var dv="ContextMenuPortal",lc=e=>{const{__scopeContextMenu:t,...n}=e,r=ee(t);return(0,p.jsx)(oi,{...r,...n})};lc.displayName=dv;var uc="ContextMenuContent",dc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ac(uc,n),a=ee(n),i=s.useRef(!1);return(0,p.jsx)(ai,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&i.current&&c.preventDefault(),i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dc.displayName=uc;var fv="ContextMenuGroup",pv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(si,{...o,...r,ref:t})});pv.displayName=fv;var vv="ContextMenuLabel",hv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});hv.displayName=vv;var mv="ContextMenuItem",fc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});fc.displayName=mv;var gv="ContextMenuCheckboxItem",xv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(li,{...o,...r,ref:t})});xv.displayName=gv;var wv="ContextMenuRadioGroup",yv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});yv.displayName=wv;var Cv="ContextMenuRadioItem",bv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(di,{...o,...r,ref:t})});bv.displayName=Cv;var Sv="ContextMenuItemIndicator",Ev=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Ev.displayName=Sv;var Rv="ContextMenuSeparator",pc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});pc.displayName=Rv;var Pv="ContextMenuArrow",_v=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(vi,{...o,...r,ref:t})});_v.displayName=Pv;var vc="ContextMenuSub",Tv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,i=ee(t),[c,u]=Q({prop:o,defaultProp:a??!1,onChange:r,caller:vc});return(0,p.jsx)(hi,{...i,open:c,onOpenChange:u,children:n})};Tv.displayName=vc;var Av="ContextMenuSubTrigger",Mv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(mi,{...o,...r,ref:t})});Mv.displayName=Av;var Ov="ContextMenuSubContent",Nv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(gi,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nv.displayName=Ov;function Ot(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var em=sc,tm=cc,nm=lc,rm=dc,om=fc,am=pc,hc="Toggle",Ar=s.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[i,c]=Q({prop:n,onChange:o,defaultProp:r??!1,caller:hc});return(0,p.jsx)(T.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:S(e.onClick,()=>{e.disabled||c(!i)})})});Ar.displayName=hc;var sm=Ar,je="ToggleGroup",[mc,im]=q(je,[ot]),gc=ot(),Mr=s.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single")return(0,p.jsx)(Iv,{...r,ref:t});if(n==="multiple")return(0,p.jsx)(Dv,{...r,ref:t});throw new Error(`Missing prop \`type\` expected on \`${je}\``)});Mr.displayName=je;var[xc,wc]=mc(je),Iv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??"",onChange:o,caller:je});return(0,p.jsx)(xc,{scope:e.__scopeToggleGroup,type:"single",value:s.useMemo(()=>i?[i]:[],[i]),onItemActivate:c,onItemDeactivate:s.useCallback(()=>c(""),[c]),children:(0,p.jsx)(yc,{...a,ref:t})})}),Dv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??[],onChange:o,caller:je}),u=s.useCallback(l=>c((f=[])=>[...f,l]),[c]),d=s.useCallback(l=>c((f=[])=>f.filter(v=>v!==l)),[c]);return(0,p.jsx)(xc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:(0,p.jsx)(yc,{...a,ref:t})})});Mr.displayName=je;var[jv,Lv]=mc(je),yc=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:c=!0,...u}=e,d=gc(n),l=nt(i),f={role:"group",dir:l,...u};return(0,p.jsx)(jv,{scope:n,rovingFocus:o,disabled:r,children:o?(0,p.jsx)(vr,{asChild:!0,...d,orientation:a,dir:l,loop:c,children:(0,p.jsx)(T.div,{...f,ref:t})}):(0,p.jsx)(T.div,{...f,ref:t})})}),Kt="ToggleGroupItem",Cc=s.forwardRef((e,t)=>{const n=wc(Kt,e.__scopeToggleGroup),r=Lv(Kt,e.__scopeToggleGroup),o=gc(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,c={...e,pressed:a,disabled:i},u=s.useRef(null);return r.rovingFocus?(0,p.jsx)(hr,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:(0,p.jsx)(co,{...c,ref:t})}):(0,p.jsx)(co,{...c,ref:t})});Cc.displayName=Kt;var co=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=wc(Kt,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=a.type==="single"?i:void 0;return(0,p.jsx)(Ar,{...c,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),cm=Mr,lm=Cc,wn="Collapsible",[kv,um]=q(wn),[Fv,Or]=kv(wn),bc=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[u,d]=Q({prop:r,defaultProp:o??!1,onChange:i,caller:wn});return(0,p.jsx)(Fv,{scope:n,disabled:a,contentId:re(),open:u,onOpenToggle:s.useCallback(()=>d(l=>!l),[d]),children:(0,p.jsx)(T.div,{"data-state":Ir(u),"data-disabled":a?"":void 0,...c,ref:t})})});bc.displayName=wn;var Sc="CollapsibleTrigger",Ec=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Or(Sc,n);return(0,p.jsx)(T.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ir(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:S(e.onClick,o.onOpenToggle)})});Ec.displayName=Sc;var Nr="CollapsibleContent",Rc=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Or(Nr,e.__scopeCollapsible);return(0,p.jsx)(z,{present:n||o.open,children:({present:a})=>(0,p.jsx)($v,{...r,ref:t,present:a})})});Rc.displayName=Nr;var $v=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Or(Nr,n),[c,u]=s.useState(r),d=s.useRef(null),l=D(t,d),f=s.useRef(0),v=f.current,m=s.useRef(0),x=m.current,h=i.open||c,g=s.useRef(h),y=s.useRef(void 0);return s.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Y(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,m.current=C.width,g.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(r)}},[i.open,r]),(0,p.jsx)(T.div,{"data-state":Ir(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:l,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:h&&o})});function Ir(e){return e?"open":"closed"}var dm=bc,fm=Ec,pm=Rc;export{nh as $,Mh as A,Ac as At,Rh as B,Xp as C,zv as Ct,Nh as D,Q as Dt,Oh as E,Kv as Et,Fh as F,gh as G,Ch as H,Ah as I,vh as J,hh as K,Lf as L,Lh as M,kh as N,Ih as O,re as Ot,$h as P,oh as Q,kf as R,Gp as S,Yv as St,Dh as T,Vv as Tt,Sh as U,Eh as V,mh as W,fh as X,ph as Y,xh as Z,qh as _,Md as _t,cm as a,uh as at,Gh as b,Ad as bt,om as c,th as ct,am as d,Ea as dt,sh as et,tm as f,qv as ft,Yh as g,Od as gt,Xh as h,Dd as ht,lm as i,Jv as it,Th as j,_c as jt,jh as k,ft as kt,nm as l,ah as lt,Zh as m,Nd as mt,dm as n,ih as nt,sm as o,lh as ot,Qh as p,Ca as pt,wh as q,fm as r,rh as rt,rm as s,eh as st,pm as t,ch as tt,em as u,Zv as ut,Vh as v,Td as vt,Hh as w,Uv as wt,Wh as x,Xv as xt,Kh as y,Id as yt,bh as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as g}from"./rolldown-runtime-fzu9RN21.js";import{zt as y}from"./icons-DxFtdMXW.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"db-studio@2.1.0"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d46a526b-5838-48b4-b127-ade536ab8882",t._sentryDebugIdIdentifier="sentry-dbid-d46a526b-5838-48b4-b127-ade536ab8882")}catch{}})();var o=g(y(),1),c=t=>{let e;const n=new Set,a=(s,b)=>{const r=typeof s=="function"?s(e):s;if(!Object.is(r,e)){const f=e;e=b??(typeof r!="object"||r===null)?r:Object.assign({},e,r),n.forEach(S=>S(e,f))}},i=()=>e,u={setState:a,getState:i,getInitialState:()=>l,subscribe:s=>(n.add(s),()=>n.delete(s))},l=e=t(a,i,u);return u},I=(t=>t?c(t):c),v=t=>t;function _(t,e=v){const n=o.useSyncExternalStore(t.subscribe,o.useCallback(()=>e(t.getState()),[t,e]),o.useCallback(()=>e(t.getInitialState()),[t,e]));return o.useDebugValue(n),n}var d=t=>{const e=I(t),n=a=>_(e,a);return Object.assign(n,e),n},D=(t=>t?d(t):d);export{D as t};
|