@intent-hq/web 2.343.0 → 2.343.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{B4wCLW9D.js → 0sFbw5Xt.js} +1 -1
  3. package/web/app/immutable/chunks/{DFE9ZMeT.js → 1JAPG9y2.js} +1 -1
  4. package/web/app/immutable/chunks/{CqvtiZGc.js → 35fhULrG.js} +1 -1
  5. package/web/app/immutable/chunks/{CPO9HaV6.js → 51PCa81S.js} +1 -1
  6. package/web/app/immutable/chunks/{-7jsI8ko.js → 9kqz7dDm.js} +1 -1
  7. package/web/app/immutable/chunks/{D4oIU9K_.js → Ae-1QeEg.js} +4 -4
  8. package/web/app/immutable/chunks/{Cno6VYfD.js → AzBoScJz.js} +1 -1
  9. package/web/app/immutable/chunks/{B-j9sqQt.js → B0IMKrn3.js} +1 -1
  10. package/web/app/immutable/chunks/{BbjJy79n.js → B422XfSt.js} +3 -3
  11. package/web/app/immutable/chunks/{BcZ9Z8VA.js → B5tMdivj.js} +2 -2
  12. package/web/app/immutable/chunks/{igchoUQo.js → BANxp4gx.js} +1 -1
  13. package/web/app/immutable/chunks/{DGxVMu8C.js → BAyUfXYZ.js} +1 -1
  14. package/web/app/immutable/chunks/{B9YprfEW.js → BHekbKzn.js} +1 -1
  15. package/web/app/immutable/chunks/{CxmyVU6t.js → BHxqvJ6p.js} +1 -1
  16. package/web/app/immutable/chunks/{COT_rqxx.js → BIGnKucK.js} +1 -1
  17. package/web/app/immutable/chunks/{CXvl05h7.js → BIIYAsFZ.js} +4 -4
  18. package/web/app/immutable/chunks/{s6vbOiKn.js → BIjcjB3s.js} +1 -1
  19. package/web/app/immutable/chunks/{Bj9SEb1s.js → BIqsMOOo.js} +1 -1
  20. package/web/app/immutable/chunks/{BCpgjylh.js → BJ9asJd9.js} +1 -1
  21. package/web/app/immutable/chunks/{DNnUBdFi.js → BP2y3sRZ.js} +1 -1
  22. package/web/app/immutable/chunks/{aVhyGAQ9.js → BPPRSM7X.js} +3 -3
  23. package/web/app/immutable/chunks/{DQXKHdu9.js → BSDp34Kf.js} +1 -1
  24. package/web/app/immutable/chunks/{DtnvVmfW.js → BUUgD57b.js} +1 -1
  25. package/web/app/immutable/chunks/{CtAU6QcS.js → BWar5Ve4.js} +1 -1
  26. package/web/app/immutable/chunks/{B77YY-6s.js → BXNFvqQr.js} +3 -3
  27. package/web/app/immutable/chunks/{DADI6X8_.js → BXXxFrPj.js} +1 -1
  28. package/web/app/immutable/chunks/{C7gE7X9c.js → BYONj21e.js} +1 -1
  29. package/web/app/immutable/chunks/{NypQX0XY.js → BaA_OrGq.js} +1 -1
  30. package/web/app/immutable/chunks/{BA01Qyrp.js → BaEEaJBP.js} +1 -1
  31. package/web/app/immutable/chunks/{BXnVNTE7.js → BayXe-e8.js} +1 -1
  32. package/web/app/immutable/chunks/{B0qdmuRw.js → Bc5tOdcb.js} +1 -1
  33. package/web/app/immutable/chunks/{BbN6BrHS.js → BdI_W2oB.js} +1 -1
  34. package/web/app/immutable/chunks/{BhyJTFUy.js → Bdd_Up9A.js} +1 -1
  35. package/web/app/immutable/chunks/{JB4ifMLM.js → BfIFD0ql.js} +1 -1
  36. package/web/app/immutable/chunks/{eER94OA3.js → BgEFdEVh.js} +1 -1
  37. package/web/app/immutable/chunks/Bhmm0Csf.js +1 -0
  38. package/web/app/immutable/chunks/{BlFFipH7.js → BjGmqNpS.js} +1 -1
  39. package/web/app/immutable/chunks/{BW_o9mAF.js → Bka1VG1N.js} +1 -1
  40. package/web/app/immutable/chunks/{DWcs4R2E.js → BmmYJ5hU.js} +1 -1
  41. package/web/app/immutable/chunks/{DguKeriw.js → BoX75a7M.js} +1 -1
  42. package/web/app/immutable/chunks/{CYvXwOOT.js → BpLC2eO9.js} +1 -1
  43. package/web/app/immutable/chunks/{CnX2YRGO.js → BpQOBsoR.js} +1 -1
  44. package/web/app/immutable/chunks/{8gT6H_CO.js → BqkRycEV.js} +1 -1
  45. package/web/app/immutable/chunks/{BMz5TaBD.js → BrNDzmoP.js} +1 -1
  46. package/web/app/immutable/chunks/{CF8w5xgf.js → BrU4OT9R.js} +2 -2
  47. package/web/app/immutable/chunks/{C5wyg9Ur.js → BsDPTTmM.js} +2 -2
  48. package/web/app/immutable/chunks/{CZk9thVW.js → BtXKsHf_.js} +1 -1
  49. package/web/app/immutable/chunks/{CWwgBxdS.js → BvXEM_ru.js} +1 -1
  50. package/web/app/immutable/chunks/{BRWGzKC6.js → BvpPy--g.js} +1 -1
  51. package/web/app/immutable/chunks/{D5dUymiq.js → Bx3b0rPd.js} +1 -1
  52. package/web/app/immutable/chunks/{BDODw4ZL.js → BytoSt_Z.js} +1 -1
  53. package/web/app/immutable/chunks/{Ct7_3hF5.js → BziNoOeQ.js} +1 -1
  54. package/web/app/immutable/chunks/{CYQFbvSj.js → BznnhLs6.js} +1 -1
  55. package/web/app/immutable/chunks/{63yUQTxQ.js → C-3x67fn.js} +2 -2
  56. package/web/app/immutable/chunks/{z151fvcu.js → C-DRfJcG.js} +1 -1
  57. package/web/app/immutable/chunks/{pLAICJTQ.js → C2NHyJHV.js} +1 -1
  58. package/web/app/immutable/chunks/{DwPsfqrL.js → C2Rkb1O5.js} +1 -1
  59. package/web/app/immutable/chunks/{B-oeTQH-.js → C2uZ_VhE.js} +1 -1
  60. package/web/app/immutable/chunks/{ChmnpYNV.js → C3Z0swGN.js} +1 -1
  61. package/web/app/immutable/chunks/{DBLqMj_T.js → C4Ninryq.js} +1 -1
  62. package/web/app/immutable/chunks/{CNsX148e.js → C76q11mm.js} +1 -1
  63. package/web/app/immutable/chunks/{DMpfVpMZ.js → CAHBBl9S.js} +1 -1
  64. package/web/app/immutable/chunks/{CSDQZlhG.js → CAXcxCRW.js} +6 -6
  65. package/web/app/immutable/chunks/{xNhI4Zxt.js → CB2VdHhb.js} +1 -1
  66. package/web/app/immutable/chunks/{zg8PN6m2.js → CBq9ao8v.js} +1 -1
  67. package/web/app/immutable/chunks/{CqpEVkRe.js → CC401ReW.js} +1 -1
  68. package/web/app/immutable/chunks/{CzOEKH_r.js → CCaHJZV8.js} +1 -1
  69. package/web/app/immutable/chunks/{-URApF1-.js → CCv3Lx_U.js} +1 -1
  70. package/web/app/immutable/chunks/{M1jRBrec.js → CDFewoTI.js} +1 -1
  71. package/web/app/immutable/chunks/{DQu3o1St.js → CFK6lvfY.js} +1 -1
  72. package/web/app/immutable/chunks/{DvnDeUdn.js → CGAWDKVf.js} +1 -1
  73. package/web/app/immutable/chunks/{DGsIbXWb.js → CHVKhAgJ.js} +1 -1
  74. package/web/app/immutable/chunks/{DXZeoq2T.js → CHylN0y-.js} +1 -1
  75. package/web/app/immutable/chunks/{DNj8igH8.js → CIQcnDuR.js} +1 -1
  76. package/web/app/immutable/chunks/{CexBuYHb.js → CIR7skK5.js} +1 -1
  77. package/web/app/immutable/chunks/{_5I1deZ3.js → CIwcmzpw.js} +1 -1
  78. package/web/app/immutable/chunks/{CxFdc661.js → CJ557C-o.js} +1 -1
  79. package/web/app/immutable/chunks/{CybWRFe0.js → CJlP-cGG.js} +3 -3
  80. package/web/app/immutable/chunks/CO2d8RwC.js +1 -0
  81. package/web/app/immutable/chunks/{C2T0Mn6B.js → COjSVIHG.js} +1 -1
  82. package/web/app/immutable/chunks/{GcWD4BSo.js → CQLYGyEz.js} +1 -1
  83. package/web/app/immutable/chunks/CQpQeUin.js +1 -0
  84. package/web/app/immutable/chunks/{Z0Qp96mA.js → CTjSHpOw.js} +4 -4
  85. package/web/app/immutable/chunks/{BTsdpwVW.js → CVEBue1Q.js} +1 -1
  86. package/web/app/immutable/chunks/{C9Fr5_HM.js → CVGmnzrp.js} +1 -1
  87. package/web/app/immutable/chunks/{C4XqbABT.js → CXHfGIt6.js} +1 -1
  88. package/web/app/immutable/chunks/{BEMi0FCw.js → CZt5ZBg4.js} +3 -3
  89. package/web/app/immutable/chunks/{CYfw-I3k.js → C_AhBHEv.js} +1 -1
  90. package/web/app/immutable/chunks/{Ic5q4SFa.js → CckzaWai.js} +1 -1
  91. package/web/app/immutable/chunks/{CPieco54.js → CepAUbyM.js} +1 -1
  92. package/web/app/immutable/chunks/{Dk_IlxNb.js → CfJdaoIE.js} +1 -1
  93. package/web/app/immutable/chunks/{BL4e9OyR.js → CgFIU5ie.js} +1 -1
  94. package/web/app/immutable/chunks/{CUJ1HgBF.js → CgdsufvB.js} +1 -1
  95. package/web/app/immutable/chunks/{BgBdgbWu.js → Ci-yONgL.js} +1 -1
  96. package/web/app/immutable/chunks/{BwFliZxu.js → Ci9pTyYA.js} +1 -1
  97. package/web/app/immutable/chunks/{BsETan6X.js → ClN0hrCD.js} +1 -1
  98. package/web/app/immutable/chunks/{D3PcideX.js → ClQaWwZN.js} +1 -1
  99. package/web/app/immutable/chunks/{q__vWBPL.js → CnZcDXmL.js} +1 -1
  100. package/web/app/immutable/chunks/{BJxhn_0a.js → CrUW7uHI.js} +1 -1
  101. package/web/app/immutable/chunks/{CxvRShoZ.js → CsjdKc-0.js} +1 -1
  102. package/web/app/immutable/chunks/{DuP9adpj.js → Cu8zpbs5.js} +1 -1
  103. package/web/app/immutable/chunks/{D5JOdLmk.js → Cvz-9_40.js} +1 -1
  104. package/web/app/immutable/chunks/{Vyad6kS1.js → Cx2Zr_EY.js} +1 -1
  105. package/web/app/immutable/chunks/{BMBWEmi-.js → D-2cdK33.js} +1 -1
  106. package/web/app/immutable/chunks/{BZ0mSBaB.js → D0TlsaAe.js} +1 -1
  107. package/web/app/immutable/chunks/{BliA9Hfd.js → D2hN829h.js} +1 -1
  108. package/web/app/immutable/chunks/{C46ihBOs.js → D2waAEN7.js} +1 -1
  109. package/web/app/immutable/chunks/{DvfAeO7V.js → D58P1mNO.js} +1 -1
  110. package/web/app/immutable/chunks/{BJXNHiZy.js → D7Ydchf3.js} +1 -1
  111. package/web/app/immutable/chunks/{CqkSkqzY.js → D7rZCWdO.js} +1 -1
  112. package/web/app/immutable/chunks/{BrWJO4Lc.js → D8eBy-8s.js} +1 -1
  113. package/web/app/immutable/chunks/{C4akiVbw.js → DA06uG-a.js} +1 -1
  114. package/web/app/immutable/chunks/{BfrLrIX3.js → DDaNHu84.js} +1 -1
  115. package/web/app/immutable/chunks/{BdOhlpSw.js → DEipLocY.js} +1 -1
  116. package/web/app/immutable/chunks/{Bjspfceu.js → DFkJzID4.js} +3 -3
  117. package/web/app/immutable/chunks/{Dw1iDIV6.js → DFq9n5nW.js} +1 -1
  118. package/web/app/immutable/chunks/{Br3lVV35.js → DGznsmsL.js} +1 -1
  119. package/web/app/immutable/chunks/{BBuyiewR.js → DHTa3FGv.js} +1 -1
  120. package/web/app/immutable/chunks/{CwoE2dGt.js → DIL0XcL6.js} +1 -1
  121. package/web/app/immutable/chunks/{CSk3OXQh.js → DJ0uFT5X.js} +1 -1
  122. package/web/app/immutable/chunks/{BjR5YHwh.js → DJL0zbbT.js} +1 -1
  123. package/web/app/immutable/chunks/{BZ08wfR8.js → DJh_DDe7.js} +1 -1
  124. package/web/app/immutable/chunks/{DqYY3PYO.js → DMXJ8RT1.js} +1 -1
  125. package/web/app/immutable/chunks/{dRMPks7C.js → DM_Dhcp5.js} +2 -2
  126. package/web/app/immutable/chunks/{DhEkDPK5.js → DMte7IXf.js} +1 -1
  127. package/web/app/immutable/chunks/{CKIgOGF8.js → DRp_Nj0f.js} +1 -1
  128. package/web/app/immutable/chunks/{VTQa164t.js → DTVdw8r4.js} +1 -1
  129. package/web/app/immutable/chunks/{CYeRUDy3.js → DW4-9u0G.js} +1 -1
  130. package/web/app/immutable/chunks/{sWKP1DvH.js → DWcJHqWX.js} +1 -1
  131. package/web/app/immutable/chunks/{DnlHbxDQ.js → DXw-WTZY.js} +1 -1
  132. package/web/app/immutable/chunks/{Crfyp8qk.js → DYLHdssA.js} +1 -1
  133. package/web/app/immutable/chunks/{BiIo79dP.js → DZGCpHpr.js} +1 -1
  134. package/web/app/immutable/chunks/{4ePrLS79.js → DZiSQoCc.js} +1 -1
  135. package/web/app/immutable/chunks/{Dx6Dud7p.js → D__c4Yl1.js} +1 -1
  136. package/web/app/immutable/chunks/{B8XoKOTc.js → D_n6c_yZ.js} +1 -1
  137. package/web/app/immutable/chunks/{GVMXI6LG.js → DarHRPPY.js} +2 -2
  138. package/web/app/immutable/chunks/{CFqydF5V.js → DbboHfqH.js} +1 -1
  139. package/web/app/immutable/chunks/{Bvth4uu8.js → DbnF6Yok.js} +1 -1
  140. package/web/app/immutable/chunks/{CYRd4Wob.js → DjI8eVMr.js} +12 -12
  141. package/web/app/immutable/chunks/{DpDOcKeW.js → DnouH0RQ.js} +1 -1
  142. package/web/app/immutable/chunks/{CmeM5LNl.js → Dnv7wJSL.js} +1 -1
  143. package/web/app/immutable/chunks/{81D18GOm.js → DoNhrjWd.js} +1 -1
  144. package/web/app/immutable/chunks/{CD8wRfV_.js → DoWkfKYp.js} +1 -1
  145. package/web/app/immutable/chunks/{pRI0u5wP.js → Dogvf-Iu.js} +1 -1
  146. package/web/app/immutable/chunks/{DUyQvEFA.js → DohG5a1a.js} +1 -1
  147. package/web/app/immutable/chunks/{Bdhsj_WN.js → Dp7jUSi9.js} +1 -1
  148. package/web/app/immutable/chunks/{siSgy-XG.js → DpjBemXH.js} +1 -1
  149. package/web/app/immutable/chunks/{CazW5qgu.js → DrI6m-rY.js} +1 -1
  150. package/web/app/immutable/chunks/{C67p0Y3X.js → DtVlaWMd.js} +1 -1
  151. package/web/app/immutable/chunks/{sFKU0vvN.js → DtbQslHZ.js} +1 -1
  152. package/web/app/immutable/chunks/{C3Xc_2xb.js → DtxfuyBv.js} +1 -1
  153. package/web/app/immutable/chunks/{Hl0DaIFP.js → Dv_vjHi2.js} +1 -1
  154. package/web/app/immutable/chunks/{BS9z_sED.js → DvnMaoHD.js} +1 -1
  155. package/web/app/immutable/chunks/{BRo8Jwzb.js → DwXYzqBQ.js} +1 -1
  156. package/web/app/immutable/chunks/{Fayi6fDf.js → DwZUZouP.js} +1 -1
  157. package/web/app/immutable/chunks/{DHsuwk8b.js → DxMdBYgz.js} +1 -1
  158. package/web/app/immutable/chunks/{LQFzKktm.js → DySlMfKo.js} +1 -1
  159. package/web/app/immutable/chunks/{JSSdZCUo.js → Dyc_CyAW.js} +1 -1
  160. package/web/app/immutable/chunks/{LAcj3jvD.js → DyhEd_D5.js} +1 -1
  161. package/web/app/immutable/chunks/{B80iSE3f.js → G8V-Z8rX.js} +2 -2
  162. package/web/app/immutable/chunks/{BskB9UNu.js → HZ3QrylZ.js} +1 -1
  163. package/web/app/immutable/chunks/{CyCvtyeJ.js → I0uVE7V8.js} +1 -1
  164. package/web/app/immutable/chunks/{gBkFTP07.js → JIxwOKX_.js} +1 -1
  165. package/web/app/immutable/chunks/{Bk6ULIr9.js → L-Y-TBRM.js} +1 -1
  166. package/web/app/immutable/chunks/{Cod4qxf4.js → N8Bwwvnf.js} +1 -1
  167. package/web/app/immutable/chunks/{BRNgor4E.js → OrocR3hK.js} +1 -1
  168. package/web/app/immutable/chunks/{DhlyaG2v.js → Ptn6pOdb.js} +1 -1
  169. package/web/app/immutable/chunks/{Dg21CW4e.js → TvbL6LZd.js} +3 -3
  170. package/web/app/immutable/chunks/{DA5GLz-D.js → U7UFkZSE.js} +1 -1
  171. package/web/app/immutable/chunks/{f6gZvWhT.js → WQOeAOAl.js} +1 -1
  172. package/web/app/immutable/chunks/{BD9MpLU1.js → X4cuG_zB.js} +1 -1
  173. package/web/app/immutable/chunks/{DgYHiNv7.js → ZN-mesLP.js} +1 -1
  174. package/web/app/immutable/chunks/{DEf-ATI9.js → _0BFM6IU.js} +2 -2
  175. package/web/app/immutable/chunks/{CErdor9S.js → _wUGU0fc.js} +1 -1
  176. package/web/app/immutable/chunks/{C5GvLykS.js → atiG7mlf.js} +2 -2
  177. package/web/app/immutable/chunks/{By2uKcE_.js → iAu7Aj29.js} +1 -1
  178. package/web/app/immutable/chunks/{CgnMS_tY.js → iGTwwZkZ.js} +1 -1
  179. package/web/app/immutable/chunks/{B6A8YmZh.js → juKvR8YJ.js} +4 -4
  180. package/web/app/immutable/chunks/{5qyUocK6.js → kIGC16c9.js} +1 -1
  181. package/web/app/immutable/chunks/{hhahcGBL.js → kae1oT68.js} +1 -1
  182. package/web/app/immutable/chunks/{DUXZKTsK.js → m1QfmWoj.js} +1 -1
  183. package/web/app/immutable/chunks/{H8igaySd.js → p3CrvZe2.js} +1 -1
  184. package/web/app/immutable/chunks/qiTOR0DK.js +1 -0
  185. package/web/app/immutable/chunks/{DIQWLIhG.js → r9qRR0z6.js} +3 -3
  186. package/web/app/immutable/chunks/{B38qvkXa.js → rPOaqvb6.js} +1 -1
  187. package/web/app/immutable/chunks/{Ppur1c4V.js → uXJ_E75I.js} +1 -1
  188. package/web/app/immutable/chunks/{C-uaKVah.js → v2YVbizz.js} +1 -1
  189. package/web/app/immutable/chunks/{CxWKLIob.js → v2vpkl1z.js} +1 -1
  190. package/web/app/immutable/chunks/{DkhG0i-L.js → wJj3WeBH.js} +2 -2
  191. package/web/app/immutable/chunks/{EdYYrHoK.js → wiuyjoXz.js} +1 -1
  192. package/web/app/immutable/chunks/{Cu8J3bUy.js → z5uPT3dt.js} +1 -1
  193. package/web/app/immutable/entry/{app.DPzYfy9f.js → app.F35RZd_b.js} +2 -2
  194. package/web/app/immutable/entry/start.Dg01C9a0.js +1 -0
  195. package/web/app/immutable/nodes/{0.rdVcLlxy.js → 0.maNxDgKk.js} +1 -1
  196. package/web/app/immutable/nodes/{1.D48meEsB.js → 1.CrUOCJzJ.js} +1 -1
  197. package/web/app/immutable/nodes/{10.B3ZRYajM.js → 10.DAHzIxDn.js} +1 -1
  198. package/web/app/immutable/nodes/{12.DzTIsFlM.js → 12.Deg0J99J.js} +1 -1
  199. package/web/app/immutable/nodes/{13.CDLrSMY9.js → 13.DYahTbd4.js} +1 -1
  200. package/web/app/immutable/nodes/{14.BcCE_OT8.js → 14.DqcYIHGs.js} +1 -1
  201. package/web/app/immutable/nodes/{15.DmQSp6jq.js → 15.fBsD-rf2.js} +1 -1
  202. package/web/app/immutable/nodes/{16.CqFxq-hK.js → 16.BB4D0sXM.js} +1 -1
  203. package/web/app/immutable/nodes/{17.soEHLC3D.js → 17.C504DyaY.js} +2 -2
  204. package/web/app/immutable/nodes/{2.CYuQd2Tl.js → 2.ByX1NsE4.js} +4 -4
  205. package/web/app/immutable/nodes/{3.DgEmNH7y.js → 3.C7nQO7Qp.js} +1 -1
  206. package/web/app/immutable/nodes/{4.BQfTclCW.js → 4.DOK8Tw7p.js} +1 -1
  207. package/web/app/immutable/nodes/{5.IhiCVL5n.js → 5.ubLsJnyC.js} +1 -1
  208. package/web/app/immutable/nodes/{6.BtfFchWI.js → 6.CyCRzMDW.js} +1 -1
  209. package/web/app/immutable/nodes/{7.Df183ffx.js → 7.Bg70Q16x.js} +1 -1
  210. package/web/app/immutable/nodes/{8.RdAbCE7l.js → 8.BvaAzEQm.js} +4 -4
  211. package/web/app/immutable/nodes/{9.vsrHUmwE.js → 9.DO468RMT.js} +5 -5
  212. package/web/app/version.json +1 -1
  213. package/web/index.html +15 -15
  214. package/web/app/immutable/chunks/BZcL1stl.js +0 -1
  215. package/web/app/immutable/chunks/CdMatdvB.js +0 -1
  216. package/web/app/immutable/chunks/D1SzfPxa.js +0 -1
  217. package/web/app/immutable/chunks/DnvcHW1X.js +0 -1
  218. package/web/app/immutable/entry/start.C55sm0qN.js +0 -1
