jialing-code 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/README.md +97 -0
  2. package/dist/chunk-065m026w.js +97 -0
  3. package/dist/chunk-06saje2v.js +39 -0
  4. package/dist/chunk-0731m51q.js +8 -0
  5. package/dist/chunk-0975ccyw.js +265 -0
  6. package/dist/chunk-09n3fjx5.js +67 -0
  7. package/dist/chunk-0bdjdzew.js +41 -0
  8. package/dist/chunk-0ce6kd7y.js +212 -0
  9. package/dist/chunk-0e1xsncc.js +969 -0
  10. package/dist/chunk-0m2861gw.js +154 -0
  11. package/dist/chunk-0paqc2yw.js +15 -0
  12. package/dist/chunk-0rg6yrhy.js +99 -0
  13. package/dist/chunk-0sakxrcf.js +643 -0
  14. package/dist/chunk-0v9hwxvz.js +105 -0
  15. package/dist/chunk-0vkfrmqm.js +690 -0
  16. package/dist/chunk-0vvfnhhv.js +248 -0
  17. package/dist/chunk-0w4rsycj.js +145 -0
  18. package/dist/chunk-0x9b2nmd.js +63 -0
  19. package/dist/chunk-0xjaqda8.js +1124 -0
  20. package/dist/chunk-1141xmr4.js +8 -0
  21. package/dist/chunk-13d1842d.js +154 -0
  22. package/dist/chunk-1921a6yb.js +32 -0
  23. package/dist/chunk-1ad8mk9g.js +527 -0
  24. package/dist/chunk-1ax41pws.js +28 -0
  25. package/dist/chunk-1c8z1b5v.js +16 -0
  26. package/dist/chunk-1cbn5kxf.js +7 -0
  27. package/dist/chunk-1eapde8a.js +726 -0
  28. package/dist/chunk-1h2famwb.js +49 -0
  29. package/dist/chunk-1jggnf7z.js +85 -0
  30. package/dist/chunk-1k92pn9c.js +32 -0
  31. package/dist/chunk-1qakq4sn.js +802 -0
  32. package/dist/chunk-1rvz0433.js +722 -0
  33. package/dist/chunk-1xkekb9y.js +19 -0
  34. package/dist/chunk-238g70xa.js +36 -0
  35. package/dist/chunk-24ge0eqa.js +106 -0
  36. package/dist/chunk-278vghwm.js +5395 -0
  37. package/dist/chunk-27xc1csx.js +104 -0
  38. package/dist/chunk-2a42s11t.js +412 -0
  39. package/dist/chunk-2aa02aw6.js +438 -0
  40. package/dist/chunk-2eykm0j0.js +20 -0
  41. package/dist/chunk-2gzv8nrw.js +205 -0
  42. package/dist/chunk-2k995y2x.js +880 -0
  43. package/dist/chunk-2nayx6q1.js +63 -0
  44. package/dist/chunk-2sd2w2h4.js +44 -0
  45. package/dist/chunk-2tw2ve8h.js +145 -0
  46. package/dist/chunk-30rst83v.js +168 -0
  47. package/dist/chunk-3aavh06g.js +1581 -0
  48. package/dist/chunk-3b0yvt2h.js +469 -0
  49. package/dist/chunk-3be7ka25.js +56 -0
  50. package/dist/chunk-3c25bcsw.js +17 -0
  51. package/dist/chunk-3dyxka97.js +584 -0
  52. package/dist/chunk-3f7rypmf.js +16544 -0
  53. package/dist/chunk-3fsd7f51.js +93 -0
  54. package/dist/chunk-3gqdqmzb.js +75 -0
  55. package/dist/chunk-3h8a89gy.js +46 -0
  56. package/dist/chunk-3m84sret.js +71 -0
  57. package/dist/chunk-3nb7j3js.js +96 -0
  58. package/dist/chunk-3p08nvn2.js +98 -0
  59. package/dist/chunk-3r09htpc.js +318 -0
  60. package/dist/chunk-3r24h7t6.js +113 -0
  61. package/dist/chunk-3rkfxjtq.js +80 -0
  62. package/dist/chunk-3tmk7dc2.js +604 -0
  63. package/dist/chunk-3w6s9m5w.js +16 -0
  64. package/dist/chunk-43qjymy5.js +92 -0
  65. package/dist/chunk-44fpr6jq.js +434 -0
  66. package/dist/chunk-45kxdsp8.js +444 -0
  67. package/dist/chunk-495d85x1.js +8066 -0
  68. package/dist/chunk-4ba796se.js +1095 -0
  69. package/dist/chunk-4g3v8y12.js +23 -0
  70. package/dist/chunk-4h53xj8n.js +3445 -0
  71. package/dist/chunk-4jm600zv.js +13 -0
  72. package/dist/chunk-4jy9dtwk.js +116 -0
  73. package/dist/chunk-4p60dd45.js +55 -0
  74. package/dist/chunk-4z0jsrqg.js +81 -0
  75. package/dist/chunk-4zfkzkt6.js +37 -0
  76. package/dist/chunk-55wgxwa9.js +13877 -0
  77. package/dist/chunk-5dbk24zg.js +890 -0
  78. package/dist/chunk-5hzvp4va.js +115 -0
  79. package/dist/chunk-5kbt1mbt.js +500 -0
  80. package/dist/chunk-5pen7vr8.js +176 -0
  81. package/dist/chunk-5r280eng.js +198 -0
  82. package/dist/chunk-5srym52s.js +88 -0
  83. package/dist/chunk-600kg7k6.js +41 -0
  84. package/dist/chunk-616w0qj3.js +160 -0
  85. package/dist/chunk-62jw1t8c.js +94 -0
  86. package/dist/chunk-62xmt9mk.js +372 -0
  87. package/dist/chunk-64bvg7c3.js +229 -0
  88. package/dist/chunk-65yhe4s0.js +281 -0
  89. package/dist/chunk-6aewh27m.js +102 -0
  90. package/dist/chunk-6bd8brc4.js +48 -0
  91. package/dist/chunk-6dj5t602.js +341 -0
  92. package/dist/chunk-6exxdk1p.js +6956 -0
  93. package/dist/chunk-6f5j8fs0.js +752 -0
  94. package/dist/chunk-6g62sjpf.js +328 -0
  95. package/dist/chunk-6gecq2ta.js +1493 -0
  96. package/dist/chunk-6gr3c3w9.js +378 -0
  97. package/dist/chunk-6kpbgc5w.js +23 -0
  98. package/dist/chunk-6kseqw79.js +154 -0
  99. package/dist/chunk-6mxm1qd0.js +40764 -0
  100. package/dist/chunk-6n2qgm9v.js +8 -0
  101. package/dist/chunk-6tq2v3rk.js +186 -0
  102. package/dist/chunk-6wsdhj3v.js +93 -0
  103. package/dist/chunk-6zw9fhgb.js +4389 -0
  104. package/dist/chunk-71grc1mw.js +111 -0
  105. package/dist/chunk-73rpbt04.js +1947 -0
  106. package/dist/chunk-748feghg.js +604 -0
  107. package/dist/chunk-75e8gtg9.js +84 -0
  108. package/dist/chunk-75th4717.js +780 -0
  109. package/dist/chunk-760252na.js +101 -0
  110. package/dist/chunk-7739pg2c.js +4261 -0
  111. package/dist/chunk-778fnx46.js +472 -0
  112. package/dist/chunk-77g09znh.js +391 -0
  113. package/dist/chunk-7aw745vx.js +40175 -0
  114. package/dist/chunk-7m2nd8da.js +110 -0
  115. package/dist/chunk-7n35vjtw.js +444 -0
  116. package/dist/chunk-7n5ss4sh.js +144 -0
  117. package/dist/chunk-7rjnxcfe.js +107 -0
  118. package/dist/chunk-7sb5axvf.js +122 -0
  119. package/dist/chunk-7wm5s02e.js +216 -0
  120. package/dist/chunk-7ymfj7m3.js +151 -0
  121. package/dist/chunk-7z8j9qfn.js +121 -0
  122. package/dist/chunk-7zsapntc.js +216 -0
  123. package/dist/chunk-805fhkfh.js +908 -0
  124. package/dist/chunk-80k1nj24.js +253 -0
  125. package/dist/chunk-83hfzbx3.js +10 -0
  126. package/dist/chunk-85cypsdd.js +92 -0
  127. package/dist/chunk-8760caxf.js +2644 -0
  128. package/dist/chunk-88f6egg6.js +387 -0
  129. package/dist/chunk-88r7kwgj.js +22 -0
  130. package/dist/chunk-89e1v45e.js +463 -0
  131. package/dist/chunk-8bedvdm1.js +32 -0
  132. package/dist/chunk-8c4x4vdz.js +177 -0
  133. package/dist/chunk-8hq5kk3y.js +44 -0
  134. package/dist/chunk-8ngxagxq.js +18 -0
  135. package/dist/chunk-8tnsngw2.js +31 -0
  136. package/dist/chunk-8wjnca8h.js +307 -0
  137. package/dist/chunk-8y12jxg8.js +10 -0
  138. package/dist/chunk-8ymf4e6z.js +48 -0
  139. package/dist/chunk-90wp6wez.js +10510 -0
  140. package/dist/chunk-92bp5bnf.js +650 -0
  141. package/dist/chunk-92q8sx5z.js +90 -0
  142. package/dist/chunk-958rtmtx.js +10476 -0
  143. package/dist/chunk-9e2kqv5g.js +125 -0
  144. package/dist/chunk-9f4f1hy5.js +281 -0
  145. package/dist/chunk-9gbamk79.js +93 -0
  146. package/dist/chunk-9k5s3ryh.js +167 -0
  147. package/dist/chunk-9xzfqm15.js +97 -0
  148. package/dist/chunk-9zgdvbm6.js +110 -0
  149. package/dist/chunk-a0p3q8jw.js +24 -0
  150. package/dist/chunk-a22sayzp.js +220 -0
  151. package/dist/chunk-a8ejc632.js +3094 -0
  152. package/dist/chunk-a8gj9d9z.js +120 -0
  153. package/dist/chunk-a9vdeb6y.js +258 -0
  154. package/dist/chunk-a9yev47v.js +674 -0
  155. package/dist/chunk-a9zh40sj.js +48 -0
  156. package/dist/chunk-ack5mfba.js +105 -0
  157. package/dist/chunk-ae76ded0.js +30 -0
  158. package/dist/chunk-akjw4dh6.js +538 -0
  159. package/dist/chunk-asc6wz4q.js +1188 -0
  160. package/dist/chunk-atqejh3p.js +273 -0
  161. package/dist/chunk-atv2e6b7.js +61 -0
  162. package/dist/chunk-axvvkwz8.js +1551 -0
  163. package/dist/chunk-azgz7kj9.js +38 -0
  164. package/dist/chunk-b3zave8q.js +275 -0
  165. package/dist/chunk-b4wg70y1.js +54 -0
  166. package/dist/chunk-b8b13qn2.js +100 -0
  167. package/dist/chunk-bg3mt9bm.js +28 -0
  168. package/dist/chunk-bh4jvcjn.js +91 -0
  169. package/dist/chunk-bhdt6k7w.js +15 -0
  170. package/dist/chunk-bm1qb16p.js +17 -0
  171. package/dist/chunk-bpvsd1j1.js +266 -0
  172. package/dist/chunk-bqfnp99q.js +477 -0
  173. package/dist/chunk-bsbmmfyt.js +17 -0
  174. package/dist/chunk-bsbt34jm.js +42 -0
  175. package/dist/chunk-c78akdhr.js +458 -0
  176. package/dist/chunk-cdz5yb0r.js +57 -0
  177. package/dist/chunk-cfv996bs.js +22 -0
  178. package/dist/chunk-cgfdkzhb.js +12 -0
  179. package/dist/chunk-ckh4r5er.js +257 -0
  180. package/dist/chunk-cmgjnvn9.js +89 -0
  181. package/dist/chunk-cpjgvay8.js +687 -0
  182. package/dist/chunk-crfryjx9.js +276 -0
  183. package/dist/chunk-ctw5jwcd.js +213 -0
  184. package/dist/chunk-cvy3vntc.js +65 -0
  185. package/dist/chunk-cwbzz504.js +94 -0
  186. package/dist/chunk-cy2hswr1.js +15 -0
  187. package/dist/chunk-cyejkay3.js +222 -0
  188. package/dist/chunk-d18z9pna.js +106 -0
  189. package/dist/chunk-d5cq0n0v.js +162 -0
  190. package/dist/chunk-db45aryp.js +50 -0
  191. package/dist/chunk-de8nqh0z.js +790 -0
  192. package/dist/chunk-dfw6h350.js +2336 -0
  193. package/dist/chunk-dgqrcy74.js +48 -0
  194. package/dist/chunk-dn75ptgd.js +184 -0
  195. package/dist/chunk-dnh7jtpb.js +37 -0
  196. package/dist/chunk-dpshyv9m.js +90 -0
  197. package/dist/chunk-dt8cdvnm.js +642 -0
  198. package/dist/chunk-dtxby6fr.js +306 -0
  199. package/dist/chunk-dv1wfr85.js +6373 -0
  200. package/dist/chunk-dw363edx.js +1154 -0
  201. package/dist/chunk-dwrdacck.js +62 -0
  202. package/dist/chunk-dxnnv5e3.js +276 -0
  203. package/dist/chunk-e3g8q4cn.js +1646 -0
  204. package/dist/chunk-e3m9k9s2.js +542 -0
  205. package/dist/chunk-e4q49asn.js +155 -0
  206. package/dist/chunk-e5pntxye.js +37 -0
  207. package/dist/chunk-e7393td6.js +42 -0
  208. package/dist/chunk-ead42yrh.js +87 -0
  209. package/dist/chunk-eb90vwvr.js +152 -0
  210. package/dist/chunk-ecvwk9hg.js +250 -0
  211. package/dist/chunk-edjd6aay.js +173 -0
  212. package/dist/chunk-eg0h8mtm.js +130 -0
  213. package/dist/chunk-ehtwnxpg.js +1591 -0
  214. package/dist/chunk-ek686gx1.js +94 -0
  215. package/dist/chunk-eqp1rfft.js +17 -0
  216. package/dist/chunk-evhwt0ar.js +1015 -0
  217. package/dist/chunk-ewadzrm8.js +103 -0
  218. package/dist/chunk-ewsgsw9h.js +172291 -0
  219. package/dist/chunk-f0pa0r7e.js +3198 -0
  220. package/dist/chunk-f2mhrmww.js +62 -0
  221. package/dist/chunk-f39zxvwn.js +401 -0
  222. package/dist/chunk-f46z54tq.js +374 -0
  223. package/dist/chunk-f5ma3nh5.js +3436 -0
  224. package/dist/chunk-f60q23az.js +3038 -0
  225. package/dist/chunk-f6v2nz57.js +107 -0
  226. package/dist/chunk-f6yjan38.js +38 -0
  227. package/dist/chunk-fbv4apne.js +51 -0
  228. package/dist/chunk-fem4s778.js +70 -0
  229. package/dist/chunk-fezm1kn8.js +376 -0
  230. package/dist/chunk-fm1n3ysp.js +6108 -0
  231. package/dist/chunk-frg83bfw.js +225 -0
  232. package/dist/chunk-fscm8db0.js +692 -0
  233. package/dist/chunk-fyc5fepv.js +10 -0
  234. package/dist/chunk-g0j0t6qk.js +26 -0
  235. package/dist/chunk-g0nc1ftf.js +849 -0
  236. package/dist/chunk-g338npwr.js +1061 -0
  237. package/dist/chunk-g3t0act8.js +8 -0
  238. package/dist/chunk-g75w4hw3.js +26 -0
  239. package/dist/chunk-g8vp82en.js +1866 -0
  240. package/dist/chunk-gax0fcbx.js +182 -0
  241. package/dist/chunk-gsz4dh3y.js +606 -0
  242. package/dist/chunk-gtfffm7h.js +440 -0
  243. package/dist/chunk-gver9zb9.js +420 -0
  244. package/dist/chunk-gyj242zr.js +20 -0
  245. package/dist/chunk-h0qngp9w.js +157 -0
  246. package/dist/chunk-h14kemnk.js +123 -0
  247. package/dist/chunk-h8wj1a74.js +8960 -0
  248. package/dist/chunk-h9mcb2eg.js +87 -0
  249. package/dist/chunk-h9nh2980.js +91 -0
  250. package/dist/chunk-hakdhagh.js +16606 -0
  251. package/dist/chunk-hbc6ymdv.js +55 -0
  252. package/dist/chunk-hh7cmy4k.js +20 -0
  253. package/dist/chunk-hjhc4cpt.js +69 -0
  254. package/dist/chunk-hjwez8qc.js +5018 -0
  255. package/dist/chunk-hk9xz7gk.js +118 -0
  256. package/dist/chunk-hqmz36b3.js +552 -0
  257. package/dist/chunk-hrzerbfw.js +1299 -0
  258. package/dist/chunk-hs8ph4p8.js +8 -0
  259. package/dist/chunk-ht1xwrnd.js +716 -0
  260. package/dist/chunk-hvmfg2dc.js +338 -0
  261. package/dist/chunk-hx2tr4ep.js +7189 -0
  262. package/dist/chunk-hzhe8ygc.js +547 -0
  263. package/dist/chunk-j2k4p94p.js +55 -0
  264. package/dist/chunk-j3a4p81y.js +184 -0
  265. package/dist/chunk-j49g6g3s.js +57 -0
  266. package/dist/chunk-j5d5hp9h.js +71 -0
  267. package/dist/chunk-j64ga6ta.js +8035 -0
  268. package/dist/chunk-j7tyxan1.js +116 -0
  269. package/dist/chunk-j8v4774z.js +424 -0
  270. package/dist/chunk-jafes477.js +29 -0
  271. package/dist/chunk-jd32zbps.js +15 -0
  272. package/dist/chunk-jdgeec04.js +4249 -0
  273. package/dist/chunk-jftd4jq5.js +4521 -0
  274. package/dist/chunk-jkxqhv6y.js +812 -0
  275. package/dist/chunk-jmfr6h0n.js +120 -0
  276. package/dist/chunk-jn4aabmx.js +40 -0
  277. package/dist/chunk-jnhkref0.js +30 -0
  278. package/dist/chunk-jsbpm1gz.js +27 -0
  279. package/dist/chunk-jtcyjc3k.js +5802 -0
  280. package/dist/chunk-jx817w05.js +11 -0
  281. package/dist/chunk-jzmz18nn.js +65 -0
  282. package/dist/chunk-k0p9w03v.js +4957 -0
  283. package/dist/chunk-k3dcdnck.js +89 -0
  284. package/dist/chunk-k3wadzcd.js +88 -0
  285. package/dist/chunk-kaeshsk1.js +713 -0
  286. package/dist/chunk-kbkey9ed.js +522 -0
  287. package/dist/chunk-kcwfhqbb.js +196 -0
  288. package/dist/chunk-key6jr7p.js +224 -0
  289. package/dist/chunk-knay8cy9.js +173 -0
  290. package/dist/chunk-kr3rg2y1.js +95 -0
  291. package/dist/chunk-kwekc97v.js +18 -0
  292. package/dist/chunk-m06q12hg.js +61 -0
  293. package/dist/chunk-m2mcpbhk.js +43 -0
  294. package/dist/chunk-m8v220gz.js +71 -0
  295. package/dist/chunk-mgpqy78h.js +208 -0
  296. package/dist/chunk-mkejwh4t.js +16 -0
  297. package/dist/chunk-mptyw5n1.js +107 -0
  298. package/dist/chunk-mqajm0dp.js +66 -0
  299. package/dist/chunk-mrksbgxj.js +490 -0
  300. package/dist/chunk-msjfc5ba.js +246 -0
  301. package/dist/chunk-mt25echc.js +6157 -0
  302. package/dist/chunk-mt3jfnr8.js +277 -0
  303. package/dist/chunk-mtn242d4.js +9300 -0
  304. package/dist/chunk-mzfkvave.js +169 -0
  305. package/dist/chunk-n0qaeaa5.js +256 -0
  306. package/dist/chunk-n1erf6kh.js +22820 -0
  307. package/dist/chunk-n2avk1r2.js +61 -0
  308. package/dist/chunk-n6atnpcq.js +765 -0
  309. package/dist/chunk-n7ttdtk0.js +641 -0
  310. package/dist/chunk-ncnfzby5.js +822 -0
  311. package/dist/chunk-ncnr1jtf.js +2058 -0
  312. package/dist/chunk-nerv0jvx.js +74 -0
  313. package/dist/chunk-ngd2abep.js +90 -0
  314. package/dist/chunk-nka1g8f4.js +773 -0
  315. package/dist/chunk-nnaxkc2z.js +128 -0
  316. package/dist/chunk-npyrtj8j.js +691 -0
  317. package/dist/chunk-nq0fxyxh.js +752 -0
  318. package/dist/chunk-nrmffak7.js +114 -0
  319. package/dist/chunk-nsz546wq.js +1170 -0
  320. package/dist/chunk-nt837qt9.js +21 -0
  321. package/dist/chunk-nv64x1z5.js +86 -0
  322. package/dist/chunk-nxsh6de2.js +1711 -0
  323. package/dist/chunk-nz4getcr.js +40 -0
  324. package/dist/chunk-p1f607pa.js +83 -0
  325. package/dist/chunk-p2816w9z.js +1486 -0
  326. package/dist/chunk-p2d5nh3g.js +342 -0
  327. package/dist/chunk-p4r5y02t.js +90 -0
  328. package/dist/chunk-p7g7pf3f.js +336 -0
  329. package/dist/chunk-pb4ad8r2.js +110 -0
  330. package/dist/chunk-pbrhz0zr.js +716 -0
  331. package/dist/chunk-ps49ymvj.js +43 -0
  332. package/dist/chunk-pwnt3veb.js +103 -0
  333. package/dist/chunk-pwwa7s62.js +11 -0
  334. package/dist/chunk-px3w0kde.js +299 -0
  335. package/dist/chunk-pzn777jb.js +756 -0
  336. package/dist/chunk-q25bjaev.js +15 -0
  337. package/dist/chunk-q5by3da6.js +8 -0
  338. package/dist/chunk-q6av622g.js +38 -0
  339. package/dist/chunk-q6xkvtf2.js +1318 -0
  340. package/dist/chunk-q81jx1tq.js +476 -0
  341. package/dist/chunk-qehb6fk5.js +339 -0
  342. package/dist/chunk-qj1avx1q.js +87 -0
  343. package/dist/chunk-qn2dxr66.js +105 -0
  344. package/dist/chunk-qnfx3qtx.js +617 -0
  345. package/dist/chunk-qp18kd4h.js +48 -0
  346. package/dist/chunk-qp2qdcda.js +100 -0
  347. package/dist/chunk-qpjy9tcf.js +133 -0
  348. package/dist/chunk-qqfa0dqg.js +2343 -0
  349. package/dist/chunk-qwh3htcz.js +202 -0
  350. package/dist/chunk-qz2x630m.js +49145 -0
  351. package/dist/chunk-r3vakcs1.js +496 -0
  352. package/dist/chunk-r66hz8j6.js +34 -0
  353. package/dist/chunk-r6b58y3x.js +17 -0
  354. package/dist/chunk-rekp48rk.js +62 -0
  355. package/dist/chunk-rn0v1hk8.js +34 -0
  356. package/dist/chunk-rs1xrs6m.js +534 -0
  357. package/dist/chunk-rs45skes.js +123 -0
  358. package/dist/chunk-rzszqp82.js +524 -0
  359. package/dist/chunk-s274nv8k.js +8 -0
  360. package/dist/chunk-s3pzvdss.js +50 -0
  361. package/dist/chunk-s9mesaw0.js +26840 -0
  362. package/dist/chunk-sd36yzx8.js +954 -0
  363. package/dist/chunk-sdj9b9wh.js +782 -0
  364. package/dist/chunk-sdw2q69p.js +227 -0
  365. package/dist/chunk-sfgp9cc0.js +130 -0
  366. package/dist/chunk-spqaamnc.js +63 -0
  367. package/dist/chunk-spzrs4df.js +73 -0
  368. package/dist/chunk-sxkr7k43.js +55 -0
  369. package/dist/chunk-szj5wvdy.js +28 -0
  370. package/dist/chunk-t0rgmccj.js +39 -0
  371. package/dist/chunk-t1nnzjgg.js +17 -0
  372. package/dist/chunk-t94fcnt8.js +566 -0
  373. package/dist/chunk-tjaqa99q.js +125 -0
  374. package/dist/chunk-tjq2evtw.js +328 -0
  375. package/dist/chunk-ts2p6bv1.js +224 -0
  376. package/dist/chunk-ttk5dzz8.js +25 -0
  377. package/dist/chunk-tw0q7ynt.js +59 -0
  378. package/dist/chunk-v02jkvgy.js +131 -0
  379. package/dist/chunk-v084bqt3.js +1529 -0
  380. package/dist/chunk-v0amythm.js +164 -0
  381. package/dist/chunk-v1kzp02e.js +785 -0
  382. package/dist/chunk-v1mgv1et.js +15 -0
  383. package/dist/chunk-v399mzxk.js +58 -0
  384. package/dist/chunk-v3gm2day.js +8 -0
  385. package/dist/chunk-v43hrrxp.js +71 -0
  386. package/dist/chunk-v6aqb2aj.js +102 -0
  387. package/dist/chunk-v78fj8by.js +145 -0
  388. package/dist/chunk-v7qmhjdn.js +1921 -0
  389. package/dist/chunk-v9smspw2.js +4301 -0
  390. package/dist/chunk-vdw93s4h.js +2431 -0
  391. package/dist/chunk-vest0y6x.js +3830 -0
  392. package/dist/chunk-vf5sd1nq.js +12 -0
  393. package/dist/chunk-vratq94g.js +349 -0
  394. package/dist/chunk-vrz7t3m3.js +20 -0
  395. package/dist/chunk-vtb185z9.js +70 -0
  396. package/dist/chunk-vx01rvg8.js +654 -0
  397. package/dist/chunk-vyc0rjyx.js +31 -0
  398. package/dist/chunk-vyjeh50y.js +2149 -0
  399. package/dist/chunk-vzpffsza.js +269 -0
  400. package/dist/chunk-w2ef3kxk.js +3353 -0
  401. package/dist/chunk-w2z5pqd3.js +336 -0
  402. package/dist/chunk-w3whm4mn.js +432 -0
  403. package/dist/chunk-w7wgpqcp.js +157 -0
  404. package/dist/chunk-waa00cvb.js +301 -0
  405. package/dist/chunk-wb0qm4es.js +155 -0
  406. package/dist/chunk-wbkahkdc.js +27 -0
  407. package/dist/chunk-wfz0qffj.js +3939 -0
  408. package/dist/chunk-wn0cx0pt.js +283 -0
  409. package/dist/chunk-wv6gzt9c.js +726 -0
  410. package/dist/chunk-wx42ycm4.js +998 -0
  411. package/dist/chunk-wxkpgy05.js +268 -0
  412. package/dist/chunk-wzpdet3m.js +843 -0
  413. package/dist/chunk-x0mwzt38.js +714 -0
  414. package/dist/chunk-x592wbfh.js +244 -0
  415. package/dist/chunk-x5pqsp9r.js +100 -0
  416. package/dist/chunk-x679thag.js +825 -0
  417. package/dist/chunk-x8b7vft8.js +132 -0
  418. package/dist/chunk-x8cftch7.js +119 -0
  419. package/dist/chunk-x9q7r885.js +348 -0
  420. package/dist/chunk-xawkt0vb.js +1585 -0
  421. package/dist/chunk-xdw5dv00.js +8 -0
  422. package/dist/chunk-xe9cc860.js +287 -0
  423. package/dist/chunk-xjr9c3vt.js +101 -0
  424. package/dist/chunk-xk7zaqta.js +21933 -0
  425. package/dist/chunk-xktbmawc.js +678 -0
  426. package/dist/chunk-xn6yw46v.js +140 -0
  427. package/dist/chunk-xsq9ae7x.js +90 -0
  428. package/dist/chunk-xszk7n10.js +14358 -0
  429. package/dist/chunk-xt8a5r1t.js +84 -0
  430. package/dist/chunk-xydyndkv.js +195 -0
  431. package/dist/chunk-xzt10yc5.js +60 -0
  432. package/dist/chunk-y04y95dr.js +91 -0
  433. package/dist/chunk-y1784krc.js +19 -0
  434. package/dist/chunk-y1x32h3x.js +128 -0
  435. package/dist/chunk-y3s7aww5.js +99 -0
  436. package/dist/chunk-y47cg3kz.js +42 -0
  437. package/dist/chunk-y7kzvepn.js +469 -0
  438. package/dist/chunk-y89kbsyc.js +287 -0
  439. package/dist/chunk-yd87p1c3.js +159 -0
  440. package/dist/chunk-yf3yw8fw.js +105 -0
  441. package/dist/chunk-ygbf0ezx.js +1391 -0
  442. package/dist/chunk-yjbxnshv.js +208 -0
  443. package/dist/chunk-ynednmqd.js +192 -0
  444. package/dist/chunk-yvhez44y.js +259 -0
  445. package/dist/chunk-ywxd4qw4.js +22 -0
  446. package/dist/chunk-yzrmgpy4.js +117 -0
  447. package/dist/chunk-z0b2vb24.js +862 -0
  448. package/dist/chunk-z1zj044v.js +655 -0
  449. package/dist/chunk-z2dp53wn.js +17 -0
  450. package/dist/chunk-z3w0xasa.js +165 -0
  451. package/dist/chunk-z7ycmrb3.js +644 -0
  452. package/dist/chunk-zh11tdkb.js +347 -0
  453. package/dist/chunk-zk2wsm7d.js +15 -0
  454. package/dist/chunk-zqfqcf22.js +229 -0
  455. package/dist/chunk-zqk2j8px.js +699 -0
  456. package/dist/chunk-zqvsc10j.js +2833 -0
  457. package/dist/chunk-zsfxha74.js +17655 -0
  458. package/dist/chunk-zvc4snyb.js +117 -0
  459. package/dist/cli.js +194 -0
  460. package/package.json +173 -0
