@intent-hq/web 2.383.6 → 2.383.7

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 (147) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{BZxyR-1L.js → 1VDAs3Ud.js} +1 -1
  3. package/web/app/immutable/chunks/{B0iC7Hp2.js → 38BB0grB.js} +1 -1
  4. package/web/app/immutable/chunks/{Day2rmDJ.js → 3FaPVDTk.js} +1 -1
  5. package/web/app/immutable/chunks/{w2q0NJFW.js → 51Rp6_AF.js} +1 -1
  6. package/web/app/immutable/chunks/{BYsxLCZX.js → 5moVT_HQ.js} +1 -1
  7. package/web/app/immutable/chunks/{syIfkUtY.js → 7da8sugr.js} +2 -2
  8. package/web/app/immutable/chunks/{C9Ea_4DW.js → 8MucyzZK.js} +1 -1
  9. package/web/app/immutable/chunks/{Dx_8-INB.js → 96gE90DS.js} +1 -1
  10. package/web/app/immutable/chunks/{BsuKoRte.js → 9KbPq6ne.js} +1 -1
  11. package/web/app/immutable/chunks/{eJ7uL4LD.js → 9p0DyBPU.js} +1 -1
  12. package/web/app/immutable/chunks/{DML-1n7e.js → B0SuIES7.js} +1 -1
  13. package/web/app/immutable/chunks/{lkgbZnYm.js → B3WV7a-V.js} +1 -1
  14. package/web/app/immutable/chunks/{CXqdP_ch.js → B3zWdyp-.js} +1 -1
  15. package/web/app/immutable/chunks/{D3KbOo9x.js → B6ERx__s.js} +2 -2
  16. package/web/app/immutable/chunks/{DAi59CB_.js → B6q3uVQG.js} +1 -1
  17. package/web/app/immutable/chunks/{BdReS-5Z.js → B7ZVMWBx.js} +1 -1
  18. package/web/app/immutable/chunks/{FKyiybGz.js → B91a7NqB.js} +1 -1
  19. package/web/app/immutable/chunks/{CgCfiUM-.js → B9bXgFyu.js} +2 -2
  20. package/web/app/immutable/chunks/{DDWXzJJL.js → BB2DpGJV.js} +1 -1
  21. package/web/app/immutable/chunks/{ByGaQPue.js → BBrT6DIB.js} +1 -1
  22. package/web/app/immutable/chunks/{RnZ98Lx7.js → BGm3f58g.js} +1 -1
  23. package/web/app/immutable/chunks/{dpO6awDJ.js → BIsdYrnK.js} +1 -1
  24. package/web/app/immutable/chunks/{qEaQygdG.js → BM2XSA6g.js} +1 -1
  25. package/web/app/immutable/chunks/{B51SeJXG.js → BUDFO3oC.js} +1 -1
  26. package/web/app/immutable/chunks/{B5R37z34.js → BUchcLc3.js} +3 -3
  27. package/web/app/immutable/chunks/{C8iCqYhc.js → BXMl8g0k.js} +1 -1
  28. package/web/app/immutable/chunks/{CqcYFh8j.js → BZ1Q38PM.js} +1 -1
  29. package/web/app/immutable/chunks/{6mKf423T.js → BbHdeR3v.js} +1 -1
  30. package/web/app/immutable/chunks/{3lsVHf6U.js → BcQ6Rg0V.js} +1 -1
  31. package/web/app/immutable/chunks/{1a7PBgFk.js → BcUHkjB6.js} +1 -1
  32. package/web/app/immutable/chunks/{DqUfbKVJ.js → Bf16PEz1.js} +1 -1
  33. package/web/app/immutable/chunks/{CIWayVej.js → BfSTFUKA.js} +1 -1
  34. package/web/app/immutable/chunks/{DAj3--4v.js → BgZpMc5-.js} +1 -1
  35. package/web/app/immutable/chunks/{3gdcau2g.js → BgjaD_Yy.js} +1 -1
  36. package/web/app/immutable/chunks/{xCOOeB5y.js → BhcBqtJg.js} +1 -1
  37. package/web/app/immutable/chunks/{JbVFIGCp.js → BtI19qHa.js} +40 -40
  38. package/web/app/immutable/chunks/{CBh3oApX.js → Bwa_PJLB.js} +1 -1
  39. package/web/app/immutable/chunks/{BzuFQ4uC.js → Byb6yuNY.js} +1 -1
  40. package/web/app/immutable/chunks/{Bp4RMAg2.js → C1IZMhCT.js} +1 -1
  41. package/web/app/immutable/chunks/{BDATxlJG.js → C1dPOfxb.js} +4 -4
  42. package/web/app/immutable/chunks/{BBIYuEK_.js → C2BnXWav.js} +1 -1
  43. package/web/app/immutable/chunks/{DtmCgGP_.js → C3KL0Dob.js} +2 -2
  44. package/web/app/immutable/chunks/{DYVqPPax.js → C4ItHUxb.js} +1 -1
  45. package/web/app/immutable/chunks/{B5lAxopi.js → C56HY_cI.js} +1 -1
  46. package/web/app/immutable/chunks/{DfNht_cf.js → C5H3ErAr.js} +1 -1
  47. package/web/app/immutable/chunks/{CAgJTEqX.js → C8ZC1xrW.js} +1 -1
  48. package/web/app/immutable/chunks/{Cb0qNR4H.js → C91EC830.js} +1 -1
  49. package/web/app/immutable/chunks/{D85Dkv1L.js → C9fVl7VH.js} +1 -1
  50. package/web/app/immutable/chunks/{BlU12h14.js → CE-gn8fg.js} +1 -1
  51. package/web/app/immutable/chunks/{BYBhz2vc.js → CEOk8g-Q.js} +3 -3
  52. package/web/app/immutable/chunks/{BNbuor20.js → CEl8yEuC.js} +1 -1
  53. package/web/app/immutable/chunks/{BhFoVE_t.js → CIeXUP7u.js} +1 -1
  54. package/web/app/immutable/chunks/{x8QjiOrF.js → CKjysSbd.js} +1 -1
  55. package/web/app/immutable/chunks/{RwU8EQ7-.js → CLUxyZqF.js} +1 -1
  56. package/web/app/immutable/chunks/{WIWu6pzv.js → CPIZev3Z.js} +1 -1
  57. package/web/app/immutable/chunks/{e2T92U2C.js → CQlHJWbs.js} +3 -3
  58. package/web/app/immutable/chunks/{IcuTx12D.js → CQvGDYQV.js} +1 -1
  59. package/web/app/immutable/chunks/{DayBneSF.js → CS3H-hA4.js} +1 -1
  60. package/web/app/immutable/chunks/{C5I-aQNv.js → CTYV2WCR.js} +1 -1
  61. package/web/app/immutable/chunks/{CChkl_5h.js → C_1zy40-.js} +1 -1
  62. package/web/app/immutable/chunks/{DGdXhwsJ.js → CaCH7xka.js} +1 -1
  63. package/web/app/immutable/chunks/{DsevRTZh.js → CaVcxIX_.js} +1 -1
  64. package/web/app/immutable/chunks/{BHzfXdU-.js → Cb9atCGq.js} +1 -1
  65. package/web/app/immutable/chunks/{Bx7gEyNR.js → CdDve0EN.js} +1 -1
  66. package/web/app/immutable/chunks/{DTFjA6nd.js → CmbyIv2W.js} +1 -1
  67. package/web/app/immutable/chunks/{CjJvlfCr.js → Cpw-AI-k.js} +4 -4
  68. package/web/app/immutable/chunks/{DoDP-NJt.js → CqEyPGwj.js} +1 -1
  69. package/web/app/immutable/chunks/{606ykLjp.js → CqhHB0m1.js} +3 -3
  70. package/web/app/immutable/chunks/{C6UuYHLt.js → CtCH4W1N.js} +1 -1
  71. package/web/app/immutable/chunks/{DrK3Y0uD.js → CteMcmUe.js} +2 -2
  72. package/web/app/immutable/chunks/{CeGEVvKd.js → Cxb8aRlA.js} +2 -2
  73. package/web/app/immutable/chunks/{BxTLs9JS.js → Cxs-r6qH.js} +1 -1
  74. package/web/app/immutable/chunks/{DSpm6A1W.js → CzMfcD76.js} +2 -2
  75. package/web/app/immutable/chunks/{DUJWrM6V.js → CzRvdM50.js} +3 -3
  76. package/web/app/immutable/chunks/{CDr_0i5Z.js → D14F6Zen.js} +1 -1
  77. package/web/app/immutable/chunks/{DwEGyXAz.js → D1Kvaw2U.js} +1 -1
  78. package/web/app/immutable/chunks/{UmmBf5TK.js → D8bef7T8.js} +1 -1
  79. package/web/app/immutable/chunks/{pAMHAQGK.js → DBOkAv2-.js} +1 -1
  80. package/web/app/immutable/chunks/{DswCtQ8W.js → DCzWLn9w.js} +1 -1
  81. package/web/app/immutable/chunks/{B2REQkHq.js → DGP-y2GB.js} +3 -3
  82. package/web/app/immutable/chunks/{CfOfDsl2.js → DGSdOlov.js} +1 -1
  83. package/web/app/immutable/chunks/{DA6FwFPA.js → DITUyjV2.js} +3 -3
  84. package/web/app/immutable/chunks/{DOXAHHuz.js → DLS35Cs2.js} +2 -2
  85. package/web/app/immutable/chunks/{CHTaR4fl.js → DMVD9ZWm.js} +1 -1
  86. package/web/app/immutable/chunks/{Cm4ptdH4.js → DOAyQZ8n.js} +1 -1
  87. package/web/app/immutable/chunks/{okU6lEoA.js → DQZ6hbu0.js} +1 -1
  88. package/web/app/immutable/chunks/{gXSh3Rqp.js → DT_iJHxn.js} +1 -1
  89. package/web/app/immutable/chunks/{7EHgRnzQ.js → D_Fe9jJy.js} +1 -1
  90. package/web/app/immutable/chunks/{CHoUTmhW.js → DaLNZosE.js} +1 -1
  91. package/web/app/immutable/chunks/{DTpKHtQ2.js → DbD3dAy_.js} +1 -1
  92. package/web/app/immutable/chunks/{vpidVnoK.js → Dc0NoKVI.js} +1 -1
  93. package/web/app/immutable/chunks/{DODT78Qk.js → Dd6jkKNK.js} +1 -1
  94. package/web/app/immutable/chunks/{BpIice81.js → DggzSry-.js} +1 -1
  95. package/web/app/immutable/chunks/{BsHKPA8J.js → DgiZ-0Sp.js} +2 -2
  96. package/web/app/immutable/chunks/{D1gev-Oa.js → DhQSNgxc.js} +1 -1
  97. package/web/app/immutable/chunks/{BxQcCpea.js → Dj8digI5.js} +1 -1
  98. package/web/app/immutable/chunks/{BTtB75CV.js → Dl2c_Q4j.js} +1 -1
  99. package/web/app/immutable/chunks/{D93FnkSV.js → Dl4B5sLX.js} +1 -1
  100. package/web/app/immutable/chunks/{BmRtsF0k.js → DnNC4gf3.js} +3 -3
  101. package/web/app/immutable/chunks/{C2307jRD.js → DqH-hVUa.js} +1 -1
  102. package/web/app/immutable/chunks/{DPTzvpZC.js → DqMZWY-u.js} +2 -2
  103. package/web/app/immutable/chunks/{DMtuN9wu.js → Dqhi5681.js} +1 -1
  104. package/web/app/immutable/chunks/{CbazPhvO.js → DsCz_Hld.js} +1 -1
  105. package/web/app/immutable/chunks/{D0a_zKAq.js → DtekCANZ.js} +1 -1
  106. package/web/app/immutable/chunks/{wUEfWFO0.js → DwDabzpx.js} +1 -1
  107. package/web/app/immutable/chunks/{ZAGtf4QC.js → DyIsX23v.js} +4 -4
  108. package/web/app/immutable/chunks/{DPpIdNvg.js → FoSxZj2s.js} +1 -1
  109. package/web/app/immutable/chunks/{Zc9S8AIT.js → NaXnyxXD.js} +1 -1
  110. package/web/app/immutable/chunks/{BBdixUsX.js → NqwdDVdt.js} +1 -1
  111. package/web/app/immutable/chunks/{umMyGIUt.js → Q16zd2xh.js} +1 -1
  112. package/web/app/immutable/chunks/{oZzpgNB8.js → SDBQMo24.js} +1 -1
  113. package/web/app/immutable/chunks/{Bhl-6bQ6.js → SSdhXyvx.js} +1 -1
  114. package/web/app/immutable/chunks/{C-HPMTfc.js → SnC5sLK-.js} +1 -1
  115. package/web/app/immutable/chunks/{BRdwblgo.js → SwH0lZVC.js} +1 -1
  116. package/web/app/immutable/chunks/{Cv71FrWX.js → Y3x17kvu.js} +1 -1
  117. package/web/app/immutable/chunks/{BNK8isss.js → ZtnoAnS2.js} +1 -1
  118. package/web/app/immutable/chunks/{CdyTEe8y.js → amTgh_yM.js} +1 -1
  119. package/web/app/immutable/chunks/{Cyc867L5.js → aoCeefP4.js} +1 -1
  120. package/web/app/immutable/chunks/{bQJcjDVH.js → cWnGUUZk.js} +1 -1
  121. package/web/app/immutable/chunks/{BFKNHcgD.js → i2uLOz57.js} +1 -1
  122. package/web/app/immutable/chunks/{C2XGUcnW.js → lFCyJLs0.js} +1 -1
  123. package/web/app/immutable/chunks/{DT4Cgjmu.js → lQcc1B6x.js} +1 -1
  124. package/web/app/immutable/chunks/{DdYRxRPc.js → lzc_ALaY.js} +1 -1
  125. package/web/app/immutable/chunks/{Dvrtbry_.js → m2kIPDiE.js} +1 -1
  126. package/web/app/immutable/chunks/{BlU2v4uc.js → tV0w-z-Q.js} +1 -1
  127. package/web/app/immutable/chunks/{DhHELjW9.js → veocPVpA.js} +1 -1
  128. package/web/app/immutable/chunks/{8o9CPlKy.js → xGj0i83D.js} +6 -6
  129. package/web/app/immutable/entry/{app.DTU8Ib8_.js → app.oKB02DpO.js} +2 -2
  130. package/web/app/immutable/entry/start.MWx9NKvl.js +1 -0
  131. package/web/app/immutable/nodes/{0.DSHPaYBf.js → 0.Cj75U9Pb.js} +1 -1
  132. package/web/app/immutable/nodes/{1.DKliZtsI.js → 1.COmRB5Gs.js} +1 -1
  133. package/web/app/immutable/nodes/{10.mXAnRqVu.js → 10.B-EGmrBP.js} +4 -4
  134. package/web/app/immutable/nodes/{11.BNoZ2Awp.js → 11.CHJVqhXh.js} +1 -1
  135. package/web/app/immutable/nodes/{15.CklBb62Z.js → 15.DvvqcqqW.js} +1 -1
  136. package/web/app/immutable/nodes/{19.BxZ4y2DZ.js → 19.CFGkesVY.js} +2 -2
  137. package/web/app/immutable/nodes/{2.DZmz8fq0.js → 2.BSKohF8j.js} +4 -4
  138. package/web/app/immutable/nodes/{3.umir6RZQ.js → 3.CgM283V9.js} +1 -1
  139. package/web/app/immutable/nodes/{4.BN-AJGgH.js → 4.pSSQL5ZR.js} +1 -1
  140. package/web/app/immutable/nodes/{5.BbafFHWz.js → 5.gjcZy0Yo.js} +1 -1
  141. package/web/app/immutable/nodes/{6.Zsgk8jus.js → 6.mfPH3Xl6.js} +1 -1
  142. package/web/app/immutable/nodes/{7.ChjI-TG1.js → 7.hkLeTg6x.js} +1 -1
  143. package/web/app/immutable/nodes/{8.DPKyN2xT.js → 8.CwwxHkuu.js} +1 -1
  144. package/web/app/immutable/nodes/{9.Ds0Wbr5E.js → 9.VYVO4dZo.js} +4 -4
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/entry/start.vqAdlzsb.js +0 -1
@@ -1 +1 @@
1
- import{t as Ot,bo as R,bm as u,bw as Ft,b as Rt}from"./C0QTy0Sy.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as S,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Ue,ay as U,ai as rr,aj as ar,bf as sr}from"./3SdAC2_C.js";import{i as W}from"./bhKPSdq4.js";import{I as or,g as Xe}from"./B6S6VNu7.js";import{c as Ee}from"./CUkDMZwP.js";import{n as Oe,j as Ze,h as $t}from"./DLwWVKiF.js";import{f as Fe,c as gt,s as nr}from"./7UPrdiE9.js";import{b as xt}from"./Dn334wJv.js";import{F as Te,cR as ir,au as lr,cK as bt,c$ as Pt,cd as cr}from"./U9jJmfYa.js";import{f as ye}from"./CttA-M7l.js";import"./C2jYl_tm.js";import"./Dhy-QJgd.js";import{M as nt}from"./BmRtsF0k.js";import{M as dr}from"./c6a4q1y9.js";import{w as _e}from"./BdReS-5Z.js";import{h as Ct,i as Et,g as Tt,P as At}from"./DlUZpQ7U.js";import{C as ht}from"./D32iIfZB.js";import{c as pr}from"./ChTqQfQN.js";import{A as ur}from"./wl2qP2wF.js";import"./CrD0jtXE.js";import{f as vr}from"./B50rrLDJ.js";import{Jv as _r}from"./_LtUY0jS.js";import{dS as mr}from"./Cppy6ZYG.js";import{S as et,j as fr,a as jt}from"./ZAGtf4QC.js";import{R as qe,c as it,m as gr,bE as tt}from"./BYBhz2vc.js";import"./Cb0qNR4H.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),Sr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),wr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),yr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function St(He,P){if(new.target)return Ot({component:St,...He});Gt(P,!0);const at=pr("SetupScriptAgent");let Ae=R(P,"repoPath",7),Re=R(P,"onScriptGenerated",7),Ge=R(P,"onClose",7),Me=K(rt(crypto.randomUUID())),O=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(O,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(O,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(O,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1)}}function fe(s){Re()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Re()},set onScriptGenerated(s){Re(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Ft,$on:(s,v)=>Rt(P,s,v)},ce=yr(),xe=c(ce),be=c(xe),De=c(be);ur(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=S(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(O)&&s(de)})}l(be);var Y=n(be,2),ke=c(Y);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());ye(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(Y),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=Sr(),E=c(v);{var q=B=>{var M=br(),Q=S(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var Se=n(Q,2),ze=S(Se,!0);l(M),g(we=>m(ze,we),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(O))&&s(Ie)})}var Je=n($e,2);{var pe=s=>{var v=wr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=S(B,!0);l(q);var Q=n(q,2);ye(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Ye=Be();g(ct=>m(Ye,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Ye)},$$slots:{default:!0}}),l(E);var Se=n(E,2),ze=S(Se,!0),we=n(Se,2),lt=c(we);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(we),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Je,s=>{e(ie)&&!e(O)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ut=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Ur=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Or=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Fr=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Rr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ot({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const y=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=S(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():we(a().id),leading:y,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Pr(),_=U($);Xe(_,21,()=>e(Ye),I=>I.id,(I,F)=>{at(I,()=>e(F))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:w=>{Te(w,{get icon(){return cr},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(w,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var F=$r();Xe(F,21,()=>e(ct),w=>w.id,(w,d)=>{at(w,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(F),Oe(3,F,()=>Ze,()=>({tier:"moderate"})),o(I,F)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:w=>{Te(w,{get icon(){return bt},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(w,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},F=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let w=z(()=>!O());nt(ve,{get class(){return _e.row},get disabled(){return e(w)},onclick:()=>{r(ke,!0),r(Y,!0)},leading:I,title:F,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=U($),i=c(_),f=c(i),x=S(f,!0),k=n(f,2),D=S(k,!0);l(i);var ue=n(i,2);ye(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(Y,!1)},children:(w,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(w,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=w=>{St(w,{get repoPath(){return O()},onScriptGenerated:Lt,onClose:()=>r(Y,!1)})},F=w=>{var d=Ar(),p=U(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(Se)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);ye(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Ue(),L=U(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var J=Tr();Xe(J,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Ue(),pt=U(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var yt=It(),kt=U(yt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Yt)=>{var Qe=Cr(),ot=S(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Jt=n(kt,2);Ee(Jt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Yt)=>{var Qe=Er(),ot=U(Qe),Qt=S(ot,!0),Xt=n(ot,2),Zt=S(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,yt)},$$slots:{default:!0}})}),o(re,We)}),l(J),o(ne,J)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(w,d)};W(ve,w=>{e(Y)&&O()?w(I):w(F,-1)})}g(w=>{Fe(f,1,gt(_e.title),"svelte-1yy464i"),m(x,w),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(y,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Je,h),()=>e(Je)),g(()=>Fe(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Re=t=>{var a=Or(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2),$=S(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);St(N,{get repoPath(){return O()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(Y,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!O());ye(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(Y,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=U(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(Y)&&O()?d(i):d(f,-1)})}l(y);var x=n(y,2);{var k=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),F=S(I,!0),w=n(I,2);Xe(w,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);ye(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(`template-${e(p).id}`),children:(H,V)=>{var Z=Ur(),A=c(Z),oe=c(A),L=S(oe,!0),ee=n(oe,2);{var te=J=>{var re=Nr(),Ne=S(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(J,re)};W(ee,J=>{e(p).projectType===ie()&&J(te)})}l(A);var ne=n(A,2),Ce=S(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(F,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Ue(),k=U(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var F=Ue(),w=U(F);Ee(w,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=U(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Fr(),ne=S(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Rr(),ne=U(te),Ce=S(ne,!0),J=n(ne,2),re=c(J),Ne=n(re),We=S(Ne,!0);l(J),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,F)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(y);var $=n(y,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(Se)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(Se,!e(Se)))}),o(t,a)},Me=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Mr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(y,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Fe(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let O=R(P,"repoPath",7,""),ae=R(P,"repositoryKey",7),me=R(P,"githubUrl",7,null),ie=R(P,"projectType",7,void 0),le=R(P,"repoConfigScript",7,null),C=R(P,"value",15,""),fe=R(P,"expanded",15,!1),ge=R(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=R(P,"scriptNameSource",15,"named"),xe=R(P,"isCustomScript",15,!1),be=R(P,"compact",7,!1),De=R(P,"triggerClass",7,""),Le=R(P,"contentOnly",7,!1),je=R(P,"contentClass",7,""),he=R(P,"presentation",7,"editor"),de=R(P,"onchange",7),Y=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Je=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??O(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let Se=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function we(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Je)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Ye=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const y=`template-${a.id}`;(y===Pe||y===e(s))&&t.push({id:y,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Ye).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(Y,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??O();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const y=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),y)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),y&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&&lt(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return O()},set repoPath(t=""){O(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Ft,$on:(t,a)=>Rt(P,t,a)},wt=Ue(),Wt=U(wt);{var qt=t=>{var a=Ue(),y=U(a);{var j=T=>{var h=Ue(),$=U(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Fe(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(y,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),y=U(a),j=c(y);ye(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=U(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=S(D,!0),ve=n(D,2),I=S(ve,!0);g(F=>{m(ue,F),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(y);var $=n(y,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Fe(y,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,wt),Mt(zt)}rr(["keydown"]);export{Kr as default};
1
+ import{t as Ot,bo as R,bm as u,bw as Ft,b as Rt}from"./C0QTy0Sy.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as S,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Ue,ay as U,ai as rr,aj as ar,bf as sr}from"./3SdAC2_C.js";import{i as W}from"./bhKPSdq4.js";import{I as or,g as Xe}from"./B6S6VNu7.js";import{c as Ee}from"./CUkDMZwP.js";import{n as Oe,j as Ze,h as $t}from"./DLwWVKiF.js";import{f as Fe,c as gt,s as nr}from"./7UPrdiE9.js";import{b as xt}from"./Dn334wJv.js";import{F as Te,cR as ir,au as lr,cK as bt,c$ as Pt,cd as cr}from"./U9jJmfYa.js";import{f as ye}from"./CttA-M7l.js";import"./C2jYl_tm.js";import"./Dhy-QJgd.js";import{M as nt}from"./DnNC4gf3.js";import{M as dr}from"./c6a4q1y9.js";import{w as _e}from"./B7ZVMWBx.js";import{h as Ct,i as Et,g as Tt,P as At}from"./DlUZpQ7U.js";import{C as ht}from"./D32iIfZB.js";import{c as pr}from"./ChTqQfQN.js";import{A as ur}from"./wl2qP2wF.js";import"./CrD0jtXE.js";import{f as vr}from"./B50rrLDJ.js";import{Jv as _r}from"./_LtUY0jS.js";import{dS as mr}from"./Cppy6ZYG.js";import{S as et,j as fr,a as jt}from"./DyIsX23v.js";import{R as qe,c as it,m as gr,bE as tt}from"./CEOk8g-Q.js";import"./C91EC830.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),Sr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),wr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),yr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function St(He,P){if(new.target)return Ot({component:St,...He});Gt(P,!0);const at=pr("SetupScriptAgent");let Ae=R(P,"repoPath",7),Re=R(P,"onScriptGenerated",7),Ge=R(P,"onClose",7),Me=K(rt(crypto.randomUUID())),O=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(O,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(O,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(O,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(O,!1)}}function fe(s){Re()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Re()},set onScriptGenerated(s){Re(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Ft,$on:(s,v)=>Rt(P,s,v)},ce=yr(),xe=c(ce),be=c(xe),De=c(be);ur(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=S(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(O)&&s(de)})}l(be);var Y=n(be,2),ke=c(Y);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());ye(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(Y),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=Sr(),E=c(v);{var q=B=>{var M=br(),Q=S(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var Se=n(Q,2),ze=S(Se,!0);l(M),g(we=>m(ze,we),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(O))&&s(Ie)})}var Je=n($e,2);{var pe=s=>{var v=wr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=S(B,!0);l(q);var Q=n(q,2);ye(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Ye=Be();g(ct=>m(Ye,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Ye)},$$slots:{default:!0}}),l(E);var Se=n(E,2),ze=S(Se,!0),we=n(Se,2),lt=c(we);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(we),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Je,s=>{e(ie)&&!e(O)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ut=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Ur=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Or=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Fr=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Rr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ot({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const y=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=S(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():we(a().id),leading:y,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Pr(),_=U($);Xe(_,21,()=>e(Ye),I=>I.id,(I,F)=>{at(I,()=>e(F))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:w=>{Te(w,{get icon(){return cr},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(w,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var F=$r();Xe(F,21,()=>e(ct),w=>w.id,(w,d)=>{at(w,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(F),Oe(3,F,()=>Ze,()=>({tier:"moderate"})),o(I,F)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:w=>{Te(w,{get icon(){return bt},get class(){return _e.icon}})},title:w=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(w,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},F=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let w=z(()=>!O());nt(ve,{get class(){return _e.row},get disabled(){return e(w)},onclick:()=>{r(ke,!0),r(Y,!0)},leading:I,title:F,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=U($),i=c(_),f=c(i),x=S(f,!0),k=n(f,2),D=S(k,!0);l(i);var ue=n(i,2);ye(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(Y,!1)},children:(w,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(w,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=w=>{St(w,{get repoPath(){return O()},onScriptGenerated:Lt,onClose:()=>r(Y,!1)})},F=w=>{var d=Ar(),p=U(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(Se)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);ye(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Ue(),L=U(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var J=Tr();Xe(J,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Ue(),pt=U(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var yt=It(),kt=U(yt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Yt)=>{var Qe=Cr(),ot=S(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Jt=n(kt,2);Ee(Jt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Yt)=>{var Qe=Er(),ot=U(Qe),Qt=S(ot,!0),Xt=n(ot,2),Zt=S(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,yt)},$$slots:{default:!0}})}),o(re,We)}),l(J),o(ne,J)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(w,d)};W(ve,w=>{e(Y)&&O()?w(I):w(F,-1)})}g(w=>{Fe(f,1,gt(_e.title),"svelte-1yy464i"),m(x,w),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(y,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Je,h),()=>e(Je)),g(()=>Fe(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Re=t=>{var a=Or(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2),$=S(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);St(N,{get repoPath(){return O()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(Y,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!O());ye(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(Y,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=U(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(Y)&&O()?d(i):d(f,-1)})}l(y);var x=n(y,2);{var k=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ut(),N=c(p),X=S(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);ye(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=S(ee,!0),ne=n(ee,2),Ce=S(ne,!0);l(L),g((J,re)=>{m(te,J),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),F=S(I,!0),w=n(I,2);Xe(w,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);ye(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>we(`template-${e(p).id}`),children:(H,V)=>{var Z=Ur(),A=c(Z),oe=c(A),L=S(oe,!0),ee=n(oe,2);{var te=J=>{var re=Nr(),Ne=S(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(J,re)};W(ee,J=>{e(p).projectType===ie()&&J(te)})}l(A);var ne=n(A,2),Ce=S(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(F,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),y=U(a),j=c(y),T=S(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Ue(),k=U(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var F=Ue(),w=U(F);Ee(w,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=U(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Fr(),ne=S(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Rr(),ne=U(te),Ce=S(ne,!0),J=n(ne,2),re=c(J),Ne=n(re),We=S(Ne,!0);l(J),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,F)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(y);var $=n(y,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(Se)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(Se,!e(Se)))}),o(t,a)},Me=t=>{var a=Ke(),y=c(a);{var j=h=>{var $=Mr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=U($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(y,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Fe(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let O=R(P,"repoPath",7,""),ae=R(P,"repositoryKey",7),me=R(P,"githubUrl",7,null),ie=R(P,"projectType",7,void 0),le=R(P,"repoConfigScript",7,null),C=R(P,"value",15,""),fe=R(P,"expanded",15,!1),ge=R(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=R(P,"scriptNameSource",15,"named"),xe=R(P,"isCustomScript",15,!1),be=R(P,"compact",7,!1),De=R(P,"triggerClass",7,""),Le=R(P,"contentOnly",7,!1),je=R(P,"contentClass",7,""),he=R(P,"presentation",7,"editor"),de=R(P,"onchange",7),Y=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Je=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??O(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let Se=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function we(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Je)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Ye=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const y=`template-${a.id}`;(y===Pe||y===e(s))&&t.push({id:y,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Ye).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(Y,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(Y,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??O();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const y=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),y)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),y&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&&lt(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return O()},set repoPath(t=""){O(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Ft,$on:(t,a)=>Rt(P,t,a)},wt=Ue(),Wt=U(wt);{var qt=t=>{var a=Ue(),y=U(a);{var j=T=>{var h=Ue(),$=U(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Fe(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Fe(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(y,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),y=U(a),j=c(y);ye(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=U(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=S(D,!0),ve=n(D,2),I=S(ve,!0);g(F=>{m(ue,F),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(y);var $=n(y,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Fe(y,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,wt),Mt(zt)}rr(["keydown"]);export{Kr as default};
@@ -1,4 +1,4 @@
1
- import{c as t,s as r}from"./CdyTEe8y.js";import{b as a}from"./CjJvlfCr.js";var s=a(e=>`${r(e)}
1
+ import{c as t,s as r}from"./amTgh_yM.js";import{b as a}from"./Cpw-AI-k.js";var s=a(e=>`${r(e)}
2
2
  .swimlane.cluster:not([data-color-id]) rect {
3
3
  stroke: ${e.clusterBorder} !important;
4
4
  }
@@ -1,4 +1,4 @@
1
- var I1=Object.defineProperty;var js=t=>{throw TypeError(t)};var z1=(t,e,r)=>e in t?I1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var le=(t,e,r)=>z1(t,typeof e!="symbol"?e+"":e,r),R1=(t,e,r)=>e.has(t)||js("Cannot "+r);var Vs=(t,e,r)=>e.has(t)?js("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var tn=(t,e,r)=>(R1(t,e,"access private method"),r);import{cR as mr,b4 as D1,dI as Xl,a7 as _n,a5 as Ia,a6 as N1,a4 as P1,aa as _1,am as L1,a1 as O1,e9 as $1,X as B1,bn as Yl,cU as qr,dH as Zl,b3 as q1,b8 as F1,cC as H1,cS as U1,cn as W1,dC as si,e1 as G1,dW as j1,aK as X0,ax as V1,aF as _i,dG as Ql,dT as K1,ed as Jl,ec as X1}from"./Cppy6ZYG.js";import{D as Ks,b4 as Y1,be as Z1,aC as Q1}from"./Cb0qNR4H.js";import{M as J1,G as hn,I as eh}from"./Bqd7fdCF.js";import{zo as y0,Jv as E,nY as ve,nX as xe,aT as th,m as ec,I as De,bq as gn,ke as Li,me as w0,aq as Kt,md as Xs,mn as Ys,mk as Zs,jN as tc,gz as oi,HS as rh,tI as nh,AS as ah,o$ as ih,n1 as k0,Cq as sh,iN as oh,mx as lh,m8 as ch}from"./_LtUY0jS.js";import{bm as ie}from"./C0QTy0Sy.js";import{l as rt}from"./CE7dsja4.js";import{m as uh,f as Tr}from"./B50rrLDJ.js";import{a as vn}from"./BdWqymET.js";import{o as pe,r as Vt,e as bn,s as V,_ as Je,l as yn,g as hh,n as Le,c as hr,b as Ve,u as dh,d as ph}from"./CIyUrgF0.js";import{j as rc}from"./uXuxG9cN.js";import{u as mh}from"./B9ZFoPLo.js";import{selectActiveWorkspaceIds as fh}from"./VxaCN40t.js";import{i as je}from"./CL3a4Hm1.js";import{l as za,c as Oi}from"./ChTqQfQN.js";import"./DkME16PR.js";import{e as gh,h as Er}from"./DONrLvvt.js";import{h as wn}from"./C2jYl_tm.js";import{i as Qs}from"./BBWuirRW.js";import{f as $i,o as nc,p as ac,h as vh,m as ic,i as bh,k as yh}from"./CTP1vzdq.js";const Ze=[];for(let t=0;t<256;++t)Ze.push((t+256).toString(16).slice(1));function wh(t,e=0){return(Ze[t[e+0]]+Ze[t[e+1]]+Ze[t[e+2]]+Ze[t[e+3]]+"-"+Ze[t[e+4]]+Ze[t[e+5]]+"-"+Ze[t[e+6]]+Ze[t[e+7]]+"-"+Ze[t[e+8]]+Ze[t[e+9]]+"-"+Ze[t[e+10]]+Ze[t[e+11]]+Ze[t[e+12]]+Ze[t[e+13]]+Ze[t[e+14]]+Ze[t[e+15]]).toLowerCase()}const kh=new Uint8Array(16);function xh(){return crypto.getRandomValues(kh)}function Bi(t,e,r){return crypto.randomUUID?crypto.randomUUID():Sh(t)}function Sh(t,e,r){t=t||{};const n=t.random??t.rng?.()??xh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wh(n)}function qi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=qi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?J1(r.replace(/\.git\/?$/,""),e):null}function m3(t,e){return t.type==="local"?t.plainFolder?"folder":"local":qi(t,e)?.provider==="gitlab"?"gitlab":"github"}function sc(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function f3(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=sc(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function g3(t){return t.type==="local"&&t.path?t.path:void 0}const Ah=["/.clones/","/.repo-cache/"];function v3(t){const e=t.replaceAll("\\","/");return Ah.some(r=>e.includes(r))}function b3(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Th(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function y3(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Th(r)}}function w3(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,sc(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const Eh="known-repos",Ch=6e4;function Mh({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=y0(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(y0(s),s);for(const s of e.repos)a.set(y0(s),s)}const i=[...a.values()].filter(s=>!r[y0(s)]);return n==="all"?i:i.slice(0,9)}function k3(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function x3({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<Ch?"skip":"load"}function S3(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=qi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function Ih({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ks)?Ks:null;return s===null||!i(s)?null:s}const A3=E.createSelector(t=>t.workspaceInitializer.hydrated),T3=E.createSelector(t=>t.workspaceInitializer.compactFormState),E3=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),C3=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),M3=E.createSelector(t=>t.workspaceInitializer.branchByRepo),I3=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),z3=E.createSelector(t=>ve(t.workspaceInitializer.recentRepos)),R3=E.createSelector((t,e)=>xe(t.workspaceInitializer.recentRepoRefreshes,e)),D3=E.createSelector((t,e)=>xe(t.workspaceInitializer.directoryStatusChecks,e)),N3=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),P3=E.createSelector(t=>ve(t.workspaceInitializer.remoteSetups)),_3=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),L3=E.createSelector(t=>t.workspaceInitializer.agentByRepo),O3=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),$3=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),B3=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),q3=E.createSelector((t,e)=>({restore:xe(t.workspaceInitializer.draftRestores,e),clear:xe(t.workspaceInitializer.draftClears,e)})),F3=E.createSelector((t,e,r)=>{const n=xe(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),H3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationOutcomes,e)),U3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationResumes,e)),W3=E.createSelector(t=>Ih({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Z1.select(t),orchestratorId:Y1.select(t)?.id??null})),zh=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=mr.select(t);return e&&r&&D1.select(t)?JSON.stringify([r,e]):null}),G3=E.createSelector(t=>{const e=zh.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),Rh=E.createSelector(t=>{const e=xe(t.workspaceInitializer.recentRepoRefreshes,Eh),r=mr.select(t);return Mh({saved:ve(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),j3=E.createSelector(t=>Xl.select(t)?Rh.select(t):[]),V3=E.createSelector(t=>Q1.select(t)||void 0),Js="workspace-debug-flags",x0={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class Dh{constructor(){le(this,"flags");le(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return x0;try{const e=localStorage.getItem(Js);if(e)return{...x0,...JSON.parse(e)}}catch(e){za.error("Failed to load debug flags:",e)}return x0}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Js,JSON.stringify(this.flags))}catch(e){za.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...x0},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),za.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const Ra=new Dh;function K3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function Nh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function X3(t){if(!t||t.trim().length===0)return ie.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ie.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ie.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ie.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ie.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ie.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ie.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ie.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ie.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ie.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ie.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ie.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ie.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ie.workspace_sidebarHeader_branchTooLong_error()}function Y3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function li(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function Z3(t,e){return`${e}:${t.agentId??"manual"}`}function Ph(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function _h(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function Lh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function Q3(t,e,r,n){const a=Ph(t,e),i=n?` (origin/${n})`:"";return r?a===1?ie.workspace_sidebarChanges_addToPr_one({suffix:i}):ie.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ie.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ie.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function J3(t,e,r){const n=_h(t,e),a=r?` (origin/${r})`:"";return n===1?ie.workspace_sidebarChanges_undoPush_one({suffix:a}):ie.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function e6(t,e){const r=Lh(t,e);return r===1?ie.workspace_sidebarChanges_undoCommit_one():ie.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function t6(t,e){return e===0&&t.length>0}function r6(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function n6(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function a6(t,e,r){return r?.path===t&&r?.staged===e}function i6(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function s6(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function Oh(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function o6(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=Oh(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:li(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?Fi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:li(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function l6(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??th.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function $h(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function Da(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=_n(i),c=o.toLowerCase(),h=a.find(d=>!!o&&d.url.toLowerCase()===c||(i.resource||i.monitorAvailability?d.monitorIdentity===Ia(i):!d.resource&&!d.monitorAvailability&&(s?!d.crossRepo&&d.number===i.prNumber:d.crossRepo===i.repo&&d.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?Ia(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${N1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?Ia(i):void 0,url:o,htmlUrl:o,status:$h(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Fi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Fi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function c6(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const k of n)k.repoOwner&&k.repoName&&s.add(`${k.repoOwner}/${k.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(k=>k.crossRepo)){o=[];for(const k of t)k.crossRepo?s.has(k.crossRepo.toLowerCase())?c.push(k):h.push(k):o.push(k)}const d=[],v=[],m=[];for(const k of e){const I=k.repo.toLowerCase();_n(k)&&o.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&(!i||I===i)?d.push(k):_n(k)&&c.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&s.has(I)?v.push(k):m.push(k)}const w=Da(o,d,r),A=r?.split("/")[0],C=new Set([...w,...c,...h].map(k=>`${(k.crossRepo??r??"").toLowerCase()}#${k.number}`)),M=[...c];for(const k of n){if(!k.repoOwner||!k.repoName)continue;const I=`${k.repoOwner}/${k.repoName}`;for(const R of k.pullRequests??[]){const Z=`${I.toLowerCase()}#${R.number}`;if(C.has(Z))continue;C.add(Z);const K=R.url||`https://github.com/${I}/pull/${R.number}`,ee=i!==void 0&&I.toLowerCase()===i;M.push({number:R.number,title:a(R),url:K,htmlUrl:K,status:li(R.status),createdAt:R.createdAt,updatedAt:R.updatedAt,crossRepo:ee?void 0:I,crossRepoDisplay:ee?void 0:Fi(I,A)})}}return{own:w,otherRoots:Da(M,v,r),otherTracked:Da(h,m,r)}}function eo(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function u6(t){const e=t.status==="merged"?ie.workspace_prSection_merged_label():t.status==="closed"?ie.workspace_prSection_closed_label():t.status==="draft"?ie.workspace_prSection_statusDraft_label():eo(t)?ie.workspace_prSection_statusQueued_label():ie.workspace_prSection_statusOpen_label(),r=[P1(t)??e],n=eo(t)?uh(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ie.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ie.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ie.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ie.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ie.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ie.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ie.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(Nh(a.mergeBlockedReason))),r.join(`
1
+ var I1=Object.defineProperty;var js=t=>{throw TypeError(t)};var z1=(t,e,r)=>e in t?I1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var le=(t,e,r)=>z1(t,typeof e!="symbol"?e+"":e,r),R1=(t,e,r)=>e.has(t)||js("Cannot "+r);var Vs=(t,e,r)=>e.has(t)?js("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var tn=(t,e,r)=>(R1(t,e,"access private method"),r);import{cR as mr,b4 as D1,dI as Xl,a7 as _n,a5 as Ia,a6 as N1,a4 as P1,aa as _1,am as L1,a1 as O1,e9 as $1,X as B1,bn as Yl,cU as qr,dH as Zl,b3 as q1,b8 as F1,cC as H1,cS as U1,cn as W1,dC as si,e1 as G1,dW as j1,aK as X0,ax as V1,aF as _i,dG as Ql,dT as K1,ed as Jl,ec as X1}from"./Cppy6ZYG.js";import{D as Ks,b4 as Y1,be as Z1,aC as Q1}from"./C91EC830.js";import{M as J1,G as hn,I as eh}from"./Bqd7fdCF.js";import{zo as y0,Jv as E,nY as ve,nX as xe,aT as th,m as ec,I as De,bq as gn,ke as Li,me as w0,aq as Kt,md as Xs,mn as Ys,mk as Zs,jN as tc,gz as oi,HS as rh,tI as nh,AS as ah,o$ as ih,n1 as k0,Cq as sh,iN as oh,mx as lh,m8 as ch}from"./_LtUY0jS.js";import{bm as ie}from"./C0QTy0Sy.js";import{l as rt}from"./CE7dsja4.js";import{m as uh,f as Tr}from"./B50rrLDJ.js";import{a as vn}from"./BdWqymET.js";import{o as pe,r as Vt,e as bn,s as V,_ as Je,l as yn,g as hh,n as Le,c as hr,b as Ve,u as dh,d as ph}from"./CIyUrgF0.js";import{j as rc}from"./uXuxG9cN.js";import{u as mh}from"./B9ZFoPLo.js";import{selectActiveWorkspaceIds as fh}from"./VxaCN40t.js";import{i as je}from"./CL3a4Hm1.js";import{l as za,c as Oi}from"./ChTqQfQN.js";import"./DkME16PR.js";import{e as gh,h as Er}from"./DONrLvvt.js";import{h as wn}from"./C2jYl_tm.js";import{i as Qs}from"./BBWuirRW.js";import{f as $i,o as nc,p as ac,h as vh,m as ic,i as bh,k as yh}from"./CTP1vzdq.js";const Ze=[];for(let t=0;t<256;++t)Ze.push((t+256).toString(16).slice(1));function wh(t,e=0){return(Ze[t[e+0]]+Ze[t[e+1]]+Ze[t[e+2]]+Ze[t[e+3]]+"-"+Ze[t[e+4]]+Ze[t[e+5]]+"-"+Ze[t[e+6]]+Ze[t[e+7]]+"-"+Ze[t[e+8]]+Ze[t[e+9]]+"-"+Ze[t[e+10]]+Ze[t[e+11]]+Ze[t[e+12]]+Ze[t[e+13]]+Ze[t[e+14]]+Ze[t[e+15]]).toLowerCase()}const kh=new Uint8Array(16);function xh(){return crypto.getRandomValues(kh)}function Bi(t,e,r){return crypto.randomUUID?crypto.randomUUID():Sh(t)}function Sh(t,e,r){t=t||{};const n=t.random??t.rng?.()??xh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wh(n)}function qi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=qi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?J1(r.replace(/\.git\/?$/,""),e):null}function m3(t,e){return t.type==="local"?t.plainFolder?"folder":"local":qi(t,e)?.provider==="gitlab"?"gitlab":"github"}function sc(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function f3(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=sc(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function g3(t){return t.type==="local"&&t.path?t.path:void 0}const Ah=["/.clones/","/.repo-cache/"];function v3(t){const e=t.replaceAll("\\","/");return Ah.some(r=>e.includes(r))}function b3(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Th(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function y3(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Th(r)}}function w3(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,sc(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const Eh="known-repos",Ch=6e4;function Mh({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=y0(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(y0(s),s);for(const s of e.repos)a.set(y0(s),s)}const i=[...a.values()].filter(s=>!r[y0(s)]);return n==="all"?i:i.slice(0,9)}function k3(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function x3({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<Ch?"skip":"load"}function S3(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=qi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function Ih({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ks)?Ks:null;return s===null||!i(s)?null:s}const A3=E.createSelector(t=>t.workspaceInitializer.hydrated),T3=E.createSelector(t=>t.workspaceInitializer.compactFormState),E3=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),C3=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),M3=E.createSelector(t=>t.workspaceInitializer.branchByRepo),I3=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),z3=E.createSelector(t=>ve(t.workspaceInitializer.recentRepos)),R3=E.createSelector((t,e)=>xe(t.workspaceInitializer.recentRepoRefreshes,e)),D3=E.createSelector((t,e)=>xe(t.workspaceInitializer.directoryStatusChecks,e)),N3=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),P3=E.createSelector(t=>ve(t.workspaceInitializer.remoteSetups)),_3=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),L3=E.createSelector(t=>t.workspaceInitializer.agentByRepo),O3=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),$3=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),B3=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),q3=E.createSelector((t,e)=>({restore:xe(t.workspaceInitializer.draftRestores,e),clear:xe(t.workspaceInitializer.draftClears,e)})),F3=E.createSelector((t,e,r)=>{const n=xe(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),H3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationOutcomes,e)),U3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationResumes,e)),W3=E.createSelector(t=>Ih({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Z1.select(t),orchestratorId:Y1.select(t)?.id??null})),zh=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=mr.select(t);return e&&r&&D1.select(t)?JSON.stringify([r,e]):null}),G3=E.createSelector(t=>{const e=zh.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),Rh=E.createSelector(t=>{const e=xe(t.workspaceInitializer.recentRepoRefreshes,Eh),r=mr.select(t);return Mh({saved:ve(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),j3=E.createSelector(t=>Xl.select(t)?Rh.select(t):[]),V3=E.createSelector(t=>Q1.select(t)||void 0),Js="workspace-debug-flags",x0={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class Dh{constructor(){le(this,"flags");le(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return x0;try{const e=localStorage.getItem(Js);if(e)return{...x0,...JSON.parse(e)}}catch(e){za.error("Failed to load debug flags:",e)}return x0}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Js,JSON.stringify(this.flags))}catch(e){za.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...x0},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),za.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const Ra=new Dh;function K3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function Nh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function X3(t){if(!t||t.trim().length===0)return ie.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ie.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ie.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ie.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ie.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ie.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ie.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ie.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ie.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ie.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ie.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ie.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ie.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ie.workspace_sidebarHeader_branchTooLong_error()}function Y3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function li(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function Z3(t,e){return`${e}:${t.agentId??"manual"}`}function Ph(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function _h(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function Lh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function Q3(t,e,r,n){const a=Ph(t,e),i=n?` (origin/${n})`:"";return r?a===1?ie.workspace_sidebarChanges_addToPr_one({suffix:i}):ie.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ie.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ie.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function J3(t,e,r){const n=_h(t,e),a=r?` (origin/${r})`:"";return n===1?ie.workspace_sidebarChanges_undoPush_one({suffix:a}):ie.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function e6(t,e){const r=Lh(t,e);return r===1?ie.workspace_sidebarChanges_undoCommit_one():ie.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function t6(t,e){return e===0&&t.length>0}function r6(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function n6(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function a6(t,e,r){return r?.path===t&&r?.staged===e}function i6(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function s6(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function Oh(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function o6(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=Oh(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:li(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?Fi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:li(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function l6(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??th.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function $h(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function Da(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=_n(i),c=o.toLowerCase(),h=a.find(d=>!!o&&d.url.toLowerCase()===c||(i.resource||i.monitorAvailability?d.monitorIdentity===Ia(i):!d.resource&&!d.monitorAvailability&&(s?!d.crossRepo&&d.number===i.prNumber:d.crossRepo===i.repo&&d.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?Ia(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${N1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?Ia(i):void 0,url:o,htmlUrl:o,status:$h(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Fi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Fi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function c6(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const k of n)k.repoOwner&&k.repoName&&s.add(`${k.repoOwner}/${k.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(k=>k.crossRepo)){o=[];for(const k of t)k.crossRepo?s.has(k.crossRepo.toLowerCase())?c.push(k):h.push(k):o.push(k)}const d=[],v=[],m=[];for(const k of e){const I=k.repo.toLowerCase();_n(k)&&o.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&(!i||I===i)?d.push(k):_n(k)&&c.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&s.has(I)?v.push(k):m.push(k)}const w=Da(o,d,r),A=r?.split("/")[0],C=new Set([...w,...c,...h].map(k=>`${(k.crossRepo??r??"").toLowerCase()}#${k.number}`)),M=[...c];for(const k of n){if(!k.repoOwner||!k.repoName)continue;const I=`${k.repoOwner}/${k.repoName}`;for(const R of k.pullRequests??[]){const Z=`${I.toLowerCase()}#${R.number}`;if(C.has(Z))continue;C.add(Z);const K=R.url||`https://github.com/${I}/pull/${R.number}`,ee=i!==void 0&&I.toLowerCase()===i;M.push({number:R.number,title:a(R),url:K,htmlUrl:K,status:li(R.status),createdAt:R.createdAt,updatedAt:R.updatedAt,crossRepo:ee?void 0:I,crossRepoDisplay:ee?void 0:Fi(I,A)})}}return{own:w,otherRoots:Da(M,v,r),otherTracked:Da(h,m,r)}}function eo(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function u6(t){const e=t.status==="merged"?ie.workspace_prSection_merged_label():t.status==="closed"?ie.workspace_prSection_closed_label():t.status==="draft"?ie.workspace_prSection_statusDraft_label():eo(t)?ie.workspace_prSection_statusQueued_label():ie.workspace_prSection_statusOpen_label(),r=[P1(t)??e],n=eo(t)?uh(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ie.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ie.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ie.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ie.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ie.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ie.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ie.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(Nh(a.mergeBlockedReason))),r.join(`
2
2
  `)}function h6(t,e){return e.has(t??"manual")}function d6(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const oc=500;function p6(t,e=oc){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function m6(t,e,r=oc){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function f6(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ie.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ie.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function Bh(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ci(t){return t.startsWith("@")?t.slice(1):t}function qh(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return ci(String(a));const i=[r,e,n.trim()].map(ci).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?_1(s).path:void 0}function Fh(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Hh(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=Bh(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=qh(i,n,r,t.textContent||"");c&&(s.filePath=c);const h=Fh(i);h!==void 0&&(s.line=h)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,h=c?ci(String(c)).replace(/\/+$/,""):"";h&&(s.folderPath=h)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function g6(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Hi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Fr=Hi();function lc(t){Fr=t}var Nr={exec:()=>null};function Cr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function oe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ue.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var cc=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ue={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)(\t[ \t]*)/gm,nestedBlockMarker:/^ {0,3}(?:(?:[*+-]|\d{1,9}[.)])(?: |$)|> ?)/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Cr(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Wi})(?:[ \\t]+|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},Uh=/^(?:[ \t]*(?:\n|$))+/,Wh=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Kn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jh=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ui=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xn=oe(" {0,3}(?:</?(?:tag)(?:[ \\t]+|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Wi).getRegex(),uc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,hc=oe(uc).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/\|table/g,"").replace(/html/g,Xn).getRegex(),Vh=oe(uc).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).replace(/html/g,Xn).getRegex(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Kh=/^[^\n]+/,ji=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Xh=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<(?:\\.|[^\n<>\\])*>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ji).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),Yh=oe(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ui).getRegex(),Vi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zh=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*?[ \\t]*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vi).replace("tag",Wi).replace("attribute",/[ \t]+[a-zA-Z:_][\w.:-]*(?:[ \t]*=[ \t]*"[^"\n]*"|[ \t]*=[ \t]*'[^'\n]*'|[ \t]*=[ \t]*[^\s"'=<>`]+)?/).getRegex(),dc=t=>oe(Gi).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html",Xn).getRegex(),Qh=dc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Jh=dc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ed=oe(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Jh).getRegex(),Ki={blockquote:ed,code:Wh,def:Xh,fences:Gh,heading:jh,hr:Kn,html:Zh,lheading:hc,list:Yh,newline:Uh,paragraph:Qh,table:Nr,text:Kh},to=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",Xn).getRegex(),td={...Ki,lheading:Vh,table:to,paragraph:oe(Gi).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",to).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html",Xn).getRegex()},rd={...Ki,html:oe(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Vi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Nr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(Gi).replace("hr",Kn).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").replace("lheading",hc).getRegex()},nd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ad=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pc=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,id=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pt=/[\p{P}\p{S}]/u,kn=/[\s\p{P}\p{S}]/u,Yn=/[^\s\p{P}\p{S}]/u,sd=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kn).getRegex(),od=/[\p{Pi}\p{Ps}"']/u,mc=/(?!~)[\p{P}\p{S}]/u,ld=/(?!~)[\s\p{P}\p{S}]/u,cd=/(?:[^\s\p{P}\p{S}]|~)/u,ud=oe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",cc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,hd=oe(fc,"u").replace(/punct/g,Pt).getRegex(),dd=oe(fc,"u").replace(/punct/g,mc).getRegex(),pd=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,md=oe(pd,"u").replace(/openQuote/g,od).replace(/punct/g,Pt).getRegex(),gc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",fd=oe(gc,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),gd=oe(gc,"gu").replace(/notPunctSpace/g,cd).replace(/punctSpace/g,ld).replace(/punct/g,mc).getRegex(),vd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",bd=oe(vd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),yd=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),wd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",kd=oe(wd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),xd=oe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Pt).getRegex(),Sd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ad=oe(Sd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),Td=oe(/\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Ed=oe(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Cd=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Md=oe(Vi).replace("(?:-->|$)","-->").getRegex(),Id=oe("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Md).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vc=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,q0=oe(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",vc).getRegex(),zd=oe(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",q0).replace("href",/<(?:\\.|[^\n<>\\])*>|(?!<)[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Rd=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",q0).replace("ref",ji).getRegex(),Dd=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ji).getRegex(),ro=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Nd=oe(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",vc).getRegex(),Pd=oe("reflink|nolink(?!\\()","g").replace("reflink",oe(/^!?\[(label)\]\[(ref)\]/).replace("label",Nd).replace("ref",ro).getRegex()).replace("nolink",oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ro).getRegex()).getRegex(),no=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_d=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ld=oe(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,_d).getRegex(),Xi={_backpedal:Nr,anyPunctuation:Td,anyPunctuationOutsideCode:Ed,autolink:Cd,blockSkip:ud,br:pc,code:ad,del:Nr,delLDelim:Nr,delRDelim:Nr,emStrongLDelim:hd,emStrongRDelimAst:fd,emStrongRDelimUnd:yd,escape:nd,link:zd,nolink:Dd,punctuation:sd,reflink:Rd,reflinkSearch:Pd,tag:Id,text:id,url:Nr},Od={...Xi,emStrongLDelim:md,emStrongRDelimAst:bd,emStrongRDelimUnd:kd,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",q0).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q0).getRegex()},ui={...Xi,emStrongRDelimAst:gd,emStrongLDelim:dd,delLDelim:xd,delRDelim:Ad,url:oe(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ld).replace("protocol",no).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",no).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",cc?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},$d={...ui,br:oe(pc).replace("{2,}","*").getRegex(),text:oe(ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},S0={normal:Ki,gfm:td,pedantic:rd},Mn={normal:Xi,gfm:ui,breaks:$d,pedantic:Od},Bd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ao=t=>Bd[t];function mt(t,e){if(e){if(Ue.escapeTest.test(t))return t.replace(Ue.escapeReplace,ao)}else if(Ue.escapeTestNoEncode.test(t))return t.replace(Ue.escapeReplaceNoEncode,ao);return t}function qd(t){return Ue.numericCharacterReference.test(t)?t.replace(Ue.numericCharacterReferenceOrAmpersand,(e,r,n)=>{if(r===void 0&&n===void 0)return"&amp;";let a=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return a===0||a>1114111||a>=55296&&a<=57343?"�":a===38?"&amp;":String.fromCodePoint(a)}):t}function io(t){try{t=encodeURI(t).replace(Ue.percentDecode,"%")}catch{return null}return t}function so(t,e){let r=t.replace(Ue.findPipe,(i,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ue.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ue.slashPipe,"|");return n}function qt(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function oo(t){let e=t.split(`
4
4
  `),r=e.length-1;for(;r>=0&&Ue.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
@@ -1 +1 @@
1
- import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./C0QTy0Sy.js";import{bs as D,cd as H,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as G,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./bhKPSdq4.js";import{C as U}from"./CChkl_5h.js";import{dH as V}from"./Cppy6ZYG.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=H(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=E(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=G(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=F(C);return u(),x}export{Z as default};
1
+ import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./C0QTy0Sy.js";import{bs as D,cd as H,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as G,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./bhKPSdq4.js";import{C as U}from"./C_1zy40-.js";import{dH as V}from"./Cppy6ZYG.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=H(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=E(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=G(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=F(C);return u(),x}export{Z as default};
@@ -1,4 +1,4 @@
1
- import{g as ie}from"./DGdXhwsJ.js";import{s as re}from"./CfOfDsl2.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./CjJvlfCr.js";import{c as Ee}from"./Day2rmDJ.js";import{aR as _e}from"./CIWayVej.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
1
+ import{g as ie}from"./CaCH7xka.js";import{s as re}from"./DGSdOlov.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./Cpw-AI-k.js";import{c as Ee}from"./3FaPVDTk.js";import{aR as _e}from"./BfSTFUKA.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Nt=B[n[n.length-2]][n[n.length-1]],n.push(Nt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{a as S}from"./BdWqymET.js";import{aE as l}from"./3SdAC2_C.js";import{g as c}from"./8o9CPlKy.js";import{p as g}from"./qEaQygdG.js";import{d as I}from"./B0Z-1lwJ.js";import{dS as f}from"./Cppy6ZYG.js";import{Cp as u,m as y,Jv as o,h6 as A,vH as m,vI as N,vK as b}from"./_LtUY0jS.js";import{g as W,n as h}from"./_WGu_9si.js";import{S as D,a as R,n as E}from"./CeGEVvKd.js";import{n as O,o as v}from"./RnZ98Lx7.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function _(e){return e.connections?.hasReceivedList===!0&&P(W(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,_(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function C(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function $(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=l(g),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=l(g).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function K(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=l(g).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function B(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function H(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function G(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await E(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(D);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await O(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function J(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:B,closeDrawer:M,findSourcePanelId:$,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:J,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:G,navigateToSpec:K,navigateToTask:H,navigateToTerminal:C},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,G as d,H as e,$ as f,d as g,ie as h,_ as i,z as n,re as r,se as w};
1
+ import{a as S}from"./BdWqymET.js";import{aE as l}from"./3SdAC2_C.js";import{g as c}from"./xGj0i83D.js";import{p as g}from"./BM2XSA6g.js";import{d as I}from"./B0Z-1lwJ.js";import{dS as f}from"./Cppy6ZYG.js";import{Cp as u,m as y,Jv as o,h6 as A,vH as m,vI as N,vK as b}from"./_LtUY0jS.js";import{g as W,n as h}from"./_WGu_9si.js";import{S as D,a as R,n as E}from"./Cxb8aRlA.js";import{n as O,o as v}from"./BGm3f58g.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function _(e){return e.connections?.hasReceivedList===!0&&P(W(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,_(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function C(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function $(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=l(g),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=l(g).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function K(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=l(g).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function B(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function H(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function G(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await E(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(D);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await O(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function J(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:B,closeDrawer:M,findSourcePanelId:$,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:J,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:G,navigateToSpec:K,navigateToTask:H,navigateToTerminal:C},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,G as d,H as e,$ as f,d as g,ie as h,_ as i,z as n,re as r,se as w};