@@ -1 +1 @@
1
- import{aB as v,b as y}from"./Z0Qp96mA.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){const e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=a.x-s.x,d=a.y-s.y,u=r*d-o*i;if(u===0)return null;const n=s.x-t.x,c=s.y-t.y,p=(n*d-c*i)/u,f=(n*o-c*r)/u;return p<=R||p>=1-R||f<=R||f>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:f}}y(T,"segmentIntersection");function P(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(P,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;const a=t.points,r=a[e],o=a[e+1];if(!r||!o)return!1;const i=Math.hypot(o.x-r.x,o.y-r.y),d=s*i,u=e>0?L(a[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;const n=e+2<a.length?L(r,o,a[e+2],w):null;return n!==null&&i-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){const e=[];for(let s=0;s<t.length;s++){const a=t[s],r=N(a.points);for(let o=s+1;o<t.length;o++){const i=t[o],d=N(i.points);for(const[u,n]of r.entries())for(const[c,p]of d.entries()){const f=T(n.a,n.b,p.a,p.b);if(!f||B(a,u,f.tA)||B(i,c,f.tB))continue;const g=P(n),S=P(p);(g!==S?g:!1)?e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:u,t:f.tA,point:f.point}):e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:c,t:f.tB,point:f.point})}}}return e}y(C,"findEdgeIntersections");function M(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){const e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));const s=t.map(o=>({...o})),a=e.arrowTypeStart&&v[e.arrowTypeStart];if(a){const o=t[0],i=t[1],d=Math.atan2(i.y-o.y,i.x-o.x);s[0].x=o.x+a*Math.cos(d),s[0].y=o.y+a*Math.sin(d)}const r=e.arrowTypeEnd&&v[e.arrowTypeEnd];if(r){const o=t.length,i=t[o-2],d=t[o-1],u=Math.atan2(d.y-i.y,d.x-i.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,a,r){const o=t.point.x,i=t.point.y,d={x:o-e*t.r,y:i-s*t.r},u={x:o+e*t.r,y:i+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(i,d);if(u<O||n<O)return null;const c=r/u,p=o/u,f=i/n,g=d/n,S=c*f+p*g,b=Math.max(-1,Math.min(1,S)),m=Math.acos(b);if(m<O||Math.abs(Math.PI-m)<O)return null;const h=Math.min(a/Math.sin(m/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+f*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){const a=t.points;if(a.length<2)return"";const r=_(a,t),o=t.curve==="rounded",i=N(r),d=new Map;for(const n of e){const c=i[n.segIndex];if(!c)continue;const p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=d.get(n.segIndex)??[];f.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,f)}const u=[`M${A(r[0])}`];for(let n=0;n<i.length;n++){const c=i[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c);let b=0;if(o&&n>0){const l=L(r[n-1],r[n],r[n+1]??r[n],w);l&&(b=l.cutLen)}let m=p,h=null;o&&n<i.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(m=p-h.cutLen));const $=s.jumpRadius*Y,x=[...d.get(n)??[]].sort((l,E)=>l.t-E.t).filter(l=>{const E=Math.min(l.d-b,m-l.d)-X;return l.r=Math.min(l.r,E),l.r>=$});for(let l=0;l<x.length-1;l++){const E=x[l+1].d-x[l].d;if(x[l].r+x[l+1].r>E){const I=E/2;x[l].r=Math.min(x[l].r,I),x[l+1].r=Math.min(x[l+1].r,I)}}for(const l of x)l.r<$||u.push(...k(l,f,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;const a=[];for(const r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&a.push({x:r.x,y:r.y});return a.length>=2?a:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;const a=t.node();if(!a)return;const r=new Map;for(const n of e)r.set(n.id,n);const o=new Map;for(const n of a.querySelectorAll("path[data-id]")){const c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}const i=[];for(const n of e){const c=o.get(n.id);if(!c)continue;const f=j(c.getAttribute("data-points"))??n.points;i.push({...n,points:f})}const d=C(i);if(d.length===0)return;const u=new Map;for(const n of d){const c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(const n of i){const c=u.get(n.id);if(!c||c.length===0)continue;const f=r.get(n.id)?.curve;if(f!==void 0&&!U(f))continue;const g=o.get(n.id);if(!g)continue;if(f===void 0){const x=g.getAttribute("d")??"";if(!J(x))continue}const S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),m=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),m!==null&&h!==null&&typeof g.getTotalLength=="function"){const x=g.getTotalLength(),l=Math.max(0,x-m-h),E=`0 ${m} ${l} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
1
+ import{aB as v,b as y}from"./CTjSHpOw.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){const e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=a.x-s.x,d=a.y-s.y,u=r*d-o*i;if(u===0)return null;const n=s.x-t.x,c=s.y-t.y,p=(n*d-c*i)/u,f=(n*o-c*r)/u;return p<=R||p>=1-R||f<=R||f>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:f}}y(T,"segmentIntersection");function P(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(P,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;const a=t.points,r=a[e],o=a[e+1];if(!r||!o)return!1;const i=Math.hypot(o.x-r.x,o.y-r.y),d=s*i,u=e>0?L(a[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;const n=e+2<a.length?L(r,o,a[e+2],w):null;return n!==null&&i-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){const e=[];for(let s=0;s<t.length;s++){const a=t[s],r=N(a.points);for(let o=s+1;o<t.length;o++){const i=t[o],d=N(i.points);for(const[u,n]of r.entries())for(const[c,p]of d.entries()){const f=T(n.a,n.b,p.a,p.b);if(!f||B(a,u,f.tA)||B(i,c,f.tB))continue;const g=P(n),S=P(p);(g!==S?g:!1)?e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:u,t:f.tA,point:f.point}):e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:c,t:f.tB,point:f.point})}}}return e}y(C,"findEdgeIntersections");function M(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){const e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));const s=t.map(o=>({...o})),a=e.arrowTypeStart&&v[e.arrowTypeStart];if(a){const o=t[0],i=t[1],d=Math.atan2(i.y-o.y,i.x-o.x);s[0].x=o.x+a*Math.cos(d),s[0].y=o.y+a*Math.sin(d)}const r=e.arrowTypeEnd&&v[e.arrowTypeEnd];if(r){const o=t.length,i=t[o-2],d=t[o-1],u=Math.atan2(d.y-i.y,d.x-i.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,a,r){const o=t.point.x,i=t.point.y,d={x:o-e*t.r,y:i-s*t.r},u={x:o+e*t.r,y:i+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(i,d);if(u<O||n<O)return null;const c=r/u,p=o/u,f=i/n,g=d/n,S=c*f+p*g,b=Math.max(-1,Math.min(1,S)),m=Math.acos(b);if(m<O||Math.abs(Math.PI-m)<O)return null;const h=Math.min(a/Math.sin(m/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+f*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){const a=t.points;if(a.length<2)return"";const r=_(a,t),o=t.curve==="rounded",i=N(r),d=new Map;for(const n of e){const c=i[n.segIndex];if(!c)continue;const p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=d.get(n.segIndex)??[];f.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,f)}const u=[`M${A(r[0])}`];for(let n=0;n<i.length;n++){const c=i[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c);let b=0;if(o&&n>0){const l=L(r[n-1],r[n],r[n+1]??r[n],w);l&&(b=l.cutLen)}let m=p,h=null;o&&n<i.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(m=p-h.cutLen));const $=s.jumpRadius*Y,x=[...d.get(n)??[]].sort((l,E)=>l.t-E.t).filter(l=>{const E=Math.min(l.d-b,m-l.d)-X;return l.r=Math.min(l.r,E),l.r>=$});for(let l=0;l<x.length-1;l++){const E=x[l+1].d-x[l].d;if(x[l].r+x[l+1].r>E){const I=E/2;x[l].r=Math.min(x[l].r,I),x[l+1].r=Math.min(x[l+1].r,I)}}for(const l of x)l.r<$||u.push(...k(l,f,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;const a=[];for(const r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&a.push({x:r.x,y:r.y});return a.length>=2?a:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;const a=t.node();if(!a)return;const r=new Map;for(const n of e)r.set(n.id,n);const o=new Map;for(const n of a.querySelectorAll("path[data-id]")){const c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}const i=[];for(const n of e){const c=o.get(n.id);if(!c)continue;const f=j(c.getAttribute("data-points"))??n.points;i.push({...n,points:f})}const d=C(i);if(d.length===0)return;const u=new Map;for(const n of d){const c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(const n of i){const c=u.get(n.id);if(!c||c.length===0)continue;const f=r.get(n.id)?.curve;if(f!==void 0&&!U(f))continue;const g=o.get(n.id);if(!g)continue;if(f===void 0){const x=g.getAttribute("d")??"";if(!J(x))continue}const S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),m=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),m!==null&&h!==null&&typeof g.getTotalLength=="function"){const x=g.getTotalLength(),l=Math.max(0,x-m-h),E=`0 ${m} ${l} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
@@ -1,4 +1,4 @@
1
- import{I as le}from"./DA5GLz-D.js";import{p as he}from"./BdOhlpSw.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./Z0Qp96mA.js";import{p as Ee}from"./DkvJR80T.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
1
+ import{I as le}from"./U7UFkZSE.js";import{p as he}from"./DEipLocY.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./CTjSHpOw.js";import{p as Ee}from"./DkvJR80T.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
2
2
  ${s-i/2-L/2},${x+R}
3
3
  ${s-i/2-L/2},${x-R}
4
4
  ${t.posWithOffset-i/2-L},${x-c-R}
