dorkos 0.114.1 → 0.115.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/bin/cli.js +38561 -38244
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-BRHiWrvg.js → AboutPage-Cz8ijNrK.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-DGwKpdjB.js → ActivityErrorState-BzmfwxSZ.js} +1 -1
- package/dist/client/assets/ActivityPage-BK7T3OiI.js +1 -0
- package/dist/client/assets/{ActivityRow-TjAMUrcU.js → ActivityRow-Ig5atv15.js} +1 -1
- package/dist/client/assets/{AdapterIcon-B-NJfk_R.js → AdapterIcon-BXPv5J8h.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-CrdiWINL.js → AdapterSetupWizard-BEziztL3.js} +2 -2
- package/dist/client/assets/AgentOptionRow-BqFQvFeN.js +1 -0
- package/dist/client/assets/AgentPicker-dCfEIsU-.js +1 -0
- package/dist/client/assets/{AgentRequestCard-BRINjair.js → AgentRequestCard-BAhfGJxx.js} +3 -3
- package/dist/client/assets/AppearancePage-7qHhFeEv.js +1 -0
- package/dist/client/assets/ApplyToOverridesDialog-jqOFh0d1.js +1 -0
- package/dist/client/assets/AttentionSignalRow-3CgglXkd.js +1 -0
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-C-BpNthi.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BMKtHI0D.js} +3 -3
- package/dist/client/assets/BindingDialog-DSBxRyzA.js +1 -0
- package/dist/client/assets/{BlintzCanvas-DCU4iOtF.js → BlintzCanvas-CyRuqAJV.js} +1 -1
- package/dist/client/assets/{CanvasCsvContent-oayJjsGq.js → CanvasCsvContent-Bd1c6TGx.js} +4 -4
- package/dist/client/assets/CanvasFileContent-DelYwSH8.js +2 -0
- package/dist/client/assets/CanvasModel3dContent-BExIu4RY.js +2 -0
- package/dist/client/assets/ChatAppsOff-SWemSaUp.js +6 -0
- package/dist/client/assets/{CodeMirrorDiff-j0jAFw_i.js → CodeMirrorDiff-0WF4ITRZ.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-DWgnGEHZ.js → CodeMirrorEditor-Bg7wC_Q8.js} +1 -1
- package/dist/client/assets/CommitmentList-CTvEGUV3.js +1 -0
- package/dist/client/assets/{CommitmentsPage-_vCusfuJ.js → CommitmentsPage-C68etoLe.js} +1 -1
- package/dist/client/assets/ConnectionAccessLists-9oeVn_GK.js +1 -0
- package/dist/client/assets/ConnectionsPage-CJOY4-kp.js +6 -0
- package/dist/client/assets/ConventionPage-DD-f5o6y.js +11 -0
- package/dist/client/assets/{ExtensionPageRoute-XXcMwrQY.js → ExtensionPageRoute-C6fW17AG.js} +2 -2
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-C8yf1gK7.js → FloatingTanStackRouterDevtools-CqogiFob-Zccd0fv6.js} +1 -1
- package/dist/client/assets/HandlePage-DOxlquWl.js +1 -0
- package/dist/client/assets/HeartbeatPage-cJM6NuTD.js +1 -0
- package/dist/client/assets/KeyEntry-K5k_3TfU.js +6 -0
- package/dist/client/assets/{LexicalField-Dr5vnDVn.js → LexicalField-DB5V20zv.js} +2 -2
- package/dist/client/assets/{ManagesPage-Dj_UOeFQ.js → ManagesPage-Cj0-hwfr.js} +1 -1
- package/dist/client/assets/{Marketplace-RwZrKU4O.js → Marketplace-eWEtLmd9.js} +2 -2
- package/dist/client/assets/{MarketplaceSourcesView-xSimTjA0.js → MarketplaceSourcesView-B1h70C20.js} +1 -1
- package/dist/client/assets/{McpAppFrame-Er6EX82b.js → McpAppFrame-BaJ_r-QR.js} +2 -2
- package/dist/client/assets/McpSigninBody-Coaq5Fkf.js +1 -0
- package/dist/client/assets/{Model3dViewer-D5xu-FCi.js → Model3dViewer-cKa-Jnbl.js} +1 -1
- package/dist/client/assets/NamePage-W7Frb1yy.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-DiI_GTiE.js → NewDirectMessageMenu-C4zNIv9x.js} +1 -1
- package/dist/client/assets/{NotificationsPage-B_XMIlHt.js → NotificationsPage-gKNClvNU.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-BjiejioP.js → OpenMeshSwitch-RzB2u6-Q.js} +2 -2
- package/dist/client/assets/OperatorIdentityForm-B_78Vqh8.js +1 -0
- package/dist/client/assets/PermissionHistory-DrtlA4YM.js +1 -0
- package/dist/client/assets/PermissionsPage-O7kUVaQv.js +1 -0
- package/dist/client/assets/{PersonalityPopover-BT-aQ65s.js → PersonalityPopover-DiNuuoWu.js} +1 -1
- package/dist/client/assets/PhotoPage-DdBke3yj.js +1 -0
- package/dist/client/assets/PresetPicker-BUFwg8RS.js +19 -0
- package/dist/client/assets/{PreviewRefusedNotice-DJyQxUFv.js → PreviewRefusedNotice-DXZp669C.js} +1 -1
- package/dist/client/assets/ProfileFields-BCfMzNcT.js +1 -0
- package/dist/client/assets/ProfilePanelContainer-BzC2MGdi.js +1 -0
- package/dist/client/assets/ProfileRolePicker-f0FKXLtu.js +1 -0
- package/dist/client/assets/PromptSuggestionChips-EgeMFibt.js +1 -0
- package/dist/client/assets/ReportsToPopover-CQ4Xxslu.js +1 -0
- package/dist/client/assets/RoomSurface-oDbc6jnO.js +44 -0
- package/dist/client/assets/{RoomsPage-D0795GTq.js → RoomsPage-D_EbiSZ3.js} +1 -1
- package/dist/client/assets/RunsOnPopover-LtmmbIsD.js +1 -0
- package/dist/client/assets/RuntimeConnectFlow-Kv2ytk2m.js +1 -0
- package/dist/client/assets/RuntimeSetupDialog-CiWxlcPc.js +1 -0
- package/dist/client/assets/{SessionsPage-DbIKrtbg.js → SessionsPage-1rDO0SGV.js} +1 -1
- package/dist/client/assets/SettingsDialog-_ctp2AfE.js +12 -0
- package/dist/client/assets/SkillsPage-gPuQHKps.js +1 -0
- package/dist/client/assets/TaskDialogWrapper-BPFpCgsN.js +1 -0
- package/dist/client/assets/TasksEmptyState-D0Jlzmed.js +3 -0
- package/dist/client/assets/TasksPage-DvGfg5Bk.js +1 -0
- package/dist/client/assets/{ToolsPage-gUYaNA1-.js → ToolsPage-B0qZ85pR.js} +2 -2
- package/dist/client/assets/{TopologyGraph-KPxRfshp.js → TopologyGraph-q1ammgpG.js} +3 -3
- package/dist/client/assets/TourHost-Dc8qw1Ef.js +1 -0
- package/dist/client/assets/{UnlinkDialog-RuuQUyOF.js → UnlinkDialog-DXdrLsGV.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-BojvLOeP.js → WidgetErrorCard-ChDNC060.js} +23 -23
- package/dist/client/assets/_shell-BxPza3Lx.js +88 -0
- package/dist/client/assets/{_shell._home-C-OJaDmg.js → _shell._home-DjGunhLV.js} +1 -1
- package/dist/client/assets/_shell._home.activity-B014dET1.js +1 -0
- package/dist/client/assets/_shell._home.index-DEmtTHZg.js +3 -0
- package/dist/client/assets/_shell._home.tasks-CnDEbUOd.js +1 -0
- package/dist/client/assets/_shell._home.workspaces-AQtMUWuu.js +1 -0
- package/dist/client/assets/{_shell.channels-Cpde6Iix.js → _shell.channels-C8NOhmJd.js} +4 -4
- package/dist/client/assets/_shell.connections-Bxe0wxOB.js +1 -0
- package/dist/client/assets/{_shell.feedback-requests-BBEuotuF.js → _shell.feedback-requests-C6ku9F5_.js} +2 -2
- package/dist/client/assets/_shell.marketplace-CEnzWFmI.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-BZq1d2ih.js +1 -0
- package/dist/client/assets/_shell.session-Dn0C0mEZ.js +66 -0
- package/dist/client/assets/{_shell.team-4bF5Nn4_.js → _shell.team-DoLdOMoC.js} +5 -5
- package/dist/client/assets/_shell.x._extensionId-DhE3OYMF.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-DhE3OYMF.js +1 -0
- package/dist/client/assets/access-copy-CBGtcTk0.js +1 -0
- package/dist/client/assets/{agent-browser-BIsnzdje.js → agent-browser-DbcLtsAx.js} +1 -1
- package/dist/client/assets/{banner-Dll8KWyW.js → banner-rPsz3suJ.js} +2 -2
- package/dist/client/assets/{card-5POMzMJ6.js → card-BqN3lfJn.js} +1 -1
- package/dist/client/assets/command-ZTLTCj0l.js +1 -0
- package/dist/client/assets/cpu-D70xMHl2.js +11 -0
- package/dist/client/assets/dead-letter-reasons-DtBHju9v.js +1 -0
- package/dist/client/assets/empty-state-yl1dLwLN.js +1 -0
- package/dist/client/assets/execution-config-BbBEe6FO.js +1 -0
- package/dist/client/assets/{file-CY9v6yos.js → file-CGg2M6ED.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-DNS4eVZR.js → file-exclamation-point-DZrVsShR.js} +1 -1
- package/dist/client/assets/{file-text-BQ5NBk6w.js → file-text-BYq_4IAt.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-BC8zM39x.js → find-latest-widget-fence-CWs9nr10.js} +4 -4
- package/dist/client/assets/form-vPuXuaYT.js +1 -0
- package/dist/client/assets/format-cron-D02Tnupo.js +1 -0
- package/dist/client/assets/{git-branch-34CUrn_R.js → git-branch-DbjXDO_F.js} +1 -1
- package/dist/client/assets/{heart-B5oPCBeT.js → heart-Dblp_miM.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-DeDxlHr7.js → highlighted-body-KPVGNVTW-CaMXMak-.js} +1 -1
- package/dist/client/assets/{index-Cdi4wcy2.js → index-B-WvQ24u.js} +7 -7
- package/dist/client/assets/{index-Bvr-_HFb.js → index-BKuzoeSn.js} +1 -1
- package/dist/client/assets/{index-CfPs0N2z.js → index-BOL391En.js} +1 -1
- package/dist/client/assets/{index-C6XffNP5.js → index-BPqkuMIa.js} +1 -1
- package/dist/client/assets/{index-Svn7q7Oq.js → index-BPwUl0Bz.js} +1 -1
- package/dist/client/assets/{index-CkfVcaGE.js → index-BV0tZnYg.js} +1 -1
- package/dist/client/assets/{index-obtMBZBo.js → index-BW98owO8.js} +1 -1
- package/dist/client/assets/{index-Cw1lCYXU.js → index-Bd23EYYT.js} +2 -2
- package/dist/client/assets/{index-hw9zI0x5.js → index-BdVOtoFr.js} +1 -1
- package/dist/client/assets/{index-C_nYZwKl.js → index-Bi7Um5RU.js} +1 -1
- package/dist/client/assets/{index-DvSjlchr.js → index-BiIbMZ6d.js} +36 -36
- package/dist/client/assets/{index-DipT3Tl7.js → index-BxqUb-n7.js} +1 -1
- package/dist/client/assets/{index-BfY2tknC.js → index-BzczIyv5.js} +1 -1
- package/dist/client/assets/index-C6NUjpzQ.js +38 -0
- package/dist/client/assets/{index-BCJdsNmC.js → index-C88NZagl.js} +1 -1
- package/dist/client/assets/{index-BM9_nnxH.js → index-CHvi6xUU.js} +1 -1
- package/dist/client/assets/{index-BWj2VXUd.js → index-CMWMhbec.js} +1 -1
- package/dist/client/assets/{index-HmNnK1_1.js → index-CN9fywRC.js} +1 -1
- package/dist/client/assets/{index-yDaSJS2Z.js → index-CRZXSh_q.js} +1 -1
- package/dist/client/assets/{index-sLuAyJv-.js → index-CWNsRK97.js} +1 -1
- package/dist/client/assets/index-CaLw69VE.js +1 -0
- package/dist/client/assets/index-CdKpQ1hI.js +1018 -0
- package/dist/client/assets/{index-CiOdQLWf.js → index-CrK4rKAq.js} +1 -1
- package/dist/client/assets/{index-B_LR9e6q.js → index-D16KF-iC.js} +3 -3
- package/dist/client/assets/index-D6m2SWHr.js +1 -0
- package/dist/client/assets/index-DDYi817r.js +1 -0
- package/dist/client/assets/{index-DjQZM7xU.js → index-Db2EOzA3.js} +1 -1
- package/dist/client/assets/index-DdbHrvr0.js +1 -0
- package/dist/client/assets/{index-D1AN47IZ.js → index-Dg_bax15.js} +3 -3
- package/dist/client/assets/index-DwUdUliR.js +1 -0
- package/dist/client/assets/{index-Dl3NBIFK.js → index-DzeYt-GT.js} +1 -1
- package/dist/client/assets/{index-D6QoZ_JK.js → index-Gq3gqBhY.js} +1 -1
- package/dist/client/assets/index-O_HMols_.js +1 -0
- package/dist/client/assets/{index-juObjGCH.js → index-P5j6zmcN.js} +1 -1
- package/dist/client/assets/{index-BeH3ljiU.js → index-XE46wAj9.js} +1 -1
- package/dist/client/assets/{index-BZYcFunZ.js → index-Z8YcKwIB.js} +1 -1
- package/dist/client/assets/{index-DFEF2MFy.css → index-kktlr1TJ.css} +1 -1
- package/dist/client/assets/{index-BfoRyh9U.js → index-lNMJBFB0.js} +1 -1
- package/dist/client/assets/{index-CFakjglG.js → index-oWLYcpm4.js} +1 -1
- package/dist/client/assets/{index-CbUkmP4v.js → index-vRc1D4KI.js} +1 -1
- package/dist/client/assets/inline-code-Cvn43Gqu.js +1 -0
- package/dist/client/assets/{layers-5nJbTYJI.js → layers-Bmz62WF4.js} +1 -1
- package/dist/client/assets/{lightbulb-CTbrj6Bh.js → lightbulb-CAd6slmc.js} +1 -1
- package/dist/client/assets/link-2-C0mn8T24.js +6 -0
- package/dist/client/assets/list-runtime-types-DxwGcKLx.js +1 -0
- package/dist/client/assets/{markdown-content-BWVUF3Ll.js → markdown-content-1-B7PdbY.js} +1 -1
- package/dist/client/assets/{mention-pill-DlZf_ikY.js → mention-pill-D_-KXznh.js} +1 -1
- package/dist/client/assets/{message-square-off-DwAOErT_.js → message-square-off-Di7kQvfe.js} +1 -1
- package/dist/client/assets/more-details-C6UGVeDE.js +1 -0
- package/dist/client/assets/{owner-notice-De98Vj3z.js → owner-notice-CudDDBX4.js} +1 -1
- package/dist/client/assets/{package-B1hSUoIL.js → package-D2eMoFCI.js} +1 -1
- package/dist/client/assets/{page-container-DTyW7UJt.js → page-container-CDHAACRA.js} +1 -1
- package/dist/client/assets/{paperclip-CoxP50ae.js → paperclip-p0W24D54.js} +1 -1
- package/dist/client/assets/path-input-j04LMj9z.js +1 -0
- package/dist/client/assets/primer-trigger-DkCcHf2Q.js +3 -0
- package/dist/client/assets/profile-errors-CqflLCzu.js +1 -0
- package/dist/client/assets/progress-BcuH4Eod.js +6 -0
- package/dist/client/assets/query-error-state-CEZs7dhg.js +1 -0
- package/dist/client/assets/{radio-WZhvBdvS.js → radio-DGWfQ5Rf.js} +1 -1
- package/dist/client/assets/registry-ChxwU0f4.js +1 -0
- package/dist/client/assets/relay-trace-schemas-y0nd8fzi.js +6 -0
- package/dist/client/assets/{room-files-source-B2H-CIeN.js → room-files-source-C1TCg4W_.js} +2 -2
- package/dist/client/assets/{rotate-ccw-clock-DFGhE-_C.js → rotate-ccw-clock-DcBojy-0.js} +1 -1
- package/dist/client/assets/{rotate-cw-DiWMKflx.js → rotate-cw-D0vUyeR2.js} +1 -1
- package/dist/client/assets/runtime-connect-Dn0T5YWv.js +1 -0
- package/dist/client/assets/{scroll-area-BJrXoUrS.js → scroll-area-CQ9lO56h.js} +1 -1
- package/dist/client/assets/{search-x-CPf5yiSS.js → search-x-EJGj73JB.js} +2 -2
- package/dist/client/assets/settings-for-runtime-BoOa-ZFG.js +1 -0
- package/dist/client/assets/shield-check-Bp58y9u7.js +6 -0
- package/dist/client/assets/{shield-x-D-yr2n7H.js → shield-x-jF_NCCvp.js} +1 -1
- package/dist/client/assets/soul-file-Cag2i87x.js +1 -0
- package/dist/client/assets/{table-B3kRSRyK.js → table-D89CWVJX.js} +1 -1
- package/dist/client/assets/terminal-BUhNMZAt.js +6 -0
- package/dist/client/assets/trust-posture-15DMDZTA.js +1 -0
- package/dist/client/assets/unplug-opnrSXAi.js +6 -0
- package/dist/client/assets/unverified-catalog-notice-DHM5Coia.js +1 -0
- package/dist/client/assets/use-adapter-catalog-ClMqVelU.js +1 -0
- package/dist/client/assets/use-bindings-Ch6UUBvz.js +1 -0
- package/dist/client/assets/use-composer-prefs-Qn7KRpYe.js +1 -0
- package/dist/client/assets/{use-connector-management-2rrubqr1.js → use-connector-management-dX_4x0d3.js} +1 -1
- package/dist/client/assets/use-deep-link-scroll-BV2fY4gy.js +1 -0
- package/dist/client/assets/use-delete-binding-BklxjB_c.js +1 -0
- package/dist/client/assets/{use-dev-links-BIxj0Pjl.js → use-dev-links-D4Bqam6F.js} +1 -1
- package/dist/client/assets/use-external-adapter-catalog-nHiD8BKZ.js +1 -0
- package/dist/client/assets/use-full-activity-feed-vYU7wQWT.js +1 -0
- package/dist/client/assets/use-is-below-desktop-G-mTu2Ga.js +1 -0
- package/dist/client/assets/{use-jump-back-in-CD5wYoFA.js → use-jump-back-in-BVunjzyr.js} +3 -3
- package/dist/client/assets/{use-mesh-topology-3LbL6yfa.js → use-mesh-topology-NaUKSKol.js} +1 -1
- package/dist/client/assets/use-mounted-ref-BWpQ8f91.js +1 -0
- package/dist/client/assets/use-notification-prefs-qO1zRRFN.js +1 -0
- package/dist/client/assets/{use-panel-tab-placements-CTNXdvC6.js → use-panel-tab-placements-Db6p2vLD.js} +1 -1
- package/dist/client/assets/use-pending-read-DUqJZUza.js +1 -0
- package/dist/client/assets/use-personality-commit-DUEKxHt_.js +1 -0
- package/dist/client/assets/{use-promo-activation-DCy9ROgP.js → use-promo-activation-CnGaw39P.js} +2 -2
- package/dist/client/assets/use-promo-dismissals-bkSHhGhj.js +1 -0
- package/dist/client/assets/{use-pulse-freshness-CRHnQO_-.js → use-pulse-freshness-Oc_1gs-Y.js} +1 -1
- package/dist/client/assets/use-relay-config-Ba-S4wxY.js +1 -0
- package/dist/client/assets/{use-room-follow-claim-FWatOD5-.js → use-room-follow-claim-DqE5b95Z.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-C56ygMxj.js → use-roving-tab-list-DnMqliqf.js} +1 -1
- package/dist/client/assets/{use-session-canvas-Dsmt92or.js → use-session-canvas-OdljtBE8.js} +4 -4
- package/dist/client/assets/{use-session-diagnostics-ypmmhIlN.js → use-session-diagnostics-CtjxsM8_.js} +4 -4
- package/dist/client/assets/use-unclaimed-chats-5RCD5wIp.js +1 -0
- package/dist/client/assets/use-update-config-xkznZMHr.js +1 -0
- package/dist/client/assets/useMutationState-Mjr_y4xX.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/index.js +7086 -6336
- package/dist/server/index.js.map +2 -2
- package/package.json +5 -5
- package/dist/client/assets/ActivityPage-C-lpXfva.js +0 -1
- package/dist/client/assets/AppearancePage-COdpfn1g.js +0 -1
- package/dist/client/assets/AttentionSignalRow-Dc8laCri.js +0 -1
- package/dist/client/assets/CanvasFileContent-C-aDKKws.js +0 -2
- package/dist/client/assets/CanvasModel3dContent-Dnx6oUx2.js +0 -2
- package/dist/client/assets/CommitmentList-CCsDbGY2.js +0 -1
- package/dist/client/assets/ConnectionAccessLists-umV6IbYS.js +0 -1
- package/dist/client/assets/ConnectionsPage-2iGwApEi.js +0 -6
- package/dist/client/assets/ConventionPage-Bucu3-TK.js +0 -11
- package/dist/client/assets/HandlePage-BotSAp8X.js +0 -1
- package/dist/client/assets/HeartbeatPage-CVAZeDqg.js +0 -1
- package/dist/client/assets/McpSigninBody-DMK94EGx.js +0 -1
- package/dist/client/assets/NamePage-NZ40HlPR.js +0 -1
- package/dist/client/assets/OperatorIdentityForm-H7l8r2VC.js +0 -1
- package/dist/client/assets/PermissionsPage-DVV9vtoW.js +0 -1
- package/dist/client/assets/PhotoPage-DKgOQCBH.js +0 -1
- package/dist/client/assets/PromptSuggestionChips-Dw7RA2P1.js +0 -1
- package/dist/client/assets/ReportsToPopover-fxu1r9iw.js +0 -1
- package/dist/client/assets/RoomSurface-D4Etqadg.js +0 -44
- package/dist/client/assets/RunsOnPopover-Cp8EMGHD.js +0 -1
- package/dist/client/assets/RuntimeSetupDialog-Cxtz9b_r.js +0 -1
- package/dist/client/assets/SkillsPage-DYSIGciZ.js +0 -1
- package/dist/client/assets/TasksPage-DoEP7ZsZ.js +0 -1
- package/dist/client/assets/TourHost-BIozl4IA.js +0 -1
- package/dist/client/assets/_shell-BMQyJ7r4.js +0 -88
- package/dist/client/assets/_shell._home.activity-Bvsxue6y.js +0 -1
- package/dist/client/assets/_shell._home.index-DXnd_q3h.js +0 -3
- package/dist/client/assets/_shell._home.tasks-Mz-iO--x.js +0 -1
- package/dist/client/assets/_shell._home.workspaces-ChuVp2dK.js +0 -1
- package/dist/client/assets/_shell.connections-CxgvSPjQ.js +0 -1
- package/dist/client/assets/_shell.marketplace-Hk6n4nNt.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-B8f38K6K.js +0 -1
- package/dist/client/assets/_shell.session-DsF1tXPP.js +0 -66
- package/dist/client/assets/_shell.x._extensionId-B6J6mDaT.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-B6J6mDaT.js +0 -1
- package/dist/client/assets/index-BTkflOTk.js +0 -1
- package/dist/client/assets/index-BqtFX8p5.js +0 -1
- package/dist/client/assets/index-C-DMBd4V.js +0 -1
- package/dist/client/assets/index-C4ZJEVQG.js +0 -1
- package/dist/client/assets/index-C9NjdeaX.js +0 -38
- package/dist/client/assets/index-d-DK54t2.js +0 -1099
- package/dist/client/assets/index-tdK5EJaB.js +0 -1
- package/dist/client/assets/index-wx8w6kby.js +0 -1
- package/dist/client/assets/kickoff-BwvlCy0n.js +0 -3
- package/dist/client/assets/soul-file-D0y7QIBL.js +0 -1
- package/dist/client/assets/use-delete-binding-BKhK3a7C.js +0 -1
- package/dist/client/assets/use-external-adapter-catalog-XS0vyTlS.js +0 -1
- package/dist/client/assets/use-full-activity-feed-CwqKSvpf.js +0 -1
- package/dist/client/assets/use-is-below-desktop-Dzs5i_TM.js +0 -1
- package/dist/client/assets/use-pending-read-sDmA-i7r.js +0 -1
- package/dist/client/assets/use-personality-commit-B13DSXxo.js +0 -1
- package/dist/client/assets/use-unclaimed-chats-C_bsrJFb.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as be,E as $,C as he}from"./index-BfoRyh9U.js";import{p as Te,s as Pe,t as b,E as xe,e as K,j as Ve,a as ye,L as we,i as ve,f as Xe,O as $e}from"./index-B_LR9e6q.js";import{cssLanguage as J,css as _e}from"./index-Bvr-_HFb.js";import{typescriptLanguage as qe,jsxLanguage as Ce,tsxLanguage as ke,javascriptLanguage as M,javascript as Qe}from"./index-juObjGCH.js";import"./index-d-DK54t2.js";const Ae=55,Ye=1,Me=56,Re=2,Ee=57,Ze=3,z=4,Be=5,R=6,ee=7,te=8,ae=9,le=10,ze=11,De=12,We=13,_=58,Ne=14,Ge=15,D=59,re=21,Ie=23,ne=24,je=25,A=27,se=28,Ue=29,Le=32,Fe=35,He=37,Ke=38,Je=0,et=1,tt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},at={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},W={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function lt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let N=null,G=null,I=0;function Y(e,a){let r=e.pos+a;if(I==r&&G==e)return N;let l=e.peek(a),t="";for(;lt(l);)t+=String.fromCharCode(l),l=e.peek(++a);return G=e,I=r,N=t?t.toLowerCase():l==rt||l==nt?void 0:null}const oe=60,X=62,E=47,rt=63,nt=33,st=45;function j(e,a){this.name=e,this.parent=a}const ot=[R,le,ee,te,ae],it=new he({start:null,shift(e,a,r,l){return ot.indexOf(a)>-1?new j(Y(l,1)||"",e):e},reduce(e,a){return a==re&&e?e.parent:e},reuse(e,a,r,l){let t=a.type.id;return t==R||t==He?new j(Y(l,1)||"",e):e},strict:!1}),ut=new $((e,a)=>{if(e.next!=oe){e.next<0&&a.context&&e.acceptToken(_);return}e.advance();let r=e.next==E;r&&e.advance();let l=Y(e,0);if(l===void 0)return;if(!l)return e.acceptToken(r?Ge:Ne);let t=a.context?a.context.name:null;if(r){if(l==t)return e.acceptToken(ze);if(t&&at[t])return e.acceptToken(_,-2);if(a.dialectEnabled(Je))return e.acceptToken(De);for(let s=a.context;s;s=s.parent)if(s.name==l)return;e.acceptToken(We)}else{if(l=="script")return e.acceptToken(ee);if(l=="style")return e.acceptToken(te);if(l=="textarea")return e.acceptToken(ae);if(tt.hasOwnProperty(l))return e.acceptToken(le);t&&W[t]&&W[t][l]?e.acceptToken(_,-1):e.acceptToken(R)}},{contextual:!0}),Ot=new $(e=>{for(let a=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(D);break}if(e.next==st)a++;else if(e.next==X&&a>=2){r>=3&&e.acceptToken(D,-2);break}else a=0;e.advance()}});function dt(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const ct=new $((e,a)=>{if(e.next==E&&e.peek(1)==X){let r=a.dialectEnabled(et)||dt(a.context);e.acceptToken(r?Be:z,2)}else e.next==X&&e.acceptToken(z,1)});function Z(e,a,r){let l=2+e.length;return new $(t=>{for(let s=0,o=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(a);break}if(s==0&&t.next==oe||s==1&&t.next==E||s>=2&&s<l&&t.next==e.charCodeAt(s-2))s++,o++;else if(s==l&&t.next==X){i>o?t.acceptToken(a,-o):t.acceptToken(r,-(o-2));break}else if((t.next==10||t.next==13)&&i){t.acceptToken(a,1);break}else s=o=0;t.advance()}})}const pt=Z("script",Ae,Ye),mt=Z("style",Me,Re),ft=Z("textarea",Ee,Ze),gt=Pe({"Text RawText IncompleteTag IncompleteCloseTag":b.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":b.angleBracket,TagName:b.tagName,"MismatchedCloseTag/TagName":[b.tagName,b.invalid],AttributeName:b.attributeName,"AttributeValue UnquotedAttributeValue":b.attributeValue,Is:b.definitionOperator,"EntityReference CharacterReference":b.character,Comment:b.blockComment,ProcessingInst:b.processingInstruction,DoctypeDecl:b.documentMeta}),St=be.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q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R!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:it,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[gt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&b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Child(A)||l.getChild(se);t&&(r[a.read(t.from,t.to)]=s?s.type.id==A?a.read(s.from+1,s.to-1):a.read(s.from,s.to):"")}return r}function U(e,a){let r=e.getChild(Ie);return r?a.read(r.from,r.to):" "}function q(e,a,r){let l;for(let t of r)if(!t.attrs||t.attrs(l||(l=ie(e.node.parent.firstChild,a))))return{parser:t.parser,bracketed:!0};return null}function ue(e=[],a=[]){let r=[],l=[],t=[],s=[];for(let i of e)(i.tag=="script"?r:i.tag=="style"?l:i.tag=="textarea"?t:s).push(i);let o=a.length?Object.create(null):null;for(let i of a)(o[i.name]||(o[i.name]=[])).push(i);return Te((i,u)=>{let f=i.type.id;if(f==Ue)return q(i,u,r);if(f==Le)return q(i,u,l);if(f==Fe)return q(i,u,t);if(f==re&&s.length){let p=i.node,d=p.firstChild,m=d&&U(d,u),O;if(m){for(let c of s)if(c.tag==m&&(!c.attrs||c.attrs(O||(O=ie(d,u))))){let S=p.lastChild,h=S.type.id==Ke?S.from:p.to;if(h>d.to)return{parser:c.parser,overlay:[{from:d.to,to:h}]}}}}if(o&&f==ne){let p=i.node,d;if(d=p.firstChild){let m=o[u.read(d.from,d.to)];if(m)for(let O of m){if(O.tagName&&O.tagName!=U(p.parent,u))continue;let c=p.lastChild;if(c.type.id==A){let S=c.from+1,h=c.lastChild,T=c.to-(h&&h.isError?0:1);if(T>S)return{parser:O.parser,overlay:[{from:S,to:T}],bracketed:!0}}else if(c.type.id==se)return{parser:O.parser,overlay:[{from:c.from,to:c.to}]}}}}return null})}const V=["_blank","_self","_top","_parent"],C=["ascii","utf-8","utf-16","latin1","latin1"],k=["get","post","put","delete"],Q=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],g=["true","false"],n={},bt={a:{attrs:{href:null,ping:null,type:null,media:null,target:V,hreflang:null}},abbr:n,address:n,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:n,aside:n,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:n,base:{attrs:{href:null,target:V}},bdi:n,bdo:n,blockquote:{attrs:{cite:null}},body:n,br:n,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Q,formmethod:k,formnovalidate:["novalidate"],formtarget:V,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:n,center:n,cite:n,code:n,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:n,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:n,div:n,dl:n,dt:n,em:n,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:n,figure:n,footer:n,form:{attrs:{action:null,name:null,"accept-charset":C,autocomplete:["on","off"],enctype:Q,method:k,novalidate:["novalidate"],target:V}},h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:n,hgroup:n,hr:n,html:{attrs:{manifest:null}},i:n,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Q,formmethod:k,formnovalidate:["novalidate"],formtarget:V,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:n,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:n,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:n,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:C,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:n,noscript:n,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:n,param:{attrs:{name:null,value:null}},pre:n,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:n,rt:n,ruby:n,samp:n,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:C}},section:n,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:n,source:{attrs:{src:null,type:null,media:null}},span:n,strong:n,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:n,summary:n,sup:n,table:n,tbody:n,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:n,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:n,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:n,time:{attrs:{datetime:null}},title:n,tr:n,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:n,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:n},Oe={accesskey:null,class:null,contenteditable:g,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:g,autocorrect:g,autocapitalize:g,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":g,"aria-autocomplete":["inline","list","both","none"],"aria-busy":g,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":g,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":g,"aria-hidden":g,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":g,"aria-multiselectable":g,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":g,"aria-relevant":null,"aria-required":g,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},de="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of de)Oe[e]=null;class y{constructor(a,r){this.tags={...bt,...a},this.globalAttrs={...Oe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}y.default=new y;function P(e,a,r=e.length){if(!a)return"";let l=a.firstChild,t=l&&l.getChild("TagName");return t?e.sliceString(t.from,Math.min(t.to,r)):""}function x(e,a=!1){for(;e;e=e.parent)if(e.name=="Element")if(a)a=!1;else return e;return null}function ce(e,a,r){let l=r.tags[P(e,x(a))];return(l==null?void 0:l.children)||r.allTags}function B(e,a){let r=[];for(let l=x(a);l&&!l.type.isTop;l=x(l.parent)){let t=P(e,l);if(t&&l.lastChild.name=="CloseTag")break;t&&r.indexOf(t)<0&&(a.name=="EndTag"||a.from>=l.firstChild.to)&&r.push(t)}return r}const pe=/^[:\-\.\w\u00b7-\uffff]*$/;function L(e,a,r,l,t){let s=/\s*>/.test(e.sliceDoc(t,t+5))?"":">",o=x(r,r.name=="StartTag"||r.name=="TagName");return{from:l,to:t,options:ce(e.doc,o,a).map(i=>({label:i,type:"type"})).concat(B(e.doc,r).map((i,u)=>({label:"/"+i,apply:"/"+i+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function F(e,a,r,l){let t=/\s*>/.test(e.sliceDoc(l,l+5))?"":">";return{from:r,to:l,options:B(e.doc,a).map((s,o)=>({label:s,apply:s+t,type:"type",boost:99-o})),validFor:pe}}function ht(e,a,r,l){let t=[],s=0;for(let o of ce(e.doc,r,a))t.push({label:"<"+o,type:"type"});for(let o of B(e.doc,r))t.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:l,to:l,options:t,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Tt(e,a,r,l,t){let s=x(r),o=s?a.tags[P(e.doc,s)]:null,i=o&&o.attrs?Object.keys(o.attrs):[],u=o&&o.globalAttrs===!1?i:i.length?i.concat(a.globalAttrNames):a.globalAttrNames;return{from:l,to:t,options:u.map(f=>({label:f,type:"property"})),validFor:pe}}function Pt(e,a,r,l,t){var s;let o=(s=r.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),i=[],u;if(o){let f=e.sliceDoc(o.from,o.to),p=a.globalAttrs[f];if(!p){let d=x(r),m=d?a.tags[P(e.doc,d)]:null;p=(m==null?void 0:m.attrs)&&m.attrs[f]}if(p){let d=e.sliceDoc(l,t).toLowerCase(),m='"',O='"';/^['"]/.test(d)?(u=d[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",O=e.sliceDoc(t,t+1)==d[0]?"":d[0],d=d.slice(1),l++):u=/^[^\s<>='"]*$/;for(let c of p)i.push({label:c,apply:m+c+O,type:"constant"})}}return{from:l,to:t,options:i,validFor:u}}function me(e,a){let{state:r,pos:l}=a,t=K(r).resolveInner(l,-1),s=t.resolve(l);for(let o=l,i;s==t&&(i=t.childBefore(o));){let u=i.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=t=i,o=u.from}return t.name=="TagName"?t.parent&&/CloseTag$/.test(t.parent.name)?F(r,t,t.from,l):L(r,e,t,t.from,l):t.name=="StartTag"||t.name=="IncompleteTag"?L(r,e,t,l,l):t.name=="StartCloseTag"||t.name=="IncompleteCloseTag"?F(r,t,l,l):t.name=="OpenTag"||t.name=="SelfClosingTag"||t.name=="AttributeName"?Tt(r,e,t,t.name=="AttributeName"?t.from:l,l):t.name=="Is"||t.name=="AttributeValue"||t.name=="UnquotedAttributeValue"?Pt(r,e,t,t.name=="Is"?l:t.from,l):a.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?ht(r,e,t,l):null}function qt(e){return me(y.default,e)}function xt(e){let{extraTags:a,extraGlobalAttributes:r}=e,l=r||a?new y(a,r):y.default;return t=>me(l,t)}const Vt=M.parser.configure({top:"SingleExpression"}),fe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:qe.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:Ce.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:ke.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Vt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:M.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:J.parser}],ge=[{name:"style",parser:J.parser.configure({top:"Styles"})}].concat(de.map(e=>({name:e,parser:M.parser}))),Se=we.define({name:"html",parser:St.configure({props:[ve.add({Element(e){let a=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+a[0].length?e.continue():e.lineIndent(e.node.from)+(a[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let a=null,r;for(let l=e.node;;){let t=l.lastChild;if(!t||t.name!="Element"||t.to!=l.to)break;a=l=t}return a&&!((r=a.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(a.from)+e.unit:null}}),Xe.add({Element(e){let a=e.firstChild,r=e.lastChild;return!a||a.name!="OpenTag"?null:{from:a.to,to:r.name=="CloseTag"?r.from:e.to}}}),$e.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),v=Se.configure({wrap:ue(fe,ge)});function Ct(e={}){let a="",r;e.matchClosingTags===!1&&(a="noMatch"),e.selfClosingTags===!0&&(a=(a?a+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=ue((e.nestedLanguages||[]).concat(fe),(e.nestedAttributes||[]).concat(ge)));let l=r?Se.configure({wrap:r,dialect:a}):a?v.configure({dialect:a}):v;return new ye(l,[v.data.of({autocomplete:xt(e)}),e.autoCloseTags!==!1?yt:[],Qe().support,_e().support])}const H=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),yt=xe.inputHandler.of((e,a,r,l,t)=>{if(e.composing||e.state.readOnly||a!=r||l!=">"&&l!="/"||!v.isActiveAt(e.state,a,-1))return!1;let s=t(),{state:o}=s,i=o.changeByRange(u=>{var f,p,d;let m=o.doc.sliceString(u.from-1,u.to)==l,{head:O}=u,c=K(o).resolveInner(O,-1),S;if(m&&l==">"&&c.name=="EndTag"){let h=c.parent;if(((p=(f=h.parent)===null||f===void 0?void 0:f.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(S=P(o.doc,h.parent,O))&&!H.has(S)){let T=O+(o.doc.sliceString(O,O+1)===">"?1:0),w=`</${S}>`;return{range:u,changes:{from:O,to:T,insert:w}}}}else if(m&&l=="/"&&c.name=="IncompleteCloseTag"){let h=c.parent;if(c.from==O-2&&((d=h.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(S=P(o.doc,h,O))&&!H.has(S)){let T=O+(o.doc.sliceString(O,O+1)===">"?1:0),w=`${S}>`;return{range:Ve.cursor(O+w.length,-1),changes:{from:O,to:T,insert:w}}}}return{range:u}});return i.changes.empty?!1:(e.dispatch([s,o.update(i,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{yt as autoCloseTags,Ct as html,qt as htmlCompletionSource,xt as htmlCompletionSourceWith,v as htmlLanguage};
|
|
1
|
+
import{L as be,E as $,C as he}from"./index-lNMJBFB0.js";import{p as Te,s as Pe,t as b,E as xe,e as K,j as Ve,a as ye,L as we,i as ve,f as Xe,O as $e}from"./index-D16KF-iC.js";import{cssLanguage as J,css as _e}from"./index-BKuzoeSn.js";import{typescriptLanguage as qe,jsxLanguage as Ce,tsxLanguage as ke,javascriptLanguage as M,javascript as Qe}from"./index-P5j6zmcN.js";import"./index-CdKpQ1hI.js";const Ae=55,Ye=1,Me=56,Re=2,Ee=57,Ze=3,z=4,Be=5,R=6,ee=7,te=8,ae=9,le=10,ze=11,De=12,We=13,_=58,Ne=14,Ge=15,D=59,re=21,Ie=23,ne=24,je=25,A=27,se=28,Ue=29,Le=32,Fe=35,He=37,Ke=38,Je=0,et=1,tt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},at={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},W={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function lt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let N=null,G=null,I=0;function Y(e,a){let r=e.pos+a;if(I==r&&G==e)return N;let l=e.peek(a),t="";for(;lt(l);)t+=String.fromCharCode(l),l=e.peek(++a);return G=e,I=r,N=t?t.toLowerCase():l==rt||l==nt?void 0:null}const oe=60,X=62,E=47,rt=63,nt=33,st=45;function j(e,a){this.name=e,this.parent=a}const ot=[R,le,ee,te,ae],it=new he({start:null,shift(e,a,r,l){return ot.indexOf(a)>-1?new j(Y(l,1)||"",e):e},reduce(e,a){return a==re&&e?e.parent:e},reuse(e,a,r,l){let t=a.type.id;return t==R||t==He?new j(Y(l,1)||"",e):e},strict:!1}),ut=new $((e,a)=>{if(e.next!=oe){e.next<0&&a.context&&e.acceptToken(_);return}e.advance();let r=e.next==E;r&&e.advance();let l=Y(e,0);if(l===void 0)return;if(!l)return e.acceptToken(r?Ge:Ne);let t=a.context?a.context.name:null;if(r){if(l==t)return e.acceptToken(ze);if(t&&at[t])return e.acceptToken(_,-2);if(a.dialectEnabled(Je))return e.acceptToken(De);for(let s=a.context;s;s=s.parent)if(s.name==l)return;e.acceptToken(We)}else{if(l=="script")return e.acceptToken(ee);if(l=="style")return e.acceptToken(te);if(l=="textarea")return e.acceptToken(ae);if(tt.hasOwnProperty(l))return e.acceptToken(le);t&&W[t]&&W[t][l]?e.acceptToken(_,-1):e.acceptToken(R)}},{contextual:!0}),Ot=new $(e=>{for(let a=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(D);break}if(e.next==st)a++;else if(e.next==X&&a>=2){r>=3&&e.acceptToken(D,-2);break}else a=0;e.advance()}});function dt(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const ct=new $((e,a)=>{if(e.next==E&&e.peek(1)==X){let r=a.dialectEnabled(et)||dt(a.context);e.acceptToken(r?Be:z,2)}else e.next==X&&e.acceptToken(z,1)});function Z(e,a,r){let l=2+e.length;return new $(t=>{for(let s=0,o=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(a);break}if(s==0&&t.next==oe||s==1&&t.next==E||s>=2&&s<l&&t.next==e.charCodeAt(s-2))s++,o++;else if(s==l&&t.next==X){i>o?t.acceptToken(a,-o):t.acceptToken(r,-(o-2));break}else if((t.next==10||t.next==13)&&i){t.acceptToken(a,1);break}else s=o=0;t.advance()}})}const pt=Z("script",Ae,Ye),mt=Z("style",Me,Re),ft=Z("textarea",Ee,Ze),gt=Pe({"Text RawText IncompleteTag IncompleteCloseTag":b.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":b.angleBracket,TagName:b.tagName,"MismatchedCloseTag/TagName":[b.tagName,b.invalid],AttributeName:b.attributeName,"AttributeValue UnquotedAttributeValue":b.attributeValue,Is:b.definitionOperator,"EntityReference CharacterReference":b.character,Comment:b.blockComment,ProcessingInst:b.processingInstruction,DoctypeDecl:b.documentMeta}),St=be.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOO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P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:it,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[gt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#t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;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[pt,mt,ft,ct,ut,Ot,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function ie(e,a){let r=Object.create(null);for(let l of e.getChildren(ne)){let t=l.getChild(je),s=l.getChild(A)||l.getChild(se);t&&(r[a.read(t.from,t.to)]=s?s.type.id==A?a.read(s.from+1,s.to-1):a.read(s.from,s.to):"")}return r}function U(e,a){let r=e.getChild(Ie);return r?a.read(r.from,r.to):" "}function q(e,a,r){let l;for(let t of r)if(!t.attrs||t.attrs(l||(l=ie(e.node.parent.firstChild,a))))return{parser:t.parser,bracketed:!0};return null}function ue(e=[],a=[]){let r=[],l=[],t=[],s=[];for(let i of e)(i.tag=="script"?r:i.tag=="style"?l:i.tag=="textarea"?t:s).push(i);let o=a.length?Object.create(null):null;for(let i of a)(o[i.name]||(o[i.name]=[])).push(i);return Te((i,u)=>{let f=i.type.id;if(f==Ue)return q(i,u,r);if(f==Le)return q(i,u,l);if(f==Fe)return q(i,u,t);if(f==re&&s.length){let p=i.node,d=p.firstChild,m=d&&U(d,u),O;if(m){for(let c of s)if(c.tag==m&&(!c.attrs||c.attrs(O||(O=ie(d,u))))){let S=p.lastChild,h=S.type.id==Ke?S.from:p.to;if(h>d.to)return{parser:c.parser,overlay:[{from:d.to,to:h}]}}}}if(o&&f==ne){let p=i.node,d;if(d=p.firstChild){let m=o[u.read(d.from,d.to)];if(m)for(let O of m){if(O.tagName&&O.tagName!=U(p.parent,u))continue;let c=p.lastChild;if(c.type.id==A){let S=c.from+1,h=c.lastChild,T=c.to-(h&&h.isError?0:1);if(T>S)return{parser:O.parser,overlay:[{from:S,to:T}],bracketed:!0}}else if(c.type.id==se)return{parser:O.parser,overlay:[{from:c.from,to:c.to}]}}}}return null})}const V=["_blank","_self","_top","_parent"],C=["ascii","utf-8","utf-16","latin1","latin1"],k=["get","post","put","delete"],Q=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],g=["true","false"],n={},bt={a:{attrs:{href:null,ping:null,type:null,media:null,target:V,hreflang:null}},abbr:n,address:n,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:n,aside:n,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:n,base:{attrs:{href:null,target:V}},bdi:n,bdo:n,blockquote:{attrs:{cite:null}},body:n,br:n,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Q,formmethod:k,formnovalidate:["novalidate"],formtarget:V,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:n,center:n,cite:n,code:n,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:n,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:n,div:n,dl:n,dt:n,em:n,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:n,figure:n,footer:n,form:{attrs:{action:null,name:null,"accept-charset":C,autocomplete:["on","off"],enctype:Q,method:k,novalidate:["novalidate"],target:V}},h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:n,hgroup:n,hr:n,html:{attrs:{manifest:null}},i:n,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Q,formmethod:k,formnovalidate:["novalidate"],formtarget:V,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:n,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:n,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:n,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:C,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:n,noscript:n,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:n,param:{attrs:{name:null,value:null}},pre:n,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:n,rt:n,ruby:n,samp:n,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:C}},section:n,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:n,source:{attrs:{src:null,type:null,media:null}},span:n,strong:n,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:n,summary:n,sup:n,table:n,tbody:n,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:n,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:n,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:n,time:{attrs:{datetime:null}},title:n,tr:n,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:n,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:n},Oe={accesskey:null,class:null,contenteditable:g,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:g,autocorrect:g,autocapitalize:g,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":g,"aria-autocomplete":["inline","list","both","none"],"aria-busy":g,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":g,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":g,"aria-hidden":g,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":g,"aria-multiselectable":g,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":g,"aria-relevant":null,"aria-required":g,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},de="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of de)Oe[e]=null;class y{constructor(a,r){this.tags={...bt,...a},this.globalAttrs={...Oe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}y.default=new y;function P(e,a,r=e.length){if(!a)return"";let l=a.firstChild,t=l&&l.getChild("TagName");return t?e.sliceString(t.from,Math.min(t.to,r)):""}function x(e,a=!1){for(;e;e=e.parent)if(e.name=="Element")if(a)a=!1;else return e;return null}function ce(e,a,r){let l=r.tags[P(e,x(a))];return(l==null?void 0:l.children)||r.allTags}function B(e,a){let r=[];for(let l=x(a);l&&!l.type.isTop;l=x(l.parent)){let t=P(e,l);if(t&&l.lastChild.name=="CloseTag")break;t&&r.indexOf(t)<0&&(a.name=="EndTag"||a.from>=l.firstChild.to)&&r.push(t)}return r}const pe=/^[:\-\.\w\u00b7-\uffff]*$/;function L(e,a,r,l,t){let s=/\s*>/.test(e.sliceDoc(t,t+5))?"":">",o=x(r,r.name=="StartTag"||r.name=="TagName");return{from:l,to:t,options:ce(e.doc,o,a).map(i=>({label:i,type:"type"})).concat(B(e.doc,r).map((i,u)=>({label:"/"+i,apply:"/"+i+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function F(e,a,r,l){let t=/\s*>/.test(e.sliceDoc(l,l+5))?"":">";return{from:r,to:l,options:B(e.doc,a).map((s,o)=>({label:s,apply:s+t,type:"type",boost:99-o})),validFor:pe}}function ht(e,a,r,l){let t=[],s=0;for(let o of ce(e.doc,r,a))t.push({label:"<"+o,type:"type"});for(let o of B(e.doc,r))t.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:l,to:l,options:t,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Tt(e,a,r,l,t){let s=x(r),o=s?a.tags[P(e.doc,s)]:null,i=o&&o.attrs?Object.keys(o.attrs):[],u=o&&o.globalAttrs===!1?i:i.length?i.concat(a.globalAttrNames):a.globalAttrNames;return{from:l,to:t,options:u.map(f=>({label:f,type:"property"})),validFor:pe}}function Pt(e,a,r,l,t){var s;let o=(s=r.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),i=[],u;if(o){let f=e.sliceDoc(o.from,o.to),p=a.globalAttrs[f];if(!p){let d=x(r),m=d?a.tags[P(e.doc,d)]:null;p=(m==null?void 0:m.attrs)&&m.attrs[f]}if(p){let d=e.sliceDoc(l,t).toLowerCase(),m='"',O='"';/^['"]/.test(d)?(u=d[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",O=e.sliceDoc(t,t+1)==d[0]?"":d[0],d=d.slice(1),l++):u=/^[^\s<>='"]*$/;for(let c of p)i.push({label:c,apply:m+c+O,type:"constant"})}}return{from:l,to:t,options:i,validFor:u}}function me(e,a){let{state:r,pos:l}=a,t=K(r).resolveInner(l,-1),s=t.resolve(l);for(let o=l,i;s==t&&(i=t.childBefore(o));){let u=i.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=t=i,o=u.from}return t.name=="TagName"?t.parent&&/CloseTag$/.test(t.parent.name)?F(r,t,t.from,l):L(r,e,t,t.from,l):t.name=="StartTag"||t.name=="IncompleteTag"?L(r,e,t,l,l):t.name=="StartCloseTag"||t.name=="IncompleteCloseTag"?F(r,t,l,l):t.name=="OpenTag"||t.name=="SelfClosingTag"||t.name=="AttributeName"?Tt(r,e,t,t.name=="AttributeName"?t.from:l,l):t.name=="Is"||t.name=="AttributeValue"||t.name=="UnquotedAttributeValue"?Pt(r,e,t,t.name=="Is"?l:t.from,l):a.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?ht(r,e,t,l):null}function qt(e){return me(y.default,e)}function xt(e){let{extraTags:a,extraGlobalAttributes:r}=e,l=r||a?new y(a,r):y.default;return t=>me(l,t)}const Vt=M.parser.configure({top:"SingleExpression"}),fe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:qe.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:Ce.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:ke.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Vt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:M.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:J.parser}],ge=[{name:"style",parser:J.parser.configure({top:"Styles"})}].concat(de.map(e=>({name:e,parser:M.parser}))),Se=we.define({name:"html",parser:St.configure({props:[ve.add({Element(e){let a=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+a[0].length?e.continue():e.lineIndent(e.node.from)+(a[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let a=null,r;for(let l=e.node;;){let t=l.lastChild;if(!t||t.name!="Element"||t.to!=l.to)break;a=l=t}return a&&!((r=a.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(a.from)+e.unit:null}}),Xe.add({Element(e){let a=e.firstChild,r=e.lastChild;return!a||a.name!="OpenTag"?null:{from:a.to,to:r.name=="CloseTag"?r.from:e.to}}}),$e.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),v=Se.configure({wrap:ue(fe,ge)});function Ct(e={}){let a="",r;e.matchClosingTags===!1&&(a="noMatch"),e.selfClosingTags===!0&&(a=(a?a+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=ue((e.nestedLanguages||[]).concat(fe),(e.nestedAttributes||[]).concat(ge)));let l=r?Se.configure({wrap:r,dialect:a}):a?v.configure({dialect:a}):v;return new ye(l,[v.data.of({autocomplete:xt(e)}),e.autoCloseTags!==!1?yt:[],Qe().support,_e().support])}const H=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),yt=xe.inputHandler.of((e,a,r,l,t)=>{if(e.composing||e.state.readOnly||a!=r||l!=">"&&l!="/"||!v.isActiveAt(e.state,a,-1))return!1;let s=t(),{state:o}=s,i=o.changeByRange(u=>{var f,p,d;let m=o.doc.sliceString(u.from-1,u.to)==l,{head:O}=u,c=K(o).resolveInner(O,-1),S;if(m&&l==">"&&c.name=="EndTag"){let h=c.parent;if(((p=(f=h.parent)===null||f===void 0?void 0:f.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(S=P(o.doc,h.parent,O))&&!H.has(S)){let T=O+(o.doc.sliceString(O,O+1)===">"?1:0),w=`</${S}>`;return{range:u,changes:{from:O,to:T,insert:w}}}}else if(m&&l=="/"&&c.name=="IncompleteCloseTag"){let h=c.parent;if(c.from==O-2&&((d=h.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(S=P(o.doc,h,O))&&!H.has(S)){let T=O+(o.doc.sliceString(O,O+1)===">"?1:0),w=`${S}>`;return{range:Ve.cursor(O+w.length,-1),changes:{from:O,to:T,insert:w}}}}return{range:u}});return i.changes.empty?!1:(e.dispatch([s,o.update(i,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});export{yt as autoCloseTags,Ct as html,qt as htmlCompletionSource,xt as htmlCompletionSourceWith,v as htmlLanguage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,Q as a}from"./index-CdKpQ1hI.js";function r({className:e,children:o,...n}){return t.jsx("code",{"data-slot":"inline-code",className:a("bg-muted rounded px-1.5 py-0.5 font-mono text-[0.85em] break-all",e),...n,children:o})}export{r as I};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a2 as n}from"./index-CdKpQ1hI.js";/**
|
|
2
|
+
* @license lucide-react v1.48.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};e.node;const o=n(e);export{o as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aP as e}from"./index-CdKpQ1hI.js";function i(o){const r=o.filter(t=>!e.includes(t)&&t!=="test-mode"&&t!=="computer-local");return[...e,...r]}export{i as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var h=(
|
|
1
|
+
var l=Object.defineProperty;var h=(t,r,e)=>r in t?l(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var n=(t,r,e)=>h(t,typeof r!="symbol"?r+"":r,e);import{r as i,j as s,bO as m,bP as u,Q as x}from"./index-CdKpQ1hI.js";class f extends i.Component{constructor(){super(...arguments);n(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,o){console.error("[Markdown] Render error:",e,o.componentStack)}componentDidUpdate(e){e.resetKey!==this.props.resetKey&&this.state.hasError&&this.setState({hasError:!1})}render(){return this.state.hasError?this.props.fallback??s.jsx("p",{className:"text-muted-foreground text-sm",children:"This content couldn’t be displayed."}):this.props.children}}function j({content:t,className:r,errorFallback:e,components:o,allowedTags:c,literalTagContent:d,renderers:a}){const p=i.useMemo(()=>a?{renderers:a}:void 0,[a]);return s.jsx("div",{className:x("desktop:select-text",r),children:s.jsx(f,{resetKey:t,fallback:e,children:s.jsx(m,{components:{...o,a:u},allowedTags:c,literalTagContent:d,plugins:p,children:t})})})}export{j as M,f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a1 as x,j as n,Q as o,aY as g,aZ as h}from"./index-CdKpQ1hI.js";const v="65%",i=x("inline rounded-md px-1.5 py-0.5 font-medium [-webkit-box-decoration-break:clone] [box-decoration-break:clone] [overflow-wrap:anywhere]",{variants:{tone:{neutral:"bg-secondary text-secondary-foreground",agent:"bg-[color-mix(in_oklch,var(--identity-color)_14%,transparent)]"},interactive:{true:"focus-visible:ring-ring cursor-pointer transition-[background-color] duration-(--identity-answer) ease-(--identity-ease-standard) focus-visible:ring-2 focus-visible:outline-none",false:""}},compoundVariants:[{tone:"agent",interactive:!0,class:"hover:bg-[color-mix(in_oklch,var(--identity-color)_20%,transparent)]"},{tone:"neutral",interactive:!0,class:"hover:bg-[color-mix(in_oklch,hsl(var(--secondary)),hsl(var(--foreground))_10%)]"}],defaultVariants:{tone:"neutral",interactive:!1}});function p({kind:s,label:e,handle:l,color:c,origin:d,resolved:m,interactive:r,className:t,...a}){if(!m)return n.jsxs("span",{"data-slot":"mention-pill","data-resolved":"false",className:o("text-muted-foreground",t),...a,children:["@",e]});const u=l?`@${l}`:e;if(s==="agent")return n.jsxs("span",{"data-slot":"mention-pill","data-kind":"agent",title:u,className:o(i({tone:"agent",interactive:r}),t),style:{"--identity-color":c??"currentColor",color:`color-mix(in oklch, ${c??"currentColor"} ${v}, hsl(var(--foreground)))`},...a,children:[n.jsx(g,{"aria-hidden":!0,className:"mr-0.5 inline-block size-[0.85em] align-[-0.15em]"}),e]});if(s==="system")return n.jsx("span",{"data-slot":"mention-pill","data-kind":"system",className:o(i({tone:"neutral",interactive:r}),t),...a,children:e});const f=typeof d=="object"&&d!==null;return n.jsxs("span",{"data-slot":"mention-pill","data-kind":"human",title:u,className:o(i({tone:"neutral",interactive:r}),t),...a,children:["@",e,f&&n.jsx(h,{"aria-hidden":!0,className:"ml-0.5 inline-block size-[0.72em] align-[-0.05em] opacity-70"})]})}export{p as M,i as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as d,j as e,Y as x,Z as m,$ as c,Q as t,a0 as u}from"./index-CdKpQ1hI.js";function f({children:a,label:r="More details",openLabel:n="Fewer details",defaultOpen:o=!1,className:i}){const[s,l]=d.useState(o);return e.jsxs(x,{open:s,onOpenChange:l,className:t("text-sm",i),children:[e.jsxs(m,{className:"text-muted-foreground hover:text-foreground focus-ring -mx-1 inline-flex items-center gap-1 rounded-sm px-1 text-xs font-medium transition-colors duration-150",children:[s?n:r,e.jsx(c,{"aria-hidden":!0,className:t("size-3.5 shrink-0 motion-safe:transition-transform motion-safe:duration-150",s&&"rotate-180")})]}),e.jsx(u,{children:e.jsx("div",{className:"text-muted-foreground space-y-2 pt-1.5 leading-relaxed",children:a})})]})}export{f as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aV as s}from"./index-CdKpQ1hI.js";function l(e){var a;return((a=e==null?void 0:e.ownerNotice)==null?void 0:a.state)==="open"?e.ownerNotice:null}function n(e,a={}){return new Intl.DateTimeFormat(a.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric",timeZone:a.timeZone}).format(new Date(e))}function i(e,a){return e.requestState==="claimable"?"at any time now":e.claimableAfter?`on or after ${n(e.claimableAfter,a)}`:"in 7 days or more"}function d(e,a,o){const{options:r}=e,t=["Someone asked to replace you as owner",`That can happen ${i(e,o)}, unless you keep ownership.`,"Open the space to keep ownership."];return r.transfer&&r.delete?t.push("You can also hand it over, or delete it."):r.transfer?t.push("You can also hand it over yourself."):r.delete&&t.push("You can also delete it."),r.needsPassword&&t.push(a==="active"?"To hand it over or delete it, add a password to your account.":"To delete it, add a password to your account."),e.claimReissuedAt&&t.push(`The new owner’s link was sent again on ${n(e.claimReissuedAt,o)}.`),t}function m(e){return new URL(s(e.remoteCommunityId),e.pinnedOrigin).toString()}export{d as a,m as c,l as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,
|
|
1
|
+
import{j as a,Q as i,a1 as o}from"./index-CdKpQ1hI.js";const d=o("mx-auto w-full px-4 py-6 sm:px-6",{variants:{width:{full:"",wide:"max-w-[var(--page-width-wide)]",reading:"max-w-[var(--page-width-reading)]"}}});function u({width:s,scroll:l=!0,className:e,children:t,...n}){const r=d({width:s});return l?a.jsx("div",{className:"h-full [scrollbar-gutter:stable_both-edges] overflow-y-auto",children:a.jsx("div",{"data-slot":"page-container",className:i(r,e),...n,children:t})}):a.jsx("div",{"data-slot":"page-container",className:i(r,"flex h-full min-h-0 flex-col",e),...n,children:t})}export{u as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,I as x,B as u,ax as c,Q as l}from"./index-CdKpQ1hI.js";function p({className:a,disabled:s,onChange:t,onBrowse:n,browseLabel:e="Browse",browseTestId:o,...i}){return r.jsxs("div",{"data-slot":"path-input",className:l("dark:bg-input/30 border-input flex items-center rounded-md border bg-transparent shadow-xs transition-[color,box-shadow]","focus-within:border-ring focus-within:ring-ring focus-within:ring-[3px]",a),children:[r.jsx(x,{type:"text",className:"border-0 bg-transparent font-mono shadow-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent",disabled:s,onChange:t?d=>t(d.target.value):void 0,...i}),n&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"bg-border mx-0 h-5 w-px shrink-0"}),r.jsxs(u,{variant:"ghost",size:"sm",disabled:s,onClick:n,className:"text-muted-foreground hover:text-foreground shrink-0 rounded-l-none text-xs","aria-label":e,"data-testid":o,children:[r.jsx(c,{className:"size-3.5"}),e]})]})]})}export{p as P};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{dD as b,ak as C,r as i,j as u,bF as I,W as P,Q as M,gf as N,gg as A,gh as O,b0 as S,a8 as v,a9 as w,aX as p,gi as x}from"./index-CdKpQ1hI.js";import{u as k}from"./use-is-below-desktop-G-mTu2Ga.js";import{u as D}from"./use-notification-prefs-qO1zRRFN.js";const G=.16,K=`[&_button]:${N}`;function q({candidates:t,ready:e,name:o="sidebar-bottom-slot",className:s}){const r=b(),a=C(),n=e?t.find(R=>R.show):void 0,[c,g]=i.useState(void 0),d=i.useRef(!1);i.useEffect(()=>{!e||d.current||(d.current=!0,g((n==null?void 0:n.id)??null))},[e,n]);const y=c!==void 0&&(n==null?void 0:n.id)!==c&&!r;return u.jsx("div",{"data-slot":o,className:M("shrink-0 px-2 pb-2 empty:p-0",a&&K,s),children:u.jsx(I,{initial:!1,children:n!==void 0&&u.jsx(P.div,{initial:y?{height:0,opacity:0}:!1,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:r?0:G,ease:[0,0,.2,1]},className:"overflow-hidden",children:n.render()},n.id)})})}const U={knock:"/knock.wav",settle:"/settle.wav","turn-end":"/notification.wav"},m=new Map;function F(t){try{let e=m.get(t);e||(e=new Audio(U[t]),m.set(t,e)),e.currentTime=0,e.play().catch(()=>{})}catch{}}function Y(){const t=S(s=>s.loadRightPanelState),e=k(),o=i.useRef(!e);i.useEffect(()=>{t({restoreOpen:o.current})},[t])}const h=Symbol("right-panel-layout-key-pending");function X(){const[t]=A(),{data:e,isPending:o}=O(t),s=S(c=>c.loadRightPanelForAgent),r=k(),a=i.useRef(r);i.useEffect(()=>{a.current=r},[r]);let n;t?o?n=h:n=(e==null?void 0:e.id)??t:n=null,i.useEffect(()=>{n!==h&&s(n,t,{inherit:!a.current})},[n,t,s]),i.useEffect(()=>()=>s(null),[s])}function z(t,e,o){const s=v();return w({queryKey:["commands",{cwd:t??null,sessionId:e??null,runtime:o??null}],queryFn:()=>s.getCommands(!1,t??void 0,{sessionId:e,runtime:o}),staleTime:p.COMMANDS_STALE_TIME_MS,gcTime:p.COMMANDS_GC_TIME_MS})}const _="dork-kickoff",E=`<${_}>`,T=`</${_}>`;function J(t){return`${E}
|
|
2
|
+
${t.trim()}
|
|
3
|
+
${T}`}function L(t){const e=x(t);return e.startsWith(E)&&e.endsWith(T)}function V(t){const e=t.findIndex(o=>o.role==="user");return e===-1||!L(t[e].content)?t:t.filter((o,s)=>s!==e)}const j={knock:"knock",settle:"allClear","turn-end":"turnEnd"};function Z(){const{prefs:t}=D(),{sounds:e}=t;return{play:i.useCallback(s=>{e[j[s]]&&F(s)},[e])}}const tt=3e4;let l=!1;const f=new Set;function et(){if(!l){l=!0;for(const t of f)t()}}function W(t){return f.add(t),()=>{f.delete(t)}}function $(){return l}function nt(){return i.useSyncExternalStore(W,$,()=>!1)}export{q as B,tt as L,et as a,Z as b,z as c,X as d,Y as e,V as f,nt as u,J as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a8 as s,aa as r,ab as i,br as h,bs as f}from"./index-CdKpQ1hI.js";function u(e){e.invalidateQueries({queryKey:[...h]}),e.invalidateQueries({queryKey:f.details()})}function l(e){return e!=null&&e.isShownInline?{isShownInline:e.isShownInline}:void 0}function T(e){const n=s(),t=r();return i({mutationFn:a=>n.updateProfile(a),onSuccess:()=>u(t),meta:l(e)})}function A(){const e=s(),n=r();return i({mutationFn:({file:t})=>e.uploadProfileAvatar(t,t.name),onSuccess:()=>u(n)})}function E(){const e=s(),n=r();return i({mutationFn:()=>e.deleteProfileAvatar(),onSuccess:()=>u(n)})}function m(){const e=s(),n=r();return i({mutationFn:({memberId:t,linked:a})=>e.setIdentityLinkedToMe(t,a),onSuccess:()=>u(n)})}function O(e){const n=s(),t=r();return i({mutationFn:({authorId:a,handle:d})=>n.setAuthorHandle(a,d),onSuccess:()=>u(t),meta:l(e)})}function c(e){return typeof e=="object"&&e!==null&&"code"in e?e.code:void 0}function o(e){const n=e instanceof Error?e.message.trim():"";return n.length>0?n:void 0}function P(e,n){const t=`@${n}`;switch(c(e)){case"HANDLE_TAKEN":return`${t} belongs to someone else. Pick a different one.`;case"HANDLE_RESERVED":return`${t} is spoken for. Either you used it before, or it is a word DorkOS uses to reach everyone. Pick a different one.`;case"INVALID_HANDLE":return o(e)??"That handle won’t work. Use lowercase letters, numbers, dots, underscores or hyphens.";default:return o(e)??"Couldn’t save your handle. Try again."}}function v(e){switch(c(e)){case"AVATAR_TOO_LARGE":return"That photo is over 2 MB. Pick a smaller one.";case"AVATAR_TYPE_UNSUPPORTED":return"That file isn’t a photo DorkOS can use. Pick a PNG, JPEG or WebP.";case"AVATAR_MISSING":return"No photo came through. Pick the file again.";case"OPERATOR_ONLY":return"Only the person at the keyboard can change this photo.";default:return o(e)??"Couldn’t save your photo. Try again."}}function g(e){return c(e)==="OPERATOR_ONLY"?"Only the person at the keyboard can change this name.":o(e)??"Couldn’t save your name. Try again."}function k(e,n){switch(c(e)){case"IDENTITY_NOT_EXTERNAL":return"Only an account on another chat platform can be linked to you.";case"OPERATOR_ONLY":return"Only this install’s owner can link accounts.";default:return o(e)??(n?"Couldn’t link that account. Try again.":"Couldn’t remove that link. Try again.")}}export{E as a,v as b,O as c,T as d,m as e,P as h,k as i,g as n,A as u};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a2 as s,j as r,bC as o}from"./index-CdKpQ1hI.js";/**
|
|
2
|
+
* @license lucide-react v1.48.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const a={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};a.node;const l=s(a);function c({value:i=0,className:t,...n}){const e=Math.min(100,Math.max(0,i));return r.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e,className:o("bg-dui-secondary relative h-2 w-full overflow-hidden rounded-full",t),...n,children:r.jsx("div",{"data-slot":"progress-indicator",className:"bg-dui-primary h-full rounded-full transition-[width] motion-reduce:transition-none!",style:{width:`${e}%`}})})}export{c as P,l as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i,a7 as n}from"./index-CdKpQ1hI.js";import{E as s}from"./empty-state-yl1dLwLN.js";function u({title:t,description:e,onRetry:r,isRetrying:a=!1,className:o}){return i.jsx(s,{icon:n,tone:"destructive",headline:t,description:e,action:{label:"Retry",onClick:r,busy:a},className:o})}export{u as Q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aT as a,aU as s}from"./index-CdKpQ1hI.js";const t={tasks:s,moment:a};export{t as i};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a2 as L,a8 as P,aa as U,ab as N,z as a,G as e,r as O,ae as W,j as i,eu as z,fz as q,B as k,ev as K,ew as G,ex as H,ey as J,aZ as Z,fw as y,F as t,_ as o,J as p,D as n,fA as r,fB as b,fC as m,K as Q,fD as C,fE as h}from"./index-CdKpQ1hI.js";import{u as V}from"./form-vPuXuaYT.js";/**
|
|
2
|
+
* @license lucide-react v1.48.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const w={name:"pen-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-3"]};w.node;const $=L(w),Y=["relay","messages"];function X(){const s=P(),c=U();return N({mutationFn:g=>s.sendRelayMessage(g),onSuccess:()=>{c.invalidateQueries({queryKey:[...Y]})}})}function ee(s){try{return JSON.parse(s)}catch{return{content:s}}}const ae=a({subject:e().min(1,"Add a subject"),from:e().min(1,"Add a sender"),payload:e().min(1,"Add a message")});function De({open:s,onOpenChange:c}={}){const[g,B]=O.useState(!1),f=s!==void 0,F=f?s:g,I=X(),d=V({defaultValues:{subject:"",from:"relay.human.console",payload:""},validators:{onSubmit:ae},onSubmit:({value:l})=>{I.mutate({subject:l.subject,from:l.from,payload:ee(l.payload)},{onSuccess:()=>{W.success("Message sent"),d.reset(),M(!1)}})}});function M(l){f?c==null||c(l):B(l),l||d.reset()}return i.jsxs(z,{open:F,onOpenChange:M,children:[!f&&i.jsx(q,{asChild:!0,children:i.jsxs(k,{variant:"ghost",size:"sm",className:"gap-1.5","data-testid":"compose-trigger",children:[i.jsx($,{className:"size-3.5"}),"Compose"]})}),i.jsxs(K,{children:[i.jsxs(G,{children:[i.jsx(H,{children:"Send a test message"}),i.jsx(J,{children:"Check that a message gets delivered."})]}),i.jsx(d.AppForm,{children:i.jsxs("form",{onSubmit:l=>{l.preventDefault(),d.handleSubmit()},className:"space-y-4",children:[i.jsx(d.AppField,{name:"subject",children:l=>i.jsx(l.TextField,{label:"Subject",placeholder:"e.g. relay.test.ping"})}),i.jsx(d.AppField,{name:"from",children:l=>i.jsx(l.TextField,{label:"From"})}),i.jsx(d.AppField,{name:"payload",children:l=>i.jsx(l.TextareaField,{label:"Message",placeholder:"Plain text or JSON",rows:4})}),i.jsx("div",{className:"flex justify-end",children:i.jsxs(k,{type:"submit",disabled:I.isPending,children:[i.jsx(Z,{className:"mr-2 size-4"}),"Send"]})})]})})]})]})}y();a({from:e().describe("Subject pattern (supports wildcards)"),to:e().describe("Subject pattern (supports wildcards)"),action:o(["allow","deny"]),priority:t().int()}).openapi("RelayAccessRule");y();const u=e().min(1),x=o(["telegram","webhook","claude-code","slack","plugin"]).openapi("AdapterType"),te=a({package:e().optional(),path:e().optional()}).refine(s=>s.package||s.path,{message:"Plugin source must specify either package or path"}).openapi("PluginSource"),S=o(["always","mention-only","thread-aware"]),j="thread-aware",ne=a({token:u,mode:o(["polling","webhook"]).default("polling"),webhookUrl:e().url().optional(),webhookPort:t().int().positive().optional(),webhookSecret:u.optional(),streaming:n().default(!0),respondMode:S.default(j),dmPolicy:o(["open","allowlist"]).default("allowlist"),dmAllowlist:p(e()).default([]),approverAllowlist:p(e()).default([])}).openapi("TelegramAdapterConfig"),oe=a({type:o(["photo","sticker","voice","document","video","location","audio","video_note"]),durationSec:t().optional(),fileName:e().optional(),mimeType:e().optional()}).openapi("TelegramMediaDescriptor");a({chatId:t(),messageId:t(),chatType:e(),fromId:t().optional(),username:e().optional(),replyToMessageId:t().optional(),messageThreadId:t().optional(),threadName:e().optional(),media:oe.optional(),botUsername:e().optional()}).openapi("TelegramPlatformData");const ie="A webhook must use its own address under relay.webhook., such as relay.webhook.my-service. Use letters, numbers, hyphens or underscores in each part; wildcards are not allowed.";function se(s){return s.startsWith("relay.webhook.")&&s.split(".").length<=16&&/^relay\.webhook\.[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*$/.test(s)}const le=a({subject:e().min(1).refine(se,{message:ie}),secret:e().min(16),previousSecret:e().optional()}).openapi("WebhookInboundConfig"),pe=a({url:e().url(),secret:e().min(16),headers:r(e(),e()).optional()}).openapi("WebhookOutboundConfig"),re=a({inbound:le,outbound:pe}).openapi("WebhookAdapterConfig"),de=a({botToken:u,appToken:u,signingSecret:u,streaming:n().default(!0),nativeStreaming:n().default(!0),typingIndicator:o(["none","reaction"]).default("reaction"),respondMode:S.default(j),dmPolicy:o(["open","allowlist"]).default("allowlist"),dmAllowlist:p(e()).default([]),approverAllowlist:p(e()).default([]),channelOverrides:r(e(),a({enabled:n().optional(),respondMode:S.optional()}).strict()).default({})}).openapi("SlackAdapterConfig"),ce=a({id:e().min(1).regex(/^[a-z0-9-]+$/,"Must be lowercase alphanumeric with hyphens"),type:x,enabled:n().default(!0),label:e().optional(),builtin:n().optional(),plugin:te.optional(),config:b([ne,re,de,r(e(),m())])}).openapi("AdapterConfig"),ue=a({id:e(),type:x,displayName:e(),state:o(["connected","disconnected","error","starting","stopping","reconnecting"]),messageCount:a({inbound:t().int().nonnegative(),outbound:t().int().nonnegative()}),errorCount:t().int().nonnegative(),lastError:e().optional(),lastErrorAt:e().datetime().optional(),startedAt:e().datetime().optional()}).openapi("AdapterStatus");a({adapters:p(ce)}).openapi("AdaptersConfigFile");const me=o(["text","password","number","boolean","select","textarea","url"]).openapi("ConfigFieldType"),he=a({label:e(),value:e(),description:e().optional()}).openapi("ConfigFieldOption"),ge=a({key:e(),label:e(),type:me,required:n(),default:b([e(),t(),n()]).optional(),placeholder:e().optional(),description:e().optional(),options:p(he).optional(),section:e().optional(),showWhen:a({field:e(),equals:b([e(),n(),t()])}).optional(),pattern:e().optional(),patternMessage:e().optional(),visibleByDefault:n().optional(),displayAs:Q("radio-cards").optional(),helpMarkdown:e().optional(),valueShape:o(["id-list","json-object"]).optional()}).openapi("ConfigField"),fe=a({stepId:e(),title:e(),description:e().optional(),fields:p(e())}).openapi("AdapterSetupStep"),be=o(["messaging","automation","internal","custom"]).openapi("AdapterCategory"),Se=a({type:e(),displayName:e(),description:e(),iconId:e().optional(),category:be,docsUrl:e().url().optional(),builtin:n(),configFields:p(ge),setupSteps:p(fe).optional(),setupInstructions:e().optional(),multiInstance:n().default(!1),deprecated:n().optional(),apiVersion:e().optional(),actionButton:a({label:e(),url:e()}).optional(),setupGuide:e().optional()}).openapi("AdapterManifest"),ye=a({id:e(),enabled:n(),label:e().optional(),status:ue,config:r(e(),m()).optional()}).openapi("CatalogInstance");a({manifest:Se,instances:p(ye)}).openapi("CatalogEntry");const A=o(["per-chat","per-user","stateless"]).openapi("SessionStrategy"),R="A bridge cannot be attached to a wildcard binding — one room cannot honestly be the channel for an unbounded set of chats.";function D(s){return s.bridge!=="room"||!!s.chatId}const E=o(["private","group","supergroup","channel"]).openapi("PlatformChatType"),_=a({id:e().uuid(),adapterId:e().min(1),agentId:e().min(1),chatId:e().optional(),channelType:h.optional(),platformChatType:E.optional(),sessionStrategy:A.default("per-chat"),label:e().default(""),permissionMode:C.default("default"),enabled:n().default(!0),canInitiate:n().default(!1),canReply:n().default(!0),canReceive:n().default(!0),notifyOnTaskComplete:n().default(!0),bridge:o(["off","room"]).default("off"),roomId:e().nullable().default(null),createdAt:e().datetime(),updatedAt:e().datetime()}),T=_.refine(D,{message:R,path:["chatId"]}).openapi("AdapterBinding");_.omit({id:!0,createdAt:!0,updatedAt:!0}).refine(D,{message:R,path:["chatId"]}).openapi("CreateBindingRequest");a({sessionStrategy:A.optional(),label:e().optional(),chatId:e().optional().nullable(),channelType:h.optional().nullable(),canInitiate:n().optional(),canReply:n().optional(),canReceive:n().optional(),notifyOnTaskComplete:n().optional(),permissionMode:C.optional(),enabled:n().optional(),bridge:o(["off","room"]).optional(),roomId:e().optional().nullable()}).openapi("UpdateBindingRequest");a({agentId:e().min(1)}).openapi("MoveBindingRequest");const Ce=o(["pending","claimed","ignored","blocked"]).openapi("UnclaimedChatStatus"),v=200,Ae=a({id:e(),adapterId:e(),chatId:e(),channelType:h.nullable(),chatKind:o(["dm","group"]),platformChatType:E.nullable(),senderName:e().max(v).nullable(),senderId:e().nullable(),chatTitle:e().max(v).nullable(),status:Ce,messageCount:t().int().nonnegative(),firstSeenAt:e().datetime(),lastSeenAt:e().datetime(),decidedAt:e().datetime().nullable(),decidedAgentId:e().nullable()}).openapi("UnclaimedChat");a({chats:p(Ae)}).openapi("UnclaimedChatListResponse");a({agentId:e().min(1),sessionStrategy:A.optional(),permissionMode:C.optional(),label:e().optional(),bridge:n().optional()}).openapi("ClaimUnclaimedChatRequest");a({bindings:p(T)}).openapi("BindingListResponse");a({binding:T}).openapi("BindingResponse");a({binding:T,bridgeError:e().optional()}).openapi("ClaimUnclaimedChatResponse");const Te=a({chatId:e(),displayName:e().optional(),channelType:h.optional(),lastMessageAt:e().datetime(),messageCount:t()}).openapi("ObservedChat");a({chats:p(Te)}).openapi("ObservedChatsResponse");a({type:e().min(1),config:r(e(),m())}).openapi("AdapterTestRequest");a({type:e().min(1),id:e().min(1).regex(/^[a-z0-9-]+$/,"Must be lowercase alphanumeric with hyphens"),config:r(e(),m()),enabled:n().optional(),label:e().optional()}).openapi("AdapterCreateRequest");a({config:r(e(),m())}).openapi("AdapterConfigUpdate");a({ok:n(),resolved:n(),latencyMs:t(),wouldDeliverTo:e().optional(),reason:e().optional(),details:e().optional()}).openapi("BindingTestResult");y();const Ie=a({enabled:n().default(!0),windowSecs:t().int().min(1).default(60),maxPerWindow:t().int().min(1).default(100),perSenderOverrides:r(e(),t().int().min(1)).optional()}).openapi("RateLimitConfig"),Me=a({enabled:n().default(!0),failureThreshold:t().int().min(1).default(5),cooldownMs:t().int().min(1e3).default(3e4),halfOpenProbeCount:t().int().min(1).default(1),successToClose:t().int().min(1).default(2)}).openapi("CircuitBreakerConfig"),ke=a({enabled:n().default(!0),maxMailboxSize:t().int().min(1).default(1e3),pressureWarningAt:t().min(0).max(1).default(.8)}).openapi("BackpressureConfig");a({rateLimit:Ie.partial().optional(),circuitBreaker:Me.partial().optional(),backpressure:ke.partial().optional()}).openapi("ReliabilityConfig");a({adapterId:e().optional(),chatId:e().optional(),userId:e().optional(),isSyntheticTest:n().optional()}).passthrough().openapi("TraceMetadata");const ve=o(["sent","delivered","failed","timeout","no_subscriber"]).openapi("TraceSpanStatus"),we=o(["delivery","lifecycle"]).openapi("TraceKind");o(["pending","delivered","processed","failed","dead_lettered"]).openapi("LegacyTraceSpanStatus");a({id:e(),messageId:e(),traceId:e(),subject:e(),status:ve,kind:we,sentAt:e(),deliveredAt:e().nullable(),processedAt:e().nullable(),errorMessage:e().nullable(),metadata:e().nullable()}).openapi("TraceSpan");o(["hop_limit","ttl_expired","cycle_detected","budget_exhausted"]).openapi("BudgetRejectionCode");const xe=a({hopLimit:t().int(),ttlExpired:t().int(),cycleDetected:t().int(),budgetExhausted:t().int()}).openapi("BudgetRejections");a({totalMessages:t().int(),deliveredCount:t().int(),failedCount:t().int(),noSubscriberCount:t().int(),deadLetteredCount:t().int(),avgDeliveryLatencyMs:t().nullable(),p50DeliveryLatencyMs:t().nullable(),p95DeliveryLatencyMs:t().nullable(),p99DeliveryLatencyMs:t().nullable(),activeEndpoints:t().int(),budgetRejections:xe}).openapi("DeliveryMetrics");export{De as C};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a2 as de,g9 as _,ae as ue,ga as V,be as Q,aa as me,a9 as he,r as d,ab as fe,j as s,cE as ge,cF as Oe,cH as xe,cI as _e,gb as q,cJ as ve,B as x,b2 as ye,dB as Ee,x as be,Q as Re,dh as pe,gc as Te,bs as M,gd as X,ge as Ne}from"./index-CdKpQ1hI.js";import{M as Ce}from"./markdown-content-1-B7PdbY.js";import{F as Se}from"./file-exclamation-point-DZrVsShR.js";/**
|
|
2
2
|
* @license lucide-react v1.48.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const J={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};J.node;const Fe=de(J),De=["CONFLICT","COPY_INTO_SELF","DIR_NOT_EMPTY","NOT_FOUND","REFUSE_ROOT","OUTSIDE_BOUNDARY"];function we(e){const t=_(e);return t!==void 0&&De.includes(t)?t:void 0}const Ae="Can’t copy a folder into itself",w="ROOM_REPO_CONFIG_UNSAFE",L="Room files are locked: their git settings could run a program. See the DorkOS log.",Ie={CONFLICT:"That name already exists",COPY_INTO_SELF:Ae,DIR_NOT_EMPTY:"This folder isn’t empty",NOT_FOUND:"That item no longer exists",REFUSE_ROOT:"Can’t change the top folder",OUTSIDE_BOUNDARY:"That’s outside the folders DorkOS can use"};function st(e,t){const o=we(e);ue.error(o?Ie[o]:t)}const Me=new Map([["ROOM_UPLOAD_TOO_MANY_FILES",`Nothing was uploaded. One upload takes up to ${V} files.`],["FILE_TOO_LARGE","A file is bigger than this room allows, so nothing changed."],["REPO_CAP_EXCEEDED","This room’s files are full, so nothing changed. Delete something first."],["MAIN_CHECKOUT_DIRTY","Changes are paused. Somebody changed these files outside DorkOS. See the warning above."],["MERGE_IN_FLIGHT","Somebody else is changing these files. Nothing changed. Try again in a moment."],["PEOPLE_ONLY","Only a person can change files here. Agents bring work in by merging."],["ROOM_FILE_PATH_INVALID","That name can’t be used in room files, so nothing changed."],["ROOM_FILE_NOT_READABLE","That can’t be changed here."],["ROOM_FILE_NOT_FOUND","That’s gone from the room’s files, so nothing changed. The list is refreshed."],["ATTACHMENT_NOT_FOUND","That file is no longer in this room’s chat."],["ROOM_HAS_NO_REPO","This room no longer has its own files."],["ROOM_REPOS_DISABLED","Room files are turned off on this install, so nothing changed."],["ROOM_REPO_GIT_UNAVAILABLE","Room files need git, and git isn’t installed on this computer."],["ROOM_NOT_FOUND","This room no longer exists."],["ROOM_ARCHIVED","This room is archived, so its files can’t be changed."],[w,L]]),Le=new Set(["FILE_TOO_LARGE","ROOM_FILE_PATH_INVALID","ROOM_FILE_NOT_READABLE",w]);function ke(e){return e.replace(/`([^`]*)`/g,"“$1”").trim()}function je(e){const t=_(e);if(t===void 0)return;const o=Me.get(t);if(o!==void 0)return k(e)??o}function k(e){const t=_(e);if(!(t===void 0||!Le.has(t))&&!(!(e instanceof Error)||e.message.trim()===""))return ke(e.message)}function nt(e){return`“${e}” already exists there, so nothing changed. Pick another name.`}function ot(e){if(_(e)!==w)return;const t=e.body,o=typeof(t==null?void 0:t.command)=="string"&&t.command!==""?t.command:null;return{message:k(e)??L,command:o}}const Pe="—";function Ue(e){if(e==null)return{label:Pe,title:null};const t=Q(e.at);return{label:`${e.author} · ${t}`,title:`${e.subject} · ${e.author}, ${t}`}}function ze(e){return/\.(md|markdown|mdx)$/i.test(e)}function Be(e){return e<1024?`${e} bytes`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function $e(e,t){return e.editable&&e.save!==void 0&&t!==void 0&&t.body.kind==="text"}function it({source:e,path:t,isNew:o=!1,onCreated:a,onClose:c}){const r=e.read,i=me(),n=["file-explorer","preview",e.scopeKey,t],m=he({queryKey:n,queryFn:()=>r(t),enabled:t!==null&&r!==void 0&&!o}),h=o&&t!==null?{path:t,size:0,commit:null,lastCommit:null,body:{kind:"text",text:""}}:m.data,[v,j]=d.useState(!1),[P,U]=d.useState(null),A=e.showToEveryone,W=d.useCallback(async l=>{if(A!==void 0){j(!0),U(null);try{await A(l),c()}catch(u){U(u instanceof Error&&u.message.trim().length>0?u.message:"Couldn’t reach DorkOS. Check your connection and try again.")}finally{j(!1)}}},[A,c]),[g,N]=d.useState(o),[R,b]=d.useState(""),[z,C]=d.useState({text:"",commit:null}),[y,O]=d.useState(null),[I,f]=d.useState(null),[B,p]=d.useState(!1),[ee,S]=d.useState(!1),$=d.useRef(null),K=d.useRef(null),H=d.useRef(!1),E=g&&R!==z.text,te=E||g&&o,Y=ee&&E,F=d.useCallback(()=>{N(!1),b(""),C({text:"",commit:null}),O(null),f(null),p(!1),S(!1)},[]),[se,ne]=d.useState(t);se!==t&&(ne(t),(g||R!==""||y!==null||I!==null||B)&&F(),o&&N(!0));const T=fe({mutationFn:l=>e.save({path:t,baseCommit:l.baseCommit,text:l.text}),onSuccess:(l,u)=>{if(l.status==="saved"){C({text:u.text,commit:l.commit}),O(null),f(null),p(!0),o&&(a==null||a()),i.invalidateQueries({queryKey:n}),i.invalidateQueries({queryKey:["file-explorer","tree",e.scopeKey]});return}if(p(!1),l.status==="conflict"){O(ce=>({commit:l.commit,lastCommit:l.lastCommit,again:ce!==null})),f(null);return}O(null),f(l.reason)},onError:()=>{p(!1),O(null),f("Couldn’t save. Try again in a moment.")}}),G=$e(e,h),oe=()=>{h===void 0||h.body.kind!=="text"||(b(h.body.text),C({text:h.body.text,commit:h.commit??null}),O(null),f(null),p(!1),N(!0))},ie=()=>{if(o){F(),c();return}N(!1),b(""),O(null),f(null),S(!1)},ae=async()=>{const l=await m.refetch();if(l.isError||l.data===void 0){f("Couldn’t get their version, so nothing changed.");return}const u=l.data;if(u.body.kind!=="text"){f(u.body.kind==="not-readable"?`${u.body.reason} Your text is still here. Save over theirs, or copy it out first.`:"Their version can’t be shown here, so nothing changed.");return}b(u.body.text),C({text:u.body.text,commit:u.commit??null}),O(null),f(null)},re=()=>{y!==null&&T.mutate({text:R,baseCommit:y.commit})},le=()=>{if(E){S(!0);return}F(),c()};return d.useEffect(()=>{var l,u;g?(l=$.current)==null||l.focus():H.current&&((u=K.current)==null||u.focus()),H.current=g},[g]),s.jsx(ge,{open:t!==null,onOpenChange:l=>!l&&le(),children:s.jsxs(Oe,{className:"max-h-[80vh] sm:max-w-2xl",children:[s.jsxs(xe,{children:[s.jsx(_e,{className:"truncate font-mono text-sm",children:t===null?"":q(t)}),s.jsx(ve,{className:"truncate text-xs",children:o&&t!==null?`${t} · New file`:He(h,t)})]}),!g&&(e.showToEveryone!==void 0||G)&&s.jsxs("div",{className:"flex justify-end gap-1 px-4",children:[e.showToEveryone!==void 0&&t!==null&&s.jsxs(x,{type:"button",variant:"ghost",size:"sm",disabled:v,className:"text-muted-foreground hover:text-foreground gap-1.5",onClick:()=>void W(t),children:[s.jsx(Fe,{className:"size-(--size-icon-xs)"}),v?"Putting it there…":"Put on the canvas"]}),G&&s.jsxs(x,{ref:K,type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground gap-1.5",onClick:oe,children:[s.jsx(ye,{className:"size-(--size-icon-xs)"}),"Edit"]})]}),P!==null&&s.jsx("p",{role:"status",className:"text-destructive px-4 pb-1 text-xs",children:P}),y!==null&&s.jsx(Ke,{conflict:y,onTakeTheirs:()=>void ae(),onKeepMine:re,busy:T.isPending||m.isFetching}),I!==null&&s.jsx("p",{role:"alert",className:"bg-destructive/10 text-destructive mx-4 rounded-md px-3 py-2 text-sm",children:I}),s.jsx(Ee,{className:"min-h-0 flex-1 overflow-auto",children:m.isPending&&!o?s.jsx("div",{className:"flex h-32 items-center justify-center",children:s.jsx(Re,{size:"md",className:"text-muted-foreground",label:"Loading the file"})}):m.isError&&!o||h===void 0?s.jsx(D,{children:"This file couldn’t be read."}):g?s.jsx("textarea",{ref:$,"aria-label":`${t===null?"File":q(t)} contents`,value:R,onChange:l=>b(l.target.value),spellCheck:!1,autoComplete:"off",className:be("text-foreground/90 border-border/60 bg-background field-sizing-content","focus-visible:border-ring focus-visible:ring-ring min-h-64 w-full","resize-none rounded-md border px-3 py-2 font-mono text-xs","whitespace-pre-wrap focus-visible:ring-[3px] focus-visible:outline-none")}):s.jsx(Ye,{file:h})}),g&&s.jsxs(pe,{className:"items-center gap-2 sm:justify-between",children:[s.jsx("span",{className:"text-muted-foreground text-xs","aria-live":"polite",children:T.isPending?"Saving…":Y?"You haven’t saved your changes.":B&&!E?"Saved":E?"Not saved yet":""}),s.jsx("span",{className:"flex gap-2",children:Y?s.jsxs(s.Fragment,{children:[s.jsx(x,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(!1),children:"Keep editing"}),s.jsx(x,{type:"button",variant:"destructive",size:"sm",onClick:()=>{F(),c()},children:"Discard changes"})]}):s.jsxs(s.Fragment,{children:[s.jsx(x,{type:"button",variant:"ghost",size:"sm",onClick:ie,children:E?"Discard":o?"Cancel":"Done"}),s.jsx(x,{type:"button",size:"sm",disabled:!te||T.isPending||y!==null,onClick:()=>T.mutate({text:R,baseCommit:z.commit}),children:"Save"})]})})]})]})})}function Ke({conflict:e,onTakeTheirs:t,onKeepMine:o,busy:a}){const c=e.lastCommit,r=c===null?"Somebody":c.author;return s.jsxs("div",{role:"alert",className:"border-border/60 bg-muted/40 mx-4 space-y-2 rounded-md border px-3 py-2 text-sm",children:[s.jsx("p",{children:e.again?`${r} changed this file again, so it still isn’t saved.`:`${r} changed this file while you edited, so nothing was saved.`}),c!==null&&s.jsxs("p",{className:"text-muted-foreground text-xs",children:[c.subject," · ",Q(c.at)]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(x,{type:"button",variant:"outline",size:"sm",disabled:a,onClick:t,children:"Open their version"}),s.jsx(x,{type:"button",variant:"destructive",size:"sm",disabled:a,onClick:o,children:"Save mine over it"})]}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"Opening theirs replaces what you typed here."})]})}function He(e,t){if(t===null)return"";const o=e===void 0?null:Ue(e.lastCommit);return o===null?t:`${t} · ${o.label}`}function Ye({file:e}){switch(e.body.kind){case"text":return ze(e.path)?s.jsx(Ce,{content:e.body.text,className:"text-sm",errorFallback:"This file couldn’t be displayed."}):s.jsx("pre",{className:"text-foreground/90 overflow-x-auto font-mono text-xs whitespace-pre",children:e.body.text});case"binary":return s.jsx(D,{children:"Only text files can be shown or edited here."});case"too-large":return s.jsxs(D,{children:["Files over ",Be(e.body.maxBytes)," aren’t shown here."]});case"not-readable":return s.jsx(D,{children:e.body.reason})}}function D({children:e}){return s.jsxs("div",{className:"text-muted-foreground flex h-32 flex-col items-center justify-center gap-2 px-6 text-center text-sm",children:[s.jsx(Se,{className:"size-(--size-icon-md) opacity-60"}),s.jsx("span",{children:e})]})}const Ge=new Map([["REQUEST_TOO_LARGE","Too much text to save here. Put big files in the room’s attachments."],["FILE_TOO_LARGE","This file is bigger than the room allows, so it wasn’t saved."],["REPO_CAP_EXCEEDED","This room’s files are full, so nothing was saved."],["MAIN_CHECKOUT_DIRTY","Saving is paused. Somebody changed these files outside DorkOS. See the warning above."],["MERGE_IN_FLIGHT","Somebody else is saving these files. Nothing was saved. Try again in a moment."],["PEOPLE_ONLY","Only a person can save here. Agents bring work in by merging."],["ROOM_FILE_NOT_TEXT","This file isn’t plain text, so it can’t be saved here."],["ROOM_FILE_PATH_INVALID","That file name points somewhere else, so nothing was saved."],["ROOM_FILE_NOT_FOUND","This file is gone from the room, so there was nothing to save over."],["ROOM_FILE_NOT_READABLE","This file can’t be edited here."],["ROOM_HAS_NO_REPO","This room no longer has its own files."],["ROOM_REPOS_DISABLED","Room files are turned off on this install, so nothing was saved."],["ROOM_REPO_GIT_UNAVAILABLE","Room files need git, and git isn’t installed on this computer."],["ROOM_NOT_FOUND","This room no longer exists."],["ROOM_ARCHIVED","This room is archived, so its files can’t be changed."],[w,L]]);function qe(e){return e===void 0?void 0:Ge.get(e)}function Z(e){if(typeof e!="object"||e===null)return null;const t=Te.safeParse(e.body);return t.success?t.data.conflict:null}const Ve=15e3;function Qe(e,t,o){const a=JSON.stringify(M.entries(t));let c=0,r=null;const i=e.getQueryCache().subscribe(n=>{if(n.type!=="updated"||JSON.stringify(n.query.queryKey)!==a||r!==null)return;const m=Math.max(0,Ve-(Date.now()-c));r=setTimeout(()=>{r=null,c=Date.now(),o()},m)});return()=>{r!==null&&clearTimeout(r),i()}}function Xe(e){return{name:e.name,path:e.path,type:e.kind==="dir"?"dir":"file",size:e.size,isSymlink:e.kind==="symlink",lastCommit:e.lastCommit}}const Je=new Map([["ROOM_FILE_NOT_READABLE","This isn’t a file that can be shown here."],["ROOM_FILE_NOT_FOUND","This file is no longer in the room."]]);function at(e){const{transport:t,queryClient:o,roomId:a,canChange:c=!0}=e,r=async i=>{try{return{status:"changed",commit:(await i()).commit}}catch(n){return Ze(n,o,a)}};return{scopeKey:`room:${a}`,cwd:null,writable:c,provenance:!0,filtersHidden:!1,preview:"inline",async showToEveryone(i){await t.openRoomCanvasDocument(a,{type:"file",sourcePath:i})},editable:c,changes:c?{maxUploadFiles:V,upload:i=>r(()=>t.uploadRoomFiles(a,{dir:i.dir,baseCommit:i.baseCommit,replace:i.replace,files:i.files})),move:i=>r(()=>t.moveRoomFile(a,i)),remove:i=>r(()=>t.deleteRoomFile(a,i))}:void 0,async list(i){try{const n=await t.readRoomFiles(a,i===""?void 0:i);return{entries:n.entries.map(Xe),commit:n.commit}}catch(n){if(_(n)!==Ne)throw n;return{entries:[],absent:!0}}},async read(i){try{const n=await t.readRoomFileContent(a,i);return{path:n.path,size:n.size,lastCommit:n.lastCommit,commit:n.commit,body:n.body.kind==="text"?{kind:"text",text:n.body.text}:n.body.kind==="binary"?{kind:"binary"}:{kind:"too-large",maxBytes:n.body.maxBytes}}}catch(n){const m=Je.get(_(n)??"");if(m===void 0)throw n;return{path:i,size:0,lastCommit:null,commit:null,body:{kind:"not-readable",reason:m}}}},async save(i){try{const n=await t.saveRoomFile(a,{path:i.path,baseCommit:i.baseCommit,text:i.text});return{status:"saved",commit:n.commit,lastCommit:n.lastCommit,committed:n.committed}}catch(n){const m=_(n);if(m===X){const v=Z(n);return v!==null?{status:"conflict",commit:v.commit,lastCommit:v.lastCommit}:{status:"refused",reason:"Somebody changed this file while you edited it. Nothing was saved. Reopen it to see theirs."}}m==="MAIN_CHECKOUT_DIRTY"&&o.invalidateQueries({queryKey:M.repoStatus(a)});const h=k(n)??qe(m);if(h===void 0)throw n;return{status:"refused",reason:h}}},events(i){return Qe(o,a,i)}}}function Ze(e,t,o){const a=_(e);if(a===X){const r=Z(e);return r!==null?{status:"conflict",path:r.path,commit:r.commit,lastCommit:r.lastCommit}:{status:"refused",reason:"Somebody changed these files after you opened them. Nothing changed. Check, then try again."}}if(a==="ROOM_FILE_EXISTS"){const r=e instanceof Error?e.message.replace(/`([^`]*)`/g,"“$1”"):"";return{status:"exists",reason:r.trim()!==""?r:"Something with that name is already there."}}a==="MAIN_CHECKOUT_DIRTY"&&t.invalidateQueries({queryKey:M.repoStatus(o)});const c=je(e);if(c===void 0)throw e;return{status:"refused",reason:c}}export{Ae as C,it as F,Pe as N,Ve as R,ot as a,Ze as b,at as c,we as g,nt as n,Ue as p,je as r,st as t,Qe as w};
|
|
6
|
+
*/const J={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};J.node;const Fe=de(J),De=["CONFLICT","COPY_INTO_SELF","DIR_NOT_EMPTY","NOT_FOUND","REFUSE_ROOT","OUTSIDE_BOUNDARY"];function we(e){const t=_(e);return t!==void 0&&De.includes(t)?t:void 0}const Ae="Can’t copy a folder into itself",w="ROOM_REPO_CONFIG_UNSAFE",L="Room files are locked: their git settings could run a program. See the DorkOS log.",Ie={CONFLICT:"That name already exists",COPY_INTO_SELF:Ae,DIR_NOT_EMPTY:"This folder isn’t empty",NOT_FOUND:"That item no longer exists",REFUSE_ROOT:"Can’t change the top folder",OUTSIDE_BOUNDARY:"That’s outside the folders DorkOS can use"};function st(e,t){const o=we(e);ue.error(o?Ie[o]:t)}const Me=new Map([["ROOM_UPLOAD_TOO_MANY_FILES",`Nothing was uploaded. One upload takes up to ${V} files.`],["FILE_TOO_LARGE","A file is bigger than this room allows, so nothing changed."],["REPO_CAP_EXCEEDED","This room’s files are full, so nothing changed. Delete something first."],["MAIN_CHECKOUT_DIRTY","Changes are paused. Somebody changed these files outside DorkOS. See the warning above."],["MERGE_IN_FLIGHT","Somebody else is changing these files. Nothing changed. Try again in a moment."],["PEOPLE_ONLY","Only a person can change files here. Agents bring work in by merging."],["ROOM_FILE_PATH_INVALID","That name can’t be used in room files, so nothing changed."],["ROOM_FILE_NOT_READABLE","That can’t be changed here."],["ROOM_FILE_NOT_FOUND","That’s gone from the room’s files, so nothing changed. The list is refreshed."],["ATTACHMENT_NOT_FOUND","That file is no longer in this room’s chat."],["ROOM_HAS_NO_REPO","This room no longer has its own files."],["ROOM_REPOS_DISABLED","Room files are turned off on this install, so nothing changed."],["ROOM_REPO_GIT_UNAVAILABLE","Room files need git, and git isn’t installed on this computer."],["ROOM_NOT_FOUND","This room no longer exists."],["ROOM_ARCHIVED","This room is archived, so its files can’t be changed."],[w,L]]),Le=new Set(["FILE_TOO_LARGE","ROOM_FILE_PATH_INVALID","ROOM_FILE_NOT_READABLE",w]);function ke(e){return e.replace(/`([^`]*)`/g,"“$1”").trim()}function je(e){const t=_(e);if(t===void 0)return;const o=Me.get(t);if(o!==void 0)return k(e)??o}function k(e){const t=_(e);if(!(t===void 0||!Le.has(t))&&!(!(e instanceof Error)||e.message.trim()===""))return ke(e.message)}function nt(e){return`“${e}” already exists there, so nothing changed. Pick another name.`}function ot(e){if(_(e)!==w)return;const t=e.body,o=typeof(t==null?void 0:t.command)=="string"&&t.command!==""?t.command:null;return{message:k(e)??L,command:o}}const Pe="—";function Ue(e){if(e==null)return{label:Pe,title:null};const t=Q(e.at);return{label:`${e.author} · ${t}`,title:`${e.subject} · ${e.author}, ${t}`}}function ze(e){return/\.(md|markdown|mdx)$/i.test(e)}function Be(e){return e<1024?`${e} bytes`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function He(e,t){return e.editable&&e.save!==void 0&&t!==void 0&&t.body.kind==="text"}function it({source:e,path:t,isNew:o=!1,onCreated:a,onClose:c}){const r=e.read,i=me(),n=["file-explorer","preview",e.scopeKey,t],m=he({queryKey:n,queryFn:()=>r(t),enabled:t!==null&&r!==void 0&&!o}),h=o&&t!==null?{path:t,size:0,commit:null,lastCommit:null,body:{kind:"text",text:""}}:m.data,[v,j]=d.useState(!1),[P,U]=d.useState(null),A=e.showToEveryone,Z=d.useCallback(async l=>{if(A!==void 0){j(!0),U(null);try{await A(l),c()}catch(u){U(u instanceof Error&&u.message.trim().length>0?u.message:"Couldn’t reach DorkOS. Check your connection and try again.")}finally{j(!1)}}},[A,c]),[g,N]=d.useState(o),[b,R]=d.useState(""),[z,C]=d.useState({text:"",commit:null}),[y,O]=d.useState(null),[I,f]=d.useState(null),[B,p]=d.useState(!1),[ee,S]=d.useState(!1),H=d.useRef(null),K=d.useRef(null),$=d.useRef(!1),E=g&&b!==z.text,te=E||g&&o,Y=ee&&E,F=d.useCallback(()=>{N(!1),R(""),C({text:"",commit:null}),O(null),f(null),p(!1),S(!1)},[]),[se,ne]=d.useState(t);se!==t&&(ne(t),(g||b!==""||y!==null||I!==null||B)&&F(),o&&N(!0));const T=fe({mutationFn:l=>e.save({path:t,baseCommit:l.baseCommit,text:l.text}),onSuccess:(l,u)=>{if(l.status==="saved"){C({text:u.text,commit:l.commit}),O(null),f(null),p(!0),o&&(a==null||a()),i.invalidateQueries({queryKey:n}),i.invalidateQueries({queryKey:["file-explorer","tree",e.scopeKey]});return}if(p(!1),l.status==="conflict"){O(ce=>({commit:l.commit,lastCommit:l.lastCommit,again:ce!==null})),f(null);return}O(null),f(l.reason)},onError:()=>{p(!1),O(null),f("Couldn’t save. Try again in a moment.")}}),G=He(e,h),oe=()=>{h===void 0||h.body.kind!=="text"||(R(h.body.text),C({text:h.body.text,commit:h.commit??null}),O(null),f(null),p(!1),N(!0))},ie=()=>{if(o){F(),c();return}N(!1),R(""),O(null),f(null),S(!1)},ae=async()=>{const l=await m.refetch();if(l.isError||l.data===void 0){f("Couldn’t get their version, so nothing changed.");return}const u=l.data;if(u.body.kind!=="text"){f(u.body.kind==="not-readable"?`${u.body.reason} Your text is still here. Save over theirs, or copy it out first.`:"Their version can’t be shown here, so nothing changed.");return}R(u.body.text),C({text:u.body.text,commit:u.commit??null}),O(null),f(null)},re=()=>{y!==null&&T.mutate({text:b,baseCommit:y.commit})},le=()=>{if(E){S(!0);return}F(),c()};return d.useEffect(()=>{var l,u;g?(l=H.current)==null||l.focus():$.current&&((u=K.current)==null||u.focus()),$.current=g},[g]),s.jsx(ge,{open:t!==null,onOpenChange:l=>!l&&le(),children:s.jsxs(Oe,{className:"max-h-[80vh] sm:max-w-2xl",children:[s.jsxs(xe,{children:[s.jsx(_e,{className:"truncate font-mono text-sm",children:t===null?"":q(t)}),s.jsx(ve,{className:"truncate text-xs",children:o&&t!==null?`${t} · New file`:$e(h,t)})]}),!g&&(e.showToEveryone!==void 0||G)&&s.jsxs("div",{className:"flex justify-end gap-1 px-4",children:[e.showToEveryone!==void 0&&t!==null&&s.jsxs(x,{type:"button",variant:"ghost",size:"sm",disabled:v,className:"text-muted-foreground hover:text-foreground gap-1.5",onClick:()=>void Z(t),children:[s.jsx(Fe,{className:"size-(--size-icon-xs)"}),v?"Putting it there…":"Put on the canvas"]}),G&&s.jsxs(x,{ref:K,type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground gap-1.5",onClick:oe,children:[s.jsx(ye,{className:"size-(--size-icon-xs)"}),"Edit"]})]}),P!==null&&s.jsx("p",{role:"status",className:"text-destructive px-4 pb-1 text-xs",children:P}),y!==null&&s.jsx(Ke,{conflict:y,onTakeTheirs:()=>void ae(),onKeepMine:re,busy:T.isPending||m.isFetching}),I!==null&&s.jsx("p",{role:"alert",className:"bg-destructive/10 text-destructive mx-4 rounded-md px-3 py-2 text-sm",children:I}),s.jsx(Ee,{className:"min-h-0 flex-1 overflow-auto",children:m.isPending&&!o?s.jsx("div",{className:"flex h-32 items-center justify-center",children:s.jsx(be,{size:"md",className:"text-muted-foreground",label:"Loading the file"})}):m.isError&&!o||h===void 0?s.jsx(D,{children:"This file couldn’t be read."}):g?s.jsx("textarea",{ref:H,"aria-label":`${t===null?"File":q(t)} contents`,value:b,onChange:l=>R(l.target.value),spellCheck:!1,autoComplete:"off",className:Re("text-foreground/90 border-border/60 bg-background field-sizing-content","focus-visible:border-ring focus-visible:ring-ring min-h-64 w-full","resize-none rounded-md border px-3 py-2 font-mono text-xs","whitespace-pre-wrap focus-visible:ring-[3px] focus-visible:outline-none")}):s.jsx(Ye,{file:h})}),g&&s.jsxs(pe,{className:"items-center gap-2 sm:justify-between",children:[s.jsx("span",{className:"text-muted-foreground text-xs","aria-live":"polite",children:T.isPending?"Saving…":Y?"You haven’t saved your changes.":B&&!E?"Saved":E?"Not saved yet":""}),s.jsx("span",{className:"flex gap-2",children:Y?s.jsxs(s.Fragment,{children:[s.jsx(x,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(!1),children:"Keep editing"}),s.jsx(x,{type:"button",variant:"destructive",size:"sm",onClick:()=>{F(),c()},children:"Discard changes"})]}):s.jsxs(s.Fragment,{children:[s.jsx(x,{type:"button",variant:"ghost",size:"sm",onClick:ie,children:E?"Discard":o?"Cancel":"Done"}),s.jsx(x,{type:"button",size:"sm",disabled:!te||T.isPending||y!==null,onClick:()=>T.mutate({text:b,baseCommit:z.commit}),children:"Save"})]})})]})]})})}function Ke({conflict:e,onTakeTheirs:t,onKeepMine:o,busy:a}){const c=e.lastCommit,r=c===null?"Somebody":c.author;return s.jsxs("div",{role:"alert",className:"border-border/60 bg-muted/40 mx-4 space-y-2 rounded-md border px-3 py-2 text-sm",children:[s.jsx("p",{children:e.again?`${r} changed this file again, so it still isn’t saved.`:`${r} changed this file while you edited, so nothing was saved.`}),c!==null&&s.jsxs("p",{className:"text-muted-foreground text-xs",children:[c.subject," · ",Q(c.at)]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(x,{type:"button",variant:"outline",size:"sm",disabled:a,onClick:t,children:"Open their version"}),s.jsx(x,{type:"button",variant:"destructive",size:"sm",disabled:a,onClick:o,children:"Save mine over it"})]}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"Opening theirs replaces what you typed here."})]})}function $e(e,t){if(t===null)return"";const o=e===void 0?null:Ue(e.lastCommit);return o===null?t:`${t} · ${o.label}`}function Ye({file:e}){switch(e.body.kind){case"text":return ze(e.path)?s.jsx(Ce,{content:e.body.text,className:"text-sm",errorFallback:"This file couldn’t be displayed."}):s.jsx("pre",{className:"text-foreground/90 overflow-x-auto font-mono text-xs whitespace-pre",children:e.body.text});case"binary":return s.jsx(D,{children:"Only text files can be shown or edited here."});case"too-large":return s.jsxs(D,{children:["Files over ",Be(e.body.maxBytes)," aren’t shown here."]});case"not-readable":return s.jsx(D,{children:e.body.reason})}}function D({children:e}){return s.jsxs("div",{className:"text-muted-foreground flex h-32 flex-col items-center justify-center gap-2 px-6 text-center text-sm",children:[s.jsx(Se,{className:"size-(--size-icon-md) opacity-60"}),s.jsx("span",{children:e})]})}const Ge=new Map([["REQUEST_TOO_LARGE","Too much text to save here. Put big files in the room’s attachments."],["FILE_TOO_LARGE","This file is bigger than the room allows, so it wasn’t saved."],["REPO_CAP_EXCEEDED","This room’s files are full, so nothing was saved."],["MAIN_CHECKOUT_DIRTY","Saving is paused. Somebody changed these files outside DorkOS. See the warning above."],["MERGE_IN_FLIGHT","Somebody else is saving these files. Nothing was saved. Try again in a moment."],["PEOPLE_ONLY","Only a person can save here. Agents bring work in by merging."],["ROOM_FILE_NOT_TEXT","This file isn’t plain text, so it can’t be saved here."],["ROOM_FILE_PATH_INVALID","That file name points somewhere else, so nothing was saved."],["ROOM_FILE_NOT_FOUND","This file is gone from the room, so there was nothing to save over."],["ROOM_FILE_NOT_READABLE","This file can’t be edited here."],["ROOM_HAS_NO_REPO","This room no longer has its own files."],["ROOM_REPOS_DISABLED","Room files are turned off on this install, so nothing was saved."],["ROOM_REPO_GIT_UNAVAILABLE","Room files need git, and git isn’t installed on this computer."],["ROOM_NOT_FOUND","This room no longer exists."],["ROOM_ARCHIVED","This room is archived, so its files can’t be changed."],[w,L]]);function qe(e){return e===void 0?void 0:Ge.get(e)}function W(e){if(typeof e!="object"||e===null)return null;const t=Te.safeParse(e.body);return t.success?t.data.conflict:null}const Ve=15e3;function Qe(e,t,o){const a=JSON.stringify(M.entries(t));let c=0,r=null;const i=e.getQueryCache().subscribe(n=>{if(n.type!=="updated"||JSON.stringify(n.query.queryKey)!==a||r!==null)return;const m=Math.max(0,Ve-(Date.now()-c));r=setTimeout(()=>{r=null,c=Date.now(),o()},m)});return()=>{r!==null&&clearTimeout(r),i()}}function Xe(e){return{name:e.name,path:e.path,type:e.kind==="dir"?"dir":"file",size:e.size,isSymlink:e.kind==="symlink",lastCommit:e.lastCommit}}const Je=new Map([["ROOM_FILE_NOT_READABLE","This isn’t a file that can be shown here."],["ROOM_FILE_NOT_FOUND","This file is no longer in the room."]]);function at(e){const{transport:t,queryClient:o,roomId:a,canChange:c=!0}=e,r=async i=>{try{return{status:"changed",commit:(await i()).commit}}catch(n){return We(n,o,a)}};return{scopeKey:`room:${a}`,cwd:null,writable:c,provenance:!0,filtersHidden:!1,preview:"inline",async showToEveryone(i){await t.openRoomCanvasDocument(a,{type:"file",sourcePath:i})},editable:c,changes:c?{maxUploadFiles:V,upload:i=>r(()=>t.uploadRoomFiles(a,{dir:i.dir,baseCommit:i.baseCommit,replace:i.replace,files:i.files})),move:i=>r(()=>t.moveRoomFile(a,i)),remove:i=>r(()=>t.deleteRoomFile(a,i))}:void 0,async list(i){try{const n=await t.readRoomFiles(a,i===""?void 0:i);return{entries:n.entries.map(Xe),commit:n.commit}}catch(n){if(_(n)!==Ne)throw n;return{entries:[],absent:!0}}},async read(i){try{const n=await t.readRoomFileContent(a,i);return{path:n.path,size:n.size,lastCommit:n.lastCommit,commit:n.commit,body:n.body.kind==="text"?{kind:"text",text:n.body.text}:n.body.kind==="binary"?{kind:"binary"}:{kind:"too-large",maxBytes:n.body.maxBytes}}}catch(n){const m=Je.get(_(n)??"");if(m===void 0)throw n;return{path:i,size:0,lastCommit:null,commit:null,body:{kind:"not-readable",reason:m}}}},async save(i){try{const n=await t.saveRoomFile(a,{path:i.path,baseCommit:i.baseCommit,text:i.text});return{status:"saved",commit:n.commit,lastCommit:n.lastCommit,committed:n.committed}}catch(n){const m=_(n);if(m===X){const v=W(n);return v!==null?{status:"conflict",commit:v.commit,lastCommit:v.lastCommit}:{status:"refused",reason:"Somebody changed this file while you edited it. Nothing was saved. Reopen it to see theirs."}}m==="MAIN_CHECKOUT_DIRTY"&&o.invalidateQueries({queryKey:M.repoStatus(a)});const h=k(n)??qe(m);if(h===void 0)throw n;return{status:"refused",reason:h}}},events(i){return Qe(o,a,i)}}}function We(e,t,o){const a=_(e);if(a===X){const r=W(e);return r!==null?{status:"conflict",path:r.path,commit:r.commit,lastCommit:r.lastCommit}:{status:"refused",reason:"Somebody changed these files after you opened them. Nothing changed. Check, then try again."}}if(a==="ROOM_FILE_EXISTS"){const r=e instanceof Error?e.message.replace(/`([^`]*)`/g,"“$1”"):"";return{status:"exists",reason:r.trim()!==""?r:"Something with that name is already there."}}a==="MAIN_CHECKOUT_DIRTY"&&t.invalidateQueries({queryKey:M.repoStatus(o)});const c=je(e);if(c===void 0)throw e;return{status:"refused",reason:c}}export{Ae as C,it as F,Pe as N,Ve as R,ot as a,We as b,at as c,we as g,nt as n,Ue as p,je as r,st as t,Qe as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=/^[a-z0-9][a-z0-9._\-/]*(:[a-z0-9._-]+)?$/i,e=[{id:"openai",label:"OpenAI",defaultBaseURL:"https://api.openai.com/v1",keyPlaceholder:"sk-…",getKeyUrl:"https://platform.openai.com/api-keys"},{id:"anthropic",label:"Anthropic",defaultBaseURL:"https://api.anthropic.com",keyPlaceholder:"sk-ant-…",getKeyUrl:"https://console.anthropic.com/settings/keys"}],t="Chosen by DorkOS";export{t as C,a as O,e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as b,bd as X,be as R,bf as T,bg as j,bh as ne,bi as C,bj as le,bk as ce,bl as ae,bm as U,bn as se}from"./index-d-DK54t2.js";var ie=Object.defineProperty,h=(n,e)=>ie(n,"name",{value:e,configurable:!0});function J(n,e){return c.useReducer((t,r)=>e[t][r]??t,n)}h(J,"useStateMachine");var K="ScrollArea",[Q,je]=ne(K),[ue,g]=Q(K),de=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,type:s="hover",dir:o,scrollHideDelay:l=600,...a}=e,[i,u]=c.useState(null),[S,f]=c.useState(null),[v,d]=c.useState(null),[m,w]=c.useState(null),[y,Y]=c.useState(null),[P,z]=c.useState(0),[M,I]=c.useState(0),[O,_]=c.useState(!1),[N,L]=c.useState(!1),p=T(t,u),A=ae(o);return b.jsx(ue,{scope:r,type:s,dir:A,scrollHideDelay:l,scrollArea:i,viewport:S,onViewportChange:f,content:v,onContentChange:d,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:O,onScrollbarXEnabledChange:_,scrollbarY:y,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:L,onCornerWidthChange:z,onCornerHeightChange:I,children:b.jsx(j.div,{dir:A,...a,ref:p,style:{position:"relative","--radix-scroll-area-corner-width":P+"px","--radix-scroll-area-corner-height":M+"px",...e.style}})})},"ScrollArea")),he="ScrollAreaViewport",fe=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,children:s,nonce:o,...l}=e,a=g(he,r),i=c.useRef(null),u=T(t,i,a.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx(Se,{nonce:o}),b.jsx(j.div,{"data-radix-scroll-area-viewport":"",...l,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:b.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})},"ScrollAreaViewport")),Se=c.memo(h(function({nonce:e}){return b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(n,e)=>n.nonce===e.nonce),x="ScrollAreaScrollbar",be=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=g(x,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=o,i=e.orientation==="horizontal";return c.useEffect(()=>(i?l(!0):a(!0),()=>{i?l(!1):a(!1)}),[i,l,a]),o.type==="hover"?b.jsx(me,{...s,ref:t,forceMount:r}):o.type==="scroll"?b.jsx(ve,{...s,ref:t,forceMount:r}):o.type==="auto"?b.jsx(Z,{...s,ref:t,forceMount:r}):o.type==="always"?b.jsx(F,{...s,ref:t,"data-state":"visible"}):null},"ScrollAreaScrollbar")),me=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=g(x,e.__scopeScrollArea),[l,a]=c.useState(!1);return c.useEffect(()=>{const i=o.scrollArea;let u=0;if(i){const S=h(()=>{window.clearTimeout(u),a(!0)},"handlePointerEnter"),f=h(()=>{u=window.setTimeout(()=>a(!1),o.scrollHideDelay)},"handlePointerLeave");return i.addEventListener("pointerenter",S),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),i.removeEventListener("pointerenter",S),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),b.jsx(X,{present:r||l,children:b.jsx(Z,{"data-state":l?"visible":"hidden",...s,ref:t})})},"ScrollAreaScrollbarHover")),ve=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=g(x,e.__scopeScrollArea),l=e.orientation==="horizontal",a=H(()=>u("SCROLL_END"),100),[i,u]=J("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(i==="idle"){const S=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(S)}},[i,o.scrollHideDelay,u]),c.useEffect(()=>{const S=o.viewport,f=l?"scrollLeft":"scrollTop";if(S){let v=S[f];const d=h(()=>{const m=S[f];v!==m&&(u("SCROLL"),a()),v=m},"handleScroll");return S.addEventListener("scroll",d),()=>S.removeEventListener("scroll",d)}},[o.viewport,l,u,a]),b.jsx(X,{present:r||i!=="hidden",children:b.jsx(F,{"data-state":i==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:R(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Z=c.forwardRef(h(function(e,t){const r=g(x,e.__scopeScrollArea),{forceMount:s,...o}=e,[l,a]=c.useState(!1),i=e.orientation==="horizontal",u=H(()=>{if(r.viewport){const S=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(i?S:f)}},10);return E(r.viewport,u),E(r.content,u),b.jsx(X,{present:s||l,children:b.jsx(F,{"data-state":l?"visible":"hidden",...o,ref:t})})},"ScrollAreaScrollbarAuto")),F=c.forwardRef(h(function(e,t){const{orientation:r="vertical",...s}=e,o=g(x,e.__scopeScrollArea),l=c.useRef(null),a=c.useRef(0),[i,u]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),S=$(i.viewport,i.content),f={...s,sizes:i,onSizesChange:u,hasThumb:S>0&&S<1,onThumbChange:h(d=>l.current=d,"onThumbChange"),onThumbPointerUp:h(()=>a.current=0,"onThumbPointerUp"),onThumbPointerDown:h(d=>a.current=d,"onThumbPointerDown")};function v(d,m){return te(d,a.current,i,m)}return h(v,"getScrollPosition"),r==="horizontal"?b.jsx(pe,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const d=o.viewport.scrollLeft,m=B(d,i,o.dir);l.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=v(d,o.dir))}}):r==="vertical"?b.jsx(we,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const d=o.viewport.scrollTop,m=B(d,i);l.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=v(d))}}):null},"ScrollAreaScrollbarVisible")),pe=c.forwardRef(h(function(e,t){const{sizes:r,onSizesChange:s,...o}=e,l=g(x,e.__scopeScrollArea),[a,i]=c.useState(),u=c.useRef(null),S=T(t,u,l.onScrollbarXChange);return c.useEffect(()=>{u.current&&i(getComputedStyle(u.current))},[u]),b.jsx(re,{"data-orientation":"horizontal",...o,ref:S,sizes:r,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":W(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,v)=>{if(l.viewport){const d=l.viewport.scrollLeft+f.deltaX;e.onWheelScroll(d),G(d,v)&&f.preventDefault()}},onResize:()=>{u.current&&l.viewport&&a&&s({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:D(a.paddingLeft),paddingEnd:D(a.paddingRight)}})}})},"ScrollAreaScrollbarX")),we=c.forwardRef(h(function(e,t){const{sizes:r,onSizesChange:s,...o}=e,l=g(x,e.__scopeScrollArea),[a,i]=c.useState(),u=c.useRef(null),S=T(t,u,l.onScrollbarYChange);return c.useEffect(()=>{u.current&&i(getComputedStyle(u.current))},[u]),b.jsx(re,{"data-orientation":"vertical",...o,ref:S,sizes:r,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":W(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,v)=>{if(l.viewport){const d=l.viewport.scrollTop+f.deltaY;e.onWheelScroll(d),G(d,v)&&f.preventDefault()}},onResize:()=>{u.current&&l.viewport&&a&&s({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:D(a.paddingTop),paddingEnd:D(a.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[ge,ee]=Q(x),re=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,sizes:s,hasThumb:o,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:i,onThumbPositionChange:u,onDragScroll:S,onWheelScroll:f,onResize:v,...d}=e,m=g(x,r),[w,y]=c.useState(null),Y=T(t,y),P=c.useRef(null),z=c.useRef(""),M=m.viewport,I=s.content-s.viewport,O=C(f),_=C(u),N=H(v,10);function L(p){if(P.current){const A=p.clientX-P.current.left,V=p.clientY-P.current.top;S({x:A,y:V})}}return h(L,"handleDragScroll"),c.useEffect(()=>{const p=h(A=>{const V=A.target;(w==null?void 0:w.contains(V))&&O(A,I)},"handleWheel");return document.addEventListener("wheel",p,{passive:!1}),()=>document.removeEventListener("wheel",p,{passive:!1})},[M,w,I,O]),c.useEffect(_,[s,_]),E(w,N),E(m.content,N),b.jsx(ge,{scope:r,scrollbar:w,hasThumb:o,onThumbChange:C(l),onThumbPointerUp:C(a),onThumbPositionChange:_,onThumbPointerDown:C(i),children:b.jsx(j.div,{...d,ref:Y,style:{position:"absolute",...d.style},onPointerDown:R(e.onPointerDown,p=>{p.button===0&&(p.target.setPointerCapture(p.pointerId),P.current=w.getBoundingClientRect(),z.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),L(p))}),onPointerMove:R(e.onPointerMove,L),onPointerUp:R(e.onPointerUp,p=>{const A=p.target;A.hasPointerCapture(p.pointerId)&&A.releasePointerCapture(p.pointerId),document.body.style.webkitUserSelect=z.current,m.viewport&&(m.viewport.style.scrollBehavior=""),P.current=null})})})},"ScrollAreaScrollbarImpl")),k="ScrollAreaThumb",Ae=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=ee(k,e.__scopeScrollArea);return b.jsx(X,{present:r||o.hasThumb,children:b.jsx(xe,{ref:t,...s})})},"ScrollAreaThumb")),xe=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,style:s,...o}=e,l=g(k,r),a=ee(k,r),{onThumbPositionChange:i}=a,u=T(t,a.onThumbChange),S=c.useRef(void 0),f=H(()=>{S.current&&(S.current(),S.current=void 0)},100);return c.useEffect(()=>{const v=l.viewport;if(v){const d=h(()=>{if(f(),!S.current){const m=Re(v,i);S.current=m,i()}},"handleScroll");return i(),v.addEventListener("scroll",d),()=>v.removeEventListener("scroll",d)}},[l.viewport,f,i]),b.jsx(j.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:R(e.onPointerDownCapture,v=>{const m=v.target.getBoundingClientRect(),w=v.clientX-m.left,y=v.clientY-m.top;a.onThumbPointerDown({x:w,y})}),onPointerUp:R(e.onPointerUp,a.onThumbPointerUp)})},"ScrollAreaThumbImpl")),oe="ScrollAreaCorner",Pe=c.forwardRef(h(function(e,t){const r=g(oe,e.__scopeScrollArea),s=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&s?b.jsx(Ce,{...e,ref:t}):null},"ScrollAreaCorner")),Ce=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,...s}=e,o=g(oe,r),[l,a]=c.useState(0),[i,u]=c.useState(0),S=!!(l&&i),{onCornerWidthChange:f,onCornerHeightChange:v}=o;return E(o.scrollbarX,()=>{var m;const d=((m=o.scrollbarX)==null?void 0:m.offsetHeight)||0;o.onCornerHeightChange(d),u(d)}),E(o.scrollbarY,()=>{var m;const d=((m=o.scrollbarY)==null?void 0:m.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),c.useEffect(()=>()=>{f(0),v(0)},[f,v]),S?b.jsx(j.div,{...s,ref:t,style:{width:l,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function D(n){return n?parseInt(n,10):0}h(D,"toInt");function $(n,e){const t=n/e;return isNaN(t)?0:t}h($,"getThumbRatio");function W(n){const e=$(n.viewport,n.content),t=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,r=(n.scrollbar.size-t)*e;return Math.max(r,18)}h(W,"getThumbSize");function te(n,e,t,r="ltr"){const s=W(t),o=s/2,l=e||o,a=s-l,i=t.scrollbar.paddingStart+l,u=t.scrollbar.size-t.scrollbar.paddingEnd-a,S=t.content-t.viewport,f=r==="ltr"?[0,S]:[S*-1,0];return q([i,u],f)(n)}h(te,"getScrollPositionFromPointer");function B(n,e,t="ltr"){const r=W(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-s,l=e.content-e.viewport,a=o-r,i=t==="ltr"?[0,l]:[l*-1,0],u=ce(n,i);return q([0,l],[0,a])(u)}h(B,"getThumbOffsetFromScroll");function q(n,e){return t=>{if(n[0]===n[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(n[1]-n[0]);return e[0]+r*(t-n[0])}}h(q,"linearScale");function G(n,e){return n>0&&n<e}h(G,"isScrollingWithinScrollbarBounds");var Re=h((n,e=()=>{})=>{let t={left:n.scrollLeft,top:n.scrollTop},r=0;return h((function s(){const o={left:n.scrollLeft,top:n.scrollTop},l=t.left!==o.left,a=t.top!==o.top;(l||a)&&e(),t=o,r=window.requestAnimationFrame(s)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function H(n,e){const t=C(n),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(t,e)},[t,e])}h(H,"useDebounceCallback");function E(n,e){const t=C(e);le(()=>{let r=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return s.observe(n),()=>{window.cancelAnimationFrame(r),s.unobserve(n)}}},[n,t])}h(E,"useResizeObserver");var Ee=de,Te=fe,ye=Pe;function We({className:n,children:e,viewportRef:t,viewportClassName:r,...s}){return b.jsxs(Ee,{"data-slot":"scroll-area",className:U("relative",n),...s,children:[b.jsx(Te,{ref:t,"data-slot":"scroll-area-viewport",className:U("size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:outline-1 motion-reduce:transition-none!",se,"[&>div]:!block",r),children:e}),b.jsx(_e,{}),b.jsx(ye,{})]})}function _e({className:n,orientation:e="vertical",...t}){return b.jsx(be,{"data-slot":"scroll-area-scrollbar",orientation:e,className:U("flex touch-none p-px transition-colors select-none motion-reduce:transition-none!",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",n),...t,children:b.jsx(Ae,{"data-slot":"scroll-area-thumb",className:"bg-dui-border relative flex-1 rounded-full"})})}export{We as S};
|
|
1
|
+
import{r as c,j as b,bt as X,bu as R,bv as T,bw as j,bx as ne,by as C,bz as le,bA as ce,bB as ae,bC as U,bD as se}from"./index-CdKpQ1hI.js";var ie=Object.defineProperty,h=(n,e)=>ie(n,"name",{value:e,configurable:!0});function J(n,e){return c.useReducer((t,r)=>e[t][r]??t,n)}h(J,"useStateMachine");var K="ScrollArea",[Q,je]=ne(K),[ue,g]=Q(K),de=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,type:s="hover",dir:o,scrollHideDelay:l=600,...a}=e,[i,u]=c.useState(null),[S,f]=c.useState(null),[v,d]=c.useState(null),[m,w]=c.useState(null),[y,Y]=c.useState(null),[P,z]=c.useState(0),[M,I]=c.useState(0),[O,_]=c.useState(!1),[N,L]=c.useState(!1),p=T(t,u),A=ae(o);return b.jsx(ue,{scope:r,type:s,dir:A,scrollHideDelay:l,scrollArea:i,viewport:S,onViewportChange:f,content:v,onContentChange:d,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:O,onScrollbarXEnabledChange:_,scrollbarY:y,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:L,onCornerWidthChange:z,onCornerHeightChange:I,children:b.jsx(j.div,{dir:A,...a,ref:p,style:{position:"relative","--radix-scroll-area-corner-width":P+"px","--radix-scroll-area-corner-height":M+"px",...e.style}})})},"ScrollArea")),he="ScrollAreaViewport",fe=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,children:s,nonce:o,...l}=e,a=g(he,r),i=c.useRef(null),u=T(t,i,a.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx(Se,{nonce:o}),b.jsx(j.div,{"data-radix-scroll-area-viewport":"",...l,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:b.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})},"ScrollAreaViewport")),Se=c.memo(h(function({nonce:e}){return b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e})},"ScrollAreaViewportStyle"),(n,e)=>n.nonce===e.nonce),x="ScrollAreaScrollbar",be=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=g(x,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=o,i=e.orientation==="horizontal";return c.useEffect(()=>(i?l(!0):a(!0),()=>{i?l(!1):a(!1)}),[i,l,a]),o.type==="hover"?b.jsx(me,{...s,ref:t,forceMount:r}):o.type==="scroll"?b.jsx(ve,{...s,ref:t,forceMount:r}):o.type==="auto"?b.jsx(Z,{...s,ref:t,forceMount:r}):o.type==="always"?b.jsx(F,{...s,ref:t,"data-state":"visible"}):null},"ScrollAreaScrollbar")),me=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=g(x,e.__scopeScrollArea),[l,a]=c.useState(!1);return c.useEffect(()=>{const i=o.scrollArea;let u=0;if(i){const S=h(()=>{window.clearTimeout(u),a(!0)},"handlePointerEnter"),f=h(()=>{u=window.setTimeout(()=>a(!1),o.scrollHideDelay)},"handlePointerLeave");return i.addEventListener("pointerenter",S),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(u),i.removeEventListener("pointerenter",S),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),b.jsx(X,{present:r||l,children:b.jsx(Z,{"data-state":l?"visible":"hidden",...s,ref:t})})},"ScrollAreaScrollbarHover")),ve=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=g(x,e.__scopeScrollArea),l=e.orientation==="horizontal",a=H(()=>u("SCROLL_END"),100),[i,u]=J("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(i==="idle"){const S=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(S)}},[i,o.scrollHideDelay,u]),c.useEffect(()=>{const S=o.viewport,f=l?"scrollLeft":"scrollTop";if(S){let v=S[f];const d=h(()=>{const m=S[f];v!==m&&(u("SCROLL"),a()),v=m},"handleScroll");return S.addEventListener("scroll",d),()=>S.removeEventListener("scroll",d)}},[o.viewport,l,u,a]),b.jsx(X,{present:r||i!=="hidden",children:b.jsx(F,{"data-state":i==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:R(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),Z=c.forwardRef(h(function(e,t){const r=g(x,e.__scopeScrollArea),{forceMount:s,...o}=e,[l,a]=c.useState(!1),i=e.orientation==="horizontal",u=H(()=>{if(r.viewport){const S=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(i?S:f)}},10);return E(r.viewport,u),E(r.content,u),b.jsx(X,{present:s||l,children:b.jsx(F,{"data-state":l?"visible":"hidden",...o,ref:t})})},"ScrollAreaScrollbarAuto")),F=c.forwardRef(h(function(e,t){const{orientation:r="vertical",...s}=e,o=g(x,e.__scopeScrollArea),l=c.useRef(null),a=c.useRef(0),[i,u]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),S=$(i.viewport,i.content),f={...s,sizes:i,onSizesChange:u,hasThumb:S>0&&S<1,onThumbChange:h(d=>l.current=d,"onThumbChange"),onThumbPointerUp:h(()=>a.current=0,"onThumbPointerUp"),onThumbPointerDown:h(d=>a.current=d,"onThumbPointerDown")};function v(d,m){return te(d,a.current,i,m)}return h(v,"getScrollPosition"),r==="horizontal"?b.jsx(pe,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const d=o.viewport.scrollLeft,m=B(d,i,o.dir);l.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=v(d,o.dir))}}):r==="vertical"?b.jsx(we,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&l.current){const d=o.viewport.scrollTop,m=B(d,i);l.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=v(d))}}):null},"ScrollAreaScrollbarVisible")),pe=c.forwardRef(h(function(e,t){const{sizes:r,onSizesChange:s,...o}=e,l=g(x,e.__scopeScrollArea),[a,i]=c.useState(),u=c.useRef(null),S=T(t,u,l.onScrollbarXChange);return c.useEffect(()=>{u.current&&i(getComputedStyle(u.current))},[u]),b.jsx(re,{"data-orientation":"horizontal",...o,ref:S,sizes:r,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":W(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,v)=>{if(l.viewport){const d=l.viewport.scrollLeft+f.deltaX;e.onWheelScroll(d),G(d,v)&&f.preventDefault()}},onResize:()=>{u.current&&l.viewport&&a&&s({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:D(a.paddingLeft),paddingEnd:D(a.paddingRight)}})}})},"ScrollAreaScrollbarX")),we=c.forwardRef(h(function(e,t){const{sizes:r,onSizesChange:s,...o}=e,l=g(x,e.__scopeScrollArea),[a,i]=c.useState(),u=c.useRef(null),S=T(t,u,l.onScrollbarYChange);return c.useEffect(()=>{u.current&&i(getComputedStyle(u.current))},[u]),b.jsx(re,{"data-orientation":"vertical",...o,ref:S,sizes:r,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":W(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,v)=>{if(l.viewport){const d=l.viewport.scrollTop+f.deltaY;e.onWheelScroll(d),G(d,v)&&f.preventDefault()}},onResize:()=>{u.current&&l.viewport&&a&&s({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:D(a.paddingTop),paddingEnd:D(a.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[ge,ee]=Q(x),re=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,sizes:s,hasThumb:o,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:i,onThumbPositionChange:u,onDragScroll:S,onWheelScroll:f,onResize:v,...d}=e,m=g(x,r),[w,y]=c.useState(null),Y=T(t,y),P=c.useRef(null),z=c.useRef(""),M=m.viewport,I=s.content-s.viewport,O=C(f),_=C(u),N=H(v,10);function L(p){if(P.current){const A=p.clientX-P.current.left,V=p.clientY-P.current.top;S({x:A,y:V})}}return h(L,"handleDragScroll"),c.useEffect(()=>{const p=h(A=>{const V=A.target;(w==null?void 0:w.contains(V))&&O(A,I)},"handleWheel");return document.addEventListener("wheel",p,{passive:!1}),()=>document.removeEventListener("wheel",p,{passive:!1})},[M,w,I,O]),c.useEffect(_,[s,_]),E(w,N),E(m.content,N),b.jsx(ge,{scope:r,scrollbar:w,hasThumb:o,onThumbChange:C(l),onThumbPointerUp:C(a),onThumbPositionChange:_,onThumbPointerDown:C(i),children:b.jsx(j.div,{...d,ref:Y,style:{position:"absolute",...d.style},onPointerDown:R(e.onPointerDown,p=>{p.button===0&&(p.target.setPointerCapture(p.pointerId),P.current=w.getBoundingClientRect(),z.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),L(p))}),onPointerMove:R(e.onPointerMove,L),onPointerUp:R(e.onPointerUp,p=>{const A=p.target;A.hasPointerCapture(p.pointerId)&&A.releasePointerCapture(p.pointerId),document.body.style.webkitUserSelect=z.current,m.viewport&&(m.viewport.style.scrollBehavior=""),P.current=null})})})},"ScrollAreaScrollbarImpl")),k="ScrollAreaThumb",Ae=c.forwardRef(h(function(e,t){const{forceMount:r,...s}=e,o=ee(k,e.__scopeScrollArea);return b.jsx(X,{present:r||o.hasThumb,children:b.jsx(xe,{ref:t,...s})})},"ScrollAreaThumb")),xe=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,style:s,...o}=e,l=g(k,r),a=ee(k,r),{onThumbPositionChange:i}=a,u=T(t,a.onThumbChange),S=c.useRef(void 0),f=H(()=>{S.current&&(S.current(),S.current=void 0)},100);return c.useEffect(()=>{const v=l.viewport;if(v){const d=h(()=>{if(f(),!S.current){const m=Re(v,i);S.current=m,i()}},"handleScroll");return i(),v.addEventListener("scroll",d),()=>v.removeEventListener("scroll",d)}},[l.viewport,f,i]),b.jsx(j.div,{"data-state":a.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:R(e.onPointerDownCapture,v=>{const m=v.target.getBoundingClientRect(),w=v.clientX-m.left,y=v.clientY-m.top;a.onThumbPointerDown({x:w,y})}),onPointerUp:R(e.onPointerUp,a.onThumbPointerUp)})},"ScrollAreaThumbImpl")),oe="ScrollAreaCorner",Pe=c.forwardRef(h(function(e,t){const r=g(oe,e.__scopeScrollArea),s=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&s?b.jsx(Ce,{...e,ref:t}):null},"ScrollAreaCorner")),Ce=c.forwardRef(h(function(e,t){const{__scopeScrollArea:r,...s}=e,o=g(oe,r),[l,a]=c.useState(0),[i,u]=c.useState(0),S=!!(l&&i),{onCornerWidthChange:f,onCornerHeightChange:v}=o;return E(o.scrollbarX,()=>{var m;const d=((m=o.scrollbarX)==null?void 0:m.offsetHeight)||0;o.onCornerHeightChange(d),u(d)}),E(o.scrollbarY,()=>{var m;const d=((m=o.scrollbarY)==null?void 0:m.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),c.useEffect(()=>()=>{f(0),v(0)},[f,v]),S?b.jsx(j.div,{...s,ref:t,style:{width:l,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null},"ScrollAreaCornerImpl"));function D(n){return n?parseInt(n,10):0}h(D,"toInt");function $(n,e){const t=n/e;return isNaN(t)?0:t}h($,"getThumbRatio");function W(n){const e=$(n.viewport,n.content),t=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,r=(n.scrollbar.size-t)*e;return Math.max(r,18)}h(W,"getThumbSize");function te(n,e,t,r="ltr"){const s=W(t),o=s/2,l=e||o,a=s-l,i=t.scrollbar.paddingStart+l,u=t.scrollbar.size-t.scrollbar.paddingEnd-a,S=t.content-t.viewport,f=r==="ltr"?[0,S]:[S*-1,0];return q([i,u],f)(n)}h(te,"getScrollPositionFromPointer");function B(n,e,t="ltr"){const r=W(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-s,l=e.content-e.viewport,a=o-r,i=t==="ltr"?[0,l]:[l*-1,0],u=ce(n,i);return q([0,l],[0,a])(u)}h(B,"getThumbOffsetFromScroll");function q(n,e){return t=>{if(n[0]===n[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(n[1]-n[0]);return e[0]+r*(t-n[0])}}h(q,"linearScale");function G(n,e){return n>0&&n<e}h(G,"isScrollingWithinScrollbarBounds");var Re=h((n,e=()=>{})=>{let t={left:n.scrollLeft,top:n.scrollTop},r=0;return h((function s(){const o={left:n.scrollLeft,top:n.scrollTop},l=t.left!==o.left,a=t.top!==o.top;(l||a)&&e(),t=o,r=window.requestAnimationFrame(s)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function H(n,e){const t=C(n),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(t,e)},[t,e])}h(H,"useDebounceCallback");function E(n,e){const t=C(e);le(()=>{let r=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)});return s.observe(n),()=>{window.cancelAnimationFrame(r),s.unobserve(n)}}},[n,t])}h(E,"useResizeObserver");var Ee=de,Te=fe,ye=Pe;function We({className:n,children:e,viewportRef:t,viewportClassName:r,...s}){return b.jsxs(Ee,{"data-slot":"scroll-area",className:U("relative",n),...s,children:[b.jsx(Te,{ref:t,"data-slot":"scroll-area-viewport",className:U("size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:outline-1 motion-reduce:transition-none!",se,"[&>div]:!block",r),children:e}),b.jsx(_e,{}),b.jsx(ye,{})]})}function _e({className:n,orientation:e="vertical",...t}){return b.jsx(be,{"data-slot":"scroll-area-scrollbar",orientation:e,className:U("flex touch-none p-px transition-colors select-none motion-reduce:transition-none!",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",n),...t,children:b.jsx(Ae,{"data-slot":"scroll-area-thumb",className:"bg-dui-border relative flex-1 rounded-full"})})}export{We as S};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cd as D,cL as _,r as n,a2 as L}from"./index-CdKpQ1hI.js";const C="asc";function q(t){if(!t)return{field:"",direction:C};const a=t.indexOf(":");if(a===-1)return{field:t,direction:C};const r=t.slice(0,a),s=t.slice(a+1);return{field:r,direction:s==="desc"?"desc":"asc"}}function z(t,a){return Object.fromEntries(Object.entries(t).map(([r,s])=>{const i=a[r];return[r,i!==void 0?s.deserialize(i):s.defaultValue]}))}function N(t,a){const r=t.serialize(a),s=t.serialize(t.defaultValue);return r===s?void 0:r}function $(t,a={}){const{debounce:r={}}=a,s=D(),i=_({strict:!1}),{definitions:u,defaultValues:k}=t,d=z(u,i),[O,f]=n.useState(d),x=n.useRef(i);n.useEffect(()=>{x.current!==i&&(x.current=i,f(z(u,i)))},[i,u]);const S=n.useRef({}),{field:h,direction:j}=q(i.sort),p=n.useCallback((e,o)=>{s({search:c=>({...c,[e]:o})})},[s]),R=n.useCallback((e,o)=>{const l=u[e];if(!l)return;const c=N(l,o),b=r[e];if(b!==void 0&&b>0){f(g=>({...g,[e]:o}));const v=S.current[e];v!==void 0&&clearTimeout(v),S.current[e]=setTimeout(()=>{delete S.current[e],p(e,c)},b)}else f(v=>({...v,[e]:o})),p(e,c)},[u,r,p]),T=n.useCallback(e=>{const o=k[e];u[e]&&(f(c=>({...c,[e]:o})),p(e,void 0))},[u,k,p]),V=n.useCallback(()=>{const e=new Set(Object.keys(u));f({...k}),s({search:l=>{const c={...l};for(const b of e)delete c[b];return delete c.sort,c}})},[u,k,s]),A=n.useCallback((e,o=C)=>{s({search:c=>({...c,sort:`${e}:${o}`})})},[s]),E=t.isFiltered(d),F=t.activeCount(d),I=n.useCallback(()=>t.describeActive(d),[t,d]);return{values:d,inputValues:O,sortField:h,sortDirection:j,isFiltered:E,activeCount:F,set:R,clear:T,clearAll:V,setSort:A,describeActive:I,schema:t}}/**
|
|
2
2
|
* @license lucide-react v1.48.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const y={name:"search-x",size:24,node:[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]};y.node;const
|
|
6
|
+
*/const y={name:"search-x",size:24,node:[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]};y.node;const K=L(y);export{K as S,$ as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(n,s){var e;if(s)return(e=n==null?void 0:n.capabilities[s])==null?void 0:e.settings}export{r as s};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a2 as a}from"./index-CdKpQ1hI.js";/**
|
|
2
|
+
* @license lucide-react v1.48.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};e.node;const o=a(e);export{o as S};
|