@saluzi/saluzi-edu 0.2.21 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/cli.js +82 -81
  2. package/dist/rcs-web/assets/{AdminPanel-B0hhIa7W.js → AdminPanel-Bsimdm5Q.js} +1 -1
  3. package/{packages/remote-control-server/web/dist/assets/Claim-BTx12YJw.js → dist/rcs-web/assets/Claim-D-6HcIPy.js} +1 -1
  4. package/dist/rcs-web/assets/Dashboard-C6G49-2O.js +1 -0
  5. package/{packages/remote-control-server/web/dist/assets/Join-DDMaEXX-.js → dist/rcs-web/assets/Join-HoIZ1jyc.js} +1 -1
  6. package/dist/rcs-web/assets/{Login-eCEGVdjw.js → Login-bLM4Zn4h.js} +1 -1
  7. package/dist/rcs-web/assets/{Register-gqlt4O0J.js → Register-ByAIpM2v.js} +1 -1
  8. package/dist/rcs-web/assets/{SessionDetail-BfrG6lOA.js → SessionDetail-DbLnDhLO.js} +1 -1
  9. package/dist/rcs-web/assets/{SessionVisibilityBadge-CN3bz2gb.js → SessionVisibilityBadge-p6speHFz.js} +1 -1
  10. package/{packages/remote-control-server/web/dist/assets/Setup-yO-c5mfy.js → dist/rcs-web/assets/Setup-BfTiM2jB.js} +1 -1
  11. package/dist/rcs-web/assets/{ShareLanding-S3XUdrDL.js → ShareLanding-DGo_cLNv.js} +1 -1
  12. package/dist/rcs-web/assets/{TeamCreate-DGUK4ghi.js → TeamCreate-DuC03Q55.js} +1 -1
  13. package/dist/rcs-web/assets/{TeamDetail-Ct07DirR.js → TeamDetail-DQeJ56yT.js} +1 -1
  14. package/dist/rcs-web/assets/{TeamList-CJTYa2Ah.js → TeamList-gTscY5gq.js} +1 -1
  15. package/dist/rcs-web/assets/{TeamSettings-DXb0w8GG.js → TeamSettings-Dvvn1zTh.js} +1 -1
  16. package/dist/rcs-web/assets/{UserSettings-DzreS8Mi.js → UserSettings-TpFvBUH2.js} +1 -1
  17. package/dist/rcs-web/assets/{arc-wiB_u0W8.js → arc-cNQXzZJk.js} +1 -1
  18. package/dist/rcs-web/assets/{architectureDiagram-3BPJPVTR-70tgIgZq.js → architectureDiagram-3BPJPVTR-C97K07oU.js} +1 -1
  19. package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-Drz4LSdp.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-CCawpz6v.js} +1 -1
  20. package/dist/rcs-web/assets/{c4Diagram-AAUBKEIU-BM7C7SEx.js → c4Diagram-AAUBKEIU-BT2wuHdt.js} +1 -1
  21. package/dist/rcs-web/assets/channel-CElwc65q.js +1 -0
  22. package/dist/rcs-web/assets/{chunk-2J33WTMH-BSqxyVTy.js → chunk-2J33WTMH-D7mXynqp.js} +1 -1
  23. package/dist/rcs-web/assets/{chunk-4BX2VUAB-HFKHN20V.js → chunk-4BX2VUAB-Cr6Ax9dk.js} +1 -1
  24. package/dist/rcs-web/assets/{chunk-55IACEB6-DOBdvIv4.js → chunk-55IACEB6-D67JVqPZ.js} +1 -1
  25. package/{packages/remote-control-server/web/dist/assets/chunk-727SXJPM-B2qn-WmZ.js → dist/rcs-web/assets/chunk-727SXJPM-CVttzQWT.js} +1 -1
  26. package/dist/rcs-web/assets/{chunk-AQP2D5EJ-DFC3ivzL.js → chunk-AQP2D5EJ-fH3XrepF.js} +1 -1
  27. package/dist/rcs-web/assets/{chunk-FMBD7UC4-CkVr3MVW.js → chunk-FMBD7UC4-CJQNdt2v.js} +1 -1
  28. package/dist/rcs-web/assets/{chunk-ND2GUHAM-B2WO2xxD.js → chunk-ND2GUHAM-CcxkLR8x.js} +1 -1
  29. package/dist/rcs-web/assets/{chunk-QZHKN3VN-YpZyVA2c.js → chunk-QZHKN3VN--e3-i6Ei.js} +1 -1
  30. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-BYQJbP8Y.js +1 -0
  31. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-BYQJbP8Y.js +1 -0
  32. package/dist/rcs-web/assets/{code-block-IT6T5CEO-Bmds1dKk.js → code-block-IT6T5CEO-D9lXU6hr.js} +1 -1
  33. package/dist/rcs-web/assets/{copy-DdSkINCW.js → copy-DGJ36Idc.js} +1 -1
  34. package/{packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-CTtGg7Fx.js → dist/rcs-web/assets/cose-bilkent-S5V4N54A-hOIwi1aZ.js} +1 -1
  35. package/dist/rcs-web/assets/{dagre-BM42HDAG-CFX48pZZ.js → dagre-BM42HDAG-BPQQ96TG.js} +1 -1
  36. package/dist/rcs-web/assets/{diagram-2AECGRRQ-BwZE2jAF.js → diagram-2AECGRRQ-CLR_Phbu.js} +1 -1
  37. package/dist/rcs-web/assets/{diagram-5GNKFQAL-BuHnggju.js → diagram-5GNKFQAL-CLWnRjBK.js} +1 -1
  38. package/dist/rcs-web/assets/{diagram-KO2AKTUF-Dmd3MO7f.js → diagram-KO2AKTUF-BL3D8pmI.js} +1 -1
  39. package/dist/rcs-web/assets/{diagram-LMA3HP47-34ZNfvQd.js → diagram-LMA3HP47-OXbFOADC.js} +1 -1
  40. package/dist/rcs-web/assets/{diagram-OG6HWLK6-CjZvlFxO.js → diagram-OG6HWLK6-2k9pa530.js} +1 -1
  41. package/{packages/remote-control-server/web/dist/assets/erDiagram-TEJ5UH35-BWR0WD_N.js → dist/rcs-web/assets/erDiagram-TEJ5UH35-DMx7MReU.js} +1 -1
  42. package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-DjZ7uFyw.js → flowDiagram-I6XJVG4X-seK4rTjU.js} +1 -1
  43. package/dist/rcs-web/assets/{ganttDiagram-6RSMTGT7-BuAM7awZ.js → ganttDiagram-6RSMTGT7-B89rGHgc.js} +1 -1
  44. package/dist/rcs-web/assets/{gitGraphDiagram-PVQCEYII-B_6bqpod.js → gitGraphDiagram-PVQCEYII-CZc1v0no.js} +1 -1
  45. package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-BbhCTAn2.js → infoDiagram-5YYISTIA-CeGh4MXv.js} +1 -1
  46. package/{packages/remote-control-server/web/dist/assets/ishikawaDiagram-YF4QCWOH-1VPCYnPS.js → dist/rcs-web/assets/ishikawaDiagram-YF4QCWOH-C0LJyHyd.js} +1 -1
  47. package/dist/rcs-web/assets/{journeyDiagram-JHISSGLW-Dzl0f8Im.js → journeyDiagram-JHISSGLW-Dleh_HZM.js} +1 -1
  48. package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-BGoVgBze.js → kanban-definition-UN3LZRKU-Br8f2hg8.js} +1 -1
  49. package/dist/rcs-web/assets/{linear-DF7ChHtW.js → linear-D7AT_2cB.js} +1 -1
  50. package/dist/rcs-web/assets/{main-CEsvX5rj.js → main-DU4tqNTD.js} +3 -3
  51. package/dist/rcs-web/assets/{mermaid-VLURNSYL-3EqupjjN.js → mermaid-VLURNSYL-C1rDhYTC.js} +4 -4
  52. package/dist/rcs-web/assets/{mermaid.core-BnVRH5R_.js → mermaid.core-B6lZnoad.js} +5 -5
  53. package/dist/rcs-web/assets/{mindmap-definition-RKZ34NQL-R3usKqMg.js → mindmap-definition-RKZ34NQL-CLc9hYkr.js} +1 -1
  54. package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-U1XXn3t9.js → pieDiagram-4H26LBE5-BDZzTeXG.js} +1 -1
  55. package/{packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-CocIpolQ.js → dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-Crv3up_A.js} +1 -1
  56. package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-DX7pHOr5.js → requirementDiagram-4Y6WPE33-BXnQO4WS.js} +1 -1
  57. package/{packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-TD6XCrii.js → dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-CjszWFSR.js} +1 -1
  58. package/{packages/remote-control-server/web/dist/assets/sequenceDiagram-3UESZ5HK-EyZvfcbT.js → dist/rcs-web/assets/sequenceDiagram-3UESZ5HK-B1IqrmXj.js} +1 -1
  59. package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-B_SU6QSv.js → stateDiagram-AJRCARHV-DpnuIetC.js} +1 -1
  60. package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-C8vEqOLP.js → stateDiagram-v2-BHNVJYJU-Doalz6kF.js} +1 -1
  61. package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-C2XHcj96.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-B6fL9WVp.js} +1 -1
  62. package/dist/rcs-web/assets/{vennDiagram-CIIHVFJN-aAmhPOm3.js → vennDiagram-CIIHVFJN-NpYOQ9yd.js} +1 -1
  63. package/{packages/remote-control-server/web/dist/assets/wardleyDiagram-YWT4CUSO-Db_mMfd6.js → dist/rcs-web/assets/wardleyDiagram-YWT4CUSO-shB3lzpB.js} +1 -1
  64. package/{packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-DPjdOqDe.js → dist/rcs-web/assets/xychartDiagram-2RQKCTM6-vdG6_jKc.js} +1 -1
  65. package/dist/rcs-web/index.html +1 -1
  66. package/package.json +1 -1
  67. package/packages/remote-control-server/src/routes/web/environments.ts +17 -5
  68. package/packages/remote-control-server/src/routes/web/sessions.ts +30 -2
  69. package/packages/remote-control-server/src/store.ts +35 -0
  70. package/packages/remote-control-server/web/dist/assets/{AdminPanel-B0hhIa7W.js → AdminPanel-Bsimdm5Q.js} +1 -1
  71. package/{dist/rcs-web/assets/Claim-BTx12YJw.js → packages/remote-control-server/web/dist/assets/Claim-D-6HcIPy.js} +1 -1
  72. package/packages/remote-control-server/web/dist/assets/Dashboard-C6G49-2O.js +1 -0
  73. package/{dist/rcs-web/assets/Join-DDMaEXX-.js → packages/remote-control-server/web/dist/assets/Join-HoIZ1jyc.js} +1 -1
  74. package/packages/remote-control-server/web/dist/assets/{Login-eCEGVdjw.js → Login-bLM4Zn4h.js} +1 -1
  75. package/packages/remote-control-server/web/dist/assets/{Register-gqlt4O0J.js → Register-ByAIpM2v.js} +1 -1
  76. package/packages/remote-control-server/web/dist/assets/{SessionDetail-BfrG6lOA.js → SessionDetail-DbLnDhLO.js} +1 -1
  77. package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-CN3bz2gb.js → SessionVisibilityBadge-p6speHFz.js} +1 -1
  78. package/{dist/rcs-web/assets/Setup-yO-c5mfy.js → packages/remote-control-server/web/dist/assets/Setup-BfTiM2jB.js} +1 -1
  79. package/packages/remote-control-server/web/dist/assets/{ShareLanding-S3XUdrDL.js → ShareLanding-DGo_cLNv.js} +1 -1
  80. package/packages/remote-control-server/web/dist/assets/{TeamCreate-DGUK4ghi.js → TeamCreate-DuC03Q55.js} +1 -1
  81. package/packages/remote-control-server/web/dist/assets/{TeamDetail-Ct07DirR.js → TeamDetail-DQeJ56yT.js} +1 -1
  82. package/packages/remote-control-server/web/dist/assets/{TeamList-CJTYa2Ah.js → TeamList-gTscY5gq.js} +1 -1
  83. package/packages/remote-control-server/web/dist/assets/{TeamSettings-DXb0w8GG.js → TeamSettings-Dvvn1zTh.js} +1 -1
  84. package/packages/remote-control-server/web/dist/assets/{UserSettings-DzreS8Mi.js → UserSettings-TpFvBUH2.js} +1 -1
  85. package/packages/remote-control-server/web/dist/assets/{arc-wiB_u0W8.js → arc-cNQXzZJk.js} +1 -1
  86. package/packages/remote-control-server/web/dist/assets/{architectureDiagram-3BPJPVTR-70tgIgZq.js → architectureDiagram-3BPJPVTR-C97K07oU.js} +1 -1
  87. package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-Drz4LSdp.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-CCawpz6v.js} +1 -1
  88. package/packages/remote-control-server/web/dist/assets/{c4Diagram-AAUBKEIU-BM7C7SEx.js → c4Diagram-AAUBKEIU-BT2wuHdt.js} +1 -1
  89. package/packages/remote-control-server/web/dist/assets/channel-CElwc65q.js +1 -0
  90. package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-BSqxyVTy.js → chunk-2J33WTMH-D7mXynqp.js} +1 -1
  91. package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-HFKHN20V.js → chunk-4BX2VUAB-Cr6Ax9dk.js} +1 -1
  92. package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-DOBdvIv4.js → chunk-55IACEB6-D67JVqPZ.js} +1 -1
  93. package/{dist/rcs-web/assets/chunk-727SXJPM-B2qn-WmZ.js → packages/remote-control-server/web/dist/assets/chunk-727SXJPM-CVttzQWT.js} +1 -1
  94. package/packages/remote-control-server/web/dist/assets/{chunk-AQP2D5EJ-DFC3ivzL.js → chunk-AQP2D5EJ-fH3XrepF.js} +1 -1
  95. package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-CkVr3MVW.js → chunk-FMBD7UC4-CJQNdt2v.js} +1 -1
  96. package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-B2WO2xxD.js → chunk-ND2GUHAM-CcxkLR8x.js} +1 -1
  97. package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-YpZyVA2c.js → chunk-QZHKN3VN--e3-i6Ei.js} +1 -1
  98. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-BYQJbP8Y.js +1 -0
  99. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-BYQJbP8Y.js +1 -0
  100. package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-Bmds1dKk.js → code-block-IT6T5CEO-D9lXU6hr.js} +1 -1
  101. package/packages/remote-control-server/web/dist/assets/{copy-DdSkINCW.js → copy-DGJ36Idc.js} +1 -1
  102. package/{dist/rcs-web/assets/cose-bilkent-S5V4N54A-CTtGg7Fx.js → packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-hOIwi1aZ.js} +1 -1
  103. package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-CFX48pZZ.js → dagre-BM42HDAG-BPQQ96TG.js} +1 -1
  104. package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-BwZE2jAF.js → diagram-2AECGRRQ-CLR_Phbu.js} +1 -1
  105. package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-BuHnggju.js → diagram-5GNKFQAL-CLWnRjBK.js} +1 -1
  106. package/packages/remote-control-server/web/dist/assets/{diagram-KO2AKTUF-Dmd3MO7f.js → diagram-KO2AKTUF-BL3D8pmI.js} +1 -1
  107. package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-34ZNfvQd.js → diagram-LMA3HP47-OXbFOADC.js} +1 -1
  108. package/packages/remote-control-server/web/dist/assets/{diagram-OG6HWLK6-CjZvlFxO.js → diagram-OG6HWLK6-2k9pa530.js} +1 -1
  109. package/{dist/rcs-web/assets/erDiagram-TEJ5UH35-BWR0WD_N.js → packages/remote-control-server/web/dist/assets/erDiagram-TEJ5UH35-DMx7MReU.js} +1 -1
  110. package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-DjZ7uFyw.js → flowDiagram-I6XJVG4X-seK4rTjU.js} +1 -1
  111. package/packages/remote-control-server/web/dist/assets/{ganttDiagram-6RSMTGT7-BuAM7awZ.js → ganttDiagram-6RSMTGT7-B89rGHgc.js} +1 -1
  112. package/packages/remote-control-server/web/dist/assets/{gitGraphDiagram-PVQCEYII-B_6bqpod.js → gitGraphDiagram-PVQCEYII-CZc1v0no.js} +1 -1
  113. package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-BbhCTAn2.js → infoDiagram-5YYISTIA-CeGh4MXv.js} +1 -1
  114. package/{dist/rcs-web/assets/ishikawaDiagram-YF4QCWOH-1VPCYnPS.js → packages/remote-control-server/web/dist/assets/ishikawaDiagram-YF4QCWOH-C0LJyHyd.js} +1 -1
  115. package/packages/remote-control-server/web/dist/assets/{journeyDiagram-JHISSGLW-Dzl0f8Im.js → journeyDiagram-JHISSGLW-Dleh_HZM.js} +1 -1
  116. package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-BGoVgBze.js → kanban-definition-UN3LZRKU-Br8f2hg8.js} +1 -1
  117. package/packages/remote-control-server/web/dist/assets/{linear-DF7ChHtW.js → linear-D7AT_2cB.js} +1 -1
  118. package/packages/remote-control-server/web/dist/assets/{main-CEsvX5rj.js → main-DU4tqNTD.js} +3 -3
  119. package/packages/remote-control-server/web/dist/assets/{mermaid-VLURNSYL-3EqupjjN.js → mermaid-VLURNSYL-C1rDhYTC.js} +4 -4
  120. package/packages/remote-control-server/web/dist/assets/{mermaid.core-BnVRH5R_.js → mermaid.core-B6lZnoad.js} +5 -5
  121. package/packages/remote-control-server/web/dist/assets/{mindmap-definition-RKZ34NQL-R3usKqMg.js → mindmap-definition-RKZ34NQL-CLc9hYkr.js} +1 -1
  122. package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-U1XXn3t9.js → pieDiagram-4H26LBE5-BDZzTeXG.js} +1 -1
  123. package/{dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-CocIpolQ.js → packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-Crv3up_A.js} +1 -1
  124. package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-DX7pHOr5.js → requirementDiagram-4Y6WPE33-BXnQO4WS.js} +1 -1
  125. package/{dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-TD6XCrii.js → packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-CjszWFSR.js} +1 -1
  126. package/{dist/rcs-web/assets/sequenceDiagram-3UESZ5HK-EyZvfcbT.js → packages/remote-control-server/web/dist/assets/sequenceDiagram-3UESZ5HK-B1IqrmXj.js} +1 -1
  127. package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-B_SU6QSv.js → stateDiagram-AJRCARHV-DpnuIetC.js} +1 -1
  128. package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-C8vEqOLP.js → stateDiagram-v2-BHNVJYJU-Doalz6kF.js} +1 -1
  129. package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-C2XHcj96.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-B6fL9WVp.js} +1 -1
  130. package/packages/remote-control-server/web/dist/assets/{vennDiagram-CIIHVFJN-aAmhPOm3.js → vennDiagram-CIIHVFJN-NpYOQ9yd.js} +1 -1
  131. package/{dist/rcs-web/assets/wardleyDiagram-YWT4CUSO-Db_mMfd6.js → packages/remote-control-server/web/dist/assets/wardleyDiagram-YWT4CUSO-shB3lzpB.js} +1 -1
  132. package/{dist/rcs-web/assets/xychartDiagram-2RQKCTM6-DPjdOqDe.js → packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-vdG6_jKc.js} +1 -1
  133. package/packages/remote-control-server/web/dist/index.html +1 -1
  134. package/dist/rcs-web/assets/Dashboard-C_qeuXGp.js +0 -1
  135. package/dist/rcs-web/assets/channel-D-a_TNjA.js +0 -1
  136. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-Dl3V5TVw.js +0 -1
  137. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-Dl3V5TVw.js +0 -1
  138. package/packages/remote-control-server/web/dist/assets/Dashboard-C_qeuXGp.js +0 -1
  139. package/packages/remote-control-server/web/dist/assets/channel-D-a_TNjA.js +0 -1
  140. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-Dl3V5TVw.js +0 -1
  141. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-Dl3V5TVw.js +0 -1