@@ -1 +1 @@
1
- import{d as s}from"./CxFdc661.js";import{a as t}from"./BdWqymET.js";import{cG as i}from"./8gT6H_CO.js";import{Ix as a}from"./q__vWBPL.js";import{setLinkActionMenuLinkedWorkspaces as n}from"./Ddqq3yIK.js";const c=new t("LinkActionMenuLinkedWorkspaces");async function u(r,e){if(i.select(a.state)?.capabilities.prWorkspaceLookup===1)try{const o=await s.workspaces.findByPullRequest(e);n(r,o)}catch(o){c.debug("PR workspace lookup failed",{url:e,error:o})}}export{u as loadLinkActionMenuLinkedWorkspaces};
1
+ import{d as s}from"./CJ557C-o.js";import{a as t}from"./BdWqymET.js";import{cG as i}from"./BqkRycEV.js";import{Ix as a}from"./CnZcDXmL.js";import{setLinkActionMenuLinkedWorkspaces as n}from"./Ddqq3yIK.js";const c=new t("LinkActionMenuLinkedWorkspaces");async function u(r,e){if(i.select(a.state)?.capabilities.prWorkspaceLookup===1)try{const o=await s.workspaces.findByPullRequest(e);n(r,o)}catch(o){c.debug("PR workspace lookup failed",{url:e,error:o})}}export{u as loadLinkActionMenuLinkedWorkspaces};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BcZ9Z8VA.js","/app/immutable/chunks/CGWRZzdk.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/q__vWBPL.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/hX9Crt6i.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BEyWfhqM.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/BZcL1stl.js","/app/immutable/chunks/CxFdc661.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BbjJy79n.js","/app/immutable/chunks/B70m4__L.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/nmrokYzj.js","/app/immutable/chunks/B10JrSzM.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DguKeriw.js","/app/immutable/chunks/B4wCLW9D.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CNsX148e.js","/app/immutable/chunks/dRMPks7C.js","/app/immutable/chunks/_5I1deZ3.js","/app/immutable/chunks/BOTuR8YM.js","/app/immutable/chunks/BliA9Hfd.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Dlo7xxGg.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/8gT6H_CO.js","/app/immutable/chunks/CKIgOGF8.js","/app/immutable/chunks/CnX2YRGO.js","/app/immutable/chunks/pLAICJTQ.js","/app/immutable/chunks/CgnMS_tY.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/EdYYrHoK.js","/app/immutable/chunks/CSDQZlhG.js"])))=>i.map(i=>d[i]);
2
- import{_ as i}from"./CGWRZzdk.js";import{c as m}from"./ChTqQfQN.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}let _=0;function f(){_+=1}function E(){return _}const h=m("Navigation"),w="settings-previous-path";function r(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function l(t,a={}){if(d()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){h.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=a.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||f(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:e}=await import("./BcZ9Z8VA.js");return{showAssistantContent:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url);if(await n(t,{preserveFocus:!0,background:a.assistantContent===!0,agentId:a.assistantAgentId})){if(a.assistantContent)return;const{openPanel:e}=await i(async()=>{const{openPanel:o}=await import("./q__vWBPL.js").then(s=>s.I5);return{openPanel:o}},__vite__mapDeps([3,4,2,5,6,7,8,1,9,10,11]),import.meta.url),{store:g}=await i(async()=>{const{store:o}=await import("./CgnMS_tY.js");return{store:o}},__vite__mapDeps([39,3,4,2,5,6,7,8,1,9,10,11,40,41]),import.meta.url);g.dispatch(e("chief"));const{goto:p}=await i(async()=>{const{goto:o}=await import("./CSDQZlhG.js").then(s=>s.n);return{goto:o}},__vite__mapDeps([42,2]),import.meta.url);window.location.pathname!=="/"&&await p("/");return}}if(r(t)&&typeof window<"u"&&typeof sessionStorage<"u"&&!r(window.location.pathname)){const n=new URL(window.location.href);sessionStorage.setItem(w,n.pathname+n.search+n.hash)}const{goto:u}=await i(async()=>{const{goto:n}=await import("./CSDQZlhG.js").then(e=>e.n);return{goto:n}},__vite__mapDeps([42,2]),import.meta.url);return a.state?u(t,{state:a.state}):u(t)}const I=Object.freeze(Object.defineProperty({__proto__:null,SETTINGS_PREV_PATH_KEY:w,isHudWindowRenderer:d,isSettingsRoute:r,navigateToRoute:l},Symbol.toStringTag,{value:"Module"}));export{w as S,r as a,f as b,E as c,I as d,d as i,l as n};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B5tMdivj.js","/app/immutable/chunks/CGWRZzdk.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/CnZcDXmL.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/hX9Crt6i.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BEyWfhqM.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bhmm0Csf.js","/app/immutable/chunks/CJ557C-o.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/B422XfSt.js","/app/immutable/chunks/B70m4__L.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/nmrokYzj.js","/app/immutable/chunks/B10JrSzM.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BoX75a7M.js","/app/immutable/chunks/0sFbw5Xt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/C76q11mm.js","/app/immutable/chunks/DM_Dhcp5.js","/app/immutable/chunks/CIwcmzpw.js","/app/immutable/chunks/BOTuR8YM.js","/app/immutable/chunks/D2hN829h.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Dlo7xxGg.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/BqkRycEV.js","/app/immutable/chunks/DRp_Nj0f.js","/app/immutable/chunks/BpQOBsoR.js","/app/immutable/chunks/C2NHyJHV.js","/app/immutable/chunks/iGTwwZkZ.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/wiuyjoXz.js","/app/immutable/chunks/CAXcxCRW.js"])))=>i.map(i=>d[i]);
2
+ import{_ as i}from"./CGWRZzdk.js";import{c as m}from"./ChTqQfQN.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}let _=0;function f(){_+=1}function E(){return _}const h=m("Navigation"),w="settings-previous-path";function r(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function l(t,a={}){if(d()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){h.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=a.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||f(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:e}=await import("./B5tMdivj.js");return{showAssistantContent:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url);if(await n(t,{preserveFocus:!0,background:a.assistantContent===!0,agentId:a.assistantAgentId})){if(a.assistantContent)return;const{openPanel:e}=await i(async()=>{const{openPanel:o}=await import("./CnZcDXmL.js").then(s=>s.I5);return{openPanel:o}},__vite__mapDeps([3,4,2,5,6,7,8,1,9,10,11]),import.meta.url),{store:g}=await i(async()=>{const{store:o}=await import("./iGTwwZkZ.js");return{store:o}},__vite__mapDeps([39,3,4,2,5,6,7,8,1,9,10,11,40,41]),import.meta.url);g.dispatch(e("chief"));const{goto:p}=await i(async()=>{const{goto:o}=await import("./CAXcxCRW.js").then(s=>s.n);return{goto:o}},__vite__mapDeps([42,2]),import.meta.url);window.location.pathname!=="/"&&await p("/");return}}if(r(t)&&typeof window<"u"&&typeof sessionStorage<"u"&&!r(window.location.pathname)){const n=new URL(window.location.href);sessionStorage.setItem(w,n.pathname+n.search+n.hash)}const{goto:u}=await i(async()=>{const{goto:n}=await import("./CAXcxCRW.js").then(e=>e.n);return{goto:n}},__vite__mapDeps([42,2]),import.meta.url);return a.state?u(t,{state:a.state}):u(t)}const I=Object.freeze(Object.defineProperty({__proto__:null,SETTINGS_PREV_PATH_KEY:w,isHudWindowRenderer:d,isSettingsRoute:r,navigateToRoute:l},Symbol.toStringTag,{value:"Module"}));export{w as S,r as a,f as b,E as c,I as d,d as i,l as n};
@@ -1 +1 @@
1
- import{t as g,br as n,bu as v,bz as b,bs as h,b as x}from"./CGWRZzdk.js";import{bs as S,a7 as w,ay as y,aD as _,W as k,bn as z,aA as i,c9 as C}from"./DYhIMPy1.js";import{c as A}from"./nmrokYzj.js";import{l as I,r as M}from"./B70m4__L.js";import{S as P}from"./B9YprfEW.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});S(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),p=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},c=w(),d=y(c);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>p,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,c),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
1
+ import{t as g,br as n,bu as v,bz as b,bs as h,b as x}from"./CGWRZzdk.js";import{bs as S,a7 as w,ay as y,aD as _,W as k,bn as z,aA as i,c9 as C}from"./DYhIMPy1.js";import{c as A}from"./nmrokYzj.js";import{l as I,r as M}from"./B70m4__L.js";import{S as P}from"./BHekbKzn.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});S(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),p=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},c=w(),d=y(c);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>p,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,c),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
@@ -1,3 +1,3 @@
1
- import{fE as H,Ix as o,nx as U,l$ as F,lS as G,sX as K}from"./q__vWBPL.js";import{g as q,G as j,dS as V,cG as N,dr as w,dC as E,dN as M,cB as $,aB as Y}from"./8gT6H_CO.js";import{l as X,R as z,E as J}from"./CnX2YRGO.js";function Q(e){return!e.retiredAt&&!e.pendingDeleteAt&&e.status!=="deleted"}function k(e){const t=new Date(e.lastActivity??e.updatedAt??e.createdAt).getTime()||0,s=e.messages.at(-1)?.timestamp,r=s&&new Date(s).getTime()||0;return Math.max(t,r)}function we(e){const t=e.filter(Q).map(s=>({agent:s,activity:k(s),created:new Date(s.createdAt).getTime()||0})).sort((s,r)=>r.activity-s.activity||r.created-s.created||String(s.agent.id).localeCompare(String(r.agent.id)));return t.find(({agent:s})=>H(s)==="topLevel")?.agent??t[0]?.agent??null}const p="__chief__",L="New chat";function Z(e){const t=e?.trim();return!t||t===L||t==="New chat with Assistant"||t==="New chat with Intent"||t==="Chief of Staff"||t.startsWith("New thread ")}function ee(e){const t=e.name?.trim();if(e.nameExplicitlySet&&t)return t;const r=e.messages.find(l=>l.role==="user")??e.messages[0],c=r?q(r).trim():"";return!t||Z(t)?c||L:c||t}const te="chief-of-staff",se=6,T="## Assistant Runtime Identity\n\nYou are Intent's built-in Assistant. Operate at the app level with `ws.app.*` tools: manage workspaces, settings, specialists, navigation, and cross-workspace agents. You are not a repository coding agent. Treat generic coding-agent, workspace, spec, task, and delegation instructions as subordinate to this role.\n\nWhen the user requests repository work, create or open the appropriate workspace and hand the work to the appropriate specialist. Once you have enough repository or PR information, act through the app-level proposal flow instead of merely promising to verify, prepare, or hand off the work.\n\nShow workspaces, notes, files, agent conversations and repository links beside your conversation when they help the user. Share ordinary Markdown links to notes (intent://local/note/<noteId> or intent://local/<workspaceId>/note/<noteId>) workspace links (intent://local/workspace/<workspaceId>), workspace file and agent links, and HTTPS repository URLs; clicking opens a closable content panel while keeping chat visible. To show content automatically, call `ws.app.ui.navigate` with the same link or /workspace/<workspaceId>. Calling `ws.app.workspaces.open` also shows that workspace beside chat unless the user requests a new window. Each conversation has its own panel history. Workspaces show the same detail and agent chat as Home’s Workspaces tab. Earlier content remains available in that conversation’s panel header picker. Creating a note alone does not open it: explicitly navigate when you want to show it.\n\nWhen the user asks to transfer a project between devices, find the source workspace with `ws.app.workspaces.list` and call `ws.app.workspaces.transfer(id, { destination })`. Pass the user's destination name as the hint, or omit it so they can choose a saved device in the inline card. The source is the device serving this assistant conversation. The tool only proposes the transfer: wait for approval or cancellation in the card, and report completion only after the proposal is applied.";function be(e){const t=e?.trim();return t?`${T}
1
+ import{fE as H,Ix as o,nx as U,l$ as F,lS as G,sX as K}from"./CnZcDXmL.js";import{g as q,G as j,dS as V,cG as N,dr as w,dC as E,dN as M,cB as $,aB as Y}from"./BqkRycEV.js";import{l as X,R as z,E as J}from"./BpQOBsoR.js";function Q(e){return!e.retiredAt&&!e.pendingDeleteAt&&e.status!=="deleted"}function k(e){const t=new Date(e.lastActivity??e.updatedAt??e.createdAt).getTime()||0,s=e.messages.at(-1)?.timestamp,r=s&&new Date(s).getTime()||0;return Math.max(t,r)}function we(e){const t=e.filter(Q).map(s=>({agent:s,activity:k(s),created:new Date(s.createdAt).getTime()||0})).sort((s,r)=>r.activity-s.activity||r.created-s.created||String(s.agent.id).localeCompare(String(r.agent.id)));return t.find(({agent:s})=>H(s)==="topLevel")?.agent??t[0]?.agent??null}const p="__chief__",L="New chat";function Z(e){const t=e?.trim();return!t||t===L||t==="New chat with Assistant"||t==="New chat with Intent"||t==="Chief of Staff"||t.startsWith("New thread ")}function ee(e){const t=e.name?.trim();if(e.nameExplicitlySet&&t)return t;const r=e.messages.find(l=>l.role==="user")??e.messages[0],c=r?q(r).trim():"";return!t||Z(t)?c||L:c||t}const te="chief-of-staff",se=6,T="## Assistant Runtime Identity\n\nYou are Intent's built-in Assistant. Operate at the app level with `ws.app.*` tools: manage workspaces, settings, specialists, navigation, and cross-workspace agents. You are not a repository coding agent. Treat generic coding-agent, workspace, spec, task, and delegation instructions as subordinate to this role.\n\nWhen the user requests repository work, create or open the appropriate workspace and hand the work to the appropriate specialist. Once you have enough repository or PR information, act through the app-level proposal flow instead of merely promising to verify, prepare, or hand off the work.\n\nShow workspaces, notes, files, agent conversations and repository links beside your conversation when they help the user. Share ordinary Markdown links to notes (intent://local/note/<noteId> or intent://local/<workspaceId>/note/<noteId>) workspace links (intent://local/workspace/<workspaceId>), workspace file and agent links, and HTTPS repository URLs; clicking opens a closable content panel while keeping chat visible. To show content automatically, call `ws.app.ui.navigate` with the same link or /workspace/<workspaceId>. Calling `ws.app.workspaces.open` also shows that workspace beside chat unless the user requests a new window. Each conversation has its own panel history. Workspaces show the same detail and agent chat as Home’s Workspaces tab. Earlier content remains available in that conversation’s panel header picker. Creating a note alone does not open it: explicitly navigate when you want to show it.\n\nWhen the user asks to transfer a project between devices, find the source workspace with `ws.app.workspaces.list` and call `ws.app.workspaces.transfer(id, { destination })`. Pass the user's destination name as the hint, or omit it so they can choose a saved device in the inline card. The source is the device serving this assistant conversation. The tool only proposes the transfer: wait for approval or cancellation in the card, and report completion only after the proposal is applied.";function be(e){const t=e?.trim();return t?`${T}
2
2
 
3
3
  ${t}`:T}const re=o.createSelector((e,t)=>{const s=e.backgroundHooks?.byWorkspaceId?.[t];return s?U(s.hooks):[]}),oe=o.createSelector((e,t)=>e.backgroundHooks?.byWorkspaceId?.[t]?.snapshotStatus??"loading"),O=o.createSelector((e,t)=>e.scriptMonitor?.byWorkspaceId[t]??F),Ae=o.createSelector((e,t,s)=>{const r=O.select(e,t);return r.status==="unsupported"?[]:r.monitors.filter(c=>c.agentId===s)}),u=o.createSelector((e,t,s)=>{const r=K(t,s);return e.agentSubscriptionUI.entries[r]??G}),ne=o.createSelector((e,t,s)=>u.select(e,t,s).subscriptions),ae=o.createSelector((e,t,s)=>u.select(e,t,s).eventSubscriptions??[]),ce=o.createSelector((e,t,s)=>u.select(e,t,s).delegationGroups),ve=o.createSelector((e,t,s)=>u.select(e,t,s).agentStatuses),ye=o.createSelector((e,t,s)=>u.select(e,t,s).waitingState),Ce=o.createSelector((e,t,s)=>u.select(e,t,s).wokenUpInfo);function ie(e){return[...new Set(e.filter(Boolean))]}const We=o.createSelector((e,t,s)=>{const r=u.select(e,t,s),c=[],l=new Set,i=n=>{for(const a of ie(n))l.has(a)||(l.add(a),c.push(a))},h=[...r.subscriptions].sort((n,a)=>n.createdAt.localeCompare(a.createdAt)||n.id.localeCompare(a.id));for(const n of h)n.delegationGroup?.awaitMode!=="all"&&i(n.actorIds);const g=new Map;for(const n of r.delegationGroups)n.awaitMode==="all"&&g.set(n.groupId,n);for(const n of g.values())i(n.expectedAgentIds);for(const n of h){const a=n.delegationGroup;a?.awaitMode==="all"&&!g.has(a.groupId)&&i(a.expectedAgentIds)}const d=new Set;for(const n of r.delegationGroups){for(const a of n.completedAgentIds)d.add(a);for(const a of n.deletedAgentIds)d.add(a);for(const[a,f]of Object.entries(n.agentStatuses))f==="completed"&&d.add(a)}for(const[n,a]of Object.entries(r.agentStatuses))a==="completed"&&d.add(n);const A=e.agentSessions?.byAgentId??{},v=new Set([...d].filter(n=>{const a=A[n];return!a||!j(V(a))})),y=new Map(c.map((n,a)=>[n,a])),C=n=>{const a=A[n];if(!a)return 2;if(a.attentionRequestKind==="blocker")return 0;if(a.attentionRequestKind==="discussion")return 1;if(v.has(n))return 4;const f=String(a.status).toLowerCase();return f==="responding"||f==="active"||f==="processing"?2:3},W=c.filter(n=>!v.has(n)).sort((n,a)=>C(n)-C(a)||(y.get(n)??0)-(y.get(a)??0));return{visible:r.snapshotStatus==="failed"||r.waitingState==="completed"||c.length>0||r.wokenUpInfo!==null,count:W.length,participantAgentIds:W}}),Te=o.createSelector((e,t,s)=>u.select(e,t,s).snapshotStatus),Ne=o.createSelector((e,t)=>{const s=`${t}:`,r=[];for(const c of Object.keys(e.agentSubscriptionUI.entries))c.startsWith(s)&&r.push(c.slice(s.length));return r});o.createSelector((e,t,s)=>{const r=ce.select(e,t,s);let c=0,l=0;for(const i of r)c+=i.expectedAgentIds.length,l+=i.completedAgentIds.length+i.deletedAgentIds.length;return{total:c,completed:l}});const Ee=o.createSelector(e=>{const t=X.select(e);if(!t||!z.select(e))return[];const s=new Set;for(const r of J.select(e,t)){const c=r.panes.find(l=>l.id===r.activePaneId);c?.type==="agent"&&c.agentId&&s.add(c.agentId)}return[...s].map(r=>({wsId:t,agentId:r}))}),P="pinned",le=64;function I(e){return e.trim().toLocaleLowerCase()}function R(e){return e===P}function Me(e,t){const s=e.trim();if(s.length===0)return{ok:!1,error:"empty"};if([...s].length>le)return{ok:!1,error:"tooLong"};const r=I(s);return r===P?{ok:!1,error:"reserved"}:t.some(c=>I(c)===r)?{ok:!1,error:"duplicate"}:{ok:!0,label:s}}function de(e){const t=new Map;for(const s of e){if(typeof s!="string"||R(s))continue;const r=s.trim();if(r.length===0)continue;const c=I(r);t.has(c)||t.set(c,s)}return[...t.values()].sort((s,r)=>s.localeCompare(r,void 0,{sensitivity:"base"}))}function _(e){const s=e.workspaceAgents?.byWorkspaceId?.[p]?.agentIds,r=s&&s.length>0?new Set(s.map(i=>String(i))):null,c=e.agentSessions?.agentIdsByWorkspace?.[p]??[],l=c.length>0?c.map(i=>e.agentSessions?.byAgentId?.[i]).filter(i=>!!i):Object.values(e.agentSessions?.byAgentId??{}).filter(i=>i.workspaceId===p);return r?l.filter(i=>r.has(String(i.id))):l}function D(e){return e.metadata?.specialist===te&&e.metadata?.chiefPromptVersion===se}function x(e){return Math.max(e.messages.length,e.messageCount??0)}function S(e){return{agentId:e.id,title:ee(e),isActive:e.isStreaming===!0||e.isProcessing===!0||e.isResponding===!0,messageCount:x(e),pinned:e.pinned===!0,retired:!!e.retiredAt}}function b(e){return _(e).filter(t=>!t.retiredAt)}function m(e,t){return k(t)-k(e)}const Le=o.createSelector(e=>e.sidebarNav.panelItem),Oe=o.createSelector(e=>e.sidebarNav.onboardingActive),Pe=o.createSelector(e=>e.sidebarNav.showCreateModal),Re=o.createSelector(e=>e.sidebarNav.createModalUsesHomeRepository),_e=o.createSelector(e=>e.sidebarNav.createModalPrefillRequest),B=o.createSelector(e=>N.select(e)?.capabilities.workspaceLabels===1),De=o.createSelector((e,t)=>w.select(e,t)?.label??null),xe=o.createSelector(e=>de(E.select(e).map(t=>t.label))),pe=["id","label"],Be=o.createSelector((e,t)=>B.select(e)&&M.select(e,t,pe)!==null),ue=o.createSelector(e=>N.select(e)?.capabilities.workspaceAutoArchiveOptOut===1),ge=o.createSelector(e=>(e.sidebarNav.autoArchiveIdleAfterDays??0)>0),He=o.createSelector((e,t)=>w.select(e,t)?.autoArchiveDisabled===!0),fe=["id","autoArchiveDisabled"],Ue=o.createSelector((e,t)=>{if(!ue.select(e)||!ge.select(e))return!1;const s=w.select(e,t);return!s||s.isRemote===!0||s.environmentConfig?.type==="remote"?!1:M.select(e,t,fe)!==null}),Fe=o.createSelector(e=>e.sidebarNav.pinnedWorkspaceIds),Ge=o.createSelector(e=>B.select(e)?E.select(e).filter(t=>R(t.label)).map(t=>t.id):e.sidebarNav.pinnedWorkspaceIds),Ke=o.createSelector((e,t)=>e.sidebarNav.multiSelectSelectedTabIdsByWorkspaceId[t]??["overview"]),qe=o.createSelector((e,t)=>e.sidebarNav.noteOrderByWorkspaceId[t]??[]),je=o.createSelector((e,t)=>e.sidebarNav.collapsedNoteIdsByWorkspaceId[t]??[]),Ve=o.createSelector((e,t)=>e.sidebarNav.expandedNoteIdsByWorkspaceId?.[t]??[]),$e=o.createSelector(e=>e.sidebarNav.chiefActiveAgentId),Ye=o.createSelector((e,t)=>{const s=e.agentSessions.byAgentId[t];if(s?.workspaceId!==p)return{hooks:0,monitors:0,subscriptions:0};const r=oe.select(e,p)==="ready"?re.select(e,p).filter(d=>d.agentId===t&&(d.state==="scheduled"||d.state==="running")).length:s.waitingOnHooks?.length??0,c=$.select(e,p)==="ready"?Y.select(e,p,t).filter(d=>d.state==="active").length:s.waitingOnPrMonitors?.length??0,l=O.select(e,p),i=l.status==="unsupported"?0:l.status==="ready"?l.monitors.filter(d=>d.agentId===t&&d.state==="active").length:s.waitingOnScriptMonitors?.length??0,h=s.isWaitingForOtherAgents===!1?0:s.waitingForAgentIds?.length??(ne.select(e,p,t).length||(s.isWaitingForOtherAgents?1:0)),g=ae.select(e,p,t).filter(d=>d.subscriberAgentId===t).length;return{hooks:r,monitors:c+i,subscriptions:h+g}}),Xe=o.createSelector(e=>e.sidebarNav.statsOverlayOpen),he=o.createSelector(e=>b(e).sort((t,s)=>+(s.pinned===!0)-+(t.pinned===!0)||m(t,s)).map(S)),Se=o.createSelector(e=>_(e).filter(t=>!!t.retiredAt).sort(m).map(S)),ze=o.createSelector(e=>[...he.select(e),...Se.select(e)]),Je=o.createSelector(e=>{const t=b(e).filter(D).sort(m)[0];return t?S(t):null}),Qe=o.createSelector(e=>{const t=b(e).filter(s=>x(s)===0&&!s.lastMessageId&&D(s)).sort(m)[0];return t?S(t):null});export{Oe as A,Le as B,se as C,L as D,Ge as E,Se as F,Qe as G,O as H,Pe as I,Xe as J,Te as K,Ne as L,ye as M,Ce as N,He as O,P,je as Q,Ve as R,De as S,xe as T,qe as U,Me as V,le as W,te as a,p as b,be as c,Q as d,We as e,ve as f,ne as g,ze as h,R as i,Ye as j,re as k,oe as l,Ue as m,Be as n,$e as o,he as p,_e as q,we as r,Ae as s,Re as t,Je as u,ce as v,Ee as w,B as x,Fe as y,Ke as z};
@@ -1 +1 @@
1
- import{bp as n}from"./CGWRZzdk.js";import{Ix as t}from"./q__vWBPL.js";let c=1,i=null;const a=[],s=new Set;function l(){for(const e of s)e(i)}function h(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function u(e){a.push({...e,id:c++,returnFocus:h()}),i||(i=a.shift()??null,l())}function _(e){return new Promise(r=>u({kind:"confirm",options:e,resolve:r}))}function p(e){return new Promise(r=>u({kind:"prompt",options:e,resolve:r}))}function S(e){return s.add(e),e(i),()=>s.delete(e)}function f(e,r){if(!i||i.id!==e)return;const o=i;i=a.shift()??null,o.resolve(r),o.returnFocus?.focus(),l()}const m={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},g=[{value:"assigned",get label(){return n.linearAuth_filter_assigned_label()},get description(){return n.linearAuth_filter_assigned_description()}},{value:"created",get label(){return n.linearAuth_filter_created_label()},get description(){return n.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return n.linearAuth_filter_subscribed_label()},get description(){return n.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return n.linearAuth_filter_team_label()},get description(){return n.linearAuth_filter_team_description()}},{value:"all",get label(){return n.linearAuth_filter_all_label()},get description(){return n.linearAuth_filter_all_description()}}],I=t.createSelector(e=>e.linearAuth.operation),E=t.createSelector((e,r)=>e.linearAuth.operation?.consumerId===r?e.linearAuth.operation:null),b=t.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),T=t.createSelector(e=>e.linearAuth.isAuthenticated),y=t.createSelector(e=>e.linearAuth.requiresDaemonAuth),C=t.createSelector(e=>e.linearAuth.isAuthenticating),L=t.createSelector(e=>e.linearAuth.error),N=t.createSelector(e=>e.sentryAuth.operation),U=t.createSelector((e,r)=>e.sentryAuth.operation?.consumerId===r?e.sentryAuth.operation:null),v=t.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),O=t.createSelector(e=>e.sentryAuth.isAuthenticated),H=t.createSelector(e=>e.sentryAuth.organization),R=t.createSelector(e=>e.sentryAuth.isConnecting),q=t.createSelector(e=>e.sentryAuth.error),D="npx not found — install Node.js (with npm) to use Claude Code";export{D as C,m as L,g as a,I as b,_ as c,L as d,T as e,C as f,b as g,y as h,U as i,N as j,q as k,O as l,R as m,v as n,H as o,p,f as q,S as r,E as s};
1
+ import{bp as n}from"./CGWRZzdk.js";import{Ix as t}from"./CnZcDXmL.js";let c=1,i=null;const a=[],s=new Set;function l(){for(const e of s)e(i)}function h(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function u(e){a.push({...e,id:c++,returnFocus:h()}),i||(i=a.shift()??null,l())}function _(e){return new Promise(r=>u({kind:"confirm",options:e,resolve:r}))}function p(e){return new Promise(r=>u({kind:"prompt",options:e,resolve:r}))}function S(e){return s.add(e),e(i),()=>s.delete(e)}function f(e,r){if(!i||i.id!==e)return;const o=i;i=a.shift()??null,o.resolve(r),o.returnFocus?.focus(),l()}const m={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},g=[{value:"assigned",get label(){return n.linearAuth_filter_assigned_label()},get description(){return n.linearAuth_filter_assigned_description()}},{value:"created",get label(){return n.linearAuth_filter_created_label()},get description(){return n.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return n.linearAuth_filter_subscribed_label()},get description(){return n.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return n.linearAuth_filter_team_label()},get description(){return n.linearAuth_filter_team_description()}},{value:"all",get label(){return n.linearAuth_filter_all_label()},get description(){return n.linearAuth_filter_all_description()}}],I=t.createSelector(e=>e.linearAuth.operation),E=t.createSelector((e,r)=>e.linearAuth.operation?.consumerId===r?e.linearAuth.operation:null),b=t.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),T=t.createSelector(e=>e.linearAuth.isAuthenticated),y=t.createSelector(e=>e.linearAuth.requiresDaemonAuth),C=t.createSelector(e=>e.linearAuth.isAuthenticating),L=t.createSelector(e=>e.linearAuth.error),N=t.createSelector(e=>e.sentryAuth.operation),U=t.createSelector((e,r)=>e.sentryAuth.operation?.consumerId===r?e.sentryAuth.operation:null),v=t.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),O=t.createSelector(e=>e.sentryAuth.isAuthenticated),H=t.createSelector(e=>e.sentryAuth.organization),R=t.createSelector(e=>e.sentryAuth.isConnecting),q=t.createSelector(e=>e.sentryAuth.error),D="npx not found — install Node.js (with npm) to use Claude Code";export{D as C,m as L,g as a,I as b,_ as c,L as d,T as e,C as f,b as g,y as h,U as i,N as j,q as k,O as l,R as m,v as n,H as o,p,f as q,S as r,E as s};
@@ -1 +1 @@
1
- var qr=Object.defineProperty;var Yt=d=>{throw TypeError(d)};var zr=(d,e,t)=>e in d?qr(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var H=(d,e,t)=>zr(d,typeof e!="symbol"?e+"":e,t),xt=(d,e,t)=>e.has(d)||Yt("Cannot "+t);var h=(d,e,t)=>(xt(d,e,"read from private field"),t?t.call(d):e.get(d)),M=(d,e,t)=>e.has(d)?Yt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(d):e.set(d,t),Ie=(d,e,t,r)=>(xt(d,e,"write to private field"),r?r.call(d,t):e.set(d,t),t),Pe=(d,e,t)=>(xt(d,e,"access private method"),t);import{t as te,br as a,a_ as X,bz as re,b as ne,bs as be,bu as _e,bp as jt}from"./CGWRZzdk.js";import{c9 as x,aD as n,bs as oe,a7 as q,ay as K,W as S,bn as se,aA as l,aB as $,bH as k,bV as Y,bi as Gr,ca as ve,cb as Yr,bf as ae,bo as ke,a5 as Z,bA as Q,bS as ct,bI as jr,aG as Et,c5 as Jr,bl as sr,b_ as At,bO as Xr,br as Zr,bk as Qr,c0 as Ct}from"./DYhIMPy1.js";import{s as j}from"./BEyWfhqM.js";import{c as pe}from"./nmrokYzj.js";import{e as $r,s as en,g as tn,i as rn,f as nn,b as on}from"./B8XoKOTc.js";import{i as ee,n as sn,l as xe,v as ir,u as ar,g as Jt,j as an}from"./B70m4__L.js";import{bI as ln,bn as de,aI as dn,b4 as un,h as Tt,av as Ce,D as yt,i as hn,d as le,a as fe,l as pt,ad as _t,ak as ft,a2 as Mt,K as Ht,a1 as Rt,E as Lt,bo as lr,bB as dr,aZ as ur,aB as hr,aE as Vt,b1 as Dt,aF as cr,bM as me,bi as cn,bu as gn,b3 as pn,b2 as fn,aH as Xt,au as gr,a6 as vn,aJ as U,aS as mn,m as pr,b as bn,c as yn,a8 as wn,C as xn,g as _n,A as Cn,M as Nn,F as In,r as Pn,s as Sn,t as kn,u as On,v as En,w as An,x as Tn,y as Mn,o as Hn,p as Rn,q as Ln,B as Vn,z as Dn,aT as ue,bp as J,a4 as fr,a3 as vr,bw as Fn,H as Kn,f as Bn,a5 as Wn}from"./BbjJy79n.js";import{F as mr,as as Un,bV as qn,au as zn,aq as Gn}from"./Dlo7xxGg.js";import{b as Yn}from"./BaIAhI85.js";import{P as jn,u as Jn,b as Zt,a as Xn}from"./BL4e9OyR.js";import{c as Zn,u as Qn,s as $n}from"./DfxQWSVU.js";import"./w-1KkHyd.js";import{s as eo,a as to}from"./BsieX9dN.js";const br={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};ln(br);var Ae,mt;class ro{constructor(e,t){M(this,Ae,()=>{});M(this,mt,x(()=>h(this,Ae).call(this)));let r;t!==void 0&&(r=t),Ie(this,Ae,()=>{try{return r}finally{r=e()}})}get current(){return n(h(this,mt))}}Ae=new WeakMap,mt=new WeakMap;var no=new Set(["$$slots","$$events","$$legacy","value"]),Qt=$("<input/>");function yr(d,e){if(new.target)return te({component:yr,...d});oe(e,!0);let t=a(e,"value",15),r=be(e,no);const s=x(()=>de(r,{"aria-hidden":"true",tabindex:-1,style:{...br,position:"absolute",top:"0",left:"0"}}));var o={get value(){return t()},set value(u){t(u),l()},$set:re,$on:(u,p)=>ne(e,u,p)},i=q(),v=K(i);{var _=u=>{var p=Qt();ee(p,()=>({...n(s),value:t()}),void 0,void 0,void 0,void 0,!0),S(u,p)},m=u=>{var p=Qt();ee(p,()=>({...n(s)}),void 0,void 0,void 0,void 0,!0),$r(p,t),S(u,p)};X(v,u=>{n(s).type==="checkbox"?u(_):u(m,-1)})}return S(d,i),se(o)}var ce,ye,ge;class oo{constructor(e){M(this,ce);M(this,ye,x(()=>h(this,ce).candidateValues()));M(this,ge);Ie(this,ce,e),Ie(this,ge,dn("",{afterMs:1e3,getWindow:h(this,ce).getWindow})),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!h(this,ce).enabled()||!n(h(this,ye)).length)return;h(this,ge).current=h(this,ge).current+e;const t=h(this,ce).getCurrentItem(),r=n(h(this,ye)).find(v=>v===t)??"",s=n(h(this,ye)).map(v=>v??""),o=un(s,h(this,ge).current,r),i=n(h(this,ye)).find(v=>v===o);return i&&h(this,ce).onMatch(i),i}resetTypeahead(){h(this,ge).current=""}}ce=new WeakMap,ye=new WeakMap,ge=new WeakMap;const $t=[bn,pr,yn,wn,xn,_n,Cn,Nn,pt,In,Pn,Sn,kn,On,En,An,Tn,Mn,Hn,Rn,Ln],so=[fe,Mt,Ht],io=[le,Rt,Lt],wr=[...so,...io],ao=mn({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),Ne=new Tt("Select.Root | Combobox.Root"),xr=new Tt("Select.Group | Combobox.Group"),_r=new Tt("Select.Content | Combobox.Content");var Te,Me,He,Re,Le,Ve,De,Fe,Ke,Be,We,Ue;class Cr{constructor(e){H(this,"opts");M(this,Te,Y(!1));M(this,Me,Y(null));M(this,He,Y(null));H(this,"contentPresence");M(this,Re,Y(null));M(this,Le,Y(null));M(this,Ve,Y(null));M(this,De,Y(""));M(this,Fe,Y(null));M(this,Ke,x(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));M(this,Be,x(()=>{if(this.highlightedNode)return this.highlightedNode.id}));M(this,We,x(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));M(this,Ue,Y(!1));H(this,"isUsingKeyboard",!1);H(this,"isCombobox",!1);H(this,"domContext",new yt(()=>null));H(this,"getBitsAttr",e=>ao.getAttr(e,this.isCombobox?"combobox":void 0));this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new vn({ref:U(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Yr(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return n(h(this,Te))}set touchedInput(e){k(h(this,Te),e,!0)}get inputNode(){return n(h(this,Me))}set inputNode(e){k(h(this,Me),e,!0)}get contentNode(){return n(h(this,He))}set contentNode(e){k(h(this,He),e,!0)}get viewportNode(){return n(h(this,Re))}set viewportNode(e){k(h(this,Re),e,!0)}get triggerNode(){return n(h(this,Le))}set triggerNode(e){k(h(this,Le),e,!0)}get valueNode(){return n(h(this,Ve))}set valueNode(e){k(h(this,Ve),e,!0)}get valueId(){return n(h(this,De))}set valueId(e){k(h(this,De),e,!0)}get highlightedNode(){return n(h(this,Fe))}set highlightedNode(e){k(h(this,Fe),e,!0)}get highlightedValue(){return n(h(this,Ke))}set highlightedValue(e){k(h(this,Ke),e)}get highlightedId(){return n(h(this,Be))}set highlightedId(e){k(h(this,Be),e)}get highlightedLabel(){return n(h(this,We))}set highlightedLabel(e){k(h(this,We),e)}get contentIsPositioned(){return n(h(this,Ue))}set contentIsPositioned(e){k(h(this,Ue),e,!0)}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&this.scrollHighlightedNodeIntoView(e)}scrollHighlightedNodeIntoView(e){!this.viewportNode||!this.contentIsPositioned||e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();t=t.filter(s=>{if(!this.viewportNode)return!1;const o=s.getBoundingClientRect();return o.right<=r.right&&o.left>=r.left&&o.bottom<=r.bottom&&o.top>=r.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(r=>r.dataset.value===e)??null}getLabelForValue(e){if(e==="")return"";const t=this.opts.items.current.find(s=>s.value===e)?.label;if(t!==void 0)return t;const r=this.getNodeByValue(e);if(r){const s=r.getAttribute("data-label");return s!==null&&s!==""?s:r.textContent?.trim()??e}return e}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}Te=new WeakMap,Me=new WeakMap,He=new WeakMap,Re=new WeakMap,Le=new WeakMap,Ve=new WeakMap,De=new WeakMap,Fe=new WeakMap,Ke=new WeakMap,Be=new WeakMap,We=new WeakMap,Ue=new WeakMap;var qe,ze,Ge,Ye;class lo extends Cr{constructor(t){super(t);H(this,"opts");H(this,"isMulti",!1);M(this,qe,x(()=>this.opts.value.current!==""));M(this,ze,x(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":""));M(this,Ge,x(()=>this.opts.items.current.length?this.opts.items.current.filter(r=>!r.disabled).map(r=>r.label):[]));M(this,Ye,x(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=t,ve(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),me(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return n(h(this,qe))}set hasValue(t){k(h(this,qe),t)}get currentLabel(){return n(h(this,ze))}set currentLabel(t){k(h(this,ze),t)}get candidateLabels(){return n(h(this,Ge))}set candidateLabels(t){k(h(this,Ge),t)}get dataTypeaheadEnabled(){return n(h(this,Ye))}set dataTypeaheadEnabled(t){k(h(this,Ye),t)}includesItem(t){return this.opts.value.current===t}toggleItem(t,r=t){const s=this.includesItem(t)?"":t;this.opts.value.current=s,s!==""&&(this.opts.inputValue.current=r)}setInitialHighlightedNode(){gr(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}qe=new WeakMap,ze=new WeakMap,Ge=new WeakMap,Ye=new WeakMap;var je;class uo extends Cr{constructor(t){super(t);H(this,"opts");H(this,"isMulti",!0);M(this,je,x(()=>this.opts.value.current.length>0));this.opts=t,ve(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),me(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return n(h(this,je))}set hasValue(t){k(h(this,je),t)}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,r=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(s=>s!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=r}setInitialHighlightedNode(){gr(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}je=new WeakMap;class ho{static create(e){const{type:t,...r}=e,s=t==="single"?new lo(r):new uo(r);return Ne.set(s)}}var Je;const Ft=class Ft{constructor(e,t){H(this,"opts");H(this,"root");H(this,"attachment");M(this,Je,x(()=>({id:this.opts.id.current,role:"combobox",disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":"list","aria-expanded":cr(this.root.opts.open.current),"data-state":Dt(this.root.opts.open.current),"data-disabled":Vt(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr("input")]:"",...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref,r=>this.root.inputNode=r),this.root.domContext=new yt(e.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),me([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([r,s],[o])=>{s&&(Array.isArray(r)&&Array.isArray(o)?r.length===0&&o.length!==0&&(this.root.opts.inputValue.current=""):r===""&&o!==""&&(this.root.opts.inputValue.current=""))})}static create(e){return new Ft(e,Ne.get())}onkeydown(e){if(this.root.isUsingKeyboard=!0,e.key!==pr){if((e.key===le||e.key===fe)&&e.preventDefault(),!this.root.opts.open.current){if($t.includes(e.key)||e.key===ft||e.key===Vn&&this.root.opts.inputValue.current===""||(this.root.handleOpen(),this.root.hasValue))return;const t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===fe){const r=t[0];this.root.setHighlightedNode(r)}else if(e.key===le){const r=t[t.length-1];this.root.setHighlightedNode(r)}return}if(e.key===ft){this.root.handleClose();return}if(e.key===pt&&!e.isComposing){e.preventDefault();const t=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t&&this.root.handleClose()}if(e.key===le&&e.altKey&&this.root.handleClose(),wr.includes(e.key)){e.preventDefault();const t=this.root.getCandidateNodes(),r=this.root.highlightedNode,s=r?t.indexOf(r):-1,o=this.root.opts.loop.current;let i;if(e.key===fe?i=lr(t,s,o):e.key===le?i=dr(t,s,o):e.key===Rt?i=ur(t,s,10,o):e.key===Mt?i=hr(t,s,10,o):e.key===Ht?i=t[0]:e.key===Lt&&(i=t[t.length-1]),!i)return;this.root.setHighlightedNode(i);return}$t.includes(e.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(e){this.root.opts.inputValue.current=e.currentTarget.value,this.root.setHighlightedToFirstCandidate()}get props(){return n(h(this,Je))}set props(e){k(h(this,Je),e)}};Je=new WeakMap;let er=Ft;var we,Se,he,Nr,It,Pt,Xe;const Kt=class Kt{constructor(e,t){M(this,he);H(this,"opts");H(this,"root");H(this,"attachment");M(this,we);M(this,Se);M(this,Xe,x(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":cr(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Dt(this.root.opts.open.current),"data-disabled":Vt(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref,r=>this.root.triggerNode=r),this.root.domContext=new yt(e.ref),Ie(this,we,new hn({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()})),Ie(this,Se,new oo({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(o=>o.label===r);s&&(this.root.opts.value.current=s.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}static create(e){return new Kt(e,Ne.get())}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===le||e.key===fe)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===pt||e.key===_t||e.key===fe||e.key===le)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){h(this,Se).handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const i=this.root.getCandidateNodes();if(!i.length)return;if(e.key===fe){const v=i[0];this.root.setHighlightedNode(v)}else if(e.key===le){const v=i[i.length-1];this.root.setHighlightedNode(v)}return}if(e.key===ft){this.root.handleClose();return}if((e.key===pt||e.key===_t&&h(this,we).search==="")&&!e.isComposing&&(e.preventDefault(),Pe(this,he,Pt).call(this)))return;if(e.key===le&&e.altKey&&this.root.handleClose(),wr.includes(e.key)){e.preventDefault();const i=this.root.getCandidateNodes(),v=this.root.highlightedNode,_=v?i.indexOf(v):-1,m=this.root.opts.loop.current;let u;if(e.key===fe?u=lr(i,_,m):e.key===le?u=dr(i,_,m):e.key===Rt?u=ur(i,_,10,m):e.key===Mt?u=hr(i,_,10,m):e.key===Ht?u=i[0]:e.key===Lt&&(u=i[i.length-1]),!u)return;this.root.setHighlightedNode(u);return}const t=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1,s=e.key===_t,o=this.root.getCandidateNodes();if(e.key!==ft){if(!t&&(r||s)){!h(this,we).handleTypeaheadSearch(e.key,o)&&s&&(e.preventDefault(),Pe(this,he,Pt).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?Pe(this,he,It).call(this,e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?Pe(this,he,It).call(this,e):this.root.handleClose()))}get props(){return n(h(this,Xe))}set props(e){k(h(this,Xe),e)}};we=new WeakMap,Se=new WeakMap,he=new WeakSet,Nr=function(){this.root.opts.open.current=!0,h(this,Se).resetTypeahead(),h(this,we).resetTypeahead()},It=function(e){Pe(this,he,Nr).call(this)},Pt=function(){const e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e?(this.root.handleClose(),!0):!1)},Xe=new WeakMap;let Nt=Kt;var Ze,bt,Qe,$e;const Bt=class Bt{constructor(e,t){H(this,"opts");H(this,"root");H(this,"attachment");M(this,Ze,Y(!1));H(this,"domContext");M(this,bt,x(()=>pn(this.root.isCombobox?"combobox":"select")));H(this,"onInteractOutside",e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()});H(this,"onEscapeKeydown",e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()});H(this,"onOpenAutoFocus",e=>{e.preventDefault()});H(this,"onCloseAutoFocus",e=>{e.preventDefault()});M(this,Qe,x(()=>({open:this.root.opts.open.current})));M(this,$e,x(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Dt(this.root.opts.open.current),...fn(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...n(h(this,bt))},onpointermove:this.onpointermove,...this.attachment})));H(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}});this.opts=e,this.root=t,this.attachment=Ce(e.ref,r=>this.root.contentNode=r),this.domContext=new yt(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),gn(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),me(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),me([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}static create(e){return _r.set(new Bt(e,Ne.get()))}get isPositioned(){return n(h(this,Ze))}set isPositioned(e){k(h(this,Ze),e,!0)}onpointermove(e){this.root.isUsingKeyboard=!1}get shouldRender(){return this.root.contentPresence.shouldRender}get snippetProps(){return n(h(this,Qe))}set snippetProps(e){k(h(this,Qe),e)}get props(){return n(h(this,$e))}set props(e){k(h(this,$e),e)}};Ze=new WeakMap,bt=new WeakMap,Qe=new WeakMap,$e=new WeakMap;let vt=Bt;var et,tt,rt,nt,ot;const Wt=class Wt{constructor(e,t){H(this,"opts");H(this,"root");H(this,"attachment");M(this,et,x(()=>this.root.includesItem(this.opts.value.current)));M(this,tt,x(()=>this.root.highlightedValue===this.opts.value.current));H(this,"prevHighlighted",new ro(()=>this.isHighlighted));M(this,rt,Y(!1));M(this,nt,x(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));M(this,ot,x(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Vt(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref),me([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),me(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(e){return new Wt(e,Ne.get())}get isSelected(){return n(h(this,et))}set isSelected(e){k(h(this,et),e)}get isHighlighted(){return n(h(this,tt))}set isHighlighted(e){k(h(this,tt),e)}get mounted(){return n(h(this,rt))}set mounted(e){k(h(this,rt),e,!0)}handleSelect(){if(this.opts.disabled.current)return;const e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}get snippetProps(){return n(h(this,nt))}set snippetProps(e){k(h(this,nt),e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!cn){Gr(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return n(h(this,ot))}set props(e){k(h(this,ot),e)}};et=new WeakMap,tt=new WeakMap,rt=new WeakMap,nt=new WeakMap,ot=new WeakMap;let St=Wt;var st,it;const Ut=class Ut{constructor(e,t){H(this,"opts");H(this,"root");M(this,st,Y(null));H(this,"attachment");M(this,it,x(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("group")]:"","aria-labelledby":this.labelNode?.id??void 0,...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref)}static create(e){return xr.set(new Ut(e,Ne.get()))}get labelNode(){return n(h(this,st))}set labelNode(e){k(h(this,st),e,!0)}get props(){return n(h(this,it))}set props(e){k(h(this,it),e)}};st=new WeakMap,it=new WeakMap;let tr=Ut;var at;const qt=class qt{constructor(e,t){H(this,"opts");H(this,"group");H(this,"attachment");M(this,at,x(()=>({id:this.opts.id.current,[this.group.root.getBitsAttr("group-label")]:"",...this.attachment})));this.opts=e,this.group=t,this.attachment=Ce(e.ref,r=>this.group.labelNode=r)}static create(e){return new qt(e,xr.get())}get props(){return n(h(this,at))}set props(e){k(h(this,at),e)}};at=new WeakMap;let rr=qt;var lt,dt;const zt=class zt{constructor(e,t){H(this,"opts");H(this,"root");M(this,lt,x(()=>this.root.opts.name.current!==""));M(this,dt,x(()=>({disabled:Xt(this.root.opts.disabled.current),required:Xt(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}static create(e){return new zt(e,Ne.get())}get shouldRender(){return n(h(this,lt))}set shouldRender(e){k(h(this,lt),e)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}get props(){return n(h(this,dt))}set props(e){k(h(this,dt),e)}};lt=new WeakMap,dt=new WeakMap;let kt=zt;var ut,ht;const Gt=class Gt{constructor(e,t){H(this,"opts");H(this,"content");H(this,"root");H(this,"attachment");M(this,ut,Y(0));M(this,ht,x(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment})));this.opts=e,this.content=t,this.root=t.root,this.attachment=Ce(e.ref,r=>{this.root.viewportNode=r})}static create(e){return new Gt(e,_r.get())}get prevScrollTop(){return n(h(this,ut))}set prevScrollTop(e){k(h(this,ut),e,!0)}get props(){return n(h(this,ht))}set props(e){k(h(this,ht),e)}};ut=new WeakMap,ht=new WeakMap;let Ot=Gt;function gt(d,e){if(new.target)return te({component:gt,...d});oe(e,!0);let t=a(e,"value",15),r=a(e,"autocomplete",7);const s=kt.create({value:U(()=>t())});var o={get value(){return t()},set value(m){t(m),l()},get autocomplete(){return r()},set autocomplete(m){r(m),l()},$set:re,$on:(m,u)=>ne(e,m,u)},i=q(),v=K(i);{var _=m=>{yr(m,_e(()=>s.props,{get autocomplete(){return r()},get value(){return t()},set value(u){t(u)}}))};X(v,m=>{s.shouldRender&&m(_)})}return S(d,i),se(o)}function Ir(d,e){if(new.target)return te({component:Ir,...d});oe(e,!0);let t=a(e,"id",7),r=a(e,"children",7),s=a(e,"virtualEl",7),o=a(e,"ref",7),i=a(e,"tooltip",7,!1);Dn.create({id:U(()=>t()),virtualEl:U(()=>s()),ref:o()},i());var v={get id(){return t()},set id(u){t(u),l()},get children(){return r()},set children(u){r(u),l()},get virtualEl(){return s()},set virtualEl(u){s(u),l()},get ref(){return o()},set ref(u){o(u),l()},get tooltip(){return i()},set tooltip(u=!1){i(u),l()},$set:re,$on:(u,p)=>ne(e,u,p)},_=q(),m=K(_);return j(m,()=>r()??ae),S(d,_),se(v)}var co=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),nr=$("<div><div><!></div></div>");function Pr(d,e){const t=ke();if(new.target)return te({component:Pr,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"forceMount",7,!1),i=a(e,"side",7,"bottom"),v=a(e,"onInteractOutside",7,J),_=a(e,"onEscapeKeydown",7,J),m=a(e,"children",7),u=a(e,"child",7),p=a(e,"preventScroll",7,!1),T=a(e,"style",7),O=be(e,co);const C=vt.create({id:U(()=>r()),ref:U(()=>s(),c=>s(c)),onInteractOutside:U(()=>v()),onEscapeKeydown:U(()=>_())}),N=x(()=>de(O,C.props));var b={get id(){return r()},set id(c=ue(t)){r(c),l()},get ref(){return s()},set ref(c=null){s(c),l()},get forceMount(){return o()},set forceMount(c=!1){o(c),l()},get side(){return i()},set side(c="bottom"){i(c),l()},get onInteractOutside(){return v()},set onInteractOutside(c=J){v(c),l()},get onEscapeKeydown(){return _()},set onEscapeKeydown(c=J){_(c),l()},get children(){return m()},set children(c){m(c),l()},get child(){return u()},set child(c){u(c),l()},get preventScroll(){return p()},set preventScroll(c=!1){p(c),l()},get style(){return T()},set style(c){T(c),l()},$set:re,$on:(c,L)=>ne(e,c,L)},R=q(),D=K(R);{var G=c=>{fr(c,_e(()=>n(N),()=>C.popperProps,{get ref(){return C.opts.ref},get side(){return i()},get enabled(){return C.root.opts.open.current},get id(){return r()},get preventScroll(){return p()},forceMount:!0,get shouldRender(){return C.shouldRender},popper:(I,y)=>{let A=()=>(y?.()).props,B=()=>(y?.()).wrapperProps;const f=x(()=>de(A(),{style:C.props.style},{style:T()}));var V=q(),W=K(V);{var F=P=>{var E=q(),z=K(E);{let ie=x(()=>({props:n(f),wrapperProps:B(),...C.snippetProps}));j(z,u,()=>n(ie))}S(P,E)},w=P=>{var E=nr();ee(E,()=>({...B()}));var z=Z(E);ee(z,()=>({...n(f)}));var ie=Z(z);j(ie,()=>m()??ae),Q(z),Q(E),S(P,E)};X(W,P=>{u()?P(F):P(w,-1)})}S(I,V)},$$slots:{popper:!0}}))},g=c=>{vr(c,_e(()=>n(N),()=>C.popperProps,{get ref(){return C.opts.ref},get side(){return i()},get open(){return C.root.opts.open.current},get id(){return r()},get preventScroll(){return p()},forceMount:!1,get shouldRender(){return C.shouldRender},popper:(I,y)=>{let A=()=>(y?.()).props,B=()=>(y?.()).wrapperProps;const f=x(()=>de(A(),{style:C.props.style},{style:T()}));var V=q(),W=K(V);{var F=P=>{var E=q(),z=K(E);{let ie=x(()=>({props:n(f),wrapperProps:B(),...C.snippetProps}));j(z,u,()=>n(ie))}S(P,E)},w=P=>{var E=nr();ee(E,()=>({...B()}));var z=Z(E);ee(z,()=>({...n(f)}));var ie=Z(z);j(ie,()=>m()??ae),Q(z),Q(E),S(P,E)};X(W,P=>{u()?P(F):P(w,-1)})}S(I,V)},$$slots:{popper:!0}}))};X(D,c=>{o()?c(G):o()||c(g,1)})}return S(d,R),se(b)}var go=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),or=$("<div><!></div>");function Sr(d,e){const t=ke();if(new.target)return te({component:Sr,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"forceMount",7,!1),i=a(e,"onInteractOutside",7,J),v=a(e,"onEscapeKeydown",7,J),_=a(e,"children",7),m=a(e,"child",7),u=a(e,"preventScroll",7,!1),p=a(e,"style",7),T=be(e,go);const O=vt.create({id:U(()=>r()),ref:U(()=>s(),g=>s(g)),onInteractOutside:U(()=>i()),onEscapeKeydown:U(()=>v())}),C=x(()=>de(T,O.props));var N={get id(){return r()},set id(g=ue(t)){r(g),l()},get ref(){return s()},set ref(g=null){s(g),l()},get forceMount(){return o()},set forceMount(g=!1){o(g),l()},get onInteractOutside(){return i()},set onInteractOutside(g=J){i(g),l()},get onEscapeKeydown(){return v()},set onEscapeKeydown(g=J){v(g),l()},get children(){return _()},set children(g){_(g),l()},get child(){return m()},set child(g){m(g),l()},get preventScroll(){return u()},set preventScroll(g=!1){u(g),l()},get style(){return p()},set style(g){p(g),l()},$set:re,$on:(g,c)=>ne(e,g,c)},b=q(),R=K(b);{var D=g=>{fr(g,_e(()=>n(C),()=>O.popperProps,{get ref(){return O.opts.ref},isStatic:!0,get enabled(){return O.root.opts.open.current},get id(){return r()},get preventScroll(){return u()},forceMount:!0,get shouldRender(){return O.shouldRender},popper:(L,I)=>{let y=()=>(I?.()).props;const A=x(()=>de(y(),{style:O.props.style},{style:p()}));var B=q(),f=K(B);{var V=F=>{var w=q(),P=K(w);{let E=x(()=>({props:n(A),...O.snippetProps}));j(P,m,()=>n(E))}S(F,w)},W=F=>{var w=or();ee(w,()=>({...n(A)}));var P=Z(w);j(P,()=>_()??ae),Q(w),S(F,w)};X(f,F=>{m()?F(V):F(W,-1)})}S(L,B)},$$slots:{popper:!0}}))},G=g=>{vr(g,_e(()=>n(C),()=>O.popperProps,{get ref(){return O.opts.ref},isStatic:!0,get open(){return O.root.opts.open.current},get id(){return r()},get preventScroll(){return u()},forceMount:!1,get shouldRender(){return O.shouldRender},popper:(L,I)=>{let y=()=>(I?.()).props;const A=x(()=>de(y(),{style:O.props.style},{style:p()}));var B=q(),f=K(B);{var V=F=>{var w=q(),P=K(w);{let E=x(()=>({props:n(A),...O.snippetProps}));j(P,m,()=>n(E))}S(F,w)},W=F=>{var w=or();ee(w,()=>({...n(A)}));var P=Z(w);j(P,()=>_()??ae),Q(w),S(F,w)};X(f,F=>{m()?F(V):F(W,-1)})}S(L,B)},$$slots:{popper:!0}}))};X(R,g=>{o()?g(D):o()||g(G,1)})}return S(d,b),se(N)}function kr(d,e){if(new.target)return te({component:kr,...d});oe(e,!0);let t=a(e,"mounted",15,!1),r=a(e,"onMountedChange",7,J);Fn(()=>(t(!0),r()(!0),()=>{t(!1),r()(!1)}));var s={get mounted(){return t()},set mounted(o=!1){t(o),l()},get onMountedChange(){return r()},set onMountedChange(o=J){r(o),l()},$set:re,$on:(o,i)=>ne(e,o,i)};return se(s)}var po=new Set(["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]),fo=$("<div><!></div>"),vo=$("<!> <!>",1);function Or(d,e){const t=ke();if(new.target)return te({component:Or,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"value",7),i=a(e,"label",23,o),v=a(e,"disabled",7,!1),_=a(e,"children",7),m=a(e,"child",7),u=a(e,"onHighlight",7,J),p=a(e,"onUnhighlight",7,J),T=be(e,po);const O=St.create({id:U(()=>r()),ref:U(()=>s(),c=>s(c)),value:U(()=>o()),disabled:U(()=>v()),label:U(()=>i()),onHighlight:U(()=>u()),onUnhighlight:U(()=>p())}),C=x(()=>de(T,O.props));var N={get id(){return r()},set id(c=ue(t)){r(c),l()},get ref(){return s()},set ref(c=null){s(c),l()},get value(){return o()},set value(c){o(c),l()},get label(){return i()},set label(c=o){i(c),l()},get disabled(){return v()},set disabled(c=!1){v(c),l()},get children(){return _()},set children(c){_(c),l()},get child(){return m()},set child(c){m(c),l()},get onHighlight(){return u()},set onHighlight(c=J){u(c),l()},get onUnhighlight(){return p()},set onUnhighlight(c=J){p(c),l()},$set:re,$on:(c,L)=>ne(e,c,L)},b=vo(),R=K(b);{var D=c=>{var L=q(),I=K(L);{let y=x(()=>({props:n(C),...O.snippetProps}));j(I,m,()=>n(y))}S(c,L)},G=c=>{var L=fo();ee(L,()=>({...n(C)}));var I=Z(L);j(I,()=>_()??ae,()=>O.snippetProps),Q(L),S(c,L)};X(R,c=>{m()?c(D):c(G,-1)})}var g=ct(R,2);return kr(g,{get mounted(){return O.mounted},set mounted(c){O.mounted=c}}),S(d,b),se(N)}var mo=new Set(["$$slots","$$events","$$legacy","id","ref","children","child"]),bo=$("<div><!></div>");function Er(d,e){const t=ke();if(new.target)return te({component:Er,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"children",7),i=a(e,"child",7),v=be(e,mo);const _=Ot.create({id:U(()=>r()),ref:U(()=>s(),N=>s(N))}),m=x(()=>de(v,_.props));var u={get id(){return r()},set id(N=ue(t)){r(N),l()},get ref(){return s()},set ref(N=null){s(N),l()},get children(){return o()},set children(N){o(N),l()},get child(){return i()},set child(N){i(N),l()},$set:re,$on:(N,b)=>ne(e,N,b)},p=q(),T=K(p);{var O=N=>{var b=q(),R=K(b);j(R,i,()=>({props:n(m)})),S(N,b)},C=N=>{var b=bo();ee(b,()=>({...n(m)}));var R=Z(b);j(R,()=>o()??ae),Q(b),S(N,b)};X(T,N=>{i()?N(O):N(C,-1)})}return S(d,p),se(u)}var yo=$("<!> <!>",1);function Ar(d,e){if(new.target)return te({component:Ar,...d});oe(e,!0);let t=a(e,"value",15),r=a(e,"onValueChange",7,J),s=a(e,"name",7,""),o=a(e,"disabled",7,!1),i=a(e,"type",7),v=a(e,"open",15,!1),_=a(e,"onOpenChange",7,J),m=a(e,"onOpenChangeComplete",7,J),u=a(e,"loop",7,!1),p=a(e,"scrollAlignment",7,"nearest"),T=a(e,"required",7,!1),O=a(e,"items",23,()=>[]),C=a(e,"allowDeselect",7,!1),N=a(e,"autocomplete",7),b=a(e,"children",7);function R(){t()===void 0&&t(i()==="single"?"":[])}R(),me.pre(()=>t(),()=>{R()});let D=Y("");const G=ho.create({type:i(),value:U(()=>t(),f=>{t(f),r()(f)}),disabled:U(()=>o()),required:U(()=>T()),open:U(()=>v(),f=>{v(f),_()(f)}),loop:U(()=>u()),scrollAlignment:U(()=>p()),name:U(()=>s()),isCombobox:!1,items:U(()=>O()),allowDeselect:U(()=>C()),inputValue:U(()=>n(D),f=>k(D,f,!0)),onOpenChangeComplete:U(()=>m())});var g={get value(){return t()},set value(f){t(f),l()},get onValueChange(){return r()},set onValueChange(f=J){r(f),l()},get name(){return s()},set name(f=""){s(f),l()},get disabled(){return o()},set disabled(f=!1){o(f),l()},get type(){return i()},set type(f){i(f),l()},get open(){return v()},set open(f=!1){v(f),l()},get onOpenChange(){return _()},set onOpenChange(f=J){_(f),l()},get onOpenChangeComplete(){return m()},set onOpenChangeComplete(f=J){m(f),l()},get loop(){return u()},set loop(f=!1){u(f),l()},get scrollAlignment(){return p()},set scrollAlignment(f="nearest"){p(f),l()},get required(){return T()},set required(f=!1){T(f),l()},get items(){return O()},set items(f=[]){O(f),l()},get allowDeselect(){return C()},set allowDeselect(f=!1){C(f),l()},get autocomplete(){return N()},set autocomplete(f){N(f),l()},get children(){return b()},set children(f){b(f),l()},$set:re,$on:(f,V)=>ne(e,f,V)},c=yo(),L=K(c);Kn(L,{children:(f,V)=>{var W=q(),F=K(W);j(F,()=>b()??ae),S(f,W)},$$slots:{default:!0}});var I=ct(L,2);{var y=f=>{var V=q(),W=K(V);{var F=P=>{gt(P,{get autocomplete(){return N()}})},w=P=>{var E=q(),z=K(E);sn(z,16,()=>G.opts.value.current,ie=>ie,(ie,Oe)=>{gt(ie,{get value(){return Oe},get autocomplete(){return N()}})}),S(P,E)};X(W,P=>{G.opts.value.current.length===0?P(F):P(w,-1)})}S(f,V)},A=x(()=>Array.isArray(G.opts.value.current)),B=f=>{gt(f,{get autocomplete(){return N()},get value(){return G.opts.value.current},set value(V){G.opts.value.current=V}})};X(I,f=>{n(A)?f(y):f(B,-1)})}return S(d,c),se(g)}var wo=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","type"]),xo=$("<button><!></button>");function Tr(d,e){const t=ke();if(new.target)return te({component:Tr,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"child",7),i=a(e,"children",7),v=a(e,"type",7,"button"),_=be(e,wo);const m=Nt.create({id:U(()=>r()),ref:U(()=>s(),C=>s(C))}),u=x(()=>de(_,m.props,{type:v()}));var p={get id(){return r()},set id(C=ue(t)){r(C),l()},get ref(){return s()},set ref(C=null){s(C),l()},get child(){return o()},set child(C){o(C),l()},get children(){return i()},set children(C){i(C),l()},get type(){return v()},set type(C="button"){v(C),l()},$set:re,$on:(C,N)=>ne(e,C,N)},T=q(),O=K(T);return pe(O,()=>Ir,(C,N)=>{N(C,{get id(){return r()},get ref(){return m.opts.ref},children:(b,R)=>{var D=q(),G=K(D);{var g=L=>{var I=q(),y=K(I);j(y,o,()=>({props:n(u)})),S(L,I)},c=L=>{var I=xo();ee(I,()=>({...n(u)}));var y=Z(I);j(y,()=>i()??ae),Q(I),S(L,I)};X(G,L=>{o()?L(g):L(c,-1)})}S(b,D)},$$slots:{default:!0}})}),S(d,T),se(p)}var _o=$('<div data-slot="select-root" class="relative min-w-0 w-full"><!></div>');function Mr(d,e){const t=ke();if(new.target)return te({component:Mr,...d});oe(e,!0);const r=`${t}-trigger`;let s=Y(r),o=a(e,"value",15,""),i=a(e,"open",15,!1),v=a(e,"items",23,()=>[]),_=a(e,"disabled",7,!1),m=a(e,"invalid",7,!1),u=a(e,"required",7,!1),p=a(e,"name",7),T=a(e,"loop",7,!0),O=a(e,"onchange",7),C=a(e,"onopenchange",7),N=a(e,"children",7),b=a(e,"staticPosition",7,!1);en(()=>{i(!1),C()?.(!1)}),jr("canonical-select",{get triggerId(){return n(s)},registerTriggerId(g){k(s,g??r,!0)},listboxId:`${t}-listbox`,get value(){return o()},get displayValue(){return v().find(g=>g.value===o())?.label??o()},get invalid(){return m()},get open(){return i()},get staticPosition(){return b()},set open(g){i(g)}});var R={get value(){return o()},set value(g=""){o(g),l()},get open(){return i()},set open(g=!1){i(g),l()},get items(){return v()},set items(g=[]){v(g),l()},get disabled(){return _()},set disabled(g=!1){_(g),l()},get invalid(){return m()},set invalid(g=!1){m(g),l()},get required(){return u()},set required(g=!1){u(g),l()},get name(){return p()},set name(g){p(g),l()},get loop(){return T()},set loop(g=!0){T(g),l()},get onchange(){return O()},set onchange(g){O(g),l()},get onopenchange(){return C()},set onopenchange(g){C(g),l()},get children(){return N()},set children(g){N(g),l()},get staticPosition(){return b()},set staticPosition(g=!1){b(g),l()},$set:re,$on:(g,c)=>ne(e,g,c)},D=_o(),G=Z(D);return pe(G,()=>Ar,(g,c)=>{c(g,{type:"single",get items(){return v()},get disabled(){return _()},get required(){return u()},get name(){return p()},get loop(){return T()},get onValueChange(){return O()},get onOpenChange(){return C()},get value(){return o()},set value(L){o(L)},get open(){return i()},set open(L){i(L)},children:(L,I)=>{var y=q(),A=K(y);j(A,()=>N()??ae),S(L,y)},$$slots:{default:!0}})}),Q(D),S(d,D),se(R)}var Co=new Set(["$$slots","$$events","$$legacy","variant","class","children","child","onclick","id","ref"]),No=$("<!> <!>",1);function Hr(d,e){if(new.target)return te({component:Hr,...d});oe(e,!0);const t=(I,y)=>{let A=()=>(y?.()).props;const B=x(()=>G(A()));var f=q(),V=K(f);{var W=w=>{var P=q(),E=K(P);j(E,i,()=>({props:n(B)})),S(w,P)},F=w=>{Bn(w,_e(()=>n(B),{get variant(){return n(b)},get active(){return p.open},get class(){return n(R)},children:(P,E)=>{var z=No(),ie=K(z);j(ie,()=>o()??ae);var Oe=ct(ie,2);{var wt=Ee=>{mr(Ee,{get icon(){return Un},class:"size-3 shrink-0 text-muted-foreground transition-transform duration-spring-fast group-data-[state=open]:rotate-180 motion-reduce:transition-none"})};X(Oe,Ee=>{r()==="default"&&Ee(wt)})}S(P,z)},$$slots:{default:!0}}))};X(V,w=>{i()?w(W):w(F,-1)})}S(I,f)};let r=a(e,"variant",7,"default"),s=a(e,"class",7,""),o=a(e,"children",7),i=a(e,"child",7),v=a(e,"onclick",7),_=a(e,"id",7),m=a(e,"ref",15,null),u=be(e,Co);const p=Et("canonical-select");Jr(()=>p.registerTriggerId(_())),ve(()=>p.registerTriggerId(_()));let T=Y(!1);ve(()=>{const I=p.triggerId;k(T,Array.from(document.querySelectorAll("label[for]")).some(y=>y.htmlFor===I),!0)});const O=x(()=>!u["aria-label"]&&!u["aria-labelledby"]&&!n(T));let C=Y(void 0);ve(()=>{const I=m();if(!n(O)||!I){k(C,void 0);return}const y=()=>{k(C,I.textContent?.trim()||void 0,!0)};y();const A=new MutationObserver(y);return A.observe(I,{childList:!0,characterData:!0,subtree:!0}),()=>A.disconnect()});const N={default:"border border-border bg-transparent shadow-none hover:border-input hover:bg-hover px-3",underline:"border-0 bg-transparent underline underline-offset-3 decoration-muted-foreground/30 px-3",ghost:"border-0 bg-transparent shadow-none hover:border-transparent hover:bg-hover px-3",secondary:"border border-border bg-secondary text-secondary-foreground shadow-(--elevation-raised) hover:border-input hover:bg-hover px-3"},b=x(()=>r()==="default"?"outline":r()==="secondary"?"secondary":"ghost"),R=x(()=>xe("group type-caption text-foreground flex h-(--control-height-medium) w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-(--radius-medium) font-medium transition-[border-color,background-color,box-shadow] duration-spring-fast aria-invalid:border-danger aria-invalid:ring-1 aria-invalid:ring-danger/25 disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50 disabled:hover:border-border disabled:hover:bg-transparent motion-reduce:transition-none",N[r()],s()));function D(I){I.detail===0&&!p.open&&(p.open=!0),v()?.(I)}function G(I){const{"aria-activedescendant":y,"aria-label":A,...B}=I;return{...B,role:"combobox","aria-label":typeof A=="string"?A:n(C),"aria-activedescendant":p.open&&typeof y=="string"?y:void 0}}var g={get variant(){return r()},set variant(I="default"){r(I),l()},get class(){return s()},set class(I=""){s(I),l()},get children(){return o()},set children(I){o(I),l()},get child(){return i()},set child(I){i(I),l()},get onclick(){return v()},set onclick(I){v(I),l()},get id(){return _()},set id(I){_(I),l()},get ref(){return m()},set ref(I=null){m(I),l()},$set:re,$on:(I,y)=>ne(e,I,y)},c=q(),L=K(c);{let I=x(()=>p.open?p.listboxId:void 0),y=x(()=>p.invalid||void 0);pe(L,()=>Tr,(A,B)=>{B(A,_e(()=>u,{get id(){return p.triggerId},get"aria-controls"(){return n(I)},get class(){return n(R)},get"aria-invalid"(){return n(y)},onclick:D,get child(){return t},get ref(){return m()},set ref(f){m(f)}}))})}return S(d,c),se(g)}var Io=$("<span> </span>");function Rr(d,e){if(new.target)return te({component:Rr,...d});oe(e,!0);let t=a(e,"placeholder",23,()=>jt.ui_select_value_placeholder());const r=Et("canonical-select");var s={get placeholder(){return t()},set placeholder(v=jt.ui_select_value_placeholder()){t(v),l()},$set:re,$on:(v,_)=>ne(e,v,_)},o=Io(),i=sr(o,!0);return At(()=>{ir(o,1,`min-w-0 flex-1 truncate text-left ${r.value?"text-foreground":"text-muted-foreground"}`),Xr(i,r.displayValue||t())}),S(d,o),se(s)}var Po=$('<span data-slot="menu-list-highlight" class="contents svelte-da0knc" aria-hidden="true"><!></span>');function Lr(d,e){if(new.target)return te({component:Lr,...d});oe(e,!0);let t=a(e,"activeIndex",7),r=a(e,"onactiveindexchange",7),s=Y(null),o=Y(null),i=Y(Zr([])),v=Y(null),_=Y(!1),m=Y(!1),u;const p='[data-menu-item], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]';ve(()=>{n(o)&&t()===void 0&&n(_)&&n(o).activeIndex!==n(v)&&n(o).setActiveIndex(n(v))}),ve(()=>{!n(o)||t()===void 0||n(o).pointerPosition||n(o).setActiveIndex(t())}),ve(()=>{if(!n(o)?.pointerPosition){u=void 0;return}n(o).activeIndex!==u&&(u=n(o).activeIndex,r()?.(n(o).activeIndex))}),Qr(()=>{const b=n(s)?.parentElement;if(!b)return;b.dataset.listOverlay="",b.classList.add("relative","isolate");const R=tn(b,{axis:"xy"});k(o,R);let D=[];const G=w=>w instanceof Element&&(w.matches(p)||w.querySelector(p)),g=w=>w.hasAttribute("data-disabled")||w.getAttribute("aria-disabled")==="true",c=w=>w.dataset.selectionAppearance!=="indicator"&&(w.hasAttribute("data-selected")||w.getAttribute("data-state")==="checked"||w.getAttribute("aria-selected")==="true"||w.getAttribute("aria-checked")==="true"),L=()=>{const w=Array.from(b.querySelectorAll(p)).filter(E=>E.closest("[data-list-overlay]")===b&&!g(E));w.length!==D.length||w.some((E,z)=>E!==D[z])?(D.forEach((E,z)=>R.registerItem(z,null)),D=w,D.forEach((E,z)=>R.registerItem(z,E))):R.measure();const P=D.flatMap((E,z)=>c(E)?[z]:[]);if((P.length!==n(i).length||P.some((E,z)=>E!==n(i)[z]))&&k(i,P,!0),t()===void 0){const E=D.findIndex(z=>z.hasAttribute("data-highlighted")||z===document.activeElement);E>=0&&R.setActiveIndex(E)}},I=new MutationObserver(w=>{w.some(P=>P.type==="attributes"||[...P.addedNodes,...P.removedNodes].some(G))&&L()});I.observe(b,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-highlighted","data-selected","data-state","data-disabled","aria-selected","aria-checked","aria-disabled","data-selection-appearance"]});const y=()=>{const w=D.indexOf(document.activeElement);k(v,w>=0?w:null,!0)},A=()=>{k(m,!1),k(_,!0),y(),Ct().then(()=>{n(_)&&y()})},B=()=>{k(_,!1)},f=()=>{k(m,!1),k(_,!0),y()},V=w=>{const P=w.target instanceof Element?w.target.closest(p):null,E=D.indexOf(P);w.button!==0||E<0||(k(_,!1),k(m,!0),R.setActiveIndex(E))},W=()=>{k(m,!1)},F=w=>{const P=D.indexOf(w.target);k(v,P>=0?P:null,!0),P>=0&&R.setActiveIndex(P)};return b.addEventListener("keydown",A,!0),b.addEventListener("pointermove",B,!0),b.addEventListener("pointerleave",f),b.addEventListener("pointerdown",V),window.addEventListener("pointerup",W),window.addEventListener("pointercancel",W),b.addEventListener("focusin",F),Ct().then(L),()=>{I.disconnect(),b.removeEventListener("keydown",A,!0),b.removeEventListener("pointermove",B,!0),b.removeEventListener("pointerleave",f),b.removeEventListener("pointerdown",V),window.removeEventListener("pointerup",W),window.removeEventListener("pointercancel",W),b.removeEventListener("focusin",F),R.destroy(),k(o,null),delete b.dataset.listOverlay}});var T={get activeIndex(){return t()},set activeIndex(b){t(b),l()},get onactiveindexchange(){return r()},set onactiveindexchange(b){r(b),l()},$set:re,$on:(b,R)=>ne(e,b,R)},O=Po(),C=Z(O);{var N=b=>{{let R=x(()=>n(m)?n(i).includes(n(o).activeIndex??-1)?"bg-hover menu-selection-pressed":"bg-active":"bg-hover");jn(b,{get store(){return n(o)},get selectedIndexes(){return n(i)},get hoverClass(){return n(R)}})}};X(C,b=>{n(o)&&b(N)})}return Q(O),Yn(O,b=>k(s,b),()=>n(s)),At(()=>ar(O,"data-active-index",n(o)?.activeIndex??void 0)),S(d,O),se(T)}const Vr=8;function Jo(d,e,t=24){if(!d)return!0;const r=d.getBoundingClientRect(),s=e+t+Vr;return r.left>=s||d.ownerDocument.documentElement.clientWidth-r.right>=s}var So=$("<div><!> <!></div>"),ko=$("<div><!></div>"),Oo=$("<div><div><!></div></div>");function Dr(d,e){if(new.target)return te({component:Dr,...d});oe(e,!0);const t=y=>{var A=q(),B=K(A);{const f=(V,W)=>{let F=()=>(W?.()).props;var w=So();ee(w,()=>({...F(),id:b.listboxId,role:"listbox","aria-labelledby":b.triggerId,tabindex:"-1"}));var P=Z(w);Lr(P,{});var E=ct(P,2);j(E,()=>T()??ae),Q(w),S(V,w)};pe(B,()=>Er,(V,W)=>{W(V,{get class(){return`relative min-h-0 flex-1 overflow-y-auto p-1.5 ${m()??""}`},child:f,$$slots:{child:!0}})})}S(y,A)},r=(y,A)=>{let B=()=>(A?.()).props;const f=x(()=>D(B()));var V=ko();ee(V,()=>({...n(f),...v()?{id:v()}:{}}));var W=Z(V);t(W),Q(V),Jt(V,F=>i?.(F)),S(y,V)},s=(y,A)=>{let B=()=>(A?.()).props,f=()=>(A?.()).wrapperProps;const V=x(()=>D(B()));var W=Oo();ee(W,()=>({...f(),...v()?{id:v()}:{}}));var F=Z(W);ee(F,()=>({...n(V)}));var w=Z(F);t(w),Q(F),Jt(F,P=>i?.(P)),Q(W),S(y,W)},o=rn(),i=nn();let v=a(e,"wrapperId",7),_=a(e,"class",7,""),m=a(e,"wrapperClass",7,""),u=a(e,"dropUp",7,!1),p=a(e,"portal",7),T=a(e,"children",7);const O=x(()=>u()||p()===!0),C=Jn(),N=Zn(Qn()+2);$n(N);const b=Et("canonical-select");async function R(){const y=document.getElementById(b.triggerId);await Ct(),!b.open&&y?.isConnected&&y.focus({preventScroll:!0})}function D(y){const{role:A,tabindex:B,...f}=y;return f}var G={get wrapperId(){return v()},set wrapperId(y){v(y),l()},get class(){return _()},set class(y=""){_(y),l()},get wrapperClass(){return m()},set wrapperClass(y=""){m(y),l()},get dropUp(){return u()},set dropUp(y=!1){u(y),l()},get portal(){return p()},set portal(y){p(y),l()},get children(){return T()},set children(y){T(y),l()},$set:re,$on:(y,A)=>ne(e,y,A)},g=q(),c=K(g);{var L=y=>{var A=q(),B=K(A);{let f=x(()=>xe(Zt(),"w-full max-h-60",_()));pe(B,()=>Sr,(V,W)=>{W(V,{preventScroll:!1,onEscapeKeydown:R,"data-slot":"select-content","data-static-position":!0,get"data-surface-level"(){return N},get class(){return n(f)},style:"max-width: calc(100vw - var(--space-4));",get child(){return r}})})}S(y,A)},I=y=>{const A=x(()=>p()===void 0&&!u()?C():void 0);var B=q(),f=K(B);{let V=x(()=>!n(O)&&!n(A)),W=x(()=>n(A)??o?.target());pe(f,()=>Wn,(F,w)=>{w(F,{get disabled(){return n(V)},get to(){return n(W)},children:(P,E)=>{var z=q(),ie=K(z);{let Oe=x(()=>n(A)?"absolute":"fixed"),wt=x(()=>n(A)!==void 0),Ee=x(()=>u()?"top":"bottom"),Br=x(()=>xe(Zt(),"w-(--bits-select-anchor-width) max-h-60",_()));pe(ie,()=>Pr,(Wr,Ur)=>{Ur(Wr,{get strategy(){return n(Oe)},get hideWhenDetached(){return n(wt)},onEscapeKeydown:R,"data-slot":"select-content",get"data-surface-level"(){return N},get side(){return n(Ee)},sideOffset:4,get collisionPadding(){return Vr},get class(){return n(Br)},style:"max-width: calc(100vw - var(--space-4));",get child(){return s}})})}S(P,z)},$$slots:{default:!0}})})}S(y,B)};X(c,y=>{b.staticPosition?y(L):y(I,-1)})}return S(d,g),se(G)}var Eo=new Set(["$$slots","$$events","$$legacy","state","class","data-slot"]),Ao=$('<span><span class="relative block h-3.5 w-6 rounded-full bg-muted-foreground/25 transition-colors duration-spring-fast ease-spring-fast data-[state=checked]:bg-foreground/80 motion-reduce:transition-none"><span></span></span></span>'),To=$("<span><!></span>");function Fr(d,e){if(new.target)return te({component:Fr,...d});oe(e,!0);let t=a(e,"state",7),r=a(e,"class",7),s=a(e,"data-slot",7),o=be(e,Eo);var i={get state(){return t()},set state(p){t(p),l()},get class(){return r()},set class(p){r(p),l()},get"data-slot"(){return s()},set"data-slot"(p){s(p),l()},$set:re,$on:(p,T)=>ne(e,p,T)},v=q(),_=K(v);{var m=p=>{var T=Ao();ee(T,N=>({...o,"data-slot":s()??"menu-switch",class:N,"aria-hidden":"true"}),[()=>xe("ml-auto flex h-lh shrink-0 items-center",r())]);var O=Z(T),C=sr(O);Q(T),At(N=>{ar(O,"data-state",t()==="on"?"checked":"unchecked"),ir(C,1,N)},[()=>an(xe("absolute top-0.5 left-0.5 size-2.5 rounded-full bg-popover transition-transform duration-spring-fast ease-spring-fast motion-reduce:transition-none",t()==="on"&&"translate-x-2.5"))]),S(p,T)},u=p=>{var T=To();ee(T,N=>({...o,"data-slot":s()??(t()==="submenu"?"menu-sub-chevron":"menu-item-indicator"),class:N,"aria-hidden":"true"}),[()=>xe(on,t()==="submenu"?"text-muted-foreground":"text-primary-ink",r())]);var O=Z(T);{var C=N=>{{let b=x(()=>t()==="mixed"?qn:t()==="submenu"?zn:Gn),R=x(()=>t()==="submenu"?"calc(var(--space-2) + var(--space-1) / 2)":"var(--menu-icon-size)"),D=x(()=>t()==="submenu"?"size-2.5 rtl:rotate-180":"size-(--menu-icon-size)");mr(N,{get icon(){return n(b)},get size(){return n(R)},get class(){return n(D)}})}};X(O,N=>{t()!=="empty"&&N(C)})}Q(T),S(p,T)};X(_,p=>{t()==="on"||t()==="off"?p(m):p(u,-1)})}return S(d,v),se(i)}var Mo=$('<div class="min-w-0 flex-1 truncate"><!></div> <!>',1);function Kr(d,e){if(new.target)return te({component:Kr,...d});oe(e,!0);let t=a(e,"value",7),r=a(e,"label",7),s=a(e,"disabled",7,!1),o=a(e,"children",7),i=a(e,"class",7,"");var v={get value(){return t()},set value(u){t(u),l()},get label(){return r()},set label(u){r(u),l()},get disabled(){return s()},set disabled(u=!1){s(u),l()},get children(){return o()},set children(u){o(u),l()},get class(){return i()},set class(u=""){i(u),l()},$set:re,$on:(u,p)=>ne(e,u,p)},_=q(),m=K(_);{const u=(C,N)=>{let b=()=>(N?.()).selected;var R=Mo(),D=K(R),G=Z(D);j(G,()=>o()??ae),Q(D);var g=ct(D,2);{let c=x(()=>b()?"checked":"empty");Fr(g,{get state(){return n(c)},"data-slot":"select-item-check"})}S(C,R)};let p=x(()=>r()??t()),T=x(()=>s()||void 0),O=x(()=>xe(Xn(),i()));pe(m,()=>Or,(C,N)=>{N(C,{get value(){return t()},get label(){return n(p)},get disabled(){return s()},get"aria-disabled"(){return n(T)},"data-menu-item":!0,get class(){return n(O)},children:u,$$slots:{default:!0}})})}return S(d,_),se(v)}const Xo={Root:Mr,Trigger:Hr,Value:Rr,Content:Dr,Item:Kr},Ho=(d,e)=>{let t,r;const s=()=>{t||(t=eo(()=>{t=void 0;const v=d.checkVisibility?.()??!0,_=v?d.clientWidth:0,m=v?d.clientHeight:0,u=_>0&&m>0&&(d.scrollWidth>_||d.scrollHeight>m);r?.(),r=to(()=>{r=void 0,e(u)})}))},o=typeof ResizeObserver>"u"?void 0:new ResizeObserver(s),i=new MutationObserver(s);return o?.observe(d),i.observe(d,{childList:!0,characterData:!0,subtree:!0}),document.fonts?.addEventListener("loadingdone",s),s(),{update(v){e=v,s()},destroy(){t?.(),r?.(),o?.disconnect(),i.disconnect(),document.fonts?.removeEventListener("loadingdone",s)}}},Zo=(d,e)=>{let t=e;const r=o=>{t&&(o||t.trim()!==d.textContent?.trim())?d.title=t:d.removeAttribute("title")},s=Ho(d,r);return{update(o){t=o,s?.update?.(r)},destroy(){s?.destroy?.(),d.removeAttribute("title")}}};export{Ir as F,yr as H,Fr as M,Vr as O,Xo as S,Lr as a,rr as b,tr as c,er as d,ho as e,Pr as f,Sr as g,gt as h,Or as i,Er as j,Jo as k,Ho as o,Zo as t};
1
+ var qr=Object.defineProperty;var Yt=d=>{throw TypeError(d)};var zr=(d,e,t)=>e in d?qr(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var H=(d,e,t)=>zr(d,typeof e!="symbol"?e+"":e,t),xt=(d,e,t)=>e.has(d)||Yt("Cannot "+t);var h=(d,e,t)=>(xt(d,e,"read from private field"),t?t.call(d):e.get(d)),M=(d,e,t)=>e.has(d)?Yt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(d):e.set(d,t),Ie=(d,e,t,r)=>(xt(d,e,"write to private field"),r?r.call(d,t):e.set(d,t),t),Pe=(d,e,t)=>(xt(d,e,"access private method"),t);import{t as te,br as a,a_ as X,bz as re,b as ne,bs as be,bu as _e,bp as jt}from"./CGWRZzdk.js";import{c9 as x,aD as n,bs as oe,a7 as q,ay as K,W as S,bn as se,aA as l,aB as $,bH as k,bV as Y,bi as Gr,ca as ve,cb as Yr,bf as ae,bo as ke,a5 as Z,bA as Q,bS as ct,bI as jr,aG as Et,c5 as Jr,bl as sr,b_ as At,bO as Xr,br as Zr,bk as Qr,c0 as Ct}from"./DYhIMPy1.js";import{s as j}from"./BEyWfhqM.js";import{c as pe}from"./nmrokYzj.js";import{e as $r,s as en,g as tn,i as rn,f as nn,b as on}from"./D_n6c_yZ.js";import{i as ee,n as sn,l as xe,v as ir,u as ar,g as Jt,j as an}from"./B70m4__L.js";import{bI as ln,bn as de,aI as dn,b4 as un,h as Tt,av as Ce,D as yt,i as hn,d as le,a as fe,l as pt,ad as _t,ak as ft,a2 as Mt,K as Ht,a1 as Rt,E as Lt,bo as lr,bB as dr,aZ as ur,aB as hr,aE as Vt,b1 as Dt,aF as cr,bM as me,bi as cn,bu as gn,b3 as pn,b2 as fn,aH as Xt,au as gr,a6 as vn,aJ as U,aS as mn,m as pr,b as bn,c as yn,a8 as wn,C as xn,g as _n,A as Cn,M as Nn,F as In,r as Pn,s as Sn,t as kn,u as On,v as En,w as An,x as Tn,y as Mn,o as Hn,p as Rn,q as Ln,B as Vn,z as Dn,aT as ue,bp as J,a4 as fr,a3 as vr,bw as Fn,H as Kn,f as Bn,a5 as Wn}from"./B422XfSt.js";import{F as mr,as as Un,bV as qn,au as zn,aq as Gn}from"./Dlo7xxGg.js";import{b as Yn}from"./BaIAhI85.js";import{P as jn,u as Jn,b as Zt,a as Xn}from"./CgFIU5ie.js";import{c as Zn,u as Qn,s as $n}from"./DfxQWSVU.js";import"./w-1KkHyd.js";import{s as eo,a as to}from"./BsieX9dN.js";const br={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};ln(br);var Ae,mt;class ro{constructor(e,t){M(this,Ae,()=>{});M(this,mt,x(()=>h(this,Ae).call(this)));let r;t!==void 0&&(r=t),Ie(this,Ae,()=>{try{return r}finally{r=e()}})}get current(){return n(h(this,mt))}}Ae=new WeakMap,mt=new WeakMap;var no=new Set(["$$slots","$$events","$$legacy","value"]),Qt=$("<input/>");function yr(d,e){if(new.target)return te({component:yr,...d});oe(e,!0);let t=a(e,"value",15),r=be(e,no);const s=x(()=>de(r,{"aria-hidden":"true",tabindex:-1,style:{...br,position:"absolute",top:"0",left:"0"}}));var o={get value(){return t()},set value(u){t(u),l()},$set:re,$on:(u,p)=>ne(e,u,p)},i=q(),v=K(i);{var _=u=>{var p=Qt();ee(p,()=>({...n(s),value:t()}),void 0,void 0,void 0,void 0,!0),S(u,p)},m=u=>{var p=Qt();ee(p,()=>({...n(s)}),void 0,void 0,void 0,void 0,!0),$r(p,t),S(u,p)};X(v,u=>{n(s).type==="checkbox"?u(_):u(m,-1)})}return S(d,i),se(o)}var ce,ye,ge;class oo{constructor(e){M(this,ce);M(this,ye,x(()=>h(this,ce).candidateValues()));M(this,ge);Ie(this,ce,e),Ie(this,ge,dn("",{afterMs:1e3,getWindow:h(this,ce).getWindow})),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!h(this,ce).enabled()||!n(h(this,ye)).length)return;h(this,ge).current=h(this,ge).current+e;const t=h(this,ce).getCurrentItem(),r=n(h(this,ye)).find(v=>v===t)??"",s=n(h(this,ye)).map(v=>v??""),o=un(s,h(this,ge).current,r),i=n(h(this,ye)).find(v=>v===o);return i&&h(this,ce).onMatch(i),i}resetTypeahead(){h(this,ge).current=""}}ce=new WeakMap,ye=new WeakMap,ge=new WeakMap;const $t=[bn,pr,yn,wn,xn,_n,Cn,Nn,pt,In,Pn,Sn,kn,On,En,An,Tn,Mn,Hn,Rn,Ln],so=[fe,Mt,Ht],io=[le,Rt,Lt],wr=[...so,...io],ao=mn({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),Ne=new Tt("Select.Root | Combobox.Root"),xr=new Tt("Select.Group | Combobox.Group"),_r=new Tt("Select.Content | Combobox.Content");var Te,Me,He,Re,Le,Ve,De,Fe,Ke,Be,We,Ue;class Cr{constructor(e){H(this,"opts");M(this,Te,Y(!1));M(this,Me,Y(null));M(this,He,Y(null));H(this,"contentPresence");M(this,Re,Y(null));M(this,Le,Y(null));M(this,Ve,Y(null));M(this,De,Y(""));M(this,Fe,Y(null));M(this,Ke,x(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));M(this,Be,x(()=>{if(this.highlightedNode)return this.highlightedNode.id}));M(this,We,x(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));M(this,Ue,Y(!1));H(this,"isUsingKeyboard",!1);H(this,"isCombobox",!1);H(this,"domContext",new yt(()=>null));H(this,"getBitsAttr",e=>ao.getAttr(e,this.isCombobox?"combobox":void 0));this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new vn({ref:U(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Yr(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return n(h(this,Te))}set touchedInput(e){k(h(this,Te),e,!0)}get inputNode(){return n(h(this,Me))}set inputNode(e){k(h(this,Me),e,!0)}get contentNode(){return n(h(this,He))}set contentNode(e){k(h(this,He),e,!0)}get viewportNode(){return n(h(this,Re))}set viewportNode(e){k(h(this,Re),e,!0)}get triggerNode(){return n(h(this,Le))}set triggerNode(e){k(h(this,Le),e,!0)}get valueNode(){return n(h(this,Ve))}set valueNode(e){k(h(this,Ve),e,!0)}get valueId(){return n(h(this,De))}set valueId(e){k(h(this,De),e,!0)}get highlightedNode(){return n(h(this,Fe))}set highlightedNode(e){k(h(this,Fe),e,!0)}get highlightedValue(){return n(h(this,Ke))}set highlightedValue(e){k(h(this,Ke),e)}get highlightedId(){return n(h(this,Be))}set highlightedId(e){k(h(this,Be),e)}get highlightedLabel(){return n(h(this,We))}set highlightedLabel(e){k(h(this,We),e)}get contentIsPositioned(){return n(h(this,Ue))}set contentIsPositioned(e){k(h(this,Ue),e,!0)}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&this.scrollHighlightedNodeIntoView(e)}scrollHighlightedNodeIntoView(e){!this.viewportNode||!this.contentIsPositioned||e.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();t=t.filter(s=>{if(!this.viewportNode)return!1;const o=s.getBoundingClientRect();return o.right<=r.right&&o.left>=r.left&&o.bottom<=r.bottom&&o.top>=r.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(r=>r.dataset.value===e)??null}getLabelForValue(e){if(e==="")return"";const t=this.opts.items.current.find(s=>s.value===e)?.label;if(t!==void 0)return t;const r=this.getNodeByValue(e);if(r){const s=r.getAttribute("data-label");return s!==null&&s!==""?s:r.textContent?.trim()??e}return e}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}Te=new WeakMap,Me=new WeakMap,He=new WeakMap,Re=new WeakMap,Le=new WeakMap,Ve=new WeakMap,De=new WeakMap,Fe=new WeakMap,Ke=new WeakMap,Be=new WeakMap,We=new WeakMap,Ue=new WeakMap;var qe,ze,Ge,Ye;class lo extends Cr{constructor(t){super(t);H(this,"opts");H(this,"isMulti",!1);M(this,qe,x(()=>this.opts.value.current!==""));M(this,ze,x(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":""));M(this,Ge,x(()=>this.opts.items.current.length?this.opts.items.current.filter(r=>!r.disabled).map(r=>r.label):[]));M(this,Ye,x(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=t,ve(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),me(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return n(h(this,qe))}set hasValue(t){k(h(this,qe),t)}get currentLabel(){return n(h(this,ze))}set currentLabel(t){k(h(this,ze),t)}get candidateLabels(){return n(h(this,Ge))}set candidateLabels(t){k(h(this,Ge),t)}get dataTypeaheadEnabled(){return n(h(this,Ye))}set dataTypeaheadEnabled(t){k(h(this,Ye),t)}includesItem(t){return this.opts.value.current===t}toggleItem(t,r=t){const s=this.includesItem(t)?"":t;this.opts.value.current=s,s!==""&&(this.opts.inputValue.current=r)}setInitialHighlightedNode(){gr(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}qe=new WeakMap,ze=new WeakMap,Ge=new WeakMap,Ye=new WeakMap;var je;class uo extends Cr{constructor(t){super(t);H(this,"opts");H(this,"isMulti",!0);M(this,je,x(()=>this.opts.value.current.length>0));this.opts=t,ve(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),me(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return n(h(this,je))}set hasValue(t){k(h(this,je),t)}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,r=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(s=>s!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=r}setInitialHighlightedNode(){gr(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}je=new WeakMap;class ho{static create(e){const{type:t,...r}=e,s=t==="single"?new lo(r):new uo(r);return Ne.set(s)}}var Je;const Ft=class Ft{constructor(e,t){H(this,"opts");H(this,"root");H(this,"attachment");M(this,Je,x(()=>({id:this.opts.id.current,role:"combobox",disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":"list","aria-expanded":cr(this.root.opts.open.current),"data-state":Dt(this.root.opts.open.current),"data-disabled":Vt(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr("input")]:"",...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref,r=>this.root.inputNode=r),this.root.domContext=new yt(e.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),me([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([r,s],[o])=>{s&&(Array.isArray(r)&&Array.isArray(o)?r.length===0&&o.length!==0&&(this.root.opts.inputValue.current=""):r===""&&o!==""&&(this.root.opts.inputValue.current=""))})}static create(e){return new Ft(e,Ne.get())}onkeydown(e){if(this.root.isUsingKeyboard=!0,e.key!==pr){if((e.key===le||e.key===fe)&&e.preventDefault(),!this.root.opts.open.current){if($t.includes(e.key)||e.key===ft||e.key===Vn&&this.root.opts.inputValue.current===""||(this.root.handleOpen(),this.root.hasValue))return;const t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===fe){const r=t[0];this.root.setHighlightedNode(r)}else if(e.key===le){const r=t[t.length-1];this.root.setHighlightedNode(r)}return}if(e.key===ft){this.root.handleClose();return}if(e.key===pt&&!e.isComposing){e.preventDefault();const t=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t&&this.root.handleClose()}if(e.key===le&&e.altKey&&this.root.handleClose(),wr.includes(e.key)){e.preventDefault();const t=this.root.getCandidateNodes(),r=this.root.highlightedNode,s=r?t.indexOf(r):-1,o=this.root.opts.loop.current;let i;if(e.key===fe?i=lr(t,s,o):e.key===le?i=dr(t,s,o):e.key===Rt?i=ur(t,s,10,o):e.key===Mt?i=hr(t,s,10,o):e.key===Ht?i=t[0]:e.key===Lt&&(i=t[t.length-1]),!i)return;this.root.setHighlightedNode(i);return}$t.includes(e.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(e){this.root.opts.inputValue.current=e.currentTarget.value,this.root.setHighlightedToFirstCandidate()}get props(){return n(h(this,Je))}set props(e){k(h(this,Je),e)}};Je=new WeakMap;let er=Ft;var we,Se,he,Nr,It,Pt,Xe;const Kt=class Kt{constructor(e,t){M(this,he);H(this,"opts");H(this,"root");H(this,"attachment");M(this,we);M(this,Se);M(this,Xe,x(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":cr(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Dt(this.root.opts.open.current),"data-disabled":Vt(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref,r=>this.root.triggerNode=r),this.root.domContext=new yt(e.ref),Ie(this,we,new hn({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()})),Ie(this,Se,new oo({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(o=>o.label===r);s&&(this.root.opts.value.current=s.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}static create(e){return new Kt(e,Ne.get())}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===le||e.key===fe)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===pt||e.key===_t||e.key===fe||e.key===le)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){h(this,Se).handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const i=this.root.getCandidateNodes();if(!i.length)return;if(e.key===fe){const v=i[0];this.root.setHighlightedNode(v)}else if(e.key===le){const v=i[i.length-1];this.root.setHighlightedNode(v)}return}if(e.key===ft){this.root.handleClose();return}if((e.key===pt||e.key===_t&&h(this,we).search==="")&&!e.isComposing&&(e.preventDefault(),Pe(this,he,Pt).call(this)))return;if(e.key===le&&e.altKey&&this.root.handleClose(),wr.includes(e.key)){e.preventDefault();const i=this.root.getCandidateNodes(),v=this.root.highlightedNode,_=v?i.indexOf(v):-1,m=this.root.opts.loop.current;let u;if(e.key===fe?u=lr(i,_,m):e.key===le?u=dr(i,_,m):e.key===Rt?u=ur(i,_,10,m):e.key===Mt?u=hr(i,_,10,m):e.key===Ht?u=i[0]:e.key===Lt&&(u=i[i.length-1]),!u)return;this.root.setHighlightedNode(u);return}const t=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1,s=e.key===_t,o=this.root.getCandidateNodes();if(e.key!==ft){if(!t&&(r||s)){!h(this,we).handleTypeaheadSearch(e.key,o)&&s&&(e.preventDefault(),Pe(this,he,Pt).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?Pe(this,he,It).call(this,e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?Pe(this,he,It).call(this,e):this.root.handleClose()))}get props(){return n(h(this,Xe))}set props(e){k(h(this,Xe),e)}};we=new WeakMap,Se=new WeakMap,he=new WeakSet,Nr=function(){this.root.opts.open.current=!0,h(this,Se).resetTypeahead(),h(this,we).resetTypeahead()},It=function(e){Pe(this,he,Nr).call(this)},Pt=function(){const e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e?(this.root.handleClose(),!0):!1)},Xe=new WeakMap;let Nt=Kt;var Ze,bt,Qe,$e;const Bt=class Bt{constructor(e,t){H(this,"opts");H(this,"root");H(this,"attachment");M(this,Ze,Y(!1));H(this,"domContext");M(this,bt,x(()=>pn(this.root.isCombobox?"combobox":"select")));H(this,"onInteractOutside",e=>{if(e.target===this.root.triggerNode||e.target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()});H(this,"onEscapeKeydown",e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()});H(this,"onOpenAutoFocus",e=>{e.preventDefault()});H(this,"onCloseAutoFocus",e=>{e.preventDefault()});M(this,Qe,x(()=>({open:this.root.opts.open.current})));M(this,$e,x(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Dt(this.root.opts.open.current),...fn(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...n(h(this,bt))},onpointermove:this.onpointermove,...this.attachment})));H(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}});this.opts=e,this.root=t,this.attachment=Ce(e.ref,r=>this.root.contentNode=r),this.domContext=new yt(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),gn(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),me(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),me([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}static create(e){return _r.set(new Bt(e,Ne.get()))}get isPositioned(){return n(h(this,Ze))}set isPositioned(e){k(h(this,Ze),e,!0)}onpointermove(e){this.root.isUsingKeyboard=!1}get shouldRender(){return this.root.contentPresence.shouldRender}get snippetProps(){return n(h(this,Qe))}set snippetProps(e){k(h(this,Qe),e)}get props(){return n(h(this,$e))}set props(e){k(h(this,$e),e)}};Ze=new WeakMap,bt=new WeakMap,Qe=new WeakMap,$e=new WeakMap;let vt=Bt;var et,tt,rt,nt,ot;const Wt=class Wt{constructor(e,t){H(this,"opts");H(this,"root");H(this,"attachment");M(this,et,x(()=>this.root.includesItem(this.opts.value.current)));M(this,tt,x(()=>this.root.highlightedValue===this.opts.value.current));H(this,"prevHighlighted",new ro(()=>this.isHighlighted));M(this,rt,Y(!1));M(this,nt,x(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));M(this,ot,x(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Vt(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref),me([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),me(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(e){return new Wt(e,Ne.get())}get isSelected(){return n(h(this,et))}set isSelected(e){k(h(this,et),e)}get isHighlighted(){return n(h(this,tt))}set isHighlighted(e){k(h(this,tt),e)}get mounted(){return n(h(this,rt))}set mounted(e){k(h(this,rt),e,!0)}handleSelect(){if(this.opts.disabled.current)return;const e=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!e&&this.root.handleClose()}get snippetProps(){return n(h(this,nt))}set snippetProps(e){k(h(this,nt),e)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!cn){Gr(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return n(h(this,ot))}set props(e){k(h(this,ot),e)}};et=new WeakMap,tt=new WeakMap,rt=new WeakMap,nt=new WeakMap,ot=new WeakMap;let St=Wt;var st,it;const Ut=class Ut{constructor(e,t){H(this,"opts");H(this,"root");M(this,st,Y(null));H(this,"attachment");M(this,it,x(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("group")]:"","aria-labelledby":this.labelNode?.id??void 0,...this.attachment})));this.opts=e,this.root=t,this.attachment=Ce(e.ref)}static create(e){return xr.set(new Ut(e,Ne.get()))}get labelNode(){return n(h(this,st))}set labelNode(e){k(h(this,st),e,!0)}get props(){return n(h(this,it))}set props(e){k(h(this,it),e)}};st=new WeakMap,it=new WeakMap;let tr=Ut;var at;const qt=class qt{constructor(e,t){H(this,"opts");H(this,"group");H(this,"attachment");M(this,at,x(()=>({id:this.opts.id.current,[this.group.root.getBitsAttr("group-label")]:"",...this.attachment})));this.opts=e,this.group=t,this.attachment=Ce(e.ref,r=>this.group.labelNode=r)}static create(e){return new qt(e,xr.get())}get props(){return n(h(this,at))}set props(e){k(h(this,at),e)}};at=new WeakMap;let rr=qt;var lt,dt;const zt=class zt{constructor(e,t){H(this,"opts");H(this,"root");M(this,lt,x(()=>this.root.opts.name.current!==""));M(this,dt,x(()=>({disabled:Xt(this.root.opts.disabled.current),required:Xt(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}static create(e){return new zt(e,Ne.get())}get shouldRender(){return n(h(this,lt))}set shouldRender(e){k(h(this,lt),e)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}get props(){return n(h(this,dt))}set props(e){k(h(this,dt),e)}};lt=new WeakMap,dt=new WeakMap;let kt=zt;var ut,ht;const Gt=class Gt{constructor(e,t){H(this,"opts");H(this,"content");H(this,"root");H(this,"attachment");M(this,ut,Y(0));M(this,ht,x(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment})));this.opts=e,this.content=t,this.root=t.root,this.attachment=Ce(e.ref,r=>{this.root.viewportNode=r})}static create(e){return new Gt(e,_r.get())}get prevScrollTop(){return n(h(this,ut))}set prevScrollTop(e){k(h(this,ut),e,!0)}get props(){return n(h(this,ht))}set props(e){k(h(this,ht),e)}};ut=new WeakMap,ht=new WeakMap;let Ot=Gt;function gt(d,e){if(new.target)return te({component:gt,...d});oe(e,!0);let t=a(e,"value",15),r=a(e,"autocomplete",7);const s=kt.create({value:U(()=>t())});var o={get value(){return t()},set value(m){t(m),l()},get autocomplete(){return r()},set autocomplete(m){r(m),l()},$set:re,$on:(m,u)=>ne(e,m,u)},i=q(),v=K(i);{var _=m=>{yr(m,_e(()=>s.props,{get autocomplete(){return r()},get value(){return t()},set value(u){t(u)}}))};X(v,m=>{s.shouldRender&&m(_)})}return S(d,i),se(o)}function Ir(d,e){if(new.target)return te({component:Ir,...d});oe(e,!0);let t=a(e,"id",7),r=a(e,"children",7),s=a(e,"virtualEl",7),o=a(e,"ref",7),i=a(e,"tooltip",7,!1);Dn.create({id:U(()=>t()),virtualEl:U(()=>s()),ref:o()},i());var v={get id(){return t()},set id(u){t(u),l()},get children(){return r()},set children(u){r(u),l()},get virtualEl(){return s()},set virtualEl(u){s(u),l()},get ref(){return o()},set ref(u){o(u),l()},get tooltip(){return i()},set tooltip(u=!1){i(u),l()},$set:re,$on:(u,p)=>ne(e,u,p)},_=q(),m=K(_);return j(m,()=>r()??ae),S(d,_),se(v)}var co=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),nr=$("<div><div><!></div></div>");function Pr(d,e){const t=ke();if(new.target)return te({component:Pr,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"forceMount",7,!1),i=a(e,"side",7,"bottom"),v=a(e,"onInteractOutside",7,J),_=a(e,"onEscapeKeydown",7,J),m=a(e,"children",7),u=a(e,"child",7),p=a(e,"preventScroll",7,!1),T=a(e,"style",7),O=be(e,co);const C=vt.create({id:U(()=>r()),ref:U(()=>s(),c=>s(c)),onInteractOutside:U(()=>v()),onEscapeKeydown:U(()=>_())}),N=x(()=>de(O,C.props));var b={get id(){return r()},set id(c=ue(t)){r(c),l()},get ref(){return s()},set ref(c=null){s(c),l()},get forceMount(){return o()},set forceMount(c=!1){o(c),l()},get side(){return i()},set side(c="bottom"){i(c),l()},get onInteractOutside(){return v()},set onInteractOutside(c=J){v(c),l()},get onEscapeKeydown(){return _()},set onEscapeKeydown(c=J){_(c),l()},get children(){return m()},set children(c){m(c),l()},get child(){return u()},set child(c){u(c),l()},get preventScroll(){return p()},set preventScroll(c=!1){p(c),l()},get style(){return T()},set style(c){T(c),l()},$set:re,$on:(c,L)=>ne(e,c,L)},R=q(),D=K(R);{var G=c=>{fr(c,_e(()=>n(N),()=>C.popperProps,{get ref(){return C.opts.ref},get side(){return i()},get enabled(){return C.root.opts.open.current},get id(){return r()},get preventScroll(){return p()},forceMount:!0,get shouldRender(){return C.shouldRender},popper:(I,y)=>{let A=()=>(y?.()).props,B=()=>(y?.()).wrapperProps;const f=x(()=>de(A(),{style:C.props.style},{style:T()}));var V=q(),W=K(V);{var F=P=>{var E=q(),z=K(E);{let ie=x(()=>({props:n(f),wrapperProps:B(),...C.snippetProps}));j(z,u,()=>n(ie))}S(P,E)},w=P=>{var E=nr();ee(E,()=>({...B()}));var z=Z(E);ee(z,()=>({...n(f)}));var ie=Z(z);j(ie,()=>m()??ae),Q(z),Q(E),S(P,E)};X(W,P=>{u()?P(F):P(w,-1)})}S(I,V)},$$slots:{popper:!0}}))},g=c=>{vr(c,_e(()=>n(N),()=>C.popperProps,{get ref(){return C.opts.ref},get side(){return i()},get open(){return C.root.opts.open.current},get id(){return r()},get preventScroll(){return p()},forceMount:!1,get shouldRender(){return C.shouldRender},popper:(I,y)=>{let A=()=>(y?.()).props,B=()=>(y?.()).wrapperProps;const f=x(()=>de(A(),{style:C.props.style},{style:T()}));var V=q(),W=K(V);{var F=P=>{var E=q(),z=K(E);{let ie=x(()=>({props:n(f),wrapperProps:B(),...C.snippetProps}));j(z,u,()=>n(ie))}S(P,E)},w=P=>{var E=nr();ee(E,()=>({...B()}));var z=Z(E);ee(z,()=>({...n(f)}));var ie=Z(z);j(ie,()=>m()??ae),Q(z),Q(E),S(P,E)};X(W,P=>{u()?P(F):P(w,-1)})}S(I,V)},$$slots:{popper:!0}}))};X(D,c=>{o()?c(G):o()||c(g,1)})}return S(d,R),se(b)}var go=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),or=$("<div><!></div>");function Sr(d,e){const t=ke();if(new.target)return te({component:Sr,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"forceMount",7,!1),i=a(e,"onInteractOutside",7,J),v=a(e,"onEscapeKeydown",7,J),_=a(e,"children",7),m=a(e,"child",7),u=a(e,"preventScroll",7,!1),p=a(e,"style",7),T=be(e,go);const O=vt.create({id:U(()=>r()),ref:U(()=>s(),g=>s(g)),onInteractOutside:U(()=>i()),onEscapeKeydown:U(()=>v())}),C=x(()=>de(T,O.props));var N={get id(){return r()},set id(g=ue(t)){r(g),l()},get ref(){return s()},set ref(g=null){s(g),l()},get forceMount(){return o()},set forceMount(g=!1){o(g),l()},get onInteractOutside(){return i()},set onInteractOutside(g=J){i(g),l()},get onEscapeKeydown(){return v()},set onEscapeKeydown(g=J){v(g),l()},get children(){return _()},set children(g){_(g),l()},get child(){return m()},set child(g){m(g),l()},get preventScroll(){return u()},set preventScroll(g=!1){u(g),l()},get style(){return p()},set style(g){p(g),l()},$set:re,$on:(g,c)=>ne(e,g,c)},b=q(),R=K(b);{var D=g=>{fr(g,_e(()=>n(C),()=>O.popperProps,{get ref(){return O.opts.ref},isStatic:!0,get enabled(){return O.root.opts.open.current},get id(){return r()},get preventScroll(){return u()},forceMount:!0,get shouldRender(){return O.shouldRender},popper:(L,I)=>{let y=()=>(I?.()).props;const A=x(()=>de(y(),{style:O.props.style},{style:p()}));var B=q(),f=K(B);{var V=F=>{var w=q(),P=K(w);{let E=x(()=>({props:n(A),...O.snippetProps}));j(P,m,()=>n(E))}S(F,w)},W=F=>{var w=or();ee(w,()=>({...n(A)}));var P=Z(w);j(P,()=>_()??ae),Q(w),S(F,w)};X(f,F=>{m()?F(V):F(W,-1)})}S(L,B)},$$slots:{popper:!0}}))},G=g=>{vr(g,_e(()=>n(C),()=>O.popperProps,{get ref(){return O.opts.ref},isStatic:!0,get open(){return O.root.opts.open.current},get id(){return r()},get preventScroll(){return u()},forceMount:!1,get shouldRender(){return O.shouldRender},popper:(L,I)=>{let y=()=>(I?.()).props;const A=x(()=>de(y(),{style:O.props.style},{style:p()}));var B=q(),f=K(B);{var V=F=>{var w=q(),P=K(w);{let E=x(()=>({props:n(A),...O.snippetProps}));j(P,m,()=>n(E))}S(F,w)},W=F=>{var w=or();ee(w,()=>({...n(A)}));var P=Z(w);j(P,()=>_()??ae),Q(w),S(F,w)};X(f,F=>{m()?F(V):F(W,-1)})}S(L,B)},$$slots:{popper:!0}}))};X(R,g=>{o()?g(D):o()||g(G,1)})}return S(d,b),se(N)}function kr(d,e){if(new.target)return te({component:kr,...d});oe(e,!0);let t=a(e,"mounted",15,!1),r=a(e,"onMountedChange",7,J);Fn(()=>(t(!0),r()(!0),()=>{t(!1),r()(!1)}));var s={get mounted(){return t()},set mounted(o=!1){t(o),l()},get onMountedChange(){return r()},set onMountedChange(o=J){r(o),l()},$set:re,$on:(o,i)=>ne(e,o,i)};return se(s)}var po=new Set(["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]),fo=$("<div><!></div>"),vo=$("<!> <!>",1);function Or(d,e){const t=ke();if(new.target)return te({component:Or,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"value",7),i=a(e,"label",23,o),v=a(e,"disabled",7,!1),_=a(e,"children",7),m=a(e,"child",7),u=a(e,"onHighlight",7,J),p=a(e,"onUnhighlight",7,J),T=be(e,po);const O=St.create({id:U(()=>r()),ref:U(()=>s(),c=>s(c)),value:U(()=>o()),disabled:U(()=>v()),label:U(()=>i()),onHighlight:U(()=>u()),onUnhighlight:U(()=>p())}),C=x(()=>de(T,O.props));var N={get id(){return r()},set id(c=ue(t)){r(c),l()},get ref(){return s()},set ref(c=null){s(c),l()},get value(){return o()},set value(c){o(c),l()},get label(){return i()},set label(c=o){i(c),l()},get disabled(){return v()},set disabled(c=!1){v(c),l()},get children(){return _()},set children(c){_(c),l()},get child(){return m()},set child(c){m(c),l()},get onHighlight(){return u()},set onHighlight(c=J){u(c),l()},get onUnhighlight(){return p()},set onUnhighlight(c=J){p(c),l()},$set:re,$on:(c,L)=>ne(e,c,L)},b=vo(),R=K(b);{var D=c=>{var L=q(),I=K(L);{let y=x(()=>({props:n(C),...O.snippetProps}));j(I,m,()=>n(y))}S(c,L)},G=c=>{var L=fo();ee(L,()=>({...n(C)}));var I=Z(L);j(I,()=>_()??ae,()=>O.snippetProps),Q(L),S(c,L)};X(R,c=>{m()?c(D):c(G,-1)})}var g=ct(R,2);return kr(g,{get mounted(){return O.mounted},set mounted(c){O.mounted=c}}),S(d,b),se(N)}var mo=new Set(["$$slots","$$events","$$legacy","id","ref","children","child"]),bo=$("<div><!></div>");function Er(d,e){const t=ke();if(new.target)return te({component:Er,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"children",7),i=a(e,"child",7),v=be(e,mo);const _=Ot.create({id:U(()=>r()),ref:U(()=>s(),N=>s(N))}),m=x(()=>de(v,_.props));var u={get id(){return r()},set id(N=ue(t)){r(N),l()},get ref(){return s()},set ref(N=null){s(N),l()},get children(){return o()},set children(N){o(N),l()},get child(){return i()},set child(N){i(N),l()},$set:re,$on:(N,b)=>ne(e,N,b)},p=q(),T=K(p);{var O=N=>{var b=q(),R=K(b);j(R,i,()=>({props:n(m)})),S(N,b)},C=N=>{var b=bo();ee(b,()=>({...n(m)}));var R=Z(b);j(R,()=>o()??ae),Q(b),S(N,b)};X(T,N=>{i()?N(O):N(C,-1)})}return S(d,p),se(u)}var yo=$("<!> <!>",1);function Ar(d,e){if(new.target)return te({component:Ar,...d});oe(e,!0);let t=a(e,"value",15),r=a(e,"onValueChange",7,J),s=a(e,"name",7,""),o=a(e,"disabled",7,!1),i=a(e,"type",7),v=a(e,"open",15,!1),_=a(e,"onOpenChange",7,J),m=a(e,"onOpenChangeComplete",7,J),u=a(e,"loop",7,!1),p=a(e,"scrollAlignment",7,"nearest"),T=a(e,"required",7,!1),O=a(e,"items",23,()=>[]),C=a(e,"allowDeselect",7,!1),N=a(e,"autocomplete",7),b=a(e,"children",7);function R(){t()===void 0&&t(i()==="single"?"":[])}R(),me.pre(()=>t(),()=>{R()});let D=Y("");const G=ho.create({type:i(),value:U(()=>t(),f=>{t(f),r()(f)}),disabled:U(()=>o()),required:U(()=>T()),open:U(()=>v(),f=>{v(f),_()(f)}),loop:U(()=>u()),scrollAlignment:U(()=>p()),name:U(()=>s()),isCombobox:!1,items:U(()=>O()),allowDeselect:U(()=>C()),inputValue:U(()=>n(D),f=>k(D,f,!0)),onOpenChangeComplete:U(()=>m())});var g={get value(){return t()},set value(f){t(f),l()},get onValueChange(){return r()},set onValueChange(f=J){r(f),l()},get name(){return s()},set name(f=""){s(f),l()},get disabled(){return o()},set disabled(f=!1){o(f),l()},get type(){return i()},set type(f){i(f),l()},get open(){return v()},set open(f=!1){v(f),l()},get onOpenChange(){return _()},set onOpenChange(f=J){_(f),l()},get onOpenChangeComplete(){return m()},set onOpenChangeComplete(f=J){m(f),l()},get loop(){return u()},set loop(f=!1){u(f),l()},get scrollAlignment(){return p()},set scrollAlignment(f="nearest"){p(f),l()},get required(){return T()},set required(f=!1){T(f),l()},get items(){return O()},set items(f=[]){O(f),l()},get allowDeselect(){return C()},set allowDeselect(f=!1){C(f),l()},get autocomplete(){return N()},set autocomplete(f){N(f),l()},get children(){return b()},set children(f){b(f),l()},$set:re,$on:(f,V)=>ne(e,f,V)},c=yo(),L=K(c);Kn(L,{children:(f,V)=>{var W=q(),F=K(W);j(F,()=>b()??ae),S(f,W)},$$slots:{default:!0}});var I=ct(L,2);{var y=f=>{var V=q(),W=K(V);{var F=P=>{gt(P,{get autocomplete(){return N()}})},w=P=>{var E=q(),z=K(E);sn(z,16,()=>G.opts.value.current,ie=>ie,(ie,Oe)=>{gt(ie,{get value(){return Oe},get autocomplete(){return N()}})}),S(P,E)};X(W,P=>{G.opts.value.current.length===0?P(F):P(w,-1)})}S(f,V)},A=x(()=>Array.isArray(G.opts.value.current)),B=f=>{gt(f,{get autocomplete(){return N()},get value(){return G.opts.value.current},set value(V){G.opts.value.current=V}})};X(I,f=>{n(A)?f(y):f(B,-1)})}return S(d,c),se(g)}var wo=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","type"]),xo=$("<button><!></button>");function Tr(d,e){const t=ke();if(new.target)return te({component:Tr,...d});oe(e,!0);let r=a(e,"id",23,()=>ue(t)),s=a(e,"ref",15,null),o=a(e,"child",7),i=a(e,"children",7),v=a(e,"type",7,"button"),_=be(e,wo);const m=Nt.create({id:U(()=>r()),ref:U(()=>s(),C=>s(C))}),u=x(()=>de(_,m.props,{type:v()}));var p={get id(){return r()},set id(C=ue(t)){r(C),l()},get ref(){return s()},set ref(C=null){s(C),l()},get child(){return o()},set child(C){o(C),l()},get children(){return i()},set children(C){i(C),l()},get type(){return v()},set type(C="button"){v(C),l()},$set:re,$on:(C,N)=>ne(e,C,N)},T=q(),O=K(T);return pe(O,()=>Ir,(C,N)=>{N(C,{get id(){return r()},get ref(){return m.opts.ref},children:(b,R)=>{var D=q(),G=K(D);{var g=L=>{var I=q(),y=K(I);j(y,o,()=>({props:n(u)})),S(L,I)},c=L=>{var I=xo();ee(I,()=>({...n(u)}));var y=Z(I);j(y,()=>i()??ae),Q(I),S(L,I)};X(G,L=>{o()?L(g):L(c,-1)})}S(b,D)},$$slots:{default:!0}})}),S(d,T),se(p)}var _o=$('<div data-slot="select-root" class="relative min-w-0 w-full"><!></div>');function Mr(d,e){const t=ke();if(new.target)return te({component:Mr,...d});oe(e,!0);const r=`${t}-trigger`;let s=Y(r),o=a(e,"value",15,""),i=a(e,"open",15,!1),v=a(e,"items",23,()=>[]),_=a(e,"disabled",7,!1),m=a(e,"invalid",7,!1),u=a(e,"required",7,!1),p=a(e,"name",7),T=a(e,"loop",7,!0),O=a(e,"onchange",7),C=a(e,"onopenchange",7),N=a(e,"children",7),b=a(e,"staticPosition",7,!1);en(()=>{i(!1),C()?.(!1)}),jr("canonical-select",{get triggerId(){return n(s)},registerTriggerId(g){k(s,g??r,!0)},listboxId:`${t}-listbox`,get value(){return o()},get displayValue(){return v().find(g=>g.value===o())?.label??o()},get invalid(){return m()},get open(){return i()},get staticPosition(){return b()},set open(g){i(g)}});var R={get value(){return o()},set value(g=""){o(g),l()},get open(){return i()},set open(g=!1){i(g),l()},get items(){return v()},set items(g=[]){v(g),l()},get disabled(){return _()},set disabled(g=!1){_(g),l()},get invalid(){return m()},set invalid(g=!1){m(g),l()},get required(){return u()},set required(g=!1){u(g),l()},get name(){return p()},set name(g){p(g),l()},get loop(){return T()},set loop(g=!0){T(g),l()},get onchange(){return O()},set onchange(g){O(g),l()},get onopenchange(){return C()},set onopenchange(g){C(g),l()},get children(){return N()},set children(g){N(g),l()},get staticPosition(){return b()},set staticPosition(g=!1){b(g),l()},$set:re,$on:(g,c)=>ne(e,g,c)},D=_o(),G=Z(D);return pe(G,()=>Ar,(g,c)=>{c(g,{type:"single",get items(){return v()},get disabled(){return _()},get required(){return u()},get name(){return p()},get loop(){return T()},get onValueChange(){return O()},get onOpenChange(){return C()},get value(){return o()},set value(L){o(L)},get open(){return i()},set open(L){i(L)},children:(L,I)=>{var y=q(),A=K(y);j(A,()=>N()??ae),S(L,y)},$$slots:{default:!0}})}),Q(D),S(d,D),se(R)}var Co=new Set(["$$slots","$$events","$$legacy","variant","class","children","child","onclick","id","ref"]),No=$("<!> <!>",1);function Hr(d,e){if(new.target)return te({component:Hr,...d});oe(e,!0);const t=(I,y)=>{let A=()=>(y?.()).props;const B=x(()=>G(A()));var f=q(),V=K(f);{var W=w=>{var P=q(),E=K(P);j(E,i,()=>({props:n(B)})),S(w,P)},F=w=>{Bn(w,_e(()=>n(B),{get variant(){return n(b)},get active(){return p.open},get class(){return n(R)},children:(P,E)=>{var z=No(),ie=K(z);j(ie,()=>o()??ae);var Oe=ct(ie,2);{var wt=Ee=>{mr(Ee,{get icon(){return Un},class:"size-3 shrink-0 text-muted-foreground transition-transform duration-spring-fast group-data-[state=open]:rotate-180 motion-reduce:transition-none"})};X(Oe,Ee=>{r()==="default"&&Ee(wt)})}S(P,z)},$$slots:{default:!0}}))};X(V,w=>{i()?w(W):w(F,-1)})}S(I,f)};let r=a(e,"variant",7,"default"),s=a(e,"class",7,""),o=a(e,"children",7),i=a(e,"child",7),v=a(e,"onclick",7),_=a(e,"id",7),m=a(e,"ref",15,null),u=be(e,Co);const p=Et("canonical-select");Jr(()=>p.registerTriggerId(_())),ve(()=>p.registerTriggerId(_()));let T=Y(!1);ve(()=>{const I=p.triggerId;k(T,Array.from(document.querySelectorAll("label[for]")).some(y=>y.htmlFor===I),!0)});const O=x(()=>!u["aria-label"]&&!u["aria-labelledby"]&&!n(T));let C=Y(void 0);ve(()=>{const I=m();if(!n(O)||!I){k(C,void 0);return}const y=()=>{k(C,I.textContent?.trim()||void 0,!0)};y();const A=new MutationObserver(y);return A.observe(I,{childList:!0,characterData:!0,subtree:!0}),()=>A.disconnect()});const N={default:"border border-border bg-transparent shadow-none hover:border-input hover:bg-hover px-3",underline:"border-0 bg-transparent underline underline-offset-3 decoration-muted-foreground/30 px-3",ghost:"border-0 bg-transparent shadow-none hover:border-transparent hover:bg-hover px-3",secondary:"border border-border bg-secondary text-secondary-foreground shadow-(--elevation-raised) hover:border-input hover:bg-hover px-3"},b=x(()=>r()==="default"?"outline":r()==="secondary"?"secondary":"ghost"),R=x(()=>xe("group type-caption text-foreground flex h-(--control-height-medium) w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-(--radius-medium) font-medium transition-[border-color,background-color,box-shadow] duration-spring-fast aria-invalid:border-danger aria-invalid:ring-1 aria-invalid:ring-danger/25 disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50 disabled:hover:border-border disabled:hover:bg-transparent motion-reduce:transition-none",N[r()],s()));function D(I){I.detail===0&&!p.open&&(p.open=!0),v()?.(I)}function G(I){const{"aria-activedescendant":y,"aria-label":A,...B}=I;return{...B,role:"combobox","aria-label":typeof A=="string"?A:n(C),"aria-activedescendant":p.open&&typeof y=="string"?y:void 0}}var g={get variant(){return r()},set variant(I="default"){r(I),l()},get class(){return s()},set class(I=""){s(I),l()},get children(){return o()},set children(I){o(I),l()},get child(){return i()},set child(I){i(I),l()},get onclick(){return v()},set onclick(I){v(I),l()},get id(){return _()},set id(I){_(I),l()},get ref(){return m()},set ref(I=null){m(I),l()},$set:re,$on:(I,y)=>ne(e,I,y)},c=q(),L=K(c);{let I=x(()=>p.open?p.listboxId:void 0),y=x(()=>p.invalid||void 0);pe(L,()=>Tr,(A,B)=>{B(A,_e(()=>u,{get id(){return p.triggerId},get"aria-controls"(){return n(I)},get class(){return n(R)},get"aria-invalid"(){return n(y)},onclick:D,get child(){return t},get ref(){return m()},set ref(f){m(f)}}))})}return S(d,c),se(g)}var Io=$("<span> </span>");function Rr(d,e){if(new.target)return te({component:Rr,...d});oe(e,!0);let t=a(e,"placeholder",23,()=>jt.ui_select_value_placeholder());const r=Et("canonical-select");var s={get placeholder(){return t()},set placeholder(v=jt.ui_select_value_placeholder()){t(v),l()},$set:re,$on:(v,_)=>ne(e,v,_)},o=Io(),i=sr(o,!0);return At(()=>{ir(o,1,`min-w-0 flex-1 truncate text-left ${r.value?"text-foreground":"text-muted-foreground"}`),Xr(i,r.displayValue||t())}),S(d,o),se(s)}var Po=$('<span data-slot="menu-list-highlight" class="contents svelte-da0knc" aria-hidden="true"><!></span>');function Lr(d,e){if(new.target)return te({component:Lr,...d});oe(e,!0);let t=a(e,"activeIndex",7),r=a(e,"onactiveindexchange",7),s=Y(null),o=Y(null),i=Y(Zr([])),v=Y(null),_=Y(!1),m=Y(!1),u;const p='[data-menu-item], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]';ve(()=>{n(o)&&t()===void 0&&n(_)&&n(o).activeIndex!==n(v)&&n(o).setActiveIndex(n(v))}),ve(()=>{!n(o)||t()===void 0||n(o).pointerPosition||n(o).setActiveIndex(t())}),ve(()=>{if(!n(o)?.pointerPosition){u=void 0;return}n(o).activeIndex!==u&&(u=n(o).activeIndex,r()?.(n(o).activeIndex))}),Qr(()=>{const b=n(s)?.parentElement;if(!b)return;b.dataset.listOverlay="",b.classList.add("relative","isolate");const R=tn(b,{axis:"xy"});k(o,R);let D=[];const G=w=>w instanceof Element&&(w.matches(p)||w.querySelector(p)),g=w=>w.hasAttribute("data-disabled")||w.getAttribute("aria-disabled")==="true",c=w=>w.dataset.selectionAppearance!=="indicator"&&(w.hasAttribute("data-selected")||w.getAttribute("data-state")==="checked"||w.getAttribute("aria-selected")==="true"||w.getAttribute("aria-checked")==="true"),L=()=>{const w=Array.from(b.querySelectorAll(p)).filter(E=>E.closest("[data-list-overlay]")===b&&!g(E));w.length!==D.length||w.some((E,z)=>E!==D[z])?(D.forEach((E,z)=>R.registerItem(z,null)),D=w,D.forEach((E,z)=>R.registerItem(z,E))):R.measure();const P=D.flatMap((E,z)=>c(E)?[z]:[]);if((P.length!==n(i).length||P.some((E,z)=>E!==n(i)[z]))&&k(i,P,!0),t()===void 0){const E=D.findIndex(z=>z.hasAttribute("data-highlighted")||z===document.activeElement);E>=0&&R.setActiveIndex(E)}},I=new MutationObserver(w=>{w.some(P=>P.type==="attributes"||[...P.addedNodes,...P.removedNodes].some(G))&&L()});I.observe(b,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-highlighted","data-selected","data-state","data-disabled","aria-selected","aria-checked","aria-disabled","data-selection-appearance"]});const y=()=>{const w=D.indexOf(document.activeElement);k(v,w>=0?w:null,!0)},A=()=>{k(m,!1),k(_,!0),y(),Ct().then(()=>{n(_)&&y()})},B=()=>{k(_,!1)},f=()=>{k(m,!1),k(_,!0),y()},V=w=>{const P=w.target instanceof Element?w.target.closest(p):null,E=D.indexOf(P);w.button!==0||E<0||(k(_,!1),k(m,!0),R.setActiveIndex(E))},W=()=>{k(m,!1)},F=w=>{const P=D.indexOf(w.target);k(v,P>=0?P:null,!0),P>=0&&R.setActiveIndex(P)};return b.addEventListener("keydown",A,!0),b.addEventListener("pointermove",B,!0),b.addEventListener("pointerleave",f),b.addEventListener("pointerdown",V),window.addEventListener("pointerup",W),window.addEventListener("pointercancel",W),b.addEventListener("focusin",F),Ct().then(L),()=>{I.disconnect(),b.removeEventListener("keydown",A,!0),b.removeEventListener("pointermove",B,!0),b.removeEventListener("pointerleave",f),b.removeEventListener("pointerdown",V),window.removeEventListener("pointerup",W),window.removeEventListener("pointercancel",W),b.removeEventListener("focusin",F),R.destroy(),k(o,null),delete b.dataset.listOverlay}});var T={get activeIndex(){return t()},set activeIndex(b){t(b),l()},get onactiveindexchange(){return r()},set onactiveindexchange(b){r(b),l()},$set:re,$on:(b,R)=>ne(e,b,R)},O=Po(),C=Z(O);{var N=b=>{{let R=x(()=>n(m)?n(i).includes(n(o).activeIndex??-1)?"bg-hover menu-selection-pressed":"bg-active":"bg-hover");jn(b,{get store(){return n(o)},get selectedIndexes(){return n(i)},get hoverClass(){return n(R)}})}};X(C,b=>{n(o)&&b(N)})}return Q(O),Yn(O,b=>k(s,b),()=>n(s)),At(()=>ar(O,"data-active-index",n(o)?.activeIndex??void 0)),S(d,O),se(T)}const Vr=8;function Jo(d,e,t=24){if(!d)return!0;const r=d.getBoundingClientRect(),s=e+t+Vr;return r.left>=s||d.ownerDocument.documentElement.clientWidth-r.right>=s}var So=$("<div><!> <!></div>"),ko=$("<div><!></div>"),Oo=$("<div><div><!></div></div>");function Dr(d,e){if(new.target)return te({component:Dr,...d});oe(e,!0);const t=y=>{var A=q(),B=K(A);{const f=(V,W)=>{let F=()=>(W?.()).props;var w=So();ee(w,()=>({...F(),id:b.listboxId,role:"listbox","aria-labelledby":b.triggerId,tabindex:"-1"}));var P=Z(w);Lr(P,{});var E=ct(P,2);j(E,()=>T()??ae),Q(w),S(V,w)};pe(B,()=>Er,(V,W)=>{W(V,{get class(){return`relative min-h-0 flex-1 overflow-y-auto p-1.5 ${m()??""}`},child:f,$$slots:{child:!0}})})}S(y,A)},r=(y,A)=>{let B=()=>(A?.()).props;const f=x(()=>D(B()));var V=ko();ee(V,()=>({...n(f),...v()?{id:v()}:{}}));var W=Z(V);t(W),Q(V),Jt(V,F=>i?.(F)),S(y,V)},s=(y,A)=>{let B=()=>(A?.()).props,f=()=>(A?.()).wrapperProps;const V=x(()=>D(B()));var W=Oo();ee(W,()=>({...f(),...v()?{id:v()}:{}}));var F=Z(W);ee(F,()=>({...n(V)}));var w=Z(F);t(w),Q(F),Jt(F,P=>i?.(P)),Q(W),S(y,W)},o=rn(),i=nn();let v=a(e,"wrapperId",7),_=a(e,"class",7,""),m=a(e,"wrapperClass",7,""),u=a(e,"dropUp",7,!1),p=a(e,"portal",7),T=a(e,"children",7);const O=x(()=>u()||p()===!0),C=Jn(),N=Zn(Qn()+2);$n(N);const b=Et("canonical-select");async function R(){const y=document.getElementById(b.triggerId);await Ct(),!b.open&&y?.isConnected&&y.focus({preventScroll:!0})}function D(y){const{role:A,tabindex:B,...f}=y;return f}var G={get wrapperId(){return v()},set wrapperId(y){v(y),l()},get class(){return _()},set class(y=""){_(y),l()},get wrapperClass(){return m()},set wrapperClass(y=""){m(y),l()},get dropUp(){return u()},set dropUp(y=!1){u(y),l()},get portal(){return p()},set portal(y){p(y),l()},get children(){return T()},set children(y){T(y),l()},$set:re,$on:(y,A)=>ne(e,y,A)},g=q(),c=K(g);{var L=y=>{var A=q(),B=K(A);{let f=x(()=>xe(Zt(),"w-full max-h-60",_()));pe(B,()=>Sr,(V,W)=>{W(V,{preventScroll:!1,onEscapeKeydown:R,"data-slot":"select-content","data-static-position":!0,get"data-surface-level"(){return N},get class(){return n(f)},style:"max-width: calc(100vw - var(--space-4));",get child(){return r}})})}S(y,A)},I=y=>{const A=x(()=>p()===void 0&&!u()?C():void 0);var B=q(),f=K(B);{let V=x(()=>!n(O)&&!n(A)),W=x(()=>n(A)??o?.target());pe(f,()=>Wn,(F,w)=>{w(F,{get disabled(){return n(V)},get to(){return n(W)},children:(P,E)=>{var z=q(),ie=K(z);{let Oe=x(()=>n(A)?"absolute":"fixed"),wt=x(()=>n(A)!==void 0),Ee=x(()=>u()?"top":"bottom"),Br=x(()=>xe(Zt(),"w-(--bits-select-anchor-width) max-h-60",_()));pe(ie,()=>Pr,(Wr,Ur)=>{Ur(Wr,{get strategy(){return n(Oe)},get hideWhenDetached(){return n(wt)},onEscapeKeydown:R,"data-slot":"select-content",get"data-surface-level"(){return N},get side(){return n(Ee)},sideOffset:4,get collisionPadding(){return Vr},get class(){return n(Br)},style:"max-width: calc(100vw - var(--space-4));",get child(){return s}})})}S(P,z)},$$slots:{default:!0}})})}S(y,B)};X(c,y=>{b.staticPosition?y(L):y(I,-1)})}return S(d,g),se(G)}var Eo=new Set(["$$slots","$$events","$$legacy","state","class","data-slot"]),Ao=$('<span><span class="relative block h-3.5 w-6 rounded-full bg-muted-foreground/25 transition-colors duration-spring-fast ease-spring-fast data-[state=checked]:bg-foreground/80 motion-reduce:transition-none"><span></span></span></span>'),To=$("<span><!></span>");function Fr(d,e){if(new.target)return te({component:Fr,...d});oe(e,!0);let t=a(e,"state",7),r=a(e,"class",7),s=a(e,"data-slot",7),o=be(e,Eo);var i={get state(){return t()},set state(p){t(p),l()},get class(){return r()},set class(p){r(p),l()},get"data-slot"(){return s()},set"data-slot"(p){s(p),l()},$set:re,$on:(p,T)=>ne(e,p,T)},v=q(),_=K(v);{var m=p=>{var T=Ao();ee(T,N=>({...o,"data-slot":s()??"menu-switch",class:N,"aria-hidden":"true"}),[()=>xe("ml-auto flex h-lh shrink-0 items-center",r())]);var O=Z(T),C=sr(O);Q(T),At(N=>{ar(O,"data-state",t()==="on"?"checked":"unchecked"),ir(C,1,N)},[()=>an(xe("absolute top-0.5 left-0.5 size-2.5 rounded-full bg-popover transition-transform duration-spring-fast ease-spring-fast motion-reduce:transition-none",t()==="on"&&"translate-x-2.5"))]),S(p,T)},u=p=>{var T=To();ee(T,N=>({...o,"data-slot":s()??(t()==="submenu"?"menu-sub-chevron":"menu-item-indicator"),class:N,"aria-hidden":"true"}),[()=>xe(on,t()==="submenu"?"text-muted-foreground":"text-primary-ink",r())]);var O=Z(T);{var C=N=>{{let b=x(()=>t()==="mixed"?qn:t()==="submenu"?zn:Gn),R=x(()=>t()==="submenu"?"calc(var(--space-2) + var(--space-1) / 2)":"var(--menu-icon-size)"),D=x(()=>t()==="submenu"?"size-2.5 rtl:rotate-180":"size-(--menu-icon-size)");mr(N,{get icon(){return n(b)},get size(){return n(R)},get class(){return n(D)}})}};X(O,N=>{t()!=="empty"&&N(C)})}Q(T),S(p,T)};X(_,p=>{t()==="on"||t()==="off"?p(m):p(u,-1)})}return S(d,v),se(i)}var Mo=$('<div class="min-w-0 flex-1 truncate"><!></div> <!>',1);function Kr(d,e){if(new.target)return te({component:Kr,...d});oe(e,!0);let t=a(e,"value",7),r=a(e,"label",7),s=a(e,"disabled",7,!1),o=a(e,"children",7),i=a(e,"class",7,"");var v={get value(){return t()},set value(u){t(u),l()},get label(){return r()},set label(u){r(u),l()},get disabled(){return s()},set disabled(u=!1){s(u),l()},get children(){return o()},set children(u){o(u),l()},get class(){return i()},set class(u=""){i(u),l()},$set:re,$on:(u,p)=>ne(e,u,p)},_=q(),m=K(_);{const u=(C,N)=>{let b=()=>(N?.()).selected;var R=Mo(),D=K(R),G=Z(D);j(G,()=>o()??ae),Q(D);var g=ct(D,2);{let c=x(()=>b()?"checked":"empty");Fr(g,{get state(){return n(c)},"data-slot":"select-item-check"})}S(C,R)};let p=x(()=>r()??t()),T=x(()=>s()||void 0),O=x(()=>xe(Xn(),i()));pe(m,()=>Or,(C,N)=>{N(C,{get value(){return t()},get label(){return n(p)},get disabled(){return s()},get"aria-disabled"(){return n(T)},"data-menu-item":!0,get class(){return n(O)},children:u,$$slots:{default:!0}})})}return S(d,_),se(v)}const Xo={Root:Mr,Trigger:Hr,Value:Rr,Content:Dr,Item:Kr},Ho=(d,e)=>{let t,r;const s=()=>{t||(t=eo(()=>{t=void 0;const v=d.checkVisibility?.()??!0,_=v?d.clientWidth:0,m=v?d.clientHeight:0,u=_>0&&m>0&&(d.scrollWidth>_||d.scrollHeight>m);r?.(),r=to(()=>{r=void 0,e(u)})}))},o=typeof ResizeObserver>"u"?void 0:new ResizeObserver(s),i=new MutationObserver(s);return o?.observe(d),i.observe(d,{childList:!0,characterData:!0,subtree:!0}),document.fonts?.addEventListener("loadingdone",s),s(),{update(v){e=v,s()},destroy(){t?.(),r?.(),o?.disconnect(),i.disconnect(),document.fonts?.removeEventListener("loadingdone",s)}}},Zo=(d,e)=>{let t=e;const r=o=>{t&&(o||t.trim()!==d.textContent?.trim())?d.title=t:d.removeAttribute("title")},s=Ho(d,r);return{update(o){t=o,s?.update?.(r)},destroy(){s?.destroy?.(),d.removeAttribute("title")}}};export{Ir as F,yr as H,Fr as M,Vr as O,Xo as S,Lr as a,rr as b,tr as c,er as d,ho as e,Pr as f,Sr as g,gt as h,Or as i,Er as j,Jo as k,Ho as o,Zo as t};
@@ -1 +1 @@
1
- import{t as le,br as u,a_ as D,bz as ce,b as ve}from"./CGWRZzdk.js";import{bs as de,ca as fe,aD as e,a5 as H,bS as ue,bA as L,bH as K,b_ as S,W as T,bn as ge,bV as P,c9 as x,aA as g,a7 as me,ay as he,bl as pe,bO as be,aB as z}from"./DYhIMPy1.js";import{v as X,u as c,n as _e,w as R}from"./B70m4__L.js";import{s as ke}from"./BEyWfhqM.js";import{b as we}from"./BaIAhI85.js";import{t as j}from"./BOTuR8YM.js";import{A as xe}from"./D4oIU9K_.js";import{s as We}from"./B80iSE3f.js";function Ie(W){const{itemCount:a,maxVisible:v,availableWidth:r,surface:s,overlap:b,overflowOverlap:d}=W;if(r<=0)return 0;const _=s-b,m=Math.min(a,Math.max(0,v)),y=i=>i===0?0:s+(i-1)*_;if(a<=m&&y(a)<=r)return a;for(let i=m;i>=0;i-=1){const A=a-i;if(y(i)+(A>0?W.measureOverflowText(A)-(i>0?d:0):0)<=r)return i}return 0}function ye(W,a=r=>requestAnimationFrame(r),v=r=>cancelAnimationFrame(r)){let r,s;return{set(b){if(r=b,s!==void 0)return;let d=!1;const _=a(()=>{d=!0,s=void 0;const m=r;r=void 0,W(m)});d||(s=_)},cancel(){s!==void 0&&(v(s),s=void 0),r=void 0}}}const Ae=20,Ce=12;let O,J;const Q=new Map;var Te=z('<span data-agent-avatar-stack-item=""><!></span>'),Oe=z('<span class="agent-avatar-stack-track svelte-1nk9fhe"></span>'),Ve=z('<span class="agent-avatar-stack-overflow svelte-1nk9fhe" data-agent-avatar-overflow=""> </span>'),Me=z('<span data-agent-avatar-stack="" data-agent-avatar-stack-overlap="later-on-top"><!> <!></span>');function Se(W,a){if(new.target)return le({component:Se,...W});de(a,!0);let v=u(a,"items",7),r=u(a,"maxVisible",7,3),s=u(a,"adaptive",7,!1),b=u(a,"align",7,"end"),d=u(a,"variant",7,"card-stack"),_=u(a,"interactive",7,!1),m=u(a,"overflowId",7),y=u(a,"overflowTestId",7),i=u(a,"itemContent",7),A=u(a,"class",7,""),I=P(void 0),F=P(void 0);const h=x(()=>We[d()]),U=x(()=>s()&&e(F)!==void 0?Ie({itemCount:v().length,maxVisible:r(),availableWidth:e(F),surface:e(h).surface,overlap:e(h).overlap,overflowOverlap:e(h).overlap,measureOverflowText:t=>Math.max(e(h).surface,$(t)+Ce)}):void 0),Y=x(()=>Math.min(v().length,Math.max(0,s()?e(U)??r():r()))),k=x(()=>v().slice(0,e(Y))),E=x(()=>Math.max(0,v().length-e(k).length)),N=x(()=>e(h).surface-e(h).overlap),Z=x(()=>e(k).length===0?0:e(h).surface+(e(k).length-1)*e(N));function $(t){const n=`+${j(t)}`,o=Q.get(n);if(o!==void 0)return o;if(O===void 0&&(O=document.createElement("canvas").getContext("2d")),!O||!e(I))return Ae;J??=`500 12px ${getComputedStyle(e(I)).fontFamily}`,O.font=J;const l=O.measureText(n).width;return Q.set(n,l),l}fe(()=>{if(!s()||!e(I)||typeof ResizeObserver>"u")return;const t=ye(o=>{K(F,o,!0)}),n=new ResizeObserver(o=>{const l=o[o.length-1];t.set(l.borderBoxSize?.[0]?.inlineSize??l.contentRect.width)});return n.observe(e(I)),()=>{n.disconnect(),t.cancel()}});var ee={get items(){return v()},set items(t){v(t),g()},get maxVisible(){return r()},set maxVisible(t=3){r(t),g()},get adaptive(){return s()},set adaptive(t=!1){s(t),g()},get align(){return b()},set align(t="end"){b(t),g()},get variant(){return d()},set variant(t="card-stack"){d(t),g()},get interactive(){return _()},set interactive(t=!1){_(t),g()},get overflowId(){return m()},set overflowId(t){m(t),g()},get overflowTestId(){return y()},set overflowTestId(t){y(t),g()},get itemContent(){return i()},set itemContent(t){i(t),g()},get class(){return A()},set class(t=""){A(t),g()},$set:ce,$on:(t,n)=>ve(a,t,n)},p=Me();let q;var B=H(p);{var te=t=>{var n=Oe();let o;_e(n,23,()=>e(k),l=>l.key,(l,w,V)=>{var f=Te();let G;var re=H(f);{var se=C=>{var M=me(),oe=he(M);ke(oe,i,()=>e(w)),T(C,M)},ie=C=>{{let M=x(()=>e(w).state??"idle");xe(C,{get agentId(){return e(w).agentId},get specialist(){return e(w).specialist},get icon(){return e(w).icon},get state(){return e(M)},get variant(){return d()},class:"agent-avatar-stack-surface"})}};D(re,C=>{i()?C(se):C(ie,-1)})}L(f),S(()=>{G=X(f,1,"agent-avatar-stack-item svelte-1nk9fhe",null,G,{"agent-avatar-stack-item--before-overflow":e(E)>0&&e(V)===e(k).length-1}),R(f,`inset-inline-start: ${e(V)*e(N)}px; z-index: ${e(V)+1};`),c(f,"data-agent-avatar-stack-index",e(V)),c(f,"data-agent-avatar-stack-key",e(w).key),c(f,"data-agent-avatar-stack-agent-id",e(w).agentId),c(f,"data-agent-avatar-stack-specialist",e(w).specialist??void 0),c(f,"aria-hidden",_()?void 0:"true")}),T(l,f)}),L(n),S(()=>o=R(n,"",o,{width:`${e(Z)}px`})),T(t,n)};D(B,t=>{e(k).length>0&&t(te)})}var ae=ue(B,2);{var ne=t=>{var n=Ve(),o=pe(n);S(l=>{c(n,"id",m()),R(n,`margin-inline-start: ${e(k).length>0?-e(h).overlap:0}px; z-index: ${e(k).length+1};`),c(n,"data-testid",y()),be(o,`+${l??""}`)},[()=>j(e(E))]),T(t,n)};D(ae,t=>{e(E)>0&&t(ne)})}return L(p),we(p,t=>K(I,t),()=>e(I)),S(()=>{q=X(p,1,`agent-avatar-stack ${A()??""}`,"svelte-1nk9fhe",q,{"agent-avatar-stack--adaptive":s(),"agent-avatar-stack--start":b()==="start"}),c(p,"data-agent-avatar-stack-align",b()),c(p,"data-avatar-variant",d()),c(p,"data-agent-avatar-stack-clear-space",e(h).ring),c(p,"aria-hidden",!_()&&!m()?"true":void 0)}),T(W,p),ge(ee)}export{Se as A};
1
+ import{t as le,br as u,a_ as D,bz as ce,b as ve}from"./CGWRZzdk.js";import{bs as de,ca as fe,aD as e,a5 as H,bS as ue,bA as L,bH as K,b_ as S,W as T,bn as ge,bV as P,c9 as x,aA as g,a7 as me,ay as he,bl as pe,bO as be,aB as z}from"./DYhIMPy1.js";import{v as X,u as c,n as _e,w as R}from"./B70m4__L.js";import{s as ke}from"./BEyWfhqM.js";import{b as we}from"./BaIAhI85.js";import{t as j}from"./BOTuR8YM.js";import{A as xe}from"./Ae-1QeEg.js";import{s as We}from"./G8V-Z8rX.js";function Ie(W){const{itemCount:a,maxVisible:v,availableWidth:r,surface:s,overlap:b,overflowOverlap:d}=W;if(r<=0)return 0;const _=s-b,m=Math.min(a,Math.max(0,v)),y=i=>i===0?0:s+(i-1)*_;if(a<=m&&y(a)<=r)return a;for(let i=m;i>=0;i-=1){const A=a-i;if(y(i)+(A>0?W.measureOverflowText(A)-(i>0?d:0):0)<=r)return i}return 0}function ye(W,a=r=>requestAnimationFrame(r),v=r=>cancelAnimationFrame(r)){let r,s;return{set(b){if(r=b,s!==void 0)return;let d=!1;const _=a(()=>{d=!0,s=void 0;const m=r;r=void 0,W(m)});d||(s=_)},cancel(){s!==void 0&&(v(s),s=void 0),r=void 0}}}const Ae=20,Ce=12;let O,J;const Q=new Map;var Te=z('<span data-agent-avatar-stack-item=""><!></span>'),Oe=z('<span class="agent-avatar-stack-track svelte-1nk9fhe"></span>'),Ve=z('<span class="agent-avatar-stack-overflow svelte-1nk9fhe" data-agent-avatar-overflow=""> </span>'),Me=z('<span data-agent-avatar-stack="" data-agent-avatar-stack-overlap="later-on-top"><!> <!></span>');function Se(W,a){if(new.target)return le({component:Se,...W});de(a,!0);let v=u(a,"items",7),r=u(a,"maxVisible",7,3),s=u(a,"adaptive",7,!1),b=u(a,"align",7,"end"),d=u(a,"variant",7,"card-stack"),_=u(a,"interactive",7,!1),m=u(a,"overflowId",7),y=u(a,"overflowTestId",7),i=u(a,"itemContent",7),A=u(a,"class",7,""),I=P(void 0),F=P(void 0);const h=x(()=>We[d()]),U=x(()=>s()&&e(F)!==void 0?Ie({itemCount:v().length,maxVisible:r(),availableWidth:e(F),surface:e(h).surface,overlap:e(h).overlap,overflowOverlap:e(h).overlap,measureOverflowText:t=>Math.max(e(h).surface,$(t)+Ce)}):void 0),Y=x(()=>Math.min(v().length,Math.max(0,s()?e(U)??r():r()))),k=x(()=>v().slice(0,e(Y))),E=x(()=>Math.max(0,v().length-e(k).length)),N=x(()=>e(h).surface-e(h).overlap),Z=x(()=>e(k).length===0?0:e(h).surface+(e(k).length-1)*e(N));function $(t){const n=`+${j(t)}`,o=Q.get(n);if(o!==void 0)return o;if(O===void 0&&(O=document.createElement("canvas").getContext("2d")),!O||!e(I))return Ae;J??=`500 12px ${getComputedStyle(e(I)).fontFamily}`,O.font=J;const l=O.measureText(n).width;return Q.set(n,l),l}fe(()=>{if(!s()||!e(I)||typeof ResizeObserver>"u")return;const t=ye(o=>{K(F,o,!0)}),n=new ResizeObserver(o=>{const l=o[o.length-1];t.set(l.borderBoxSize?.[0]?.inlineSize??l.contentRect.width)});return n.observe(e(I)),()=>{n.disconnect(),t.cancel()}});var ee={get items(){return v()},set items(t){v(t),g()},get maxVisible(){return r()},set maxVisible(t=3){r(t),g()},get adaptive(){return s()},set adaptive(t=!1){s(t),g()},get align(){return b()},set align(t="end"){b(t),g()},get variant(){return d()},set variant(t="card-stack"){d(t),g()},get interactive(){return _()},set interactive(t=!1){_(t),g()},get overflowId(){return m()},set overflowId(t){m(t),g()},get overflowTestId(){return y()},set overflowTestId(t){y(t),g()},get itemContent(){return i()},set itemContent(t){i(t),g()},get class(){return A()},set class(t=""){A(t),g()},$set:ce,$on:(t,n)=>ve(a,t,n)},p=Me();let q;var B=H(p);{var te=t=>{var n=Oe();let o;_e(n,23,()=>e(k),l=>l.key,(l,w,V)=>{var f=Te();let G;var re=H(f);{var se=C=>{var M=me(),oe=he(M);ke(oe,i,()=>e(w)),T(C,M)},ie=C=>{{let M=x(()=>e(w).state??"idle");xe(C,{get agentId(){return e(w).agentId},get specialist(){return e(w).specialist},get icon(){return e(w).icon},get state(){return e(M)},get variant(){return d()},class:"agent-avatar-stack-surface"})}};D(re,C=>{i()?C(se):C(ie,-1)})}L(f),S(()=>{G=X(f,1,"agent-avatar-stack-item svelte-1nk9fhe",null,G,{"agent-avatar-stack-item--before-overflow":e(E)>0&&e(V)===e(k).length-1}),R(f,`inset-inline-start: ${e(V)*e(N)}px; z-index: ${e(V)+1};`),c(f,"data-agent-avatar-stack-index",e(V)),c(f,"data-agent-avatar-stack-key",e(w).key),c(f,"data-agent-avatar-stack-agent-id",e(w).agentId),c(f,"data-agent-avatar-stack-specialist",e(w).specialist??void 0),c(f,"aria-hidden",_()?void 0:"true")}),T(l,f)}),L(n),S(()=>o=R(n,"",o,{width:`${e(Z)}px`})),T(t,n)};D(B,t=>{e(k).length>0&&t(te)})}var ae=ue(B,2);{var ne=t=>{var n=Ve(),o=pe(n);S(l=>{c(n,"id",m()),R(n,`margin-inline-start: ${e(k).length>0?-e(h).overlap:0}px; z-index: ${e(k).length+1};`),c(n,"data-testid",y()),be(o,`+${l??""}`)},[()=>j(e(E))]),T(t,n)};D(ae,t=>{e(E)>0&&t(ne)})}return L(p),we(p,t=>K(I,t),()=>e(I)),S(()=>{q=X(p,1,`agent-avatar-stack ${A()??""}`,"svelte-1nk9fhe",q,{"agent-avatar-stack--adaptive":s(),"agent-avatar-stack--start":b()==="start"}),c(p,"data-agent-avatar-stack-align",b()),c(p,"data-avatar-variant",d()),c(p,"data-agent-avatar-stack-clear-space",e(h).ring),c(p,"aria-hidden",!_()&&!m()?"true":void 0)}),T(W,p),ge(ee)}export{Se as A};
@@ -1 +1 @@
1
- import{D as C}from"./BjR5YHwh.js";import{t as re,br as y,a_ as se,bz as ae,b as ne,bp as I}from"./CGWRZzdk.js";import{bs as ie,cb as oe,c5 as le,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as ce,bV as q,c9 as z,aA as x,ay as F,bl as N,bS as H,bO as O,a7 as de,aB as P}from"./DYhIMPy1.js";import{G as ue}from"./BZcL1stl.js";import{u as D}from"./B70m4__L.js";import{a as me}from"./Z0Qp96mA.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function L(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,u=t[e];if(u===void 0)return{complete:!1};if(u==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(u==="{"||u==="["){const r=u==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let o="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(o=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${o}`:o:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[o]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function V(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!L(t)||!L(t.model))return null;const e=t.model,s=(o,g)=>Array.isArray(o)?o.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const o=new Set(a.map(({id:m})=>m)),g=n.filter(m=>m.nodeIds.every(A=>o.has(A))),v=new Set(g.map(({id:m})=>m)),_=a.filter(m=>m.group===void 0||v.has(m.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:o})=>o)),f=J(s(e.edges,K.shape.edges.element)).filter(o=>d.has(o.from)&&d.has(o.to)),u=new Set(f.map(({id:o})=>o)),r=new Set(n.map(({id:o})=>o)),c=J(s(t.states,pe)).filter(o=>V(o,d,u,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(o=>o.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function U(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),u=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!u.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!V(r,d,f,u))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Ne(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=U(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=U(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ie(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),u=q(null),r=q(0),c="",h,o=!1;oe(()=>{const i=s(),p=n(),w=d(),S=a(),B=!!l();le(()=>{o&&(w!==h||!p.startsWith(c))&&(k(u,null),k(r,b(r)+1)),o=!0,c=p,h=w,B||!S&&!i?k(u,null):i&&k(u,i,!0)})});const g=z(()=>l()?null:s()??(a()?b(u):null)),v=z(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(i){s(i),x()},get isStreaming(){return a()},set isStreaming(i=!1){a(i),x()},get source(){return n()},set source(i){n(i),x()},get sourceError(){return l()},set sourceError(i){l(i),x()},get viewResetKey(){return d()},set viewResetKey(i){d(i),x()},get onBindingClick(){return f()},set onBindingClick(i){f(i),x()},$set:ae,$on:(i,p)=>ne(e,i,p)},m=Se(),A=G(m);{var M=i=>{var p=he(),w=F(p),S=G(w),B=N(S,!0),X=H(S,2),Y=N(X,!0);W(w);var j=H(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(i,p)},Q=i=>{var p=de(),w=F(p);ue(w,()=>b(r),S=>{me(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(i,p)},T=i=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(i,p)};se(A,i=>{b(v)?i(M):b(g)?i(Q,1):i(T,-1)})}return W(m),R(()=>{D(m,"aria-busy",a()),D(m,"data-diagram-streaming",a())}),E(t,m),ce(_)}export{_e as S,Ne as p};
1
+ import{D as C}from"./DJL0zbbT.js";import{t as re,br as y,a_ as se,bz as ae,b as ne,bp as I}from"./CGWRZzdk.js";import{bs as ie,cb as oe,c5 as le,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as ce,bV as q,c9 as z,aA as x,ay as F,bl as N,bS as H,bO as O,a7 as de,aB as P}from"./DYhIMPy1.js";import{G as ue}from"./Bhmm0Csf.js";import{u as D}from"./B70m4__L.js";import{a as me}from"./CTjSHpOw.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function L(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,u=t[e];if(u===void 0)return{complete:!1};if(u==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(u==="{"||u==="["){const r=u==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let o="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(o=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${o}`:o:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[o]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function V(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!L(t)||!L(t.model))return null;const e=t.model,s=(o,g)=>Array.isArray(o)?o.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const o=new Set(a.map(({id:m})=>m)),g=n.filter(m=>m.nodeIds.every(A=>o.has(A))),v=new Set(g.map(({id:m})=>m)),_=a.filter(m=>m.group===void 0||v.has(m.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:o})=>o)),f=J(s(e.edges,K.shape.edges.element)).filter(o=>d.has(o.from)&&d.has(o.to)),u=new Set(f.map(({id:o})=>o)),r=new Set(n.map(({id:o})=>o)),c=J(s(t.states,pe)).filter(o=>V(o,d,u,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(o=>o.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function U(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),u=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!u.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!V(r,d,f,u))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Ne(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=U(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=U(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ie(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),u=q(null),r=q(0),c="",h,o=!1;oe(()=>{const i=s(),p=n(),w=d(),S=a(),B=!!l();le(()=>{o&&(w!==h||!p.startsWith(c))&&(k(u,null),k(r,b(r)+1)),o=!0,c=p,h=w,B||!S&&!i?k(u,null):i&&k(u,i,!0)})});const g=z(()=>l()?null:s()??(a()?b(u):null)),v=z(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(i){s(i),x()},get isStreaming(){return a()},set isStreaming(i=!1){a(i),x()},get source(){return n()},set source(i){n(i),x()},get sourceError(){return l()},set sourceError(i){l(i),x()},get viewResetKey(){return d()},set viewResetKey(i){d(i),x()},get onBindingClick(){return f()},set onBindingClick(i){f(i),x()},$set:ae,$on:(i,p)=>ne(e,i,p)},m=Se(),A=G(m);{var M=i=>{var p=he(),w=F(p),S=G(w),B=N(S,!0),X=H(S,2),Y=N(X,!0);W(w);var j=H(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(i,p)},Q=i=>{var p=de(),w=F(p);ue(w,()=>b(r),S=>{me(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(i,p)},T=i=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(i,p)};se(A,i=>{b(v)?i(M):b(g)?i(Q,1):i(T,-1)})}return W(m),R(()=>{D(m,"aria-busy",a()),D(m,"data-diagram-streaming",a())}),E(t,m),ce(_)}export{_e as S,Ne as p};
@@ -1 +1 @@
1
- import{v as c}from"./WFvSJ9zU.js";import{a4 as t}from"./q__vWBPL.js";function a(n){return n.connections?.windowBackendId??t}function i(n,e){return e===t?n:`backend:${e}:${n}`}function*s(){return yield*c(a)}export{a as g,i as n,s};
1
+ import{v as c}from"./WFvSJ9zU.js";import{a4 as t}from"./CnZcDXmL.js";function a(n){return n.connections?.windowBackendId??t}function i(n,e){return e===t?n:`backend:${e}:${n}`}function*s(){return yield*c(a)}export{a as g,i as n,s};