@decocms/mesh 2.109.0 → 2.110.0
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/client/assets/{AlertCircle-BTG7SkIE.js → AlertCircle-54XkBG75.js} +1 -1
- package/dist/client/assets/{AlertOctagon-DYhTqihQ.js → AlertOctagon-D-n2_Ity.js} +1 -1
- package/dist/client/assets/{AlertTriangle-BMGMq36M.js → AlertTriangle-ZoXqH5xx.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BnTFWkDF.js → ArrowLeft-CYxjro91.js} +1 -1
- package/dist/client/assets/{ArrowUp-DyxBaaUh.js → ArrowUp-DRhMKIK5.js} +1 -1
- package/dist/client/assets/{Check-Twncsx2J.js → Check-BHtow5c6.js} +1 -1
- package/dist/client/assets/{CheckCircle-B9yMcclT.js → CheckCircle-DaStCoYU.js} +1 -1
- package/dist/client/assets/{CheckDone01-5Ey_F_TB.js → CheckDone01-BkzpeEp8.js} +1 -1
- package/dist/client/assets/{ChevronDown-DRFuBDK4.js → ChevronDown-DIu5de-X.js} +1 -1
- package/dist/client/assets/{ChevronRight-CK4GlTKY.js → ChevronRight-Ds0FvHp6.js} +1 -1
- package/dist/client/assets/{Clock-DQ0IbXhE.js → Clock-CwhFkG9v.js} +1 -1
- package/dist/client/assets/{Code01-CRg-SkZm.js → Code01-CfpShGlI.js} +1 -1
- package/dist/client/assets/{Container-BChLeS3s.js → Container-DZaD5nKa.js} +1 -1
- package/dist/client/assets/{Copy01-D9X-eXOx.js → Copy01-qW8IV1YX.js} +1 -1
- package/dist/client/assets/{Dataflow03-Br20xBcq.js → Dataflow03-1bin_Ob0.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CuVly-vS.js → DotsHorizontal-BU6_dxo0.js} +1 -1
- package/dist/client/assets/{DotsVertical-DZrYpBGP.js → DotsVertical-BRM5SG1z.js} +1 -1
- package/dist/client/assets/{Download01-CQU0OinT.js → Download01-C-bkrJJ_.js} +1 -1
- package/dist/client/assets/{Edit01-DAlsOQRJ.js → Edit01-BFKPZm51.js} +1 -1
- package/dist/client/assets/{Eye-BFoh1Im6.js → Eye-Ci58n8nv.js} +1 -1
- package/dist/client/assets/{File02-C7wAMy8R.js → File02-nqEm0je3.js} +1 -1
- package/dist/client/assets/{File06-CvVxiO3C.js → File06-BrnW1ZQ1.js} +1 -1
- package/dist/client/assets/{FilterLines-BIFUP_x_.js → FilterLines-PVC9VLDF.js} +1 -1
- package/dist/client/assets/{Globe01-CwV6iRub.js → Globe01-7CpfXn5N.js} +1 -1
- package/dist/client/assets/{Globe02-DAPNmmeF.js → Globe02-B27PYM5b.js} +1 -1
- package/dist/client/assets/{Grid01-DhcsAdBg.js → Grid01-CCE4xs16.js} +1 -1
- package/dist/client/assets/{Home02-E5eZOwbf.js → Home02-BfUb9zF_.js} +1 -1
- package/dist/client/assets/{Image01-s6I8DvoN.js → Image01-CbvGPZGr.js} +1 -1
- package/dist/client/assets/{Inbox01-B9su4ewM.js → Inbox01-B8fBrw9y.js} +1 -1
- package/dist/client/assets/{InfoCircle-DIUcjPMz.js → InfoCircle-7KhXK-2T.js} +1 -1
- package/dist/client/assets/{Key01-Cp47SUgU.js → Key01-ZjbbdeBE.js} +1 -1
- package/dist/client/assets/{LinkExternal01-QERiUkx9.js → LinkExternal01-C6wGiaKd.js} +1 -1
- package/dist/client/assets/{List-hgWOcs2s.js → List-CnAhQJaO.js} +1 -1
- package/dist/client/assets/{Loading01-B3VITid1.js → Loading01-CQxnYIyy.js} +1 -1
- package/dist/client/assets/{Lock01-DzL0-wO5.js → Lock01-BXsNu63z.js} +1 -1
- package/dist/client/assets/{Pin01-Bo0Wv0-G.js → Pin01-CQimXkz7.js} +1 -1
- package/dist/client/assets/{Play-DPPAwpQc.js → Play-CCFAjpE1.js} +1 -1
- package/dist/client/assets/{Plus-flqXS_7c.js → Plus-ldykr1Qs.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BAqmqLli.js → RefreshCcw01-DH9n4JeZ.js} +1 -1
- package/dist/client/assets/{RefreshCw01-T4CnUx-i.js → RefreshCw01-DsWpmHoM.js} +1 -1
- package/dist/client/assets/{Save01-DkeiVIoO.js → Save01-DYGYdg7I.js} +1 -1
- package/dist/client/assets/{SearchMd-CSI-x5Ag.js → SearchMd-CJBYDik4.js} +1 -1
- package/dist/client/assets/{Settings01-D6cOaU0s.js → Settings01-DZTt6EoC.js} +1 -1
- package/dist/client/assets/{Settings02-DefIRfsZ.js → Settings02-By12van4.js} +1 -1
- package/dist/client/assets/{Share07-BatXimVn.js → Share07-lImhPS0j.js} +1 -1
- package/dist/client/assets/{Terminal-gVdepVY2.js → Terminal-DVM8ToJY.js} +1 -1
- package/dist/client/assets/{Tool01-DpcLow0b.js → Tool01-CKCbyA0K.js} +1 -1
- package/dist/client/assets/{Trash01-DJ3WnIqi.js → Trash01-DTuEjPqc.js} +1 -1
- package/dist/client/assets/{Upload01-wEAZac_6.js → Upload01-CbgKMs6Z.js} +1 -1
- package/dist/client/assets/{Users03-D9j8cs_f.js → Users03-Bn4RTBQO.js} +1 -1
- package/dist/client/assets/{X-CYtFcR8E.js → X-PXGrxqUi.js} +1 -1
- package/dist/client/assets/{XCircle-DAsMwRtR.js → XCircle-DkU1KZH1.js} +1 -1
- package/dist/client/assets/{XClose-B9SXGArQ.js → XClose-CwEytWmM.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-CZgqs_sQ.js → agent-connections-preview-gRx2v-zj.js} +1 -1
- package/dist/client/assets/{agent-detail-BL9109In.js → agent-detail-xJqhPPyM.js} +1 -1
- package/dist/client/assets/{agents-Cd9beoj8.js → agents-U0juIVTU.js} +1 -1
- package/dist/client/assets/alert-dialog-DeTFKcxV.js +7 -0
- package/dist/client/assets/{auth-catchall-DMX6SpeC.js → auth-catchall-BGozAjlz.js} +1 -1
- package/dist/client/assets/{avatar-C7PBbtcy.js → avatar-BwRAYU0T.js} +1 -1
- package/dist/client/assets/{badge-zET6KpjD.js → badge-D7RdE5x4.js} +1 -1
- package/dist/client/assets/{binder-DsvBx_9P.js → binder-D1ZOF1Sc.js} +1 -1
- package/dist/client/assets/{breadcrumb-BQdkR1kY.js → breadcrumb-C8b5zMor.js} +1 -1
- package/dist/client/assets/{button-B1-7VHy5.js → button-B1_AjrAy.js} +1 -1
- package/dist/client/assets/{card-CUl7yMSH.js → card-CuDdPQFh.js} +1 -1
- package/dist/client/assets/{checkbox-Ycppn1KJ.js → checkbox-BAHzYzRq.js} +1 -1
- package/dist/client/assets/{circle-alert-m27psUsB.js → circle-alert-D8AbrLxa.js} +1 -1
- package/dist/client/assets/{collection-detail-DqVfmV5V.js → collection-detail-Dy_G4wsA.js} +1 -1
- package/dist/client/assets/{collection-tab-B0vxyNPO.js → collection-tab-aDh_bgum.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CiVHtKfG.js → collection-table-wrapper-7diw-YMI.js} +1 -1
- package/dist/client/assets/{collection-tabs-BHSqqtem.js → collection-tabs-CR2V6cwH.js} +1 -1
- package/dist/client/assets/{command-DXpfq2KQ.js → command-CgyAO0Ne.js} +1 -1
- package/dist/client/assets/{connect-CqDaPp1I.js → connect-tVhvROi8.js} +1 -1
- package/dist/client/assets/{connection-card-QXC-dXAI.js → connection-card-Cg4aLOaW.js} +1 -1
- package/dist/client/assets/{connection-detail-xTLY0OXk.js → connection-detail-CPywuZSh.js} +1 -1
- package/dist/client/assets/{connections-BwW-ERBP.js → connections-CPTTerhe.js} +1 -1
- package/dist/client/assets/{constants-tFX1afYz.js → constants-D3TKhQyR.js} +1 -1
- package/dist/client/assets/constants-DfKBjJcd.js +1 -0
- package/dist/client/assets/{create-organization-dialog-C9bqisoB.js → create-organization-dialog-C5Cn0159.js} +1 -1
- package/dist/client/assets/{create-project-dialog-CQfm9GiD.js → create-project-dialog-CbnOarMk.js} +1 -1
- package/dist/client/assets/{dialog-sGMzpzJR.js → dialog-BIx4eChJ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BJG-AeRv.js → dropdown-menu-Bqe_ZQT7.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-31p8BEwY.js → dynamic-plugin-layout-daiqbOX4.js} +1 -1
- package/dist/client/assets/{empty-state-DDDsL_jY.js → empty-state-3DPCxrDd.js} +1 -1
- package/dist/client/assets/{empty-state-rhTOCE1V.js → empty-state-BRTEyQic.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BStHrTds.js → env-vars-editor-BnFnFKjL.js} +1 -1
- package/dist/client/assets/{error-boundary-D1ilYYxc.js → error-boundary-D3lg8C_F.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bea8jdyv.js → extract-connection-data-D-KC8N1g.js} +1 -1
- package/dist/client/assets/{file-browser-Bi4H9hqm.js → file-browser-DYQzip2l.js} +2 -2
- package/dist/client/assets/{form-DhN7T_ed.js → form-CSMGXcSP.js} +1 -1
- package/dist/client/assets/{grid-view-Dvjf96cg.js → grid-view-CvriK_Te.js} +1 -1
- package/dist/client/assets/{home-Cl_di1hc.js → home-BHmXDNE_.js} +1 -1
- package/dist/client/assets/{index-C_KYsx1n.js → index-BEXpTjUJ.js} +6 -6
- package/dist/client/assets/{index-3iOmRpwp.js → index-BoIFTJw3.js} +1 -1
- package/dist/client/assets/{index-BfgRaEZs.js → index-CEEGRjv-.js} +1 -1
- package/dist/client/assets/{index-eN5WPehG.js → index-D0P8wRBl.js} +1 -1
- package/dist/client/assets/{index-ChGa282z.js → index-D291fSpc.js} +1 -1
- package/dist/client/assets/{index-DZj3EVeo.js → index-DGQeUY5q.js} +1 -1
- package/dist/client/assets/{index-Dzn_GLVS.js → index-DWPOfnC9.js} +1 -1
- package/dist/client/assets/{index-45Kg6aLu.js → index-DXIsw0zh.js} +3 -3
- package/dist/client/assets/{index-BQJqxhJO.js → index-PQ5Y9l5r.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DQBlV4K7.js → infiniteQueryObserver-BEZRxvfD.js} +1 -1
- package/dist/client/assets/{input-u2QVvm6o.js → input-CBsHg1ZU.js} +1 -1
- package/dist/client/assets/{integration-icon-BY0sSmsG.js → integration-icon-B6mCYbtH.js} +1 -1
- package/dist/client/assets/{label-BuBm6LTc.js → label-BAn78i4V.js} +1 -1
- package/dist/client/assets/{layout-BzQJfQX5.js → layout-CJ8IA4Pt.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DV5O1bxJ.js → localstorage-keys-5bqIWFww.js} +1 -1
- package/dist/client/assets/{login-vAvPpURH.js → login-W6QtfXRU.js} +1 -1
- package/dist/client/assets/{markdown-BJdEYtml.js → markdown-CGk5zbs1.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DmWivpL5.js → mcp-oauth-CZMbNN44.js} +1 -1
- package/dist/client/assets/mcp-server-card-e0XUR5Yq.js +1 -0
- package/dist/client/assets/{mcp-server-detail-CqMu9AFr.js → mcp-server-detail-Caq-098C.js} +2 -2
- package/dist/client/assets/{members-BX2PMK8N.js → members-zrxPuh2o.js} +1 -1
- package/dist/client/assets/{monitoring-BMu_SNHP.js → monitoring-_ny0UhM9.js} +2 -2
- package/dist/client/assets/{monitoring-dashboard-edit-CwKMR-h8.js → monitoring-dashboard-edit-DRWSHAcl.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-bzXxHOyH.js → monitoring-dashboard-view-Dg5Q-4l_.js} +1 -1
- package/dist/client/assets/{oauth-callback-WRpc6qbg.js → oauth-callback-DF4NcQuR.js} +1 -1
- package/dist/client/assets/page-B6wNBPH1.js +1 -0
- package/dist/client/assets/{page-_Vi7DPpw.js → page-CuOig4S9.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-B_zjYcay.js → plugin-empty-state-BU6c0L07.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DvPlpthq.js → plugin-empty-state-DmaS8xBx.js} +1 -1
- package/dist/client/assets/{plugin-header-DfmvvFYa.js → plugin-header-Dj0RMbq4.js} +1 -1
- package/dist/client/assets/{plugin-header-BJbnfrfC.js → plugin-header-DnM-ONcb.js} +1 -1
- package/dist/client/assets/{popover-HfYRFN5H.js → popover-Bb6R9icK.js} +1 -1
- package/dist/client/assets/{project-layout-DWhu_REh.js → project-layout-Dn_PaFa7.js} +1 -1
- package/dist/client/assets/{project-settings-BCgZRUOC.js → project-settings-C1t3TKB3.js} +1 -1
- package/dist/client/assets/{projects-list-BgwSgFHH.js → projects-list-DwR0s7rf.js} +1 -1
- package/dist/client/assets/{readme-viewer-DuiAklr2.js → readme-viewer-Dw7Qf_Tx.js} +1 -1
- package/dist/client/assets/registry-layout-JBbhTkeO.js +5 -0
- package/dist/client/assets/registry-utils-CqH2sLA9.js +1 -0
- package/dist/client/assets/{reports-layout-DrnrOsfm.js → reports-layout-CmFSnl69.js} +2 -2
- package/dist/client/assets/{reset-password-DQuuf3hj.js → reset-password-CVTGYB35.js} +1 -1
- package/dist/client/assets/{resizable-C5yHp-8Z.js → resizable-CTqqQjcd.js} +1 -1
- package/dist/client/assets/{save-actions-B4sDLlOL.js → save-actions-CwdkcgkS.js} +1 -1
- package/dist/client/assets/{scroll-area-Ci9L6Qi1.js → scroll-area-CchW-N3-.js} +1 -1
- package/dist/client/assets/{select-0SgtyZSO.js → select-Dtkbt4-O.js} +1 -1
- package/dist/client/assets/{shell-layout-qKn05A_i.js → shell-layout-eLdU35ux.js} +3 -3
- package/dist/client/assets/{spinner-Ccp4rHkD.js → spinner-CQv4OdiY.js} +1 -1
- package/dist/client/assets/{store-invite-VAIQ0qYN.js → store-invite-D-J92Dqo.js} +1 -1
- package/dist/client/assets/{switch-BAkn60iQ.js → switch-RGSyl6UC.js} +1 -1
- package/dist/client/assets/{table-GP96KEc-.js → table-D_QygT6-.js} +1 -1
- package/dist/client/assets/{tasks-DWXha9ce.js → tasks-CYirgWP_.js} +1 -1
- package/dist/client/assets/{textarea-CcWPifLG.js → textarea-Bs1SDhbD.js} +1 -1
- package/dist/client/assets/{time-range-picker-B8TAeOyr.js → time-range-picker-9QegZlTC.js} +1 -1
- package/dist/client/assets/{toggle-group-CVJLBTo7.js → toggle-group-BMOUBfIJ.js} +1 -1
- package/dist/client/assets/{tools-list-3dr1HVBB.js → tools-list-B0vbhECW.js} +1 -1
- package/dist/client/assets/{tooltip-C1FsdbX7.js → tooltip-Dp5lhZb-.js} +1 -1
- package/dist/client/assets/{topbar-portal-DnuubJJg.js → topbar-portal-BMMpyuIo.js} +1 -1
- package/dist/client/assets/{typewriter-title-qDDHjvIc.js → typewriter-title-C_l4tadT.js} +1 -1
- package/dist/client/assets/{use-binding-Bj1WNTF6.js → use-binding-CCMbm9JJ.js} +1 -1
- package/dist/client/assets/{use-connection-9Baq0dyu.js → use-connection-BQuQwDk4.js} +1 -1
- package/dist/client/assets/{use-copy-Dntr3tOT.js → use-copy-B35KQJbq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bjkj0KGk.js → use-create-virtual-mcp-CExHv6Kc.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-ChcY3dml.js → use-deco-chat-open-XtGRSas5.js} +6 -6
- package/dist/client/assets/{use-install-from-registry-CK6pulyz.js → use-install-from-registry-szNBcx44.js} +1 -1
- package/dist/client/assets/{use-list-state-CSyX28S5.js → use-list-state-qVi7m5eK.js} +1 -1
- package/dist/client/assets/{use-llm-DkpnMPOg.js → use-llm-DjuAxzNV.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-0RIhBw0D.js → use-mcp-prompts-BVHx-kiG.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B1i5V7kV.js → use-mcp-tools-DqcNzzRD.js} +1 -1
- package/dist/client/assets/{use-mobile-5ueA37BO.js → use-mobile-DIAoFlrU.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CqVxq31T.js → use-organization-settings-W2sWkYV6.js} +1 -1
- package/dist/client/assets/{use-project-R6SuPOGJ.js → use-project-gbXgodP7.js} +1 -1
- package/dist/client/assets/{use-view-mode-BD_mLg6M.js → use-view-mode-BBke-t6c.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BhTjSJtU.js → use-virtual-mcp-DaDbSDv1.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-1kxc2B4E.js +1 -0
- package/dist/client/assets/{useMutation-ChH-SNuD.js → useMutation-B0HsJHYQ.js} +1 -1
- package/dist/client/assets/useQuery-BB1xkDqD.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-NieK84q6.js +1 -0
- package/dist/client/assets/{workflow-DmhNckam.js → workflow-BJgxWVo7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +201 -201
- package/dist/server/migrate.js +187 -187
- package/dist/server/server.js +180 -180
- package/package.json +1 -1
- package/dist/client/assets/alert-dialog-BVNo2Zvd.js +0 -7
- package/dist/client/assets/constants-Kr_IWMQh.js +0 -1
- package/dist/client/assets/mcp-server-card-CNZsNwOH.js +0 -1
- package/dist/client/assets/page-BZ2TOLvy.js +0 -1
- package/dist/client/assets/registry-layout-BAVbL4YG.js +0 -5
- package/dist/client/assets/registry-utils-72xro0Cc.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CqGCOPd8.js +0 -1
- package/dist/client/assets/useQuery-DBhv1CGp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CFTwc8uJ.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as ee,c as A,j as s,bC as le,z as ye,t as ce,u as we,a as Te,b as ze,bD as ke}from"./index-45Kg6aLu.js";import{c as Re}from"./binder-DsvBx_9P.js";import{u as ue}from"./useQuery-DBhv1CGp.js";import{h as Ie}from"./use-connection-9Baq0dyu.js";import{a as Pe,u as Me,j as Ee}from"./constants-tFX1afYz.js";import{u as de,P as Le}from"./topbar-portal-DnuubJJg.js";import{i as ie}from"./Loading01-B3VITid1.js";import{t as De}from"./Settings01-D6cOaU0s.js";import{i as Ae}from"./Check-Twncsx2J.js";import{t as Be}from"./ChevronDown-DRFuBDK4.js";import{c as X,B as me}from"./button-B1-7VHy5.js";import{i as fe}from"./AlertCircle-BTG7SkIE.js";import{i as xe}from"./ArrowLeft-BnTFWkDF.js";import{n as oe}from"./CheckDone01-5Ey_F_TB.js";import{s as Ne}from"./Clock-DQ0IbXhE.js";import{a as Fe}from"./Copy01-D9X-eXOx.js";import{n as ve}from"./Inbox01-B9su4ewM.js";import{i as Oe}from"./CheckCircle-B9yMcclT.js";import{i as qe}from"./InfoCircle-DIUcjPMz.js";import{i as Ue}from"./XCircle-DAsMwRtR.js";import{u as _e}from"./useMutation-ChH-SNuD.js";import{T as Ve,b as Se,c as Ge,a as Ke,d as He,e as Qe}from"./table-GP96KEc-.js";import{M as We}from"./markdown-BJdEYtml.js";import{i as Je,n as Ye}from"./ArrowUp-DyxBaaUh.js";import{B as Xe}from"./badge-zET6KpjD.js";import{b as Ze,c as et,d as tt,a as st,C as lt}from"./card-CUl7yMSH.js";import{c as pe,d as re,a as ge,b as he,S as je}from"./select-0SgtyZSO.js";import"./index-DZj3EVeo.js";const Ce=({size:t=24,color:e="currentColor",...l})=>ee.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},ee.createElement("path",{d:"M5 12h14"}));Ce.displayName="Minus";const ne={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function nt(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function it(t){const e=A.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:c}=t,[o,a]=ee.useState(!1),i=ee.useRef(null);let f;if(e[0]!==l||e[1]!==n){let r;e[3]!==n?(r=N=>N.id===n,e[3]=n,e[4]=r):r=e[4],f=l.find(r),e[0]=l,e[1]=n,e[2]=f}else f=e[2];const d=f;let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=r=>{i.current?.contains(r.relatedTarget)||a(!1)},e[5]=m):m=e[5];const x=m;if(l.length===1){let r;e[6]!==d?(r=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[6]=d,e[7]=r):r=e[7];const N=d?.title||"Reports";let j;e[8]!==N?(j=s.jsx("span",{children:N}),e[8]=N,e[9]=j):j=e[9];let C;return e[10]!==r||e[11]!==j?(C=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[r,j]}),e[10]=r,e[11]=j,e[12]=C):C=e[12],C}let u;e[13]!==o?(u=()=>a(!o),e[13]=o,e[14]=u):u=e[14];let p;e[15]!==d?(p=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[15]=d,e[16]=p):p=e[16];const g=d?.title||"Select source";let b;e[17]!==g?(b=s.jsx("span",{children:g}),e[17]=g,e[18]=b):b=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Be,{size:14}),e[19]=S):S=e[19];let v;e[20]!==u||e[21]!==p||e[22]!==b?(v=s.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[p,b,S]}),e[20]=u,e[21]=p,e[22]=b,e[23]=v):v=e[23];let y;e[24]!==l||e[25]!==o||e[26]!==c||e[27]!==n?(y=o&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(r=>s.jsxs("button",{type:"button",onClick:()=>{c(r.id),a(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[r.icon?s.jsx("img",{src:r.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:r.title}),r.id===n&&s.jsx(Ae,{size:14,className:"text-primary"})]},r.id))}),e[24]=l,e[25]=o,e[26]=c,e[27]=n,e[28]=y):y=e[28];let _;return e[29]!==v||e[30]!==y?(_=s.jsxs("div",{className:"relative",ref:i,onBlur:x,children:[v,y]}),e[29]=v,e[30]=y,e[31]=_):_=e[31],_}function ot(t){const e=A.c(2);let l;return e[0]!==t?(l=s.jsx(it,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ae={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:Oe},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:fe},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:Ue},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:qe}};function $e(t){const e=A.c(10),{status:l,size:n}=t,c=n===void 0?"default":n,o=ae[l]??ae.info,a=o.icon,i=c==="sm",f=i?"px-2 py-0.5":"px-2.5 py-1";let d;e[0]!==o.color||e[1]!==f?(d=X("inline-flex items-center gap-1 rounded-full border text-xs font-medium",f,o.color),e[0]=o.color,e[1]=f,e[2]=d):d=e[2];const m=i?12:14;let x;e[3]!==a||e[4]!==m?(x=s.jsx(a,{size:m}),e[3]=a,e[4]=m,e[5]=x):x=e[5];let u;return e[6]!==o.label||e[7]!==d||e[8]!==x?(u=s.jsxs("span",{className:d,children:[x,o.label]}),e[6]=o.label,e[7]=d,e[8]=x,e[9]=u):u=e[9],u}function be(t){const e=A.c(11),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(c=ne.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=c):c=e[3];let o;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(o=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=o):o=e[7];let a;return e[8]!==c||e[9]!==o?(a={queryKey:c,queryFn:o,staleTime:6e4},e[8]=c,e[9]=o,e[10]=a):a=e[10],ue(a)}function rt(t){const e=A.c(10),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?(c=ne.report(l,t),e[0]=l,e[1]=t,e[2]=c):c=e[2];let o;e[3]!==t||e[4]!==n?(o=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=o):o=e[5];const a=!!t;let i;return e[6]!==c||e[7]!==o||e[8]!==a?(i={queryKey:c,queryFn:o,enabled:a,staleTime:6e4},e[6]=c,e[7]=o,e[8]=a,e[9]=i):i=e[9],ue(i)}const at={passing:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400",failing:"text-red-600 dark:text-red-400",info:"text-blue-600 dark:text-blue-400"},ct={passing:"bg-emerald-500/10 border-emerald-500/20",warning:"bg-amber-500/10 border-amber-500/20",failing:"bg-red-500/10 border-red-500/20",info:"bg-blue-500/10 border-blue-500/20"};function dt(t){const e=A.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(We,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function mt(t){const e=A.c(11),{current:l,previous:n}=t,c=typeof l=="number"?l:parseFloat(l),o=typeof n=="number"?n:parseFloat(n);if(isNaN(c)||isNaN(o))return null;const a=c-o;if(a===0){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs text-muted-foreground",children:[s.jsx(Ce,{size:12}),"no change"]}),e[0]=g):g=e[0],g}const i=a>0;let f;e[1]!==a?(f=a.toFixed(1),e[1]=a,e[2]=f):f=e[2];const d=`${i?"+":""}${f}`,m=i?"text-red-500":"text-emerald-500";let x;e[3]!==m?(x=X("inline-flex items-center gap-0.5 text-xs",m),e[3]=m,e[4]=x):x=e[4];let u;e[5]!==i?(u=i?s.jsx(Je,{size:12}):s.jsx(Ye,{size:12}),e[5]=i,e[6]=u):u=e[6];let p;return e[7]!==d||e[8]!==x||e[9]!==u?(p=s.jsxs("span",{className:x,children:[u,d]}),e[7]=d,e[8]=x,e[9]=u,e[10]=p):p=e[10],p}function ut(t){const e=A.c(22),{metric:l}=t,n=l.status?at[l.status]:"text-foreground",c=l.status?ct[l.status]:"bg-muted/50 border-border";let o;e[0]!==c?(o=X("flex flex-col gap-1 rounded-lg border p-4",c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==l.label?(a=s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:l.label}),e[2]=l.label,e[3]=a):a=e[3];let i;e[4]!==n?(i=X("text-2xl font-semibold tabular-nums",n),e[4]=n,e[5]=i):i=e[5];let f;e[6]!==l.value||e[7]!==i?(f=s.jsx("span",{className:i,children:l.value}),e[6]=l.value,e[7]=i,e[8]=f):f=e[8];let d;e[9]!==l.unit?(d=l.unit&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l.unit}),e[9]=l.unit,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];let x;e[14]!==l.previousValue||e[15]!==l.value?(x=l.previousValue!==void 0&&s.jsx(mt,{current:l.value,previous:l.previousValue}),e[14]=l.previousValue,e[15]=l.value,e[16]=x):x=e[16];let u;return e[17]!==o||e[18]!==a||e[19]!==m||e[20]!==x?(u=s.jsxs("div",{className:o,children:[a,m,x]}),e[17]=o,e[18]=a,e[19]=m,e[20]=x,e[21]=u):u=e[21],u}function ft(t){const e=A.c(9),{title:l,items:n}=t;let c;e[0]!==l?(c=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;e[2]!==n?(o=n.map(xt),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:o}),e[4]=o,e[5]=a):a=e[5];let i;return e[6]!==c||e[7]!==a?(i=s.jsxs("div",{className:"space-y-3",children:[c,a]}),e[6]=c,e[7]=a,e[8]=i):i=e[8],i}function xt(t,e){return s.jsx(ut,{metric:t},`${t.label}-${e}`)}function pt(t){const e=A.c(16),{title:l,columns:n,rows:c}=t;let o;e[0]!==l?(o=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=o):o=e[1];let a;e[2]!==n?(a=n.map(jt),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==a?(i=s.jsx(Ke,{children:s.jsx(Se,{children:a})}),e[4]=a,e[5]=i):i=e[5];let f;e[6]!==c?(f=c.map(gt),e[6]=c,e[7]=f):f=e[7];let d;e[8]!==f?(d=s.jsx(He,{children:f}),e[8]=f,e[9]=d):d=e[9];let m;e[10]!==i||e[11]!==d?(m=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(Qe,{children:[i,d]})}),e[10]=i,e[11]=d,e[12]=m):m=e[12];let x;return e[13]!==o||e[14]!==m?(x=s.jsxs("div",{className:"space-y-3",children:[o,m]}),e[13]=o,e[14]=m,e[15]=x):x=e[15],x}function gt(t,e){return s.jsx(Se,{children:t.map(ht)},e)}function ht(t,e){return s.jsx(Ge,{children:t??s.jsx("span",{className:"text-muted-foreground",children:"-"})},e)}function jt(t){return s.jsx(Ve,{children:t},t)}function bt(t){const e=A.c(9),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(dt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(ft,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(pt,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}default:return null}}function yt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Nt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
|
|
1
|
+
import{r as ee,c as D,j as s,bB as le,z as ye,t as ce,u as we,a as Te,b as ze,bC as ke}from"./index-DXIsw0zh.js";import{c as Re}from"./binder-D1ZOF1Sc.js";import{u as ue}from"./useQuery-BB1xkDqD.js";import{h as Ie}from"./use-connection-BQuQwDk4.js";import{a as Pe,u as Me,j as Ee}from"./constants-D3TKhQyR.js";import{u as de,P as Le}from"./topbar-portal-BMMpyuIo.js";import{i as ie}from"./Loading01-CQxnYIyy.js";import{t as Ae}from"./Settings01-DZTt6EoC.js";import{i as De}from"./Check-BHtow5c6.js";import{t as Be}from"./ChevronDown-DIu5de-X.js";import{c as X,B as me}from"./button-B1_AjrAy.js";import{i as fe}from"./AlertCircle-54XkBG75.js";import{i as xe}from"./ArrowLeft-CYxjro91.js";import{n as oe}from"./CheckDone01-BkzpeEp8.js";import{s as Ne}from"./Clock-CwhFkG9v.js";import{a as Fe}from"./Copy01-qW8IV1YX.js";import{n as ve}from"./Inbox01-B8fBrw9y.js";import{i as Oe}from"./CheckCircle-DaStCoYU.js";import{i as qe}from"./InfoCircle-7KhXK-2T.js";import{i as Ue}from"./XCircle-DkU1KZH1.js";import{u as _e}from"./useMutation-B0HsJHYQ.js";import{T as Ve,b as Se,c as Ge,a as Ke,d as He,e as Qe}from"./table-D_QygT6-.js";import{M as We}from"./markdown-CGk5zbs1.js";import{i as Je,n as Ye}from"./ArrowUp-DRhMKIK5.js";import{B as Xe}from"./badge-D7RdE5x4.js";import{b as Ze,c as et,d as tt,a as st,C as lt}from"./card-CuDdPQFh.js";import{c as pe,d as re,a as ge,b as he,S as je}from"./select-Dtkbt4-O.js";import"./index-DGQeUY5q.js";const Ce=({size:t=24,color:e="currentColor",...l})=>ee.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},ee.createElement("path",{d:"M5 12h14"}));Ce.displayName="Minus";const ne={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function nt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function it(t){const e=D.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:c}=t,[o,a]=ee.useState(!1),i=ee.useRef(null);let f;if(e[0]!==l||e[1]!==n){let r;e[3]!==n?(r=N=>N.id===n,e[3]=n,e[4]=r):r=e[4],f=l.find(r),e[0]=l,e[1]=n,e[2]=f}else f=e[2];const d=f;let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=r=>{i.current?.contains(r.relatedTarget)||a(!1)},e[5]=m):m=e[5];const x=m;if(l.length===1){let r;e[6]!==d?(r=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[6]=d,e[7]=r):r=e[7];const N=d?.title||"Reports";let j;e[8]!==N?(j=s.jsx("span",{children:N}),e[8]=N,e[9]=j):j=e[9];let C;return e[10]!==r||e[11]!==j?(C=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[r,j]}),e[10]=r,e[11]=j,e[12]=C):C=e[12],C}let u;e[13]!==o?(u=()=>a(!o),e[13]=o,e[14]=u):u=e[14];let p;e[15]!==d?(p=d?.icon?s.jsx("img",{src:d.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),e[15]=d,e[16]=p):p=e[16];const g=d?.title||"Select source";let b;e[17]!==g?(b=s.jsx("span",{children:g}),e[17]=g,e[18]=b):b=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Be,{size:14}),e[19]=S):S=e[19];let v;e[20]!==u||e[21]!==p||e[22]!==b?(v=s.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[p,b,S]}),e[20]=u,e[21]=p,e[22]=b,e[23]=v):v=e[23];let y;e[24]!==l||e[25]!==o||e[26]!==c||e[27]!==n?(y=o&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(r=>s.jsxs("button",{type:"button",onClick:()=>{c(r.id),a(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[r.icon?s.jsx("img",{src:r.icon,alt:"",className:"size-4 rounded"}):s.jsx(le,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:r.title}),r.id===n&&s.jsx(De,{size:14,className:"text-primary"})]},r.id))}),e[24]=l,e[25]=o,e[26]=c,e[27]=n,e[28]=y):y=e[28];let _;return e[29]!==v||e[30]!==y?(_=s.jsxs("div",{className:"relative",ref:i,onBlur:x,children:[v,y]}),e[29]=v,e[30]=y,e[31]=_):_=e[31],_}function ot(t){const e=D.c(2);let l;return e[0]!==t?(l=s.jsx(it,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ae={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:Oe},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:fe},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:Ue},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:qe}};function $e(t){const e=D.c(10),{status:l,size:n}=t,c=n===void 0?"default":n,o=ae[l]??ae.info,a=o.icon,i=c==="sm",f=i?"px-2 py-0.5":"px-2.5 py-1";let d;e[0]!==o.color||e[1]!==f?(d=X("inline-flex items-center gap-1 rounded-full border text-xs font-medium",f,o.color),e[0]=o.color,e[1]=f,e[2]=d):d=e[2];const m=i?12:14;let x;e[3]!==a||e[4]!==m?(x=s.jsx(a,{size:m}),e[3]=a,e[4]=m,e[5]=x):x=e[5];let u;return e[6]!==o.label||e[7]!==d||e[8]!==x?(u=s.jsxs("span",{className:d,children:[x,o.label]}),e[6]=o.label,e[7]=d,e[8]=x,e[9]=u):u=e[9],u}function be(t){const e=D.c(11),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(c=ne.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=c):c=e[3];let o;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(o=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=o):o=e[7];let a;return e[8]!==c||e[9]!==o?(a={queryKey:c,queryFn:o,staleTime:6e4},e[8]=c,e[9]=o,e[10]=a):a=e[10],ue(a)}function rt(t){const e=D.c(10),{connectionId:l,toolCaller:n}=de();let c;e[0]!==l||e[1]!==t?(c=ne.report(l,t),e[0]=l,e[1]=t,e[2]=c):c=e[2];let o;e[3]!==t||e[4]!==n?(o=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=o):o=e[5];const a=!!t;let i;return e[6]!==c||e[7]!==o||e[8]!==a?(i={queryKey:c,queryFn:o,enabled:a,staleTime:6e4},e[6]=c,e[7]=o,e[8]=a,e[9]=i):i=e[9],ue(i)}const at={passing:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400",failing:"text-red-600 dark:text-red-400",info:"text-blue-600 dark:text-blue-400"},ct={passing:"bg-emerald-500/10 border-emerald-500/20",warning:"bg-amber-500/10 border-amber-500/20",failing:"bg-red-500/10 border-red-500/20",info:"bg-blue-500/10 border-blue-500/20"};function dt(t){const e=D.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(We,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function mt(t){const e=D.c(11),{current:l,previous:n}=t,c=typeof l=="number"?l:parseFloat(l),o=typeof n=="number"?n:parseFloat(n);if(isNaN(c)||isNaN(o))return null;const a=c-o;if(a===0){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs text-muted-foreground",children:[s.jsx(Ce,{size:12}),"no change"]}),e[0]=g):g=e[0],g}const i=a>0;let f;e[1]!==a?(f=a.toFixed(1),e[1]=a,e[2]=f):f=e[2];const d=`${i?"+":""}${f}`,m=i?"text-red-500":"text-emerald-500";let x;e[3]!==m?(x=X("inline-flex items-center gap-0.5 text-xs",m),e[3]=m,e[4]=x):x=e[4];let u;e[5]!==i?(u=i?s.jsx(Je,{size:12}):s.jsx(Ye,{size:12}),e[5]=i,e[6]=u):u=e[6];let p;return e[7]!==d||e[8]!==x||e[9]!==u?(p=s.jsxs("span",{className:x,children:[u,d]}),e[7]=d,e[8]=x,e[9]=u,e[10]=p):p=e[10],p}function ut(t){const e=D.c(22),{metric:l}=t,n=l.status?at[l.status]:"text-foreground",c=l.status?ct[l.status]:"bg-muted/50 border-border";let o;e[0]!==c?(o=X("flex flex-col gap-1 rounded-lg border p-4",c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==l.label?(a=s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:l.label}),e[2]=l.label,e[3]=a):a=e[3];let i;e[4]!==n?(i=X("text-2xl font-semibold tabular-nums",n),e[4]=n,e[5]=i):i=e[5];let f;e[6]!==l.value||e[7]!==i?(f=s.jsx("span",{className:i,children:l.value}),e[6]=l.value,e[7]=i,e[8]=f):f=e[8];let d;e[9]!==l.unit?(d=l.unit&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l.unit}),e[9]=l.unit,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];let x;e[14]!==l.previousValue||e[15]!==l.value?(x=l.previousValue!==void 0&&s.jsx(mt,{current:l.value,previous:l.previousValue}),e[14]=l.previousValue,e[15]=l.value,e[16]=x):x=e[16];let u;return e[17]!==o||e[18]!==a||e[19]!==m||e[20]!==x?(u=s.jsxs("div",{className:o,children:[a,m,x]}),e[17]=o,e[18]=a,e[19]=m,e[20]=x,e[21]=u):u=e[21],u}function ft(t){const e=D.c(9),{title:l,items:n}=t;let c;e[0]!==l?(c=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;e[2]!==n?(o=n.map(xt),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:o}),e[4]=o,e[5]=a):a=e[5];let i;return e[6]!==c||e[7]!==a?(i=s.jsxs("div",{className:"space-y-3",children:[c,a]}),e[6]=c,e[7]=a,e[8]=i):i=e[8],i}function xt(t,e){return s.jsx(ut,{metric:t},`${t.label}-${e}`)}function pt(t){const e=D.c(16),{title:l,columns:n,rows:c}=t;let o;e[0]!==l?(o=l&&s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[0]=l,e[1]=o):o=e[1];let a;e[2]!==n?(a=n.map(jt),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==a?(i=s.jsx(Ke,{children:s.jsx(Se,{children:a})}),e[4]=a,e[5]=i):i=e[5];let f;e[6]!==c?(f=c.map(gt),e[6]=c,e[7]=f):f=e[7];let d;e[8]!==f?(d=s.jsx(He,{children:f}),e[8]=f,e[9]=d):d=e[9];let m;e[10]!==i||e[11]!==d?(m=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(Qe,{children:[i,d]})}),e[10]=i,e[11]=d,e[12]=m):m=e[12];let x;return e[13]!==o||e[14]!==m?(x=s.jsxs("div",{className:"space-y-3",children:[o,m]}),e[13]=o,e[14]=m,e[15]=x):x=e[15],x}function gt(t,e){return s.jsx(Se,{children:t.map(ht)},e)}function ht(t,e){return s.jsx(Ge,{children:t??s.jsx("span",{className:"text-muted-foreground",children:"-"})},e)}function jt(t){return s.jsx(Ve,{children:t},t)}function bt(t){const e=D.c(9),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(dt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(ft,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(pt,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}default:return null}}function yt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Nt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
|
|
2
2
|
`)),e.push("");for(const n of t.sections)switch(n.type){case"markdown":e.push(n.content),e.push("");break;case"metrics":{n.title&&(e.push(`## ${n.title}`),e.push(""));const c=["Metric","Value","Previous","Status"],o=n.items.some(a=>a.unit);e.push(`| ${c.join(" | ")} |`),e.push(`| ${c.map(()=>"---").join(" | ")} |`);for(const a of n.items){const i=o&&a.unit?`${a.value} ${a.unit}`:`${a.value}`,f=a.previousValue!=null?o&&a.unit?`${a.previousValue} ${a.unit}`:`${a.previousValue}`:"—",d=a.status??"—";e.push(`| ${a.label} | ${i} | ${f} | ${d} |`)}e.push("");break}case"table":{n.title&&(e.push(`## ${n.title}`),e.push("")),e.push(`| ${n.columns.join(" | ")} |`),e.push(`| ${n.columns.map(()=>"---").join(" | ")} |`);for(const c of n.rows)e.push(`| ${c.map(o=>o==null?"—":`${o}`).join(" | ")} |`);e.push("");break}}return e.join(`
|
|
3
|
-
`).trim()}function vt(t){const e=A.c(88),{reportId:l,onBack:n}=t,{connectionId:c,toolCaller:o}=de(),a=ye(),{data:i,isLoading:f,error:d}=rt(l),m=i?.lifecycleStatus==="dismissed";let x;e[0]!==m||e[1]!==l||e[2]!==o?(x=async()=>o("REPORTS_UPDATE_STATUS",{reportId:l,lifecycleStatus:m?"read":"dismissed"}),e[0]=m,e[1]=l,e[2]=o,e[3]=x):x=e[3];let u;e[4]!==c||e[5]!==m||e[6]!==n||e[7]!==a?(u=()=>{ce.success(m?"Report restored to inbox":"Report marked as done"),a.invalidateQueries({queryKey:ne.reportsList(c)}),n()},e[4]=c,e[5]=m,e[6]=n,e[7]=a,e[8]=u):u=e[8];let p;e[9]!==x||e[10]!==u?(p={mutationFn:x,onSuccess:u,onError:Ct},e[9]=x,e[10]=u,e[11]=p):p=e[11];const g=_e(p);if(f){let D;return e[12]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[12]=D):D=e[12],D}if(d||!i){let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(fe,{size:48,className:"text-destructive mb-4"}),e[13]=D):D=e[13];const J=d?"Error loading report":"Report not found";let U;e[14]!==J?(U=s.jsx("h3",{className:"text-lg font-medium mb-2",children:J}),e[14]=J,e[15]=U):U=e[15];const se=d?.message??"The requested report could not be found.";let Y;e[16]!==se?(Y=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:se}),e[16]=se,e[17]=Y):Y=e[17];let K;e[18]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(xe,{size:14,className:"mr-1"}),e[18]=K):K=e[18];let H;e[19]!==n?(H=s.jsxs(me,{variant:"outline",onClick:n,children:[K,"Back to reports"]}),e[19]=n,e[20]=H):H=e[20];let F;return e[21]!==H||e[22]!==U||e[23]!==Y?(F=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[D,U,Y,H]}),e[21]=H,e[22]=U,e[23]=Y,e[24]=F):F=e[24],F}let b;e[25]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[25]=b):b=e[25];let S;e[26]!==n?(S=s.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[b,"Reports"]}),e[26]=n,e[27]=S):S=e[27];let v;e[28]!==i?(v=()=>{const D=Nt(i);navigator.clipboard.writeText(D).then(St)},e[28]=i,e[29]=v):v=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Fe,{size:14}),e[30]=y):y=e[30];let _;e[31]!==v?(_=s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:v,children:[y,"Copy as Markdown"]}),e[31]=v,e[32]=_):_=e[32];let r;e[33]!==g?(r=()=>g.mutate(),e[33]=g,e[34]=r):r=e[34];let N;e[35]!==m||e[36]!==g.isPending?(N=g.isPending?s.jsx(ie,{size:14,className:"animate-spin"}):m?s.jsx(ve,{size:14}):s.jsx(oe,{size:14}),e[35]=m,e[36]=g.isPending,e[37]=N):N=e[37];const j=m?"Move to inbox":"Mark as done";let C;e[38]!==g.isPending||e[39]!==N||e[40]!==j||e[41]!==r?(C=s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:r,disabled:g.isPending,children:[N,j]}),e[38]=g.isPending,e[39]=N,e[40]=j,e[41]=r,e[42]=C):C=e[42];let $;e[43]!==C||e[44]!==_?($=s.jsxs("div",{className:"flex items-center gap-2",children:[_,C]}),e[43]=C,e[44]=_,e[45]=$):$=e[45];let z;e[46]!==$||e[47]!==S?(z=s.jsxs("div",{className:"flex items-center justify-between",children:[S,$]}),e[46]=$,e[47]=S,e[48]=z):z=e[48];let w;e[49]!==i.title?(w=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:i.title}),e[49]=i.title,e[50]=w):w=e[50];let k;e[51]!==i.summary?(k=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.summary}),e[51]=i.summary,e[52]=k):k=e[52];let P;e[53]!==w||e[54]!==k?(P=s.jsxs("div",{className:"space-y-1 min-w-0",children:[w,k]}),e[53]=w,e[54]=k,e[55]=P):P=e[55];let M;e[56]!==i.status?(M=s.jsx($e,{status:i.status}),e[56]=i.status,e[57]=M):M=e[57];let R;e[58]!==P||e[59]!==M?(R=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[P,M]}),e[58]=P,e[59]=M,e[60]=R):R=e[60];let T;e[61]!==i.category?(T=s.jsx("span",{className:"capitalize",children:i.category}),e[61]=i.category,e[62]=T):T=e[62];let I;e[63]!==i.source?(I=i.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:i.source})]}),e[63]=i.source,e[64]=I):I=e[64];let E;e[65]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{className:"text-border",children:"|"}),e[65]=E):E=e[65];let B;e[66]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Ne,{size:12}),e[66]=B):B=e[66];let L;e[67]!==i.updatedAt?(L=yt(i.updatedAt),e[67]=i.updatedAt,e[68]=L):L=e[68];let h;e[69]!==L?(h=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[B,L]}),e[69]=L,e[70]=h):h=e[70];let O;e[71]!==T||e[72]!==I||e[73]!==h?(O=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[T,I,E,h]}),e[71]=T,e[72]=I,e[73]=h,e[74]=O):O=e[74];let Q;e[75]!==z||e[76]!==R||e[77]!==O?(Q=s.jsxs("div",{className:"border-b border-border px-6 py-4 space-y-3",children:[z,R,O]}),e[75]=z,e[76]=R,e[77]=O,e[78]=Q):Q=e[78];let q;e[79]!==i.sections?(q=i.sections??[],e[79]=i.sections,e[80]=q):q=e[80];let V;e[81]!==q?(V=q.map(_t),e[81]=q,e[82]=V):V=e[82];let W;e[83]!==V?(W=s.jsx("div",{className:"flex-1 px-6 py-6 space-y-8",children:V}),e[83]=V,e[84]=W):W=e[84];let G;return e[85]!==Q||e[86]!==W?(G=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto",children:[Q,W]}),e[85]=Q,e[86]=W,e[87]=G):G=e[87],G}function _t(t,e){return s.jsx(bt,{section:t},e)}function St(){ce.success("Copied report as Markdown")}function Ct(t){ce.error(`Failed to update report: ${t.message}`)}function $t(t){const e=Date.now()-new Date(t).getTime(),l=Math.floor(e/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const n=Math.floor(l/60);if(n<24)return`${n}h ago`;const c=Math.floor(n/24);return c<30?`${c}d ago`:new Date(t).toLocaleDateString()}function wt(t){const e=A.c(57),{report:l,isDoneTab:n,onSelect:c,onDismiss:o}=t,a=!l.lifecycleStatus||l.lifecycleStatus==="unread",i=n?"opacity-60":"hover:shadow-md";let f;e[0]!==i?(f=X("group relative cursor-pointer transition-shadow",i),e[0]=i,e[1]=f):f=e[1];let d;e[2]!==c||e[3]!==l.id?(d=()=>c(l.id),e[2]=c,e[3]=l.id,e[4]=d):d=e[4];let m;e[5]!==a?(m=a&&s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 rounded-l-xl bg-primary"}),e[5]=a,e[6]=m):m=e[6];const x=a&&"font-bold";let u;e[7]!==x?(u=X("text-sm leading-snug line-clamp-2",x),e[7]=x,e[8]=u):u=e[8];let p;e[9]!==l.title||e[10]!==u?(p=s.jsx(Ze,{className:u,children:l.title}),e[9]=l.title,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l.status?(g=s.jsx($e,{status:l.status,size:"sm"}),e[12]=l.status,e[13]=g):g=e[13];const b=n?"Restore to inbox":"Mark as done",S=n?"text-muted-foreground hover:text-foreground hover:bg-accent":"text-muted-foreground/0 group-hover:text-muted-foreground hover:!text-emerald-600 hover:bg-emerald-500/10";let v;e[14]!==S?(v=X("rounded-md p-1 transition-colors",S),e[14]=S,e[15]=v):v=e[15];let y;e[16]!==n||e[17]!==o||e[18]!==l.id?(y=E=>{E.stopPropagation(),o(l.id,!n)},e[16]=n,e[17]=o,e[18]=l.id,e[19]=y):y=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(oe,{size:14}),e[20]=_):_=e[20];let r;e[21]!==v||e[22]!==y||e[23]!==b?(r=s.jsx("button",{type:"button",title:b,className:v,onClick:y,children:_}),e[21]=v,e[22]=y,e[23]=b,e[24]=r):r=e[24];let N;e[25]!==r||e[26]!==g?(N=s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[g,r]}),e[25]=r,e[26]=g,e[27]=N):N=e[27];let j;e[28]!==N||e[29]!==p?(j=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p,N]}),e[28]=N,e[29]=p,e[30]=j):j=e[30];let C;e[31]!==l.summary?(C=s.jsx(et,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[31]=l.summary,e[32]=C):C=e[32];let $;e[33]!==j||e[34]!==C?($=s.jsxs(tt,{className:"pb-2 pt-5 px-5",children:[j,C]}),e[33]=j,e[34]=C,e[35]=$):$=e[35];let z;e[36]!==l.category?(z=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[36]=l.category,e[37]=z):z=e[37];let w;e[38]!==l.source?(w=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[38]=l.source,e[39]=w):w=e[39];let k;e[40]!==z||e[41]!==w?(k=s.jsxs("div",{className:"flex items-center gap-3",children:[z,w]}),e[40]=z,e[41]=w,e[42]=k):k=e[42];let P;e[43]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Ne,{size:12}),e[43]=P):P=e[43];let M;e[44]!==l.updatedAt?(M=$t(l.updatedAt),e[44]=l.updatedAt,e[45]=M):M=e[45];let R;e[46]!==M?(R=s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[P,M]})}),e[46]=M,e[47]=R):R=e[47];let T;e[48]!==k||e[49]!==R?(T=s.jsx(st,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[k,R]})}),e[48]=k,e[49]=R,e[50]=T):T=e[50];let I;return e[51]!==$||e[52]!==f||e[53]!==T||e[54]!==d||e[55]!==m?(I=s.jsxs(lt,{className:f,onClick:d,children:[m,$,T]}),e[51]=$,e[52]=f,e[53]=T,e[54]=d,e[55]=m,e[56]=I):I=e[56],I}function Tt(t){const e=A.c(24),{category:l,status:n,categories:c,onCategoryChange:o,onStatusChange:a}=t,i=l??"__all__";let f;e[0]!==o?(f=j=>o(j==="__all__"?void 0:j),e[0]=o,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{size:"sm",children:s.jsx(he,{placeholder:"All categories"})}),e[2]=d):d=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(re,{value:"__all__",children:"All categories"}),e[3]=m):m=e[3];let x;e[4]!==c?(x=c.map(kt),e[4]=c,e[5]=x):x=e[5];let u;e[6]!==x?(u=s.jsxs(pe,{children:[m,x]}),e[6]=x,e[7]=u):u=e[7];let p;e[8]!==i||e[9]!==f||e[10]!==u?(p=s.jsxs(je,{value:i,onValueChange:f,children:[d,u]}),e[8]=i,e[9]=f,e[10]=u,e[11]=p):p=e[11];const g=n??"__all__";let b;e[12]!==a?(b=j=>a(j==="__all__"?void 0:j),e[12]=a,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ge,{size:"sm",children:s.jsx(he,{placeholder:"All statuses"})}),e[14]=S):S=e[14];let v,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(re,{value:"__all__",children:"All statuses"}),y=Object.keys(ae),e[15]=v,e[16]=y):(v=e[15],y=e[16]);let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(pe,{children:[v,y.map(zt)]}),e[17]=_):_=e[17];let r;e[18]!==g||e[19]!==b?(r=s.jsxs(je,{value:g,onValueChange:b,children:[S,_]}),e[18]=g,e[19]=b,e[20]=r):r=e[20];let N;return e[21]!==r||e[22]!==p?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[p,r]}),e[21]=r,e[22]=p,e[23]=N):N=e[23],N}function zt(t){return s.jsx(re,{value:t,children:ae[t].label},t)}function kt(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function Rt(t){const e=A.c(51),{onSelectReport:l}=t,[n,c]=ee.useState("inbox"),[o,a]=ee.useState(),[i,f]=ee.useState(),{connectionId:d,toolCaller:m}=de(),x=ye();let u;e[0]!==o||e[1]!==i?(u={category:o,status:i},e[0]=o,e[1]=i,e[2]=u):u=e[2];const{data:p,isLoading:g,error:b}=be(u),S=p?.reports??[],v=S.filter(Lt),y=S.filter(Et),_=n==="inbox"?v:y,r=v.filter(Mt).length,{data:N}=be();let j;e[3]!==N?.reports?(j=[...new Set((N?.reports??[]).map(Pt))].sort(),e[3]=N?.reports,e[4]=j):j=e[4];const C=j;let $;e[5]!==m?($=async F=>{const{reportId:Z,lifecycleStatus:te}=F;return m("REPORTS_UPDATE_STATUS",{reportId:Z,lifecycleStatus:te})},e[5]=m,e[6]=$):$=e[6];let z;e[7]!==d||e[8]!==x?(z=()=>{x.invalidateQueries({queryKey:ne.reportsList(d)})},e[7]=d,e[8]=x,e[9]=z):z=e[9];let w;e[10]!==$||e[11]!==z?(w={mutationFn:$,onSuccess:z,onError:It},e[10]=$,e[11]=z,e[12]=w):w=e[12];const k=_e(w);let P;e[13]!==k?(P=(F,Z)=>{k.mutate({reportId:F,lifecycleStatus:Z?"dismissed":"read"})},e[13]=k,e[14]=P):P=e[14];const M=P;if(b){let F,Z;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(fe,{size:48,className:"text-destructive mb-4"}),Z=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[15]=F,e[16]=Z):(F=e[15],Z=e[16]);let te;return e[17]!==b.message?(te=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[F,Z,s.jsx("p",{className:"text-muted-foreground text-center",children:b.message})]}),e[17]=b.message,e[18]=te):te=e[18],te}const R="flex flex-col h-full";let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=()=>c("inbox"),e[19]=T):T=e[19];const I=n==="inbox"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let E;e[20]!==I?(E=X("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",I),e[20]=I,e[21]=E):E=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ve,{size:14}),e[22]=B):B=e[22];let L;e[23]!==g||e[24]!==r?(L=!g&&r>0&&s.jsx(Xe,{variant:"default",className:"text-[10px] px-1.5 py-0 h-4",children:r}),e[23]=g,e[24]=r,e[25]=L):L=e[25];let h;e[26]!==E||e[27]!==L?(h=s.jsxs("button",{type:"button",onClick:T,className:E,children:[B,"Inbox",L]}),e[26]=E,e[27]=L,e[28]=h):h=e[28];let O;e[29]===Symbol.for("react.memo_cache_sentinel")?(O=()=>c("done"),e[29]=O):O=e[29];const Q=n==="done"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let q;e[30]!==Q?(q=X("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",Q),e[30]=Q,e[31]=q):q=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(oe,{size:14}),e[32]=V):V=e[32];const W=!g&&y.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:y.length});let G;e[33]!==q||e[34]!==W?(G=s.jsxs("button",{type:"button",onClick:O,className:q,children:[V,"Done",W]}),e[33]=q,e[34]=W,e[35]=G):G=e[35];let D;e[36]!==h||e[37]!==G?(D=s.jsxs("div",{className:"flex items-center gap-1",children:[h,G]}),e[36]=h,e[37]=G,e[38]=D):D=e[38];let J;e[39]!==C||e[40]!==o||e[41]!==i?(J=s.jsx(Tt,{category:o,status:i,categories:C,onCategoryChange:a,onStatusChange:f}),e[39]=C,e[40]=o,e[41]=i,e[42]=J):J=e[42];let U;e[43]!==D||e[44]!==J?(U=s.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[D,J]}),e[43]=D,e[44]=J,e[45]=U):U=e[45];const se="flex-1 overflow-y-auto p-6",Y=g?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):_.length===0?s.jsx("div",{className:"flex flex-col items-center justify-center h-full text-center",children:n==="done"?s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No dismissed reports"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports you mark as done will appear here."})]}):s.jsxs(s.Fragment,{children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:o||i?"No reports match filters":"Inbox is empty"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:o||i?"Try adjusting your filters.":"Reports will appear here once the connected MCP server provides them."})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:_.map(F=>s.jsx(wt,{report:F,isDoneTab:n==="done",onSelect:l,onDismiss:M},F.id))});let K;e[46]!==Y?(K=s.jsx("div",{className:se,children:Y}),e[46]=Y,e[47]=K):K=e[47];let H;return e[48]!==U||e[49]!==K?(H=s.jsxs("div",{className:R,children:[U,K]}),e[48]=U,e[49]=K,e[50]=H):H=e[50],H}function It(t){ce.error(`Failed to update report: ${t.message}`)}function Pt(t){return t.category}function Mt(t){return!t.lifecycleStatus||t.lifecycleStatus==="unread"}function Et(t){return t.lifecycleStatus==="dismissed"}function Lt(t){return t.lifecycleStatus!=="dismissed"}function Dt(t){return t?t.filter(e=>Re(e,ke)):[]}function xs(){const t=A.c(58),{org:e,project:l}=we();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const c=Te(n),o=ze(),a=Ie(),i=c.reportId??null;let f;t[1]!==o?(f=h=>{o({search:h?{reportId:h}:{},replace:!0})},t[1]=o,t[2]=f):f=t[2];const d=f;let m;t[3]!==e.id?(m={connectionId:Pe,orgId:e.id},t[3]=e.id,t[4]=m):m=t[4];const x=Me(m);let u;t[5]!==l.id?(u=ne.pluginConfig(l.id??"","reports"),t[5]=l.id,t[6]=u):u=t[6];let p;t[7]!==l.id||t[8]!==x?(p=async()=>{const h=await x.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"reports"}});return h.structuredContent??h},t[7]=l.id,t[8]=x,t[9]=p):p=t[9];const g=!!l.id;let b;t[10]!==u||t[11]!==p||t[12]!==g?(b={queryKey:u,queryFn:p,enabled:g},t[10]=u,t[11]=p,t[12]=g,t[13]=b):b=t[13];const{data:S,isLoading:v}=ue(b);let y,_;if(t[14]!==a||t[15]!==S?.config?.connectionId){_=Dt(a);const h=S?.config?.connectionId;y=h?_.find(O=>O.id===h):null,t[14]=a,t[15]=S?.config?.connectionId,t[16]=y,t[17]=_}else y=t[16],_=t[17];const r=y,N=r?.id;let j;t[18]!==e.id||t[19]!==N?(j={connectionId:N,orgId:e.id},t[18]=e.id,t[19]=N,t[20]=j):j=t[20];const C=Ee(j);let $;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?($={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=$):$=t[24];const z=$;if(v){let h;return t[25]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=h):h=t[25],h}if(_.length===0){let h;return t[26]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(nt,{}),t[26]=h):h=t[26],h}if(!r){let h;return t[27]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(De,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=h):h=t[27],h}let w;t[28]!==r.app_id||t[29]!==r.app_name||t[30]!==r.description||t[31]!==r.icon||t[32]!==r.id||t[33]!==r.metadata||t[34]!==r.title||t[35]!==r.tools?(w={id:r.id,title:r.title,icon:r.icon,description:r.description,app_name:r.app_name,app_id:r.app_id,tools:r.tools,metadata:r.metadata},t[28]=r.app_id,t[29]=r.app_name,t[30]=r.description,t[31]=r.icon,t[32]=r.id,t[33]=r.metadata,t[34]=r.title,t[35]=r.tools,t[36]=w):w=t[36];let k;t[37]!==C?(k=(h,O)=>C?C.callTool({name:h,arguments:O}).then(Bt):Promise.reject(new Error("MCP client is not available")),t[37]=C,t[38]=k):k=t[38];const P=k;let M;t[39]!==r.id||t[40]!==z||t[41]!==w||t[42]!==P?(M={connectionId:r.id,connection:w,toolCaller:P,org:z,session:null},t[39]=r.id,t[40]=z,t[41]=w,t[42]=P,t[43]=M):M=t[43];const R=M;let T;t[44]!==R.connection?(T=[R.connection],t[44]=R.connection,t[45]=T):T=t[45];let I;t[46]!==r.id||t[47]!==T?(I=s.jsx("div",{className:"flex items-center px-6 py-3 border-b border-border",children:s.jsx(ot,{connections:T,selectedConnectionId:r.id,onConnectionChange:At})}),t[46]=r.id,t[47]=T,t[48]=I):I=t[48];let E;t[49]!==i||t[50]!==d?(E=s.jsx("div",{className:"flex-1 overflow-hidden",children:i?s.jsx(vt,{reportId:i,onBack:()=>d(null)}):s.jsx(Rt,{onSelectReport:d})}),t[49]=i,t[50]=d,t[51]=E):E=t[51];let B;t[52]!==I||t[53]!==E?(B=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[I,E]}),t[52]=I,t[53]=E,t[54]=B):B=t[54];let L;return t[55]!==R||t[56]!==B?(L=s.jsx(Le,{value:R,children:B}),t[55]=R,t[56]=B,t[57]=L):L=t[57],L}function At(){}function Bt(t){return t.structuredContent??t}export{xs as default};
|
|
3
|
+
`).trim()}function vt(t){const e=D.c(88),{reportId:l,onBack:n}=t,{connectionId:c,toolCaller:o}=de(),a=ye(),{data:i,isLoading:f,error:d}=rt(l),m=i?.lifecycleStatus==="dismissed";let x;e[0]!==m||e[1]!==l||e[2]!==o?(x=async()=>o("REPORTS_UPDATE_STATUS",{reportId:l,lifecycleStatus:m?"read":"dismissed"}),e[0]=m,e[1]=l,e[2]=o,e[3]=x):x=e[3];let u;e[4]!==c||e[5]!==m||e[6]!==n||e[7]!==a?(u=()=>{ce.success(m?"Report restored to inbox":"Report marked as done"),a.invalidateQueries({queryKey:ne.reportsList(c)}),n()},e[4]=c,e[5]=m,e[6]=n,e[7]=a,e[8]=u):u=e[8];let p;e[9]!==x||e[10]!==u?(p={mutationFn:x,onSuccess:u,onError:Ct},e[9]=x,e[10]=u,e[11]=p):p=e[11];const g=_e(p);if(f){let A;return e[12]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[12]=A):A=e[12],A}if(d||!i){let A;e[13]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(fe,{size:48,className:"text-destructive mb-4"}),e[13]=A):A=e[13];const J=d?"Error loading report":"Report not found";let U;e[14]!==J?(U=s.jsx("h3",{className:"text-lg font-medium mb-2",children:J}),e[14]=J,e[15]=U):U=e[15];const se=d?.message??"The requested report could not be found.";let Y;e[16]!==se?(Y=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:se}),e[16]=se,e[17]=Y):Y=e[17];let K;e[18]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(xe,{size:14,className:"mr-1"}),e[18]=K):K=e[18];let H;e[19]!==n?(H=s.jsxs(me,{variant:"outline",onClick:n,children:[K,"Back to reports"]}),e[19]=n,e[20]=H):H=e[20];let F;return e[21]!==H||e[22]!==U||e[23]!==Y?(F=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[A,U,Y,H]}),e[21]=H,e[22]=U,e[23]=Y,e[24]=F):F=e[24],F}let b;e[25]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[25]=b):b=e[25];let S;e[26]!==n?(S=s.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[b,"Reports"]}),e[26]=n,e[27]=S):S=e[27];let v;e[28]!==i?(v=()=>{const A=Nt(i);navigator.clipboard.writeText(A).then(St)},e[28]=i,e[29]=v):v=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Fe,{size:14}),e[30]=y):y=e[30];let _;e[31]!==v?(_=s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:v,children:[y,"Copy as Markdown"]}),e[31]=v,e[32]=_):_=e[32];let r;e[33]!==g?(r=()=>g.mutate(),e[33]=g,e[34]=r):r=e[34];let N;e[35]!==m||e[36]!==g.isPending?(N=g.isPending?s.jsx(ie,{size:14,className:"animate-spin"}):m?s.jsx(ve,{size:14}):s.jsx(oe,{size:14}),e[35]=m,e[36]=g.isPending,e[37]=N):N=e[37];const j=m?"Move to inbox":"Mark as done";let C;e[38]!==g.isPending||e[39]!==N||e[40]!==j||e[41]!==r?(C=s.jsxs(me,{variant:"outline",size:"sm",className:"gap-1.5",onClick:r,disabled:g.isPending,children:[N,j]}),e[38]=g.isPending,e[39]=N,e[40]=j,e[41]=r,e[42]=C):C=e[42];let $;e[43]!==C||e[44]!==_?($=s.jsxs("div",{className:"flex items-center gap-2",children:[_,C]}),e[43]=C,e[44]=_,e[45]=$):$=e[45];let z;e[46]!==$||e[47]!==S?(z=s.jsxs("div",{className:"flex items-center justify-between",children:[S,$]}),e[46]=$,e[47]=S,e[48]=z):z=e[48];let w;e[49]!==i.title?(w=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:i.title}),e[49]=i.title,e[50]=w):w=e[50];let k;e[51]!==i.summary?(k=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.summary}),e[51]=i.summary,e[52]=k):k=e[52];let P;e[53]!==w||e[54]!==k?(P=s.jsxs("div",{className:"space-y-1 min-w-0",children:[w,k]}),e[53]=w,e[54]=k,e[55]=P):P=e[55];let M;e[56]!==i.status?(M=s.jsx($e,{status:i.status}),e[56]=i.status,e[57]=M):M=e[57];let R;e[58]!==P||e[59]!==M?(R=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[P,M]}),e[58]=P,e[59]=M,e[60]=R):R=e[60];let T;e[61]!==i.category?(T=s.jsx("span",{className:"capitalize",children:i.category}),e[61]=i.category,e[62]=T):T=e[62];let I;e[63]!==i.source?(I=i.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:i.source})]}),e[63]=i.source,e[64]=I):I=e[64];let E;e[65]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{className:"text-border",children:"|"}),e[65]=E):E=e[65];let B;e[66]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Ne,{size:12}),e[66]=B):B=e[66];let L;e[67]!==i.updatedAt?(L=yt(i.updatedAt),e[67]=i.updatedAt,e[68]=L):L=e[68];let h;e[69]!==L?(h=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[B,L]}),e[69]=L,e[70]=h):h=e[70];let O;e[71]!==T||e[72]!==I||e[73]!==h?(O=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[T,I,E,h]}),e[71]=T,e[72]=I,e[73]=h,e[74]=O):O=e[74];let Q;e[75]!==z||e[76]!==R||e[77]!==O?(Q=s.jsxs("div",{className:"border-b border-border px-6 py-4 space-y-3",children:[z,R,O]}),e[75]=z,e[76]=R,e[77]=O,e[78]=Q):Q=e[78];let q;e[79]!==i.sections?(q=i.sections??[],e[79]=i.sections,e[80]=q):q=e[80];let V;e[81]!==q?(V=q.map(_t),e[81]=q,e[82]=V):V=e[82];let W;e[83]!==V?(W=s.jsx("div",{className:"flex-1 px-6 py-6 space-y-8",children:V}),e[83]=V,e[84]=W):W=e[84];let G;return e[85]!==Q||e[86]!==W?(G=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto",children:[Q,W]}),e[85]=Q,e[86]=W,e[87]=G):G=e[87],G}function _t(t,e){return s.jsx(bt,{section:t},e)}function St(){ce.success("Copied report as Markdown")}function Ct(t){ce.error(`Failed to update report: ${t.message}`)}function $t(t){const e=Date.now()-new Date(t).getTime(),l=Math.floor(e/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const n=Math.floor(l/60);if(n<24)return`${n}h ago`;const c=Math.floor(n/24);return c<30?`${c}d ago`:new Date(t).toLocaleDateString()}function wt(t){const e=D.c(57),{report:l,isDoneTab:n,onSelect:c,onDismiss:o}=t,a=!l.lifecycleStatus||l.lifecycleStatus==="unread",i=n?"opacity-60":"hover:shadow-md";let f;e[0]!==i?(f=X("group relative cursor-pointer transition-shadow",i),e[0]=i,e[1]=f):f=e[1];let d;e[2]!==c||e[3]!==l.id?(d=()=>c(l.id),e[2]=c,e[3]=l.id,e[4]=d):d=e[4];let m;e[5]!==a?(m=a&&s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 rounded-l-xl bg-primary"}),e[5]=a,e[6]=m):m=e[6];const x=a&&"font-bold";let u;e[7]!==x?(u=X("text-sm leading-snug line-clamp-2",x),e[7]=x,e[8]=u):u=e[8];let p;e[9]!==l.title||e[10]!==u?(p=s.jsx(Ze,{className:u,children:l.title}),e[9]=l.title,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l.status?(g=s.jsx($e,{status:l.status,size:"sm"}),e[12]=l.status,e[13]=g):g=e[13];const b=n?"Restore to inbox":"Mark as done",S=n?"text-muted-foreground hover:text-foreground hover:bg-accent":"text-muted-foreground/0 group-hover:text-muted-foreground hover:!text-emerald-600 hover:bg-emerald-500/10";let v;e[14]!==S?(v=X("rounded-md p-1 transition-colors",S),e[14]=S,e[15]=v):v=e[15];let y;e[16]!==n||e[17]!==o||e[18]!==l.id?(y=E=>{E.stopPropagation(),o(l.id,!n)},e[16]=n,e[17]=o,e[18]=l.id,e[19]=y):y=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(oe,{size:14}),e[20]=_):_=e[20];let r;e[21]!==v||e[22]!==y||e[23]!==b?(r=s.jsx("button",{type:"button",title:b,className:v,onClick:y,children:_}),e[21]=v,e[22]=y,e[23]=b,e[24]=r):r=e[24];let N;e[25]!==r||e[26]!==g?(N=s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[g,r]}),e[25]=r,e[26]=g,e[27]=N):N=e[27];let j;e[28]!==N||e[29]!==p?(j=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[p,N]}),e[28]=N,e[29]=p,e[30]=j):j=e[30];let C;e[31]!==l.summary?(C=s.jsx(et,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[31]=l.summary,e[32]=C):C=e[32];let $;e[33]!==j||e[34]!==C?($=s.jsxs(tt,{className:"pb-2 pt-5 px-5",children:[j,C]}),e[33]=j,e[34]=C,e[35]=$):$=e[35];let z;e[36]!==l.category?(z=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[36]=l.category,e[37]=z):z=e[37];let w;e[38]!==l.source?(w=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[38]=l.source,e[39]=w):w=e[39];let k;e[40]!==z||e[41]!==w?(k=s.jsxs("div",{className:"flex items-center gap-3",children:[z,w]}),e[40]=z,e[41]=w,e[42]=k):k=e[42];let P;e[43]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Ne,{size:12}),e[43]=P):P=e[43];let M;e[44]!==l.updatedAt?(M=$t(l.updatedAt),e[44]=l.updatedAt,e[45]=M):M=e[45];let R;e[46]!==M?(R=s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[P,M]})}),e[46]=M,e[47]=R):R=e[47];let T;e[48]!==k||e[49]!==R?(T=s.jsx(st,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[k,R]})}),e[48]=k,e[49]=R,e[50]=T):T=e[50];let I;return e[51]!==$||e[52]!==f||e[53]!==T||e[54]!==d||e[55]!==m?(I=s.jsxs(lt,{className:f,onClick:d,children:[m,$,T]}),e[51]=$,e[52]=f,e[53]=T,e[54]=d,e[55]=m,e[56]=I):I=e[56],I}function Tt(t){const e=D.c(24),{category:l,status:n,categories:c,onCategoryChange:o,onStatusChange:a}=t,i=l??"__all__";let f;e[0]!==o?(f=j=>o(j==="__all__"?void 0:j),e[0]=o,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{size:"sm",children:s.jsx(he,{placeholder:"All categories"})}),e[2]=d):d=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(re,{value:"__all__",children:"All categories"}),e[3]=m):m=e[3];let x;e[4]!==c?(x=c.map(kt),e[4]=c,e[5]=x):x=e[5];let u;e[6]!==x?(u=s.jsxs(pe,{children:[m,x]}),e[6]=x,e[7]=u):u=e[7];let p;e[8]!==i||e[9]!==f||e[10]!==u?(p=s.jsxs(je,{value:i,onValueChange:f,children:[d,u]}),e[8]=i,e[9]=f,e[10]=u,e[11]=p):p=e[11];const g=n??"__all__";let b;e[12]!==a?(b=j=>a(j==="__all__"?void 0:j),e[12]=a,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ge,{size:"sm",children:s.jsx(he,{placeholder:"All statuses"})}),e[14]=S):S=e[14];let v,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(re,{value:"__all__",children:"All statuses"}),y=Object.keys(ae),e[15]=v,e[16]=y):(v=e[15],y=e[16]);let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(pe,{children:[v,y.map(zt)]}),e[17]=_):_=e[17];let r;e[18]!==g||e[19]!==b?(r=s.jsxs(je,{value:g,onValueChange:b,children:[S,_]}),e[18]=g,e[19]=b,e[20]=r):r=e[20];let N;return e[21]!==r||e[22]!==p?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[p,r]}),e[21]=r,e[22]=p,e[23]=N):N=e[23],N}function zt(t){return s.jsx(re,{value:t,children:ae[t].label},t)}function kt(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function Rt(t){const e=D.c(51),{onSelectReport:l}=t,[n,c]=ee.useState("inbox"),[o,a]=ee.useState(),[i,f]=ee.useState(),{connectionId:d,toolCaller:m}=de(),x=ye();let u;e[0]!==o||e[1]!==i?(u={category:o,status:i},e[0]=o,e[1]=i,e[2]=u):u=e[2];const{data:p,isLoading:g,error:b}=be(u),S=p?.reports??[],v=S.filter(Lt),y=S.filter(Et),_=n==="inbox"?v:y,r=v.filter(Mt).length,{data:N}=be();let j;e[3]!==N?.reports?(j=[...new Set((N?.reports??[]).map(Pt))].sort(),e[3]=N?.reports,e[4]=j):j=e[4];const C=j;let $;e[5]!==m?($=async F=>{const{reportId:Z,lifecycleStatus:te}=F;return m("REPORTS_UPDATE_STATUS",{reportId:Z,lifecycleStatus:te})},e[5]=m,e[6]=$):$=e[6];let z;e[7]!==d||e[8]!==x?(z=()=>{x.invalidateQueries({queryKey:ne.reportsList(d)})},e[7]=d,e[8]=x,e[9]=z):z=e[9];let w;e[10]!==$||e[11]!==z?(w={mutationFn:$,onSuccess:z,onError:It},e[10]=$,e[11]=z,e[12]=w):w=e[12];const k=_e(w);let P;e[13]!==k?(P=(F,Z)=>{k.mutate({reportId:F,lifecycleStatus:Z?"dismissed":"read"})},e[13]=k,e[14]=P):P=e[14];const M=P;if(b){let F,Z;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(fe,{size:48,className:"text-destructive mb-4"}),Z=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[15]=F,e[16]=Z):(F=e[15],Z=e[16]);let te;return e[17]!==b.message?(te=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[F,Z,s.jsx("p",{className:"text-muted-foreground text-center",children:b.message})]}),e[17]=b.message,e[18]=te):te=e[18],te}const R="flex flex-col h-full";let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=()=>c("inbox"),e[19]=T):T=e[19];const I=n==="inbox"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let E;e[20]!==I?(E=X("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",I),e[20]=I,e[21]=E):E=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ve,{size:14}),e[22]=B):B=e[22];let L;e[23]!==g||e[24]!==r?(L=!g&&r>0&&s.jsx(Xe,{variant:"default",className:"text-[10px] px-1.5 py-0 h-4",children:r}),e[23]=g,e[24]=r,e[25]=L):L=e[25];let h;e[26]!==E||e[27]!==L?(h=s.jsxs("button",{type:"button",onClick:T,className:E,children:[B,"Inbox",L]}),e[26]=E,e[27]=L,e[28]=h):h=e[28];let O;e[29]===Symbol.for("react.memo_cache_sentinel")?(O=()=>c("done"),e[29]=O):O=e[29];const Q=n==="done"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let q;e[30]!==Q?(q=X("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",Q),e[30]=Q,e[31]=q):q=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(oe,{size:14}),e[32]=V):V=e[32];const W=!g&&y.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:y.length});let G;e[33]!==q||e[34]!==W?(G=s.jsxs("button",{type:"button",onClick:O,className:q,children:[V,"Done",W]}),e[33]=q,e[34]=W,e[35]=G):G=e[35];let A;e[36]!==h||e[37]!==G?(A=s.jsxs("div",{className:"flex items-center gap-1",children:[h,G]}),e[36]=h,e[37]=G,e[38]=A):A=e[38];let J;e[39]!==C||e[40]!==o||e[41]!==i?(J=s.jsx(Tt,{category:o,status:i,categories:C,onCategoryChange:a,onStatusChange:f}),e[39]=C,e[40]=o,e[41]=i,e[42]=J):J=e[42];let U;e[43]!==A||e[44]!==J?(U=s.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[A,J]}),e[43]=A,e[44]=J,e[45]=U):U=e[45];const se="flex-1 overflow-y-auto p-6",Y=g?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):_.length===0?s.jsx("div",{className:"flex flex-col items-center justify-center h-full text-center",children:n==="done"?s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No dismissed reports"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports you mark as done will appear here."})]}):s.jsxs(s.Fragment,{children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:o||i?"No reports match filters":"Inbox is empty"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:o||i?"Try adjusting your filters.":"Reports will appear here once the connected MCP server provides them."})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:_.map(F=>s.jsx(wt,{report:F,isDoneTab:n==="done",onSelect:l,onDismiss:M},F.id))});let K;e[46]!==Y?(K=s.jsx("div",{className:se,children:Y}),e[46]=Y,e[47]=K):K=e[47];let H;return e[48]!==U||e[49]!==K?(H=s.jsxs("div",{className:R,children:[U,K]}),e[48]=U,e[49]=K,e[50]=H):H=e[50],H}function It(t){ce.error(`Failed to update report: ${t.message}`)}function Pt(t){return t.category}function Mt(t){return!t.lifecycleStatus||t.lifecycleStatus==="unread"}function Et(t){return t.lifecycleStatus==="dismissed"}function Lt(t){return t.lifecycleStatus!=="dismissed"}function At(t){return t?t.filter(e=>Re(e,ke)):[]}function xs(){const t=D.c(58),{org:e,project:l}=we();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const c=Te(n),o=ze(),a=Ie(),i=c.reportId??null;let f;t[1]!==o?(f=h=>{o({search:h?{reportId:h}:{},replace:!0})},t[1]=o,t[2]=f):f=t[2];const d=f;let m;t[3]!==e.id?(m={connectionId:Pe,orgId:e.id},t[3]=e.id,t[4]=m):m=t[4];const x=Me(m);let u;t[5]!==l.id?(u=ne.pluginConfig(l.id??"","reports"),t[5]=l.id,t[6]=u):u=t[6];let p;t[7]!==l.id||t[8]!==x?(p=async()=>{const h=await x.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"reports"}});return h.structuredContent??h},t[7]=l.id,t[8]=x,t[9]=p):p=t[9];const g=!!l.id;let b;t[10]!==u||t[11]!==p||t[12]!==g?(b={queryKey:u,queryFn:p,enabled:g},t[10]=u,t[11]=p,t[12]=g,t[13]=b):b=t[13];const{data:S,isLoading:v}=ue(b);let y,_;if(t[14]!==a||t[15]!==S?.config?.connectionId){_=At(a);const h=S?.config?.connectionId;y=h?_.find(O=>O.id===h):null,t[14]=a,t[15]=S?.config?.connectionId,t[16]=y,t[17]=_}else y=t[16],_=t[17];const r=y,N=r?.id;let j;t[18]!==e.id||t[19]!==N?(j={connectionId:N,orgId:e.id},t[18]=e.id,t[19]=N,t[20]=j):j=t[20];const C=Ee(j);let $;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?($={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=$):$=t[24];const z=$;if(v){let h;return t[25]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ie,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=h):h=t[25],h}if(_.length===0){let h;return t[26]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(nt,{}),t[26]=h):h=t[26],h}if(!r){let h;return t[27]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(Ae,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=h):h=t[27],h}let w;t[28]!==r.app_id||t[29]!==r.app_name||t[30]!==r.description||t[31]!==r.icon||t[32]!==r.id||t[33]!==r.metadata||t[34]!==r.title||t[35]!==r.tools?(w={id:r.id,title:r.title,icon:r.icon,description:r.description,app_name:r.app_name,app_id:r.app_id,tools:r.tools,metadata:r.metadata},t[28]=r.app_id,t[29]=r.app_name,t[30]=r.description,t[31]=r.icon,t[32]=r.id,t[33]=r.metadata,t[34]=r.title,t[35]=r.tools,t[36]=w):w=t[36];let k;t[37]!==C?(k=(h,O)=>C?C.callTool({name:h,arguments:O}).then(Bt):Promise.reject(new Error("MCP client is not available")),t[37]=C,t[38]=k):k=t[38];const P=k;let M;t[39]!==r.id||t[40]!==z||t[41]!==w||t[42]!==P?(M={connectionId:r.id,connection:w,toolCaller:P,org:z,session:null},t[39]=r.id,t[40]=z,t[41]=w,t[42]=P,t[43]=M):M=t[43];const R=M;let T;t[44]!==R.connection?(T=[R.connection],t[44]=R.connection,t[45]=T):T=t[45];let I;t[46]!==r.id||t[47]!==T?(I=s.jsx("div",{className:"flex items-center px-6 py-3 border-b border-border",children:s.jsx(ot,{connections:T,selectedConnectionId:r.id,onConnectionChange:Dt})}),t[46]=r.id,t[47]=T,t[48]=I):I=t[48];let E;t[49]!==i||t[50]!==d?(E=s.jsx("div",{className:"flex-1 overflow-hidden",children:i?s.jsx(vt,{reportId:i,onBack:()=>d(null)}):s.jsx(Rt,{onSelectReport:d})}),t[49]=i,t[50]=d,t[51]=E):E=t[51];let B;t[52]!==I||t[53]!==E?(B=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[I,E]}),t[52]=I,t[53]=E,t[54]=B):B=t[54];let L;return t[55]!==R||t[56]!==B?(L=s.jsx(Le,{value:R,children:B}),t[55]=R,t[56]=B,t[57]=L):L=t[57],L}function Dt(){}function Bt(t){return t.structuredContent??t}export{xs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,a as Y,b as A,r as B,j as s,d as G}from"./index-
|
|
1
|
+
import{c as q,a as Y,b as A,r as B,j as s,d as G}from"./index-DXIsw0zh.js";import{u as K}from"./useMutation-B0HsJHYQ.js";import{B as z}from"./button-B1_AjrAy.js";import{I as L}from"./input-CBsHg1ZU.js";function Q(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=K(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let p;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(p=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=p):p=e[34];let g;e[35]!==a||e[36]!==t?(g=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=g):g=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==p||e[43]!==g?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,p,g]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=p,e[43]=g,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await G.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,b5 as Pn,c as He,j as he}from"./index-45Kg6aLu.js";import{c as Je}from"./button-B1-7VHy5.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{nt as R,et as a,Qn as b};
|
|
1
|
+
import{r as f,b4 as Pn,c as He,j as he}from"./index-DXIsw0zh.js";import{c as Je}from"./button-B1_AjrAy.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{nt as R,et as a,Qn as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as s}from"./index-
|
|
1
|
+
import{c as p,j as s}from"./index-DXIsw0zh.js";import{B as v}from"./button-B1_AjrAy.js";import{i as j,a as S}from"./Save01-DYGYdg7I.js";import{i as z}from"./Loading01-CQxnYIyy.js";function y(x){const e=p.c(15),{onSave:c,onUndo:d,isDirty:b,isSaving:i,saveLabel:f,undoLabel:u}=x,n=f===void 0?"Save":f,o=u===void 0?"Undo":u;if(!b)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(j,{size:14}),e[0]=r):r=e[0];let t;e[1]!==i||e[2]!==d||e[3]!==o?(t=s.jsxs(v,{variant:"outline",size:"sm",onClick:d,disabled:i,"aria-label":o,children:[r,o]}),e[1]=i,e[2]=d,e[3]=o,e[4]=t):t=e[4];let a;e[5]!==i?(a=i?s.jsx(z,{size:14,className:"animate-spin"}):s.jsx(S,{size:14}),e[5]=i,e[6]=a):a=e[6];let l;e[7]!==i||e[8]!==c||e[9]!==n||e[10]!==a?(l=s.jsxs(v,{variant:"default",size:"sm",onClick:c,disabled:i,"aria-label":n,children:[a,n]}),e[7]=i,e[8]=c,e[9]=n,e[10]=a,e[11]=l):l=e[11];let m;return e[12]!==t||e[13]!==l?(m=s.jsxs(s.Fragment,{children:[t,l]}),e[12]=t,e[13]=l,e[14]=m):m=e[14],m}export{y as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,
|
|
1
|
+
import{r as a,bl as k,j as h,c as ve,bt as pe,as as F,ap as tt,a9 as J,ax as rt,aw as ie,au as W,bo as z,bm as nt}from"./index-DXIsw0zh.js";import{S as Ae}from"./spinner-CQv4OdiY.js";import{e as ot}from"./select-Dtkbt4-O.js";import{c as Le}from"./button-B1_AjrAy.js";const it=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));it.displayName="Calendar";function Pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lt(e){if(Array.isArray(e))return e}function at(e,t,r){return(t=ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,l,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function st(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(n){at(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ut(e,t){if(e==null)return{};var r,n,o=dt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ft(e,t){return lt(e)||ct(e,t)||mt(e,t)||st()}function pt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ht(e){var t=pt(e,"string");return typeof t=="symbol"?t:t+""}function mt(e,t){if(e){if(typeof e=="string")return Pe(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(e,t):void 0}}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function X(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function re(e){return{}.toString.call(e).includes("Object")}function bt(e){return!Object.keys(e).length}function K(e){return typeof e=="function"}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function St(e,t){return re(t)||V("changeType"),Object.keys(t).some(function(r){return!wt(e,r)})&&V("changeField"),t}function yt(e){K(e)||V("selectorType")}function Et(e){K(e)||re(e)||V("handlerType"),re(e)&&Object.values(e).some(function(t){return!K(t)})&&V("handlersType")}function Pt(e){e||V("initialIsRequired"),re(e)||V("initialType"),bt(e)&&V("initialContent")}function xt(e,t){throw new Error(e[t]||e.default)}var Rt={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},V=X(xt)(Rt),Z={changes:St,selector:yt,handler:Et,initial:Pt};function Ct(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Z.initial(e),Z.handler(t);var r={current:e},n=X(Tt)(r,t),o=X(Ot)(r),i=X(Z.changes)(e),l=X(jt)(r);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Z.selector(u),u(r.current)}function c(u){vt(n,o,i,l)(u)}return[s,c]}function jt(e,t){return K(t)?t(e.current):t}function Ot(e,t){return e.current=je(je({},e.current),t),t}function Tt(e,t,r){return K(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var _t={create:Ct},Mt={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function At(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function Lt(e){return{}.toString.call(e).includes("Object")}function Dt(e){return e||Oe("configIsRequired"),Lt(e)||Oe("configType"),e.urls?(It(),{paths:{vs:e.urls.monacoBase}}):e}function It(){console.warn(De.deprecation)}function Nt(e,t){throw new Error(e[t]||e.default)}var De={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,at as k,bn as $,j as d,a9 as j,aq as rt,ar as Ne,aG as st,an as be,aH as lt,av as P,aI as at,H as _e,aJ as Ee,bo as it,az as ct,bp as dt,aK as ut,aN as pt,aL as ft,aO as mt,aP as ht,ay as vt,aM as gt,aQ as xt,aR as St,c as ee}from"./index-45Kg6aLu.js";import{V as wt}from"./index-DZj3EVeo.js";import{i as Ct}from"./Check-Twncsx2J.js";import{t as Re}from"./ChevronDown-DRFuBDK4.js";import{c as oe}from"./button-B1-7VHy5.js";function Pe(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Nt,Pt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[F,q]=Ne({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Nt,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:P(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:P(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===y&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=y.indexOf(I);y=y.slice(N+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,N=F.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-F.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.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)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=be();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")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 d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:P(s.onFocus,()=>w(!0)),onBlur:P(s.onBlur,()=>w(!1)),onClick:P(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Pt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:P(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ft;function et(n){return n===""||n===void 0}function tt(n){const e=dt(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,Pe as e,nt as n};
|
|
1
|
+
import{r as c,as as k,bm as $,j as d,a9 as j,ap as rt,aq as Ne,aF as st,an as be,aG as lt,au as P,aH as at,H as _e,aI as Ee,bn as it,ay as ct,bo as dt,aJ as ut,aM as pt,aK as ft,aN as mt,aO as ht,ax as vt,aL as gt,aP as xt,aQ as St,c as ee}from"./index-DXIsw0zh.js";import{V as wt}from"./index-DGQeUY5q.js";import{i as Ct}from"./Check-BHtow5c6.js";import{t as Re}from"./ChevronDown-DIu5de-X.js";import{c as oe}from"./button-B1_AjrAy.js";function Pe(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=it(J),[ne]=vt(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Nt,Pt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=Ne({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Nt,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:P(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:P(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>F(f)),[O,U]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===y&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=y.indexOf(I);y=y.slice(N+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,_=>h(_)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.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)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.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:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=be();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")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 d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:P(s.onFocus,()=>w(!0)),onBlur:P(s.onBlur,()=>w(!1)),onClick:P(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Pt(le,t),[h,g]=c.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:P(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(n){return n===""||n===void 0}function tt(n){const e=dt(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,Pe as e,nt as n};
|