@@ -1 +1 @@
1
- import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{a1 as x,a2 as o,q as m,Y as s,K as l,i as u}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){x();const[a,i]=d.useState([]),{myTeams:r,isLoading:c}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),c?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
1
+ import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{a1 as x,a2 as o,q as m,Y as s,K as l,i as u}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){x();const[a,i]=d.useState([]),{myTeams:r,isLoading:c}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),c?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
@@ -1 +1 @@
1
- import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{m as d}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function f(){const r=window.location.pathname.split("/"),t=r[r.length-1]||"",[i,s]=a.useState("idle"),[o,c]=a.useState(null),[m,l]=a.useState(null);return a.useEffect(()=>{if(!t||!t.startsWith("clm_")){c("Invalid claim token"),s("error");return}s("claiming"),d(t).then(n=>{l(n.environment_id),s("success")}).catch(n=>{c(n instanceof Error?n.message:"Claim failed"),s("error")})},[t]),i==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):i==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:o}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[m&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:m}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]})}export{f as Claim};
1
+ import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{m as d}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function f(){const r=window.location.pathname.split("/"),t=r[r.length-1]||"",[i,s]=a.useState("idle"),[o,c]=a.useState(null),[m,l]=a.useState(null);return a.useEffect(()=>{if(!t||!t.startsWith("clm_")){c("Invalid claim token"),s("error");return}s("claiming"),d(t).then(n=>{l(n.environment_id),s("success")}).catch(n=>{c(n instanceof Error?n.message:"Claim failed"),s("error")})},[t]),i==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):i==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:o}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[m&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:m}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]})}export{f as Claim};
@@ -0,0 +1 @@
1
+ import{j as e,e as i}from"./vendor-DE_-CLIE.js";import{G as T,a2 as y,a0 as v,i as _,K as E,a1 as k,Y as o,Q as L,n as M,q as B,r as I,p as F}from"./main-DU4tqNTD.js";import{g as N}from"./workerType-Bd-zteMi.js";import{S as A,D as O,a as P,c as $,d as W,b as q}from"./SessionVisibilityBadge-p6speHFz.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function G({teamName:n,className:d}){return n?e.jsx("span",{className:T("inline-flex items-center rounded-full border border-border/60 bg-surface-2 px-2 py-0.5 text-xs text-text-muted",d),children:n}):null}function H({environments:n,onSelectEnvironment:d}){const{activeTeam:u}=y(),{user:c}=v(),m=i.useMemo(()=>(c==null?void 0:c.role)==="admin"?n:u?n.filter(a=>a.team_id===u.id):n.filter(a=>!a.team_id),[n,u,c]);return!m||m.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-8 text-center text-text-muted",children:"No active environments"}):e.jsx("div",{className:"space-y-2",children:m.map(a=>{const l=a.worker_type==="acp",p=N(a.worker_type),h=p.fullLabel,b=p.colorClass;return e.jsxs("button",{type:"button",onClick:()=>d==null?void 0:d(a),disabled:l,className:`flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors ${l?"cursor-default opacity-80":"hover:border-border-light cursor-pointer"}`,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-text-primary",children:a.machine_name||a.id}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${b}`,children:h}),e.jsx(G,{teamName:a.team_name??null})]}),e.jsx("div",{className:"text-sm text-text-muted",children:a.directory||""})]})}),e.jsxs("div",{className:"text-right",children:[e.jsx(_,{status:a.status}),e.jsx("div",{className:"mt-1 text-xs text-text-muted",children:a.branch||""})]})]},a.id)})})}function K({sessions:n,environments:d,onSelect:u,onDelete:c}){const{activeTeam:m,myTeams:a}=y(),{user:l}=v(),p=i.useMemo(()=>{const t=new Map;for(const r of a)t.set(r.id,r.name);return t},[a]),h=i.useMemo(()=>(l==null?void 0:l.role)==="admin"?n:m?n.filter(t=>t.owner_type==="team"&&t.owner_id===m.id):n.filter(t=>t.owner_type==="user"||!t.owner_type),[n,m,l]);if(!h||h.length===0)return e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-8 text-center text-text-muted",children:"No sessions"});const b=new Map;for(const t of d??[])t!=null&&t.id&&t.worker_type&&b.set(t.id,t.worker_type);const g=[...h].sort((t,r)=>(r.updated_at||0)-(t.updated_at||0));return e.jsx("div",{className:"space-y-2",children:g.map(t=>e.jsxs("div",{className:"group flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("button",{type:"button",onClick:()=>u(t.id),className:"min-w-0 flex-1 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),t.visibility&&e.jsx(A,{visibility:t.visibility||"private"}),(()=>{var f;let r=t.source==="acp"?"acp":(f=t.environment)==null?void 0:f.worker_type;!r&&t.environment_id&&(r=b.get(t.environment_id));const x=N(r);return e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${x.colorClass}`,children:x.fullLabel})})()]}),e.jsxs("div",{className:"flex items-center gap-2 truncate text-xs text-text-muted",children:[e.jsx("span",{className:"truncate font-mono",children:t.id}),t.owner_type==="team"&&t.owner_id&&e.jsxs("span",{className:"inline-flex items-center gap-2 truncate",children:[e.jsx("span",{className:"text-text-muted/40",children:"|"}),e.jsx("span",{className:"truncate",children:p.get(t.owner_id)||t.owner_id})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:E(t.created_at||t.updated_at)}),c&&e.jsx("button",{type:"button",onClick:r=>{r.stopPropagation(),c(t.id)},className:"rounded p-1 text-text-muted opacity-0 transition-all hover:text-status-error group-hover:opacity-100",title:"Delete session",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id))})}function Q({open:n,environments:d,onClose:u,onCreated:c}){k();const{activeTeam:m}=y(),{user:a}=v(),[l,p]=i.useState(""),[h,b]=i.useState(""),[g,t]=i.useState("same-dir"),[r,x]=i.useState(""),[f,w]=i.useState(!1),C=i.useMemo(()=>(a==null?void 0:a.role)==="admin"?d:m?d.filter(s=>s.team_id===m.id):d.filter(s=>!s.team_id),[d,m,a]);i.useEffect(()=>{n&&(p(""),b(""),t("same-dir"),x(""))},[n]);const S=async()=>{w(!0),x("");try{const s={};l.trim()&&(s.title=l.trim()),h&&(s.environment_id=h),s.spawn_mode=g;const j=L();j&&(s.team_id=j);const D=await M(s);c(D)}catch(s){x(s instanceof Error?s.message:o("dialog.createFailed"))}finally{w(!1)}};return e.jsx(O,{open:n,onOpenChange:s=>{s||u()},children:e.jsxs(P,{className:"max-w-md rounded-2xl border-border bg-surface-1 p-6 shadow-2xl",children:[e.jsx($,{children:e.jsx(W,{className:"font-display text-lg font-semibold text-text-primary",children:o("dialog.newSession")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:o("dialog.titleOptional")}),e.jsx("input",{type:"text",value:l,onChange:s=>p(s.target.value),placeholder:o("dialog.titlePlaceholder"),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:o("dialog.environment")}),e.jsxs("select",{value:h,onChange:s=>b(s.target.value),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-brand focus:outline-none",children:[e.jsx("option",{value:"",children:o("dialog.none")}),C.map(s=>{const j=N(s.worker_type).shortLabel;return e.jsxs("option",{value:s.id,children:[s.machine_name||s.id," (",s.branch||o("dialog.noBranch"),") · ",j]},s.id)})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:o("dialog.workspaceMode")}),e.jsxs("select",{value:g,onChange:s=>t(s.target.value),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-brand focus:outline-none",children:[e.jsx("option",{value:"same-dir",children:o("dialog.sameDir")}),e.jsx("option",{value:"worktree",children:o("dialog.worktree")})]})]}),r&&e.jsx("div",{className:"text-sm text-status-error",children:r})]}),e.jsxs(q,{children:[e.jsx("button",{onClick:u,className:"rounded-lg border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:o("common.cancel")}),e.jsx("button",{onClick:S,disabled:f,className:"rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white hover:bg-brand-light disabled:opacity-50 transition-colors",children:f?o("common.creating"):o("common.create")})]})]})})}function X({onNavigateSession:n}){k();const[d,u]=i.useState([]),[c,m]=i.useState([]),[a,l]=i.useState(!1),p=i.useCallback(async()=>{try{const[r,x]=await Promise.all([B(),I()]);u(r||[]),m(x||[])}catch(r){console.error("Dashboard render error:",r)}},[]);i.useEffect(()=>{p();const r=setInterval(p,1e4);return()=>clearInterval(r)},[p]);const h=r=>{l(!1),n(r.id)},b=i.useCallback(r=>{},[]),g=i.useCallback(r=>{n(r)},[n]),t=i.useCallback(async r=>{if(window.confirm(o("dashboard.confirmDelete").replace("{id}",r)))try{await F(r),u(x=>x.filter(f=>f.id!==r))}catch(x){alert(x instanceof Error?x.message:o("dashboard.deleteFailed"))}},[]);return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"sr-only",children:o("dashboard.title")}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-6 text-sm font-medium text-text-primary",children:o("dashboard.environments")}),e.jsx(H,{environments:c,onSelectEnvironment:b})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-medium text-text-primary",children:o("dashboard.sessions")}),e.jsx("button",{onClick:()=>l(!0),className:"rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:o("dashboard.newSession")})]}),e.jsx(K,{sessions:d,environments:c,onSelect:g,onDelete:t})]}),e.jsx(Q,{open:a,environments:c,onClose:()=>l(!1),onCreated:h})]})})}export{X as Dashboard};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as v,Y as t}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:h}=v(),[u,f]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?f(a):l()},[l]);const y=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await h(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:d,onChange:s=>j(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as v,Y as t}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:h}=v(),[u,f]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?f(a):l()},[l]);const y=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await h(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:d,onChange:s=>j(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as f,Y as t}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[l,n]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),n(""),u(!0);try{await m(a,o),d()}catch{n(t("auth.login.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),l&&e.jsx("p",{className:"text-sm text-status-error",children:l}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as f,Y as t}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[l,n]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),n(""),u(!0);try{await m(a,o),d()}catch{n(t("auth.login.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),l&&e.jsx("p",{className:"text-sm text-status-error",children:l}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as y,Y as t}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>b(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>h(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{S as Register};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as y,Y as t}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>b(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>h(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{S as Register};
@@ -1,4 +1,4 @@
1
- var xe=Object.defineProperty;var pe=(s,t,n)=>t in s?xe(s,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[t]=n;var T=(s,t,n)=>pe(s,typeof t!="symbol"?t+"":t,n);import{e as p,j as e}from"./vendor-DE_-CLIE.js";import{H as D,t as he,z as fe,M as ye,y as O,u as be,i as ee,K as te,L as se,k as ge,h as je,J as P,G as H,d as we,Z as Ne,v as ke,o as ve,x as _e,a1 as ne,Y as g,A as Se,N as Ce,_ as Me,I as Ee,p as Te,j as re,c as $e,C as Ae,s as Ie,V as Pe,D as De,a as Re}from"./main-CEsvX5rj.js";import{g as qe}from"./workerType-Bd-zteMi.js";import{D as ae,a as oe,c as ie,d as le,b as Ue,S as Fe}from"./SessionVisibilityBadge-CN3bz2gb.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
1
+ var xe=Object.defineProperty;var pe=(s,t,n)=>t in s?xe(s,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[t]=n;var T=(s,t,n)=>pe(s,typeof t!="symbol"?t+"":t,n);import{e as p,j as e}from"./vendor-DE_-CLIE.js";import{H as D,t as he,z as fe,M as ye,y as O,u as be,i as ee,K as te,L as se,k as ge,h as je,J as P,G as H,d as we,Z as Ne,v as ke,o as ve,x as _e,a1 as ne,Y as g,A as Se,N as Ce,_ as Me,I as Ee,p as Te,j as re,c as $e,C as Ae,s as Ie,V as Pe,D as De,a as Re}from"./main-DU4tqNTD.js";import{g as qe}from"./workerType-Bd-zteMi.js";import{D as ae,a as oe,c as ie,d as le,b as Ue,S as Fe}from"./SessionVisibilityBadge-p6speHFz.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{j as t}from"./vendor-DE_-CLIE.js";import{H as l,R as c,f as d,e as g,X as u,G as o,T as x,g as f,O as m,U as p}from"./main-CEsvX5rj.js";/**
1
+ import{j as t}from"./vendor-DE_-CLIE.js";import{H as l,R as c,f as d,e as g,X as u,G as o,T as x,g as f,O as m,U as p}from"./main-DU4tqNTD.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as v,Y as t}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function q({onSuccess:p,onAlreadyDone:b}){const{setup:f}=v(),[n,h]=r.useState(""),[l,y]=r.useState(""),[a,g]=r.useState(""),[d,w]=r.useState(""),[i,o]=r.useState(""),[c,m]=r.useState(!1),j=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==d){o(t("auth.setup.passwordMismatch"));return}m(!0);try{await f(n,l,a),p()}catch(x){const u=x instanceof Error?x.message:"Setup failed";if(u.includes("already")||u.includes("409")){b();return}o(u)}finally{m(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.setup.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.setup.description")})]}),e.jsxs("form",{onSubmit:j,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.apiKey")}),e.jsx("input",{type:"password",value:n,onChange:s=>h(s.target.value),required:!0,autoComplete:"off",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.username")}),e.jsx("input",{type:"text",value:l,onChange:s=>y(s.target.value),required:!0,autoComplete:"username",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.confirmPassword")}),e.jsx("input",{type:"password",value:d,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:c,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:c?t("common.loading"):t("auth.setup.submit")})]})]})})}export{q as Setup};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{a0 as v,Y as t}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function q({onSuccess:p,onAlreadyDone:b}){const{setup:f}=v(),[n,h]=r.useState(""),[l,y]=r.useState(""),[a,g]=r.useState(""),[d,w]=r.useState(""),[i,o]=r.useState(""),[c,m]=r.useState(!1),j=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==d){o(t("auth.setup.passwordMismatch"));return}m(!0);try{await f(n,l,a),p()}catch(x){const u=x instanceof Error?x.message:"Setup failed";if(u.includes("already")||u.includes("409")){b();return}o(u)}finally{m(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.setup.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.setup.description")})]}),e.jsxs("form",{onSubmit:j,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.apiKey")}),e.jsx("input",{type:"password",value:n,onChange:s=>h(s.target.value),required:!0,autoComplete:"off",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.username")}),e.jsx("input",{type:"text",value:l,onChange:s=>y(s.target.value),required:!0,autoComplete:"username",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.setup.confirmPassword")}),e.jsx("input",{type:"password",value:d,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:c,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:c?t("common.loading"):t("auth.setup.submit")})]})]})})}export{q as Setup};
@@ -1 +1 @@
1
- import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{w as m,b as h}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){const[t,r]=d.useState("loading"),[i,a]=d.useState(""),l=(typeof window<"u"?window.location.pathname:"").match(/\/code\/s\/([^/?]+)/),o=l?l[1]:null;return d.useEffect(()=>{if(!o){r("invalid"),a("Share link is invalid — no token found.");return}if(!o.startsWith("shr_")){r("invalid"),a("Invalid share token format.");return}let n=!1;async function c(){try{const s=await m(o);if(n)return;window.location.href=`/code/${s.id}`}catch(s){if(n)return;s instanceof h?s.status===401&&s.message.toLowerCase().includes("expired")?(r("expired"),a("This share has expired.")):s.status===404?s.message.toLowerCase().includes("session")?(r("not_found"),a("Session not found.")):(r("invalid"),a("Share not found or has been revoked.")):s.status===403?(r("invalid"),a("You do not have permission to access this share.")):(r("error"),a(s.message||"Failed to resolve share.")):(r("error"),a(s instanceof Error?s.message:"Failed to resolve share."))}}return c(),()=>{n=!0}},[o]),d.useEffect(()=>{if(t!=="loading"&&t!=="error"){const n=setTimeout(()=>{window.location.href="/code"},3e3);return()=>clearTimeout(n)}},[t]),t==="loading"?e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-muted",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-brand border-t-transparent rounded-full mx-auto mb-3"}),e.jsx("p",{children:"Resolving share link..."})]})}):e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-primary",children:e.jsxs("div",{className:"text-center max-w-md px-4",children:[t==="expired"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Share Expired"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share has expired."})]}),t==="invalid"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Invalid Share"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share link is invalid or has been revoked."})]}),t==="not_found"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Not Found"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"The session could not be found."})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Error"}),e.jsx("p",{className:"text-status-error mb-4",children:i})]}),e.jsx("a",{href:"/code",className:"text-brand hover:underline",children:"← Back to Dashboard"})]})})}export{j as ShareLanding};
1
+ import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{w as m,b as h}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){const[t,r]=d.useState("loading"),[i,a]=d.useState(""),l=(typeof window<"u"?window.location.pathname:"").match(/\/code\/s\/([^/?]+)/),o=l?l[1]:null;return d.useEffect(()=>{if(!o){r("invalid"),a("Share link is invalid — no token found.");return}if(!o.startsWith("shr_")){r("invalid"),a("Invalid share token format.");return}let n=!1;async function c(){try{const s=await m(o);if(n)return;window.location.href=`/code/${s.id}`}catch(s){if(n)return;s instanceof h?s.status===401&&s.message.toLowerCase().includes("expired")?(r("expired"),a("This share has expired.")):s.status===404?s.message.toLowerCase().includes("session")?(r("not_found"),a("Session not found.")):(r("invalid"),a("Share not found or has been revoked.")):s.status===403?(r("invalid"),a("You do not have permission to access this share.")):(r("error"),a(s.message||"Failed to resolve share.")):(r("error"),a(s instanceof Error?s.message:"Failed to resolve share."))}}return c(),()=>{n=!0}},[o]),d.useEffect(()=>{if(t!=="loading"&&t!=="error"){const n=setTimeout(()=>{window.location.href="/code"},3e3);return()=>clearTimeout(n)}},[t]),t==="loading"?e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-muted",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-brand border-t-transparent rounded-full mx-auto mb-3"}),e.jsx("p",{children:"Resolving share link..."})]})}):e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-primary",children:e.jsxs("div",{className:"text-center max-w-md px-4",children:[t==="expired"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Share Expired"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share has expired."})]}),t==="invalid"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Invalid Share"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share link is invalid or has been revoked."})]}),t==="not_found"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Not Found"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"The session could not be found."})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Error"}),e.jsx("p",{className:"text-status-error mb-4",children:i})]}),e.jsx("a",{href:"/code",className:"text-brand hover:underline",children:"← Back to Dashboard"})]})})}export{j as ShareLanding};
@@ -1 +1 @@
1
- import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{a1 as f,a2 as y,Y as r}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S(){f();const{createTeam:u}=y(),[o,p]=a.useState(""),[s,c]=a.useState(""),[i,b]=a.useState(""),[m,l]=a.useState(null),[d,x]=a.useState(!1),h=t=>{p(t),s||c(t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-"))},g=async t=>{t.preventDefault(),l(null),x(!0);try{const n=await u({name:o,slug:s,description:i||void 0});window.location.href=`/teams/${n.slug}`}catch(n){l(n instanceof Error?n.message:"Failed to create team")}finally{x(!1)}};return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"mb-10 font-display text-2xl font-semibold tracking-tight text-text-primary",children:r("team.create.title")}),e.jsxs("form",{onSubmit:g,className:"max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.name")}),e.jsx("input",{id:"name",type:"text",required:!0,value:o,onChange:t=>h(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"Engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.nameHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.slug")}),e.jsx("input",{id:"slug",type:"text",required:!0,value:s,onChange:t=>c(t.target.value),pattern:"^[a-z0-9-]{3,32}$",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.slugHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.description")}),e.jsx("textarea",{id:"description",value:i,onChange:t=>b(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),m&&e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:r("common.cancel")}),e.jsx("button",{type:"submit",disabled:d||!o||!s,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:d?r("common.creating"):r("team.create.submit")})]})]})]})})}export{S as TeamCreate};
1
+ import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{a1 as f,a2 as y,Y as r}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S(){f();const{createTeam:u}=y(),[o,p]=a.useState(""),[s,c]=a.useState(""),[i,b]=a.useState(""),[m,l]=a.useState(null),[d,x]=a.useState(!1),h=t=>{p(t),s||c(t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-"))},g=async t=>{t.preventDefault(),l(null),x(!0);try{const n=await u({name:o,slug:s,description:i||void 0});window.location.href=`/teams/${n.slug}`}catch(n){l(n instanceof Error?n.message:"Failed to create team")}finally{x(!1)}};return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"mb-10 font-display text-2xl font-semibold tracking-tight text-text-primary",children:r("team.create.title")}),e.jsxs("form",{onSubmit:g,className:"max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.name")}),e.jsx("input",{id:"name",type:"text",required:!0,value:o,onChange:t=>h(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"Engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.nameHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.slug")}),e.jsx("input",{id:"slug",type:"text",required:!0,value:s,onChange:t=>c(t.target.value),pattern:"^[a-z0-9-]{3,32}$",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.slugHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.description")}),e.jsx("textarea",{id:"description",value:i,onChange:t=>b(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),m&&e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:r("common.cancel")}),e.jsx("button",{type:"submit",disabled:d||!o||!s,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:d?r("common.creating"):r("team.create.submit")})]})]})]})})}export{S as TeamCreate};
@@ -1,4 +1,4 @@
1
- import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{H as M,l as w,a1 as P,Y as y,X as B,i as G,r as z,E as I,B as O,a0 as Q,S as W}from"./main-CEsvX5rj.js";import{C as T}from"./copy-DdSkINCW.js";import{g as X}from"./workerType-Bd-zteMi.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
1
+ import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{H as M,l as w,a1 as P,Y as y,X as B,i as G,r as z,E as I,B as O,a0 as Q,S as W}from"./main-DU4tqNTD.js";import{C as T}from"./copy-DGJ36Idc.js";import{g as X}from"./workerType-Bd-zteMi.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e}from"./vendor-DE_-CLIE.js";import{a2 as l,P as a}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function c(){const{myTeams:t,isLoading:i}=l();return i?e.jsx("div",{className:"px-6 py-20 sm:px-10",children:e.jsxs("div",{className:"max-w-4xl",children:[e.jsx("div",{className:"h-8 w-32 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"mt-12 space-y-10",children:[0,1,2].map(s=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-6 w-48 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-surface-2"})]},s))})]})}):e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-16",children:[e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary sm:text-4xl",children:"Teams"}),e.jsx("p",{className:"mt-3 text-sm text-text-muted",children:t.length===0?"Create your first team to start collaborating.":`${t.length} ${t.length===1?"team":"teams"}`})]}),t.length===0?e.jsx("div",{className:"py-8",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md bg-accent px-5 py-2.5 text-sm font-medium text-white transition-all hover:bg-accent/90 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"Create team"]})}):e.jsx("ul",{className:"space-y-10",children:t.map(s=>e.jsx("li",{children:e.jsxs("a",{href:`/teams/${s.slug}`,className:"group block",children:[e.jsxs("div",{className:"flex items-baseline gap-4",children:[e.jsx("h2",{className:"font-display text-xl font-medium tracking-tight text-text-primary transition-colors group-hover:text-accent",children:s.name}),e.jsxs("span",{className:"font-mono text-xs text-text-muted",children:["/",s.slug]})]}),s.description?e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-text-muted",children:s.description}):e.jsx("p",{className:"mt-2 text-sm italic text-text-muted/60",children:"No description"})]})},s.id))}),t.length>0&&e.jsx("div",{className:"mt-16",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-text-primary transition-all hover:bg-surface-2 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"New team"]})})]})}export{c as TeamList};
1
+ import{j as e}from"./vendor-DE_-CLIE.js";import{a2 as l,P as a}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function c(){const{myTeams:t,isLoading:i}=l();return i?e.jsx("div",{className:"px-6 py-20 sm:px-10",children:e.jsxs("div",{className:"max-w-4xl",children:[e.jsx("div",{className:"h-8 w-32 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"mt-12 space-y-10",children:[0,1,2].map(s=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-6 w-48 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-surface-2"})]},s))})]})}):e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-16",children:[e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary sm:text-4xl",children:"Teams"}),e.jsx("p",{className:"mt-3 text-sm text-text-muted",children:t.length===0?"Create your first team to start collaborating.":`${t.length} ${t.length===1?"team":"teams"}`})]}),t.length===0?e.jsx("div",{className:"py-8",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md bg-accent px-5 py-2.5 text-sm font-medium text-white transition-all hover:bg-accent/90 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"Create team"]})}):e.jsx("ul",{className:"space-y-10",children:t.map(s=>e.jsx("li",{children:e.jsxs("a",{href:`/teams/${s.slug}`,className:"group block",children:[e.jsxs("div",{className:"flex items-baseline gap-4",children:[e.jsx("h2",{className:"font-display text-xl font-medium tracking-tight text-text-primary transition-colors group-hover:text-accent",children:s.name}),e.jsxs("span",{className:"font-mono text-xs text-text-muted",children:["/",s.slug]})]}),s.description?e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-text-muted",children:s.description}):e.jsx("p",{className:"mt-2 text-sm italic text-text-muted/60",children:"No description"})]})},s.id))}),t.length>0&&e.jsx("div",{className:"mt-16",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-text-primary transition-all hover:bg-surface-2 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"New team"]})})]})}export{c as TeamList};
@@ -1 +1 @@
1
- import{e as n,j as e}from"./vendor-DE_-CLIE.js";import{l as c}from"./main-CEsvX5rj.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";async function j(s){try{const r=s.startsWith("team_")?`/web/teams/${s}`:`/web/teams/by-slug/${s}`;return await c("GET",r)}catch{return null}}async function w(s,r){await c("PATCH",`/web/teams/${s}`,r)}async function N(s){await c("DELETE",`/web/teams/${s}`)}function k(){const s=window.location.pathname.split("/"),r=s[s.length-2]||"",[a,h]=n.useState(null),[b,y]=n.useState(!0),[i,m]=n.useState(""),[l,d]=n.useState(""),[u,o]=n.useState(null),[x,p]=n.useState(!1);n.useEffect(()=>{r&&j(r).then(t=>{t&&(h(t),m(t.name),d(t.description||"")),y(!1)})},[r]);const g=async t=>{if(t.preventDefault(),!!a){o(null),p(!0);try{await w(a.id,{name:i,description:l}),window.location.href=`/teams/${a.slug}`}catch(f){o(f instanceof Error?f.message:"Failed to update")}finally{p(!1)}}},v=async()=>{if(a&&window.confirm("Delete this team? Environments must be transferred first."))try{await N(a.id),window.location.href="/teams"}catch(t){o(t instanceof Error?t.message:"Failed to delete")}};return b?e.jsx("div",{className:"flex items-center justify-center py-12 text-text-muted",children:"Loading..."}):a?e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsxs("header",{className:"mb-12",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:a.name}),e.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:["/",a.slug]})]}),e.jsxs("form",{onSubmit:g,className:"mb-16 max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:"Team Name"}),e.jsx("input",{id:"name",type:"text",required:!0,value:i,onChange:t=>m(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:"Description"}),e.jsx("textarea",{id:"description",value:l,onChange:t=>d(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),u&&e.jsx("p",{className:"text-sm text-destructive",children:u}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:x||!i,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:x?"Saving...":"Save Changes"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-3 text-sm font-medium text-destructive",children:"Delete team"}),e.jsx("p",{className:"mb-4 text-sm text-text-muted",children:"Deleting a team requires all environments to be transferred first."}),e.jsx("button",{type:"button",onClick:v,className:"rounded-md border border-destructive/60 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors",children:"Delete Team"})]})]})}):e.jsxs("div",{className:"mx-auto max-w-lg px-4 py-8",children:[e.jsx("p",{className:"text-text-muted",children:"Team not found."}),e.jsx("a",{href:"/teams",className:"text-accent hover:underline",children:"Back to teams"})]})}export{k as TeamSettings};
1
+ import{e as n,j as e}from"./vendor-DE_-CLIE.js";import{l as c}from"./main-DU4tqNTD.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";async function j(s){try{const r=s.startsWith("team_")?`/web/teams/${s}`:`/web/teams/by-slug/${s}`;return await c("GET",r)}catch{return null}}async function w(s,r){await c("PATCH",`/web/teams/${s}`,r)}async function N(s){await c("DELETE",`/web/teams/${s}`)}function k(){const s=window.location.pathname.split("/"),r=s[s.length-2]||"",[a,h]=n.useState(null),[b,y]=n.useState(!0),[i,m]=n.useState(""),[l,d]=n.useState(""),[u,o]=n.useState(null),[x,p]=n.useState(!1);n.useEffect(()=>{r&&j(r).then(t=>{t&&(h(t),m(t.name),d(t.description||"")),y(!1)})},[r]);const g=async t=>{if(t.preventDefault(),!!a){o(null),p(!0);try{await w(a.id,{name:i,description:l}),window.location.href=`/teams/${a.slug}`}catch(f){o(f instanceof Error?f.message:"Failed to update")}finally{p(!1)}}},v=async()=>{if(a&&window.confirm("Delete this team? Environments must be transferred first."))try{await N(a.id),window.location.href="/teams"}catch(t){o(t instanceof Error?t.message:"Failed to delete")}};return b?e.jsx("div",{className:"flex items-center justify-center py-12 text-text-muted",children:"Loading..."}):a?e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsxs("header",{className:"mb-12",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:a.name}),e.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:["/",a.slug]})]}),e.jsxs("form",{onSubmit:g,className:"mb-16 max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:"Team Name"}),e.jsx("input",{id:"name",type:"text",required:!0,value:i,onChange:t=>m(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:"Description"}),e.jsx("textarea",{id:"description",value:l,onChange:t=>d(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),u&&e.jsx("p",{className:"text-sm text-destructive",children:u}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:x||!i,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:x?"Saving...":"Save Changes"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-3 text-sm font-medium text-destructive",children:"Delete team"}),e.jsx("p",{className:"mb-4 text-sm text-text-muted",children:"Deleting a team requires all environments to be transferred first."}),e.jsx("button",{type:"button",onClick:v,className:"rounded-md border border-destructive/60 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors",children:"Delete Team"})]})]})}):e.jsxs("div",{className:"mx-auto max-w-lg px-4 py-8",children:[e.jsx("p",{className:"text-text-muted",children:"Team not found."}),e.jsx("a",{href:"/teams",className:"text-accent hover:underline",children:"Back to teams"})]})}export{k as TeamSettings};
@@ -1 +1 @@
1
- import{e as o,j as e}from"./vendor-DE_-CLIE.js";import{a0 as C,a1 as P,Y as t,W as S}from"./main-CEsvX5rj.js";import{C as k}from"./copy-DdSkINCW.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function L(){const{user:n,logout:f}=C(),w=P(),[l,u]=o.useState(""),[c,m]=o.useState(""),[x,p]=o.useState(""),[h,b]=o.useState(""),[g,a]=o.useState(""),[y,d]=o.useState(!1);if(!n)return null;const j=async()=>{const s=n.userId;try{if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(s),d(!0),setTimeout(()=>d(!1),2e3);return}}catch{}const r=document.createElement("textarea");r.value=s,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();try{document.execCommand("copy"),d(!0),setTimeout(()=>d(!1),2e3)}catch{}document.body.removeChild(r)},N=async s=>{if(s.preventDefault(),a(""),b(""),c.length<8){a(t("auth.setup.passwordTooShort"));return}if(c!==x){a(t("auth.setup.passwordMismatch"));return}try{const r=await fetch("/web/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({currentPassword:l,newPassword:c})});if(!r.ok){const i=await r.json();throw new Error(i.error||t("user.settings.changeFailed"))}b(t("user.settings.passwordChanged")),u(""),m(""),p("")}catch(r){const i=r instanceof Error?r.message:t("user.settings.changeFailed");a(i)}},v=async()=>{try{if(!(await fetch("/web/auth/logout-all",{method:"POST",credentials:"include",headers:{"X-Requested-With":"XMLHttpRequest"}})).ok){a(t("common.error"));return}await f()}catch{a(t("common.error"))}};return e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsxs("div",{children:[e.jsxs("header",{className:"mb-16",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:n.username}),e.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[e.jsx("code",{className:"font-mono text-xs text-text-muted",children:n.userId}),e.jsx("button",{type:"button",onClick:j,className:"text-text-muted transition-colors hover:text-text-primary","aria-label":"Copy user ID",children:e.jsx(k,{className:"h-3.5 w-3.5"})}),y&&e.jsx("span",{className:"text-xs text-status-active",children:t("share.copied")}),e.jsx("span",{className:"text-text-muted/40",children:"·"}),e.jsx("span",{className:"text-xs text-text-muted",children:n.role})]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-5 text-sm font-medium text-text-primary",children:t("user.settings.language")}),e.jsxs("select",{value:w,onChange:s=>S(s.target.value),className:"rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:[e.jsx("option",{value:"zh",children:"中文"}),e.jsx("option",{value:"en",children:"English"})]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-5 text-sm font-medium text-text-primary",children:t("user.settings.changePassword")}),e.jsxs("form",{onSubmit:N,className:"max-w-md space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:t("user.settings.currentPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>u(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:t("user.settings.newPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>m(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:t("user.settings.confirmNewPassword")}),e.jsx("input",{type:"password",value:x,onChange:s=>p(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),g&&e.jsx("p",{className:"text-sm text-status-error",children:g}),h&&e.jsx("p",{className:"text-sm text-status-active",children:h}),e.jsx("div",{className:"pt-2",children:e.jsx("button",{type:"submit",className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-accent/90",children:t("user.settings.submit")})})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-5 text-sm font-medium text-destructive",children:t("user.settings.logoutAll")}),e.jsx("p",{className:"mb-4 text-sm text-text-muted",children:"Revoke sessions on all devices."}),e.jsx("button",{onClick:v,className:"rounded-md border border-status-error/30 px-4 py-2 text-sm font-medium text-status-error transition-colors hover:bg-status-error/10",children:t("user.settings.logoutAll")})]})]})})}export{L as UserSettings};
1
+ import{e as o,j as e}from"./vendor-DE_-CLIE.js";import{a0 as C,a1 as P,Y as t,W as S}from"./main-DU4tqNTD.js";import{C as k}from"./copy-DGJ36Idc.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function L(){const{user:n,logout:f}=C(),w=P(),[l,u]=o.useState(""),[c,m]=o.useState(""),[x,p]=o.useState(""),[h,b]=o.useState(""),[g,a]=o.useState(""),[y,d]=o.useState(!1);if(!n)return null;const j=async()=>{const s=n.userId;try{if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(s),d(!0),setTimeout(()=>d(!1),2e3);return}}catch{}const r=document.createElement("textarea");r.value=s,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();try{document.execCommand("copy"),d(!0),setTimeout(()=>d(!1),2e3)}catch{}document.body.removeChild(r)},N=async s=>{if(s.preventDefault(),a(""),b(""),c.length<8){a(t("auth.setup.passwordTooShort"));return}if(c!==x){a(t("auth.setup.passwordMismatch"));return}try{const r=await fetch("/web/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({currentPassword:l,newPassword:c})});if(!r.ok){const i=await r.json();throw new Error(i.error||t("user.settings.changeFailed"))}b(t("user.settings.passwordChanged")),u(""),m(""),p("")}catch(r){const i=r instanceof Error?r.message:t("user.settings.changeFailed");a(i)}},v=async()=>{try{if(!(await fetch("/web/auth/logout-all",{method:"POST",credentials:"include",headers:{"X-Requested-With":"XMLHttpRequest"}})).ok){a(t("common.error"));return}await f()}catch{a(t("common.error"))}};return e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsxs("div",{children:[e.jsxs("header",{className:"mb-16",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:n.username}),e.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[e.jsx("code",{className:"font-mono text-xs text-text-muted",children:n.userId}),e.jsx("button",{type:"button",onClick:j,className:"text-text-muted transition-colors hover:text-text-primary","aria-label":"Copy user ID",children:e.jsx(k,{className:"h-3.5 w-3.5"})}),y&&e.jsx("span",{className:"text-xs text-status-active",children:t("share.copied")}),e.jsx("span",{className:"text-text-muted/40",children:"·"}),e.jsx("span",{className:"text-xs text-text-muted",children:n.role})]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-5 text-sm font-medium text-text-primary",children:t("user.settings.language")}),e.jsxs("select",{value:w,onChange:s=>S(s.target.value),className:"rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:[e.jsx("option",{value:"zh",children:"中文"}),e.jsx("option",{value:"en",children:"English"})]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-5 text-sm font-medium text-text-primary",children:t("user.settings.changePassword")}),e.jsxs("form",{onSubmit:N,className:"max-w-md space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:t("user.settings.currentPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>u(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:t("user.settings.newPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>m(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:t("user.settings.confirmNewPassword")}),e.jsx("input",{type:"password",value:x,onChange:s=>p(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),g&&e.jsx("p",{className:"text-sm text-status-error",children:g}),h&&e.jsx("p",{className:"text-sm text-status-active",children:h}),e.jsx("div",{className:"pt-2",children:e.jsx("button",{type:"submit",className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-accent/90",children:t("user.settings.submit")})})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-5 text-sm font-medium text-destructive",children:t("user.settings.logoutAll")}),e.jsx("p",{className:"mb-4 text-sm text-text-muted",children:"Revoke sessions on all devices."}),e.jsx("button",{onClick:v,className:"rounded-md border border-status-error/30 px-4 py-2 text-sm font-medium text-status-error transition-colors hover:bg-status-error/10",children:t("user.settings.logoutAll")})]})]})})}export{L as UserSettings};
@@ -1 +1 @@
1
- import{bl as ln,aO as an,H as z,b8 as w,F as G,ah as un,W as y,bd as tn,b9 as J,aI as _,c as rn,m as o,aG as on,j as sn,d as fn}from"./mermaid.core-BnVRH5R_.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,j,I,v,A,H,a){var q=j-l,i=I-h,n=H-v,d=a-A,u=d*q-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*q,h+u*i]}function U(l,h,j,I,v,A,H){var a=l-j,q=h-I,i=(H?A:-A)/J(a*a+q*q),n=i*q,d=-i*a,u=l+n,s=h+d,f=j+n,c=I+d,S=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,D=(g<0?-1:1)*J(on(0,T*T*R-P*P)),E=(P*g-m*D)/R,F=(-P*m-g*D)/R,b=(P*g+m*D)/R,p=(-P*m+g*D)/R,x=E-S,e=F-t,r=b-S,W=p-t;return x*x+e*e>r*r+W*W&&(E=b,F=p),{cx:E,cy:F,x01:-n,y01:-d,x11:E*(v/T-1),y11:F*(v/T-1)}}function hn(){var l=cn,h=yn,j=G(0),I=null,v=gn,A=dn,H=mn,a=null,q=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,S=rn(c-f),t=c>f;if(a||(a=n=q()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(S>tn-y)a.moveTo(s*z(f),s*w(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*z(c),u*w(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=S,D=S,E=H.apply(this,arguments)/2,F=E>y&&(I?+I.apply(this,arguments):J(u*u+s*s)),b=_(rn(s-u)/2,+j.apply(this,arguments)),p=b,x=b,e,r;if(F>y){var W=sn(F/u*w(E)),K=sn(F/s*w(E));(P-=W*2)>y?(W*=t?1:-1,R+=W,T-=W):(P=0,R=T=(f+c)/2),(D-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(D=0,m=g=(f+c)/2)}var B=s*z(m),C=s*w(m),L=u*z(T),M=u*w(T);if(b>y){var N=s*z(g),Q=s*w(g),V=u*z(R),X=u*w(R),O;if(S<an)if(O=pn(B,C,V,X,N,Q,L,M)){var Y=B-O[0],Z=C-O[1],$=N-O[0],k=Q-O[1],nn=1/w(fn((Y*$+Z*k)/(J(Y*Y+Z*Z)*J($*$+k*k)))/2),en=J(O[0]*O[0]+O[1]*O[1]);p=_(b,(u-en)/(nn-1)),x=_(b,(s-en)/(nn+1))}else p=x=0}D>y?x>y?(e=U(V,X,B,C,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<b?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(B,C),a.arc(0,0,s,m,g,!t)):a.moveTo(B,C),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(B,C,V,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<b?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[z(d)*n,w(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:G(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:G(+n),i):h},i.cornerRadius=function(n){return arguments.length?(j=typeof n=="function"?n:G(+n),i):j},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:G(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:G(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:G(+n),i):A},i.padAngle=function(n){return arguments.length?(H=typeof n=="function"?n:G(+n),i):H},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{bl as ln,aO as an,H as z,b8 as w,F as G,ah as un,W as y,bd as tn,b9 as J,aI as _,c as rn,m as o,aG as on,j as sn,d as fn}from"./mermaid.core-B6lZnoad.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,j,I,v,A,H,a){var q=j-l,i=I-h,n=H-v,d=a-A,u=d*q-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*q,h+u*i]}function U(l,h,j,I,v,A,H){var a=l-j,q=h-I,i=(H?A:-A)/J(a*a+q*q),n=i*q,d=-i*a,u=l+n,s=h+d,f=j+n,c=I+d,S=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,D=(g<0?-1:1)*J(on(0,T*T*R-P*P)),E=(P*g-m*D)/R,F=(-P*m-g*D)/R,b=(P*g+m*D)/R,p=(-P*m+g*D)/R,x=E-S,e=F-t,r=b-S,W=p-t;return x*x+e*e>r*r+W*W&&(E=b,F=p),{cx:E,cy:F,x01:-n,y01:-d,x11:E*(v/T-1),y11:F*(v/T-1)}}function hn(){var l=cn,h=yn,j=G(0),I=null,v=gn,A=dn,H=mn,a=null,q=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,S=rn(c-f),t=c>f;if(a||(a=n=q()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(S>tn-y)a.moveTo(s*z(f),s*w(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*z(c),u*w(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=S,D=S,E=H.apply(this,arguments)/2,F=E>y&&(I?+I.apply(this,arguments):J(u*u+s*s)),b=_(rn(s-u)/2,+j.apply(this,arguments)),p=b,x=b,e,r;if(F>y){var W=sn(F/u*w(E)),K=sn(F/s*w(E));(P-=W*2)>y?(W*=t?1:-1,R+=W,T-=W):(P=0,R=T=(f+c)/2),(D-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(D=0,m=g=(f+c)/2)}var B=s*z(m),C=s*w(m),L=u*z(T),M=u*w(T);if(b>y){var N=s*z(g),Q=s*w(g),V=u*z(R),X=u*w(R),O;if(S<an)if(O=pn(B,C,V,X,N,Q,L,M)){var Y=B-O[0],Z=C-O[1],$=N-O[0],k=Q-O[1],nn=1/w(fn((Y*$+Z*k)/(J(Y*Y+Z*Z)*J($*$+k*k)))/2),en=J(O[0]*O[0]+O[1]*O[1]);p=_(b,(u-en)/(nn-1)),x=_(b,(s-en)/(nn+1))}else p=x=0}D>y?x>y?(e=U(V,X,B,C,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<b?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(B,C),a.arc(0,0,s,m,g,!t)):a.moveTo(B,C),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(B,C,V,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<b?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[z(d)*n,w(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:G(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:G(+n),i):h},i.cornerRadius=function(n){return arguments.length?(j=typeof n=="function"?n:G(+n),i):j},i.padRadius=function(n){return arguments.length?(I=n==null?null:typeof n=="function"?n:G(+n),i):I},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:G(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:G(+n),i):A},i.padAngle=function(n){return arguments.length?(H=typeof n=="function"?n:G(+n),i):H},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};