@@ -0,0 +1,2644 @@
1
+ // @bun
2
+ import {
3
+ getAutoModeDenials,
4
+ init_autoModeDenials
5
+ } from "./chunk-0paqc2yw.js";
6
+ import {
7
+ detectUnreachableRules,
8
+ init_shadowedRuleDetection
9
+ } from "./chunk-kr3rg2y1.js";
10
+ import {
11
+ SearchBox,
12
+ init_SearchBox,
13
+ init_useSearchInput,
14
+ useSearchInput
15
+ } from "./chunk-w3whm4mn.js";
16
+ import {
17
+ Tab,
18
+ Tabs,
19
+ init_Tabs,
20
+ useTabHeaderFocus,
21
+ useTabsWidth
22
+ } from "./chunk-62xmt9mk.js";
23
+ import {
24
+ StatusIcon,
25
+ init_StatusIcon
26
+ } from "./chunk-75e8gtg9.js";
27
+ import {
28
+ AddWorkspaceDirectory,
29
+ init_AddWorkspaceDirectory
30
+ } from "./chunk-r3vakcs1.js";
31
+ import"./chunk-w7wgpqcp.js";
32
+ import"./chunk-tjq2evtw.js";
33
+ import"./chunk-mzfkvave.js";
34
+ import {
35
+ BashTool,
36
+ SandboxManager,
37
+ Select,
38
+ TextInput,
39
+ WebFetchTool,
40
+ applyPermissionUpdate,
41
+ createPermissionRetryMessage,
42
+ deletePermissionRule,
43
+ getAllowRules,
44
+ getAskRules,
45
+ getDenyRules,
46
+ init_AppState,
47
+ init_BashTool,
48
+ init_PermissionUpdate,
49
+ init_TextInput,
50
+ init_WebFetchTool,
51
+ init_messages1 as init_messages,
52
+ init_permissions,
53
+ init_sandbox_adapter,
54
+ init_select,
55
+ permissionRuleSourceDisplayString,
56
+ persistPermissionUpdate,
57
+ useAppState,
58
+ useSetAppState
59
+ } from "./chunk-ewsgsw9h.js";
60
+ import"./chunk-z1zj044v.js";
61
+ import"./chunk-t0rgmccj.js";
62
+ import"./chunk-key6jr7p.js";
63
+ import"./chunk-0m2861gw.js";
64
+ import"./chunk-0x9b2nmd.js";
65
+ import {
66
+ Dialog,
67
+ init_Dialog
68
+ } from "./chunk-89e1v45e.js";
69
+ import"./chunk-2gzv8nrw.js";
70
+ import"./chunk-ehtwnxpg.js";
71
+ import"./chunk-3be7ka25.js";
72
+ import"./chunk-x679thag.js";
73
+ import"./chunk-cgfdkzhb.js";
74
+ import"./chunk-bhdt6k7w.js";
75
+ import"./chunk-45kxdsp8.js";
76
+ import"./chunk-5dbk24zg.js";
77
+ import"./chunk-msjfc5ba.js";
78
+ import"./chunk-7zsapntc.js";
79
+ import {
80
+ init_useExitOnCtrlCDWithKeybindings,
81
+ useExitOnCtrlCDWithKeybindings
82
+ } from "./chunk-0rg6yrhy.js";
83
+ import"./chunk-9gbamk79.js";
84
+ import"./chunk-x0mwzt38.js";
85
+ import"./chunk-9e2kqv5g.js";
86
+ import {
87
+ Pane,
88
+ init_Pane,
89
+ init_useKeybinding,
90
+ init_useTerminalSize,
91
+ useKeybinding,
92
+ useTerminalSize
93
+ } from "./chunk-1qakq4sn.js";
94
+ import {
95
+ Newline,
96
+ ThemedBox_default,
97
+ ThemedText,
98
+ init_ink,
99
+ require_compiler_runtime,
100
+ useTerminalFocus,
101
+ use_input_default
102
+ } from "./chunk-s9mesaw0.js";
103
+ import"./chunk-7m2nd8da.js";
104
+ import"./chunk-ps49ymvj.js";
105
+ import {
106
+ require_jsx_dev_runtime,
107
+ require_react
108
+ } from "./chunk-g338npwr.js";
109
+ import"./chunk-zk2wsm7d.js";
110
+ import"./chunk-tw0q7ynt.js";
111
+ import"./chunk-xe9cc860.js";
112
+ import"./chunk-m06q12hg.js";
113
+ import"./chunk-ygbf0ezx.js";
114
+ import"./chunk-spqaamnc.js";
115
+ import"./chunk-4jm600zv.js";
116
+ import"./chunk-qz2x630m.js";
117
+ import"./chunk-7sb5axvf.js";
118
+ import"./chunk-v9smspw2.js";
119
+ import {
120
+ SOURCES,
121
+ getRelativeSettingsFilePathForSource,
122
+ init_constants,
123
+ init_permissionRuleParser,
124
+ init_settings1 as init_settings,
125
+ init_source,
126
+ init_stringUtils,
127
+ permissionRuleValueFromString,
128
+ permissionRuleValueToString,
129
+ plural,
130
+ source_default
131
+ } from "./chunk-3f7rypmf.js";
132
+ import"./chunk-e3g8q4cn.js";
133
+ import"./chunk-ctw5jwcd.js";
134
+ import"./chunk-0e1xsncc.js";
135
+ import"./chunk-vratq94g.js";
136
+ import"./chunk-g0j0t6qk.js";
137
+ import"./chunk-6kpbgc5w.js";
138
+ import"./chunk-3c25bcsw.js";
139
+ import"./chunk-tjaqa99q.js";
140
+ import"./chunk-55wgxwa9.js";
141
+ import"./chunk-w2z5pqd3.js";
142
+ import"./chunk-7ymfj7m3.js";
143
+ import"./chunk-f5ma3nh5.js";
144
+ import"./chunk-v1kzp02e.js";
145
+ import"./chunk-1eapde8a.js";
146
+ import"./chunk-p2816w9z.js";
147
+ import"./chunk-0vkfrmqm.js";
148
+ import"./chunk-0xjaqda8.js";
149
+ import"./chunk-1rvz0433.js";
150
+ import"./chunk-cdz5yb0r.js";
151
+ import"./chunk-f2mhrmww.js";
152
+ import"./chunk-7z8j9qfn.js";
153
+ import"./chunk-hrzerbfw.js";
154
+ import"./chunk-d18z9pna.js";
155
+ import"./chunk-qnfx3qtx.js";
156
+ import"./chunk-hjhc4cpt.js";
157
+ import"./chunk-vyc0rjyx.js";
158
+ import {
159
+ figures_default,
160
+ init_figures
161
+ } from "./chunk-hx2tr4ep.js";
162
+ import"./chunk-p7g7pf3f.js";
163
+ import"./chunk-8tnsngw2.js";
164
+ import"./chunk-8bedvdm1.js";
165
+ import"./chunk-7wm5s02e.js";
166
+ import {
167
+ init_slowOperations,
168
+ jsonStringify
169
+ } from "./chunk-nxsh6de2.js";
170
+ import"./chunk-fbv4apne.js";
171
+ import"./chunk-3r24h7t6.js";
172
+ import {
173
+ getOriginalCwd,
174
+ init_state
175
+ } from "./chunk-qqfa0dqg.js";
176
+ import"./chunk-hqmz36b3.js";
177
+ import"./chunk-4g3v8y12.js";
178
+ import"./chunk-7739pg2c.js";
179
+ import"./chunk-xszk7n10.js";
180
+ import"./chunk-sdj9b9wh.js";
181
+ import {
182
+ __esm,
183
+ __toESM
184
+ } from "./chunk-qp2qdcda.js";
185
+
186
+ // src/components/permissions/rules/PermissionRuleDescription.tsx
187
+ function PermissionRuleDescription(t0) {
188
+ const $ = import_compiler_runtime.c(9);
189
+ const {
190
+ ruleValue
191
+ } = t0;
192
+ switch (ruleValue.toolName) {
193
+ case BashTool.name: {
194
+ if (ruleValue.ruleContent) {
195
+ if (ruleValue.ruleContent.endsWith(":*")) {
196
+ let t1;
197
+ if ($[0] !== ruleValue.ruleContent) {
198
+ t1 = ruleValue.ruleContent.slice(0, -2);
199
+ $[0] = ruleValue.ruleContent;
200
+ $[1] = t1;
201
+ } else {
202
+ t1 = $[1];
203
+ }
204
+ let t2;
205
+ if ($[2] !== t1) {
206
+ t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
207
+ dimColor: true,
208
+ children: [
209
+ "Any Bash command starting with",
210
+ " ",
211
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
212
+ bold: true,
213
+ children: t1
214
+ }, undefined, false, undefined, this)
215
+ ]
216
+ }, undefined, true, undefined, this);
217
+ $[2] = t1;
218
+ $[3] = t2;
219
+ } else {
220
+ t2 = $[3];
221
+ }
222
+ return t2;
223
+ } else {
224
+ let t1;
225
+ if ($[4] !== ruleValue.ruleContent) {
226
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
227
+ dimColor: true,
228
+ children: [
229
+ "The Bash command ",
230
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
231
+ bold: true,
232
+ children: ruleValue.ruleContent
233
+ }, undefined, false, undefined, this)
234
+ ]
235
+ }, undefined, true, undefined, this);
236
+ $[4] = ruleValue.ruleContent;
237
+ $[5] = t1;
238
+ } else {
239
+ t1 = $[5];
240
+ }
241
+ return t1;
242
+ }
243
+ } else {
244
+ let t1;
245
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
246
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
247
+ dimColor: true,
248
+ children: "Any Bash command"
249
+ }, undefined, false, undefined, this);
250
+ $[6] = t1;
251
+ } else {
252
+ t1 = $[6];
253
+ }
254
+ return t1;
255
+ }
256
+ }
257
+ default: {
258
+ if (!ruleValue.ruleContent) {
259
+ let t1;
260
+ if ($[7] !== ruleValue.toolName) {
261
+ t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
262
+ dimColor: true,
263
+ children: [
264
+ "Any use of the ",
265
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
266
+ bold: true,
267
+ children: ruleValue.toolName
268
+ }, undefined, false, undefined, this),
269
+ " tool"
270
+ ]
271
+ }, undefined, true, undefined, this);
272
+ $[7] = ruleValue.toolName;
273
+ $[8] = t1;
274
+ } else {
275
+ t1 = $[8];
276
+ }
277
+ return t1;
278
+ } else {
279
+ return null;
280
+ }
281
+ }
282
+ }
283
+ }
284
+ var import_compiler_runtime, jsx_dev_runtime;
285
+ var init_PermissionRuleDescription = __esm(() => {
286
+ init_ink();
287
+ init_BashTool();
288
+ import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
289
+ jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
290
+ });
291
+
292
+ // src/components/permissions/rules/AddPermissionRules.tsx
293
+ function optionForPermissionSaveDestination(saveDestination) {
294
+ switch (saveDestination) {
295
+ case "localSettings":
296
+ return {
297
+ label: "Project settings (local)",
298
+ description: `Saved in ${getRelativeSettingsFilePathForSource("localSettings")}`,
299
+ value: saveDestination
300
+ };
301
+ case "projectSettings":
302
+ return {
303
+ label: "Project settings",
304
+ description: `Checked in at ${getRelativeSettingsFilePathForSource("projectSettings")}`,
305
+ value: saveDestination
306
+ };
307
+ case "userSettings":
308
+ return {
309
+ label: "User settings",
310
+ description: `Saved in at ~/.claude/settings.json`,
311
+ value: saveDestination
312
+ };
313
+ }
314
+ }
315
+ function AddPermissionRules(t0) {
316
+ const $ = import_compiler_runtime2.c(26);
317
+ const {
318
+ onAddRules,
319
+ onCancel,
320
+ ruleValues,
321
+ ruleBehavior,
322
+ initialContext,
323
+ setToolPermissionContext
324
+ } = t0;
325
+ let t1;
326
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
327
+ t1 = SOURCES.map(optionForPermissionSaveDestination);
328
+ $[0] = t1;
329
+ } else {
330
+ t1 = $[0];
331
+ }
332
+ const allOptions = t1;
333
+ let t2;
334
+ if ($[1] !== initialContext || $[2] !== onAddRules || $[3] !== onCancel || $[4] !== ruleBehavior || $[5] !== ruleValues || $[6] !== setToolPermissionContext) {
335
+ t2 = (selectedValue) => {
336
+ if (selectedValue === "cancel") {
337
+ onCancel();
338
+ return;
339
+ } else {
340
+ if (SOURCES.includes(selectedValue)) {
341
+ const destination = selectedValue;
342
+ const updatedContext = applyPermissionUpdate(initialContext, {
343
+ type: "addRules",
344
+ rules: ruleValues,
345
+ behavior: ruleBehavior,
346
+ destination
347
+ });
348
+ persistPermissionUpdate({
349
+ type: "addRules",
350
+ rules: ruleValues,
351
+ behavior: ruleBehavior,
352
+ destination
353
+ });
354
+ setToolPermissionContext(updatedContext);
355
+ const rules = ruleValues.map((ruleValue) => ({
356
+ ruleValue,
357
+ ruleBehavior,
358
+ source: destination
359
+ }));
360
+ const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
361
+ const allUnreachable = detectUnreachableRules(updatedContext, {
362
+ sandboxAutoAllowEnabled
363
+ });
364
+ const newUnreachable = allUnreachable.filter((u) => ruleValues.some((rv) => rv.toolName === u.rule.ruleValue.toolName && rv.ruleContent === u.rule.ruleValue.ruleContent));
365
+ onAddRules(rules, newUnreachable.length > 0 ? newUnreachable : undefined);
366
+ }
367
+ }
368
+ };
369
+ $[1] = initialContext;
370
+ $[2] = onAddRules;
371
+ $[3] = onCancel;
372
+ $[4] = ruleBehavior;
373
+ $[5] = ruleValues;
374
+ $[6] = setToolPermissionContext;
375
+ $[7] = t2;
376
+ } else {
377
+ t2 = $[7];
378
+ }
379
+ const onSelect = t2;
380
+ let t3;
381
+ if ($[8] !== ruleValues.length) {
382
+ t3 = plural(ruleValues.length, "rule");
383
+ $[8] = ruleValues.length;
384
+ $[9] = t3;
385
+ } else {
386
+ t3 = $[9];
387
+ }
388
+ const title = `Add ${ruleBehavior} permission ${t3}`;
389
+ let t4;
390
+ if ($[10] !== ruleValues) {
391
+ t4 = ruleValues.map(_temp);
392
+ $[10] = ruleValues;
393
+ $[11] = t4;
394
+ } else {
395
+ t4 = $[11];
396
+ }
397
+ let t5;
398
+ if ($[12] !== t4) {
399
+ t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
400
+ flexDirection: "column",
401
+ paddingX: 2,
402
+ children: t4
403
+ }, undefined, false, undefined, this);
404
+ $[12] = t4;
405
+ $[13] = t5;
406
+ } else {
407
+ t5 = $[13];
408
+ }
409
+ const t6 = ruleValues.length === 1 ? "Where should this rule be saved?" : "Where should these rules be saved?";
410
+ let t7;
411
+ if ($[14] !== t6) {
412
+ t7 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
413
+ children: t6
414
+ }, undefined, false, undefined, this);
415
+ $[14] = t6;
416
+ $[15] = t7;
417
+ } else {
418
+ t7 = $[15];
419
+ }
420
+ let t8;
421
+ if ($[16] !== onSelect) {
422
+ t8 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
423
+ options: allOptions,
424
+ onChange: onSelect
425
+ }, undefined, false, undefined, this);
426
+ $[16] = onSelect;
427
+ $[17] = t8;
428
+ } else {
429
+ t8 = $[17];
430
+ }
431
+ let t9;
432
+ if ($[18] !== t7 || $[19] !== t8) {
433
+ t9 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
434
+ flexDirection: "column",
435
+ marginY: 1,
436
+ children: [
437
+ t7,
438
+ t8
439
+ ]
440
+ }, undefined, true, undefined, this);
441
+ $[18] = t7;
442
+ $[19] = t8;
443
+ $[20] = t9;
444
+ } else {
445
+ t9 = $[20];
446
+ }
447
+ let t10;
448
+ if ($[21] !== onCancel || $[22] !== t5 || $[23] !== t9 || $[24] !== title) {
449
+ t10 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
450
+ title,
451
+ onCancel,
452
+ color: "permission",
453
+ children: [
454
+ t5,
455
+ t9
456
+ ]
457
+ }, undefined, true, undefined, this);
458
+ $[21] = onCancel;
459
+ $[22] = t5;
460
+ $[23] = t9;
461
+ $[24] = title;
462
+ $[25] = t10;
463
+ } else {
464
+ t10 = $[25];
465
+ }
466
+ return t10;
467
+ }
468
+ function _temp(ruleValue_0) {
469
+ return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
470
+ flexDirection: "column",
471
+ children: [
472
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
473
+ bold: true,
474
+ children: permissionRuleValueToString(ruleValue_0)
475
+ }, undefined, false, undefined, this),
476
+ /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(PermissionRuleDescription, {
477
+ ruleValue: ruleValue_0
478
+ }, undefined, false, undefined, this)
479
+ ]
480
+ }, permissionRuleValueToString(ruleValue_0), true, undefined, this);
481
+ }
482
+ var import_compiler_runtime2, jsx_dev_runtime2;
483
+ var init_AddPermissionRules = __esm(() => {
484
+ init_select();
485
+ init_ink();
486
+ init_PermissionUpdate();
487
+ init_permissionRuleParser();
488
+ init_shadowedRuleDetection();
489
+ init_sandbox_adapter();
490
+ init_constants();
491
+ init_settings();
492
+ init_stringUtils();
493
+ init_Dialog();
494
+ init_PermissionRuleDescription();
495
+ import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
496
+ jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
497
+ });
498
+
499
+ // src/components/permissions/rules/PermissionRuleInput.tsx
500
+ function PermissionRuleInput(t0) {
501
+ const $ = import_compiler_runtime3.c(24);
502
+ const {
503
+ onCancel,
504
+ onSubmit,
505
+ ruleBehavior
506
+ } = t0;
507
+ const [inputValue, setInputValue] = import_react.useState("");
508
+ const [cursorOffset, setCursorOffset] = import_react.useState(0);
509
+ const exitState = useExitOnCtrlCDWithKeybindings();
510
+ let t1;
511
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
512
+ t1 = {
513
+ context: "Settings"
514
+ };
515
+ $[0] = t1;
516
+ } else {
517
+ t1 = $[0];
518
+ }
519
+ useKeybinding("confirm:no", onCancel, t1);
520
+ const {
521
+ columns
522
+ } = useTerminalSize();
523
+ const textInputColumns = columns - 6;
524
+ let t2;
525
+ if ($[1] !== onSubmit || $[2] !== ruleBehavior) {
526
+ t2 = (value) => {
527
+ const trimmedValue = value.trim();
528
+ if (trimmedValue.length === 0) {
529
+ return;
530
+ }
531
+ const ruleValue = permissionRuleValueFromString(trimmedValue);
532
+ onSubmit(ruleValue, ruleBehavior);
533
+ };
534
+ $[1] = onSubmit;
535
+ $[2] = ruleBehavior;
536
+ $[3] = t2;
537
+ } else {
538
+ t2 = $[3];
539
+ }
540
+ const handleSubmit = t2;
541
+ let t3;
542
+ if ($[4] !== ruleBehavior) {
543
+ t3 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
544
+ bold: true,
545
+ color: "permission",
546
+ children: [
547
+ "Add ",
548
+ ruleBehavior,
549
+ " permission rule"
550
+ ]
551
+ }, undefined, true, undefined, this);
552
+ $[4] = ruleBehavior;
553
+ $[5] = t3;
554
+ } else {
555
+ t3 = $[5];
556
+ }
557
+ let t4;
558
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
559
+ t4 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Newline, {}, undefined, false, undefined, this);
560
+ $[6] = t4;
561
+ } else {
562
+ t4 = $[6];
563
+ }
564
+ let t5;
565
+ let t6;
566
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
567
+ t5 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
568
+ bold: true,
569
+ children: permissionRuleValueToString({
570
+ toolName: WebFetchTool.name
571
+ })
572
+ }, undefined, false, undefined, this);
573
+ t6 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
574
+ bold: false,
575
+ children: " or "
576
+ }, undefined, false, undefined, this);
577
+ $[7] = t5;
578
+ $[8] = t6;
579
+ } else {
580
+ t5 = $[7];
581
+ t6 = $[8];
582
+ }
583
+ let t7;
584
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
585
+ t7 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
586
+ children: [
587
+ "Permission rules are a tool name, optionally followed by a specifier in parentheses.",
588
+ t4,
589
+ "e.g.,",
590
+ " ",
591
+ t5,
592
+ t6,
593
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
594
+ bold: true,
595
+ children: permissionRuleValueToString({
596
+ toolName: BashTool.name,
597
+ ruleContent: "ls:*"
598
+ })
599
+ }, undefined, false, undefined, this)
600
+ ]
601
+ }, undefined, true, undefined, this);
602
+ $[9] = t7;
603
+ } else {
604
+ t7 = $[9];
605
+ }
606
+ let t8;
607
+ if ($[10] !== cursorOffset || $[11] !== handleSubmit || $[12] !== inputValue || $[13] !== textInputColumns) {
608
+ t8 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
609
+ flexDirection: "column",
610
+ children: [
611
+ t7,
612
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
613
+ borderDimColor: true,
614
+ borderStyle: "round",
615
+ marginY: 1,
616
+ paddingLeft: 1,
617
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
618
+ showCursor: true,
619
+ value: inputValue,
620
+ onChange: setInputValue,
621
+ onSubmit: handleSubmit,
622
+ placeholder: `Enter permission rule${figures_default.ellipsis}`,
623
+ columns: textInputColumns,
624
+ cursorOffset,
625
+ onChangeCursorOffset: setCursorOffset
626
+ }, undefined, false, undefined, this)
627
+ }, undefined, false, undefined, this)
628
+ ]
629
+ }, undefined, true, undefined, this);
630
+ $[10] = cursorOffset;
631
+ $[11] = handleSubmit;
632
+ $[12] = inputValue;
633
+ $[13] = textInputColumns;
634
+ $[14] = t8;
635
+ } else {
636
+ t8 = $[14];
637
+ }
638
+ let t9;
639
+ if ($[15] !== t3 || $[16] !== t8) {
640
+ t9 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
641
+ flexDirection: "column",
642
+ gap: 1,
643
+ borderStyle: "round",
644
+ paddingLeft: 1,
645
+ paddingRight: 1,
646
+ borderColor: "permission",
647
+ children: [
648
+ t3,
649
+ t8
650
+ ]
651
+ }, undefined, true, undefined, this);
652
+ $[15] = t3;
653
+ $[16] = t8;
654
+ $[17] = t9;
655
+ } else {
656
+ t9 = $[17];
657
+ }
658
+ let t10;
659
+ if ($[18] !== exitState.keyName || $[19] !== exitState.pending) {
660
+ t10 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
661
+ marginLeft: 3,
662
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
663
+ dimColor: true,
664
+ children: [
665
+ "Press ",
666
+ exitState.keyName,
667
+ " again to exit"
668
+ ]
669
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
670
+ dimColor: true,
671
+ children: "Enter to submit \xB7 Esc to cancel"
672
+ }, undefined, false, undefined, this)
673
+ }, undefined, false, undefined, this);
674
+ $[18] = exitState.keyName;
675
+ $[19] = exitState.pending;
676
+ $[20] = t10;
677
+ } else {
678
+ t10 = $[20];
679
+ }
680
+ let t11;
681
+ if ($[21] !== t10 || $[22] !== t9) {
682
+ t11 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
683
+ children: [
684
+ t9,
685
+ t10
686
+ ]
687
+ }, undefined, true, undefined, this);
688
+ $[21] = t10;
689
+ $[22] = t9;
690
+ $[23] = t11;
691
+ } else {
692
+ t11 = $[23];
693
+ }
694
+ return t11;
695
+ }
696
+ var import_compiler_runtime3, import_react, jsx_dev_runtime3;
697
+ var init_PermissionRuleInput = __esm(() => {
698
+ init_figures();
699
+ init_TextInput();
700
+ init_useExitOnCtrlCDWithKeybindings();
701
+ init_useTerminalSize();
702
+ init_ink();
703
+ init_useKeybinding();
704
+ init_BashTool();
705
+ init_WebFetchTool();
706
+ init_permissionRuleParser();
707
+ import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
708
+ import_react = __toESM(require_react(), 1);
709
+ jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
710
+ });
711
+
712
+ // src/components/permissions/rules/RecentDenialsTab.tsx
713
+ function RecentDenialsTab(t0) {
714
+ const $ = import_compiler_runtime4.c(30);
715
+ const {
716
+ onHeaderFocusChange,
717
+ onStateChange
718
+ } = t0;
719
+ const {
720
+ headerFocused,
721
+ focusHeader
722
+ } = useTabHeaderFocus();
723
+ let t1;
724
+ let t2;
725
+ if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
726
+ t1 = () => {
727
+ onHeaderFocusChange?.(headerFocused);
728
+ };
729
+ t2 = [headerFocused, onHeaderFocusChange];
730
+ $[0] = headerFocused;
731
+ $[1] = onHeaderFocusChange;
732
+ $[2] = t1;
733
+ $[3] = t2;
734
+ } else {
735
+ t1 = $[2];
736
+ t2 = $[3];
737
+ }
738
+ import_react2.useEffect(t1, t2);
739
+ const [denials] = import_react2.useState(_temp4);
740
+ const [approved, setApproved] = import_react2.useState(_temp2);
741
+ const [retry, setRetry] = import_react2.useState(_temp3);
742
+ const [focusedIdx, setFocusedIdx] = import_react2.useState(0);
743
+ let t3;
744
+ let t4;
745
+ if ($[4] !== approved || $[5] !== denials || $[6] !== onStateChange || $[7] !== retry) {
746
+ t3 = () => {
747
+ onStateChange({
748
+ approved,
749
+ retry,
750
+ denials
751
+ });
752
+ };
753
+ t4 = [approved, retry, denials, onStateChange];
754
+ $[4] = approved;
755
+ $[5] = denials;
756
+ $[6] = onStateChange;
757
+ $[7] = retry;
758
+ $[8] = t3;
759
+ $[9] = t4;
760
+ } else {
761
+ t3 = $[8];
762
+ t4 = $[9];
763
+ }
764
+ import_react2.useEffect(t3, t4);
765
+ let t5;
766
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
767
+ t5 = (value) => {
768
+ const idx = Number(value);
769
+ setApproved((prev) => {
770
+ const next = new Set(prev);
771
+ if (next.has(idx)) {
772
+ next.delete(idx);
773
+ } else {
774
+ next.add(idx);
775
+ }
776
+ return next;
777
+ });
778
+ };
779
+ $[10] = t5;
780
+ } else {
781
+ t5 = $[10];
782
+ }
783
+ const handleSelect = t5;
784
+ let t6;
785
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
786
+ t6 = (value_0) => {
787
+ setFocusedIdx(Number(value_0));
788
+ };
789
+ $[11] = t6;
790
+ } else {
791
+ t6 = $[11];
792
+ }
793
+ const handleFocus = t6;
794
+ let t7;
795
+ if ($[12] !== focusedIdx) {
796
+ t7 = (input, _key) => {
797
+ if (input === "r") {
798
+ setRetry((prev_0) => {
799
+ const next_0 = new Set(prev_0);
800
+ if (next_0.has(focusedIdx)) {
801
+ next_0.delete(focusedIdx);
802
+ } else {
803
+ next_0.add(focusedIdx);
804
+ }
805
+ return next_0;
806
+ });
807
+ setApproved((prev_1) => {
808
+ if (prev_1.has(focusedIdx)) {
809
+ return prev_1;
810
+ }
811
+ const next_1 = new Set(prev_1);
812
+ next_1.add(focusedIdx);
813
+ return next_1;
814
+ });
815
+ }
816
+ };
817
+ $[12] = focusedIdx;
818
+ $[13] = t7;
819
+ } else {
820
+ t7 = $[13];
821
+ }
822
+ const t8 = denials.length > 0;
823
+ let t9;
824
+ if ($[14] !== t8) {
825
+ t9 = {
826
+ isActive: t8
827
+ };
828
+ $[14] = t8;
829
+ $[15] = t9;
830
+ } else {
831
+ t9 = $[15];
832
+ }
833
+ use_input_default(t7, t9);
834
+ if (denials.length === 0) {
835
+ let t102;
836
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
837
+ t102 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
838
+ dimColor: true,
839
+ children: "No recent denials. Commands denied by the auto mode classifier will appear here."
840
+ }, undefined, false, undefined, this);
841
+ $[16] = t102;
842
+ } else {
843
+ t102 = $[16];
844
+ }
845
+ return t102;
846
+ }
847
+ let t10;
848
+ if ($[17] !== approved || $[18] !== denials || $[19] !== retry) {
849
+ let t112;
850
+ if ($[21] !== approved || $[22] !== retry) {
851
+ t112 = (d, idx_0) => {
852
+ const isApproved = approved.has(idx_0);
853
+ const suffix = retry.has(idx_0) ? " (retry)" : "";
854
+ return {
855
+ label: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
856
+ children: [
857
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(StatusIcon, {
858
+ status: isApproved ? "success" : "error",
859
+ withSpace: true
860
+ }, undefined, false, undefined, this),
861
+ d.display,
862
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
863
+ dimColor: true,
864
+ children: suffix
865
+ }, undefined, false, undefined, this)
866
+ ]
867
+ }, undefined, true, undefined, this),
868
+ value: String(idx_0)
869
+ };
870
+ };
871
+ $[21] = approved;
872
+ $[22] = retry;
873
+ $[23] = t112;
874
+ } else {
875
+ t112 = $[23];
876
+ }
877
+ t10 = denials.map(t112);
878
+ $[17] = approved;
879
+ $[18] = denials;
880
+ $[19] = retry;
881
+ $[20] = t10;
882
+ } else {
883
+ t10 = $[20];
884
+ }
885
+ const options = t10;
886
+ let t11;
887
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
888
+ t11 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
889
+ children: "Commands recently denied by the auto mode classifier."
890
+ }, undefined, false, undefined, this);
891
+ $[24] = t11;
892
+ } else {
893
+ t11 = $[24];
894
+ }
895
+ const t12 = Math.min(10, options.length);
896
+ let t13;
897
+ if ($[25] !== focusHeader || $[26] !== headerFocused || $[27] !== options || $[28] !== t12) {
898
+ t13 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
899
+ flexDirection: "column",
900
+ children: [
901
+ t11,
902
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
903
+ marginTop: 1,
904
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
905
+ options,
906
+ onChange: handleSelect,
907
+ onFocus: handleFocus,
908
+ visibleOptionCount: t12,
909
+ isDisabled: headerFocused,
910
+ onUpFromFirstItem: focusHeader
911
+ }, undefined, false, undefined, this)
912
+ }, undefined, false, undefined, this)
913
+ ]
914
+ }, undefined, true, undefined, this);
915
+ $[25] = focusHeader;
916
+ $[26] = headerFocused;
917
+ $[27] = options;
918
+ $[28] = t12;
919
+ $[29] = t13;
920
+ } else {
921
+ t13 = $[29];
922
+ }
923
+ return t13;
924
+ }
925
+ function _temp3() {
926
+ return new Set;
927
+ }
928
+ function _temp2() {
929
+ return new Set;
930
+ }
931
+ function _temp4() {
932
+ return getAutoModeDenials();
933
+ }
934
+ var import_compiler_runtime4, import_react2, jsx_dev_runtime4;
935
+ var init_RecentDenialsTab = __esm(() => {
936
+ init_ink();
937
+ init_autoModeDenials();
938
+ init_select();
939
+ init_StatusIcon();
940
+ init_Tabs();
941
+ import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
942
+ import_react2 = __toESM(require_react(), 1);
943
+ jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
944
+ });
945
+
946
+ // src/components/permissions/rules/RemoveWorkspaceDirectory.tsx
947
+ function RemoveWorkspaceDirectory(t0) {
948
+ const $ = import_compiler_runtime5.c(19);
949
+ const {
950
+ directoryPath,
951
+ onRemove,
952
+ onCancel,
953
+ permissionContext,
954
+ setPermissionContext
955
+ } = t0;
956
+ let t1;
957
+ if ($[0] !== directoryPath || $[1] !== onRemove || $[2] !== permissionContext || $[3] !== setPermissionContext) {
958
+ t1 = () => {
959
+ const updatedContext = applyPermissionUpdate(permissionContext, {
960
+ type: "removeDirectories",
961
+ directories: [directoryPath],
962
+ destination: "session"
963
+ });
964
+ setPermissionContext(updatedContext);
965
+ onRemove();
966
+ };
967
+ $[0] = directoryPath;
968
+ $[1] = onRemove;
969
+ $[2] = permissionContext;
970
+ $[3] = setPermissionContext;
971
+ $[4] = t1;
972
+ } else {
973
+ t1 = $[4];
974
+ }
975
+ const handleRemove = t1;
976
+ let t2;
977
+ if ($[5] !== handleRemove || $[6] !== onCancel) {
978
+ t2 = (value) => {
979
+ if (value === "yes") {
980
+ handleRemove();
981
+ } else {
982
+ onCancel();
983
+ }
984
+ };
985
+ $[5] = handleRemove;
986
+ $[6] = onCancel;
987
+ $[7] = t2;
988
+ } else {
989
+ t2 = $[7];
990
+ }
991
+ const handleSelect = t2;
992
+ let t3;
993
+ if ($[8] !== directoryPath) {
994
+ t3 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
995
+ marginX: 2,
996
+ flexDirection: "column",
997
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
998
+ bold: true,
999
+ children: directoryPath
1000
+ }, undefined, false, undefined, this)
1001
+ }, undefined, false, undefined, this);
1002
+ $[8] = directoryPath;
1003
+ $[9] = t3;
1004
+ } else {
1005
+ t3 = $[9];
1006
+ }
1007
+ let t4;
1008
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1009
+ t4 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1010
+ children: "Claude Code will no longer have access to files in this directory."
1011
+ }, undefined, false, undefined, this);
1012
+ $[10] = t4;
1013
+ } else {
1014
+ t4 = $[10];
1015
+ }
1016
+ let t5;
1017
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1018
+ t5 = [{
1019
+ label: "Yes",
1020
+ value: "yes"
1021
+ }, {
1022
+ label: "No",
1023
+ value: "no"
1024
+ }];
1025
+ $[11] = t5;
1026
+ } else {
1027
+ t5 = $[11];
1028
+ }
1029
+ let t6;
1030
+ if ($[12] !== handleSelect || $[13] !== onCancel) {
1031
+ t6 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
1032
+ onChange: handleSelect,
1033
+ onCancel,
1034
+ options: t5
1035
+ }, undefined, false, undefined, this);
1036
+ $[12] = handleSelect;
1037
+ $[13] = onCancel;
1038
+ $[14] = t6;
1039
+ } else {
1040
+ t6 = $[14];
1041
+ }
1042
+ let t7;
1043
+ if ($[15] !== onCancel || $[16] !== t3 || $[17] !== t6) {
1044
+ t7 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
1045
+ title: "Remove directory from workspace?",
1046
+ onCancel,
1047
+ color: "error",
1048
+ children: [
1049
+ t3,
1050
+ t4,
1051
+ t6
1052
+ ]
1053
+ }, undefined, true, undefined, this);
1054
+ $[15] = onCancel;
1055
+ $[16] = t3;
1056
+ $[17] = t6;
1057
+ $[18] = t7;
1058
+ } else {
1059
+ t7 = $[18];
1060
+ }
1061
+ return t7;
1062
+ }
1063
+ var import_compiler_runtime5, jsx_dev_runtime5;
1064
+ var init_RemoveWorkspaceDirectory = __esm(() => {
1065
+ init_select();
1066
+ init_ink();
1067
+ init_PermissionUpdate();
1068
+ init_Dialog();
1069
+ import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
1070
+ jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
1071
+ });
1072
+
1073
+ // src/components/permissions/rules/WorkspaceTab.tsx
1074
+ function WorkspaceTab(t0) {
1075
+ const $ = import_compiler_runtime6.c(23);
1076
+ const {
1077
+ onExit,
1078
+ toolPermissionContext,
1079
+ onRequestAddDirectory,
1080
+ onRequestRemoveDirectory,
1081
+ onHeaderFocusChange
1082
+ } = t0;
1083
+ const {
1084
+ headerFocused,
1085
+ focusHeader
1086
+ } = useTabHeaderFocus();
1087
+ let t1;
1088
+ let t2;
1089
+ if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
1090
+ t1 = () => {
1091
+ onHeaderFocusChange?.(headerFocused);
1092
+ };
1093
+ t2 = [headerFocused, onHeaderFocusChange];
1094
+ $[0] = headerFocused;
1095
+ $[1] = onHeaderFocusChange;
1096
+ $[2] = t1;
1097
+ $[3] = t2;
1098
+ } else {
1099
+ t1 = $[2];
1100
+ t2 = $[3];
1101
+ }
1102
+ import_react3.useEffect(t1, t2);
1103
+ let t3;
1104
+ if ($[4] !== toolPermissionContext.additionalWorkingDirectories) {
1105
+ t3 = Array.from(toolPermissionContext.additionalWorkingDirectories.keys()).map(_temp6);
1106
+ $[4] = toolPermissionContext.additionalWorkingDirectories;
1107
+ $[5] = t3;
1108
+ } else {
1109
+ t3 = $[5];
1110
+ }
1111
+ const additionalDirectories = t3;
1112
+ let t4;
1113
+ if ($[6] !== additionalDirectories || $[7] !== onRequestAddDirectory || $[8] !== onRequestRemoveDirectory) {
1114
+ t4 = (selectedValue) => {
1115
+ if (selectedValue === "add-directory") {
1116
+ onRequestAddDirectory();
1117
+ return;
1118
+ }
1119
+ const directory = additionalDirectories.find((d) => d.path === selectedValue);
1120
+ if (directory && directory.isDeletable) {
1121
+ onRequestRemoveDirectory(directory.path);
1122
+ }
1123
+ };
1124
+ $[6] = additionalDirectories;
1125
+ $[7] = onRequestAddDirectory;
1126
+ $[8] = onRequestRemoveDirectory;
1127
+ $[9] = t4;
1128
+ } else {
1129
+ t4 = $[9];
1130
+ }
1131
+ const handleDirectorySelect = t4;
1132
+ let t5;
1133
+ if ($[10] !== onExit) {
1134
+ t5 = () => onExit("Workspace dialog dismissed", {
1135
+ display: "system"
1136
+ });
1137
+ $[10] = onExit;
1138
+ $[11] = t5;
1139
+ } else {
1140
+ t5 = $[11];
1141
+ }
1142
+ const handleCancel = t5;
1143
+ let opts;
1144
+ if ($[12] !== additionalDirectories) {
1145
+ opts = additionalDirectories.map(_temp22);
1146
+ let t62;
1147
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1148
+ t62 = {
1149
+ label: `Add directory${figures_default.ellipsis}`,
1150
+ value: "add-directory"
1151
+ };
1152
+ $[14] = t62;
1153
+ } else {
1154
+ t62 = $[14];
1155
+ }
1156
+ opts.push(t62);
1157
+ $[12] = additionalDirectories;
1158
+ $[13] = opts;
1159
+ } else {
1160
+ opts = $[13];
1161
+ }
1162
+ const options = opts;
1163
+ let t6;
1164
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1165
+ t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1166
+ flexDirection: "row",
1167
+ marginTop: 1,
1168
+ marginLeft: 2,
1169
+ gap: 1,
1170
+ children: [
1171
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1172
+ children: `- ${getOriginalCwd()}`
1173
+ }, undefined, false, undefined, this),
1174
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1175
+ dimColor: true,
1176
+ children: "(Original working directory)"
1177
+ }, undefined, false, undefined, this)
1178
+ ]
1179
+ }, undefined, true, undefined, this);
1180
+ $[15] = t6;
1181
+ } else {
1182
+ t6 = $[15];
1183
+ }
1184
+ const t7 = Math.min(10, options.length);
1185
+ let t8;
1186
+ if ($[16] !== focusHeader || $[17] !== handleCancel || $[18] !== handleDirectorySelect || $[19] !== headerFocused || $[20] !== options || $[21] !== t7) {
1187
+ t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1188
+ flexDirection: "column",
1189
+ marginBottom: 1,
1190
+ children: [
1191
+ t6,
1192
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Select, {
1193
+ options,
1194
+ onChange: handleDirectorySelect,
1195
+ onCancel: handleCancel,
1196
+ visibleOptionCount: t7,
1197
+ onUpFromFirstItem: focusHeader,
1198
+ isDisabled: headerFocused
1199
+ }, undefined, false, undefined, this)
1200
+ ]
1201
+ }, undefined, true, undefined, this);
1202
+ $[16] = focusHeader;
1203
+ $[17] = handleCancel;
1204
+ $[18] = handleDirectorySelect;
1205
+ $[19] = headerFocused;
1206
+ $[20] = options;
1207
+ $[21] = t7;
1208
+ $[22] = t8;
1209
+ } else {
1210
+ t8 = $[22];
1211
+ }
1212
+ return t8;
1213
+ }
1214
+ function _temp22(dir) {
1215
+ return {
1216
+ label: dir.path,
1217
+ value: dir.path
1218
+ };
1219
+ }
1220
+ function _temp6(path) {
1221
+ return {
1222
+ path,
1223
+ isCurrent: false,
1224
+ isDeletable: true
1225
+ };
1226
+ }
1227
+ var import_compiler_runtime6, import_react3, jsx_dev_runtime6;
1228
+ var init_WorkspaceTab = __esm(() => {
1229
+ init_figures();
1230
+ init_state();
1231
+ init_select();
1232
+ init_ink();
1233
+ init_Tabs();
1234
+ import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
1235
+ import_react3 = __toESM(require_react(), 1);
1236
+ jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
1237
+ });
1238
+
1239
+ // src/components/permissions/rules/PermissionRuleList.tsx
1240
+ function RuleSourceText(t0) {
1241
+ const $ = import_compiler_runtime7.c(4);
1242
+ const {
1243
+ rule
1244
+ } = t0;
1245
+ let t1;
1246
+ if ($[0] !== rule.source) {
1247
+ t1 = permissionRuleSourceDisplayString(rule.source);
1248
+ $[0] = rule.source;
1249
+ $[1] = t1;
1250
+ } else {
1251
+ t1 = $[1];
1252
+ }
1253
+ const t2 = `From ${t1}`;
1254
+ let t3;
1255
+ if ($[2] !== t2) {
1256
+ t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1257
+ dimColor: true,
1258
+ children: t2
1259
+ }, undefined, false, undefined, this);
1260
+ $[2] = t2;
1261
+ $[3] = t3;
1262
+ } else {
1263
+ t3 = $[3];
1264
+ }
1265
+ return t3;
1266
+ }
1267
+ function getRuleBehaviorLabel(ruleBehavior) {
1268
+ switch (ruleBehavior) {
1269
+ case "allow":
1270
+ return "allowed";
1271
+ case "deny":
1272
+ return "denied";
1273
+ case "ask":
1274
+ return "ask";
1275
+ }
1276
+ }
1277
+ function RuleDetails(t0) {
1278
+ const $ = import_compiler_runtime7.c(42);
1279
+ const {
1280
+ rule,
1281
+ onDelete,
1282
+ onCancel
1283
+ } = t0;
1284
+ const exitState = useExitOnCtrlCDWithKeybindings();
1285
+ let t1;
1286
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1287
+ t1 = {
1288
+ context: "Confirmation"
1289
+ };
1290
+ $[0] = t1;
1291
+ } else {
1292
+ t1 = $[0];
1293
+ }
1294
+ useKeybinding("confirm:no", onCancel, t1);
1295
+ let t2;
1296
+ if ($[1] !== rule.ruleValue) {
1297
+ t2 = permissionRuleValueToString(rule.ruleValue);
1298
+ $[1] = rule.ruleValue;
1299
+ $[2] = t2;
1300
+ } else {
1301
+ t2 = $[2];
1302
+ }
1303
+ let t3;
1304
+ if ($[3] !== t2) {
1305
+ t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1306
+ bold: true,
1307
+ children: t2
1308
+ }, undefined, false, undefined, this);
1309
+ $[3] = t2;
1310
+ $[4] = t3;
1311
+ } else {
1312
+ t3 = $[4];
1313
+ }
1314
+ let t4;
1315
+ if ($[5] !== rule.ruleValue) {
1316
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleDescription, {
1317
+ ruleValue: rule.ruleValue
1318
+ }, undefined, false, undefined, this);
1319
+ $[5] = rule.ruleValue;
1320
+ $[6] = t4;
1321
+ } else {
1322
+ t4 = $[6];
1323
+ }
1324
+ let t5;
1325
+ if ($[7] !== rule) {
1326
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleSourceText, {
1327
+ rule
1328
+ }, undefined, false, undefined, this);
1329
+ $[7] = rule;
1330
+ $[8] = t5;
1331
+ } else {
1332
+ t5 = $[8];
1333
+ }
1334
+ let t6;
1335
+ if ($[9] !== t3 || $[10] !== t4 || $[11] !== t5) {
1336
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1337
+ flexDirection: "column",
1338
+ marginX: 2,
1339
+ children: [
1340
+ t3,
1341
+ t4,
1342
+ t5
1343
+ ]
1344
+ }, undefined, true, undefined, this);
1345
+ $[9] = t3;
1346
+ $[10] = t4;
1347
+ $[11] = t5;
1348
+ $[12] = t6;
1349
+ } else {
1350
+ t6 = $[12];
1351
+ }
1352
+ const ruleDescription = t6;
1353
+ let t7;
1354
+ if ($[13] !== exitState.keyName || $[14] !== exitState.pending) {
1355
+ t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1356
+ marginLeft: 3,
1357
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1358
+ dimColor: true,
1359
+ children: [
1360
+ "Press ",
1361
+ exitState.keyName,
1362
+ " again to exit"
1363
+ ]
1364
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1365
+ dimColor: true,
1366
+ children: "Esc to cancel"
1367
+ }, undefined, false, undefined, this)
1368
+ }, undefined, false, undefined, this);
1369
+ $[13] = exitState.keyName;
1370
+ $[14] = exitState.pending;
1371
+ $[15] = t7;
1372
+ } else {
1373
+ t7 = $[15];
1374
+ }
1375
+ const footer = t7;
1376
+ if (rule.source === "policySettings") {
1377
+ let t82;
1378
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1379
+ t82 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1380
+ bold: true,
1381
+ color: "permission",
1382
+ children: "Rule details"
1383
+ }, undefined, false, undefined, this);
1384
+ $[16] = t82;
1385
+ } else {
1386
+ t82 = $[16];
1387
+ }
1388
+ let t92;
1389
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1390
+ t92 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1391
+ italic: true,
1392
+ children: [
1393
+ "This rule is configured by managed settings and cannot be modified.",
1394
+ `
1395
+ `,
1396
+ "Contact your system administrator for more information."
1397
+ ]
1398
+ }, undefined, true, undefined, this);
1399
+ $[17] = t92;
1400
+ } else {
1401
+ t92 = $[17];
1402
+ }
1403
+ let t102;
1404
+ if ($[18] !== ruleDescription) {
1405
+ t102 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1406
+ flexDirection: "column",
1407
+ gap: 1,
1408
+ borderStyle: "round",
1409
+ paddingLeft: 1,
1410
+ paddingRight: 1,
1411
+ borderColor: "permission",
1412
+ children: [
1413
+ t82,
1414
+ ruleDescription,
1415
+ t92
1416
+ ]
1417
+ }, undefined, true, undefined, this);
1418
+ $[18] = ruleDescription;
1419
+ $[19] = t102;
1420
+ } else {
1421
+ t102 = $[19];
1422
+ }
1423
+ let t112;
1424
+ if ($[20] !== footer || $[21] !== t102) {
1425
+ t112 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1426
+ children: [
1427
+ t102,
1428
+ footer
1429
+ ]
1430
+ }, undefined, true, undefined, this);
1431
+ $[20] = footer;
1432
+ $[21] = t102;
1433
+ $[22] = t112;
1434
+ } else {
1435
+ t112 = $[22];
1436
+ }
1437
+ return t112;
1438
+ }
1439
+ let t8;
1440
+ if ($[23] !== rule.ruleBehavior) {
1441
+ t8 = getRuleBehaviorLabel(rule.ruleBehavior);
1442
+ $[23] = rule.ruleBehavior;
1443
+ $[24] = t8;
1444
+ } else {
1445
+ t8 = $[24];
1446
+ }
1447
+ let t9;
1448
+ if ($[25] !== t8) {
1449
+ t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1450
+ bold: true,
1451
+ color: "error",
1452
+ children: [
1453
+ "Delete ",
1454
+ t8,
1455
+ " tool?"
1456
+ ]
1457
+ }, undefined, true, undefined, this);
1458
+ $[25] = t8;
1459
+ $[26] = t9;
1460
+ } else {
1461
+ t9 = $[26];
1462
+ }
1463
+ let t10;
1464
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1465
+ t10 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1466
+ children: "Are you sure you want to delete this permission rule?"
1467
+ }, undefined, false, undefined, this);
1468
+ $[27] = t10;
1469
+ } else {
1470
+ t10 = $[27];
1471
+ }
1472
+ let t11;
1473
+ if ($[28] !== onCancel || $[29] !== onDelete) {
1474
+ t11 = (_) => _ === "yes" ? onDelete() : onCancel();
1475
+ $[28] = onCancel;
1476
+ $[29] = onDelete;
1477
+ $[30] = t11;
1478
+ } else {
1479
+ t11 = $[30];
1480
+ }
1481
+ let t12;
1482
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
1483
+ t12 = [{
1484
+ label: "Yes",
1485
+ value: "yes"
1486
+ }, {
1487
+ label: "No",
1488
+ value: "no"
1489
+ }];
1490
+ $[31] = t12;
1491
+ } else {
1492
+ t12 = $[31];
1493
+ }
1494
+ let t13;
1495
+ if ($[32] !== onCancel || $[33] !== t11) {
1496
+ t13 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1497
+ onChange: t11,
1498
+ onCancel,
1499
+ options: t12
1500
+ }, undefined, false, undefined, this);
1501
+ $[32] = onCancel;
1502
+ $[33] = t11;
1503
+ $[34] = t13;
1504
+ } else {
1505
+ t13 = $[34];
1506
+ }
1507
+ let t14;
1508
+ if ($[35] !== ruleDescription || $[36] !== t13 || $[37] !== t9) {
1509
+ t14 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1510
+ flexDirection: "column",
1511
+ gap: 1,
1512
+ borderStyle: "round",
1513
+ paddingLeft: 1,
1514
+ paddingRight: 1,
1515
+ borderColor: "error",
1516
+ children: [
1517
+ t9,
1518
+ ruleDescription,
1519
+ t10,
1520
+ t13
1521
+ ]
1522
+ }, undefined, true, undefined, this);
1523
+ $[35] = ruleDescription;
1524
+ $[36] = t13;
1525
+ $[37] = t9;
1526
+ $[38] = t14;
1527
+ } else {
1528
+ t14 = $[38];
1529
+ }
1530
+ let t15;
1531
+ if ($[39] !== footer || $[40] !== t14) {
1532
+ t15 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1533
+ children: [
1534
+ t14,
1535
+ footer
1536
+ ]
1537
+ }, undefined, true, undefined, this);
1538
+ $[39] = footer;
1539
+ $[40] = t14;
1540
+ $[41] = t15;
1541
+ } else {
1542
+ t15 = $[41];
1543
+ }
1544
+ return t15;
1545
+ }
1546
+ function RulesTabContent(props) {
1547
+ const $ = import_compiler_runtime7.c(26);
1548
+ const {
1549
+ options,
1550
+ searchQuery,
1551
+ isSearchMode,
1552
+ isFocused,
1553
+ onSelect,
1554
+ onCancel,
1555
+ lastFocusedRuleKey,
1556
+ cursorOffset,
1557
+ onHeaderFocusChange
1558
+ } = props;
1559
+ const tabWidth = useTabsWidth();
1560
+ const {
1561
+ headerFocused,
1562
+ focusHeader,
1563
+ blurHeader
1564
+ } = useTabHeaderFocus();
1565
+ let t0;
1566
+ let t1;
1567
+ if ($[0] !== blurHeader || $[1] !== headerFocused || $[2] !== isSearchMode) {
1568
+ t0 = () => {
1569
+ if (isSearchMode && headerFocused) {
1570
+ blurHeader();
1571
+ }
1572
+ };
1573
+ t1 = [isSearchMode, headerFocused, blurHeader];
1574
+ $[0] = blurHeader;
1575
+ $[1] = headerFocused;
1576
+ $[2] = isSearchMode;
1577
+ $[3] = t0;
1578
+ $[4] = t1;
1579
+ } else {
1580
+ t0 = $[3];
1581
+ t1 = $[4];
1582
+ }
1583
+ import_react4.useEffect(t0, t1);
1584
+ let t2;
1585
+ let t3;
1586
+ if ($[5] !== headerFocused || $[6] !== onHeaderFocusChange) {
1587
+ t2 = () => {
1588
+ onHeaderFocusChange?.(headerFocused);
1589
+ };
1590
+ t3 = [headerFocused, onHeaderFocusChange];
1591
+ $[5] = headerFocused;
1592
+ $[6] = onHeaderFocusChange;
1593
+ $[7] = t2;
1594
+ $[8] = t3;
1595
+ } else {
1596
+ t2 = $[7];
1597
+ t3 = $[8];
1598
+ }
1599
+ import_react4.useEffect(t2, t3);
1600
+ const t4 = isSearchMode && !headerFocused;
1601
+ let t5;
1602
+ if ($[9] !== cursorOffset || $[10] !== isFocused || $[11] !== searchQuery || $[12] !== t4 || $[13] !== tabWidth) {
1603
+ t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1604
+ marginBottom: 1,
1605
+ flexDirection: "column",
1606
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(SearchBox, {
1607
+ query: searchQuery,
1608
+ isFocused: t4,
1609
+ isTerminalFocused: isFocused,
1610
+ width: tabWidth,
1611
+ cursorOffset
1612
+ }, undefined, false, undefined, this)
1613
+ }, undefined, false, undefined, this);
1614
+ $[9] = cursorOffset;
1615
+ $[10] = isFocused;
1616
+ $[11] = searchQuery;
1617
+ $[12] = t4;
1618
+ $[13] = tabWidth;
1619
+ $[14] = t5;
1620
+ } else {
1621
+ t5 = $[14];
1622
+ }
1623
+ const t6 = Math.min(10, options.length);
1624
+ const t7 = isSearchMode || headerFocused;
1625
+ let t8;
1626
+ if ($[15] !== focusHeader || $[16] !== lastFocusedRuleKey || $[17] !== onCancel || $[18] !== onSelect || $[19] !== options || $[20] !== t6 || $[21] !== t7) {
1627
+ t8 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1628
+ options,
1629
+ onChange: onSelect,
1630
+ onCancel,
1631
+ visibleOptionCount: t6,
1632
+ isDisabled: t7,
1633
+ defaultFocusValue: lastFocusedRuleKey,
1634
+ onUpFromFirstItem: focusHeader
1635
+ }, undefined, false, undefined, this);
1636
+ $[15] = focusHeader;
1637
+ $[16] = lastFocusedRuleKey;
1638
+ $[17] = onCancel;
1639
+ $[18] = onSelect;
1640
+ $[19] = options;
1641
+ $[20] = t6;
1642
+ $[21] = t7;
1643
+ $[22] = t8;
1644
+ } else {
1645
+ t8 = $[22];
1646
+ }
1647
+ let t9;
1648
+ if ($[23] !== t5 || $[24] !== t8) {
1649
+ t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1650
+ flexDirection: "column",
1651
+ children: [
1652
+ t5,
1653
+ t8
1654
+ ]
1655
+ }, undefined, true, undefined, this);
1656
+ $[23] = t5;
1657
+ $[24] = t8;
1658
+ $[25] = t9;
1659
+ } else {
1660
+ t9 = $[25];
1661
+ }
1662
+ return t9;
1663
+ }
1664
+ function PermissionRulesTab(t0) {
1665
+ const $ = import_compiler_runtime7.c(27);
1666
+ let T0;
1667
+ let T1;
1668
+ let handleToolSelect;
1669
+ let rulesProps;
1670
+ let t1;
1671
+ let t2;
1672
+ let t3;
1673
+ let t4;
1674
+ let tab;
1675
+ if ($[0] !== t0) {
1676
+ const {
1677
+ tab: t52,
1678
+ getRulesOptions,
1679
+ handleToolSelect: t62,
1680
+ ...t72
1681
+ } = t0;
1682
+ tab = t52;
1683
+ handleToolSelect = t62;
1684
+ rulesProps = t72;
1685
+ T1 = ThemedBox_default;
1686
+ t2 = "column";
1687
+ t3 = tab === "allow" ? 0 : undefined;
1688
+ let t8;
1689
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1690
+ t8 = {
1691
+ allow: "Claude Code won't ask before using allowed tools.",
1692
+ ask: "Claude Code will always ask for confirmation before using these tools.",
1693
+ deny: "Claude Code will always reject requests to use denied tools."
1694
+ };
1695
+ $[10] = t8;
1696
+ } else {
1697
+ t8 = $[10];
1698
+ }
1699
+ const t9 = t8[tab];
1700
+ if ($[11] !== t9) {
1701
+ t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1702
+ children: t9
1703
+ }, undefined, false, undefined, this);
1704
+ $[11] = t9;
1705
+ $[12] = t4;
1706
+ } else {
1707
+ t4 = $[12];
1708
+ }
1709
+ T0 = RulesTabContent;
1710
+ t1 = getRulesOptions(tab, rulesProps.searchQuery);
1711
+ $[0] = t0;
1712
+ $[1] = T0;
1713
+ $[2] = T1;
1714
+ $[3] = handleToolSelect;
1715
+ $[4] = rulesProps;
1716
+ $[5] = t1;
1717
+ $[6] = t2;
1718
+ $[7] = t3;
1719
+ $[8] = t4;
1720
+ $[9] = tab;
1721
+ } else {
1722
+ T0 = $[1];
1723
+ T1 = $[2];
1724
+ handleToolSelect = $[3];
1725
+ rulesProps = $[4];
1726
+ t1 = $[5];
1727
+ t2 = $[6];
1728
+ t3 = $[7];
1729
+ t4 = $[8];
1730
+ tab = $[9];
1731
+ }
1732
+ let t5;
1733
+ if ($[13] !== handleToolSelect || $[14] !== tab) {
1734
+ t5 = (v) => handleToolSelect(v, tab);
1735
+ $[13] = handleToolSelect;
1736
+ $[14] = tab;
1737
+ $[15] = t5;
1738
+ } else {
1739
+ t5 = $[15];
1740
+ }
1741
+ let t6;
1742
+ if ($[16] !== T0 || $[17] !== rulesProps || $[18] !== t1.options || $[19] !== t5) {
1743
+ t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T0, {
1744
+ options: t1.options,
1745
+ onSelect: t5,
1746
+ ...rulesProps
1747
+ }, undefined, false, undefined, this);
1748
+ $[16] = T0;
1749
+ $[17] = rulesProps;
1750
+ $[18] = t1.options;
1751
+ $[19] = t5;
1752
+ $[20] = t6;
1753
+ } else {
1754
+ t6 = $[20];
1755
+ }
1756
+ let t7;
1757
+ if ($[21] !== T1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t6) {
1758
+ t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T1, {
1759
+ flexDirection: t2,
1760
+ flexShrink: t3,
1761
+ children: [
1762
+ t4,
1763
+ t6
1764
+ ]
1765
+ }, undefined, true, undefined, this);
1766
+ $[21] = T1;
1767
+ $[22] = t2;
1768
+ $[23] = t3;
1769
+ $[24] = t4;
1770
+ $[25] = t6;
1771
+ $[26] = t7;
1772
+ } else {
1773
+ t7 = $[26];
1774
+ }
1775
+ return t7;
1776
+ }
1777
+ function PermissionRuleList(t0) {
1778
+ const $ = import_compiler_runtime7.c(113);
1779
+ const {
1780
+ onExit,
1781
+ initialTab,
1782
+ onRetryDenials
1783
+ } = t0;
1784
+ let t1;
1785
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1786
+ t1 = getAutoModeDenials();
1787
+ $[0] = t1;
1788
+ } else {
1789
+ t1 = $[0];
1790
+ }
1791
+ const hasDenials = t1.length > 0;
1792
+ const defaultTab = initialTab ?? (hasDenials ? "recent" : "allow");
1793
+ let t2;
1794
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1795
+ t2 = [];
1796
+ $[1] = t2;
1797
+ } else {
1798
+ t2 = $[1];
1799
+ }
1800
+ const [changes, setChanges] = import_react4.useState(t2);
1801
+ const toolPermissionContext = useAppState(_temp7);
1802
+ const setAppState = useSetAppState();
1803
+ const isTerminalFocused = useTerminalFocus();
1804
+ let t3;
1805
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1806
+ t3 = {
1807
+ approved: new Set,
1808
+ retry: new Set,
1809
+ denials: []
1810
+ };
1811
+ $[2] = t3;
1812
+ } else {
1813
+ t3 = $[2];
1814
+ }
1815
+ const denialStateRef = import_react4.useRef(t3);
1816
+ let t4;
1817
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1818
+ t4 = (s_0) => {
1819
+ denialStateRef.current = s_0;
1820
+ };
1821
+ $[3] = t4;
1822
+ } else {
1823
+ t4 = $[3];
1824
+ }
1825
+ const handleDenialStateChange = t4;
1826
+ const [selectedRule, setSelectedRule] = import_react4.useState();
1827
+ const [lastFocusedRuleKey, setLastFocusedRuleKey] = import_react4.useState();
1828
+ const [addingRuleToTab, setAddingRuleToTab] = import_react4.useState(null);
1829
+ const [validatedRule, setValidatedRule] = import_react4.useState(null);
1830
+ const [isAddingWorkspaceDirectory, setIsAddingWorkspaceDirectory] = import_react4.useState(false);
1831
+ const [removingDirectory, setRemovingDirectory] = import_react4.useState(null);
1832
+ const [isSearchMode, setIsSearchMode] = import_react4.useState(false);
1833
+ const [headerFocused, setHeaderFocused] = import_react4.useState(true);
1834
+ let t5;
1835
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
1836
+ t5 = (focused) => {
1837
+ setHeaderFocused(focused);
1838
+ };
1839
+ $[4] = t5;
1840
+ } else {
1841
+ t5 = $[4];
1842
+ }
1843
+ const handleHeaderFocusChange = t5;
1844
+ let map;
1845
+ if ($[5] !== toolPermissionContext) {
1846
+ map = new Map;
1847
+ getAllowRules(toolPermissionContext).forEach((rule) => {
1848
+ map.set(jsonStringify(rule), rule);
1849
+ });
1850
+ $[5] = toolPermissionContext;
1851
+ $[6] = map;
1852
+ } else {
1853
+ map = $[6];
1854
+ }
1855
+ const allowRulesByKey = map;
1856
+ let map_0;
1857
+ if ($[7] !== toolPermissionContext) {
1858
+ map_0 = new Map;
1859
+ getDenyRules(toolPermissionContext).forEach((rule_0) => {
1860
+ map_0.set(jsonStringify(rule_0), rule_0);
1861
+ });
1862
+ $[7] = toolPermissionContext;
1863
+ $[8] = map_0;
1864
+ } else {
1865
+ map_0 = $[8];
1866
+ }
1867
+ const denyRulesByKey = map_0;
1868
+ let map_1;
1869
+ if ($[9] !== toolPermissionContext) {
1870
+ map_1 = new Map;
1871
+ getAskRules(toolPermissionContext).forEach((rule_1) => {
1872
+ map_1.set(jsonStringify(rule_1), rule_1);
1873
+ });
1874
+ $[9] = toolPermissionContext;
1875
+ $[10] = map_1;
1876
+ } else {
1877
+ map_1 = $[10];
1878
+ }
1879
+ const askRulesByKey = map_1;
1880
+ let t6;
1881
+ if ($[11] !== allowRulesByKey || $[12] !== askRulesByKey || $[13] !== denyRulesByKey) {
1882
+ t6 = (tab, t72) => {
1883
+ const query = t72 === undefined ? "" : t72;
1884
+ const rulesByKey = (() => {
1885
+ switch (tab) {
1886
+ case "allow": {
1887
+ return allowRulesByKey;
1888
+ }
1889
+ case "deny": {
1890
+ return denyRulesByKey;
1891
+ }
1892
+ case "ask": {
1893
+ return askRulesByKey;
1894
+ }
1895
+ case "workspace":
1896
+ case "recent": {
1897
+ return new Map;
1898
+ }
1899
+ }
1900
+ })();
1901
+ const options = [];
1902
+ if (tab !== "workspace" && tab !== "recent" && !query) {
1903
+ options.push({
1904
+ label: `Add a new rule${figures_default.ellipsis}`,
1905
+ value: "add-new-rule"
1906
+ });
1907
+ }
1908
+ const sortedRuleKeys = Array.from(rulesByKey.keys()).sort((a, b) => {
1909
+ const ruleA = rulesByKey.get(a);
1910
+ const ruleB = rulesByKey.get(b);
1911
+ if (ruleA && ruleB) {
1912
+ const ruleAString = permissionRuleValueToString(ruleA.ruleValue).toLowerCase();
1913
+ const ruleBString = permissionRuleValueToString(ruleB.ruleValue).toLowerCase();
1914
+ return ruleAString.localeCompare(ruleBString);
1915
+ }
1916
+ return 0;
1917
+ });
1918
+ const lowerQuery = query.toLowerCase();
1919
+ for (const ruleKey of sortedRuleKeys) {
1920
+ const rule_2 = rulesByKey.get(ruleKey);
1921
+ if (rule_2) {
1922
+ const ruleString = permissionRuleValueToString(rule_2.ruleValue);
1923
+ if (query && !ruleString.toLowerCase().includes(lowerQuery)) {
1924
+ continue;
1925
+ }
1926
+ options.push({
1927
+ label: ruleString,
1928
+ value: ruleKey
1929
+ });
1930
+ }
1931
+ }
1932
+ return {
1933
+ options,
1934
+ rulesByKey
1935
+ };
1936
+ };
1937
+ $[11] = allowRulesByKey;
1938
+ $[12] = askRulesByKey;
1939
+ $[13] = denyRulesByKey;
1940
+ $[14] = t6;
1941
+ } else {
1942
+ t6 = $[14];
1943
+ }
1944
+ const getRulesOptions = t6;
1945
+ const exitState = useExitOnCtrlCDWithKeybindings();
1946
+ const isSearchModeActive = !selectedRule && !addingRuleToTab && !validatedRule && !isAddingWorkspaceDirectory && !removingDirectory;
1947
+ const t7 = isSearchModeActive && isSearchMode;
1948
+ let t8;
1949
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1950
+ t8 = () => {
1951
+ setIsSearchMode(false);
1952
+ };
1953
+ $[15] = t8;
1954
+ } else {
1955
+ t8 = $[15];
1956
+ }
1957
+ let t9;
1958
+ if ($[16] !== t7) {
1959
+ t9 = {
1960
+ isActive: t7,
1961
+ onExit: t8
1962
+ };
1963
+ $[16] = t7;
1964
+ $[17] = t9;
1965
+ } else {
1966
+ t9 = $[17];
1967
+ }
1968
+ const {
1969
+ query: searchQuery,
1970
+ setQuery: setSearchQuery,
1971
+ cursorOffset: searchCursorOffset
1972
+ } = useSearchInput(t9);
1973
+ let t10;
1974
+ if ($[18] !== isSearchMode || $[19] !== isSearchModeActive || $[20] !== setSearchQuery) {
1975
+ t10 = (e) => {
1976
+ if (!isSearchModeActive) {
1977
+ return;
1978
+ }
1979
+ if (isSearchMode) {
1980
+ return;
1981
+ }
1982
+ if (e.ctrl || e.meta) {
1983
+ return;
1984
+ }
1985
+ if (e.key === "/") {
1986
+ e.preventDefault();
1987
+ setIsSearchMode(true);
1988
+ setSearchQuery("");
1989
+ } else {
1990
+ if (e.key.length === 1 && e.key !== "j" && e.key !== "k" && e.key !== "m" && e.key !== "i" && e.key !== "r" && e.key !== " ") {
1991
+ e.preventDefault();
1992
+ setIsSearchMode(true);
1993
+ setSearchQuery(e.key);
1994
+ }
1995
+ }
1996
+ };
1997
+ $[18] = isSearchMode;
1998
+ $[19] = isSearchModeActive;
1999
+ $[20] = setSearchQuery;
2000
+ $[21] = t10;
2001
+ } else {
2002
+ t10 = $[21];
2003
+ }
2004
+ const handleKeyDown = t10;
2005
+ let t11;
2006
+ if ($[22] !== getRulesOptions) {
2007
+ t11 = (selectedValue, tab_0) => {
2008
+ const {
2009
+ rulesByKey: rulesByKey_0
2010
+ } = getRulesOptions(tab_0);
2011
+ if (selectedValue === "add-new-rule") {
2012
+ setAddingRuleToTab(tab_0);
2013
+ return;
2014
+ } else {
2015
+ setSelectedRule(rulesByKey_0.get(selectedValue));
2016
+ return;
2017
+ }
2018
+ };
2019
+ $[22] = getRulesOptions;
2020
+ $[23] = t11;
2021
+ } else {
2022
+ t11 = $[23];
2023
+ }
2024
+ const handleToolSelect = t11;
2025
+ let t12;
2026
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
2027
+ t12 = () => {
2028
+ setAddingRuleToTab(null);
2029
+ };
2030
+ $[24] = t12;
2031
+ } else {
2032
+ t12 = $[24];
2033
+ }
2034
+ const handleRuleInputCancel = t12;
2035
+ let t13;
2036
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
2037
+ t13 = (ruleValue, ruleBehavior) => {
2038
+ setValidatedRule({
2039
+ ruleValue,
2040
+ ruleBehavior
2041
+ });
2042
+ setAddingRuleToTab(null);
2043
+ };
2044
+ $[25] = t13;
2045
+ } else {
2046
+ t13 = $[25];
2047
+ }
2048
+ const handleRuleInputSubmit = t13;
2049
+ let t14;
2050
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
2051
+ t14 = (rules, unreachable) => {
2052
+ setValidatedRule(null);
2053
+ for (const rule_3 of rules) {
2054
+ setChanges((prev) => [...prev, `Added ${rule_3.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(rule_3.ruleValue))}`]);
2055
+ }
2056
+ if (unreachable && unreachable.length > 0) {
2057
+ for (const u of unreachable) {
2058
+ const severity = u.shadowType === "deny" ? "blocked" : "shadowed";
2059
+ setChanges((prev_0) => [...prev_0, source_default.yellow(`${figures_default.warning} Warning: ${permissionRuleValueToString(u.rule.ruleValue)} is ${severity}`), source_default.dim(` ${u.reason}`), source_default.dim(` Fix: ${u.fix}`)]);
2060
+ }
2061
+ }
2062
+ };
2063
+ $[26] = t14;
2064
+ } else {
2065
+ t14 = $[26];
2066
+ }
2067
+ const handleAddRulesSuccess = t14;
2068
+ let t15;
2069
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
2070
+ t15 = () => {
2071
+ setValidatedRule(null);
2072
+ };
2073
+ $[27] = t15;
2074
+ } else {
2075
+ t15 = $[27];
2076
+ }
2077
+ const handleAddRuleCancel = t15;
2078
+ let t16;
2079
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
2080
+ t16 = () => setIsAddingWorkspaceDirectory(true);
2081
+ $[28] = t16;
2082
+ } else {
2083
+ t16 = $[28];
2084
+ }
2085
+ const handleRequestAddDirectory = t16;
2086
+ let t17;
2087
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
2088
+ t17 = (path) => setRemovingDirectory(path);
2089
+ $[29] = t17;
2090
+ } else {
2091
+ t17 = $[29];
2092
+ }
2093
+ const handleRequestRemoveDirectory = t17;
2094
+ let t18;
2095
+ if ($[30] !== changes || $[31] !== onExit || $[32] !== onRetryDenials) {
2096
+ t18 = () => {
2097
+ const s_1 = denialStateRef.current;
2098
+ const denialsFor = (set) => Array.from(set).map((idx) => s_1.denials[idx]).filter(_temp23);
2099
+ const retryDenials = denialsFor(s_1.retry);
2100
+ if (retryDenials.length > 0) {
2101
+ const commands = retryDenials.map(_temp32);
2102
+ onRetryDenials?.(commands);
2103
+ onExit(undefined, {
2104
+ shouldQuery: true,
2105
+ metaMessages: [`Permission granted for: ${commands.join(", ")}. You may now retry ${commands.length === 1 ? "this command" : "these commands"} if you would like.`]
2106
+ });
2107
+ return;
2108
+ }
2109
+ const approvedDenials = denialsFor(s_1.approved);
2110
+ if (approvedDenials.length > 0 || changes.length > 0) {
2111
+ const approvedMsg = approvedDenials.length > 0 ? [`Approved ${approvedDenials.map(_temp42).join(", ")}`] : [];
2112
+ onExit([...approvedMsg, ...changes].join(`
2113
+ `));
2114
+ } else {
2115
+ onExit("Permissions dialog dismissed", {
2116
+ display: "system"
2117
+ });
2118
+ }
2119
+ };
2120
+ $[30] = changes;
2121
+ $[31] = onExit;
2122
+ $[32] = onRetryDenials;
2123
+ $[33] = t18;
2124
+ } else {
2125
+ t18 = $[33];
2126
+ }
2127
+ const handleRulesCancel = t18;
2128
+ const t19 = isSearchModeActive && !isSearchMode;
2129
+ let t20;
2130
+ if ($[34] !== t19) {
2131
+ t20 = {
2132
+ context: "Settings",
2133
+ isActive: t19
2134
+ };
2135
+ $[34] = t19;
2136
+ $[35] = t20;
2137
+ } else {
2138
+ t20 = $[35];
2139
+ }
2140
+ useKeybinding("confirm:no", handleRulesCancel, t20);
2141
+ let t21;
2142
+ if ($[36] !== getRulesOptions || $[37] !== selectedRule || $[38] !== setAppState || $[39] !== toolPermissionContext) {
2143
+ t21 = () => {
2144
+ if (!selectedRule) {
2145
+ return;
2146
+ }
2147
+ const {
2148
+ options: options_0
2149
+ } = getRulesOptions(selectedRule.ruleBehavior);
2150
+ const selectedKey = jsonStringify(selectedRule);
2151
+ const ruleKeys = options_0.filter(_temp5).map(_temp62);
2152
+ const currentIndex = ruleKeys.indexOf(selectedKey);
2153
+ let nextFocusKey;
2154
+ if (currentIndex !== -1) {
2155
+ if (currentIndex < ruleKeys.length - 1) {
2156
+ nextFocusKey = ruleKeys[currentIndex + 1];
2157
+ } else {
2158
+ if (currentIndex > 0) {
2159
+ nextFocusKey = ruleKeys[currentIndex - 1];
2160
+ }
2161
+ }
2162
+ }
2163
+ setLastFocusedRuleKey(nextFocusKey);
2164
+ deletePermissionRule({
2165
+ rule: selectedRule,
2166
+ initialContext: toolPermissionContext,
2167
+ setToolPermissionContext(toolPermissionContext_0) {
2168
+ setAppState((prev_1) => ({
2169
+ ...prev_1,
2170
+ toolPermissionContext: toolPermissionContext_0
2171
+ }));
2172
+ }
2173
+ });
2174
+ setChanges((prev_2) => [...prev_2, `Deleted ${selectedRule.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(selectedRule.ruleValue))}`]);
2175
+ setSelectedRule(undefined);
2176
+ };
2177
+ $[36] = getRulesOptions;
2178
+ $[37] = selectedRule;
2179
+ $[38] = setAppState;
2180
+ $[39] = toolPermissionContext;
2181
+ $[40] = t21;
2182
+ } else {
2183
+ t21 = $[40];
2184
+ }
2185
+ const handleDeleteRule = t21;
2186
+ if (selectedRule) {
2187
+ let t222;
2188
+ if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
2189
+ t222 = () => setSelectedRule(undefined);
2190
+ $[41] = t222;
2191
+ } else {
2192
+ t222 = $[41];
2193
+ }
2194
+ let t232;
2195
+ if ($[42] !== handleDeleteRule || $[43] !== selectedRule) {
2196
+ t232 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleDetails, {
2197
+ rule: selectedRule,
2198
+ onDelete: handleDeleteRule,
2199
+ onCancel: t222
2200
+ }, undefined, false, undefined, this);
2201
+ $[42] = handleDeleteRule;
2202
+ $[43] = selectedRule;
2203
+ $[44] = t232;
2204
+ } else {
2205
+ t232 = $[44];
2206
+ }
2207
+ return t232;
2208
+ }
2209
+ if (addingRuleToTab && addingRuleToTab !== "workspace" && addingRuleToTab !== "recent") {
2210
+ let t222;
2211
+ if ($[45] !== addingRuleToTab) {
2212
+ t222 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleInput, {
2213
+ onCancel: handleRuleInputCancel,
2214
+ onSubmit: handleRuleInputSubmit,
2215
+ ruleBehavior: addingRuleToTab
2216
+ }, undefined, false, undefined, this);
2217
+ $[45] = addingRuleToTab;
2218
+ $[46] = t222;
2219
+ } else {
2220
+ t222 = $[46];
2221
+ }
2222
+ return t222;
2223
+ }
2224
+ if (validatedRule) {
2225
+ let t222;
2226
+ if ($[47] !== validatedRule.ruleValue) {
2227
+ t222 = [validatedRule.ruleValue];
2228
+ $[47] = validatedRule.ruleValue;
2229
+ $[48] = t222;
2230
+ } else {
2231
+ t222 = $[48];
2232
+ }
2233
+ let t232;
2234
+ if ($[49] !== setAppState) {
2235
+ t232 = (toolPermissionContext_1) => {
2236
+ setAppState((prev_3) => ({
2237
+ ...prev_3,
2238
+ toolPermissionContext: toolPermissionContext_1
2239
+ }));
2240
+ };
2241
+ $[49] = setAppState;
2242
+ $[50] = t232;
2243
+ } else {
2244
+ t232 = $[50];
2245
+ }
2246
+ let t242;
2247
+ if ($[51] !== t222 || $[52] !== t232 || $[53] !== toolPermissionContext || $[54] !== validatedRule.ruleBehavior) {
2248
+ t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddPermissionRules, {
2249
+ onAddRules: handleAddRulesSuccess,
2250
+ onCancel: handleAddRuleCancel,
2251
+ ruleValues: t222,
2252
+ ruleBehavior: validatedRule.ruleBehavior,
2253
+ initialContext: toolPermissionContext,
2254
+ setToolPermissionContext: t232
2255
+ }, undefined, false, undefined, this);
2256
+ $[51] = t222;
2257
+ $[52] = t232;
2258
+ $[53] = toolPermissionContext;
2259
+ $[54] = validatedRule.ruleBehavior;
2260
+ $[55] = t242;
2261
+ } else {
2262
+ t242 = $[55];
2263
+ }
2264
+ return t242;
2265
+ }
2266
+ if (isAddingWorkspaceDirectory) {
2267
+ let t222;
2268
+ if ($[56] !== setAppState || $[57] !== toolPermissionContext) {
2269
+ t222 = (path_0, remember) => {
2270
+ const destination = remember ? "localSettings" : "session";
2271
+ const permissionUpdate = {
2272
+ type: "addDirectories",
2273
+ directories: [path_0],
2274
+ destination
2275
+ };
2276
+ const updatedContext = applyPermissionUpdate(toolPermissionContext, permissionUpdate);
2277
+ setAppState((prev_4) => ({
2278
+ ...prev_4,
2279
+ toolPermissionContext: updatedContext
2280
+ }));
2281
+ if (remember) {
2282
+ persistPermissionUpdate(permissionUpdate);
2283
+ }
2284
+ setChanges((prev_5) => [...prev_5, `Added directory ${source_default.bold(path_0)} to workspace${remember ? " and saved to local settings" : " for this session"}`]);
2285
+ setIsAddingWorkspaceDirectory(false);
2286
+ };
2287
+ $[56] = setAppState;
2288
+ $[57] = toolPermissionContext;
2289
+ $[58] = t222;
2290
+ } else {
2291
+ t222 = $[58];
2292
+ }
2293
+ let t232;
2294
+ if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
2295
+ t232 = () => setIsAddingWorkspaceDirectory(false);
2296
+ $[59] = t232;
2297
+ } else {
2298
+ t232 = $[59];
2299
+ }
2300
+ let t242;
2301
+ if ($[60] !== t222 || $[61] !== toolPermissionContext) {
2302
+ t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddWorkspaceDirectory, {
2303
+ onAddDirectory: t222,
2304
+ onCancel: t232,
2305
+ permissionContext: toolPermissionContext
2306
+ }, undefined, false, undefined, this);
2307
+ $[60] = t222;
2308
+ $[61] = toolPermissionContext;
2309
+ $[62] = t242;
2310
+ } else {
2311
+ t242 = $[62];
2312
+ }
2313
+ return t242;
2314
+ }
2315
+ if (removingDirectory) {
2316
+ let t222;
2317
+ if ($[63] !== removingDirectory) {
2318
+ t222 = () => {
2319
+ setChanges((prev_6) => [...prev_6, `Removed directory ${source_default.bold(removingDirectory)} from workspace`]);
2320
+ setRemovingDirectory(null);
2321
+ };
2322
+ $[63] = removingDirectory;
2323
+ $[64] = t222;
2324
+ } else {
2325
+ t222 = $[64];
2326
+ }
2327
+ let t232;
2328
+ if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
2329
+ t232 = () => setRemovingDirectory(null);
2330
+ $[65] = t232;
2331
+ } else {
2332
+ t232 = $[65];
2333
+ }
2334
+ let t242;
2335
+ if ($[66] !== setAppState) {
2336
+ t242 = (toolPermissionContext_2) => {
2337
+ setAppState((prev_7) => ({
2338
+ ...prev_7,
2339
+ toolPermissionContext: toolPermissionContext_2
2340
+ }));
2341
+ };
2342
+ $[66] = setAppState;
2343
+ $[67] = t242;
2344
+ } else {
2345
+ t242 = $[67];
2346
+ }
2347
+ let t252;
2348
+ if ($[68] !== removingDirectory || $[69] !== t222 || $[70] !== t242 || $[71] !== toolPermissionContext) {
2349
+ t252 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RemoveWorkspaceDirectory, {
2350
+ directoryPath: removingDirectory,
2351
+ onRemove: t222,
2352
+ onCancel: t232,
2353
+ permissionContext: toolPermissionContext,
2354
+ setPermissionContext: t242
2355
+ }, undefined, false, undefined, this);
2356
+ $[68] = removingDirectory;
2357
+ $[69] = t222;
2358
+ $[70] = t242;
2359
+ $[71] = toolPermissionContext;
2360
+ $[72] = t252;
2361
+ } else {
2362
+ t252 = $[72];
2363
+ }
2364
+ return t252;
2365
+ }
2366
+ let t22;
2367
+ if ($[73] !== getRulesOptions || $[74] !== handleRulesCancel || $[75] !== handleToolSelect || $[76] !== isSearchMode || $[77] !== isTerminalFocused || $[78] !== lastFocusedRuleKey || $[79] !== searchCursorOffset || $[80] !== searchQuery) {
2368
+ t22 = {
2369
+ searchQuery,
2370
+ isSearchMode,
2371
+ isFocused: isTerminalFocused,
2372
+ onCancel: handleRulesCancel,
2373
+ lastFocusedRuleKey,
2374
+ cursorOffset: searchCursorOffset,
2375
+ getRulesOptions,
2376
+ handleToolSelect,
2377
+ onHeaderFocusChange: handleHeaderFocusChange
2378
+ };
2379
+ $[73] = getRulesOptions;
2380
+ $[74] = handleRulesCancel;
2381
+ $[75] = handleToolSelect;
2382
+ $[76] = isSearchMode;
2383
+ $[77] = isTerminalFocused;
2384
+ $[78] = lastFocusedRuleKey;
2385
+ $[79] = searchCursorOffset;
2386
+ $[80] = searchQuery;
2387
+ $[81] = t22;
2388
+ } else {
2389
+ t22 = $[81];
2390
+ }
2391
+ const sharedRulesProps = t22;
2392
+ const isHidden = !!selectedRule || !!addingRuleToTab || !!validatedRule || isAddingWorkspaceDirectory || !!removingDirectory;
2393
+ const t23 = !isSearchMode;
2394
+ let t24;
2395
+ if ($[82] === Symbol.for("react.memo_cache_sentinel")) {
2396
+ t24 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2397
+ id: "recent",
2398
+ title: "Recently denied",
2399
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RecentDenialsTab, {
2400
+ onHeaderFocusChange: handleHeaderFocusChange,
2401
+ onStateChange: handleDenialStateChange
2402
+ }, undefined, false, undefined, this)
2403
+ }, undefined, false, undefined, this);
2404
+ $[82] = t24;
2405
+ } else {
2406
+ t24 = $[82];
2407
+ }
2408
+ let t25;
2409
+ if ($[83] !== sharedRulesProps) {
2410
+ t25 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2411
+ id: "allow",
2412
+ title: "Allow",
2413
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2414
+ tab: "allow",
2415
+ ...sharedRulesProps
2416
+ }, undefined, false, undefined, this)
2417
+ }, undefined, false, undefined, this);
2418
+ $[83] = sharedRulesProps;
2419
+ $[84] = t25;
2420
+ } else {
2421
+ t25 = $[84];
2422
+ }
2423
+ let t26;
2424
+ if ($[85] !== sharedRulesProps) {
2425
+ t26 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2426
+ id: "ask",
2427
+ title: "Ask",
2428
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2429
+ tab: "ask",
2430
+ ...sharedRulesProps
2431
+ }, undefined, false, undefined, this)
2432
+ }, undefined, false, undefined, this);
2433
+ $[85] = sharedRulesProps;
2434
+ $[86] = t26;
2435
+ } else {
2436
+ t26 = $[86];
2437
+ }
2438
+ let t27;
2439
+ if ($[87] !== sharedRulesProps) {
2440
+ t27 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2441
+ id: "deny",
2442
+ title: "Deny",
2443
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2444
+ tab: "deny",
2445
+ ...sharedRulesProps
2446
+ }, undefined, false, undefined, this)
2447
+ }, undefined, false, undefined, this);
2448
+ $[87] = sharedRulesProps;
2449
+ $[88] = t27;
2450
+ } else {
2451
+ t27 = $[88];
2452
+ }
2453
+ let t28;
2454
+ if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
2455
+ t28 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2456
+ children: "Claude Code can read files in the workspace, and make edits when auto-accept edits is on."
2457
+ }, undefined, false, undefined, this);
2458
+ $[89] = t28;
2459
+ } else {
2460
+ t28 = $[89];
2461
+ }
2462
+ let t29;
2463
+ if ($[90] !== onExit || $[91] !== toolPermissionContext) {
2464
+ t29 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2465
+ id: "workspace",
2466
+ title: "Workspace",
2467
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2468
+ flexDirection: "column",
2469
+ children: [
2470
+ t28,
2471
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(WorkspaceTab, {
2472
+ onExit,
2473
+ toolPermissionContext,
2474
+ onRequestAddDirectory: handleRequestAddDirectory,
2475
+ onRequestRemoveDirectory: handleRequestRemoveDirectory,
2476
+ onHeaderFocusChange: handleHeaderFocusChange
2477
+ }, undefined, false, undefined, this)
2478
+ ]
2479
+ }, undefined, true, undefined, this)
2480
+ }, undefined, false, undefined, this);
2481
+ $[90] = onExit;
2482
+ $[91] = toolPermissionContext;
2483
+ $[92] = t29;
2484
+ } else {
2485
+ t29 = $[92];
2486
+ }
2487
+ let t30;
2488
+ if ($[93] !== defaultTab || $[94] !== isHidden || $[95] !== t23 || $[96] !== t25 || $[97] !== t26 || $[98] !== t27 || $[99] !== t29) {
2489
+ t30 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
2490
+ title: "Permissions:",
2491
+ color: "permission",
2492
+ defaultTab,
2493
+ hidden: isHidden,
2494
+ initialHeaderFocused: !hasDenials,
2495
+ navFromContent: t23,
2496
+ children: [
2497
+ t24,
2498
+ t25,
2499
+ t26,
2500
+ t27,
2501
+ t29
2502
+ ]
2503
+ }, undefined, true, undefined, this);
2504
+ $[93] = defaultTab;
2505
+ $[94] = isHidden;
2506
+ $[95] = t23;
2507
+ $[96] = t25;
2508
+ $[97] = t26;
2509
+ $[98] = t27;
2510
+ $[99] = t29;
2511
+ $[100] = t30;
2512
+ } else {
2513
+ t30 = $[100];
2514
+ }
2515
+ let t31;
2516
+ if ($[101] !== defaultTab || $[102] !== exitState.keyName || $[103] !== exitState.pending || $[104] !== headerFocused || $[105] !== isSearchMode) {
2517
+ t31 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2518
+ marginTop: 1,
2519
+ paddingLeft: 1,
2520
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2521
+ dimColor: true,
2522
+ children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2523
+ children: [
2524
+ "Press ",
2525
+ exitState.keyName,
2526
+ " again to exit"
2527
+ ]
2528
+ }, undefined, true, undefined, this) : headerFocused ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2529
+ children: "\u2190/\u2192 tab switch \xB7 \u2193 return \xB7 Esc cancel"
2530
+ }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2531
+ children: "Type to filter \xB7 Enter/\u2193 select \xB7 \u2191 tabs \xB7 Esc clear"
2532
+ }, undefined, false, undefined, this) : hasDenials && defaultTab === "recent" ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2533
+ children: "Enter approve \xB7 r retry \xB7 \u2191\u2193 navigate \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2534
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2535
+ children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Type to search \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2536
+ }, undefined, false, undefined, this)
2537
+ }, undefined, false, undefined, this)
2538
+ }, undefined, false, undefined, this);
2539
+ $[101] = defaultTab;
2540
+ $[102] = exitState.keyName;
2541
+ $[103] = exitState.pending;
2542
+ $[104] = headerFocused;
2543
+ $[105] = isSearchMode;
2544
+ $[106] = t31;
2545
+ } else {
2546
+ t31 = $[106];
2547
+ }
2548
+ let t32;
2549
+ if ($[107] !== t30 || $[108] !== t31) {
2550
+ t32 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
2551
+ color: "permission",
2552
+ children: [
2553
+ t30,
2554
+ t31
2555
+ ]
2556
+ }, undefined, true, undefined, this);
2557
+ $[107] = t30;
2558
+ $[108] = t31;
2559
+ $[109] = t32;
2560
+ } else {
2561
+ t32 = $[109];
2562
+ }
2563
+ let t33;
2564
+ if ($[110] !== handleKeyDown || $[111] !== t32) {
2565
+ t33 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2566
+ flexDirection: "column",
2567
+ onKeyDown: handleKeyDown,
2568
+ children: t32
2569
+ }, undefined, false, undefined, this);
2570
+ $[110] = handleKeyDown;
2571
+ $[111] = t32;
2572
+ $[112] = t33;
2573
+ } else {
2574
+ t33 = $[112];
2575
+ }
2576
+ return t33;
2577
+ }
2578
+ function _temp62(opt_0) {
2579
+ return opt_0.value;
2580
+ }
2581
+ function _temp5(opt) {
2582
+ return opt.value !== "add-new-rule";
2583
+ }
2584
+ function _temp42(d_1) {
2585
+ return source_default.bold(d_1.display);
2586
+ }
2587
+ function _temp32(d_0) {
2588
+ return d_0.display;
2589
+ }
2590
+ function _temp23(d) {
2591
+ return d !== undefined;
2592
+ }
2593
+ function _temp7(s) {
2594
+ return s.toolPermissionContext;
2595
+ }
2596
+ var import_compiler_runtime7, import_react4, jsx_dev_runtime7;
2597
+ var init_PermissionRuleList = __esm(() => {
2598
+ init_source();
2599
+ init_figures();
2600
+ init_AppState();
2601
+ init_PermissionUpdate();
2602
+ init_select();
2603
+ init_useExitOnCtrlCDWithKeybindings();
2604
+ init_useSearchInput();
2605
+ init_ink();
2606
+ init_useKeybinding();
2607
+ init_autoModeDenials();
2608
+ init_permissionRuleParser();
2609
+ init_permissions();
2610
+ init_slowOperations();
2611
+ init_Pane();
2612
+ init_Tabs();
2613
+ init_SearchBox();
2614
+ init_AddPermissionRules();
2615
+ init_AddWorkspaceDirectory();
2616
+ init_PermissionRuleDescription();
2617
+ init_PermissionRuleInput();
2618
+ init_RecentDenialsTab();
2619
+ init_RemoveWorkspaceDirectory();
2620
+ init_WorkspaceTab();
2621
+ import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
2622
+ import_react4 = __toESM(require_react(), 1);
2623
+ jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
2624
+ });
2625
+
2626
+ // src/commands/permissions/permissions.tsx
2627
+ var jsx_dev_runtime8, call = async (onDone, context) => {
2628
+ return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(PermissionRuleList, {
2629
+ onExit: onDone,
2630
+ onRetryDenials: (commands) => {
2631
+ context.setMessages((prev) => [...prev, createPermissionRetryMessage(commands)]);
2632
+ }
2633
+ }, undefined, false, undefined, this);
2634
+ };
2635
+ var init_permissions2 = __esm(() => {
2636
+ init_PermissionRuleList();
2637
+ init_messages();
2638
+ jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
2639
+ });
2640
+ init_permissions2();
2641
+
2642
+ export {
2643
+ call
2644
+ };