@claudiolabs/claudin 1.1.36 → 1.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/App-1.1.38-ywjx5zwg.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.1.38-g8aaewqn.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.1.38-3xp2vky0.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.1.38-ng5ew4f1.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.38-pb4syd5b.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.1.38-v5m7388w.mjs +1 -0
- package/dist/chunks/DiffDialog-1.1.38-7xpy0azc.mjs +6 -0
- package/dist/chunks/Doctor-1.1.38-8c786cbs.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.1.38-gsmc5cbg.mjs +6 -0
- package/dist/chunks/ITermBackend-1.1.38-34mcvk0g.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.1.38-4tzaxt0t.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.1.38-5aqykfy4.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.1.38-hg33ngjd.mjs +1 -0
- package/dist/chunks/Onboarding-1.1.38-e0dgakf3.mjs +1 -0
- package/dist/chunks/ProviderManager-1.1.38-s1stmw8z.mjs +1 -0
- package/dist/chunks/REPL-1.1.38-24nb99vc.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.1.38-ph61hy3h.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.1.38-waf94h4c.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.38-8zeez0vw.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.1.38-x67yqx1x.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.1.38-s7acgm11.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.1.38-xdxg0v37.mjs +1 -0
- package/dist/chunks/TrustDialog-1.1.38-ze3nezmq.mjs +1 -0
- package/dist/chunks/activeProvider-1.1.38-4hejnp0f.mjs +1 -0
- package/dist/chunks/add-dir-1.1.38-9njmqx1q.mjs +1 -0
- package/dist/chunks/agentTypes-1.1.38-2vgbffh0.mjs +1 -0
- package/dist/chunks/agents-1.1.38-p9ee8aj6.mjs +3 -0
- package/dist/chunks/agents-1.1.38-td2q9455.mjs +110 -0
- package/dist/chunks/api-1.1.38-8mx12h9x.mjs +1 -0
- package/dist/chunks/asciicast-1.1.38-ge5twq4b.mjs +1 -0
- package/dist/chunks/auth-1.1.38-qd9cf36r.mjs +1 -0
- package/dist/chunks/auth-1.1.38-z9s1s7ya.mjs +1 -0
- package/dist/chunks/autoMode-1.1.38-k48yn49s.mjs +52 -0
- package/dist/chunks/autoModeSetup-1.1.38-akdcfhnr.mjs +44 -0
- package/dist/chunks/autoUpdater-1.1.38-x4vhee3g.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.1.38-bvd35tyn.mjs +1 -0
- package/dist/chunks/branch-1.1.38-ne2jsk2x.mjs +4 -0
- package/dist/chunks/bridge-1.1.38-vdxahb1p.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.1.38-yf7zjpvf.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.1.38-eszbcc63.mjs +1 -0
- package/dist/chunks/bridgeMain-1.1.38-ywfxh5hm.mjs +64 -0
- package/dist/chunks/bridgePointer-1.1.38-jvevzgc3.mjs +1 -0
- package/dist/chunks/btw-1.1.38-hqjfa45a.mjs +1 -0
- package/dist/chunks/buddy-1.1.38-rq8ak7jk.mjs +3 -0
- package/dist/chunks/cache-probe-1.1.38-dvwdm93b.mjs +21 -0
- package/dist/chunks/cacheStats-1.1.38-pxpr6at8.mjs +4 -0
- package/dist/chunks/caches-1.1.38-mxte3pjs.mjs +1 -0
- package/dist/chunks/cd-1.1.38-nj8jwk5n.mjs +3 -0
- package/dist/chunks/claudeDesktop-1.1.38-94tj322p.mjs +1 -0
- package/dist/chunks/claudemd-1.1.38-y4ajc9p8.mjs +1 -0
- package/dist/chunks/clear-1.1.38-17hx54za.mjs +1 -0
- package/dist/chunks/clearTerminal-1.1.38-e3qy2b07.mjs +1 -0
- package/dist/chunks/cli-1.1.38-06jvwc43.mjs +2 -0
- package/dist/chunks/cli-1.1.38-0cf6ttc6.mjs +2 -0
- package/dist/chunks/cli-1.1.38-0dj1dmtd.mjs +2 -0
- package/dist/chunks/cli-1.1.38-0q1t1zs8.mjs +2 -0
- package/dist/chunks/cli-1.1.38-0x84gwbc.mjs +2 -0
- package/dist/chunks/cli-1.1.38-16r42mm1.mjs +2 -0
- package/dist/chunks/cli-1.1.38-1bv62dee.mjs +2 -0
- package/dist/chunks/cli-1.1.38-1c3thcc3.mjs +10 -0
- package/dist/chunks/cli-1.1.38-1e3jefp8.mjs +2 -0
- package/dist/chunks/cli-1.1.38-1jc6vgde.mjs +25 -0
- package/dist/chunks/cli-1.1.38-1k5hq477.mjs +2 -0
- package/dist/chunks/cli-1.1.38-1kce30qe.mjs +2 -0
- package/dist/chunks/cli-1.1.38-1wavwd72.mjs +10 -0
- package/dist/chunks/cli-1.1.38-20a2a6n3.mjs +2 -0
- package/dist/chunks/cli-1.1.38-21x08w6j.mjs +2 -0
- package/dist/chunks/cli-1.1.38-2a4wcbby.mjs +2 -0
- package/dist/chunks/cli-1.1.38-2jp2m8e4.mjs +2 -0
- package/dist/chunks/cli-1.1.38-2p7f0cx3.mjs +2 -0
- package/dist/chunks/cli-1.1.38-2x7b4x0w.mjs +3 -0
- package/dist/chunks/cli-1.1.38-2zbkp90c.mjs +2 -0
- package/dist/chunks/cli-1.1.38-37he9dkq.mjs +2 -0
- package/dist/chunks/cli-1.1.38-38f3b9as.mjs +2 -0
- package/dist/chunks/cli-1.1.38-3a7tvcmx.mjs +2 -0
- package/dist/chunks/cli-1.1.38-3c43sfc3.mjs +34 -0
- package/dist/chunks/cli-1.1.38-3d6qg7yb.mjs +7 -0
- package/dist/chunks/cli-1.1.38-3ez6bs0j.mjs +39 -0
- package/dist/chunks/cli-1.1.38-3gyfttrt.mjs +2 -0
- package/dist/chunks/cli-1.1.38-3j9z8bce.mjs +11 -0
- package/dist/chunks/cli-1.1.38-3q70db32.mjs +2 -0
- package/dist/chunks/cli-1.1.38-41hbjb5d.mjs +3 -0
- package/dist/chunks/cli-1.1.38-44ay6q12.mjs +2 -0
- package/dist/chunks/cli-1.1.38-48ykmxgd.mjs +2 -0
- package/dist/chunks/cli-1.1.38-4dvqxnwp.mjs +9 -0
- package/dist/chunks/cli-1.1.38-4g2k1n93.mjs +133 -0
- package/dist/chunks/cli-1.1.38-4vabm3a1.mjs +2 -0
- package/dist/chunks/cli-1.1.38-4wdys8df.mjs +2 -0
- package/dist/chunks/cli-1.1.38-4x6r8r0g.mjs +21 -0
- package/dist/chunks/cli-1.1.38-5edb5t1a.mjs +2 -0
- package/dist/chunks/cli-1.1.38-5zr9x873.mjs +18 -0
- package/dist/chunks/cli-1.1.38-62gxd3va.mjs +2 -0
- package/dist/chunks/cli-1.1.38-6dwdjwfe.mjs +2 -0
- package/dist/chunks/cli-1.1.38-6g33twaj.mjs +2 -0
- package/dist/chunks/cli-1.1.38-6hng9dxr.mjs +2 -0
- package/dist/chunks/cli-1.1.38-7a0vpxbg.mjs +7 -0
- package/dist/chunks/cli-1.1.38-7vygkwbt.mjs +2 -0
- package/dist/chunks/cli-1.1.38-7wqs4198.mjs +2 -0
- package/dist/chunks/cli-1.1.38-7y52ea97.mjs +2 -0
- package/dist/chunks/cli-1.1.38-7zvbnxfm.mjs +2 -0
- package/dist/chunks/cli-1.1.38-839xw74z.mjs +24 -0
- package/dist/chunks/cli-1.1.38-8br976cg.mjs +2 -0
- package/dist/chunks/cli-1.1.38-8jshtkmf.mjs +2 -0
- package/dist/chunks/cli-1.1.38-8m9096qg.mjs +6 -0
- package/dist/chunks/cli-1.1.38-91q945ws.mjs +3 -0
- package/dist/chunks/cli-1.1.38-92g30wbv.mjs +2 -0
- package/dist/chunks/cli-1.1.38-9p14cyab.mjs +2 -0
- package/dist/chunks/cli-1.1.38-9x263zph.mjs +10 -0
- package/dist/chunks/cli-1.1.38-a2j7607w.mjs +2 -0
- package/dist/chunks/cli-1.1.38-a678cgp1.mjs +251 -0
- package/dist/chunks/cli-1.1.38-a9wkqach.mjs +2 -0
- package/dist/chunks/cli-1.1.38-abavft6n.mjs +6 -0
- package/dist/chunks/cli-1.1.38-ac33weys.mjs +2 -0
- package/dist/chunks/cli-1.1.38-an3fdzsz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-aspnz4m6.mjs +2 -0
- package/dist/chunks/cli-1.1.38-axhwttsc.mjs +9 -0
- package/dist/chunks/cli-1.1.38-azkppcr1.mjs +2 -0
- package/dist/chunks/cli-1.1.38-azv9c3jv.mjs +2 -0
- package/dist/chunks/cli-1.1.38-b56dgy8f.mjs +2 -0
- package/dist/chunks/cli-1.1.38-c0w5gdqr.mjs +2 -0
- package/dist/chunks/cli-1.1.38-c7x1esyq.mjs +6 -0
- package/dist/chunks/cli-1.1.38-cmnad0aj.mjs +8 -0
- package/dist/chunks/cli-1.1.38-cp5m26rk.mjs +3 -0
- package/dist/chunks/cli-1.1.38-cpq50ma6.mjs +15 -0
- package/dist/chunks/cli-1.1.38-cq1f1j06.mjs +2 -0
- package/dist/chunks/cli-1.1.38-ctcgmvy1.mjs +2 -0
- package/dist/chunks/cli-1.1.38-d3xjq2jk.mjs +4 -0
- package/dist/chunks/cli-1.1.38-dfcp3asv.mjs +17 -0
- package/dist/chunks/cli-1.1.38-dggxcj2x.mjs +2 -0
- package/dist/chunks/cli-1.1.38-dxtw8tjv.mjs +2 -0
- package/dist/chunks/cli-1.1.38-dz4qs0ht.mjs +2 -0
- package/dist/chunks/cli-1.1.38-e09rc4b8.mjs +20 -0
- package/dist/chunks/cli-1.1.38-e0q3xyay.mjs +2 -0
- package/dist/chunks/cli-1.1.38-e5by1ynv.mjs +6 -0
- package/dist/chunks/cli-1.1.38-e6j30tde.mjs +3 -0
- package/dist/chunks/cli-1.1.38-e84gxv9a.mjs +2 -0
- package/dist/chunks/cli-1.1.38-eafpexwg.mjs +2 -0
- package/dist/chunks/cli-1.1.38-exexvj4k.mjs +5 -0
- package/dist/chunks/cli-1.1.38-f6be5pxz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-f7fq44hz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-fembxywm.mjs +2 -0
- package/dist/chunks/cli-1.1.38-ffkc8ker.mjs +42 -0
- package/dist/chunks/cli-1.1.38-fgwfzs50.mjs +2 -0
- package/dist/chunks/cli-1.1.38-fr1kxnk2.mjs +2 -0
- package/dist/chunks/cli-1.1.38-frcvjcgw.mjs +2 -0
- package/dist/chunks/cli-1.1.38-fyw4xbm7.mjs +3 -0
- package/dist/chunks/cli-1.1.38-g4av033p.mjs +26 -0
- package/dist/chunks/cli-1.1.38-g94v4hq7.mjs +2 -0
- package/dist/chunks/cli-1.1.38-gdcz0rss.mjs +2 -0
- package/dist/chunks/cli-1.1.38-gp49bfxk.mjs +2 -0
- package/dist/chunks/cli-1.1.38-gqpmcnnv.mjs +15 -0
- package/dist/chunks/cli-1.1.38-gtjexepq.mjs +2 -0
- package/dist/chunks/cli-1.1.38-h013mt1h.mjs +2 -0
- package/dist/chunks/cli-1.1.38-h0643t2a.mjs +63 -0
- package/dist/chunks/cli-1.1.38-h1fqbjjb.mjs +2 -0
- package/dist/chunks/cli-1.1.38-h2f789qa.mjs +2 -0
- package/dist/chunks/cli-1.1.38-h6qtpp5r.mjs +2 -0
- package/dist/chunks/cli-1.1.38-h83nx1a5.mjs +2 -0
- package/dist/chunks/cli-1.1.38-haa4vwxj.mjs +2 -0
- package/dist/chunks/cli-1.1.38-hkbb3sr7.mjs +2 -0
- package/dist/chunks/cli-1.1.38-hvc5ed6c.mjs +2 -0
- package/dist/chunks/cli-1.1.38-jakpq48k.mjs +2 -0
- package/dist/chunks/cli-1.1.38-jr0vb3er.mjs +4 -0
- package/dist/chunks/cli-1.1.38-jrf85w1a.mjs +2 -0
- package/dist/chunks/cli-1.1.38-ka1w0zwc.mjs +2 -0
- package/dist/chunks/cli-1.1.38-kcykd1e5.mjs +2 -0
- package/dist/chunks/cli-1.1.38-kjt1gn6d.mjs +135 -0
- package/dist/chunks/cli-1.1.38-kns8wjke.mjs +2 -0
- package/dist/chunks/cli-1.1.38-kqkm7ndz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-m66mmsr6.mjs +2 -0
- package/dist/chunks/cli-1.1.38-m9k89rb6.mjs +2 -0
- package/dist/chunks/cli-1.1.38-mbfqg6za.mjs +3 -0
- package/dist/chunks/cli-1.1.38-md7mbf9q.mjs +2 -0
- package/dist/chunks/cli-1.1.38-mh6a6g83.mjs +4 -0
- package/dist/chunks/cli-1.1.38-mnr9k9j8.mjs +2 -0
- package/dist/chunks/cli-1.1.38-n5tx4p12.mjs +15 -0
- package/dist/chunks/cli-1.1.38-n9xftqbp.mjs +2 -0
- package/dist/chunks/cli-1.1.38-ndbzsvf1.mjs +4 -0
- package/dist/chunks/cli-1.1.38-nmmd7xh9.mjs +4 -0
- package/dist/chunks/cli-1.1.38-npc1f8rb.mjs +3 -0
- package/dist/chunks/cli-1.1.38-nr3yx2kb.mjs +4 -0
- package/dist/chunks/cli-1.1.38-nzbcas3j.mjs +2 -0
- package/dist/chunks/cli-1.1.38-pab9ct4p.mjs +2 -0
- package/dist/chunks/cli-1.1.38-pah268nz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-pdv3syxb.mjs +2 -0
- package/dist/chunks/cli-1.1.38-pe2vd8sk.mjs +2 -0
- package/dist/chunks/cli-1.1.38-pksnvm8s.mjs +2 -0
- package/dist/chunks/cli-1.1.38-pnngv0r7.mjs +2 -0
- package/dist/chunks/cli-1.1.38-q3emeb23.mjs +2 -0
- package/dist/chunks/cli-1.1.38-q3yhkwkh.mjs +3 -0
- package/dist/chunks/cli-1.1.38-q8ewcabe.mjs +2 -0
- package/dist/chunks/cli-1.1.38-qackcmc3.mjs +2 -0
- package/dist/chunks/cli-1.1.38-qebn65cx.mjs +50 -0
- package/dist/chunks/cli-1.1.38-qfpkjbx1.mjs +2 -0
- package/dist/chunks/cli-1.1.38-qv0rqvhj.mjs +4 -0
- package/dist/chunks/cli-1.1.38-qw1jxc9j.mjs +2 -0
- package/dist/chunks/cli-1.1.38-qwkjfytz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-qyg5n01q.mjs +2 -0
- package/dist/chunks/cli-1.1.38-r3r6jmgz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-rp0tsnde.mjs +2 -0
- package/dist/chunks/cli-1.1.38-rvjmh1y0.mjs +4 -0
- package/dist/chunks/cli-1.1.38-s1nggz9g.mjs +16 -0
- package/dist/chunks/cli-1.1.38-s8evhc7a.mjs +2 -0
- package/dist/chunks/cli-1.1.38-sjrfgskz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-sywjrgh0.mjs +2 -0
- package/dist/chunks/cli-1.1.38-t8k5snq9.mjs +24 -0
- package/dist/chunks/cli-1.1.38-tk968ykv.mjs +5497 -0
- package/dist/chunks/cli-1.1.38-tvh77h3r.mjs +2 -0
- package/dist/chunks/cli-1.1.38-v40xwwad.mjs +2 -0
- package/dist/chunks/cli-1.1.38-vbxptsq5.mjs +2 -0
- package/dist/chunks/cli-1.1.38-wbww08bk.mjs +2 -0
- package/dist/chunks/cli-1.1.38-ww8j7xpn.mjs +2 -0
- package/dist/chunks/cli-1.1.38-wwezb1bz.mjs +2 -0
- package/dist/chunks/cli-1.1.38-x0j2v4e5.mjs +2 -0
- package/dist/chunks/cli-1.1.38-xag86y98.mjs +24 -0
- package/dist/chunks/cli-1.1.38-xf78kmy6.mjs +2 -0
- package/dist/chunks/cli-1.1.38-xpar3nmx.mjs +2 -0
- package/dist/chunks/cli-1.1.38-xpjv8r2g.mjs +2 -0
- package/dist/chunks/cli-1.1.38-xr1c1bn4.mjs +2 -0
- package/dist/chunks/cli-1.1.38-xvwb3d6n.mjs +2 -0
- package/dist/chunks/cli-1.1.38-y1w55df3.mjs +2 -0
- package/dist/chunks/cli-1.1.38-y3k2y9f2.mjs +2 -0
- package/dist/chunks/cli-1.1.38-y57qzkxr.mjs +2 -0
- package/dist/chunks/cli-1.1.38-y66mw08s.mjs +2 -0
- package/dist/chunks/cli-1.1.38-y79rqp8p.mjs +60 -0
- package/dist/chunks/cli-1.1.38-y7ahpffc.mjs +2 -0
- package/dist/chunks/cli-1.1.38-yctmyw1a.mjs +25 -0
- package/dist/chunks/cli-1.1.38-yfhvhcvt.mjs +5 -0
- package/dist/chunks/cli-1.1.38-ygyme6j6.mjs +2 -0
- package/dist/chunks/cli-1.1.38-yhp9b0b0.mjs +2 -0
- package/dist/chunks/cli-1.1.38-yk5s276s.mjs +2 -0
- package/dist/chunks/cli-1.1.38-z02gnn41.mjs +2 -0
- package/dist/chunks/cli-1.1.38-z2mnaz67.mjs +2 -0
- package/dist/chunks/cli-1.1.38-z6abxdx3.mjs +2 -0
- package/dist/chunks/cli-1.1.38-z8x4q5cc.mjs +12 -0
- package/dist/chunks/cli-1.1.38-z9faf3ft.mjs +6 -0
- package/dist/chunks/cli-1.1.38-zj7fa197.mjs +2 -0
- package/dist/chunks/cli-1.1.38-zx5nqvq6.mjs +2 -0
- package/dist/chunks/client-1.1.38-7hcrtb3q.mjs +1 -0
- package/dist/chunks/color-1.1.38-eqrtxm9k.mjs +1 -0
- package/dist/chunks/compact-1.1.38-ya34rk57.mjs +2 -0
- package/dist/chunks/config-1.1.38-bbe0h0fj.mjs +1 -0
- package/dist/chunks/config-1.1.38-bfaptzc8.mjs +1 -0
- package/dist/chunks/constants-1.1.38-yytvwzgs.mjs +1 -0
- package/dist/chunks/context-1.1.38-2mgwzmk2.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.1.38-8bj0e1ac.mjs +1 -0
- package/dist/chunks/conversation-1.1.38-9hdq28pm.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.1.38-s4pj5tsz.mjs +1 -0
- package/dist/chunks/copy-1.1.38-f83q42a2.mjs +9 -0
- package/dist/chunks/cost-1.1.38-8wheqk0q.mjs +1 -0
- package/dist/chunks/createSession-1.1.38-m815jqhf.mjs +1 -0
- package/dist/chunks/debug-1.1.38-0nc58m79.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.1.38-t4spryyh.mjs +1458 -0
- package/dist/chunks/desktop-1.1.38-6tbjry9x.mjs +2 -0
- package/dist/chunks/detectRepository-1.1.38-fkd9xdma.mjs +1 -0
- package/dist/chunks/detection-1.1.38-21frnq82.mjs +1 -0
- package/dist/chunks/diff-1.1.38-bqd4vh6q.mjs +1 -0
- package/dist/chunks/doctor-1.1.38-yedjk1t9.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.1.38-2tq437dy.mjs +1 -0
- package/dist/chunks/earlyInput-1.1.38-ag144tcy.mjs +1 -0
- package/dist/chunks/effort-1.1.38-w8zmwjyn.mjs +13 -0
- package/dist/chunks/engine-1.1.38-9p06hk6t.mjs +1 -0
- package/dist/chunks/envUtils-1.1.38-0x5t3jcn.mjs +1 -0
- package/dist/chunks/errors-1.1.38-x5yfskn2.mjs +1 -0
- package/dist/chunks/exampleCommands-1.1.38-j3f50kg4.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.1.38-vtsaz9ex.mjs +1 -0
- package/dist/chunks/exit-1.1.38-2az07cgq.mjs +1 -0
- package/dist/chunks/explorer-1.1.38-f8v6fw0n.mjs +1 -0
- package/dist/chunks/export-1.1.38-ryfsevs9.mjs +2 -0
- package/dist/chunks/fast-1.1.38-pqjeb7br.mjs +1 -0
- package/dist/chunks/feedback-1.1.38-a735me7a.mjs +16 -0
- package/dist/chunks/git-1.1.38-ea24mp87.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.1.38-mrk9kw4h.mjs +1 -0
- package/dist/chunks/goal-1.1.38-t7b2x0m7.mjs +4 -0
- package/dist/chunks/headless-1.1.38-xa7n2h6a.mjs +2 -0
- package/dist/chunks/heapdump-1.1.38-0kkahje0.mjs +6 -0
- package/dist/chunks/help-1.1.38-c6fc5w2g.mjs +1 -0
- package/dist/chunks/hooks-1.1.38-020dm4m5.mjs +79 -0
- package/dist/chunks/hooks-1.1.38-d6nx1th8.mjs +1 -0
- package/dist/chunks/ide-1.1.38-w88jdkwh.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.1.38-dr7f0p7d.mjs +1 -0
- package/dist/chunks/import-1.1.38-tjgkgqtj.mjs +260 -0
- package/dist/chunks/inboundAttachments-1.1.38-96y0me8c.mjs +1 -0
- package/dist/chunks/index-1.1.38-0p1da46q.mjs +1 -0
- package/dist/chunks/index-1.1.38-0vkksyqf.mjs +1 -0
- package/dist/chunks/index-1.1.38-32wb94y5.mjs +1 -0
- package/dist/chunks/index-1.1.38-b7v4mc41.mjs +1 -0
- package/dist/chunks/index-1.1.38-d5147beb.mjs +1 -0
- package/dist/chunks/index-1.1.38-e7f6p4gc.mjs +2 -0
- package/dist/chunks/index-1.1.38-fmvxdssr.mjs +1 -0
- package/dist/chunks/index-1.1.38-fx4e6n5y.mjs +9 -0
- package/dist/chunks/index-1.1.38-g6wrndbn.mjs +1 -0
- package/dist/chunks/index-1.1.38-h6safnqh.mjs +1 -0
- package/dist/chunks/index-1.1.38-he0r1v5h.mjs +1 -0
- package/dist/chunks/index-1.1.38-nqht0jy4.mjs +1 -0
- package/dist/chunks/index-1.1.38-nzxyzk3n.mjs +1 -0
- package/dist/chunks/index-1.1.38-psktz1tc.mjs +23 -0
- package/dist/chunks/index-1.1.38-r550x6ay.mjs +2 -0
- package/dist/chunks/index-1.1.38-t56hya6b.mjs +9 -0
- package/dist/chunks/index-1.1.38-t8ehet13.mjs +1 -0
- package/dist/chunks/index-1.1.38-trn75xj8.mjs +1 -0
- package/dist/chunks/index-1.1.38-tz1ab367.mjs +1 -0
- package/dist/chunks/index-1.1.38-wj6bvgqh.mjs +1 -0
- package/dist/chunks/index-1.1.38-wwvwtd47.mjs +30 -0
- package/dist/chunks/index-1.1.38-x4crzvcp.mjs +5 -0
- package/dist/chunks/index-1.1.38-xwfqwn8f.mjs +1 -0
- package/dist/chunks/init-1.1.38-kt9fktc1.mjs +2 -0
- package/dist/chunks/initReplBridge-1.1.38-89egcf9a.mjs +1 -0
- package/dist/chunks/ink-1.1.38-jgsp2t7f.mjs +1 -0
- package/dist/chunks/insights-1.1.38-hq19aerm.mjs +870 -0
- package/dist/chunks/install-1.1.38-gyyxk8ck.mjs +1 -0
- package/dist/chunks/install-github-app-1.1.38-f2jf37sk.mjs +149 -0
- package/dist/chunks/install-slack-app-1.1.38-tset69kh.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.1.38-m06ry3jx.mjs +1 -0
- package/dist/chunks/latestVersionCache-1.1.38-1c7vvamf.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.1.38-0bgzxgy4.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.38-07neaje5.mjs +1 -0
- package/dist/chunks/log-1.1.38-7yxczk1m.mjs +1 -0
- package/dist/chunks/main-1.1.38-ckkpf6pm.mjs +1 -0
- package/dist/chunks/managedEnv-1.1.38-wgkdf5th.mjs +1 -0
- package/dist/chunks/mcp-1.1.38-5g1dkaq3.mjs +4 -0
- package/dist/chunks/mcp-1.1.38-pv2q4v1t.mjs +1 -0
- package/dist/chunks/mcp-1.1.38-rw32ezwj.mjs +17 -0
- package/dist/chunks/mcpb-1.1.38-2j8knvey.mjs +1 -0
- package/dist/chunks/memory-1.1.38-ee240zz4.mjs +128 -0
- package/dist/chunks/model-1.1.38-0ap9xmp3.mjs +1 -0
- package/dist/chunks/model-1.1.38-5qmke302.mjs +2 -0
- package/dist/chunks/new-1.1.38-ahnzb47c.mjs +1 -0
- package/dist/chunks/node-1.1.38-8hxn3e6r.mjs +15 -0
- package/dist/chunks/node-1.1.38-v0zbmtyr.mjs +1 -0
- package/dist/chunks/oauth-1.1.38-5me1vtg3.mjs +1 -0
- package/dist/chunks/openaiShim-1.1.38-12snq1gc.mjs +14 -0
- package/dist/chunks/output-style-1.1.38-zb5mtnss.mjs +1 -0
- package/dist/chunks/package-V72LKFNW-1.1.38-q7hcwdtx.mjs +1 -0
- package/dist/chunks/permissions-1.1.38-5kw7w85c.mjs +1 -0
- package/dist/chunks/permissions-1.1.38-nk2ndszr.mjs +3 -0
- package/dist/chunks/plan-1.1.38-z3dqqjh7.mjs +1 -0
- package/dist/chunks/plist-1.1.38-56sqgq6h.mjs +1 -0
- package/dist/chunks/plugin-1.1.38-03de52xp.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.1.38-0v5j57bh.mjs +1 -0
- package/dist/chunks/plugins-1.1.38-zmnat29k.mjs +9 -0
- package/dist/chunks/preActionHook-1.1.38-s4pt4ahn.mjs +2 -0
- package/dist/chunks/print-1.1.38-9ar632da.mjs +57 -0
- package/dist/chunks/process-1.1.38-ndydtgs9.mjs +1 -0
- package/dist/chunks/processBashCommand-1.1.38-xj8xy6j7.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.1.38-rq94k8j4.mjs +9 -0
- package/dist/chunks/prompt-1.1.38-q5jst5dw.mjs +1 -0
- package/dist/chunks/prompt-1.1.38-qwzt31qc.mjs +1 -0
- package/dist/chunks/prompts-1.1.38-brvz08qv.mjs +1 -0
- package/dist/chunks/provider-1.1.38-zvnh7rf6.mjs +2 -0
- package/dist/chunks/providerProfiles-1.1.38-a0jrr70y.mjs +1 -0
- package/dist/chunks/providerValidation-1.1.38-qj7m9ae0.mjs +6 -0
- package/dist/chunks/registerSubcommands-1.1.38-kn98yfrh.mjs +26 -0
- package/dist/chunks/registry-1.1.38-02xa1gxq.mjs +1 -0
- package/dist/chunks/release-notes-1.1.38-kmxj255k.mjs +5 -0
- package/dist/chunks/reload-plugins-1.1.38-n429fwj8.mjs +2 -0
- package/dist/chunks/remote-env-1.1.38-4ecvn8ra.mjs +1 -0
- package/dist/chunks/rename-1.1.38-ah715pv0.mjs +1 -0
- package/dist/chunks/replLauncher-1.1.38-d6n16rnp.mjs +1 -0
- package/dist/chunks/resume-1.1.38-tv3f819g.mjs +2 -0
- package/dist/chunks/rewind-1.1.38-6wc124dk.mjs +1 -0
- package/dist/chunks/rootOptions-1.1.38-d7ta609y.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.1.38-n01n145x.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.1.38-pyjs3awv.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.1.38-54tec9n4.mjs +1 -0
- package/dist/chunks/session-1.1.38-d20mp4b0.mjs +2 -0
- package/dist/chunks/sessionStorage-1.1.38-44je31rv.mjs +1 -0
- package/dist/chunks/settings-1.1.38-x6fb5kk1.mjs +1 -0
- package/dist/chunks/setup-1.1.38-cryd3k7j.mjs +12 -0
- package/dist/chunks/sinks-1.1.38-xt06cywv.mjs +1 -0
- package/dist/chunks/skills-1.1.38-7kbrgpe5.mjs +1 -0
- package/dist/chunks/startupProfiler-1.1.38-w24hm0h1.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.1.38-pmp6wqj9.mjs +1 -0
- package/dist/chunks/state-1.1.38-ttzekhjw.mjs +1 -0
- package/dist/chunks/stats-1.1.38-w347vz1w.mjs +1 -0
- package/dist/chunks/status-1.1.38-h7pzkbmj.mjs +1 -0
- package/dist/chunks/stickers-1.1.38-p6n5mskj.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.1.38-3b6nr5kd.mjs +1 -0
- package/dist/chunks/tasks-1.1.38-jrznh7eb.mjs +1 -0
- package/dist/chunks/teamHelpers-1.1.38-b920q217.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.1.38-30rjbjkp.mjs +1 -0
- package/dist/chunks/teleport-1.1.38-kqj15kwz.mjs +1 -0
- package/dist/chunks/terminalSetup-1.1.38-a1j9tav3.mjs +1 -0
- package/dist/chunks/theme-1.1.38-zqgshtd8.mjs +1 -0
- package/dist/chunks/toolPool-1.1.38-rjxnejc9.mjs +1 -0
- package/dist/chunks/toolSearch-1.1.38-bsgpwrqw.mjs +1 -0
- package/dist/chunks/tools-1.1.38-hphgtq98.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.1.38-6zmefgdf.mjs +69 -0
- package/dist/chunks/types-1.1.38-yaz6xzxg.mjs +1 -0
- package/dist/chunks/update-1.1.38-qkmfgy3f.mjs +72 -0
- package/dist/chunks/upload-1.1.38-25jm1g5x.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.1.38-kdzcx35q.mjs +14 -0
- package/dist/chunks/usage-1.1.38-17yqaf62.mjs +1 -0
- package/dist/chunks/util-1.1.38-e3nemqk5.mjs +1 -0
- package/dist/chunks/utils-1.1.38-709jv8e9.mjs +1 -0
- package/dist/chunks/vim-1.1.38-jtz13d73.mjs +1 -0
- package/dist/chunks/watchLoop-1.1.38-fb6heqjg.mjs +13 -0
- package/dist/chunks/wiki-1.1.38-fpkcyk67.mjs +132 -0
- package/dist/chunks/workflows-1.1.38-mj7dax7d.mjs +1 -0
- package/dist/chunks/worktree-1.1.38-9zf6zp7r.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.1.38-01veveaw.mjs +1 -0
- package/dist/chunks/wrapper-1.1.38-7cvdwcn2.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/dist/help.txt +1 -1
- package/package.json +9 -9
- package/dist/chunks/App-1.1.36-4ypa2ky6.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.1.36-r5r4cwsv.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.1.36-v3mtkjve.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.1.36-m4wb4rn1.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.36-7v5ebgve.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.1.36-xpxzdymv.mjs +0 -1
- package/dist/chunks/DiffDialog-1.1.36-f49re5tc.mjs +0 -6
- package/dist/chunks/Doctor-1.1.36-2dspbc9p.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.1.36-9ajm3kh8.mjs +0 -6
- package/dist/chunks/ITermBackend-1.1.36-js7zf4na.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.1.36-4qp5v3qb.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.1.36-vesfpg6k.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.1.36-bg3y18da.mjs +0 -1
- package/dist/chunks/Onboarding-1.1.36-n2rz26c0.mjs +0 -1
- package/dist/chunks/ProviderManager-1.1.36-tr7atyyg.mjs +0 -1
- package/dist/chunks/REPL-1.1.36-k3q58fha.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.1.36-qa0m768f.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.1.36-sg79pgf7.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.36-2q0d269f.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.1.36-rngjq7f6.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.1.36-mrzttk9n.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.1.36-ycekhs3r.mjs +0 -1
- package/dist/chunks/TrustDialog-1.1.36-awrjghme.mjs +0 -1
- package/dist/chunks/activeProvider-1.1.36-r7zqb99r.mjs +0 -1
- package/dist/chunks/add-dir-1.1.36-mrfh3vg4.mjs +0 -1
- package/dist/chunks/agentTypes-1.1.36-50aq6x28.mjs +0 -1
- package/dist/chunks/agents-1.1.36-p154bdnq.mjs +0 -110
- package/dist/chunks/agents-1.1.36-qvdrqv2q.mjs +0 -3
- package/dist/chunks/api-1.1.36-fw1zvw5c.mjs +0 -1
- package/dist/chunks/asciicast-1.1.36-pabx88c3.mjs +0 -1
- package/dist/chunks/auth-1.1.36-nxs2defd.mjs +0 -1
- package/dist/chunks/auth-1.1.36-vxpyyv86.mjs +0 -1
- package/dist/chunks/autoMode-1.1.36-ew03cpb1.mjs +0 -52
- package/dist/chunks/autoModeSetup-1.1.36-m3aspqak.mjs +0 -44
- package/dist/chunks/autoUpdater-1.1.36-dvg6tvq8.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.1.36-q1ejq881.mjs +0 -1
- package/dist/chunks/branch-1.1.36-ev37nqdg.mjs +0 -4
- package/dist/chunks/bridge-1.1.36-1yp5eghy.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.1.36-yxs52053.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.1.36-ghh2yqhm.mjs +0 -1
- package/dist/chunks/bridgeMain-1.1.36-6v5c06t6.mjs +0 -64
- package/dist/chunks/bridgePointer-1.1.36-2rgfyyde.mjs +0 -1
- package/dist/chunks/btw-1.1.36-065ma89f.mjs +0 -1
- package/dist/chunks/buddy-1.1.36-a1z9gs49.mjs +0 -3
- package/dist/chunks/cache-probe-1.1.36-bvheegzj.mjs +0 -21
- package/dist/chunks/cacheStats-1.1.36-0bq3fz34.mjs +0 -4
- package/dist/chunks/caches-1.1.36-8swj463y.mjs +0 -1
- package/dist/chunks/cd-1.1.36-wwqk3h8r.mjs +0 -3
- package/dist/chunks/claudeDesktop-1.1.36-325wbhtb.mjs +0 -1
- package/dist/chunks/claudemd-1.1.36-2vv85v0v.mjs +0 -1
- package/dist/chunks/clear-1.1.36-xnqf2tm7.mjs +0 -1
- package/dist/chunks/clearTerminal-1.1.36-g72pkm2k.mjs +0 -1
- package/dist/chunks/cli-1.1.36-02vb8r9t.mjs +0 -2
- package/dist/chunks/cli-1.1.36-0ar5v8he.mjs +0 -2
- package/dist/chunks/cli-1.1.36-0d7qj290.mjs +0 -2
- package/dist/chunks/cli-1.1.36-0qdd3hmz.mjs +0 -2
- package/dist/chunks/cli-1.1.36-0qtyffhw.mjs +0 -2
- package/dist/chunks/cli-1.1.36-0v8c69pm.mjs +0 -2
- package/dist/chunks/cli-1.1.36-0zzq8bfp.mjs +0 -2
- package/dist/chunks/cli-1.1.36-12bsh7j9.mjs +0 -2
- package/dist/chunks/cli-1.1.36-1dhxpexj.mjs +0 -2
- package/dist/chunks/cli-1.1.36-1dr6aakq.mjs +0 -2
- package/dist/chunks/cli-1.1.36-1fmfztzp.mjs +0 -2
- package/dist/chunks/cli-1.1.36-1yk5zdh0.mjs +0 -2
- package/dist/chunks/cli-1.1.36-1z1m015s.mjs +0 -2
- package/dist/chunks/cli-1.1.36-2720p0e9.mjs +0 -2
- package/dist/chunks/cli-1.1.36-2awc366j.mjs +0 -2
- package/dist/chunks/cli-1.1.36-2mqhd52j.mjs +0 -2
- package/dist/chunks/cli-1.1.36-2sbmjg5a.mjs +0 -2
- package/dist/chunks/cli-1.1.36-33pcdm87.mjs +0 -2
- package/dist/chunks/cli-1.1.36-34sqd3h3.mjs +0 -15
- package/dist/chunks/cli-1.1.36-3fe93rwy.mjs +0 -2
- package/dist/chunks/cli-1.1.36-3gx0bht8.mjs +0 -4
- package/dist/chunks/cli-1.1.36-3kd43x1y.mjs +0 -2
- package/dist/chunks/cli-1.1.36-3mmakdzj.mjs +0 -2
- package/dist/chunks/cli-1.1.36-3xkn8kcw.mjs +0 -2
- package/dist/chunks/cli-1.1.36-3z14wtaa.mjs +0 -2
- package/dist/chunks/cli-1.1.36-40x4f5k7.mjs +0 -34
- package/dist/chunks/cli-1.1.36-422dmh6w.mjs +0 -2
- package/dist/chunks/cli-1.1.36-43fkjqy9.mjs +0 -2
- package/dist/chunks/cli-1.1.36-451x9avw.mjs +0 -2
- package/dist/chunks/cli-1.1.36-4ajy0ys9.mjs +0 -2
- package/dist/chunks/cli-1.1.36-4g1wf6an.mjs +0 -2
- package/dist/chunks/cli-1.1.36-4jwgcerx.mjs +0 -2
- package/dist/chunks/cli-1.1.36-4pfza5vq.mjs +0 -2
- package/dist/chunks/cli-1.1.36-4ssz80b2.mjs +0 -60
- package/dist/chunks/cli-1.1.36-5de80y14.mjs +0 -26
- package/dist/chunks/cli-1.1.36-5few49rp.mjs +0 -7
- package/dist/chunks/cli-1.1.36-5kmv74s2.mjs +0 -2
- package/dist/chunks/cli-1.1.36-5nkhhy5f.mjs +0 -7
- package/dist/chunks/cli-1.1.36-5nkv3yj2.mjs +0 -2
- package/dist/chunks/cli-1.1.36-5zzwcyt7.mjs +0 -2
- package/dist/chunks/cli-1.1.36-659qh6fs.mjs +0 -15
- package/dist/chunks/cli-1.1.36-65fkb20j.mjs +0 -12
- package/dist/chunks/cli-1.1.36-69zmc79s.mjs +0 -2
- package/dist/chunks/cli-1.1.36-6g1w2zbr.mjs +0 -4
- package/dist/chunks/cli-1.1.36-6jv1ss2p.mjs +0 -2
- package/dist/chunks/cli-1.1.36-6q7sfj4e.mjs +0 -4
- package/dist/chunks/cli-1.1.36-6yqvdwyp.mjs +0 -2
- package/dist/chunks/cli-1.1.36-703pmf6z.mjs +0 -135
- package/dist/chunks/cli-1.1.36-72hptg9d.mjs +0 -2
- package/dist/chunks/cli-1.1.36-72p8zdsg.mjs +0 -2
- package/dist/chunks/cli-1.1.36-72sph7cp.mjs +0 -3
- package/dist/chunks/cli-1.1.36-775g6c3z.mjs +0 -2
- package/dist/chunks/cli-1.1.36-789jh18m.mjs +0 -2
- package/dist/chunks/cli-1.1.36-79jcadbx.mjs +0 -2
- package/dist/chunks/cli-1.1.36-7byzkddk.mjs +0 -3
- package/dist/chunks/cli-1.1.36-7tprmtpr.mjs +0 -2
- package/dist/chunks/cli-1.1.36-7xx3rm4x.mjs +0 -2
- package/dist/chunks/cli-1.1.36-7ywn6pq1.mjs +0 -2
- package/dist/chunks/cli-1.1.36-7z5n90ex.mjs +0 -3
- package/dist/chunks/cli-1.1.36-80gqbr44.mjs +0 -2
- package/dist/chunks/cli-1.1.36-814rb1qn.mjs +0 -2
- package/dist/chunks/cli-1.1.36-89dhnv3q.mjs +0 -2
- package/dist/chunks/cli-1.1.36-8k2z8yvv.mjs +0 -4
- package/dist/chunks/cli-1.1.36-8mc299mk.mjs +0 -6
- package/dist/chunks/cli-1.1.36-8s4n3bf2.mjs +0 -2
- package/dist/chunks/cli-1.1.36-8vncd2t8.mjs +0 -2
- package/dist/chunks/cli-1.1.36-90xk1ctt.mjs +0 -4
- package/dist/chunks/cli-1.1.36-97zq0wp5.mjs +0 -2
- package/dist/chunks/cli-1.1.36-9k371kgm.mjs +0 -15
- package/dist/chunks/cli-1.1.36-9xnre98h.mjs +0 -2
- package/dist/chunks/cli-1.1.36-a4gh459t.mjs +0 -2
- package/dist/chunks/cli-1.1.36-adsb7266.mjs +0 -2
- package/dist/chunks/cli-1.1.36-ahr5fnjy.mjs +0 -2
- package/dist/chunks/cli-1.1.36-apycha28.mjs +0 -2
- package/dist/chunks/cli-1.1.36-as3jtdj6.mjs +0 -4
- package/dist/chunks/cli-1.1.36-aypab30m.mjs +0 -2
- package/dist/chunks/cli-1.1.36-b0rge62y.mjs +0 -133
- package/dist/chunks/cli-1.1.36-b54n0msa.mjs +0 -2
- package/dist/chunks/cli-1.1.36-b77v7k9g.mjs +0 -3
- package/dist/chunks/cli-1.1.36-bsfazmtt.mjs +0 -2
- package/dist/chunks/cli-1.1.36-bxrew2k8.mjs +0 -2
- package/dist/chunks/cli-1.1.36-bywrsksg.mjs +0 -2
- package/dist/chunks/cli-1.1.36-c3rd4cfc.mjs +0 -10
- package/dist/chunks/cli-1.1.36-c4k9g1dk.mjs +0 -2
- package/dist/chunks/cli-1.1.36-c4pkjm54.mjs +0 -2
- package/dist/chunks/cli-1.1.36-cm2kys6t.mjs +0 -2
- package/dist/chunks/cli-1.1.36-cya5x9g3.mjs +0 -2
- package/dist/chunks/cli-1.1.36-d4bd8qw2.mjs +0 -4
- package/dist/chunks/cli-1.1.36-dpn3xp4e.mjs +0 -2
- package/dist/chunks/cli-1.1.36-dt9kgcr3.mjs +0 -2
- package/dist/chunks/cli-1.1.36-e5xkjjtj.mjs +0 -21
- package/dist/chunks/cli-1.1.36-ef3vjg8b.mjs +0 -9
- package/dist/chunks/cli-1.1.36-f6yxszv5.mjs +0 -2
- package/dist/chunks/cli-1.1.36-fd7xaf6g.mjs +0 -2
- package/dist/chunks/cli-1.1.36-fhnpvzaf.mjs +0 -6
- package/dist/chunks/cli-1.1.36-fj9nx7k4.mjs +0 -10
- package/dist/chunks/cli-1.1.36-fw6d7jyv.mjs +0 -2
- package/dist/chunks/cli-1.1.36-fxpd9jmz.mjs +0 -2
- package/dist/chunks/cli-1.1.36-gfn4xejp.mjs +0 -17
- package/dist/chunks/cli-1.1.36-gfx5kkq4.mjs +0 -2
- package/dist/chunks/cli-1.1.36-ggr2pkp7.mjs +0 -2
- package/dist/chunks/cli-1.1.36-gpks9z9m.mjs +0 -2
- package/dist/chunks/cli-1.1.36-h74yjk66.mjs +0 -2
- package/dist/chunks/cli-1.1.36-haxnmraq.mjs +0 -24
- package/dist/chunks/cli-1.1.36-hqmz0657.mjs +0 -3
- package/dist/chunks/cli-1.1.36-hvnr6rta.mjs +0 -2
- package/dist/chunks/cli-1.1.36-jnftcw4c.mjs +0 -2
- package/dist/chunks/cli-1.1.36-jpcwwd65.mjs +0 -5
- package/dist/chunks/cli-1.1.36-jqn2tez7.mjs +0 -2
- package/dist/chunks/cli-1.1.36-jx3e7dft.mjs +0 -9
- package/dist/chunks/cli-1.1.36-k14jc4fv.mjs +0 -2
- package/dist/chunks/cli-1.1.36-kzxdhaaz.mjs +0 -2
- package/dist/chunks/cli-1.1.36-m11p0exg.mjs +0 -2
- package/dist/chunks/cli-1.1.36-m981mqsb.mjs +0 -39
- package/dist/chunks/cli-1.1.36-mam7e8zn.mjs +0 -11
- package/dist/chunks/cli-1.1.36-mmre9943.mjs +0 -2
- package/dist/chunks/cli-1.1.36-n44emd29.mjs +0 -2
- package/dist/chunks/cli-1.1.36-n5etyd9m.mjs +0 -2
- package/dist/chunks/cli-1.1.36-n9knhbs6.mjs +0 -6
- package/dist/chunks/cli-1.1.36-nnzqwcsc.mjs +0 -2
- package/dist/chunks/cli-1.1.36-nqy7mzrt.mjs +0 -45
- package/dist/chunks/cli-1.1.36-nw3mandv.mjs +0 -50
- package/dist/chunks/cli-1.1.36-p0w1dm9g.mjs +0 -2
- package/dist/chunks/cli-1.1.36-p375v620.mjs +0 -6
- package/dist/chunks/cli-1.1.36-p7w1197h.mjs +0 -2
- package/dist/chunks/cli-1.1.36-psd41gmc.mjs +0 -2
- package/dist/chunks/cli-1.1.36-pwszcwqb.mjs +0 -2
- package/dist/chunks/cli-1.1.36-pxy9g55g.mjs +0 -20
- package/dist/chunks/cli-1.1.36-q2e0arg8.mjs +0 -2
- package/dist/chunks/cli-1.1.36-q4a30pjq.mjs +0 -2
- package/dist/chunks/cli-1.1.36-q9xgs0j5.mjs +0 -3
- package/dist/chunks/cli-1.1.36-qdefh0tg.mjs +0 -2
- package/dist/chunks/cli-1.1.36-qm9492fw.mjs +0 -2
- package/dist/chunks/cli-1.1.36-qn4td7gm.mjs +0 -4
- package/dist/chunks/cli-1.1.36-qxdw7xas.mjs +0 -3
- package/dist/chunks/cli-1.1.36-qyd8fnkc.mjs +0 -2
- package/dist/chunks/cli-1.1.36-r241fh82.mjs +0 -5
- package/dist/chunks/cli-1.1.36-r2svaxxt.mjs +0 -25
- package/dist/chunks/cli-1.1.36-rh00pabh.mjs +0 -2
- package/dist/chunks/cli-1.1.36-rkcfjk5n.mjs +0 -8
- package/dist/chunks/cli-1.1.36-rp1ck3rr.mjs +0 -2
- package/dist/chunks/cli-1.1.36-rqhp2xt1.mjs +0 -24
- package/dist/chunks/cli-1.1.36-rv222he2.mjs +0 -2
- package/dist/chunks/cli-1.1.36-rwa4g74g.mjs +0 -3
- package/dist/chunks/cli-1.1.36-rwqe4psg.mjs +0 -2
- package/dist/chunks/cli-1.1.36-s8jcsdgb.mjs +0 -16
- package/dist/chunks/cli-1.1.36-s9ar9y3g.mjs +0 -42
- package/dist/chunks/cli-1.1.36-sd51t79y.mjs +0 -2
- package/dist/chunks/cli-1.1.36-ss62b517.mjs +0 -63
- package/dist/chunks/cli-1.1.36-t0ncrwb0.mjs +0 -2
- package/dist/chunks/cli-1.1.36-t6sjxpcb.mjs +0 -251
- package/dist/chunks/cli-1.1.36-tda1q99k.mjs +0 -2
- package/dist/chunks/cli-1.1.36-tvr7rnm0.mjs +0 -2
- package/dist/chunks/cli-1.1.36-v0s0vqmm.mjs +0 -5551
- package/dist/chunks/cli-1.1.36-v5nxnkwj.mjs +0 -2
- package/dist/chunks/cli-1.1.36-vdy55pxe.mjs +0 -2
- package/dist/chunks/cli-1.1.36-vz7m93en.mjs +0 -2
- package/dist/chunks/cli-1.1.36-w1nf9wd0.mjs +0 -10
- package/dist/chunks/cli-1.1.36-w23zxn8g.mjs +0 -2
- package/dist/chunks/cli-1.1.36-wdrt641n.mjs +0 -25
- package/dist/chunks/cli-1.1.36-wdvzyaky.mjs +0 -2
- package/dist/chunks/cli-1.1.36-wfgjsqkk.mjs +0 -2
- package/dist/chunks/cli-1.1.36-wwwj09sw.mjs +0 -2
- package/dist/chunks/cli-1.1.36-x0qqxv1t.mjs +0 -2
- package/dist/chunks/cli-1.1.36-x11fzb6n.mjs +0 -2
- package/dist/chunks/cli-1.1.36-x1761kx6.mjs +0 -2
- package/dist/chunks/cli-1.1.36-xf45p3qr.mjs +0 -2
- package/dist/chunks/cli-1.1.36-xj95r55n.mjs +0 -2
- package/dist/chunks/cli-1.1.36-xs4p38vb.mjs +0 -6
- package/dist/chunks/cli-1.1.36-xvwc8bka.mjs +0 -2
- package/dist/chunks/cli-1.1.36-ya2s1rfy.mjs +0 -18
- package/dist/chunks/cli-1.1.36-yew13j62.mjs +0 -2
- package/dist/chunks/cli-1.1.36-ykz9vwbf.mjs +0 -2
- package/dist/chunks/cli-1.1.36-yrgfywq5.mjs +0 -24
- package/dist/chunks/cli-1.1.36-z5djkbwy.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zax3mr51.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zbn66hn9.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zd032ger.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zeahx79z.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zey2drb2.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zv6ffhhy.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zw8q3z61.mjs +0 -2
- package/dist/chunks/cli-1.1.36-zzpdy0k8.mjs +0 -2
- package/dist/chunks/client-1.1.36-ydq31jce.mjs +0 -1
- package/dist/chunks/color-1.1.36-9fjvayey.mjs +0 -1
- package/dist/chunks/compact-1.1.36-p42ft3yq.mjs +0 -2
- package/dist/chunks/config-1.1.36-42ab04bq.mjs +0 -1
- package/dist/chunks/config-1.1.36-x636yezt.mjs +0 -1
- package/dist/chunks/constants-1.1.36-ba1bvty5.mjs +0 -1
- package/dist/chunks/context-1.1.36-zjvkgfrr.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.1.36-f5rax1ah.mjs +0 -1
- package/dist/chunks/conversation-1.1.36-jd5867c5.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.1.36-dg9s10xt.mjs +0 -1
- package/dist/chunks/copy-1.1.36-95ds743c.mjs +0 -9
- package/dist/chunks/cost-1.1.36-vhm8f7tp.mjs +0 -1
- package/dist/chunks/createSession-1.1.36-haxa0dvw.mjs +0 -1
- package/dist/chunks/debug-1.1.36-fvyvxmx1.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.1.36-24ag19wj.mjs +0 -1458
- package/dist/chunks/desktop-1.1.36-n6x2epmn.mjs +0 -2
- package/dist/chunks/detectRepository-1.1.36-ktxtd4ej.mjs +0 -1
- package/dist/chunks/detection-1.1.36-s8z7d4bm.mjs +0 -1
- package/dist/chunks/diff-1.1.36-0mrzd4kw.mjs +0 -1
- package/dist/chunks/doctor-1.1.36-tta8yrqq.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.1.36-1j38851d.mjs +0 -1
- package/dist/chunks/earlyInput-1.1.36-rv44jymf.mjs +0 -1
- package/dist/chunks/effort-1.1.36-yd22tc48.mjs +0 -13
- package/dist/chunks/engine-1.1.36-cf09xwf2.mjs +0 -1
- package/dist/chunks/envUtils-1.1.36-e9dd4q6g.mjs +0 -1
- package/dist/chunks/errors-1.1.36-86veg19m.mjs +0 -1
- package/dist/chunks/exampleCommands-1.1.36-nmf2s84f.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.1.36-naz9kbtt.mjs +0 -1
- package/dist/chunks/exit-1.1.36-53t418pg.mjs +0 -1
- package/dist/chunks/explorer-1.1.36-pgghex3j.mjs +0 -1
- package/dist/chunks/export-1.1.36-1ynxg1wb.mjs +0 -2
- package/dist/chunks/fast-1.1.36-f64h2t2k.mjs +0 -1
- package/dist/chunks/feedback-1.1.36-vgb10qbs.mjs +0 -16
- package/dist/chunks/git-1.1.36-f934674g.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.1.36-f2yec5gh.mjs +0 -1
- package/dist/chunks/goal-1.1.36-yyy0jkwz.mjs +0 -4
- package/dist/chunks/headless-1.1.36-47ts4j1h.mjs +0 -2
- package/dist/chunks/heapdump-1.1.36-hhwpz3jf.mjs +0 -6
- package/dist/chunks/help-1.1.36-zr7z9tga.mjs +0 -1
- package/dist/chunks/hooks-1.1.36-and1agcb.mjs +0 -79
- package/dist/chunks/hooks-1.1.36-qgd5x79v.mjs +0 -1
- package/dist/chunks/ide-1.1.36-afc5wn8q.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.1.36-ycj021z0.mjs +0 -1
- package/dist/chunks/import-1.1.36-jrjb5s4n.mjs +0 -261
- package/dist/chunks/inboundAttachments-1.1.36-h1yrtqms.mjs +0 -1
- package/dist/chunks/index-1.1.36-048ng2px.mjs +0 -1
- package/dist/chunks/index-1.1.36-1mbx6axa.mjs +0 -1
- package/dist/chunks/index-1.1.36-1rzdb7w0.mjs +0 -1
- package/dist/chunks/index-1.1.36-312tvs2v.mjs +0 -2
- package/dist/chunks/index-1.1.36-46vz4hm5.mjs +0 -5
- package/dist/chunks/index-1.1.36-4dth0mx8.mjs +0 -1
- package/dist/chunks/index-1.1.36-5bc8t250.mjs +0 -9
- package/dist/chunks/index-1.1.36-6mpk59p2.mjs +0 -1
- package/dist/chunks/index-1.1.36-83wpkv8f.mjs +0 -30
- package/dist/chunks/index-1.1.36-8s1fe47p.mjs +0 -9
- package/dist/chunks/index-1.1.36-95xjkxf6.mjs +0 -1
- package/dist/chunks/index-1.1.36-c90kzpg9.mjs +0 -1
- package/dist/chunks/index-1.1.36-ectpcy01.mjs +0 -1
- package/dist/chunks/index-1.1.36-f33wa99v.mjs +0 -1
- package/dist/chunks/index-1.1.36-fgj4arq3.mjs +0 -23
- package/dist/chunks/index-1.1.36-fr144w7s.mjs +0 -1
- package/dist/chunks/index-1.1.36-keejgmvt.mjs +0 -1
- package/dist/chunks/index-1.1.36-knytd0n4.mjs +0 -1
- package/dist/chunks/index-1.1.36-m21fh89b.mjs +0 -1
- package/dist/chunks/index-1.1.36-n3tpswv4.mjs +0 -1
- package/dist/chunks/index-1.1.36-q6468dg7.mjs +0 -1
- package/dist/chunks/index-1.1.36-svzjvq7t.mjs +0 -1
- package/dist/chunks/index-1.1.36-vpaaz84z.mjs +0 -2
- package/dist/chunks/init-1.1.36-16rj95sf.mjs +0 -2
- package/dist/chunks/initReplBridge-1.1.36-xganfz86.mjs +0 -1
- package/dist/chunks/ink-1.1.36-ayvk483m.mjs +0 -1
- package/dist/chunks/insights-1.1.36-0kqbkgbz.mjs +0 -870
- package/dist/chunks/install-1.1.36-3v0b55mh.mjs +0 -1
- package/dist/chunks/install-github-app-1.1.36-6ybyxdq5.mjs +0 -149
- package/dist/chunks/install-slack-app-1.1.36-040ssrxp.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.1.36-2fm0smr3.mjs +0 -1
- package/dist/chunks/latestVersionCache-1.1.36-9fa4kpt8.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.1.36-t9mhqgv5.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.36-vf3yqk6b.mjs +0 -1
- package/dist/chunks/log-1.1.36-zazc6e80.mjs +0 -1
- package/dist/chunks/main-1.1.36-r3b0ysm4.mjs +0 -1
- package/dist/chunks/managedEnv-1.1.36-nksy6dte.mjs +0 -1
- package/dist/chunks/mcp-1.1.36-7fbqeb90.mjs +0 -17
- package/dist/chunks/mcp-1.1.36-d2df02nr.mjs +0 -4
- package/dist/chunks/mcp-1.1.36-dj3ctzg2.mjs +0 -1
- package/dist/chunks/mcpb-1.1.36-7hcc3bm8.mjs +0 -1
- package/dist/chunks/memory-1.1.36-4h4pw21v.mjs +0 -128
- package/dist/chunks/model-1.1.36-3vvdafvs.mjs +0 -1
- package/dist/chunks/model-1.1.36-pvrxzcbd.mjs +0 -2
- package/dist/chunks/node-1.1.36-xhks7s8w.mjs +0 -15
- package/dist/chunks/node-1.1.36-z1nceabc.mjs +0 -1
- package/dist/chunks/oauth-1.1.36-w0jf6x39.mjs +0 -1
- package/dist/chunks/openaiShim-1.1.36-m75hvh8e.mjs +0 -14
- package/dist/chunks/output-style-1.1.36-c0mgemjb.mjs +0 -1
- package/dist/chunks/package-F6O7J2XI-1.1.36-kfm7v15k.mjs +0 -1
- package/dist/chunks/permissions-1.1.36-20jz1yq3.mjs +0 -3
- package/dist/chunks/permissions-1.1.36-mtf6m3pf.mjs +0 -1
- package/dist/chunks/plan-1.1.36-r2k6ysce.mjs +0 -1
- package/dist/chunks/plist-1.1.36-8vg2xrj2.mjs +0 -1
- package/dist/chunks/plugin-1.1.36-xa4j4bj2.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.1.36-7bczq621.mjs +0 -1
- package/dist/chunks/plugins-1.1.36-ck8ycs01.mjs +0 -9
- package/dist/chunks/preActionHook-1.1.36-yt9dm2yh.mjs +0 -2
- package/dist/chunks/print-1.1.36-gcmgxxx7.mjs +0 -57
- package/dist/chunks/process-1.1.36-4kdmcjeq.mjs +0 -1
- package/dist/chunks/processBashCommand-1.1.36-5tbfja2m.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.1.36-db99hjpc.mjs +0 -9
- package/dist/chunks/prompt-1.1.36-7qyxemw6.mjs +0 -1
- package/dist/chunks/prompt-1.1.36-tx374tzn.mjs +0 -1
- package/dist/chunks/prompts-1.1.36-gj1pggdg.mjs +0 -1
- package/dist/chunks/provider-1.1.36-d73knpnr.mjs +0 -2
- package/dist/chunks/providerProfiles-1.1.36-v0p0gdag.mjs +0 -1
- package/dist/chunks/providerValidation-1.1.36-bzznd00d.mjs +0 -6
- package/dist/chunks/registerSubcommands-1.1.36-8s9pb6g7.mjs +0 -26
- package/dist/chunks/registry-1.1.36-4bt4ac4z.mjs +0 -1
- package/dist/chunks/release-notes-1.1.36-zbexvzjp.mjs +0 -5
- package/dist/chunks/reload-plugins-1.1.36-n8nwygb8.mjs +0 -2
- package/dist/chunks/remote-env-1.1.36-fr8j8hcc.mjs +0 -1
- package/dist/chunks/rename-1.1.36-x06agpgx.mjs +0 -1
- package/dist/chunks/replLauncher-1.1.36-2hp08v6r.mjs +0 -1
- package/dist/chunks/resume-1.1.36-1srfb0q2.mjs +0 -2
- package/dist/chunks/rewind-1.1.36-zkycjr7d.mjs +0 -1
- package/dist/chunks/rootOptions-1.1.36-4m9s4acv.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.1.36-jbtcynyc.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.1.36-xrvrh2qp.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.1.36-2yw8m1jq.mjs +0 -1
- package/dist/chunks/session-1.1.36-dxen3cg6.mjs +0 -2
- package/dist/chunks/sessionStorage-1.1.36-dbt045aw.mjs +0 -1
- package/dist/chunks/settings-1.1.36-jb6t4nt2.mjs +0 -1
- package/dist/chunks/setup-1.1.36-7ady6j9j.mjs +0 -12
- package/dist/chunks/sinks-1.1.36-j124tdmn.mjs +0 -1
- package/dist/chunks/skills-1.1.36-wad885e2.mjs +0 -1
- package/dist/chunks/startupProfiler-1.1.36-0xnygcy5.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.1.36-6mvjw2sk.mjs +0 -1
- package/dist/chunks/state-1.1.36-mwqgyp6n.mjs +0 -1
- package/dist/chunks/stats-1.1.36-yzk5t8nc.mjs +0 -1
- package/dist/chunks/status-1.1.36-8b177p6e.mjs +0 -1
- package/dist/chunks/stickers-1.1.36-kdxt4s8f.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.1.36-g1a43154.mjs +0 -1
- package/dist/chunks/tasks-1.1.36-cnmsc211.mjs +0 -1
- package/dist/chunks/teamHelpers-1.1.36-1pwk4n3y.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.1.36-2stc51nw.mjs +0 -1
- package/dist/chunks/teleport-1.1.36-tdvpgdhd.mjs +0 -1
- package/dist/chunks/terminalSetup-1.1.36-agbzd4wd.mjs +0 -1
- package/dist/chunks/theme-1.1.36-2w481ds6.mjs +0 -1
- package/dist/chunks/toolPool-1.1.36-hdw9b8ht.mjs +0 -1
- package/dist/chunks/toolSearch-1.1.36-ccs29nek.mjs +0 -1
- package/dist/chunks/tools-1.1.36-zqsjpqnk.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.1.36-pwcp7479.mjs +0 -69
- package/dist/chunks/types-1.1.36-bwfasf0g.mjs +0 -1
- package/dist/chunks/update-1.1.36-hzk0xj2g.mjs +0 -72
- package/dist/chunks/upload-1.1.36-mb3a5t01.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.1.36-x1y5p82n.mjs +0 -14
- package/dist/chunks/usage-1.1.36-qzytaj6z.mjs +0 -1
- package/dist/chunks/util-1.1.36-kb0yef79.mjs +0 -1
- package/dist/chunks/utils-1.1.36-fm3eywyj.mjs +0 -1
- package/dist/chunks/vim-1.1.36-x7adhmdd.mjs +0 -1
- package/dist/chunks/watchLoop-1.1.36-4s334wzz.mjs +0 -13
- package/dist/chunks/wiki-1.1.36-dn9csm8a.mjs +0 -132
- package/dist/chunks/workflows-1.1.36-v5b9khnt.mjs +0 -1
- package/dist/chunks/worktree-1.1.36-cesdwabt.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.1.36-m20cdekt.mjs +0 -1
- package/dist/chunks/wrapper-1.1.36-1m0td68t.mjs +0 -7
- /package/dist/chunks/{cli-1.1.36-7v42aqn9.mjs → cli-1.1.38-0sbej1sm.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.36-6kq395h8.mjs → cli-1.1.38-fckt5c5p.mjs} +0 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import{Cga as NB,yga as Y6}from"./cli-1.1.38-qv0rqvhj.mjs";import{Kga as Yq,Lga as Z6,Mga as YN}from"./cli-1.1.38-6g33twaj.mjs";import{$ga as Hw,Cha as K,Dha as g0,Eha as I,Fha as X2,Wga as AX,dha as WB}from"./cli-1.1.38-h0643t2a.mjs";import{Iha as t,Kha as K1,Uha as zz,nia as jE}from"./cli-1.1.38-fr1kxnk2.mjs";import{oia as fU,wia as OL,xia as gU}from"./cli-1.1.38-z02gnn41.mjs";import{$ia as I7,Aia as Z4,Aja as E0,Cia as pU,Dia as Zq,Eia as wO,Fia as JW,Gia as ok,Hia as J$,Iia as tz,Jia as FW,Kia as UO,Lia as J5,Mia as DW,Nia as kW,Oia as _O,Pia as OW,Qia as RO,Ria as zW,Sia as XO,Tia as B$,Uia as $_,Via as NW,Wia as MO,Xia as xW,Yia as FO,aja as m,bja as q0,cja as xq,dja as yL,fja as L0,gja as T1,jja as N,nja as z0,xja as P}from"./cli-1.1.38-yfhvhcvt.mjs";import{Rja as l7,Wja as Lz,Yja as B0,Zja as l2,aka as XG,cka as n1}from"./cli-1.1.38-mh6a6g83.mjs";import{fka as Z0,ika as r,jka as j4,kka as G6,qka as P0}from"./cli-1.1.38-nzbcas3j.mjs";import{$la as WW,Bpa as N1,Coa as gB,Gla as Q5,Hla as GW,Hoa as Vz,Ila as eX,Jla as BO,Joa as Bz,Kla as IW,Lla as LO,Lna as vB,Mla as d4,Mna as yB,Nla as q$,Nna as CB,Ona as SB,Pna as bB,Qna as hB,Rna as F4,Sla as wW,Sna as fB,Tla as zO,Vna as QV,Wna as sB,_la as $5,cla as x1,cpa as eG,dla as N4,kla as vW,lla as AO,mma as W$,moa as Pq,nma as q_,ooa as Eq,qma as c4,rma as Q$,sma as $$,tma as rz,uma as K$,vma as Z_,wla as tX,wma as Y5,woa as KV,xla as VO,xma as dW,xna as fG,yma as V$,zma as Q_}from"./cli-1.1.38-44ay6q12.mjs";import{$pa as A1,Cpa as q5,Dpa as $W,Mpa as LW,Npa as ZO,Opa as r0,Ppa as p4,Qpa as jW,Rpa as WO,_pa as c}from"./cli-1.1.38-n9xftqbp.mjs";import{Lqa as kE,Mqa as E4,Nqa as d,Oqa as Jq,Pqa as B,Qqa as $0,Rqa as W2,Sqa as V2}from"./cli-1.1.38-y66mw08s.mjs";var zQ=d((SE,LQ)=>{LQ.exports=BQ;BQ.sync=Dz;var WQ=$0("fs");function Fz(Z,X){var q=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!q)return!0;if(q=q.split(";"),q.indexOf("")!==-1)return!0;for(var Q=0;Q<q.length;Q++){var $=q[Q].toLowerCase();if($&&Z.substr(-$.length).toLowerCase()===$)return!0}return!1}function VQ(Z,X,q){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return Fz(X,q)}function BQ(Z,X,q){WQ.stat(Z,function(Q,$){q(Q,Q?!1:VQ($,Z,X))})}function Dz(Z,X){return VQ(WQ.statSync(Z),Z,X)}});var DQ=d((bE,FQ)=>{FQ.exports=RQ;RQ.sync=Az;var _Q=$0("fs");function RQ(Z,X,q){_Q.stat(Z,function(Q,$){q(Q,Q?!1:MQ($,X))})}function Az(Z,X){return MQ(_Q.statSync(Z),X)}function MQ(Z,X){return Z.isFile()&&Tz(Z,X)}function Tz(Z,X){var{mode:q,uid:Q,gid:$}=Z,J=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),U=parseInt("010",8),G=parseInt("001",8),W=H|U,V=q&G||q&U&&$===Y||q&H&&Q===J||q&W&&J===0;return V}});var TQ=d((fE,AQ)=>{var hE=$0("fs"),u4;if(process.platform==="win32"||global.TESTING_WINDOWS)u4=zQ();else u4=DQ();AQ.exports=d5;d5.sync=jz;function d5(Z,X,q){if(typeof X==="function")q=X,X={};if(!q){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Q,$){d5(Z,X||{},function(J,Y){if(J)$(J);else Q(Y)})})}u4(Z,X||{},function(Q,$){if(Q){if(Q.code==="EACCES"||X&&X.ignoreErrors)Q=null,$=!1}q(Q,$)})}function jz(Z,X){try{return u4.sync(Z,X||{})}catch(q){if(X&&X.ignoreErrors||q.code==="EACCES")return!1;else throw q}}});var xQ=d((gE,NQ)=>{var H2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",jQ=$0("path"),Iz=H2?";":":",IQ=TQ(),wQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),kQ=(Z,X)=>{let q=X.colon||Iz,Q=Z.match(/\//)||H2&&Z.match(/\\/)?[""]:[...H2?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(q)],$=H2?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",J=H2?$.split(q):[""];if(H2){if(Z.indexOf(".")!==-1&&J[0]!=="")J.unshift("")}return{pathEnv:Q,pathExt:J,pathExtExe:$}},OQ=(Z,X,q)=>{if(typeof X==="function")q=X,X={};if(!X)X={};let{pathEnv:Q,pathExt:$,pathExtExe:J}=kQ(Z,X),Y=[],H=(G)=>new Promise((W,V)=>{if(G===Q.length)return X.all&&Y.length?W(Y):V(wQ(Z));let L=Q[G],z=/^".*"$/.test(L)?L.slice(1,-1):L,_=jQ.join(z,Z),R=!z&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+_:_;W(U(R,G,0))}),U=(G,W,V)=>new Promise((L,z)=>{if(V===$.length)return L(H(W+1));let _=$[V];IQ(G+_,{pathExt:J},(R,M)=>{if(!R&&M)if(X.all)Y.push(G+_);else return L(G+_);return L(U(G,W,V+1))})});return q?H(0).then((G)=>q(null,G),q):H(0)},wz=(Z,X)=>{X=X||{};let{pathEnv:q,pathExt:Q,pathExtExe:$}=kQ(Z,X),J=[];for(let Y=0;Y<q.length;Y++){let H=q[Y],U=/^".*"$/.test(H)?H.slice(1,-1):H,G=jQ.join(U,Z),W=!U&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+G:G;for(let V=0;V<Q.length;V++){let L=W+Q[V];try{if(IQ.sync(L,{pathExt:$}))if(X.all)J.push(L);else return L}catch(z){}}}if(X.all&&J.length)return J;if(X.nothrow)return null;throw wQ(Z)};NQ.exports=OQ;OQ.sync=wz});var EQ=d((mE,c5)=>{var PQ=(Z={})=>{let X=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"};c5.exports=PQ;c5.exports.default=PQ});var SQ=d((uE,CQ)=>{var vQ=$0("path"),kz=xQ(),Oz=EQ();function yQ(Z,X){let q=Z.options.env||process.env,Q=process.cwd(),$=Z.options.cwd!=null,J=$&&process.chdir!==void 0&&!process.chdir.disabled;if(J)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=kz.sync(Z.command,{path:q[Oz({env:q})],pathExt:X?vQ.delimiter:void 0})}catch(H){}finally{if(J)process.chdir(Q)}if(Y)Y=vQ.resolve($?Z.options.cwd:"",Y);return Y}function Nz(Z){return yQ(Z)||yQ(Z,!0)}CQ.exports=Nz});var bQ=d((Ez,n5)=>{var l5=/([()\][%!^"`<>&|;, *?])/g;function xz(Z){return Z=Z.replace(l5,"^$1"),Z}function Pz(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(l5,"^$1"),X)Z=Z.replace(l5,"^$1");return Z}Ez.command=xz;Ez.argument=Pz});var fQ=d((pE,hQ)=>{hQ.exports=/^#!(.*)/});var mQ=d((dE,gQ)=>{var Cz=fQ();gQ.exports=(Z="")=>{let X=Z.match(Cz);if(!X)return null;let[q,Q]=X[0].replace(/#! ?/,"").split(" "),$=q.split("/").pop();if($==="env")return Q;return Q?`${$} ${Q}`:$}});var pQ=d((cE,uQ)=>{var i5=$0("fs"),Sz=mQ();function bz(Z){let q=Buffer.alloc(150),Q;try{Q=i5.openSync(Z,"r"),i5.readSync(Q,q,0,150,0),i5.closeSync(Q)}catch($){}return Sz(q.toString())}uQ.exports=bz});var nQ=d((lE,lQ)=>{var hz=$0("path"),dQ=SQ(),cQ=bQ(),fz=pQ(),gz=process.platform==="win32",mz=/\.(?:com|exe)$/i,uz=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function pz(Z){Z.file=dQ(Z);let X=Z.file&&fz(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,dQ(Z);return Z.file}function dz(Z){if(!gz)return Z;let X=pz(Z),q=!mz.test(X);if(Z.options.forceShell||q){let Q=uz.test(X);Z.command=hz.normalize(Z.command),Z.command=cQ.command(Z.command),Z.args=Z.args.map((J)=>cQ.argument(J,Q));let $=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${$}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function cz(Z,X,q){if(X&&!Array.isArray(X))q=X,X=null;X=X?X.slice(0):[],q=Object.assign({},q);let Q={command:Z,args:X,options:q,file:void 0,original:{command:Z,args:X}};return q.shell?Q:dz(Q)}lQ.exports=cz});var oQ=d((nE,aQ)=>{var a5=process.platform==="win32";function o5(Z,X){return Object.assign(Error(`${X} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${X} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function lz(Z,X){if(!a5)return;let q=Z.emit;Z.emit=function(Q,$){if(Q==="exit"){let J=iQ($,X);if(J)return q.call(Z,"error",J)}return q.apply(Z,arguments)}}function iQ(Z,X){if(a5&&Z===1&&!X.file)return o5(X.original,"spawn");return null}function nz(Z,X){if(a5&&Z===1&&!X.file)return o5(X.original,"spawnSync");return null}aQ.exports={hookChildProcess:lz,verifyENOENT:iQ,verifyENOENTSync:nz,notFoundError:o5}});var tQ=d((iE,K2)=>{var sQ=$0("child_process"),s5=nQ(),r5=oQ();function rQ(Z,X,q){let Q=s5(Z,X,q),$=sQ.spawn(Q.command,Q.args,Q.options);return r5.hookChildProcess($,Q),$}function iz(Z,X,q){let Q=s5(Z,X,q),$=sQ.spawnSync(Q.command,Q.args,Q.options);return $.error=$.error||r5.verifyENOENTSync($.status,Q),$}K2.exports=rQ;K2.exports.spawn=rQ;K2.exports.sync=iz;K2.exports._parse=s5;K2.exports._enoent=r5});var az;var eQ=B(()=>{az=["off","compact","full"]});function w0(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!1,workflowsDefaultBackground:!1}}function oz(Z){return Z$.includes(Z)}function sz(Z){return X$.includes(Z)}var E1,v1,Z$,X$;var V6=B(()=>{E1={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1};v1=w0(),Z$=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","copyFullResponse","copyOnSelect","flickerFreeMode","renderFrameRate","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","bashOutputFilterCapEnabled","autoBackgroundAgentsEnabled","repeatedFailureHintEnabled","workflowsDefaultBackground","oauthBrowser","inlineImagesMode"];X$=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"]});function ez(Z,X,q,Q){if(!r0(Z))return Z;X=c4(X,Z);var $=-1,J=X.length,Y=J-1,H=Z;while(H!=null&&++$<J){var U=$$(X[$]),G=q;if(U==="__proto__"||U==="constructor"||U==="prototype")return Z;if($!=Y){var W=H[U];if(G=Q?Q(W,U,H):void 0,G===void 0)G=r0(W)?W:d4(X[$+1])?[]:{}}J$(H,U,G),H=H[U]}return Z}var Y$;var H$=B(()=>{tz();Q$();q$();p4();rz();Y$=ez});function X_(Z,X,q){var Q=-1,$=X.length,J={};while(++Q<$){var Y=X[Q],H=K$(Z,Y);if(q(H,Y))Y$(J,c4(Y,Z),H)}return J}var U$;var G$=B(()=>{Z_();H$();Q$();U$=X_});function J_(Z,X){if(Z==null)return{};var q=W$(B$(Z),function(Q){return[Q]});return X=V$(X),U$(Z,q,function(Q,$){return X(Q,$[0])})}var t5;var L$=B(()=>{q_();Q_();G$();$_();t5=J_});function L6(Z,X=!1){let q=Z.length,Q=0,$="",J=0,Y=16,H=0,U=0,G=0,W=0,V=0;function L(D,w){let T=0,j=0;while(T<D||!w){let A=Z.charCodeAt(Q);if(A>=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;Q++,T++}if(T<D)j=-1;return j}function z(D){Q=D,$="",J=0,Y=16,V=0}function _(){let D=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&U2(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&U2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&U2(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(D,Q);let w=Q;if(Q<Z.length&&(Z.charCodeAt(Q)===69||Z.charCodeAt(Q)===101)){if(Q++,Q<Z.length&&Z.charCodeAt(Q)===43||Z.charCodeAt(Q)===45)Q++;if(Q<Z.length&&U2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&U2(Z.charCodeAt(Q)))Q++;w=Q}else V=3}return Z.substring(D,w)}function R(){let D="",w=Q;while(!0){if(Q>=q){D+=Z.substring(w,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){D+=Z.substring(w,Q),Q++;break}if(T===92){if(D+=Z.substring(w,Q),Q++,Q>=q){V=2;break}switch(Z.charCodeAt(Q++)){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=`
|
|
2
|
+
`;break;case 114:D+="\r";break;case 116:D+="\t";break;case 117:let A=L(4,!0);if(A>=0)D+=String.fromCharCode(A);else V=4;break;default:V=5}w=Q;continue}if(T>=0&&T<=31)if(B6(T)){D+=Z.substring(w,Q),V=2;break}else V=6;Q++}return D}function M(){if($="",V=0,J=Q,U=H,W=G,Q>=q)return J=q,Y=17;let D=Z.charCodeAt(Q);if(e5(D)){do Q++,$+=String.fromCharCode(D),D=Z.charCodeAt(Q);while(e5(D));return Y=15}if(B6(D)){if(Q++,$+=String.fromCharCode(D),D===13&&Z.charCodeAt(Q)===10)Q++,$+=`
|
|
3
|
+
`;return H++,G=Q,Y=14}switch(D){case 123:return Q++,Y=1;case 125:return Q++,Y=2;case 91:return Q++,Y=3;case 93:return Q++,Y=4;case 58:return Q++,Y=6;case 44:return Q++,Y=5;case 34:return Q++,$=R(),Y=10;case 47:let w=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<q){if(B6(Z.charCodeAt(Q)))break;Q++}return $=Z.substring(w,Q),Y=12}if(Z.charCodeAt(Q+1)===42){Q+=2;let T=q-1,j=!1;while(Q<T){let A=Z.charCodeAt(Q);if(A===42&&Z.charCodeAt(Q+1)===47){Q+=2,j=!0;break}if(Q++,B6(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,G=Q}}if(!j)Q++,V=1;return $=Z.substring(w,Q),Y=13}return $+=String.fromCharCode(D),Q++,Y=16;case 45:if($+=String.fromCharCode(D),Q++,Q===q||!U2(Z.charCodeAt(Q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return $+=_(),Y=11;default:while(Q<q&&F(D))Q++,D=Z.charCodeAt(Q);if(J!==Q){switch($=Z.substring(J,Q),$){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return $+=String.fromCharCode(D),Q++,Y=16}}function F(D){if(e5(D)||B6(D))return!1;switch(D){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function O(){let D;do D=M();while(D>=12&&D<=15);return D}return{setPosition:z,getPosition:()=>Q,scan:X?O:M,getToken:()=>Y,getTokenValue:()=>$,getTokenOffset:()=>J,getTokenLength:()=>Q-J,getTokenStartLine:()=>U,getTokenStartCharacter:()=>J-W,getTokenError:()=>V}}function e5(Z){return Z===32||Z===9}function B6(Z){return Z===10||Z===13}function U2(Z){return Z>=48&&Z<=57}var z$;var l4=B(()=>{(function(Z){Z[Z.lineFeed=10]="lineFeed",Z[Z.carriageReturn=13]="carriageReturn",Z[Z.space=32]="space",Z[Z._0=48]="_0",Z[Z._1=49]="_1",Z[Z._2=50]="_2",Z[Z._3=51]="_3",Z[Z._4=52]="_4",Z[Z._5=53]="_5",Z[Z._6=54]="_6",Z[Z._7=55]="_7",Z[Z._8=56]="_8",Z[Z._9=57]="_9",Z[Z.a=97]="a",Z[Z.b=98]="b",Z[Z.c=99]="c",Z[Z.d=100]="d",Z[Z.e=101]="e",Z[Z.f=102]="f",Z[Z.g=103]="g",Z[Z.h=104]="h",Z[Z.i=105]="i",Z[Z.j=106]="j",Z[Z.k=107]="k",Z[Z.l=108]="l",Z[Z.m=109]="m",Z[Z.n=110]="n",Z[Z.o=111]="o",Z[Z.p=112]="p",Z[Z.q=113]="q",Z[Z.r=114]="r",Z[Z.s=115]="s",Z[Z.t=116]="t",Z[Z.u=117]="u",Z[Z.v=118]="v",Z[Z.w=119]="w",Z[Z.x=120]="x",Z[Z.y=121]="y",Z[Z.z=122]="z",Z[Z.A=65]="A",Z[Z.B=66]="B",Z[Z.C=67]="C",Z[Z.D=68]="D",Z[Z.E=69]="E",Z[Z.F=70]="F",Z[Z.G=71]="G",Z[Z.H=72]="H",Z[Z.I=73]="I",Z[Z.J=74]="J",Z[Z.K=75]="K",Z[Z.L=76]="L",Z[Z.M=77]="M",Z[Z.N=78]="N",Z[Z.O=79]="O",Z[Z.P=80]="P",Z[Z.Q=81]="Q",Z[Z.R=82]="R",Z[Z.S=83]="S",Z[Z.T=84]="T",Z[Z.U=85]="U",Z[Z.V=86]="V",Z[Z.W=87]="W",Z[Z.X=88]="X",Z[Z.Y=89]="Y",Z[Z.Z=90]="Z",Z[Z.asterisk=42]="asterisk",Z[Z.backslash=92]="backslash",Z[Z.closeBrace=125]="closeBrace",Z[Z.closeBracket=93]="closeBracket",Z[Z.colon=58]="colon",Z[Z.comma=44]="comma",Z[Z.dot=46]="dot",Z[Z.doubleQuote=34]="doubleQuote",Z[Z.minus=45]="minus",Z[Z.openBrace=123]="openBrace",Z[Z.openBracket=91]="openBracket",Z[Z.plus=43]="plus",Z[Z.slash=47]="slash",Z[Z.formFeed=12]="formFeed",Z[Z.tab=9]="tab"})(z$||(z$={}))});var R0,Z3,_$;var R$=B(()=>{R0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),Z3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
4
|
+
`+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
|
|
5
|
+
`+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
|
|
6
|
+
`+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
|
|
7
|
+
`+"\t".repeat(X)})}},_$=[`
|
|
8
|
+
`,"\r",`\r
|
|
9
|
+
`]});function X3(Z,X,q){let Q,$,J,Y,H;if(X){Y=X.offset,H=Y+X.length,J=Y;while(J>0&&!z6(Z,J-1))J--;let T=H;while(T<Z.length&&!z6(Z,T))T++;$=Z.substring(J,T),Q=H_($,q)}else $=Z,Q=0,J=0,Y=0,H=Z.length;let U=K_(q,Z),G=_$.includes(U),W=0,V=0,L;if(q.insertSpaces)L=R0[q.tabSize||4]??G2(R0[1],q.tabSize||4);else L="\t";let z=L==="\t"?"\t":" ",_=L6($,!1),R=!1;function M(){if(W>1)return G2(U,W)+G2(L,Q+V);let T=L.length*(Q+V);if(!G||T>Z3[z][U].length)return U+G2(L,Q+V);if(T<=0)return U;return Z3[z][U][T]}function F(){let T=_.scan();W=0;while(T===15||T===14){if(T===14&&q.keepLines)W+=1;else if(T===14)W=1;T=_.scan()}return R=T===16||_.getTokenError()!==0,T}let O=[];function D(T,j,A){if(!R&&(!X||j<H&&A>Y)&&Z.substring(j,A)!==T)O.push({offset:j,length:A-j,content:T})}let w=F();if(q.keepLines&&W>0)D(G2(U,W),0,0);if(w!==17){let T=_.getTokenOffset()+J,j=L.length*Q<20&&q.insertSpaces?R0[L.length*Q]:G2(L,Q);D(j,J,T)}while(w!==17){let T=_.getTokenOffset()+_.getTokenLength()+J,j=F(),A="",S=!1;while(W===0&&(j===12||j===13)){let x=_.getTokenOffset()+J;D(R0[1],T,x),T=_.getTokenOffset()+_.getTokenLength()+J,S=j===12,A=S?M():"",j=F()}if(j===2){if(w!==1)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==1)A=M();else if(q.keepLines)A=R0[1]}else if(j===4){if(w!==3)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==3)A=M();else if(q.keepLines)A=R0[1]}else{switch(w){case 3:case 1:if(V++,q.keepLines&&W>0||!q.keepLines)A=M();else A=R0[1];break;case 5:if(q.keepLines&&W>0||!q.keepLines)A=M();else A=R0[1];break;case 12:A=M();break;case 13:if(W>0)A=M();else if(!S)A=R0[1];break;case 6:if(q.keepLines&&W>0)A=M();else if(!S)A=R0[1];break;case 10:if(q.keepLines&&W>0)A=M();else if(j===6&&!S)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(q.keepLines&&W>0)A=M();else if((j===12||j===13)&&!S)A=R0[1];else if(j!==5&&j!==17)R=!0;break;case 16:R=!0;break}if(W>0&&(j===12||j===13))A=M()}if(j===17)if(q.keepLines&&W>0)A=M();else A=q.insertFinalNewline?U:"";let k=_.getTokenOffset()+J;D(A,T,k),w=j}return O}function G2(Z,X){let q="";for(let Q=0;Q<X;Q++)q+=Z;return q}function H_(Z,X){let q=0,Q=0,$=X.tabSize||4;while(q<Z.length){let J=Z.charAt(q);if(J===R0[1])Q++;else if(J==="\t")Q+=$;else break;q++}return Math.floor(Q/$)}function K_(Z,X){for(let q=0;q<X.length;q++){let Q=X.charAt(q);if(Q==="\r"){if(q+1<X.length&&X.charAt(q+1)===`
|
|
10
|
+
`)return`\r
|
|
11
|
+
`;return"\r"}else if(Q===`
|
|
12
|
+
`)return`
|
|
13
|
+
`}return Z&&Z.eol||`
|
|
14
|
+
`}function z6(Z,X){return`\r
|
|
15
|
+
`.indexOf(Z.charAt(X))!==-1}var q3=B(()=>{l4();R$()});function M$(Z,X=[],q=_6.DEFAULT){let Q=null,$=[],J=[];function Y(U){if(Array.isArray($))$.push(U);else if(Q!==null)$[Q]=U}return $3(Z,{onObjectBegin:()=>{let U={};Y(U),J.push($),$=U,Q=null},onObjectProperty:(U)=>{Q=U},onObjectEnd:()=>{$=J.pop()},onArrayBegin:()=>{let U=[];Y(U),J.push($),$=U,Q=null},onArrayEnd:()=>{$=J.pop()},onLiteralValue:Y,onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q),$[0]}function Q3(Z,X=[],q=_6.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function $(U){if(Q.type==="property")Q.length=U-Q.offset,Q=Q.parent}function J(U){return Q.children.push(U),U}$3(Z,{onObjectBegin:(U)=>{Q=J({type:"object",offset:U,length:-1,parent:Q,children:[]})},onObjectProperty:(U,G,W)=>{Q=J({type:"property",offset:G,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:U,offset:G,length:W,parent:Q})},onObjectEnd:(U,G)=>{$(U+G),Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onArrayBegin:(U,G)=>{Q=J({type:"array",offset:U,length:-1,parent:Q,children:[]})},onArrayEnd:(U,G)=>{Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onLiteralValue:(U,G,W)=>{J({type:G_(U),offset:G,length:W,parent:Q,value:U}),$(G+W)},onSeparator:(U,G,W)=>{if(Q.type==="property"){if(U===":")Q.colonOffset=G;else if(U===",")$(G)}},onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q);let H=Q.children[0];if(H)delete H.parent;return H}function n4(Z,X){if(!Z)return;let q=Z;for(let Q of X)if(typeof Q==="string"){if(q.type!=="object"||!Array.isArray(q.children))return;let $=!1;for(let J of q.children)if(Array.isArray(J.children)&&J.children[0].value===Q&&J.children.length===2){q=J.children[1],$=!0;break}if(!$)return}else{let $=Q;if(q.type!=="array"||$<0||!Array.isArray(q.children)||$>=q.children.length)return;q=q.children[$]}return q}function $3(Z,X,q=_6.DEFAULT){let Q=L6(Z,!1),$=[],J=0;function Y(v){return v?()=>J===0&&v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function U(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice()):()=>!0}function G(v){return v?()=>{if(J>0)J++;else if(v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice())===!1)J=1}:()=>!0}function W(v){return v?()=>{if(J>0)J--;if(J===0)v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=G(X.onObjectBegin),L=U(X.onObjectProperty),z=W(X.onObjectEnd),_=G(X.onArrayBegin),R=W(X.onArrayEnd),M=U(X.onLiteralValue),F=H(X.onSeparator),O=Y(X.onComment),D=H(X.onError),w=q&&q.disallowComments,T=q&&q.allowTrailingComma;function j(){while(!0){let v=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!w)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(v){case 12:case 13:if(w)A(10);else O();break;case 16:A(1);break;case 15:case 14:break;default:return v}}}function A(v,y=[],p=[]){if(D(v),y.length+p.length>0){let f=Q.getToken();while(f!==17){if(y.indexOf(f)!==-1){j();break}else if(p.indexOf(f)!==-1)break;f=j()}}}function S(v){let y=Q.getTokenValue();if(v)M(y);else L(y),$.push(y);return j(),!0}function k(){switch(Q.getToken()){case 11:let v=Q.getTokenValue(),y=Number(v);if(isNaN(y))A(2),y=0;M(y);break;case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return j(),!0}function x(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(S(!1),Q.getToken()===6){if(F(":"),j(),!i())A(4,[],[2,5])}else A(5,[],[2,5]);return $.pop(),!0}function E(){V(),j();let v=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!v)A(4,[],[]);if(F(","),j(),Q.getToken()===2&&T)break}else if(v)A(6,[],[]);if(!x())A(4,[],[2,5]);v=!0}if(z(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function h(){_(),j();let v=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(F(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(v)$.push(0),v=!1;else $[$.length-1]++;if(!i())A(4,[],[4,5]);y=!0}if(R(),!v)$.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function i(){switch(Q.getToken()){case 3:return h();case 1:return E();case 10:return S(!0);default:return k()}}if(j(),Q.getToken()===17){if(q.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!i())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function G_(Z){switch(typeof Z){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!Z)return"null";else if(Array.isArray(Z))return"array";return"object"}default:return"null"}}var _6;var J3=B(()=>{l4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(_6||(_6={}))});function F$(Z,X,q,Q){let $=X.slice(),Y=Q3(Z,[]),H=void 0,U=void 0;while($.length>0)if(U=$.pop(),H=n4(Y,$),H===void 0&&q!==void 0)if(typeof U==="string")q={[U]:q};else q=[q];else break;if(!H){if(q===void 0)throw Error("Can not delete in empty document");return y1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(q)},Q)}else if(H.type==="object"&&typeof U==="string"&&Array.isArray(H.children)){let G=n4(H,[U]);if(G!==void 0)if(q===void 0){if(!G.parent)throw Error("Malformed AST");let W=H.children.indexOf(G.parent),V,L=G.parent.offset+G.parent.length;if(W>0){let z=H.children[W-1];V=z.offset+z.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return y1(Z,{offset:V,length:L-V,content:""},Q)}else return y1(Z,{offset:G.offset,length:G.length,content:JSON.stringify(q)},Q);else{if(q===void 0)return[];let W=`${JSON.stringify(U)}: ${JSON.stringify(q)}`,V=Q.getInsertionIndex?Q.getInsertionIndex(H.children.map((z)=>z.children[0].value)):H.children.length,L;if(V>0){let z=H.children[V-1];L={offset:z.offset+z.length,length:0,content:","+W}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:W};else L={offset:H.offset+1,length:0,content:W+","};return y1(Z,L,Q)}}else if(H.type==="array"&&typeof U==="number"&&Array.isArray(H.children)){let G=U;if(G===-1){let W=`${JSON.stringify(q)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:W};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+W}}return y1(Z,V,Q)}else if(q===void 0&&H.children.length>=0){let W=U,V=H.children[W],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===W){let z=H.children[W-1],_=z.offset+z.length,R=H.offset+H.length;L={offset:_,length:R-2-_,content:""}}else L={offset:V.offset,length:H.children[W+1].offset-V.offset,content:""};return y1(Z,L,Q)}else if(q!==void 0){let W,V=`${JSON.stringify(q)}`;if(!Q.isArrayInsertion&&H.children.length>U){let L=H.children[U];W={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||U===0)W={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=U>H.children.length?H.children.length:U,z=H.children[L-1];W={offset:z.offset+z.length,length:0,content:","+V}}return y1(Z,W,Q)}else throw Error(`Can not ${q===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${G} as length is not sufficient`)}else throw Error(`Can not add ${typeof U!=="number"?"index":"property"} to parent of type ${H.type}`)}function y1(Z,X,q){if(!q.formattingOptions)return[X];let Q=i4(Z,X),$=X.offset,J=X.offset+X.content.length;if(X.length===0||X.content.length===0){while($>0&&!z6(Q,$-1))$--;while(J<Q.length&&!z6(Q,J))J++}let Y=X3(Q,{offset:$,length:J-$},{...q.formattingOptions,keepLines:!1});for(let U=Y.length-1;U>=0;U--){let G=Y[U];Q=i4(Q,G),$=Math.min($,G.offset),J=Math.max(J,G.offset+G.length),J+=G.content.length-G.length}let H=Z.length-(Q.length-J)-$;return[{offset:$,length:H,content:Q.substring($,J)}]}function i4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var D$=B(()=>{q3();J3()});function I$(Z,X,q,Q){return F$(Z,X,q,Q)}function w$(Z,X){let q=X.slice(0).sort(($,J)=>{let Y=$.offset-J.offset;if(Y===0)return $.length-J.length;return Y}),Q=Z.length;for(let $=q.length-1;$>=0;$--){let J=q[$];if(J.offset+J.length<=Q)Z=i4(Z,J);else throw Error("Overlapping edit");Q=J.offset}return Z}var A$,T$,Y3,j$;var k$=B(()=>{q3();D$();l4();J3();(function(Z){Z[Z.None=0]="None",Z[Z.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=2]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=4]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=6]="InvalidCharacter"})(A$||(A$={}));(function(Z){Z[Z.OpenBraceToken=1]="OpenBraceToken",Z[Z.CloseBraceToken=2]="CloseBraceToken",Z[Z.OpenBracketToken=3]="OpenBracketToken",Z[Z.CloseBracketToken=4]="CloseBracketToken",Z[Z.CommaToken=5]="CommaToken",Z[Z.ColonToken=6]="ColonToken",Z[Z.NullKeyword=7]="NullKeyword",Z[Z.TrueKeyword=8]="TrueKeyword",Z[Z.FalseKeyword=9]="FalseKeyword",Z[Z.StringLiteral=10]="StringLiteral",Z[Z.NumericLiteral=11]="NumericLiteral",Z[Z.LineCommentTrivia=12]="LineCommentTrivia",Z[Z.BlockCommentTrivia=13]="BlockCommentTrivia",Z[Z.LineBreakTrivia=14]="LineBreakTrivia",Z[Z.Trivia=15]="Trivia",Z[Z.Unknown=16]="Unknown",Z[Z.EOF=17]="EOF"})(T$||(T$={}));Y3=M$;(function(Z){Z[Z.InvalidSymbol=1]="InvalidSymbol",Z[Z.InvalidNumberFormat=2]="InvalidNumberFormat",Z[Z.PropertyNameExpected=3]="PropertyNameExpected",Z[Z.ValueExpected=4]="ValueExpected",Z[Z.ColonExpected=5]="ColonExpected",Z[Z.CommaExpected=6]="CommaExpected",Z[Z.CloseBraceExpected=7]="CloseBraceExpected",Z[Z.CloseBracketExpected=8]="CloseBracketExpected",Z[Z.EndOfFileExpected=9]="EndOfFileExpected",Z[Z.InvalidCommentToken=10]="InvalidCommentToken",Z[Z.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=12]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=14]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=16]="InvalidCharacter"})(j$||(j$={}))});function M0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var R6=()=>{};import{tracingChannel as B_,channel as L_}from"node:diagnostics_channel";var K0,M6,z_,H3=()=>K0.hasSubscribers||M6.hasSubscribers,N$,O$,__=(Z,X,q,Q)=>{typeof O$.emitWarning=="function"?O$.emitWarning(Z,X,q,Q):console.error(`[${q}] ${X}: ${Z}`)},R_=(Z)=>!N$.has(Z),L1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),x$=(Z)=>L1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?a4:null:null,a4,M_=class Z{heap;length;static#q=!1;static create(X){let q=x$(X);if(!q)return[];Z.#q=!0;let Q=new Z(X,q);return Z.#q=!1,Q}constructor(X,q){if(!Z.#q)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new q(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},P$;var E$=B(()=>{K0=L_("lru-cache:metrics"),M6=B_("lru-cache"),z_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,N$=new Set,O$=typeof process=="object"&&process?process:{},a4=class extends Array{constructor(Z){super(Z),this.fill(0)}},P$=class Z{#q;#Q;#X;#Y;#K;#V;#A;#_;get perf(){return this.#_}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#U;#J;#Z;#L;#R;#B;#G;#j;#W;#I;#w;#M;#F;#k;#h;#z;#v;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#I,keyMap:X.#U,keyList:X.#J,valList:X.#Z,next:X.#L,prev:X.#R,get head(){return X.#B},get tail(){return X.#G},free:X.#j,isBackgroundFetch:(q)=>X.#$(q),backgroundFetch:(q,Q,$,J)=>X.#m(q,Q,$,J),moveToTail:(q)=>X.#b(q),indexes:(q)=>X.#O(q),rindexes:(q)=>X.#N(q),isStale:(q)=>X.#D(q)}}get max(){return this.#q}get maxSize(){return this.#Q}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#K}constructor(X){let{max:q=0,ttl:Q,ttlResolution:$=1,ttlAutopurge:J,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:U,dispose:G,onInsert:W,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:z,maxSize:_=0,maxEntrySize:R=0,sizeCalculation:M,fetchMethod:F,memoMethod:O,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:S=1,perf:k}=X;if(this.backgroundFetchSize=S,k!==void 0&&typeof k?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#_=k??z_,q!==0&&!L1(q))throw TypeError("max option must be a nonnegative integer");let x=q?x$(q):Array;if(!x)throw Error("invalid max value: "+q);if(this.#q=q,this.#Q=_,this.maxEntrySize=R||this.#Q,this.sizeCalculation=M,this.sizeCalculation){if(!this.#Q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(O!==void 0&&typeof O!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=O,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#h=!!F,this.#U=new Map,this.#J=Array.from({length:q}).fill(void 0),this.#Z=Array.from({length:q}).fill(void 0),this.#L=new x(q),this.#R=new x(q),this.#B=0,this.#G=0,this.#j=M_.create(q),this.#H=0,this.#T=0,typeof G=="function"&&(this.#X=G),typeof W=="function"&&(this.#Y=W),typeof V=="function"?(this.#K=V,this.#W=[]):(this.#K=void 0,this.#W=void 0),this.#k=!!this.#X,this.#v=!!this.#Y,this.#z=!!this.#K,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!z,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!L1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!L1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=L1($)||$===0?$:1,this.ttlAutopurge=!!J,this.ttl=Q||0,this.ttl){if(!L1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#q===0&&this.ttl===0&&this.#Q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#q&&!this.#Q){let E="LRU_CACHE_UNBOUNDED";R_(E)&&(N$.add(E),__("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,Z))}}getRemainingTTL(X){return this.#U.has(X)?1/0:0}#u(){let X=new a4(this.#q),q=new a4(this.#q);this.#M=X,this.#w=q;let Q=this.ttlAutopurge?Array.from({length:this.#q}):void 0;this.#F=Q,this.#p=(U,G,W=this.#_.now())=>{q[U]=G!==0?W:0,X[U]=G,$(U,G)},this.#y=(U)=>{q[U]=X[U]!==0?this.#_.now():0,$(U,X[U])};let $=this.ttlAutopurge?(U,G)=>{if(Q?.[U]&&(clearTimeout(Q[U]),Q[U]=void 0),G&&G!==0&&Q){let W=setTimeout(()=>{this.#D(U)?(this.#x(this.#J[U],"expire"),Q[U]=void 0):$(U,H(U))},G+1);W.unref&&W.unref(),Q[U]=W}}:()=>{};this.#P=(U,G)=>{if(X[G]){let W=X[G],V=q[G];if(!W||!V)return;U.ttl=W,U.start=V,U.now=J||Y();let L=U.now-V;U.remainingTTL=W-L}};let J=0,Y=()=>{let U=this.#_.now();if(this.ttlResolution>0){J=U;let G=setTimeout(()=>J=0,this.ttlResolution);G.unref&&G.unref()}return U};this.getRemainingTTL=(U)=>{let G=this.#U.get(U);return G===void 0?0:H(G)};let H=(U)=>{let G=X[U],W=q[U];if(!G||!W)return 1/0;let V=(J||Y())-W;return G-V};this.#D=(U)=>{let G=q[U],W=X[U];return!!W&&!!G&&(J||Y())-G>W}}#y=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let X=new a4(this.#q);this.#T=0,this.#I=X,this.#C=(q)=>{this.#T-=X[q],X[q]=0},this.#d=(q,Q,$,J)=>{if(!L1($)){if(this.#$(Q))return this.backgroundFetchSize;if(J){if(typeof J!="function")throw TypeError("sizeCalculation must be a function");if($=J(Q,q),!L1($))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return $},this.#f=(q,Q,$)=>{if(X[q]=Q,this.#Q){let J=this.#Q-X[q];for(;this.#T>J;)this.#g(!0)}this.#T+=X[q],$&&($.entrySize=Q,$.totalCalculatedSize=this.#T)}}#C=(X)=>{};#f=(X,q,Q)=>{};#d=(X,q,Q,$)=>{if(Q||$)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#O({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#G;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#B);)q=this.#R[q]}*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#B;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#G);)q=this.#L[q]}#c(X){return X!==void 0&&this.#U.get(this.#J[X])===X}*entries(){for(let X of this.#O())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*rentries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*keys(){for(let X of this.#O()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*rkeys(){for(let X of this.#N()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*values(){for(let X of this.#O())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,q={}){for(let Q of this.#O()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;if(J!==void 0&&X(J,this.#J[Q],this))return this.#S(this.#J[Q],q)}}forEach(X,q=this){for(let Q of this.#O()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}rforEach(X,q=this){for(let Q of this.#N()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}purgeStale(){let X=!1;for(let q of this.#N({allowStale:!0}))this.#D(q)&&(this.#x(this.#J[q],"expire"),X=!0);return X}info(X){let q=this.#U.get(X);if(q===void 0)return;let Q=this.#Z[q],$=this.#$(Q)?Q.__staleWhileFetching:Q;if($===void 0)return;let J={value:$};if(this.#M&&this.#w){let Y=this.#M[q],H=this.#w[q];if(Y&&H){let U=Y-(this.#_.now()-H);J.ttl=U,J.start=Date.now()}}return this.#I&&(J.size=this.#I[q]),J}dump(){let X=[];for(let q of this.#O({allowStale:!0})){let Q=this.#J[q],$=this.#Z[q],J=this.#$($)?$.__staleWhileFetching:$;if(J===void 0||Q===void 0)continue;let Y={value:J};if(this.#M&&this.#w){Y.ttl=this.#M[q];let H=this.#_.now()-this.#w[q];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[q]),X.unshift([Q,Y])}return X}load(X){this.clear();for(let[q,Q]of X){if(Q.start){let $=Date.now()-Q.start;Q.start=this.#_.now()-$}this.#E(q,Q.value,Q)}}set(X,q,Q={}){let{status:$=K0.hasSubscribers?{}:void 0}=Q;Q.status=$,$&&($.op="set",$.key=X,q!==void 0&&($.value=q),$.cache=this);let J=this.#E(X,q,Q);return $&&K0.hasSubscribers&&K0.publish($),J}#E(X,q,Q,$){let{ttl:J=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:U=this.sizeCalculation,status:G}=Q,W=this.#$(q);if(q===void 0)return G&&(G.set="deleted"),this.delete(X),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;G&&!W&&(G.value=q);let L=this.#d(X,q,Q.size||0,U,G);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(X,"set"),G&&(G.set="miss",G.maxEntrySizeExceeded=!0),this;let z=this.#H===0?void 0:this.#U.get(X);if(z===void 0)z=this.#H===0?this.#G:this.#j.length!==0?this.#j.pop():this.#H===this.#q?this.#g(!1):this.#H,this.#J[z]=X,this.#Z[z]=q,this.#U.set(X,z),this.#L[this.#G]=z,this.#R[z]=this.#G,this.#G=z,this.#H++,this.#f(z,L,G),G&&(G.set="add"),V=!1,this.#v&&!W&&this.#Y?.(q,X,"add");else{this.#b(z);let _=this.#Z[z];if(q!==_){if(!H)if(this.#$(_)){_!==$&&_.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=_;R!==void 0&&R!==q&&(this.#k&&this.#X?.(R,X,"set"),this.#z&&this.#W?.push([R,X,"set"]))}else this.#k&&this.#X?.(_,X,"set"),this.#z&&this.#W?.push([_,X,"set"]);if(this.#C(z),this.#f(z,L,G),this.#Z[z]=q,!W){let R=_&&this.#$(_)?_.__staleWhileFetching:_,M=R===void 0?"add":q!==R?"replace":"update";G&&(G.set=M,R!==void 0&&(G.oldValue=R)),this.#v&&this.onInsert?.(q,X,M)}}else W||(G&&(G.set="update"),this.#v&&this.onInsert?.(q,X,"update"))}if(J!==0&&!this.#M&&this.#u(),this.#M&&(V||this.#p(z,J,Y),G&&this.#P(G,z)),!H&&this.#z&&this.#W){let _=this.#W,R;for(;R=_?.shift();)this.#K?.(...R)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#g(!0),this.#$(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#z&&this.#W){let X=this.#W,q;for(;q=X?.shift();)this.#K?.(...q)}}}#g(X){let q=this.#B,Q=this.#J[q],$=this.#Z[q],J=this.#$($);J&&$.__abortController.abort(Error("evicted"));let Y=J?$.__staleWhileFetching:$;return(this.#k||this.#z)&&Y!==void 0&&(this.#k&&this.#X?.(Y,Q,"evict"),this.#z&&this.#W?.push([Y,Q,"evict"])),this.#C(q),this.#F?.[q]&&(clearTimeout(this.#F[q]),this.#F[q]=void 0),X&&(this.#J[q]=void 0,this.#Z[q]=void 0,this.#j.push(q)),this.#H===1?(this.#B=this.#G=0,this.#j.length=0):this.#B=this.#L[q],this.#U.delete(Q),this.#H--,q}has(X,q={}){let{status:Q=K0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="has",Q.key=X,Q.cache=this);let $=this.#o(X,q);return K0.hasSubscribers&&K0.publish(Q),$}#o(X,q={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:$}=q,J=this.#U.get(X);if(J!==void 0){let Y=this.#Z[J];if(this.#$(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D(J))$&&($.has="stale",this.#P($,J));else return Q&&this.#y(J),$&&($.has="hit",this.#P($,J)),!0}else $&&($.has="miss");return!1}peek(X,q={}){let{status:Q=H3()?{}:void 0}=q;Q&&(Q.op="peek",Q.key=X,Q.cache=this),q.status=Q;let $=this.#s(X,q);return K0.hasSubscribers&&K0.publish(Q),$}#s(X,q){let{status:Q,allowStale:$=this.allowStale}=q,J=this.#U.get(X);if(J===void 0||!$&&this.#D(J)){Q&&(Q.peek=J===void 0?"miss":"stale");return}let Y=this.#Z[J],H=this.#$(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(X,q,Q,$){let J=q===void 0?void 0:this.#Z[q];if(this.#$(J))return J;let Y=new AbortController,{signal:H}=Q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let U={signal:Y.signal,options:Q,context:$},G=(R,M=!1)=>{let{aborted:F}=Y.signal,O=Q.ignoreFetchAbort&&R!==void 0,D=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&R!==void 0);if(Q.status&&(F&&!M?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,O&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),F&&!O&&!M)return V(Y.signal.reason,D);let w=z,T=this.#Z[q];return(T===z||T===void 0&&O&&M)&&(R===void 0?w.__staleWhileFetching!==void 0?this.#Z[q]=w.__staleWhileFetching:this.#x(X,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(X,R,U.options,w))),R},W=(R)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=R),V(R,!1)),V=(R,M)=>{let{aborted:F}=Y.signal,O=F&&Q.allowStaleOnFetchAbort,D=O||Q.allowStaleOnFetchRejection,w=D||Q.noDeleteOnFetchRejection,T=z;if(this.#Z[q]===z&&(!w||!M&&T.__staleWhileFetching===void 0?this.#x(X,"fetch"):O||(this.#Z[q]=T.__staleWhileFetching)),D)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},L=(R,M)=>{let F=this.#V?.(X,J,U);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(R(void 0),Q.allowStaleOnFetchAbort&&(R=(O)=>G(O,!0)))}),F&&F instanceof Promise?F.then((O)=>R(O===void 0?void 0:O),M):F!==void 0&&R(F)};Q.status&&(Q.status.fetchDispatched=!0);let z=new Promise(L).then(G,W),_=Object.assign(z,{__abortController:Y,__staleWhileFetching:J,__returned:void 0});return q===void 0?(this.#E(X,_,{...U.options,status:void 0}),q=this.#U.get(X)):this.#Z[q]=_,_}#$(X){if(!this.#h)return!1;let q=X;return!!q&&q instanceof Promise&&q.hasOwnProperty("__staleWhileFetching")&&q.__abortController instanceof AbortController}fetch(X,q={}){let Q=M6.hasSubscribers,{status:$=H3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#l(X,q);return $&&Q&&($.trace=!0,M6.tracePromise(()=>J,$).catch(()=>{})),J}async#l(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:U=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:z=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:R,forceRefresh:M=!1,status:F,signal:O}=q;if(F&&(F.op="fetch",F.key=X,M&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(X,{allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,status:F});let D={allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,ttl:Y,noDisposeOnSet:H,size:U,sizeCalculation:G,noUpdateTTL:W,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:_,ignoreFetchAbort:z,status:F,signal:O},w=this.#U.get(X);if(w===void 0){F&&(F.fetch="miss");let T=this.#m(X,w,D,R);return T.__returned=T}else{let T=this.#Z[w];if(this.#$(T)){let k=Q&&T.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",k&&(F.returnedStale=!0)),k?T.__staleWhileFetching:T.__returned=T}let j=this.#D(w);if(!M&&!j)return F&&(F.fetch="hit"),this.#b(w),$&&this.#y(w),F&&this.#P(F,w),T;let A=this.#m(X,w,D,R),S=A.__staleWhileFetching!==void 0&&Q;return F&&(F.fetch=j?"stale":"refresh",S&&j&&(F.returnedStale=!0)),S?A.__staleWhileFetching:A.__returned=A}}forceFetch(X,q={}){let Q=M6.hasSubscribers,{status:$=H3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#r(X,q);return $&&Q&&($.trace=!0,M6.tracePromise(()=>J,$).catch(()=>{})),J}async#r(X,q={}){let Q=await this.#l(X,q);if(Q===void 0)throw Error("fetch() returned undefined");return Q}memo(X,q={}){let{status:Q=K0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="memo",Q.key=X,q.context&&(Q.context=q.context),Q.cache=this);let $=this.#t(X,q);return Q&&(Q.value=$),K0.hasSubscribers&&K0.publish(Q),$}#t(X,q={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:$,status:J,forceRefresh:Y,...H}=q;J&&Y&&(J.forceRefresh=!0);let U=this.#S(X,H),G=Y||U===void 0;if(J&&(J.memo=G?"miss":"hit",G||(J.value=U)),!G)return U;let W=Q(X,U,{options:H,context:$});return J&&(J.value=W),this.#E(X,W,H),W}get(X,q={}){let{status:Q=K0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="get",Q.key=X,Q.cache=this);let $=this.#S(X,q);return Q&&($!==void 0&&(Q.value=$),K0.hasSubscribers&&K0.publish(Q)),$}#S(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,status:Y}=q,H=this.#U.get(X);if(H===void 0){Y&&(Y.get="miss");return}let U=this.#Z[H],G=this.#$(U);return Y&&this.#P(Y,H),this.#D(H)?G?(Y&&(Y.get="stale-fetching"),Q&&U.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),U.__staleWhileFetching):void 0):(J||this.#x(X,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),U):void 0):(Y&&(Y.get=G?"fetching":"hit"),this.#b(H),$&&this.#y(H),G?U.__staleWhileFetching:U)}#n(X,q){this.#R[q]=X,this.#L[X]=q}#b(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#n(this.#R[X],this.#L[X]),this.#n(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,q){K0.hasSubscribers&&K0.publish({op:"delete",delete:q,key:X,cache:this});let Q=!1;if(this.#H!==0){let $=this.#U.get(X);if($!==void 0)if(this.#F?.[$]&&(clearTimeout(this.#F[$]),this.#F[$]=void 0),Q=!0,this.#H===1)this.#i(q);else{this.#C($);let J=this.#Z[$];if(this.#$(J)?J.__abortController.abort(Error("deleted")):(this.#k||this.#z)&&(this.#k&&this.#X?.(J,X,q),this.#z&&this.#W?.push([J,X,q])),this.#U.delete(X),this.#J[$]=void 0,this.#Z[$]=void 0,$===this.#G)this.#G=this.#R[$];else if($===this.#B)this.#B=this.#L[$];else{let Y=this.#R[$];this.#L[Y]=this.#L[$];let H=this.#L[$];this.#R[H]=this.#R[$]}this.#H--,this.#j.push($)}}if(this.#z&&this.#W?.length){let $=this.#W,J;for(;J=$?.shift();)this.#K?.(...J)}return Q}clear(){return this.#i("delete")}#i(X){for(let q of this.#N({allowStale:!0})){let Q=this.#Z[q];if(this.#$(Q))Q.__abortController.abort(Error("deleted"));else{let $=this.#J[q];this.#k&&this.#X?.(Q,$,X),this.#z&&this.#W?.push([Q,$,X])}}if(this.#U.clear(),this.#Z.fill(void 0),this.#J.fill(void 0),this.#M&&this.#w){this.#M.fill(0),this.#w.fill(0);for(let q of this.#F??[])q!==void 0&&clearTimeout(q);this.#F?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#G=0,this.#j.length=0,this.#T=0,this.#H=0,this.#z&&this.#W){let q=this.#W,Q;for(;Q=q?.shift();)this.#K?.(...Q)}}}});function Pv(Z,X=300000){let q=new Map,Q=new Map,$=async(...J)=>{let Y=m(J),H=q.get(Y),U=Date.now();if(!H){let G=Q.get(Y);if(G)return G;let W=Z(...J);Q.set(Y,W);try{let V=await W;if(Q.get(Y)===W)q.set(Y,{value:V,timestamp:U,refreshing:!1});return V}finally{if(Q.get(Y)===W)Q.delete(Y)}}if(H&&U-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let G=H;return Z(...J).then((W)=>{if(q.get(Y)===G)q.set(Y,{value:W,timestamp:Date.now(),refreshing:!1})}).catch((W)=>{if(g(W),q.get(Y)===G)q.delete(Y)}),H.value}return q.get(Y).value};return $.cache={clear:()=>{q.clear(),Q.clear()}},$}function z1(Z,X,q=100){let Q=new P$({max:q}),$=(...J)=>{let Y=X(...J),H=Q.get(Y);if(H!==void 0)return H;let U=Z(...J);return Q.set(Y,U),U};return $.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:(J)=>Q.delete(J),get:(J)=>Q.peek(J),has:(J)=>Q.has(J)},$}var o4=B(()=>{E$();C0();L0()});import{open as F_,readFile as D_,stat as A_}from"fs/promises";function y$(Z,X){try{return{ok:!0,value:JSON.parse(M0(Z))}}catch(q){if(X)g(q);return{ok:!1}}}function fv(Z){if(!Z)return null;try{return Y3(M0(Z))}catch(X){return g(X),null}}function j_(Z){let X=C$,q=Z.length,Q=X(Z);if(!Q.error||Q.done||Q.read>=q)return Q.values;let{values:$,read:J}=Q;while(J<q){let Y=typeof Z==="string"?Z.indexOf(`
|
|
16
|
+
`,J):Z.indexOf(10,J);if(Y===-1)break;J=Y+1;let H=X(Z,J);if(H.values.length>0)$=$.concat(H.values);if(!H.error||H.done||H.read>=q)break;J=H.read}return $}function I_(Z){let X=Z.length,q=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)q=3;let Q=[];while(q<X){let $=Z.indexOf(10,q);if($===-1)$=X;let J=Z.toString("utf8",q,$).trim();if(q=$+1,!J)continue;try{Q.push(JSON.parse(J))}catch{}}return Q}function w_(Z){let X=M0(Z),q=X.length,Q=0,$=[];while(Q<q){let J=X.indexOf(`
|
|
17
|
+
`,Q);if(J===-1)J=q;let Y=X.substring(Q,J).trim();if(Q=J+1,!Y)continue;try{$.push(JSON.parse(Y))}catch{}}return $}function K3(Z){if(C$)return j_(Z);if(typeof Z==="string")return w_(Z);return I_(Z)}async function gv(Z){let H=[];try{let{size:X}=await A_(Z);if(X<=F6)return K3(await D_(Z));const q=W2(H,await F_(Z,"r"),1);let Q=Buffer.allocUnsafe(F6);let $=0;let J=X-F6;while($<F6){let{bytesRead:L}=await q.read(Q,$,F6-$,J+$);if(L===0)break;$+=L}let Y=Q.indexOf(10);if(Y!==-1&&Y<$-1)return K3(Q.subarray(Y+1,$));return K3(Q.subarray(0,$))}catch(U){var G=U,W=1}finally{var V=V2(H,G,W);V&&await V}}function mv(Z,X){try{if(!Z||Z.trim()==="")return m([X],null,4);let q=M0(Z),Q=Y3(q);if(Array.isArray(Q)){let $=Q.length,H=I$(q,$===0?[0]:[$],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let U=[...Q,X];return m(U,null,4)}return w$(q,H)}else return m([X],null,4)}catch(q){return g(q),m([X],null,4)}}var T_=8192,v$,k0,C$,F6=104857600;var D6=B(()=>{k$();R6();C0();o4();L0();v$=z1(y$,(Z)=>Z,50),k0=Object.assign(function(X,q=!0){if(!X)return null;let Q=X.length>T_?y$(X,q):v$(X,q);return Q.ok?Q.value:null},{cache:v$.cache});C$=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});import{realpathSync as k_}from"fs";function S$(){return process.versions.bun!==void 0}function cv(){let Z=process.argv[1]||"";if(Z&&!O_.test(Z))return Z;let X=process.execPath||"";if(!X)return Z;try{return k_(X)}catch{return X}}function lv(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var O_;var b$=B(()=>{O_=/(^|[/\\])(\$bunfs|~BUN)[/\\]/i});function s(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var t0=()=>{};import{fileURLToPath as N_}from"node:url";var B2=(Z,X)=>{let q=G3(x_(Z));if(typeof q!=="string")throw TypeError(`${X} must be a string or a file URL: ${q}.`);return q},x_=(Z)=>U3(Z)?Z.toString():Z,U3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,G3=(Z)=>Z instanceof URL?N_(Z):Z;var L2=()=>{};var s4=(Z,X=[],q={})=>{let Q=B2(Z,"First argument"),[$,J]=s(X)?[[],X]:[X,q];if(!Array.isArray($))throw TypeError(`Second argument must be either an array of arguments or an options object: ${$}`);if($.some((U)=>typeof U==="object"&&U!==null))throw TypeError(`Second argument must be an array of strings: ${$}`);let Y=$.map(String),H=Y.find((U)=>U.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!s(J))throw TypeError(`Last argument must be an options object: ${J}`);return[Q,Y,{__proto__:null,...J}]};var W3=B(()=>{t0();L2()});import{StringDecoder as P_}from"node:string_decoder";var h$,f$=(Z)=>h$.call(Z)==="[object ArrayBuffer]",e=(Z)=>h$.call(Z)==="[object Uint8Array]",e0=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),E_,g$=(Z)=>E_.encode(Z),v_,r4=(Z)=>v_.decode(Z),m$=(Z,X)=>{return y_(Z,X).join("")},y_=(Z,X)=>{if(X==="utf8"&&Z.every((J)=>typeof J==="string"))return Z;let q=new P_(X),Q=Z.map((J)=>typeof J==="string"?g$(J):J).map((J)=>q.write(J)),$=q.end();return $===""?Q:[...Q,$]},A6=(Z)=>{if(Z.length===1&&e(Z[0]))return Z[0];return V3(C_(Z))},C_=(Z)=>Z.map((X)=>typeof X==="string"?g$(X):X),V3=(Z)=>{let X=new Uint8Array(S_(Z)),q=0;for(let Q of Z)X.set(Q,q),q+=Q.length;return X},S_=(Z)=>{let X=0;for(let q of Z)X+=q.length;return X};var F0=B(()=>{({toString:h$}=Object.prototype),E_=new TextEncoder,v_=new TextDecoder});import{ChildProcess as b_}from"node:child_process";var c$=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),l$=(Z,X)=>{let q=[];for(let[J,Y]of Z.entries())q=h_({templates:Z,expressions:X,tokens:q,index:J,template:Y});if(q.length===0)throw TypeError("Template script must not be empty");let[Q,...$]=q;return[Q,$,{}]},h_=({templates:Z,expressions:X,tokens:q,index:Q,template:$})=>{if($===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:J,leadingWhitespaces:Y,trailingWhitespaces:H}=f_($,Z.raw[Q]),U=p$(q,J,Y);if(Q===X.length)return U;let G=X[Q],W=Array.isArray(G)?G.map((V)=>d$(V)):[d$(G)];return p$(U,W,H)},f_=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let q=[],Q=0,$=u$.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let U=X[H];if(u$.has(U)){if(Q!==Y)q.push(Z.slice(Q,Y));Q=Y+1}else if(U==="\\"){let G=X[H+1];if(G===`
|
|
18
|
+
`)Y-=1,H+=1;else if(G==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=g_[G]??1}}let J=Q===Z.length;if(!J)q.push(Z.slice(Q));return{nextTokens:q,leadingWhitespaces:$,trailingWhitespaces:J}},u$,g_,p$=(Z,X,q)=>q||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],d$=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(s(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return m_(Z);if(Z instanceof b_||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${X}" in template expression`)},m_=({stdout:Z})=>{if(typeof Z==="string")return Z;if(e(Z))return r4(Z);if(Z===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof Z}" stdout in template expression`)};var n$=B(()=>{t0();F0();u$=new Set([" ","\t","\r",`
|
|
19
|
+
`]),g_={x:3,u:5}});import B3 from"node:process";var S0=(Z)=>t4.includes(Z),t4,O0,e4=(Z)=>O0[Z]??`stdio[${Z}]`;var Z1=B(()=>{t4=[B3.stdin,B3.stdout,B3.stderr],O0=["stdin","stdout","stderr"]});import{debuglog as u_}from"node:util";var a$=(Z)=>{let X={...Z};for(let q of _3)X[q]=L3(Z,q);return X},L3=(Z,X)=>{let q=p_(Z),Q=Array.from({length:q+1}),$=d_(Z[X],Q,X,q);return a_($,X)},p_=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,O0.length):O0.length,d_=(Z,X,q,Q)=>s(Z)?c_(Z,X,q,Q):X.fill(Z),c_=(Z,X,q,Q)=>{for(let $ of Object.keys(Z).sort(l_))for(let J of n_($,q,Q))X[J]=Z[$];return X},l_=(Z,X)=>i$(Z)<i$(X)?1:-1,i$=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},n_=(Z,X,q)=>{if(Z==="ipc")return[q];let Q=z3(Z);if(Q===void 0||Q===0)throw TypeError(`"${X}.${Z}" is invalid.
|
|
20
|
+
It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(Q!=="all"&&Q>=q)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
|
|
21
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},z3=(Z)=>{if(Z==="all")return Z;if(O0.includes(Z))return O0.indexOf(Z);let X=i_.exec(Z);if(X!==null)return Number(X.groups.fdNumber)},i_,a_=(Z,X)=>Z.map((q)=>q===void 0?s_[X]:q),o_,s_,_3,X1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var q1=B(()=>{t0();Z1();i_=/^fd(?<fdNumber>\d+)$/,o_=u_("execa").enabled?"full":"none",s_={lines:!1,buffer:!0,maxBuffer:1e8,verbose:o_,stripFinalNewline:!0},_3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var z2=({verbose:Z},X)=>R3(Z,X)!=="none",_2=({verbose:Z},X)=>!["none","short"].includes(R3(Z,X)),o$=({verbose:Z},X)=>{let q=R3(Z,X);return Z8(q)?q:void 0},R3=(Z,X)=>X===void 0?r_(Z):X1(Z,X),r_=(Z)=>Z.find((X)=>Z8(X))??X8.findLast((X)=>Z.includes(X)),Z8=(Z)=>typeof Z==="function",X8;var _1=B(()=>{q1();X8=["none","short","full"]});import{platform as t_}from"node:process";import{stripVTControlCharacters as e_}from"node:util";var s$=(Z,X)=>{let q=[Z,...X],Q=q.join(" "),$=q.map((J)=>JR(r$(J))).join(" ");return{command:Q,escapedCommand:$}},T6=(Z)=>e_(Z).split(`
|
|
22
|
+
`).map((X)=>r$(X)).join(`
|
|
23
|
+
`),r$=(Z)=>Z.replaceAll(qR,(X)=>ZR(X)),ZR=(Z)=>{let X=QR[Z];if(X!==void 0)return X;let q=Z.codePointAt(0),Q=q.toString(16);return q<=$R?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},XR=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},qR,QR,$R=65535,JR=(Z)=>{if(YR.test(Z))return Z;return t_==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},YR;var q8=B(()=>{qR=XR(),QR={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},YR=/^[\w\-./]+$/});import t$ from"node:process";function M3(){let{env:Z}=t$,{TERM:X,TERM_PROGRAM:q}=Z;if(t$.platform!=="win32")return X!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||q==="Terminus-Sublime"||q==="vscode"||X==="xterm-256color"||X==="alacritty"||X==="rxvt-unicode"||X==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var e$=()=>{};var ZJ,XJ,HR,KR,UR,GR,WR,Q8,Fy;var qJ=B(()=>{e$();ZJ={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},XJ={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},HR={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},KR={...ZJ,...XJ},UR={...ZJ,...HR},GR=M3(),WR=GR?KR:UR,Q8=WR,Fy=Object.entries(XJ)});import VR from"node:tty";var BR,C=(Z,X)=>{if(!BR)return($)=>$;let q=`\x1B[${Z}m`,Q=`\x1B[${X}m`;return($)=>{let J=$+"",Y=J.indexOf(Q);if(Y===-1)return q+J+Q;let H=q,U=0,W=(X===22?Q:"")+q;while(Y!==-1)H+=J.slice(U,Y)+W,U=Y+Q.length,Y=J.indexOf(Q,U);return H+=J.slice(U)+Q,H}},Ty,QJ,jy,Iy,wy,ky,Oy,Ny,xy,Py,Ey,vy,yy,Cy,Sy,by,hy,$8,fy,gy,my,uy,py,dy,cy,ly,ny,$J,iy,JJ,ay,oy,sy,ry,ty,ey,ZC,XC,qC,QC,$C;var YJ=B(()=>{BR=VR?.WriteStream?.prototype?.hasColors?.()??!1,Ty=C(0,0),QJ=C(1,22),jy=C(2,22),Iy=C(3,23),wy=C(4,24),ky=C(53,55),Oy=C(7,27),Ny=C(8,28),xy=C(9,29),Py=C(30,39),Ey=C(31,39),vy=C(32,39),yy=C(33,39),Cy=C(34,39),Sy=C(35,39),by=C(36,39),hy=C(37,39),$8=C(90,39),fy=C(40,49),gy=C(41,49),my=C(42,49),uy=C(43,49),py=C(44,49),dy=C(45,49),cy=C(46,49),ly=C(47,49),ny=C(100,49),$J=C(91,39),iy=C(92,39),JJ=C(93,39),ay=C(94,39),oy=C(95,39),sy=C(96,39),ry=C(97,39),ty=C(101,49),ey=C(102,49),ZC=C(103,49),XC=C(104,49),qC=C(105,49),QC=C(106,49),$C=C(107,49)});var HJ=B(()=>{YJ()});var GJ=({type:Z,message:X,timestamp:q,piped:Q,commandId:$,result:{failed:J=!1}={},options:{reject:Y=!0}})=>{let H=LR(q),U=zR[Z]({failed:J,reject:Y,piped:Q}),G=_R[Z]({reject:Y});return`${$8(`[${H}]`)} ${$8(`[${$}]`)} ${G(U)} ${G(X)}`},LR=(Z)=>`${J8(Z.getHours(),2)}:${J8(Z.getMinutes(),2)}:${J8(Z.getSeconds(),2)}.${J8(Z.getMilliseconds(),3)}`,J8=(Z,X)=>String(Z).padStart(X,"0"),KJ=({failed:Z,reject:X})=>{if(!Z)return Q8.tick;return X?Q8.cross:Q8.warning},zR,UJ=(Z)=>Z,_R;var WJ=B(()=>{qJ();HJ();zR={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:KJ,duration:KJ},_R={command:()=>QJ,output:()=>UJ,ipc:()=>UJ,error:({reject:Z})=>Z?$J:JJ,duration:()=>$8}});var VJ=(Z,X,q)=>{let Q=o$(X,q);return Z.map(({verboseLine:$,verboseObject:J})=>RR($,J,Q)).filter(($)=>$!==void 0).map(($)=>MR($)).join("")},RR=(Z,X,q)=>{if(q===void 0)return Z;let Q=q(Z,X);if(typeof Q==="string")return Q},MR=(Z)=>Z.endsWith(`
|
|
24
|
+
`)?Z:`${Z}
|
|
25
|
+
`;var BJ=B(()=>{_1()});import{inspect as FR}from"node:util";var c0=({type:Z,verboseMessage:X,fdNumber:q,verboseInfo:Q,result:$})=>{let J=DR({type:Z,result:$,verboseInfo:Q}),Y=AR(X,J),H=VJ(Y,Q,q);if(H!=="")console.warn(H.slice(0,-1))},DR=({type:Z,result:X,verboseInfo:q})=>{let{escapedCommand:Q,commandId:$,rawOptions:J}=q,{piped:Y=!1,...H}=J;return{type:Z,escapedCommand:Q,commandId:`${$}`,timestamp:new Date,piped:Y,result:X,options:H}},AR=(Z,X)=>Z.split(`
|
|
26
|
+
`).map((q)=>TR({...X,message:q})),TR=(Z)=>{return{verboseLine:GJ(Z),verboseObject:Z}},Y8=(Z)=>{let X=typeof Z==="string"?Z:FR(Z);return T6(X).replaceAll("\t",()=>" ".repeat(jR))},jR=2;var R2=B(()=>{q8();WJ();BJ()});var LJ=(Z,X)=>{if(!z2(X))return;c0({type:"command",verboseMessage:Z,verboseInfo:X})};var zJ=B(()=>{_1();R2()});var _J=(Z,X,q)=>{kR(Z);let Q=IR(Z);return{verbose:Z,escapedCommand:X,commandId:Q,rawOptions:q}},IR=(Z)=>z2({verbose:Z})?wR++:void 0,wR=0n,kR=(Z)=>{for(let X of Z){if(X===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(X===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!X8.includes(X)&&!Z8(X)){let q=X8.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${q} or a function.`)}}};var RJ=B(()=>{_1()});import{hrtime as MJ}from"node:process";var H8=()=>MJ.bigint(),F3=(Z)=>Number(MJ.bigint()-Z)/1e6;var K8=()=>{};var U8=(Z,X,q)=>{let Q=H8(),{command:$,escapedCommand:J}=s$(Z,X),Y=L3(q,"verbose"),H=_J(Y,J,{...q});return LJ(J,H),{command:$,escapedCommand:J,startTime:Q,verboseInfo:H}};var D3=B(()=>{zJ();RJ();K8();q8();q1()});function G8(Z={}){let{env:X=process.env,platform:q=process.platform}=Z;if(q!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"}var FJ=()=>{};var DJ=()=>{};import{promisify as OR}from"node:util";import{execFile as NR,execFileSync as bC}from"node:child_process";import AJ from"node:path";import{fileURLToPath as xR}from"node:url";function W8(Z){return Z instanceof URL?xR(Z):Z}function TJ(Z){return{*[Symbol.iterator](){let X=AJ.resolve(W8(Z)),q;while(q!==X)yield X,q=X,X=AJ.resolve(X,"..")}}}var gC;var jJ=B(()=>{DJ();gC=OR(NR)});import V8 from"node:process";import C1 from"node:path";var PR=({cwd:Z=V8.cwd(),path:X=V8.env[G8()],preferLocal:q=!0,execPath:Q=V8.execPath,addExecPath:$=!0}={})=>{let J=C1.resolve(W8(Z)),Y=[],H=X.split(C1.delimiter);if(q)ER(Y,H,J);if($)vR(Y,H,Q,J);return X===""||X===C1.delimiter?`${Y.join(C1.delimiter)}${X}`:[...Y,X].join(C1.delimiter)},ER=(Z,X,q)=>{for(let Q of TJ(q)){let $=C1.join(Q,"node_modules/.bin");if(!X.includes($))Z.push($)}},vR=(Z,X,q,Q)=>{let $=C1.resolve(Q,W8(q),"..");if(!X.includes($))Z.push($)},IJ=({env:Z=V8.env,...X}={})=>{Z={...Z};let q=G8({env:Z});return X.path=Z[q],Z[q]=PR(X),Z};var wJ=B(()=>{FJ();jJ()});var kJ=(Z,X,q)=>{let Q=q?L8:B8,$=Z instanceof l0?{}:{cause:Z};return new Q(X,$)},l0,OJ=(Z,X)=>{Object.defineProperties(Z.prototype,{name:{value:X,writable:!0,enumerable:!1,configurable:!0},[xJ]:{value:!0,writable:!1,enumerable:!1,configurable:!1}})},NJ=(Z)=>z8(Z)&&(xJ in Z),xJ,z8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",B8,L8;var S1=B(()=>{l0=class l0 extends Error{};xJ=Symbol("isExecaError");B8=class B8 extends Error{};OJ(B8,B8.name);L8=class L8 extends Error{};OJ(L8,L8.name)});var PJ=()=>{let Z=A3-EJ+1;return Array.from({length:Z},yR)},yR=(Z,X)=>({name:`SIGRT${X+1}`,number:EJ+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),EJ=34,A3=64;var T3=()=>{};var vJ;var yJ=B(()=>{vJ=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as CR}from"node:os";var j3=()=>{let Z=PJ();return[...vJ,...Z].map(SR)},SR=({name:Z,number:X,description:q,action:Q,forced:$=!1,standard:J})=>{let{signals:{[Z]:Y}}=CR,H=Y!==void 0;return{name:Z,number:H?Y:X,description:q,supported:H,action:Q,forced:$,standard:J}};var CJ=B(()=>{yJ();T3()});import{constants as bR}from"node:os";var hR=()=>{let Z=j3();return Object.fromEntries(Z.map(fR))},fR=({name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y})=>[Z,{name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y}],SJ,gR=()=>{let Z=j3(),X=A3+1,q=Array.from({length:X},(Q,$)=>mR($,Z));return Object.assign({},...q)},mR=(Z,X)=>{let q=uR(Z,X);if(q===void 0)return{};let{name:Q,description:$,supported:J,action:Y,forced:H,standard:U}=q;return{[Z]:{name:Q,number:Z,description:$,supported:J,action:Y,forced:H,standard:U}}},uR=(Z,X)=>{let q=X.find(({name:Q})=>bR.signals[Q]===Z);if(q!==void 0)return q;return X.find((Q)=>Q.number===Z)},QS;var bJ=B(()=>{T3();CJ();SJ=hR(),QS=gR()});import{constants as j6}from"node:os";var fJ=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return mJ(Z,"option `killSignal`")},gJ=(Z)=>Z===0?Z:mJ(Z,"`subprocess.kill()`'s argument"),mJ=(Z,X)=>{if(Number.isInteger(Z))return pR(Z,X);if(typeof Z==="string")return cR(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
|
|
27
|
+
${I3()}`)},pR=(Z,X)=>{if(hJ.has(Z))return hJ.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
|
|
28
|
+
${I3()}`)},dR=()=>new Map(Object.entries(j6.signals).reverse().map(([Z,X])=>[X,Z])),hJ,cR=(Z,X)=>{if(Z in j6.signals)return Z;if(Z.toUpperCase()in j6.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
|
|
29
|
+
${I3()}`)},I3=()=>`Available signal names: ${lR()}.
|
|
30
|
+
Available signal numbers: ${nR()}.`,lR=()=>Object.keys(j6.signals).sort().map((Z)=>`'${Z}'`).join(", "),nR=()=>[...new Set(Object.values(j6.signals).sort((Z,X)=>Z-X))].join(", "),_8=(Z)=>SJ[Z].description;var I6=B(()=>{bJ();hJ=dR()});import{setTimeout as iR}from"node:timers/promises";var uJ=(Z)=>{if(Z===!1)return Z;if(Z===!0)return aR;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},aR=5000,pJ=({kill:Z,options:{forceKillAfterDelay:X,killSignal:q},onInternalError:Q,context:$,controller:J},Y,H)=>{let{signal:U,error:G}=oR(Y,H,q);sR(G,Q);let W=Z(U);return rR({kill:Z,signal:U,forceKillAfterDelay:X,killSignal:q,killResult:W,context:$,controller:J}),W},oR=(Z,X,q)=>{let[Q=q,$]=z8(Z)?[void 0,Z]:[Z,X];if(typeof Q!=="string"&&!Number.isInteger(Q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Q)}`);if($!==void 0&&!z8($))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${$}`);return{signal:gJ(Q),error:$}},sR=(Z,X)=>{if(Z!==void 0)X.reject(Z)},rR=async({kill:Z,signal:X,forceKillAfterDelay:q,killSignal:Q,killResult:$,context:J,controller:Y})=>{if(X===Q&&$)w3({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:Y.signal})},w3=async({kill:Z,forceKillAfterDelay:X,context:q,controllerSignal:Q})=>{if(X===!1)return;try{if(await iR(X,void 0,{signal:Q}),Z("SIGKILL"))q.isForcefullyTerminated??=!0}catch{}};var R8=B(()=>{S1();I6()});import{once as tR}from"node:events";var M8=async(Z,X)=>{if(!Z.aborted)await tR(Z,"abort",{signal:X})};var k3=()=>{};var dJ=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},cJ=({kill:Z,cancelSignal:X,gracefulCancel:q,context:Q,controller:$})=>X===void 0||q?[]:[eR(Z,X,Q,$)],eR=async(Z,X,q,{signal:Q})=>{throw await M8(X,Q),q.terminationReason??="cancel",Z(),X.reason};var O3=B(()=>{k3()});var M2=({methodName:Z,isSubprocess:X,ipc:q,isConnected:Q})=>{ZM(Z,X,q),N3(Z,X,Q)},ZM=(Z,X,q)=>{if(!q)throw Error(`${b0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},N3=(Z,X,q)=>{if(!q)throw Error(`${b0(Z,X)} cannot be used: the ${R1(X)} has already exited or disconnected.`)},lJ=(Z)=>{throw Error(`${b0("getOneMessage",Z)} could not complete: the ${R1(Z)} exited or disconnected.`)},nJ=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${R1(Z)} is sending a message too, instead of listening to incoming messages.
|
|
31
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
32
|
+
|
|
33
|
+
const [receivedMessage] = await Promise.all([
|
|
34
|
+
${b0("getOneMessage",Z)},
|
|
35
|
+
${b0("sendMessage",Z,"message, {strict: true}")},
|
|
36
|
+
]);`)},F8=(Z,X)=>Error(`${b0("sendMessage",X)} failed when sending an acknowledgment response to the ${R1(X)}.`,{cause:Z}),iJ=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${R1(Z)} is not listening to incoming messages.`)},aJ=(Z)=>{throw Error(`${b0("sendMessage",Z)} failed: the ${R1(Z)} exited without listening to incoming messages.`)},oJ=()=>Error(`\`cancelSignal\` aborted: the ${R1(!0)} disconnected.`),sJ=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},rJ=({error:Z,methodName:X,isSubprocess:q})=>{if(Z.code==="EPIPE")throw Error(`${b0(X,q)} cannot be used: the ${R1(q)} is disconnecting.`,{cause:Z})},tJ=({error:Z,methodName:X,isSubprocess:q,message:Q})=>{if(XM(Z))throw Error(`${b0(X,q)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},XM=({code:Z,message:X})=>qM.has(Z)||QM.some((q)=>X.includes(q)),qM,QM,b0=(Z,X,q="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${$M(X)}${Z}(${q})`,$M=(Z)=>Z?"":"subprocess.",R1=(Z)=>Z?"parent process":"subprocess",F2=(Z)=>{if(Z.connected)Z.disconnect()};var D2=B(()=>{qM=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),QM=["could not be cloned","circular structure","call stack size exceeded"]});var n0=()=>{let Z={},X=new Promise((q,Q)=>{Object.assign(Z,{resolve:q,reject:Q})});return Object.assign(X,Z)};var A2=()=>{};import{addAbortListener as JM}from"node:events";var b1=(Z,X,q)=>{let Q=Z.getMaxListeners();if(Q===0||Q===1/0)return;Z.setMaxListeners(Q+X),JM(q,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var D8=()=>{};var A8=(Z,X)=>{if(X)x3(Z)},x3=(Z)=>{Z.refCounted()},T8=(Z,X)=>{if(X)P3(Z)},P3=(Z)=>{Z.unrefCounted()},eJ=(Z,X)=>{if(!X)return;P3(Z),P3(Z)},Z9=(Z,X)=>{if(!X)return;x3(Z),x3(Z)};var w6=()=>{};import{once as YM}from"node:events";import{scheduler as HM}from"node:timers/promises";var X9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q},$)=>{if(J9($)||H9($))return;if(!j8.has(Z))j8.set(Z,[]);let J=j8.get(Z);if(J.push($),J.length>1)return;while(J.length>0){await Y9(Z,Q,$),await HM.yield();let Y=await $9({wrappedMessage:J[0],anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q});J.shift(),Q.emit("message",Y),Q.emit("message:done")}},q9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q,boundOnMessage:$})=>{E3();let J=j8.get(Z);while(J?.length>0)await YM(Q,"message:done");Z.removeListener("message",$),Z9(X,q),Q.connected=!1,Q.emit("disconnect")},j8;var Q9=B(()=>{k6();w6();I8();w8();j8=new WeakMap});import{EventEmitter as KM}from"node:events";var M1=(Z,X,q)=>{if(k8.has(Z))return k8.get(Z);let Q=new KM;return Q.connected=!0,k8.set(Z,Q),UM({ipcEmitter:Q,anyProcess:Z,channel:X,isSubprocess:q}),Q},k8,UM=({ipcEmitter:Z,anyProcess:X,channel:q,isSubprocess:Q})=>{let $=X9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z});X.on("message",$),X.once("disconnect",q9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:$})),eJ(q,Q)},O8=(Z)=>{let X=k8.get(Z);return X===void 0?Z.channel!==void 0&&Z.channel!==null:X.connected};var O6=B(()=>{Q9();w6();k8=new WeakMap});import{once as GM}from"node:events";var K9=({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:$})=>{if(!$)return Q;let J=M1(Z,X,q),Y=P8(Z,J);return{id:WM++,type:x8,message:Q,hasListeners:Y}},WM=0n,U9=(Z,X)=>{if(X?.type!==x8||X.hasListeners)return;for(let{id:q}of Z)if(q!==void 0)N8[q].resolve({isDeadlock:!0,hasListeners:!1})},$9=async({wrappedMessage:Z,anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:$})=>{if(Z?.type!==x8||!X.connected)return Z;let{id:J,message:Y}=Z,H={id:J,type:W9,message:P8(X,$)};try{await T2({anyProcess:X,channel:q,isSubprocess:Q,ipc:!0},H)}catch(U){$.emit("strict:error",U)}return Y},J9=(Z)=>{if(Z?.type!==W9)return!1;let{id:X,message:q}=Z;return N8[X]?.resolve({isDeadlock:!1,hasListeners:q}),!0},G9=async(Z,X,q)=>{if(Z?.type!==x8)return;let Q=n0();N8[Z.id]=Q;let $=new AbortController;try{let{isDeadlock:J,hasListeners:Y}=await Promise.race([Q,VM(X,q,$)]);if(J)nJ(q);if(!Y)iJ(q)}finally{$.abort(),delete N8[Z.id]}},N8,VM=async(Z,X,{signal:q})=>{b1(Z,1,q),await GM(Z,"disconnect",{signal:q}),aJ(X)},x8="execa:ipc:request",W9="execa:ipc:response";var I8=B(()=>{A2();D8();N6();D2();O6();k6();N8={}});var B9=(Z,X,q)=>{if(!x6.has(Z))x6.set(Z,new Set);let Q=x6.get(Z),$=n0(),J=q?X.id:void 0,Y={onMessageSent:$,id:J};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},L9=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},Y9=async(Z,X,q)=>{while(!P8(Z,X)&&x6.get(Z)?.size>0){let Q=[...x6.get(Z)];U9(Q,q),await Promise.all(Q.map(({onMessageSent:$})=>$))}},x6,z9,_9=(Z,X)=>{z9.set(Z,X)},P8=(Z,X)=>X.listenerCount("message")>BM(Z),BM=(Z)=>V9(Z)!==void 0&&!X1(V9(Z).buffer,"ipc")?1:0,V9=(Z)=>z9.get(Z);var k6=B(()=>{A2();q1();I8();x6=new WeakMap,z9=new WeakMap});import{promisify as LM}from"node:util";var T2=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$,{strict:J=!1}={})=>{return M2({methodName:"sendMessage",isSubprocess:q,ipc:Q,isConnected:Z.connected}),zM({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:q,message:$,strict:J})},zM=async({anyProcess:Z,channel:X,methodName:q,isSubprocess:Q,message:$,strict:J})=>{let Y=K9({anyProcess:Z,channel:X,isSubprocess:Q,message:$,strict:J}),H=B9(Z,Y,J);try{await y3({anyProcess:Z,methodName:q,isSubprocess:Q,wrappedMessage:Y,message:$})}catch(U){throw F2(Z),U}finally{L9(H)}},y3=async({anyProcess:Z,methodName:X,isSubprocess:q,wrappedMessage:Q,message:$})=>{let J=_M(Z);try{await Promise.all([G9(Q,Z,q),J(Q)])}catch(Y){throw rJ({error:Y,methodName:X,isSubprocess:q}),tJ({error:Y,methodName:X,isSubprocess:q,message:$}),Y}},_M=(Z)=>{if(v3.has(Z))return v3.get(Z);let X=LM(Z.send.bind(Z));return v3.set(Z,X),X},v3;var N6=B(()=>{D2();k6();I8();v3=new WeakMap});import{scheduler as RM}from"node:timers/promises";var M9=(Z,X)=>{return N3("cancelSignal",!1,Z.connected),y3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:D9,message:X},message:X})},F9=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{return await MM({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q}),C3.signal},MM=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{if(R9)return;if(R9=!0,!Q){sJ();return}if(X===null){E3();return}M1(Z,X,q),await RM.yield()},R9=!1,H9=(Z)=>{if(Z?.type!==D9)return!1;return C3.abort(Z.message),!0},D9="execa:ipc:cancel",E3=()=>{C3.abort(oJ())},C3;var w8=B(()=>{N6();O6();D2();C3=new AbortController});var A9=({gracefulCancel:Z,cancelSignal:X,ipc:q,serialization:Q})=>{if(!Z)return;if(X===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!q)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(Q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},T9=({subprocess:Z,kill:X,cancelSignal:q,gracefulCancel:Q,forceKillAfterDelay:$,context:J,controller:Y})=>Q?[FM({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:$,context:J,controller:Y})]:[],FM=async({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:Q,context:$,controller:{signal:J}})=>{await M8(q,J);let Y=DM(q);throw await M9(Z,Y),w3({kill:X,forceKillAfterDelay:Q,context:$,controllerSignal:J}),$.terminationReason??="gracefulCancel",q.reason},DM=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let X=Error(Z.message);return Object.defineProperty(X,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),X};var S3=B(()=>{k3();w8();R8()});import{setTimeout as AM}from"node:timers/promises";var j9=({timeout:Z})=>{if(Z!==void 0&&(!Number.isFinite(Z)||Z<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`)},I9=(Z,X,q,Q)=>X===0||X===void 0?[]:[TM(Z,X,q,Q)],TM=async(Z,X,q,{signal:Q})=>{throw await AM(X,void 0,{signal:Q}),q.terminationReason??="timeout",Z(),new l0};var b3=B(()=>{S1()});import{execPath as jM,execArgv as IM}from"node:process";import w9 from"node:path";var k9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},O9=(Z,X,{node:q=!1,nodePath:Q=jM,nodeOptions:$=IM.filter((U)=>!U.startsWith("--inspect")),cwd:J,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let U=B2(Q,'The "nodePath" option'),G=w9.resolve(J,U),W={__proto__:null,shell:!1,...H,nodePath:G,node:q,cwd:J};if(!q)return[Z,X,W];if(w9.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[G,[...$,Z,...X],{__proto__:null,ipc:!0,...W,shell:!1}]};var h3=B(()=>{L2()});import{serialize as wM}from"node:v8";var N9=({ipcInput:Z,ipc:X,serialization:q})=>{if(Z===void 0)return;if(!X)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");NM[q](Z)},kM=(Z)=>{try{wM(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},OM=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},NM,x9=async(Z,X,q)=>{if(X===void 0)return;await T2({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q},X)};var f3=B(()=>{N6();NM={advanced:kM,json:OM}});var E9=({encoding:Z})=>{if(g3.has(Z))return;let X=PM(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${E8(Z)}\`.
|
|
37
|
+
Please rename it to ${E8(X)}.`);let q=[...g3].map((Q)=>E8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${E8(Z)}\`.
|
|
38
|
+
Please rename it to one of: ${q}.`)},xM,D0,g3,PM=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in P9)return P9[X];if(g3.has(X))return X},P9,E8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var h1=B(()=>{xM=new Set(["utf8","utf16le"]),D0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),g3=xM.union(D0),P9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import m3 from"node:fs";import E6 from"node:path";import P6 from"node:process";function yM(Z,X){if(typeof Z!=="string"||Z.length===0)throw TypeError("Expected a non-empty string.");let{cwd:q=P6.cwd(),path:Q=P6.env.PATH??(f1?P6.env.Path:void 0)??"",pathExt:$=P6.env.PATHEXT||vM}=X;return{cwd:q,searchPath:Q,pathExt:$}}function CM(Z,X){let q=X.split(E6.delimiter).filter(Boolean),Q=E6.extname(Z).toLowerCase();if(Q!==""&&q.some(($)=>$.toLowerCase()===Q))return["",...q];return q}function*SM(Z,{cwd:X,searchPath:q,pathExt:Q}){let $=f1?CM(Z,Q):[""];if(EM.test(Z)){let Y=E6.resolve(X,Z);for(let H of $)yield Y+H;return}let J=[...f1?[X]:[],...q.split(E6.delimiter)];for(let Y of J){let H=f1&&Y.length>1&&Y.startsWith('"')&&Y.endsWith('"')?Y.slice(1,-1):Y;if(H==="")continue;let U=E6.resolve(X,H,Z);for(let G of $)yield U+G}}function bM(Z){let X;try{X=m3.statSync(Z)}catch(q){return f1&&q.code==="EACCES"}if(!X.isFile())return!1;if(f1)return!0;try{return m3.accessSync(Z,m3.constants.X_OK),!0}catch{return!1}}function v8(Z,X={}){let q=yM(Z,X);for(let Q of SM(Z,q))if(bM(Q))return Q;return}var f1,EM,vM=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";var v9=B(()=>{f1=P6.platform==="win32",EM=f1?/[\/\\]/v:/\//v});import{openSync as hM,readSync as fM,closeSync as gM}from"node:fs";import{Buffer as mM}from"node:buffer";import j2 from"node:path";import I2 from"node:process";var S9=(Z,X,q)=>{let Q={file:Z,commandArguments:[...X],options:q};if(q.shell||I2.platform!=="win32")return Q;return dM(Q)},uM,pM,dM=(Z)=>{let X=cM(Z);if(X!==void 0&&uM.test(X)){if(Z.options.argv0===void 0)Z.options.argv0=Z.file;return Z.file=X,Z}for(let Y of[Z.file,...Z.commandArguments])tM(Y);let q=X!==void 0&&pM.test(X),Q=u3(j2.normalize(X??Z.file)),$=Z.commandArguments.map((Y)=>XF(Y,q)),J=`"${[Q,...$].join(" ")}"`;return Z.options.windowsVerbatimArguments=!0,{file:I2.env.comspec||"cmd.exe",commandArguments:["/d","/s","/c",J],options:Z.options}},cM=(Z)=>{let X=y9(Z),q=X!==void 0&&aM(X);if(!q)return X;return Z.commandArguments.unshift(X),Z.file=q,y9(Z)},y9=(Z)=>{let X=Z.options.env||I2.env,q=Z.options.cwd??I2.cwd(),Q=v6(X,"PATHEXT"),$=j2.extname(Z.file),J=$===""?Q:`${$}${j2.delimiter}${Q??""}`;if(lM(Z.file))return v8(j2.resolve(q,Z.file),{cwd:q,pathExt:J});let Y=v6(X,"PATH")??v6(I2.env,"PATH")??"",H={cwd:q,path:Y,pathExt:J};return nM(X)?v8(Z.file,H):iM(Z.file,H)},lM=(Z)=>Z.includes("/")||Z.includes("\\")||Z.includes(":"),nM=(Z)=>v6(I2.env,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0&&v6(Z,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0,iM=(Z,{cwd:X,path:q,pathExt:Q})=>{for(let $ of q.split(j2.delimiter)){let J=$.length>1&&$.startsWith('"')&&$.endsWith('"')?$.slice(1,-1):$;if(J==="")continue;let Y=v8(j2.resolve(X,J,Z),{cwd:X,pathExt:Q});if(Y!==void 0)return Y}},v6=(Z,X)=>{let q=Object.keys(Z).sort().find((Q)=>Q.toUpperCase()===X);return q===void 0?void 0:Z[q]},C9=150,aM=(Z)=>{let X=mM.alloc(C9);try{let q=hM(Z,"r");try{fM(q,X,0,C9,0)}finally{gM(q)}}catch{return}return sM(X.toString())},oM,sM=(Z)=>{let X=Z.match(oM)?.groups.line.trim();if(!X)return;let[q,Q]=X.split(" "),$=q.split("/").at(-1);if($==="env")return Q;return Q?`${$} ${Q}`:$},rM,tM=(Z)=>{if(rM.test(Z))throw TypeError(`The command and its arguments cannot contain a line break on Windows without a shell.
|
|
39
|
+
This would allow a command injection with \`cmd.exe\`.
|
|
40
|
+
Invalid value: ${JSON.stringify(`${Z}`)}`)},eM,u3=(Z)=>Z.replaceAll(eM,"^$&"),ZF,XF=(Z,X)=>{let q=`${Z}`.replaceAll(ZF,($,J,Y)=>{let H=Y[J+$.length];return H==='"'||H===void 0?$.repeat(2):$}).replaceAll('"',"\\\""),Q=u3(`"${q}"`);return X?u3(Q):Q};var b9=B(()=>{v9();uM=/\.(?:com|exe)$/i,pM=/\.(?:bat|cmd)$/i,oM=/^#!(?<line>.*)/,rM=/[\n\r]/,eM=/[()\][%!^"`<>&|;, *?]/g,ZF=/\\+/g});import{statSync as qF}from"node:fs";import QF from"node:path";import $F from"node:process";var h9=(Z=f9())=>{let X=B2(Z,'The "cwd" option');return QF.resolve(X)},f9=()=>{try{return $F.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
|
|
41
|
+
${Z.message}`,Z}},g9=(Z,X)=>{if(X===f9())return Z;let q;try{q=qF(X)}catch(Q){return`The "cwd" option is invalid: ${X}.
|
|
42
|
+
${Q.message}
|
|
43
|
+
${Z}`}if(!q.isDirectory())return`The "cwd" option is not a directory: ${X}.
|
|
44
|
+
${Z}`;return Z};var p3=B(()=>{L2()});import JF from"node:path";import m9 from"node:process";var YF,y8=(Z,X,q)=>{let Q={__proto__:null,...q};Q.cwd=h9(Q.cwd);let[$,J,Y]=O9(Z,X,Q),H=a$(Y),U=HF(H);U.env=KF(U);let{file:G,commandArguments:W}=S9($,J,U);if(j9(U),E9(U),N9(U),dJ(U),A9(U),U.shell=G3(U.shell),U.killSignal=fJ(U.killSignal),U.forceKillAfterDelay=uJ(U.forceKillAfterDelay),U.lines=U.lines.map((V,L)=>V&&!D0.has(U.encoding)&&U.buffer[L]),m9.platform==="win32"&&YF.test(JF.basename(G)))W.unshift("/q");return{file:G,commandArguments:W,options:U}},HF=({extendEnv:Z=!0,preferLocal:X=!1,cwd:q,localDir:Q=q,encoding:$="utf8",reject:J=!0,cleanup:Y=!0,killDescendants:H=!1,all:U=!1,windowsHide:G=!0,killSignal:W="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:L=!1,ipcInput:z,ipc:_=z!==void 0||L,serialization:R="advanced",...M})=>({__proto__:null,...M,extendEnv:Z,preferLocal:X,cwd:q,localDirectory:Q,encoding:$,reject:J,cleanup:Y,killDescendants:H,all:U,windowsHide:G,killSignal:W,forceKillAfterDelay:V,gracefulCancel:L,ipcInput:z,ipc:_,serialization:R}),KF=({env:Z,extendEnv:X,preferLocal:q,node:Q,localDirectory:$,nodePath:J})=>{let Y=X?{...m9.env,...Z}:Z;if(q||Q)return IJ({env:Y,cwd:$,execPath:J,preferLocal:q,addExecPath:Q});return Y};var d3=B(()=>{wJ();R8();I6();O3();S3();b3();h3();f3();h1();b9();p3();L2();q1();YF=/^cmd(?:\.exe)?$/i});var C8=(Z,X,q)=>q.shell&&X.length>0?[[Z,...X].join(" "),[],q]:[Z,X,q];var c3=()=>{};function w2(Z){if(typeof Z==="string")return UF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return GF(Z)}var UF=(Z)=>Z.at(-1)===u9?Z.slice(0,Z.at(-2)===p9?-2:-1):Z,GF=(Z)=>Z.at(-1)===WF?Z.subarray(0,Z.at(-2)===VF?-2:-1):Z,u9=`
|
|
45
|
+
`,WF,p9="\r",VF;var l3=B(()=>{WF=u9.codePointAt(0),VF=p9.codePointAt(0)});function h0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function n3(Z,{checkOpen:X=!0}={}){return h0(Z,{checkOpen:X})&&(Z.writable||!X)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function g1(Z,{checkOpen:X=!0}={}){return h0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function i3(Z,X){return n3(Z,X)&&g1(Z,X)}var m1=()=>{};class d9{#q;#Q;#X=!1;#Y=void 0;constructor(Z,X){this.#q=Z,this.#Q=X}next(){let Z=()=>this.#K();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let X=()=>this.#V(Z);return this.#Y?this.#Y.then(X,X):X()}async#K(){if(this.#X)return{done:!0,value:void 0};let Z;try{Z=await this.#q.read()}catch(X){throw this.#Y=void 0,this.#X=!0,this.#q.releaseLock(),X}return Z.done&&(this.#Y=void 0,this.#X=!0,this.#q.releaseLock()),Z}async#V(Z){if(this.#X)return{done:!0,value:Z};if(this.#X=!0,!this.#Q){let X=this.#q.cancel(Z);return this.#q.releaseLock(),await X,{done:!0,value:Z}}return this.#q.releaseLock(),{done:!0,value:Z}}}function c9(){return this[a3].next()}function l9(Z){return this[a3].return(Z)}function o3({preventCancel:Z=!1}={}){let X=this.getReader(),q=new d9(X,Z),Q=Object.create(LF);return Q[a3]=q,Q}var BF,a3,LF;var n9=B(()=>{BF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);a3=Symbol();Object.defineProperty(c9,"name",{value:"next"});Object.defineProperty(l9,"name",{value:"return"});LF=Object.create(BF,{next:{enumerable:!0,configurable:!0,writable:!0,value:c9},return:{enumerable:!0,configurable:!0,writable:!0,value:l9}})});var i9=()=>{};var a9=B(()=>{n9();i9()});var o9=(Z)=>{if(g1(Z,{checkOpen:!1})&&y6.on!==void 0)return _F(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(zF.call(Z)==="[object ReadableStream]")return o3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},zF,_F=async function*(Z){let X=new AbortController,q={};RF(Z,X,q);try{for await(let[Q]of y6.on(Z,"data",{signal:X.signal}))yield Q}catch(Q){if(q.error!==void 0)throw q.error;else if(!X.signal.aborted)throw Q}finally{Z.destroy()}},RF=async(Z,X,q)=>{try{await y6.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){q.error=Q}finally{X.abort()}},y6;var s3=B(()=>{m1();a9();({toString:zF}=Object.prototype),y6={}});var k2=async(Z,{init:X,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,finalize:H},{maxBuffer:U=Number.POSITIVE_INFINITY}={})=>{let G=o9(Z),W=X();W.length=0;try{for await(let V of G){let L=FF(V),z=q[L](V,W);t9({convertedChunk:z,state:W,getSize:Q,truncateChunk:$,addChunk:J,maxBuffer:U})}return MF({state:W,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,maxBuffer:U}),H(W)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(W),L}},MF=({state:Z,getSize:X,truncateChunk:q,addChunk:Q,getFinalChunk:$,maxBuffer:J})=>{let Y=$(Z);if(Y!==void 0)t9({convertedChunk:Y,state:Z,getSize:X,truncateChunk:q,addChunk:Q,maxBuffer:J})},t9=({convertedChunk:Z,state:X,getSize:q,truncateChunk:Q,addChunk:$,maxBuffer:J})=>{let Y=q(Z),H=X.length+Y;if(H<=J){s9(Z,X,$,H);return}let U=Q(Z,J-X.length);if(U!==void 0)s9(U,X,$,J);throw new Q1},s9=(Z,X,q,Q)=>{X.contents=q(Z,X,Q),X.length=Q},FF=(Z)=>{let X=typeof Z;if(X==="string")return"string";if(X!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let q=r9.call(Z);if(q==="[object ArrayBuffer]")return"arrayBuffer";if(q==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&r9.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},r9,Q1;var C6=B(()=>{s3();({toString:r9}=Object.prototype);Q1=class Q1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var $1=(Z)=>Z,S6=()=>{return},S8=({contents:Z})=>Z,b8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},h8=(Z)=>Z.length;var f8=()=>{};async function g8(Z,X){return k2(Z,jF,X)}var DF=()=>({contents:[]}),AF=()=>1,TF=(Z,{contents:X})=>{return X.push(Z),X},jF;var e9=B(()=>{C6();f8();jF={init:DF,convertChunk:{string:$1,buffer:$1,arrayBuffer:$1,dataView:$1,typedArray:$1,others:$1},getSize:AF,truncateChunk:S6,addChunk:TF,getFinalChunk:S6,finalize:S8}});async function m8(Z,X){return k2(Z,vF,X)}var IF=()=>({contents:new ArrayBuffer(0)}),wF=(Z)=>kF.encode(Z),kF,ZY=(Z)=>new Uint8Array(Z),XY=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),OF=(Z,X)=>Z.slice(0,X),NF=(Z,{contents:X,length:q},Q)=>{let $=$Y()?PF(X,Q):xF(X,Q);return new Uint8Array($).set(Z,q),$},xF=(Z,X)=>{if(X<=Z.byteLength)return Z;let q=new ArrayBuffer(QY(X));return new Uint8Array(q).set(new Uint8Array(Z),0),q},PF=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let q=new ArrayBuffer(X,{maxByteLength:QY(X)});return new Uint8Array(q).set(new Uint8Array(Z),0),q},QY=(Z)=>qY**Math.ceil(Math.log(Z)/Math.log(qY)),qY=2,EF=({contents:Z,length:X})=>$Y()?Z:Z.slice(0,X),$Y=()=>("resize"in ArrayBuffer.prototype),vF;var JY=B(()=>{C6();f8();kF=new TextEncoder,vF={init:IF,convertChunk:{string:wF,buffer:ZY,arrayBuffer:ZY,dataView:XY,typedArray:XY,others:b8},getSize:h8,truncateChunk:OF,addChunk:NF,getFinalChunk:S6,finalize:EF}});async function p8(Z,X){return k2(Z,hF,X)}var yF=()=>({contents:"",textDecoder:new TextDecoder}),u8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),CF=(Z,{contents:X})=>X+Z,SF=(Z,X)=>Z.slice(0,X),bF=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},hF;var YY=B(()=>{C6();f8();hF={init:yF,convertChunk:{string:$1,buffer:u8,arrayBuffer:u8,dataView:u8,typedArray:u8,others:b8},getSize:h8,truncateChunk:SF,addChunk:CF,getFinalChunk:bF,finalize:S8}});var HY=B(()=>{e9();JY();YY();C6()});import{on as fF}from"node:events";import{finished as gF}from"node:stream/promises";var d8=B(()=>{s3();HY();Object.assign(y6,{on:fF,finished:gF})});var KY=({error:Z,stream:X,readableObjectMode:q,lines:Q,encoding:$,fdNumber:J})=>{if(!(Z instanceof Q1))throw Z;if(J==="all")return Z;let Y=mF(q,Q,$);throw Z.maxBufferInfo={fdNumber:J,unit:Y},X.destroy(),Z},mF=(Z,X,q)=>{if(Z)return"objects";if(X)return"lines";if(q==="buffer")return"bytes";return"characters"},UY=(Z,X,q)=>{if(X.length!==q)return;let Q=new Q1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},GY=(Z,X)=>{let{streamName:q,threshold:Q,unit:$}=uF(Z,X);return`Command's ${q} was larger than ${Q} ${$}`},uF=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:q,unit:Q}}=Z;delete Z.maxBufferInfo;let $=X1(X,q);if(q==="ipc")return{streamName:"IPC output",threshold:$,unit:"messages"};return{streamName:e4(q),threshold:$,unit:Q}},WY=(Z,X,q)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((Q)=>Q!==null&&Q.length>c8(q)),VY=(Z,X,q)=>{if(!X)return Z;let Q=c8(q);return Z.length>Q?Z.slice(0,Q):Z},c8=([,Z])=>Z;var u1=B(()=>{d8();Z1();q1()});import{inspect as pF}from"node:util";var LY=({stdio:Z,all:X,ipcOutput:q,originalError:Q,signal:$,signalDescription:J,exitCode:Y,escapedCommand:H,timedOut:U,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_,maxBuffer:R,timeout:M,cwd:F})=>{let O=Q?.code,D=dF({originalError:Q,timedOut:U,timeout:M,isMaxBuffer:V,maxBuffer:R,errorCode:O,signal:$,signalDescription:J,exitCode:Y,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_}),w=lF(Q,F),T=w===void 0?"":`
|
|
46
|
+
${w}`,j=`${D}: ${H}${T}`,A=X===void 0?[Z[2],Z[1]]:[X],S=[j,...A,...Z.slice(3),q.map((k)=>nF(k)).join(`
|
|
47
|
+
`)].map((k)=>T6(w2(iF(k)))).filter(Boolean).join(`
|
|
48
|
+
|
|
49
|
+
`);return{originalMessage:w,shortMessage:j,message:S}},dF=({originalError:Z,timedOut:X,timeout:q,isMaxBuffer:Q,maxBuffer:$,errorCode:J,signal:Y,signalDescription:H,exitCode:U,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:z})=>{let _=cF(V,L);if(X)return`Command timed out after ${q} milliseconds${_}`;if(W){if(Y===void 0)return`Command was gracefully canceled with exit code ${U}`;return V?`Command was gracefully canceled${_}`:`Command was gracefully canceled with ${Y} (${H})`}if(G)return`Command was canceled${_}`;if(Q)return`${GY(Z,$)}${_}`;if(J!==void 0)return`Command failed with ${J}${_}`;if(V)return`Command was killed with ${z} (${_8(z)})${_}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(U!==void 0)return`Command failed with exit code ${U}`;return"Command failed"},cF=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",lF=(Z,X)=>{if(Z instanceof l0)return;let q=NJ(Z)?Z.originalMessage:String(Z?.message??Z),Q=T6(g9(q,X));return Q===""?void 0:Q},nF=(Z)=>typeof Z==="string"?Z:pF(Z),iF=(Z)=>Array.isArray(Z)?Z.map((X)=>w2(BY(X))).filter(Boolean).join(`
|
|
50
|
+
`):BY(Z),BY=(Z)=>{if(typeof Z==="string")return Z;if(e(Z))return r4(Z);return""};var zY=B(()=>{l3();F0();p3();q8();u1();I6();S1()});var l8=({command:Z,escapedCommand:X,stdio:q,all:Q,ipcOutput:$,options:{cwd:J},startTime:Y})=>_Y({command:Z,escapedCommand:X,cwd:J,durationMs:F3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:q[1],stderr:q[2],all:Q,stdio:q,ipcOutput:$,pipedFrom:[]}),O2=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:Y})=>b6({error:Z,command:X,escapedCommand:q,startTime:J,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:$,isSync:Y}),b6=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,stdio:V,all:L,ipcOutput:z,options:{timeoutDuration:_,timeout:R=_,forceKillAfterDelay:M,killSignal:F,cwd:O,maxBuffer:D},isSync:w})=>{let{exitCode:T,signal:j,signalDescription:A}=oF(G,W),{originalMessage:S,shortMessage:k,message:x}=LY({stdio:V,all:L,ipcOutput:z,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,forceKillAfterDelay:M,killSignal:F,maxBuffer:D,timeout:R,cwd:O}),E=kJ(Z,x,w);return Object.assign(E,aF({error:E,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:T,signal:j,signalDescription:A,stdio:V,all:L,ipcOutput:z,cwd:O,originalMessage:S,shortMessage:k})),E},aF=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,stdio:L,all:z,ipcOutput:_,cwd:R,originalMessage:M,shortMessage:F})=>_Y({shortMessage:F,originalMessage:M,command:X,escapedCommand:q,cwd:R,durationMs:F3(Q),failed:!0,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isTerminated:W!==void 0,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:z,stdio:L,ipcOutput:_,pipedFrom:[]}),_Y=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),oF=(Z,X)=>{let q=Z===null?void 0:Z,Q=X===null?void 0:X,$=Q===void 0?void 0:_8(X);return{exitCode:q,signal:Q,signalDescription:$}};var h6=B(()=>{I6();K8();S1();zY()});function sF(Z){return{days:Math.trunc(Z/86400000),hours:Math.trunc(Z/3600000%24),minutes:Math.trunc(Z/60000%60),seconds:Math.trunc(Z/1000%60),milliseconds:Math.trunc(Z%1000),microseconds:Math.trunc(RY(Z*1000)%1000),nanoseconds:Math.trunc(RY(Z*1e6)%1000)}}function rF(Z){return{days:Z/86400000n,hours:Z/3600000n%24n,minutes:Z/60000n%60n,seconds:Z/1000n%60n,milliseconds:Z%1000n,microseconds:0n,nanoseconds:0n}}function r3(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return sF(Z);break}case"bigint":return rF(Z)}throw TypeError("Expected a finite number or bigint")}var RY=(Z)=>Number.isFinite(Z)?Z:0;var MY=()=>{};function t3(Z,X){let q=typeof Z==="bigint";if(!q&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let Q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let $=[],J=(W,V)=>{let L=Math.floor(W*10**V+ZD);return(Math.round(L)/10**V).toFixed(V)},Y=(W,V,L,z)=>{if(($.length===0||!X.colonNotation)&&tF(W)&&!(X.colonNotation&&L==="m"))return;if(z??=String(W),X.colonNotation){let _=z.includes(".")?z.split(".")[0].length:z.length,R=$.length>0?2:1;z="0".repeat(Math.max(0,R-_))+z}else z+=X.verbose?" "+eF(V,W):L;$.push(z)},H=r3(Z),U=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(U)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(U,"day","d");else Y(U/365n,"year","y"),Y(U%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let W=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),z=Number(H.nanoseconds);if(Y(W,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(z,"nanosecond","ns");else{let _=V+L/1000+z/1e6,R=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,M=_>=1?Math.round(_):Math.ceil(_),F=R?_.toFixed(R):M;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let W=(q?Number(Z%XD):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,L=J(W,V),z=X.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(z),"second","s",z)}if($.length===0)return Q+"0"+(X.verbose?" milliseconds":"ms");let G=X.colonNotation?":":" ";if(typeof X.unitCount==="number")$=$.slice(0,Math.max(X.unitCount,1));return Q+$.join(G)}var tF=(Z)=>Z===0||Z===0n,eF=(Z,X)=>X===1||X===1n?Z:`${Z}s`,ZD=0.0000001,XD;var FY=B(()=>{MY();XD=24n*60n*60n*1000n});var DY=(Z,X)=>{if(Z.failed)c0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var AY=B(()=>{R2()});var TY=(Z,X)=>{if(!z2(X))return;DY(Z,X),qD(Z,X)},qD=(Z,X)=>{let q=`(done in ${t3(Z.durationMs)})`;c0({type:"duration",verboseMessage:q,verboseInfo:X,result:Z})};var jY=B(()=>{FY();_1();R2();AY()});var N2=(Z,X,{reject:q})=>{if(TY(Z,X),Z.failed&&q)throw Z;return Z};var n8=B(()=>{jY()});var e3=(Z,X)=>{if(p1(Z))return"asyncGenerator";if(NY(Z))return"generator";if(i8(Z))return"fileUrl";if(HD(Z))return"filePath";if(WD(Z))return"webStream";if(h0(Z,{checkOpen:!1}))return"native";if(e(Z))return"uint8Array";if(VD(Z))return"asyncIterable";if(BD(Z))return"iterable";if(XZ(Z))return kY({transform:Z},X);if(YD(Z))return QD(Z,X);return"native"},QD=(Z,X)=>{if(i3(Z.transform,{checkOpen:!1}))return $D(Z,X);if(XZ(Z.transform))return kY(Z,X);return JD(Z,X)},$D=(Z,X)=>{return OY(Z,X,"Duplex stream"),"duplex"},kY=(Z,X)=>{return OY(Z,X,"web TransformStream"),"webTransform"},OY=({final:Z,binary:X,objectMode:q},Q,$)=>{IY(Z,`${Q}.final`,$),IY(X,`${Q}.binary`,$),f6(q,`${Q}.objectMode`)},IY=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${q}.`)},JD=({transform:Z,final:X,binary:q,objectMode:Q},$)=>{if(Z!==void 0&&!wY(Z))throw TypeError(`The \`${$}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(i3(X,{checkOpen:!1}))throw TypeError(`The \`${$}.final\` option must not be a Duplex stream.`);if(XZ(X))throw TypeError(`The \`${$}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!wY(X))throw TypeError(`The \`${$}.final\` option must be a generator.`);return f6(q,`${$}.binary`),f6(Q,`${$}.objectMode`),p1(Z)||p1(X)?"asyncGenerator":"generator"},f6=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},wY=(Z)=>p1(Z)||NY(Z),p1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",NY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",YD=(Z)=>s(Z)&&(Z.transform!==void 0||Z.final!==void 0),i8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",xY=(Z)=>i8(Z)&&Z.protocol!=="file:",HD=(Z)=>s(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>KD.has(X))&&ZZ(Z.file),KD,ZZ=(Z)=>typeof Z==="string",g6=(Z)=>s(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>UD.has(X))&&("value"in Z),UD,PY=(Z,X)=>Z==="native"&&typeof X==="string"&&!GD.has(X),GD,EY=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",a8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",WD=(Z)=>EY(Z)||a8(Z),XZ=(Z)=>EY(Z?.readable)&&a8(Z?.writable),VD=(Z)=>vY(Z)&&typeof Z[Symbol.asyncIterator]==="function",BD=(Z)=>vY(Z)&&typeof Z[Symbol.iterator]==="function",vY=(Z)=>typeof Z==="object"&&Z!==null,N0,o8,qZ,yY,CY,F1;var W0=B(()=>{m1();t0();F0();KD=new Set(["file","append"]),UD=new Set(["value","input"]),GD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),N0=new Set(["generator","asyncGenerator","duplex","webTransform"]),o8=new Set(["fileUrl","filePath","fileNumber"]),qZ=new Set(["fileUrl","filePath"]),yY=new Set([...qZ,"webStream","nodeStream"]),CY=new Set(["webTransform","duplex"]),F1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var QZ=(Z,X,q,Q)=>Q==="output"?LD(Z,X,q):zD(Z,X,q),LD=(Z,X,q)=>{let Q=X!==0&&q[X-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},zD=(Z,X,q)=>{let Q=X===0?Z===!0:q[X-1].value.readableObjectMode,$=X!==q.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:$}},SY=(Z,X)=>{let q=Z.findLast(({type:Q})=>N0.has(Q));if(q===void 0)return!1;return X==="input"?q.value.writableObjectMode:q.value.readableObjectMode};var $Z=B(()=>{W0()});var bY=(Z,X,q,Q)=>[...Z.filter(({type:$})=>!N0.has($)),..._D(Z,X,q,Q)],_D=(Z,X,q,{encoding:Q})=>{let $=Z.filter(({type:Y})=>N0.has(Y)),J=Array.from({length:$.length});for(let[Y,H]of Object.entries($))J[Y]=RD({stdioItem:H,index:Number(Y),newTransforms:J,optionName:X,direction:q,encoding:Q});return AD(J,q)},RD=({stdioItem:Z,stdioItem:{type:X},index:q,newTransforms:Q,optionName:$,direction:J,encoding:Y})=>{if(X==="duplex")return MD({stdioItem:Z,optionName:$});if(X==="webTransform")return FD({stdioItem:Z,index:q,newTransforms:Q,direction:J});return DD({stdioItem:Z,index:q,newTransforms:Q,direction:J,encoding:Y})},MD=({stdioItem:Z,optionName:X})=>{let{value:q}=Z,{transform:Q}=q,{writableObjectMode:$,readableObjectMode:J}=Q,{objectMode:Y=J}=q;if(Y&&!J)throw TypeError(`The \`${X}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&J)throw TypeError(`The \`${X}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:Q,writableObjectMode:$,readableObjectMode:J}}},FD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$})=>{let{transform:J,objectMode:Y}=s(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:U}=QZ(Y,q,Q,$);return{...Z,value:{transform:J,writableObjectMode:H,readableObjectMode:U}}},DD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$,encoding:J})=>{let{transform:Y,final:H,binary:U=!1,preserveNewlines:G=!1,objectMode:W}=s(X)?X:{transform:X},V=U||D0.has(J),{writableObjectMode:L,readableObjectMode:z}=QZ(W,q,Q,$);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:G,writableObjectMode:L,readableObjectMode:z}}},AD=(Z,X)=>X==="input"?Z.reverse():Z;var hY=B(()=>{t0();h1();W0();$Z()});import JZ from"node:process";var fY=(Z,X,q)=>{let Q=Z.map(($)=>TD($,X));if(Q.includes("input")&&Q.includes("output"))throw TypeError(`The \`${q}\` option must not be an array of both readable and writable values.`);return Q.find(Boolean)??kD},TD=(Z,X)=>ID[X]??jD(Z),jD=({type:Z,value:X,direction:q,optionName:Q})=>{let $=gY[Z](X);if(q==="input"&&$==="output")throw TypeError(`The \`${Q}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);return q??$},ID,x2=()=>{return},YZ=()=>"input",gY,wD=(Z)=>{if([0,JZ.stdin].includes(Z))return"input";if([1,2,JZ.stdout,JZ.stderr].includes(Z))return"output"},kD="output";var mY=B(()=>{m1();W0();ID=["input","output","output"],gY={generator:x2,asyncGenerator:x2,fileUrl:x2,filePath:x2,iterable:YZ,asyncIterable:YZ,uint8Array:YZ,webStream:(Z)=>a8(Z)?"output":"input",nodeStream(Z){if(!g1(Z,{checkOpen:!1}))return"output";return n3(Z,{checkOpen:!1})?void 0:"input"},webTransform:x2,duplex:x2,native(Z){let X=wD(Z);if(X!==void 0)return X;if(h0(Z,{checkOpen:!1}))return gY.nodeStream(Z)}}});var uY=(Z,X)=>X?[...Z,"ipc"]:Z;var pY=()=>{};var lY=({stdio:Z,ipc:X,buffer:q,...Q},$,J)=>{let Y=xD(Z,Q).map((H,U)=>nY(H,U));return OD(Y),J?ED(Y,q,$):uY(Y,X)},OD=(Z)=>{if(Z.some((X)=>ND(X)))throw Error("The `ipc: true` option must be used instead of `stdio: 'ipc'`.")},ND=(Z)=>{if(Array.isArray(Z))return Z.some((X)=>dY(X));return dY(Z)},dY=(Z)=>{if(g6(Z))return Z.value==="ipc";return Z==="ipc"},xD=(Z,X)=>{if(Z===void 0)return O0.map((Q)=>X[Q]);if(PD(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${O0.map((Q)=>`\`${Q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let q=Math.max(Z.length,O0.length);return Array.from({length:q},(Q,$)=>Z[$])},PD=(Z)=>O0.some((X)=>Z[X]!==void 0),nY=(Z,X)=>{if(Array.isArray(Z))return Z.map((q)=>nY(q,X));if(Z===null||Z===void 0)return X>=O0.length?"ignore":"pipe";return Z},ED=(Z,X,q)=>Z.map((Q,$)=>!X[$]&&$!==0&&!_2(q,$)&&vD(Q,$)?"ignore":Q),vD=(Z,X)=>cY(Z,X)||Array.isArray(Z)&&Z.every((q)=>cY(q,X)),cY=(Z,X)=>Z==="pipe"||yD(Z,X),yD=(Z,X)=>g6(Z)&&Z.value==="pipe"&&(Z.input===void 0||Z.input===!1||CD(X,Z.input)),CD=(Z,X)=>X===!0&&(Z===1||Z===2);var iY=B(()=>{Z1();pY();_1();W0()});var r8=(Z,X="stdin")=>{let{options:Q,fileDescriptors:$}=i0.get(Z),J=aY($,X,!0),Y=Z.stdio[J];if(Y===null)throw TypeError(oY(J,X,Q,!0));return Y},P2=(Z,X="stdout")=>{let{options:Q,fileDescriptors:$}=i0.get(Z),J=aY($,X,!1),Y=J==="all"?Z.all:Z.stdio[J];if(Y===null||Y===void 0)throw TypeError(oY(J,X,Q,!1));return Y},i0,aY=(Z,X,q)=>{let Q=SD(X,q);return bD(Q,X,q,Z),Q},SD=(Z,X)=>{let q=z3(Z);if(q!==void 0)return q;let{validOptions:Q,defaultValue:$}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${m6(X)}" must not be "${Z}".
|
|
51
|
+
It must be ${Q} or "fd3", "fd4" (and so on).
|
|
52
|
+
It is optional and defaults to "${$}".`)},bD=(Z,X,q,Q)=>{let $=Q[sY(Z)];if($===void 0)throw TypeError(`"${m6(q)}" must not be ${X}. That file descriptor does not exist.
|
|
53
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if($.direction==="input"&&!q)throw TypeError(`"${m6(q)}" must not be ${X}. It must be a readable stream, not writable.`);if($.direction!=="input"&&q)throw TypeError(`"${m6(q)}" must not be ${X}. It must be a writable stream, not readable.
|
|
54
|
+
If you meant to use it as input, please set its "stdio" option to \`{value: 'pipe', input: true}\`.`)},oY=(Z,X,q,Q)=>{if(Z==="all"&&!q.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:$,optionValue:J}=hD(Z,q);return`The "${$}: ${s8(J)}" option is incompatible with using "${m6(Q)}: ${s8(X)}".
|
|
55
|
+
Please set this option with "pipe" instead.`},hD=(Z,{stdin:X,stdout:q,stderr:Q,stdio:$})=>{let J=sY(Z);if(J===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if(J===1&&q!==void 0)return{optionName:"stdout",optionValue:q};if(J===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${J}]`,optionValue:$[J]}},sY=(Z)=>Z==="all"?1:Z,m6=(Z)=>Z?"to":"from",s8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var D1=B(()=>{q1();i0=new WeakMap});import{readFileSync as fD}from"node:fs";import gD from"node:tty";var tY=({stdioItem:Z,stdioItem:{type:X},isStdioArray:q,fdNumber:Q,direction:$,isSync:J})=>{if(!q||X!=="native")return Z;return J?mD({stdioItem:Z,fdNumber:Q,direction:$}):dD({stdioItem:Z,fdNumber:Q})},mD=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q,direction:$})=>{let J=uD({value:X,optionName:q,fdNumber:Q,direction:$});if(J!==void 0)return J;if(h0(X,{checkOpen:!1}))throw TypeError(`The \`${q}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},uD=({value:Z,optionName:X,fdNumber:q,direction:Q})=>{let $=pD(Z,q);if($===void 0)return;if(Q==="output")return{type:"fileNumber",value:$,optionName:X};if(gD.isatty($))throw TypeError(`The \`${X}: ${s8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:e0(fD($)),optionName:X}},pD=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let q=t4.indexOf(Z);if(q!==-1)return q},dD=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q})=>{if(X==="inherit")return{type:"nodeStream",value:rY(Q,X,q),optionName:q};if(typeof X==="number")return{type:"nodeStream",value:rY(X,X,q),optionName:q};if(h0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:q};return Z},rY=(Z,X,q)=>{let Q=t4[Z];if(Q===void 0)throw TypeError(`The \`${q}: ${X}\` option is invalid: no such standard stream.`);return Q};var eY=B(()=>{m1();Z1();F0();D1()});var ZH=({input:Z,inputFile:X},q)=>q===0?[...cD(Z),...nD(X)]:[],cD=(Z)=>Z===void 0?[]:[{type:lD(Z),value:Z,optionName:"input"}],lD=(Z)=>{if(g1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(e(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},nD=(Z)=>Z===void 0?[]:[{...iD(Z),optionName:"inputFile"}],iD=(Z)=>{if(i8(Z))return{type:"fileUrl",value:Z};if(ZZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var XH=B(()=>{m1();F0();W0()});var qH=(Z)=>Z.filter((X,q)=>Z.every((Q,$)=>!aD(X,Q)||q>=$||X.type==="generator"||X.type==="asyncGenerator")),aD=(Z,X)=>Z.value===X.value&&Z.direction===X.direction,QH=({stdioItem:{type:Z,value:X,optionName:q},direction:Q,fileDescriptors:$,isSync:J})=>{let Y=oD($,Z);if(Y.length===0)return;if(J){sD({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});return}if(yY.has(Z))return $H({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});if(CY.has(Z))tD({otherStdioItems:Y,type:Z,value:X,optionName:q})},oD=(Z,X)=>Z.flatMap(({direction:q,stdioItems:Q})=>Q.filter(($)=>$.type===X).map(($)=>({...$,direction:q}))),sD=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{if(qZ.has(X))$H({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})},$H=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{let J=Z.filter((H)=>rD(H,q));if(J.length===0)return;let Y=J.find((H)=>H.direction!==$);return JH(Y,Q,X),$==="output"?J[0].stream:void 0},rD=({type:Z,value:X},q)=>{if(Z==="filePath")return X.file===q.file;if(Z==="fileUrl")return X.href===q.href;return X===q},tD=({otherStdioItems:Z,type:X,value:q,optionName:Q})=>{let $=Z.find(({value:{transform:J}})=>J===q.transform);JH($,Q,X)},JH=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${F1[q]} that is the same.`)};var YH=B(()=>{W0()});var t8=(Z,X,q,Q)=>{let J=lY(X,q,Q).map((H,U)=>eD({stdioOption:H,fdNumber:U,options:X,isSync:Q})),Y=GA({initialFileDescriptors:J,addProperties:Z,options:X,isSync:Q});return X.stdio=Y.map(({stdioItems:H})=>BA(H)),Y},eD=({stdioOption:Z,fdNumber:X,options:q,isSync:Q})=>{let $=e4(X),{stdioItems:J,isStdioArray:Y}=ZA({stdioOption:Z,fdNumber:X,options:q,optionName:$}),H=fY(J,X,$),U=J.map((V)=>tY({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:Q})),G=bY(U,$,H,q),W=SY(G,H);return UA(G,W),{direction:H,objectMode:W,stdioItems:G}},ZA=({stdioOption:Z,fdNumber:X,options:q,optionName:Q})=>{let $=Array.isArray(Z)?Z:[Z],J=ZH(q,X),Y=[...XA($.map((G)=>QA(G,Q)),J),...J],H=qH(Y),U=H.length>1;return JA(H,U,Q),HA(H),{stdioItems:H,isStdioArray:U}},XA=(Z,X)=>X.length>0&&qA(Z)?[]:Z,qA=(Z)=>Z.length===1&&Z[0].type==="native"&&Z[0].value==="inherit",QA=(Z,X)=>{if(g6(Z))return $A(Z,X);return{type:e3(Z,X),value:Z,optionName:X}},$A=({value:Z,input:X},q)=>{return f6(X,`${q}.input`),{type:e3(Z,q),value:Z,direction:X?"input":void 0,optionName:q}},JA=(Z,X,q)=>{if(Z.length===0)throw TypeError(`The \`${q}\` option must not be an empty array.`);if(!X)return;for(let{value:Q,optionName:$}of Z)if(YA.has(Q))throw Error(`The \`${$}\` option must not include \`${Q}\`.`)},YA,HA=(Z)=>{for(let X of Z)KA(X)},KA=({type:Z,value:X,optionName:q})=>{if(xY(X))throw TypeError(`The \`${q}: URL\` option must use the \`file:\` scheme.
|
|
56
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(PY(Z,X))throw TypeError(`The \`${q}: { file: '...' }\` option must be used instead of \`${q}: '...'\`.`)},UA=(Z,X)=>{if(!X)return;let q=Z.find(({type:Q})=>o8.has(Q));if(q!==void 0)throw TypeError(`The \`${q.optionName}\` option cannot use both files and transforms in objectMode.`)},GA=({initialFileDescriptors:Z,addProperties:X,options:q,isSync:Q})=>{let $=[];try{for(let J of Z)$.push(WA({fileDescriptor:J,fileDescriptors:$,addProperties:X,options:q,isSync:Q}));return $}catch(J){throw HZ($),J}},WA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:q},fileDescriptors:Q,addProperties:$,options:J,isSync:Y})=>{let H=q.map((U)=>VA({stdioItem:U,addProperties:$,direction:Z,options:J,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},VA=({stdioItem:Z,addProperties:X,direction:q,options:Q,fileDescriptors:$,isSync:J})=>{let Y=QH({stdioItem:Z,direction:q,fileDescriptors:$,isSync:J});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[q][Z.type](Z,Q)}},HZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:q}of X)if(q!==void 0&&!S0(q))q.destroy()},BA=(Z)=>{if(Z.length>1)return Z.some(({value:Q})=>Q==="overlapped")?"overlapped":"pipe";let[{type:X,value:q}]=Z;return X==="native"?q:"pipe"};var e8=B(()=>{Z1();hY();$Z();W0();mY();iY();eY();XH();YH();YA=new Set(["ignore"])});import{readFileSync as HH}from"node:fs";var UH=(Z,X)=>t8(zA,Z,X,!0),a0=({type:Z,optionName:X})=>{WH(X,F1[Z])},GH=({optionName:Z,value:X})=>{if(X==="overlapped")WH(Z,`"${X}"`);return{}},LA=(Z)=>{let{optionName:X,value:q}=Z;if(q==="pipe"&&X!=="stdin")throw TypeError(`Only the \`stdin\` option, not \`${X}\`, can be an input pipe with synchronous methods.`);return GH(Z)},WH=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},KH,zA;var VH=B(()=>{F0();e8();W0();KH={generator(){},asyncGenerator:a0,webStream:a0,nodeStream:a0,webTransform:a0,duplex:a0,asyncIterable:a0,native:GH},zA={input:{...KH,native:LA,fileUrl:({value:Z})=>({contents:[e0(HH(Z))]}),filePath:({value:{file:Z}})=>({contents:[e0(HH(Z))]}),fileNumber:a0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...KH,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:a0,string:a0,uint8Array:a0}}});var J1=(Z,{stripFinalNewline:X},q)=>KZ(X,q)&&Z!==void 0&&!Array.isArray(Z)?w2(Z):Z,KZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var u6=B(()=>{l3()});var Z7=(Z,X,q,Q)=>Z||q?void 0:LH(X,Q),GZ=(Z,X,q)=>q?Z.flatMap((Q)=>BH(Q,X)):BH(Z,X),BH=(Z,X)=>{let{transform:q,final:Q}=LH(X,{});return[...q(Z),...Q()]},LH=(Z,X)=>{return X.previousChunks="",{transform:_A.bind(void 0,X,Z),final:MA.bind(void 0,X)}},_A=function*(Z,X,q){if(typeof q!=="string"){yield q;return}let{previousChunks:Q}=Z,$=-1;for(let J=0;J<q.length;J+=1){if(q[J]!==`
|
|
57
|
+
`)continue;let Y=RA(q,J,X,Z),H=q.slice($+1,J+1-Y);if(Q.length>0)H=UZ(Q,H),Q="";yield H,$=J}if($!==q.length-1)Q=UZ(Q,q.slice($+1));Z.previousChunks=Q},RA=(Z,X,q,Q)=>{if(q)return 0;return Q.isWindowsNewline=X!==0&&Z[X-1]==="\r",Q.isWindowsNewline?2:1},MA=function*({previousChunks:Z}){if(Z.length>0)yield Z},zH=({binary:Z,preserveNewlines:X,readableObjectMode:q,state:Q})=>Z||X||q?void 0:{transform:FA.bind(void 0,Q)},FA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:q,windowsNewline:Q,LF:$,concatBytes:J}=typeof X==="string"?DA:TA;if(X.at(-1)===$){yield X;return}yield J(X,Z?Q:q)},UZ=(Z,X)=>`${Z}${X}`,DA,AA=(Z,X)=>{let q=new Uint8Array(Z.length+X.length);return q.set(Z,0),q.set(X,Z.length),q},TA;var X7=B(()=>{DA={windowsNewline:`\r
|
|
58
|
+
`,unixNewline:`
|
|
59
|
+
`,LF:`
|
|
60
|
+
`,concatBytes:UZ},TA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:AA}});import{Buffer as jA}from"node:buffer";var _H=(Z,X)=>Z?void 0:IA.bind(void 0,X),IA=function*(Z,X){if(typeof X!=="string"&&!e(X)&&!jA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},RH=(Z,X)=>Z?wA.bind(void 0,X):kA.bind(void 0,X),wA=function*(Z,X){MH(Z,X),yield X},kA=function*(Z,X){if(MH(Z,X),typeof X!=="string"&&!e(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},MH=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
|
|
61
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
62
|
+
if (condition) { yield value; }`)};var FH=B(()=>{F0()});import{Buffer as OA}from"node:buffer";import{StringDecoder as NA}from"node:string_decoder";var q7=(Z,X,q)=>{if(q)return;if(Z)return{transform:xA.bind(void 0,new TextEncoder)};let Q=new NA(X);return{transform:PA.bind(void 0,Q),final:EA.bind(void 0,Q)}},xA=function*(Z,X){if(OA.isBuffer(X))yield e0(X);else if(typeof X==="string")yield Z.encode(X);else yield X},PA=function*(Z,X){yield e(X)?Z.write(X):X},EA=function*(Z){let X=Z.end();if(X!=="")yield X};var WZ=B(()=>{F0()});import{callbackify as DH}from"node:util";var VZ,Q7=async function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=yA}=X[q];for await(let $ of Q(Z))yield*Q7($,X,q+1)},AH=async function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*vA(q,Number(X),Z)},vA=async function*(Z,X,q){if(Z===void 0)return;for await(let Q of Z())yield*Q7(Q,q,X+1)},TH,yA=function*(Z){yield Z};var jH=B(()=>{VZ=DH(async(Z,X,q,Q)=>{X.currentIterable=Z(...q);try{for await(let $ of X.currentIterable)Q.push($)}finally{delete X.currentIterable}}),TH=DH(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var BZ=(Z,X,q,Q)=>{try{for(let $ of Z(...X))q.push($);Q()}catch($){Q($)}},IH=(Z,X)=>[...X.flatMap((q)=>[...d1(q,Z,0)]),...p6(Z)],d1=function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=SA}=X[q];for(let $ of Q(Z))yield*d1($,X,q+1)},p6=function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*CA(q,Number(X),Z)},CA=function*(Z,X,q){if(Z===void 0)return;for(let Q of Z())yield*d1(Q,q,X+1)},SA=function*(Z){yield Z};var LZ=()=>{};import{Transform as bA,getDefaultHighWaterMark as wH}from"node:stream";var zZ=({value:Z,value:{transform:X,final:q,writableObjectMode:Q,readableObjectMode:$},optionName:J},{encoding:Y})=>{let H={},U=kH(Z,Y,J),G=p1(X),W=p1(q),V=G?VZ.bind(void 0,Q7,H):BZ.bind(void 0,d1),L=G||W?VZ.bind(void 0,AH,H):BZ.bind(void 0,p6),z=G||W?TH.bind(void 0,H):void 0;return{stream:new bA({writableObjectMode:Q,writableHighWaterMark:wH(Q),readableObjectMode:$,readableHighWaterMark:wH($),transform(R,M,F){V([R,U,0],this,F)},flush(R){L([U],this,R)},destroy:z})}},$7=(Z,X,q,Q)=>{let $=X.filter(({type:Y})=>Y==="generator"),J=Q?$.reverse():$;for(let{value:Y,optionName:H}of J){let U=kH(Y,q,H);Z=IH(U,Z)}return Z},kH=({transform:Z,final:X,binary:q,writableObjectMode:Q,readableObjectMode:$,preserveNewlines:J},Y,H)=>{let U={};return[{transform:_H(Q,H)},q7(q,Y,Q),Z7(q,J,Q,U),{transform:Z,final:X},{transform:RH($,H)},zH({binary:q,preserveNewlines:J,readableObjectMode:$,state:U})].filter(Boolean)};var J7=B(()=>{W0();X7();FH();WZ();jH();LZ()});var OH=(Z,X)=>{for(let q of hA(Z))fA(Z,q,X)},hA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),fA=(Z,X,q)=>{let{stdioItems:Q}=Z[X],$=Q.filter(({contents:H})=>H!==void 0);if($.length===0)return;if(X!==0){let[{type:H,optionName:U}]=$;throw TypeError(`Only the \`stdin\` option, not \`${U}\`, can be ${F1[H]} with synchronous methods.`)}let Y=$.map(({contents:H})=>H).map((H)=>gA(H,Q));q.input=A6(Y)},gA=(Z,X)=>{let q=$7(Z,X,"utf8",!0);return mA(q),A6(q)},mA=(Z)=>{let X=Z.find((q)=>typeof q!=="string"&&!e(q));if(X!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${X}.`)};var NH=B(()=>{J7();F0();W0()});var Y7=({stdioItems:Z,encoding:X,verboseInfo:q,fdNumber:Q})=>Q!=="all"&&_2(q,Q)&&!D0.has(X)&&uA(Q)&&(Z.some(({type:$,value:J})=>$==="native"&&pA.has(J))||Z.every(({type:$})=>N0.has($))),uA=(Z)=>Z===1||Z===2,pA,xH=async(Z,X,q,Q)=>{for await(let $ of Z)if(!dA(X))EH($,q,Q)},PH=(Z,X,q)=>{for(let Q of Z)EH(Q,X,q)},dA=(Z)=>Z._readableState.pipes.length>0,EH=(Z,X,q)=>{let Q=Y8(Z);c0({type:"output",verboseMessage:Q,fdNumber:X,verboseInfo:q})};var _Z=B(()=>{h1();W0();R2();_1();pA=new Set(["pipe","overlapped"])});import{writeFileSync as cA,appendFileSync as lA}from"node:fs";var vH=({fileDescriptors:Z,syncResult:{output:X},options:q,isMaxBuffer:Q,verboseInfo:$})=>{if(X===null)return{output:Array.from({length:3})};let J={},Y=new Set;return{output:X.map((U,G)=>nA({result:U,fileDescriptors:Z,fdNumber:G,state:J,outputFiles:Y,isMaxBuffer:Q,verboseInfo:$},q)),...J}},nA=({result:Z,fileDescriptors:X,fdNumber:q,state:Q,outputFiles:$,isMaxBuffer:J,verboseInfo:Y},{buffer:H,encoding:U,lines:G,stripFinalNewline:W,maxBuffer:V})=>{if(Z===null)return;let L=VY(Z,J,V),z=e0(L),{stdioItems:_,objectMode:R}=X[q],M=iA([z],_,U,Q),{serializedResult:F,finalResult:O=F}=aA({chunks:M,objectMode:R,encoding:U,lines:G,stripFinalNewline:W,fdNumber:q});oA({serializedResult:F,fdNumber:q,state:Q,verboseInfo:Y,encoding:U,stdioItems:_,objectMode:R});let D=H[q]?O:void 0;try{if(Q.error===void 0)sA(F,_,$);return D}catch(w){return Q.error=w,D}},iA=(Z,X,q,Q)=>{try{return $7(Z,X,q,!1)}catch($){return Q.error=$,Z}},aA=({chunks:Z,objectMode:X,encoding:q,lines:Q,stripFinalNewline:$,fdNumber:J})=>{if(X)return{serializedResult:Z};if(q==="buffer")return{serializedResult:A6(Z)};let Y=m$(Z,q);if(Q[J])return{serializedResult:Y,finalResult:GZ(Y,!$[J],X)};return{serializedResult:Y}},oA=({serializedResult:Z,fdNumber:X,state:q,verboseInfo:Q,encoding:$,stdioItems:J,objectMode:Y})=>{if(!Y7({stdioItems:J,encoding:$,verboseInfo:Q,fdNumber:X}))return;let H=GZ(Z,!1,Y);try{PH(H,X,Q)}catch(U){q.error??=U}},sA=(Z,X,q)=>{let Q=X.filter(({type:$})=>o8.has($));for(let{path:$,append:J}of Q){let Y=typeof $==="string"?$:$.toString();if(J||q.has(Y))lA($,Z);else q.add(Y),cA($,Z)}};var yH=B(()=>{_Z();J7();X7();F0();W0();u1()});var CH=([,Z,X],q)=>{if(!q.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,J1(X,q,"all")];if(Array.isArray(X))return[J1(Z,q,"all"),...X];if(e(Z)&&e(X))return V3([Z,X]);return`${Z}${X}`};var SH=B(()=>{F0();u6()});import{once as RZ}from"node:events";var bH=async(Z,X)=>{let[q,Q]=await rA(Z);return X.isForcefullyTerminated??=!1,[q,Q]},rA=async(Z)=>{let[X,q]=await Promise.allSettled([RZ(Z,"spawn"),RZ(Z,"exit")]);if(X.status==="rejected")return[];return q.status==="rejected"?hH(Z):q.value},hH=async(Z)=>{try{return await RZ(Z,"exit")}catch{return hH(Z)}},fH=async(Z)=>{let[X,q]=await Z;if(!tA(X,q)&&MZ(X,q))throw new l0;return[X,q]},tA=(Z,X)=>Z===void 0&&X===void 0,MZ=(Z,X)=>Z!==0||X!==null;var FZ=B(()=>{S1()});var gH=({error:Z,status:X,signal:q,output:Q},{maxBuffer:$})=>{let J=eA(Z,X,q),Y=J?.code==="ETIMEDOUT",H=WY(J,Q,$);return{resultError:J,exitCode:X,signal:q,timedOut:Y,isMaxBuffer:H}},eA=(Z,X,q)=>{if(Z!==void 0)return Z;return MZ(X,q)?new l0:void 0};var mH=B(()=>{S1();u1();FZ()});import{spawnSync as ZT}from"node:child_process";var uH=(Z,X,q)=>{let{file:Q,commandArguments:$,command:J,escapedCommand:Y,startTime:H,verboseInfo:U,options:G,fileDescriptors:W}=XT(Z,X,q),V=$T({file:Q,commandArguments:$,options:G,command:J,escapedCommand:Y,verboseInfo:U,fileDescriptors:W,startTime:H});return N2(V,U,G)},XT=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=U8(Z,X,q),H=qT(q),{file:U,commandArguments:G,options:W}=y8(Z,X,H);QT(W);let V=UH(W,Y);return{file:U,commandArguments:G,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},qT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,QT=({ipc:Z,ipcInput:X,detached:q,cancelSignal:Q,killDescendants:$})=>{if(X)d6("ipcInput");if(Z)d6("ipc: true");if(q)d6("detached: true");if($)d6("killDescendants: true");if(Q)d6("cancelSignal")},d6=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},$T=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,verboseInfo:J,fileDescriptors:Y,startTime:H})=>{let U=JT({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:Y,startTime:H});if(U.failed)return U;let{resultError:G,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z}=gH(U,q),{output:_,error:R=G}=vH({fileDescriptors:Y,syncResult:U,options:q,isMaxBuffer:z,verboseInfo:J}),M=_.map((O,D)=>J1(O,q,D)),F=J1(CH(_,q),q,"all");return HT({error:R,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z,stdio:M,all:F,options:q,command:Q,escapedCommand:$,startTime:H})},JT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:J,startTime:Y})=>{try{OH(J,q);let H=YT(q);return ZT(...C8(Z,X,H))}catch(H){return O2({error:H,command:Q,escapedCommand:$,fileDescriptors:J,options:q,startTime:Y,isSync:!0})}},YT=({encoding:Z,maxBuffer:X,...q})=>({...q,encoding:"buffer",maxBuffer:c8(X)}),HT=({error:Z,exitCode:X,signal:q,timedOut:Q,isMaxBuffer:$,stdio:J,all:Y,options:H,command:U,escapedCommand:G,startTime:W})=>Z===void 0?l8({command:U,escapedCommand:G,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W}):b6({error:Z,command:U,escapedCommand:G,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:$,isForcefullyTerminated:!1,exitCode:X,signal:q,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W,isSync:!0});var pH=B(()=>{D3();d3();c3();h6();n8();VH();u6();NH();yH();u1();SH();mH()});import{once as DZ,on as KT}from"node:events";var AZ,dH=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$={})=>{let{reference:J=!0,filter:Y}=$,{signal:H}=$[AZ]??{};return M2({methodName:"getOneMessage",isSubprocess:q,ipc:Q,isConnected:O8(Z)}),UT({anyProcess:Z,channel:X,isSubprocess:q,filter:Y,reference:J,signal:H})},UT=async({anyProcess:Z,channel:X,isSubprocess:q,filter:Q,reference:$,signal:J})=>{A8(X,$);let Y=M1(Z,X,q),H=new AbortController;GT(J,H);try{return await Promise.race([WT(Y,Q,H),VT(Y,q,H),BT(Y,q,H)])}catch(U){throw F2(Z),U}finally{H.abort(),T8(X,$)}},GT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},WT=async(Z,X,{signal:q})=>{if(X===void 0){let[Q]=await DZ(Z,"message",{signal:q});return Q}for await(let[Q]of KT(Z,"message",{signal:q}))if(X(Q))return Q},VT=async(Z,X,{signal:q})=>{await DZ(Z,"disconnect",{signal:q}),lJ(X)},BT=async(Z,X,{signal:q})=>{let[Q]=await DZ(Z,"strict:error",{signal:q});throw F8(Q,X)};var TZ=B(()=>{D2();O6();w6();AZ=Symbol("internalGetOneMessageOptions")});import{once as lH,on as LT}from"node:events";var jZ,nH=(Z,X={})=>{let{reference:q=!0}=X,{signal:Q,shouldAwait:$=!Z.isSubprocess}=X[jZ]??{};return IZ({...Z,shouldAwait:$,reference:q,signal:Q})},IZ=({anyProcess:Z,waitProcess:X=Z,channel:q,isSubprocess:Q,ipc:$,shouldAwait:J,reference:Y,signal:H})=>{M2({methodName:"getEachMessage",isSubprocess:Q,ipc:$,isConnected:O8(Z)}),A8(q,Y);let U=M1(Z,q,Q),G=new AbortController,W={};return zT(H,G),_T(Z,U,G),RT({ipcEmitter:U,isSubprocess:Q,controller:G,state:W}),MT({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:U,isSubprocess:Q,shouldAwait:J,controller:G,state:W,reference:Y})},zT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},_T=async(Z,X,q)=>{try{await lH(X,"disconnect",{signal:q.signal}),q.abort()}catch{}},RT=async({ipcEmitter:Z,isSubprocess:X,controller:q,state:Q})=>{try{let[$]=await lH(Z,"strict:error",{signal:q.signal});Q.error=F8($,X),q.abort()}catch{}},MT=async function*({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:Q,isSubprocess:$,shouldAwait:J,controller:Y,state:H,reference:U}){try{for await(let[G]of LT(Q,"message",{signal:Y.signal}))cH(H),yield G}catch{cH(H)}finally{if(Y.abort(),T8(q,U),!$)F2(Z);if(J)await X}},cH=({error:Z})=>{if(Z)throw Z};var H7=B(()=>{D2();O6();w6();jZ=Symbol("internalGetEachMessageOptions")});import iH from"node:process";var aH=(Z,X,{ipc:q})=>{Object.assign(Z,sH(X,!1,q,Z))},oH=()=>{let Z=iH,X=!0,q=iH.channel!==void 0;return{...sH(Z,!0,q),getCancelSignal:F9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:q})}},sH=(Z,X,q,Q=Z)=>({sendMessage:T2.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getOneMessage:dH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getEachMessage:nH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q,waitProcess:Q})});var wZ=B(()=>{N6();TZ();H7();w8()});import{ChildProcess as FT}from"node:child_process";import{PassThrough as DT,Readable as tH,Writable as eH,Duplex as ZK}from"node:stream";var XK=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,verboseInfo:Y})=>{HZ(Q);let H=new FT,U=AT(H,Q),G=O2({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:!1}),W=wT(G,Y,$);return{subprocess:H,promise:W,all:$.all?U:void 0,convertedStreams:{readable:qK,writable:QK,duplex:$K,readableStream:TT,writableStream:jT,transformStream:IT,iterable:rH,[Symbol.asyncIterator]:rH}}},AT=(Z,X)=>{let q=c6(),Q=c6(),$=c6(),J=Array.from({length:X.length-3},c6),Y=c6(),H=[q,Q,$,...J];return Object.assign(Z,{stdin:q,stdout:Q,stderr:$,stdio:H}),Y},c6=()=>{let Z=new DT;return Z.end(),Z},qK=()=>new tH({read(){}}),QK=()=>new eH({write(){}}),$K=()=>new ZK({read(){},write(){}}),TT=()=>tH.toWeb(qK()),jT=()=>eH.toWeb(QK()),IT=()=>ZK.toWeb($K()),rH=async function*(){},wT=async(Z,X,q)=>N2(Z,X,q);var JK=B(()=>{e8();h6();n8()});import{createReadStream as YK,createWriteStream as HK}from"node:fs";import{Buffer as kT}from"node:buffer";import{Readable as l6,Writable as OT,Duplex as NT}from"node:stream";var UK=(Z,X)=>t8(xT,Z,X,!1),n6=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${F1[Z]}.`)},KK,xT;var GK=B(()=>{J7();e8();W0();KK={fileNumber:n6,generator:zZ,asyncGenerator:zZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:q}}){let Q=X||q;return{stream:NT.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},xT={input:{...KK,fileUrl:({value:Z})=>({stream:YK(Z)}),filePath:({value:{file:Z}})=>({stream:YK(Z)}),webStream:({value:Z})=>({stream:l6.fromWeb(Z)}),iterable:({value:Z})=>({stream:l6.from(Z)}),asyncIterable:({value:Z})=>({stream:l6.from(Z)}),string:({value:Z})=>({stream:l6.from(Z)}),uint8Array:({value:Z})=>({stream:l6.from(kT.from(Z))})},output:{...KK,fileUrl:({value:Z})=>({stream:HK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:HK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:OT.fromWeb(Z)}),iterable:n6,asyncIterable:n6,string:n6,uint8Array:n6}}});import{on as PT,once as WK}from"node:events";import{PassThrough as ET,getDefaultHighWaterMark as vT}from"node:stream";import{finished as LK}from"node:stream/promises";function c1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let $ of Z)kZ($);let X=Z.some(({readableObjectMode:$})=>$),q=yT(Z,X),Q=new zK({objectMode:X,writableHighWaterMark:q,readableHighWaterMark:q});for(let $ of Z)Q.add($);return Q}var yT=(Z,X)=>{if(Z.length===0)return vT(X);let q=Z.filter(({readableObjectMode:Q})=>Q===X).map(({readableHighWaterMark:Q})=>Q);return Math.max(...q)},zK,CT=async(Z,X,q)=>{K7(Z,VK);let Q=new AbortController;try{await Promise.race([ST(Z,Q),bT(Z,X,q,Q)])}finally{Q.abort(),K7(Z,-VK)}},ST=async(Z,{signal:X})=>{try{await LK(Z,{signal:X,cleanup:!0})}catch(q){throw _K(Z,q),q}},bT=async(Z,X,q,{signal:Q})=>{for await(let[$]of PT(Z,"unpipe",{signal:Q}))if(X.has($))$.emit(q)},kZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},hT=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,onFinished:J,unpipeEvent:Y})=>{K7(Z,BK);let H=new AbortController;try{await Promise.race([fT(J,X,H),gT({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:H}),mT({stream:X,streams:q,ended:Q,aborted:$,unpipeEvent:Y,controller:H})])}finally{H.abort(),K7(Z,-BK)}if(q.size>0&&q.size===Q.size+$.size)if(Q.size===0&&$.size>0)OZ(Z);else uT(Z)},fT=async(Z,X,{signal:q})=>{try{if(await Z,!q.aborted)OZ(X)}catch(Q){if(!q.aborted)_K(X,Q)}},gT=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:{signal:J}})=>{try{if(await LK(X,{signal:J,cleanup:!0,readable:!0,writable:!1}),q.has(X))Q.add(X)}catch(Y){if(J.aborted||!q.has(X))return;if(RK(Y))$.add(X);else MK(Z,Y)}},mT=async({stream:Z,streams:X,ended:q,aborted:Q,unpipeEvent:$,controller:{signal:J}})=>{if(await WK(Z,$,{signal:J}),!Z.readable)return WK(J,"abort",{signal:J});X.delete(Z),q.delete(Z),Q.delete(Z)},uT=(Z)=>{if(Z.writable)Z.end()},_K=(Z,X)=>{if(RK(X))OZ(Z);else MK(Z,X)},RK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",OZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},MK=(Z,X)=>{if(!Z.destroyed)Z.once("error",pT),Z.destroy(X)},pT=()=>{},K7=(Z,X)=>{let q=Z.getMaxListeners();if(q!==0&&q!==Number.POSITIVE_INFINITY)Z.setMaxListeners(q+X)},VK=2,BK=1;var U7=B(()=>{zK=class zK extends ET{#q=new Set([]);#Q=new Set([]);#X=new Set([]);#Y;#K=Symbol("unpipe");#V=new WeakMap;add(Z){if(kZ(Z),this.#q.has(Z))return;this.#q.add(Z),this.#Y??=CT(this,this.#q,this.#K);let X=hT({passThroughStream:this,stream:Z,streams:this.#q,ended:this.#Q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#K});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(kZ(Z),!this.#q.has(Z))return!1;let X=this.#V.get(Z);if(X===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await X,!0}}});import{finished as FK}from"node:stream/promises";var E2=(Z,X)=>{Z.pipe(X),dT(Z,X),cT(Z,X)},dT=async(Z,X)=>{if(S0(Z)||S0(X))return;try{await FK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}NZ(X)},NZ=(Z)=>{if(Z.writable)Z.end()},cT=async(Z,X)=>{if(S0(Z)||S0(X))return;try{await FK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}xZ(Z)},xZ=(Z)=>{if(Z.readable)Z.destroy()};var G7=B(()=>{Z1()});var DK=(Z,X,q)=>{let Q=new Map;for(let[$,{stdioItems:J,direction:Y}]of Object.entries(X)){let H=J.filter(({type:G})=>N0.has(G));for(let{stream:G}of H)lT(Z,G,Y,$);let U=J.filter(({type:G})=>!N0.has(G));for(let{stream:G}of U)iT({subprocess:Z,stream:G,direction:Y,fdNumber:$,pipeGroups:Q,controller:q})}for(let[$,J]of Q){let Y=J.length===1?J[0]:c1(J);E2(Y,$)}},lT=(Z,X,q,Q)=>{if(q==="output")E2(Z.stdio[Q],X);else E2(X,Z.stdio[Q]);let $=nT[Q];if($!==void 0)Z[$]=X;Z.stdio[Q]=X},nT,iT=({subprocess:Z,stream:X,direction:q,fdNumber:Q,pipeGroups:$,controller:J})=>{if(X===void 0)return;aT(X,J);let[Y,H]=q==="output"?[X,Z.stdio[Q]]:[Z.stdio[Q],X],U=$.get(Y)??[];$.set(Y,[...U,H])},aT=(Z,{signal:X})=>{if(S0(Z))b1(Z,oT,X)},oT=2;var AK=B(()=>{U7();Z1();D8();W0();G7();nT=["stdin","stdout","stderr"]});import W7 from"node:process";import{execFile as sT}from"node:child_process";import TK from"node:path/win32";var jK,IK=(Z)=>Z.killDescendants&&!jK?{...Z,detached:!0}:Z,wK=(Z,{killDescendants:X})=>{if(!X)return Z.kill.bind(Z);return(jK?tT:rT).bind(void 0,Z)},rT=(Z,X)=>{if(Z.pid===void 0)return!1;try{return W7.kill(-Z.pid,X)}catch{return Z.kill(X)}},tT=(Z,X)=>{if(Z.pid===void 0)return!1;let q=eT();if(q===void 0)return Z.kill(X);return sT(q,["/pid",`${Z.pid}`,"/T","/F"],(Q)=>{if(Q)Z.kill(X)}),!0},eT=()=>{let Z=[W7.env.SystemRoot,W7.env.windir].find((X)=>X&&Zj(X));return Z===void 0?void 0:TK.join(Z,"System32","taskkill.exe")},Zj=(Z)=>{let{root:X}=TK.parse(Z);return/^[a-z]:[/\\]/i.test(X)};var kK=B(()=>{jK=W7.platform==="win32"});var l1;var OK=B(()=>{l1=[];l1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")l1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")l1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class NK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(EZ[PZ])return EZ[PZ];Xj(EZ,PZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let q=this.listeners[Z],Q=q.indexOf(X);if(Q===-1)return;if(Q===0&&q.length===1)q.length=0;else q.splice(Q,1)}emit(Z,X,q){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let Q=!1;for(let $ of this.listeners[Z])Q=$(X,q)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",X,q)||Q;return Q}}class yZ{}var V7=(Z)=>!!Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function",PZ,EZ,Xj,qj=(Z)=>{return{onExit(X,q){return Z.onExit(X,q)},load(){return Z.load()},unload(){return Z.unload()}}},xK,PK,vZ,EK,Qu,$u;var vK=B(()=>{OK();PZ=Symbol.for("signal-exit emitter"),EZ=globalThis,Xj=Object.defineProperty.bind(Object);xK=class xK extends yZ{onExit(){return()=>{}}load(){}unload(){}};PK=class PK extends yZ{#q=vZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new NK;#X;#Y;#K;#V={};#A=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of l1)this.#V[X]=()=>{let q=this.#X.listeners(X),{count:Q}=this.#Q,$=Z;if(typeof $.__signal_exit_emitter__==="object"&&typeof $.__signal_exit_emitter__.count==="number")Q+=$.__signal_exit_emitter__.count;if(q.length===Q){this.unload();let J=this.#Q.emit("exit",null,X),Y=X==="SIGHUP"?this.#q:X;if(!J)Z.kill(Z.pid,Y)}};this.#K=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!V7(this.#X))return()=>{};if(this.#A===!1)this.load();let q=X?.alwaysLast?"afterExit":"exit";return this.#Q.on(q,Z),()=>{if(this.#Q.removeListener(q,Z),this.#Q.listeners.exit.length===0&&this.#Q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#Q.count+=1;for(let Z of l1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#_(Z)}}unload(){if(!this.#A)return;this.#A=!1,l1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(q){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#K,this.#Q.count-=1}#_(Z){if(!V7(this.#X))return 0;return this.#X.exitCode=Z||0,this.#Q.emit("exit",this.#X.exitCode,null),this.#K.call(this.#X,this.#X.exitCode)}#H(Z,...X){let q=this.#Y;if(Z==="exit"&&V7(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let Q=q.call(this.#X,Z,...X);return this.#Q.emit("exit",this.#X.exitCode,null),Q}else return q.call(this.#X,Z,...X)}};vZ=globalThis.process,{onExit:EK,load:Qu,unload:$u}=qj(V7(vZ)?new PK(vZ):new xK)});import{addAbortListener as Qj}from"node:events";var yK=(Z,{cleanup:X,detached:q},{signal:Q})=>{if(!X||q)return;let $=EK(()=>{Z()});Qj(Q,()=>{$()})};var CK=B(()=>{vK()});var B7=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),i6=(Z,X,q)=>{let Q=Z[q];if(!Q.has(X))Q.set(X,[]);let $=Q.get(X),J=n0();return $.push(J),{resolve:J.resolve.bind(J),promises:$}},v2=async({resolve:Z,promises:X},q)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,q]),Promise.all([!1,...X])]);return!Q};var a6=B(()=>{A2()});import{on as $j}from"node:events";import{getDefaultHighWaterMark as Jj}from"node:stream";var L7=({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:Q,encoding:$,preserveNewlines:J})=>{let Y=new AbortController;return Yj(X,Y),bK({stream:Z,controller:Y,binary:q,shouldEncode:!Z.readableObjectMode&&Q,encoding:$,shouldSplit:!Z.readableObjectMode,preserveNewlines:J})},Yj=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},CZ=({stream:Z,onStreamEnd:X,lines:q,encoding:Q,stripFinalNewline:$,allMixed:J})=>{let Y=new AbortController;Hj(X,Y,Z);let H=Z.readableObjectMode&&!J;return bK({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&q,preserveNewlines:!$})},Hj=async(Z,X,q)=>{try{await Z}catch{q.destroy()}finally{X.abort()}},bK=({stream:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})=>{let H=$j(Z,"data",{signal:X.signal,highWaterMark:SK,highWatermark:SK});return Kj({onStdoutChunk:H,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})},SZ,SK,Kj=async function*({onStdoutChunk:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y}){let H=Uj({binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y});try{for await(let[U]of Z)yield*d1(U,H,0)}catch(U){if(!X.signal.aborted)throw U}finally{yield*p6(H)}},Uj=({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Q,preserveNewlines:$})=>[q7(Z,q,!X),Z7(Z,$,!Q,{})].filter(Boolean);var z7=B(()=>{WZ();X7();LZ();SZ=Jj(!0),SK=SZ});var y2=(Z,X,{from:q,binary:Q=!1,preserveNewlines:$=!1}={})=>{let J=Q||D0.has(X),Y=P2(Z,q),H=L7({subprocessStdout:Y,subprocess:Z,binary:J,shouldEncode:!0,encoding:X,preserveNewlines:$});return Gj(H,Y,Z)},Gj=async function*(Z,X,q){try{yield*Z}finally{if(X.readable)X.destroy();await q}};var bZ=B(()=>{h1();D1();z7()});import{finished as Wj}from"node:stream/promises";var o6=async(Z,X,q,{isSameDirection:Q,stopOnExit:$=!1}={})=>{let J=Vj(Z,q),Y=new AbortController;try{await Promise.race([...$?[q.exitPromise]:[],Wj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!J.stdinCleanedUp)zj(H,X,q,Q)}finally{Y.abort()}},Vj=(Z,{originalStreams:X,subprocess:q})=>{let[Q]=X,$={stdinCleanedUp:!1};if(Z===Q)Bj(Z,q,$);return $},Bj=(Z,X,q)=>{let{_destroy:Q}=Z;Z._destroy=(...$)=>{Lj(X,q),Q.call(Z,...$)}},Lj=({exitCode:Z,signalCode:X},q)=>{if(Z!==null||X!==null)q.stdinCleanedUp=!0},zj=(Z,X,q,Q)=>{if(!_j(Z,X,q,Q))throw Z},_j=(Z,X,q,Q=!0)=>{if(q.propagating)return hK(Z)||C2(Z);return q.propagating=!0,hZ(q,X)===Q?hK(Z):C2(Z)},hZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",C2=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",hK=(Z)=>Z?.code==="EPIPE";var s6=()=>{};import{finished as fK}from"node:stream/promises";var fZ=async(Z)=>{if(Z===void 0)return;try{await gZ(Z)}catch{}},gK=async(Z)=>{if(Z===void 0)return;try{await mZ(Z)}catch{}},gZ=async(Z)=>{await fK(Z,{cleanup:!0,readable:!1,writable:!0})},mZ=async(Z)=>{await fK(Z,{cleanup:!0,readable:!0,writable:!1})},_7=async(Z,X)=>{if(await Z,X)throw X},R7=(Z,X,q)=>{if(q&&!C2(q))Z.destroy(q);else if(X)Z.destroy()};var uZ=B(()=>{s6()});import{Readable as Rj}from"node:stream";import{callbackify as Mj}from"node:util";var M7=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,binary:$=!0,preserveNewlines:J=!0}={})=>{let Y=$||D0.has(q),{subprocessStdout:H,waitReadableDestroy:U}=pZ(Z,Q,X),{readableEncoding:G,readableObjectMode:W,readableHighWaterMark:V}=dZ(H,Y),{read:L,onStdoutDataDone:z}=cZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:q,preserveNewlines:J}),_=new Rj({read:L,destroy:Mj(nZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:U})),highWaterMark:V,objectMode:W,encoding:G});return lZ({subprocessStdout:H,onStdoutDataDone:z,readable:_,subprocess:Z}),_},pZ=(Z,X,q)=>{let Q=P2(Z,X),$=i6(q,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:$}},dZ=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q},Q)=>Q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:SZ},cZ=({subprocessStdout:Z,subprocess:X,binary:q,encoding:Q,preserveNewlines:$})=>{let J=n0(),Y=L7({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:!q,encoding:Q,preserveNewlines:$});return{read(){Fj(this,Y,J)},onStdoutDataDone:J}},Fj=async(Z,X,q)=>{try{let{value:Q,done:$}=await X.next();if($)q.resolve();else Z.push(Q)}catch{}},lZ=async({subprocessStdout:Z,onStdoutDataDone:X,readable:q,subprocess:Q,subprocessStdin:$})=>{try{if(await mZ(Z),await Q,await fZ($),await X,q.readable)q.push(null)}catch(J){await fZ($),mK(q,await Dj(Q,J))}},Dj=async(Z,X)=>{if(X.code!=="ERR_STREAM_PREMATURE_CLOSE")return X;try{await Z}catch(q){return q}return X},nZ=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:q},Q)=>{if(!await v2(q,X))return;mK(Z,Q),await _7(X,Q)},mK=(Z,X)=>{R7(Z,Z.readable,X)};var F7=B(()=>{h1();D1();z7();A2();a6();uZ()});import{Readable as Aj,Writable as Tj,Duplex as jj}from"node:stream";var D7=(Z,X)=>Aj.toWeb(Z.readable(X)),uK=(Z,X)=>Tj.toWeb(Z.writable(X)),pK=(Z,X)=>jj.toWeb(Z.duplex(X));var iZ=()=>{};var cK=({source:Z,sourcePromise:X,boundOptions:q,createNested:Q},...$)=>{let J=H8(),{destination:Y,destinationStream:H,destinationError:U,from:G,unpipeSignal:W}=Ij(q,Q,$),{sourceStream:V,sourceError:L}=kj(Z,G),{options:z,fileDescriptors:_}=i0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:z,sourceError:L,destination:Y,destinationStream:H,destinationError:U,unpipeSignal:W,fileDescriptors:_,startTime:J}},Ij=(Z,X,q)=>{try{let{destination:Q,pipeOptions:{from:$,to:J,unpipeSignal:Y}={}}=wj(Z,X,...q),H=r8(Q,J);return{destination:Q,destinationStream:H,from:$,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},wj=(Z,X,q,...Q)=>{if(Array.isArray(q))return{destination:X(dK,Z)(q,...Q),pipeOptions:Z};if(typeof q==="string"||q instanceof URL||U3(q)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[$,J,Y]=s4(q,...Q);return{destination:X(dK)($,J,Y),pipeOptions:Y}}if(i0.has(q)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:q,pipeOptions:Q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${q}`)},dK=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),kj=(Z,X)=>{try{return{sourceStream:P2(Z,X)}}catch(q){return{sourceError:q}}};var lK=B(()=>{W3();K8();D1();L2()});var iK=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q,fileDescriptors:$,sourceOptions:J,startTime:Y})=>{let H=Oj({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q});if(H!==void 0)throw aZ({error:H,fileDescriptors:$,sourceOptions:J,startTime:Y})},Oj=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q})=>{if(X!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return xZ(Z),Q;if(X!==void 0)return NZ(q),X},aZ=({error:Z,fileDescriptors:X,sourceOptions:q,startTime:Q})=>O2({error:Z,command:nK,escapedCommand:nK,fileDescriptors:X,options:q,startTime:Q,isSync:!1}),nK="source.pipe(destination)";var oZ=B(()=>{h6();G7()});var aK=async(Z)=>{let[{status:X,reason:q,value:Q=q},{status:$,reason:J,value:Y=J}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if($==="rejected")throw Y;if(X==="rejected")throw Q;return Y};var oK=()=>{};import{finished as Nj}from"node:stream/promises";var sK=(Z,X,q)=>{let Q=A7.has(X)?Pj(Z,X):xj(Z,X);return b1(Z,vj,q.signal),b1(X,yj,q.signal),Ej(X),Q},xj=(Z,X)=>{let q=c1([Z]);return E2(q,X),A7.set(X,q),q},Pj=(Z,X)=>{let q=A7.get(X);return q.add(Z),q},Ej=async(Z)=>{try{await Nj(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}A7.delete(Z)},A7,vj=2,yj=1;var rK=B(()=>{U7();D8();G7();A7=new WeakMap});import{aborted as Cj}from"node:util";var tK=(Z,X)=>Z===void 0?[]:[Sj(Z,X)],Sj=async(Z,{sourceStream:X,mergedStream:q,fileDescriptors:Q,sourceOptions:$,startTime:J})=>{await Cj(Z,X),await q.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw aZ({error:Y,fileDescriptors:Q,sourceOptions:$,startTime:J})};var eK=B(()=>{oZ()});var T7=(Z,...X)=>{if(s(X[0]))return T7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:q,...Q}=cK(Z,...X),$=new AbortController,J=aj({...Q,destination:q,pipeFailureController:$});return J.pipe=T7.bind(void 0,{...Z,source:q,sourcePromise:J,boundOptions:{}}),bj(J,q,$.signal),J},bj=(Z,X,q)=>{if(X===void 0)return;hj(Z,X),uj(Z,X,q)},hj=(Z,X)=>{let q=i0.get(X);i0.set(Z,q),Z.stdio=X.stdio,Z.all=X.all;let{options:{encoding:Q}}=q,$=B7();Z[Symbol.asyncIterator]=y2.bind(void 0,Z,Q,{}),Z.iterable=y2.bind(void 0,Z,Q),Z.readable=gj.bind(void 0,Z,{subprocess:Z,concurrentStreams:$,encoding:Q}),Z.readableStream=D7.bind(void 0,Z),fj(Z,X)},fj=(Z,X)=>{if(X.all===void 0){Z.all=void 0;return}Object.defineProperty(Z,"all",{get(){ZU(Z,X.all);let q=Z.readable({from:"all"});return ZU(Z,q),q},enumerable:!0,configurable:!0})},ZU=(Z,X)=>{Object.defineProperty(Z,"all",{value:X,writable:!0,enumerable:!0,configurable:!0})},gj=(Z,X,...q)=>{let Q=M7(X,...q);return mj(Z,Q),Q},mj=async(Z,X)=>{try{await Z}catch(q){X.destroy(q)}},uj=(Z,X,q)=>{Z.sendMessage=X.sendMessage,Z.getOneMessage=pj.bind(void 0,X,q),Z.getEachMessage=lj.bind(void 0,Z,X,q)},pj=(Z,X,...q)=>{let Q=new AbortController,$=Z.getOneMessage(...XU(q,Q.signal,AZ));return dj(X,$,Q)},dj=async(Z,X,q)=>{try{return await Promise.race([X,cj(Z,q.signal)])}finally{q.abort()}},cj=(Z,X)=>new Promise((q,Q)=>{if(Z.aborted){Q(Z.reason);return}Z.addEventListener("abort",()=>{Q(Z.reason)},{once:!0,signal:X})}),lj=(Z,X,q,...Q)=>{let $=new AbortController,J=X.getEachMessage(...XU(Q,$.signal,jZ));return ij(q,$),nj(Z,J,$)},nj=async function*(Z,X,q){try{yield*X}finally{q.abort(),await Z}},XU=(Z,X,q)=>{if(Z[0]===null)return Z;let[Q]=Z;return[{...Q,[q]:{signal:X,shouldAwait:!1}}]},ij=(Z,X)=>{if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},aj=async({sourcePromise:Z,sourceStream:X,sourceOptions:q,sourceError:Q,destination:$,destinationStream:J,destinationError:Y,unpipeSignal:H,fileDescriptors:U,startTime:G,pipeFailureController:W})=>{let V=new AbortController;try{let L=oj(Z,$);iK({sourceStream:X,sourceError:Q,destinationStream:J,destinationError:Y,fileDescriptors:U,sourceOptions:q,startTime:G});let z=sK(X,J,V);return await Promise.race([aK(L),...tK(H,{sourceStream:X,mergedStream:z,sourceOptions:q,fileDescriptors:U,startTime:G})])}catch(L){throw W.abort(L),L}finally{V.abort()}},oj=(Z,X)=>Promise.allSettled([Z,X]);var qU=B(()=>{t0();D1();a6();bZ();F7();iZ();TZ();H7();lK();oZ();oK();rK();eK()});import{setImmediate as sj}from"node:timers/promises";var QU=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,allMixed:H,stripFinalNewline:U,verboseInfo:G,streamInfo:W})=>{let V=rj({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:H,verboseInfo:G,streamInfo:W});if(!$){await Promise.all([tj(Z),V]);return}let L=KZ(U,q),z=CZ({stream:Z,onStreamEnd:X,lines:Y,encoding:Q,stripFinalNewline:L,allMixed:H}),[_]=await Promise.all([ej({stream:Z,iterable:z,fdNumber:q,encoding:Q,maxBuffer:J,lines:Y}),V]);return _},rj=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:$,verboseInfo:J,streamInfo:{fileDescriptors:Y}})=>{if(!Y7({stdioItems:Y[q]?.stdioItems,encoding:Q,verboseInfo:J,fdNumber:q}))return;let H=CZ({stream:Z,onStreamEnd:X,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:$});await xH(H,Z,q,J)},tj=async(Z)=>{if(await sj(),Z.readableFlowing===null)Z.resume()},ej=async({stream:Z,stream:{readableObjectMode:X},iterable:q,fdNumber:Q,encoding:$,maxBuffer:J,lines:Y})=>{try{if(X||Y)return await g8(q,{maxBuffer:J});if($==="buffer")return new Uint8Array(await m8(q,{maxBuffer:J}));return await p8(q,{maxBuffer:J})}catch(H){return $U(KY({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:$,fdNumber:Q}))}},sZ=async(Z)=>{try{return await Z}catch(X){return $U(X)}},$U=({bufferedData:Z})=>f$(Z)?new Uint8Array(Z):Z;var rZ=B(()=>{d8();F0();_Z();z7();u1();u6()});var JU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:$,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((U,G)=>tZ({stream:U,fdNumber:G,encoding:X,buffer:q[G],maxBuffer:Q[G],lines:$[G],allMixed:!1,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})),tZ=async({stream:Z,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G})=>{if(!Z)return;let W=o6(Z,X,G);if(hZ(G,X)){await W;return}let[V]=await Promise.all([QU({stream:Z,onStreamEnd:W,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G}),W]);return V};var eZ=B(()=>{rZ();s6()});var YU=({stdout:Z,stderr:X},{all:q})=>q&&(Z||X)?c1([Z,X].filter(Boolean)):void 0,HU=({subprocess:Z,all:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,stripFinalNewline:Y,verboseInfo:H,streamInfo:U})=>tZ({...ZI(Z,X,Q),fdNumber:"all",encoding:q,maxBuffer:$[1]+$[2],lines:J[1]||J[2],allMixed:XI(Z,X),stripFinalNewline:Y,verboseInfo:H,streamInfo:U}),ZI=({stdout:Z,stderr:X},q,[,Q,$])=>{let J=Q||$;if(!J)return{stream:q,buffer:J};if(!Q)return{stream:X,buffer:J};if(!$)return{stream:Z,buffer:J};return{stream:q,buffer:J}},XI=({stdout:Z,stderr:X},q)=>q&&Z&&X&&Z.readableObjectMode!==X.readableObjectMode;var ZX=B(()=>{U7();eZ()});var KU=(Z)=>_2(Z,"ipc"),UU=(Z,X)=>{let q=Y8(Z);c0({type:"ipc",verboseMessage:q,fdNumber:"ipc",verboseInfo:X})};var GU=B(()=>{R2();_1()});var WU=async({subprocess:Z,buffer:X,maxBuffer:q,ipc:Q,ipcOutput:$,verboseInfo:J})=>{if(!Q)return $;let Y=KU(J),H=X1(X,"ipc"),U=X1(q,"ipc");for await(let G of IZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)UY(Z,$,U),$.push(G);if(Y)UU(G,J)}return $},VU=async(Z,X)=>{return await Promise.allSettled([Z]),X};var BU=B(()=>{u1();GU();q1();H7()});import{once as qI}from"node:events";var LU=async({subprocess:Z,kill:X,all:q,options:{encoding:Q,buffer:$,maxBuffer:J,lines:Y,timeoutDuration:H,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,stripFinalNewline:V,ipc:L,ipcInput:z},context:_,verboseInfo:R,fileDescriptors:M,originalStreams:F,onInternalError:O,controller:D})=>{let w=bH(Z,_),T={originalStreams:F,fileDescriptors:M,subprocess:Z,exitPromise:w,propagating:!1},j=JU({subprocess:Z,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:T}),A=HU({subprocess:Z,all:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:R,streamInfo:T}),S=[],k=WU({subprocess:Z,buffer:$,maxBuffer:J,ipc:L,ipcOutput:S,verboseInfo:R}),x=QI(F,Z,T),E=$I(M,T);try{return await Promise.race([Promise.all([{},fH(w),Promise.all(j),A,k,x9(Z,z,L),...x,...E]),O,JI(Z,D),...I9(X,H,_,D),...cJ({kill:X,cancelSignal:U,gracefulCancel:G,context:_,controller:D}),...T9({subprocess:Z,kill:X,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,context:_,controller:D})])}catch(h){return _.terminationReason??="other",Promise.all([{error:h},w,Promise.all(j.map((i)=>sZ(i))),sZ(A),VU(k,S),Promise.allSettled(x),Promise.allSettled(E)])}},QI=(Z,X,q)=>Z.map((Q,$)=>Q===X.stdio[$]?void 0:o6(Q,$,q)),$I=(Z,X)=>Z.flatMap(({stdioItems:q},Q)=>q.filter(({value:$,stream:J=$})=>h0(J,{checkOpen:!1})&&!S0(J)).map(({type:$,value:J,stream:Y=J})=>o6(Y,Q,X,{isSameDirection:N0.has($),stopOnExit:$==="native"}))),JI=async(Z,{signal:X})=>{let[q]=await qI(Z,"error",{signal:X});throw q};var zU=B(()=>{m1();b3();O3();S3();Z1();W0();rZ();BU();f3();ZX();eZ();FZ();s6()});import{Writable as YI}from"node:stream";import{callbackify as _U}from"node:util";var RU=({subprocess:Z,concurrentStreams:X},{to:q}={})=>{let{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}=XX(Z,q,X),Y=new YI({...qX(Q,Z,$),destroy:_U($X.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:$,waitWritableDestroy:J})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return QX(Q,Y,void 0,Z),Y},XX=(Z,X,q)=>{let Q=r8(Z,X),$=i6(q,Q,"writableFinal"),J=i6(q,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}},qX=(Z,X,q)=>({write:HI.bind(void 0,Z),final:_U(KI.bind(void 0,Z,X,q))}),HI=(Z,X,q,Q)=>{if(Z.write(X,q))Q();else Z.once("drain",Q)},KI=async(Z,X,q)=>{if(!await v2(q,X))return;if(Z.writable)Z.end();await X},QX=async(Z,X,q,Q)=>{try{if(await gZ(Z),await Q,X.writable)X.end()}catch($){await gK(q),MU(X,await UI(Q,$))}},UI=async(Z,X)=>{if(!GI(X))return X;try{await Z}catch(q){return q}return X},GI=(Z)=>Z===void 0||C2(Z),$X=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Q},$)=>{if(await v2(q,X),await v2(Q,X))MU(Z,$),await _7(X,$)},MU=(Z,X)=>{R7(Z,Z.writable,X)};var JX=B(()=>{D1();s6();a6();uZ()});import{Duplex as WI}from"node:stream";import{callbackify as VI}from"node:util";var FU=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,to:$,binary:J=!0,preserveNewlines:Y=!0}={})=>{let H=J||D0.has(q),{subprocessStdout:U,waitReadableDestroy:G}=pZ(Z,Q,X),{subprocessStdin:W,waitWritableFinal:V,waitWritableDestroy:L}=XX(Z,$,X),{readableEncoding:z,readableObjectMode:_,readableHighWaterMark:R}=dZ(U,H),{read:M,onStdoutDataDone:F}=cZ({subprocessStdout:U,subprocess:Z,binary:H,encoding:q,preserveNewlines:Y}),O=new WI({read:M,...qX(W,Z,V),destroy:VI(BI.bind(void 0,{subprocessStdout:U,subprocessStdin:W,subprocess:Z,waitReadableDestroy:G,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:R,writableHighWaterMark:W.writableHighWaterMark,readableObjectMode:_,writableObjectMode:W.writableObjectMode,encoding:z});return lZ({subprocessStdout:U,onStdoutDataDone:F,readable:O,subprocess:Z,subprocessStdin:W}),QX(W,O,U,Z),O},BI=async({subprocessStdout:Z,subprocessStdin:X,subprocess:q,waitReadableDestroy:Q,waitWritableFinal:$,waitWritableDestroy:J},Y)=>{await Promise.all([nZ({subprocessStdout:Z,subprocess:q,waitReadableDestroy:Q},Y),$X({subprocessStdin:X,subprocess:q,waitWritableFinal:$,waitWritableDestroy:J},Y)])};var DU=B(()=>{h1();F7();JX()});var AU=(Z,{encoding:X})=>{let q=B7();Z.readable=M7.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.writable=RU.bind(void 0,{subprocess:Z,concurrentStreams:q}),Z.duplex=FU.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.readableStream=D7.bind(void 0,Z),Z.writableStream=uK.bind(void 0,Z),Z.transformStream=pK.bind(void 0,Z),Z.iterable=y2.bind(void 0,Z,X),Z[Symbol.asyncIterator]=y2.bind(void 0,Z,X,{})};var TU=B(()=>{a6();F7();JX();DU();iZ();bZ()});var jU=(Z,X)=>Object.assign(Z,X);var IU=()=>{};import{setMaxListeners as LI}from"node:events";import{spawn as zI}from"node:child_process";var wU=(Z,X,q,Q)=>{let{file:$,commandArguments:J,command:Y,escapedCommand:H,startTime:U,verboseInfo:G,options:W,fileDescriptors:V}=_I(Z,X,q),{subprocess:L,promise:z,kill:_,all:R,convertedStreams:M}=MI({file:$,commandArguments:J,options:W,startTime:U,verboseInfo:G,command:Y,escapedCommand:H,fileDescriptors:V}),F=FI({promise:z,nodeChildProcess:L,kill:_,all:R,convertedStreams:M,options:W});return F.pipe=T7.bind(void 0,{source:F,sourcePromise:z,boundOptions:{},createNested:Q}),i0.set(F,{options:W,fileDescriptors:V}),F},_I=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=U8(Z,X,q),{file:H,commandArguments:U,options:G}=y8(Z,X,q),W=RI(G),V=UK(W,Y);return{file:H,commandArguments:U,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},RI=({timeout:Z,signal:X,...q})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...q,timeoutDuration:Z}},MI=({file:Z,commandArguments:X,options:q,startTime:Q,verboseInfo:$,command:J,escapedCommand:Y,fileDescriptors:H})=>{let U;try{U=zI(...C8(Z,X,IK(q)))}catch(M){return XK({error:M,command:J,escapedCommand:Y,fileDescriptors:H,options:q,startTime:Q,verboseInfo:$})}let G=new AbortController;LI(1/0,G.signal);let W=[...U.stdio];DK(U,H,G),_9(U,q);let V={},L=n0(),z=pJ.bind(void 0,{kill:wK(U,q),options:q,onInternalError:L,context:V,controller:G});yK(z,q,G);let _=YU(U,q),R=AI({subprocess:U,kill:z,all:_,options:q,startTime:Q,verboseInfo:$,fileDescriptors:H,originalStreams:W,command:J,escapedCommand:Y,context:V,onInternalError:L,controller:G});return{subprocess:U,promise:R,kill:z,all:_}},FI=({promise:Z,nodeChildProcess:X,kill:q,all:Q,convertedStreams:$,options:J})=>{let Y=jU(Z,DI(X,Q));if(Y.kill=q??Y.kill,$===void 0)AU(Y,J);else Object.assign(Y,$);return aH(Y,X,J),Y},DI=(Z,X)=>({nodeChildProcess:Z,pid:Z.pid,stdin:Z.stdin,stdout:Z.stdout,stderr:Z.stderr,stdio:Z.stdio,all:X,kill:Z.kill.bind(Z)}),AI=async({subprocess:Z,kill:X,all:q,options:Q,startTime:$,verboseInfo:J,fileDescriptors:Y,originalStreams:H,command:U,escapedCommand:G,context:W,onInternalError:V,controller:L})=>{let[z,[_,R],M,F,O]=await LU({subprocess:Z,kill:X,all:q,options:Q,context:W,verboseInfo:J,fileDescriptors:Y,originalStreams:H,onInternalError:V,controller:L});L.abort(),V.resolve();let D=M.map((j,A)=>J1(j,Q,A)),w=J1(F,Q,"all"),T=TI({errorInfo:z,exitCode:_,signal:R,stdio:D,all:w,ipcOutput:O,context:W,options:Q,command:U,escapedCommand:G,startTime:$});return N2(T,J,Q)},TI=({errorInfo:Z,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,context:Y,options:H,command:U,escapedCommand:G,startTime:W})=>("error"in Z)?b6({error:Z.error,command:U,escapedCommand:G,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Q1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W,isSync:!1}):l8({command:U,escapedCommand:G,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W});var kU=B(()=>{d8();D3();d3();D1();c3();wZ();k6();h6();n8();JK();GK();u6();AK();R8();kK();CK();qU();ZX();zU();TU();A2();IU()});var j7=(Z,X)=>{let q={__proto__:null,...Z},Q=Object.fromEntries(Object.entries(X).map(([$,J])=>[$,jI($,q[$],J)]));return{...q,...Q}},jI=(Z,X,q)=>{if(II.has(Z)&&s(X)&&s(q))return{...X,...q};return q},II;var OU=B(()=>{t0();q1();II=new Set(["env",..._3])});var S2=(Z,X,q,Q)=>{let $=(Y,H,U)=>S2(Y,H,q,U),J=(...Y)=>wI({mapArguments:Z,deepOptions:q,boundOptions:X,setBoundExeca:Q,createNested:$},...Y);if(Q!==void 0)Q(J,$,X);return J},wI=({mapArguments:Z,deepOptions:X={},boundOptions:q={},setBoundExeca:Q,createNested:$},J,...Y)=>{if(s(J))return $(Z,j7(q,J),Q);let{file:H,commandArguments:U,options:G,isSync:W}=kI({mapArguments:Z,firstArgument:J,nextArguments:Y,deepOptions:X,boundOptions:q});return W?uH(H,U,G):wU(H,U,G,$)},kI=({mapArguments:Z,firstArgument:X,nextArguments:q,deepOptions:Q,boundOptions:$})=>{let J=c$(X)?l$(X,q):[X,...q],[Y,H,U]=s4(...J),G=j7(j7(Q,$),U),{options:W=G,isSync:V=!1}=Z({options:G});return{file:Y,commandArguments:H,options:W,isSync:V}};var NU=B(()=>{t0();W3();n$();pH();kU();OU()});var xU=(Z,X,q)=>{Z.sync=X(OI,q),Z.s=Z.sync},PU=({options:Z})=>EU(Z),OI=({options:Z})=>({...EU(Z),isSync:!0}),EU=(Z)=>({options:{...NI(Z),...Z}}),NI=({input:Z,inputFile:X,stdio:q})=>Z===void 0&&X===void 0&&q===void 0?{stdin:"inherit"}:{},vU;var yU=B(()=>{vU={preferLocal:!0}});var YX,x0,$c,Jc,Yc,Hc,Kc,Uc;var b2=B(()=>{NU();h3();yU();wZ();YX=S2(()=>({})),x0=S2(()=>({isSync:!0})),$c=S2(k9),Jc=S2(PU,{},vU,xU),{sendMessage:Yc,getOneMessage:Hc,getEachMessage:Kc,getCancelSignal:Uc}=oH()});import{execSync as xI}from"child_process";function h2(Z,X){let Q=[];try{const q=W2(Q,I7`execSync: ${Z.slice(0,100)}`,0);return xI(Z,X)}catch($){var J=$,Y=1}finally{V2(Q,J,Y)}}var HX=B(()=>{L0()});async function PI(Z){if(process.platform==="win32"){let q=await YX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim().split(/\r?\n/)[0]||null}let X=await YX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function EI(Z){if(process.platform==="win32")try{return h2(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return h2(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var KX,CU,w7;var k7=B(()=>{b2();HX();KX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,CU=KX?async(Z)=>KX(Z):PI,w7=KX??EI});function SU(Z,X){return{cmd:w7(Z)??Z,args:X}}var bU=B(()=>{k7()});import{dirname as vI,join as hU}from"path";async function f2(Z){try{return!!await CU(Z)}catch{return!1}}function hI(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function gI(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let Z=process.env.__CFBundleIdentifier?.toLowerCase();if(Z?.includes("vscodium"))return"codium";if(Z?.includes("windsurf"))return"windsurf";if(Z?.includes("com.google.android.studio"))return"androidstudio";if(Z){for(let X of fI)if(Z.includes(X))return X}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(uU())return"ssh-session";if(process.env.TERM){let X=process.env.TERM;if(X.includes("alacritty"))return"alacritty";if(X.includes("rxvt"))return"rxvt";if(X.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function uU(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function Nc(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return g2.platform}var J0,yI,CI,SI,mU,bI,fI,mI,g2;var r6=B(()=>{A1();gU();b$();P0();bU();z0();k7();J0=c(()=>{let Z=fU(),X=Z0(),q=hU(X,`config${Z}.json`);if(!N().existsSync(q)){let $=process.env.CLAUDIN_CONFIG_DIR?X:vI(X),J=hU($,`.claudin${Z}.json`);if(N().existsSync(J))return J}return q}),yI=c(async()=>{try{let{default:Z}=await import("./index-1.1.38-g6wrndbn.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});CI=c(async()=>{let Z=[];if(await f2("npm"))Z.push("npm");if(await f2("yarn"))Z.push("yarn");if(await f2("pnpm"))Z.push("pnpm");return Z}),SI=c(async()=>{let Z=[];if(await f2("bun"))Z.push("bun");if(await f2("deno"))Z.push("deno");if(await f2("node"))Z.push("node");return Z}),mU=c(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),bI=c(()=>{try{if(!mU())return!1;let{cmd:Z}=SU("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});fI=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];mI=c(()=>{if(r(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(r(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(r(process.env.RENDER))return"render";if(r(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(r(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(N().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(r(process.env.GITHUB_ACTIONS))return"github-actions";if(r(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(r(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(g2.platform==="darwin")return"unknown-darwin";if(g2.platform==="linux")return"unknown-linux";if(g2.platform==="win32")return"unknown-win32";return"unknown"});g2={hasInternetAccess:yI,isCI:r(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:gI(),isSSH:uU,getPackageManagers:CI,getRuntimes:SI,isRunningWithBun:c(S$),isWslEnvironment:mU,isNpmFromWindowsPath:bI,isConductor:hI,detectDeploymentEnvironment:mI}});import{unwatchFile as uI,watchFile as pI}from"fs";function cI(){return}function m2(Z){let X=o0.config;if(!X)return!1;let q=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,Q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return q||Q}function zX(Z){return GX.add(Z),()=>GX.delete(Z)}function t6(){for(let Z of GX)try{Z()}catch{}}function WX(Z){return{...Z,projects:iI(Z.projects)}}function V0(Z){let X=null;try{if(x7(J0(),w0,(Q)=>{let $=Z(Q);if($===Q)return Q;return X=WX($),X})&&X)e6(X),t6()}catch(q){let Q=B0(q);if(Q==="EACCES"||Q==="EPERM"||Q==="EROFS"){P(`Skipping global config write due to permission error: ${q}`,{level:"error"});return}P(`Failed to save config with lock: ${q}`,{level:"error"});let $=Y1(J0(),w0);if(m2($)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=Z($);if(J===$)return;X=WX(J),N7(J0(),X,v1),e6(X),t6()}}function nI(){let Z=VX+BX;VX=0,BX=0}function LX(Z){if(Z.installMethod!==void 0)return Z;let X=Z,q="unknown",Q=Z.autoUpdates??!0;switch(X.autoUpdaterStatus){case"migrated":q="local";break;case"installed":q="native";break;case"disabled":Q=!1;break;case"enabled":case"no_permissions":case"not_configured":q="global";break;case void 0:break}return{...Z,installMethod:q,autoUpdates:Q}}function iI(Z){if(!Z)return Z;let X={},q=!1;for(let[Q,$]of Object.entries(Z)){let J=$;if(J.history!==void 0){q=!0;let{history:Y,...H}=J;X[Q]=H}else X[Q]=$}return q?X:Z}function oI(){if(UX)return;UX=!0;let Z=J0();pI(Z,{interval:aI,persistent:!1},(X)=>{if(X.mtimeMs<=o0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((q)=>{if(X.mtimeMs<=o0.mtime)return;let Q=k0(M0(q));if(Q===null||typeof Q!=="object")return;o0={config:LX({...w0(),...Q}),mtime:X.mtimeMs},O7({mtime:X.mtimeMs,size:X.size})}).catch(()=>{})}),Z4(async()=>{uI(Z),UX=!1})}function e6(Z){o0={config:Z,mtime:Date.now()},O7(null)}function a(){if(o0.config)return VX++,o0.config;BX++;try{let Z=null;try{Z=N().statSync(J0())}catch{}let X=LX(Y1(J0(),w0));return o0={config:X,mtime:Z?.mtimeMs??Date.now()},O7(Z?{mtime:Z.mtimeMs,size:Z.size}:null),oI(),X}catch{return LX(Y1(J0(),w0))}}function sI(){let Z=a().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function rI(Z){let X=a();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function Xw(Z){o0.config=Z,o0.mtime=Z?Date.now():0}var dI,GX,o0,VX=0,BX=0,lI=20,aI=1000,UX=!1,tI,eI,Zw;var u2=B(()=>{V6();P7();pU();D6();R6();E0();r6();n1();z0();dI={...v1,autoUpdates:!1,knowledgeGraphEnabled:!0};GX=new Set;o0={config:null,mtime:0};Z4(async()=>{nI()});tI=Y1,eI=m2,Zw=WX});import{dirname as qw}from"path";function Y0(Z,X,q){let Q=Qw();if(!Q)return;let $={timestamp:new Date().toISOString(),level:Z,event:X,data:q??{}},J=N(),Y=m($)+`
|
|
63
|
+
`;try{J.appendFileSync(Q,Y)}catch{try{J.mkdirSync(qw(Q)),J.appendFileSync(Q,Y)}catch{}}}function Qw(){return process.env.CLAUDIN_DIAGNOSTICS_FILE}async function cc(Z,X,q){let Q=Date.now();Y0("info",`${Z}_started`);try{let $=await X(),J=q?q($):{};return Y0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...J}),$}catch($){throw Y0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),$}}var X4=B(()=>{z0();L0()});function _X(Z){let{buffer:X,bytesRead:q}=N().readSync(Z,{length:4096});if(q===0)return"utf8";if(q>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(q>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function RX(Z){let X=0,q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
|
|
64
|
+
`)if(Q>0&&Z[Q-1]==="\r")X++;else q++;return X>q?"CRLF":"LF"}function $w(Z){let X=N(),{resolvedPath:q,isSymlink:Q}=T1(X,Z);if(Q)P(`Reading through symlink: ${Z} -> ${q}`);let $=_X(q),J=X.readFileSync(q,{encoding:$}),Y=RX(J.slice(0,4096));return{content:J.replaceAll(`\r
|
|
65
|
+
`,`
|
|
66
|
+
`),encoding:$,lineEndings:Y}}function H1(Z){return $w(Z).content}var q4=B(()=>{E0();z0()});class dU{cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=N(),q;try{q=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let Q=this.cache.get(Z);if(Q&&Q.mtime===q.mtimeMs)return{content:Q.content,encoding:Q.encoding};let $=lU(Z),J=X.readFileSync(Z,{encoding:$}).replaceAll(`\r
|
|
67
|
+
`,`
|
|
68
|
+
`);if(q.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:J,encoding:$,mtime:q.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:J,encoding:$}}clear(){this.cache.clear()}invalidate(Z){this.cache.delete(Z)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}get size(){return this.cache.size}}var MX;var cU=B(()=>{E7();z0();MX=new dU});var Xl,A0;var p2=B(()=>{A1();z0();C0();Xl=["macos","wsl"],A0=c(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){g(Z)}return"linux"}return"unknown"}catch(Z){return g(Z),"unknown"}})});import*as d2 from"path";import*as nU from"path/win32";function FX(Z){try{return h2(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function Jw(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let q of X)if(FX(q))return q}try{let q=h2(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
|
|
69
|
+
`).filter(Boolean),Q=t().toLowerCase();for(let $ of q){let J=d2.resolve($).toLowerCase();if(d2.dirname(J).toLowerCase()===Q||J.startsWith(Q+d2.sep)){P(`Skipping potentially malicious executable in current directory: ${$}`);continue}return $}return null}catch{return null}}function Ul(){if(A0()==="windows"){let Z=Yw();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var Yw,v7,iU;var aU=B(()=>{A1();K1();E0();HX();o4();p2();Yw=c(()=>{if(process.env.CLAUDIN_GIT_BASH_PATH){if(FX(process.env.CLAUDIN_GIT_BASH_PATH))return process.env.CLAUDIN_GIT_BASH_PATH;console.error(`Claudin was unable to find CLAUDIN_GIT_BASH_PATH path "${process.env.CLAUDIN_GIT_BASH_PATH}"`),process.exit(1)}let Z=Jw("git");if(Z){let X=nU.join(Z,"..","..","bin","bash.exe");if(FX(X))return X}console.error("Claudin on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDIN_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),v7=z1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let X=Z.match(/^([A-Za-z]):[/\\]/);if(X)return"/"+X[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),iU=z1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let Q=X[1].toUpperCase(),$=Z.slice(("/cygdrive/"+X[1]).length);return Q+":"+($||"\\").replace(/\//g,"\\")}let q=Z.match(/^\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),$=Z.slice(2);return Q+":"+($||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as oU}from"os";import{dirname as sU,isAbsolute as Kw,join as Uw,normalize as DX,posix as rU,relative as Gw,resolve as Ww}from"path";function TX(Z,X){let q=X??t()??N().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof q!=="string")throw TypeError(`Base directory must be a string, received ${typeof q}`);if(Z.includes("\x00")||q.includes("\x00"))throw Error("Path contains null bytes");let Q=Z.trim();if(!Q)return DX(q).normalize("NFC");if(Q==="~")return oU().normalize("NFC");if(Q.startsWith("~/"))return Uw(oU(),Q.slice(2)).normalize("NFC");let $=Q;if(A0()==="windows"&&Q.match(/^\/[a-z]\//i))try{$=iU(Q)}catch{$=Q}if(Kw($))return DX($).normalize("NFC");return Ww(q,$).normalize("NFC")}function Rl(Z){let X=Gw(t(),Z);return X.startsWith("..")?Z:X}function Ml(Z,X){if(A0()==="windows"){let q=v7(Z),Q=v7(X);return rU.relative(q,Q)}return rU.relative(Z,X)}function Fl(Z){if(A0()==="windows")return v7(Z);return Z}function Dl(Z){let X=TX(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return sU(X);try{if(N().statSync(X).isDirectory())return X}catch{}return sU(X)}function Al(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function j1(Z){return DX(Z).replace(/\\/g,"/")}var Q4=B(()=>{K1();z0();p2();aU();Hw()});import{chmodSync as Vw,writeFileSync as tU}from"fs";import{realpath as Bw,stat as qG}from"fs/promises";import{homedir as QG}from"os";import{basename as jX,dirname as y7,extname as eU,isAbsolute as Lw,join as c2,normalize as zw,relative as $G,resolve as _w,sep as $4}from"path";async function hl(Z){try{return await qG(Z),!0}catch{return!1}}function fl(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(X){return g(X),null}}function gl(Z){let X=N();return Math.floor(X.statSync(Z).mtimeMs)}async function ml(Z){let X=await N().stat(Z);return Math.floor(X.mtimeMs)}function ul(Z,X,q,Q){let $=X;if(Q==="CRLF")$=X.replaceAll(`\r
|
|
70
|
+
`,`
|
|
71
|
+
`).split(`
|
|
72
|
+
`).join(`\r
|
|
73
|
+
`);n2(Z,$,{encoding:q}),MX.invalidate(Z)}function lU(Z){try{let X=N(),{resolvedPath:q}=T1(X,Z);return _X(q)}catch(X){if(XG(X))P(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else g(X);return"utf8"}}function pl(Z,X="utf8"){try{let q=N(),{resolvedPath:Q}=T1(q,Z),{buffer:$,bytesRead:J}=q.readSync(Q,{length:4096}),Y=$.toString(X,0,J);return RX(Y)}catch(q){return g(q),"LF"}}function dl(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function Mw(Z){let X=Z?TX(Z):void 0,q=X?$G(t(),X):void 0;return{absolutePath:X,relativePath:q}}function cl(Z){let{relativePath:X}=Mw(Z);if(X&&!X.startsWith(".."))return X;let q=QG();if(Z.startsWith(q+$4))return"~"+Z.slice(q.length);return Z}function ll(Z){let X=N();try{let q=y7(Z),Q=jX(Z,eU(Z)),Y=X.readdirSync(q).filter((H)=>jX(H.name,eU(H.name))===Q&&c2(q,H.name)!==Z)[0];if(Y)return Y.name;return}catch(q){if(!l2(q))g(q);return}}async function il(Z){let X=t(),q=y7(X),Q=Z;try{let H=await Bw(y7(Z));Q=c2(H,jX(Z))}catch{}let $=q===$4?$4:q+$4;if(!Q.startsWith($)||Q.startsWith(X+$4)||Q===X)return;let J=$G(q,Q),Y=c2(X,J);try{return await qG(Y),Y}catch{return}}function al({content:Z,startLine:X}){if(!Z)return"";return Z.split(/\r?\n/).map((Q,$)=>`${$+X}→${Q}`).join(`
|
|
74
|
+
`)}function ol(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function sl(Z){try{return N().isDirEmptySync(Z)}catch(X){return l2(X)}}function rl(Z){let{content:X}=MX.readFile(Z);return X}function n2(Z,X,q={encoding:"utf-8"}){let Q=N(),$=Z;try{let U=Q.readlinkSync(Z);$=Lw(U)?U:_w(y7(Z),U),P(`Writing through symlink: ${Z} -> ${$}`)}catch{}let J=`${$}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync($).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(U){if(!l2(U))throw U;if(q.mode!==void 0)Y=q.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${J}`);let U={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)U.mode=q.mode;if(tU(J,X,U),P(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)Vw(J,Y),P("Applied original permissions to temp file");P(`Renaming ${J} to ${$}`),Q.renameSync(J,$),P(`File ${$} written atomically`)}catch(U){P(`Failed to write file atomically: ${U}`,{level:"error"});try{P(`Cleaning up temp file: ${J}`),Q.unlinkSync(J)}catch(G){P(`Failed to clean up temp file: ${G}`)}P(`Falling back to non-atomic write for ${$}`);try{let G={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)G.mode=q.mode;tU($,X,G),P(`File ${$} written successfully with non-atomic fallback`)}catch(G){throw P(`Non-atomic write also failed: ${G}`),G}}}function tl(){let Z=A0(),X=QG();if(Z==="macos")return c2(X,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let J=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync(J))return J}try{let J=N().readdirSync("/mnt/c/Users");for(let Y of J){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=c2("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch($){g($)}}let q=c2(X,"Desktop");if(N().existsSync(q))return q;return X}function el(Z,X=Rw){try{return N().statSync(Z).size<=X}catch{return!1}}function ZG(Z){let X=zw(Z);if(A0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Zn(Z,X){return ZG(Z)===ZG(X)}var Rw=262144,nl="Note: your current working directory is";var E7=B(()=>{K1();E0();n1();q4();cU();z0();C0();Q4();p2()});var YG=d((qn,JG)=>{var I1=$0("constants"),Fw=process.cwd,C7=null,Dw=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!C7)C7=Fw.call(process);return C7};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(S7=process.chdir,process.chdir=function(Z){C7=null,S7.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,S7)}var S7;JG.exports=Aw;function Aw(Z){if(I1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)q(Z);if(Z.chown=J(Z.chown),Z.fchown=J(Z.fchown),Z.lchown=J(Z.lchown),Z.chmod=Q(Z.chmod),Z.fchmod=Q(Z.fchmod),Z.lchmod=Q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=$(Z.chmodSync),Z.fchmodSync=$(Z.fchmodSync),Z.lchmodSync=$(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=U(Z.statSync),Z.fstatSync=U(Z.fstatSync),Z.lstatSync=U(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(W,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(W,V,L,z){if(z)process.nextTick(z)},Z.lchownSync=function(){};if(Dw==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(W){function V(L,z,_){var R=Date.now(),M=0;W(L,z,function F(O){if(O&&(O.code==="EACCES"||O.code==="EPERM"||O.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(z,function(D,w){if(D&&D.code==="ENOENT")W(L,z,F);else _(O)})},M),M<100)M+=10;return}if(_)_(O)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(W){function V(L,z,_,R,M,F){var O;if(F&&typeof F==="function"){var D=0;O=function(w,T,j){if(w&&w.code==="EAGAIN"&&D<10)return D++,W.call(Z,L,z,_,R,M,O);F.apply(this,arguments)}}return W.call(Z,L,z,_,R,M,O)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(W){return function(V,L,z,_,R){var M=0;while(!0)try{return W.call(Z,V,L,z,_,R)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function X(W){W.lchmod=function(V,L,z){W.open(V,I1.O_WRONLY|I1.O_SYMLINK,L,function(_,R){if(_){if(z)z(_);return}W.fchmod(R,L,function(M){W.close(R,function(F){if(z)z(M||F)})})})},W.lchmodSync=function(V,L){var z=W.openSync(V,I1.O_WRONLY|I1.O_SYMLINK,L),_=!0,R;try{R=W.fchmodSync(z,L),_=!1}finally{if(_)try{W.closeSync(z)}catch(M){}else W.closeSync(z)}return R}}function q(W){if(I1.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(V,L,z,_){W.open(V,I1.O_SYMLINK,function(R,M){if(R){if(_)_(R);return}W.futimes(M,L,z,function(F){W.close(M,function(O){if(_)_(F||O)})})})},W.lutimesSync=function(V,L,z){var _=W.openSync(V,I1.O_SYMLINK),R,M=!0;try{R=W.futimesSync(_,L,z),M=!1}finally{if(M)try{W.closeSync(_)}catch(F){}else W.closeSync(_)}return R};else if(W.futimes)W.lutimes=function(V,L,z,_){if(_)process.nextTick(_)},W.lutimesSync=function(){}}function Q(W){if(!W)return W;return function(V,L,z){return W.call(Z,V,L,function(_){if(G(_))_=null;if(z)z.apply(this,arguments)})}}function $(W){if(!W)return W;return function(V,L){try{return W.call(Z,V,L)}catch(z){if(!G(z))throw z}}}function J(W){if(!W)return W;return function(V,L,z,_){return W.call(Z,V,L,z,function(R){if(G(R))R=null;if(_)_.apply(this,arguments)})}}function Y(W){if(!W)return W;return function(V,L,z){try{return W.call(Z,V,L,z)}catch(_){if(!G(_))throw _}}}function H(W){if(!W)return W;return function(V,L,z){if(typeof L==="function")z=L,L=null;function _(R,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(z)z.apply(this,arguments)}return L?W.call(Z,V,L,_):W.call(Z,V,_)}}function U(W){if(!W)return W;return function(V,L){var z=L?W.call(Z,V,L):W.call(Z,V);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function G(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var UG=d((Qn,KG)=>{var HG=$0("stream").Stream;KG.exports=Tw;function Tw(Z){return{ReadStream:X,WriteStream:q};function X(Q,$){if(!(this instanceof X))return new X(Q,$);HG.call(this);var J=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,$=$||{};var Y=Object.keys($);for(var H=0,U=Y.length;H<U;H++){var G=Y[H];this[G]=$[G]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){J._read()});return}Z.open(this.path,this.flags,this.mode,function(W,V){if(W){J.emit("error",W),J.readable=!1;return}J.fd=V,J.emit("open",V),J._read()})}function q(Q,$){if(!(this instanceof q))return new q(Q,$);HG.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,$=$||{};var J=Object.keys($);for(var Y=0,H=J.length;Y<H;Y++){var U=J[Y];this[U]=$[U]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var WG=d(($n,GG)=>{GG.exports=Iw;var jw=Object.getPrototypeOf||function(Z){return Z.__proto__};function Iw(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:jw(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(q){Object.defineProperty(X,q,Object.getOwnPropertyDescriptor(Z,q))}),X}});var NX=d((Jn,OX)=>{var o=$0("fs"),ww=YG(),kw=UG(),Ow=WG(),b7=$0("util"),U0,f7;if(typeof Symbol==="function"&&typeof Symbol.for==="function")U0=Symbol.for("graceful-fs.queue"),f7=Symbol.for("graceful-fs.previous");else U0="___graceful-fs.queue",f7="___graceful-fs.previous";function Nw(){}function BG(Z,X){Object.defineProperty(Z,U0,{get:function(){return X}})}var i1=Nw;if(b7.debuglog)i1=b7.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))i1=function(){var Z=b7.format.apply(b7,arguments);Z="GFS4: "+Z.split(/\n/).join(`
|
|
75
|
+
GFS4: `),console.error(Z)};if(!o[U0]){if(IX=global[U0]||[],BG(o,IX),o.close=function(Z){function X(q,Q){return Z.call(o,q,function($){if(!$)VG();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(X,f7,{value:Z}),X}(o.close),o.closeSync=function(Z){function X(q){Z.apply(o,arguments),VG()}return Object.defineProperty(X,f7,{value:Z}),X}(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){i1(o[U0]),$0("assert").equal(o[U0].length,0)})}var IX;if(!global[U0])BG(global,o[U0]);OX.exports=wX(Ow(o));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched)OX.exports=wX(o),o.__patched=!0;function wX(Z){ww(Z),Z.gracefulify=wX,Z.createReadStream=T,Z.createWriteStream=j;var X=Z.readFile;Z.readFile=q;function q(k,x,E){if(typeof x==="function")E=x,x=null;return h(k,x,E);function h(i,v,y,p){return X(i,v,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))i2([h,[i,v,y],f,p||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=$;function $(k,x,E,h){if(typeof E==="function")h=E,E=null;return i(k,x,E,h);function i(v,y,p,f,H0){return Q(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))i2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var J=Z.appendFile;if(J)Z.appendFile=Y;function Y(k,x,E,h){if(typeof E==="function")h=E,E=null;return i(k,x,E,h);function i(v,y,p,f,H0){return J(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))i2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=U;function U(k,x,E,h){if(typeof E==="function")h=E,E=0;return i(k,x,E,h);function i(v,y,p,f,H0){return H(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))i2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var G=Z.readdir;Z.readdir=V;var W=/^v[0-5]\./;function V(k,x,E){if(typeof x==="function")E=x,x=null;var h=W.test(process.version)?function(y,p,f,H0){return G(y,i(y,p,f,H0))}:function(y,p,f,H0){return G(y,p,i(y,p,f,H0))};return h(k,x,E);function i(v,y,p,f){return function(H0,l){if(H0&&(H0.code==="EMFILE"||H0.code==="ENFILE"))i2([h,[v,y,p],H0,f||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof p==="function")p.call(this,H0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=kw(Z);F=L.ReadStream,D=L.WriteStream}var z=Z.ReadStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=O;var _=Z.WriteStream;if(_)D.prototype=Object.create(_.prototype),D.prototype.open=w;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(k){F=k},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return D},set:function(k){D=k},enumerable:!0,configurable:!0});var R=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(k){R=k},enumerable:!0,configurable:!0});var M=D;Object.defineProperty(Z,"FileWriteStream",{get:function(){return M},set:function(k){M=k},enumerable:!0,configurable:!0});function F(k,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function O(){var k=this;S(k.path,k.flags,k.mode,function(x,E){if(x){if(k.autoClose)k.destroy();k.emit("error",x)}else k.fd=E,k.emit("open",E),k.read()})}function D(k,x){if(this instanceof D)return _.apply(this,arguments),this;else return D.apply(Object.create(D.prototype),arguments)}function w(){var k=this;S(k.path,k.flags,k.mode,function(x,E){if(x)k.destroy(),k.emit("error",x);else k.fd=E,k.emit("open",E)})}function T(k,x){return new Z.ReadStream(k,x)}function j(k,x){return new Z.WriteStream(k,x)}var A=Z.open;Z.open=S;function S(k,x,E,h){if(typeof E==="function")h=E,E=null;return i(k,x,E,h);function i(v,y,p,f,H0){return A(v,y,p,function(l,CE){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))i2([i,[v,y,p,f],l,H0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}return Z}function i2(Z){i1("ENQUEUE",Z[0].name,Z[1]),o[U0].push(Z),kX()}var h7;function VG(){var Z=Date.now();for(var X=0;X<o[U0].length;++X)if(o[U0][X].length>2)o[U0][X][3]=Z,o[U0][X][4]=Z;kX()}function kX(){if(clearTimeout(h7),h7=void 0,o[U0].length===0)return;var Z=o[U0].shift(),X=Z[0],q=Z[1],Q=Z[2],$=Z[3],J=Z[4];if($===void 0)i1("RETRY",X.name,q),X.apply(null,q);else if(Date.now()-$>=60000){i1("TIMEOUT",X.name,q);var Y=q.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-J,U=Math.max(J-$,1),G=Math.min(U*1.2,100);if(H>=G)i1("RETRY",X.name,q),X.apply(null,q.concat([$]));else o[U0].push(Z)}if(h7===void 0)h7=setTimeout(kX,0)}});var zG=d((Yn,LG)=>{function v0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}LG.exports=v0;v0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};v0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};v0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var q=this._timeouts.shift();if(q===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),q=this._timeouts.shift();else return!1;var Q=this,$=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},q);if(this._options.unref)$.unref();return!0};v0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var q=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){q._operationTimeoutCb()},q._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};v0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};v0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};v0.prototype.start=v0.prototype.try;v0.prototype.errors=function(){return this._errors};v0.prototype.attempts=function(){return this._attempts};v0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,q=0;for(var Q=0;Q<this._errors.length;Q++){var $=this._errors[Q],J=$.message,Y=(Z[J]||0)+1;if(Z[J]=Y,Y>=q)X=$,q=Y}return X}});var RG=d((Pw)=>{var xw=zG();Pw.operation=function(Z){var X=Pw.timeouts(Z);return new xw(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Pw.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var q in Z)X[q]=Z[q];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var $=0;$<X.retries;$++)Q.push(this.createTimeout($,X));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout($,X));return Q.sort(function(J,Y){return J-Y}),Q};Pw.createTimeout=function(Z,X){var q=X.randomize?Math.random()+1:1,Q=Math.round(q*X.minTimeout*Math.pow(X.factor,Z));return Q=Math.min(Q,X.maxTimeout),Q};Pw.wrap=function(Z,X,q){if(X instanceof Array)q=X,X=null;if(!q){q=[];for(var Q in Z)if(typeof Z[Q]==="function")q.push(Q)}for(var $=0;$<q.length;$++){var J=q[$],Y=Z[J];Z[J]=function(U){var G=Pw.operation(X),W=Array.prototype.slice.call(arguments,1),V=W.pop();W.push(function(L){if(G.retry(L))return;if(L)arguments[0]=G.mainError();V.apply(this,arguments)}),G.attempt(function(){U.apply(Z,W)})}.bind(Z,Y),Z[J].options=X}}});var MG=d((Kn,g7)=>{g7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")g7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")g7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var FG=d((Un,o2)=>{var n=global.process,a1=function(Z){return Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function"};if(!a1(n))o2.exports=function(){return function(){}};else{if(xX=$0("assert"),o1=MG(),PX=/^win/i.test(n.platform),a2=$0("events"),typeof a2!=="function")a2=a2.EventEmitter;if(n.__signal_exit_emitter__)X0=n.__signal_exit_emitter__;else X0=n.__signal_exit_emitter__=new a2,X0.count=0,X0.emitted={};if(!X0.infinite)X0.setMaxListeners(1/0),X0.infinite=!0;o2.exports=function(Z,X){if(!a1(global.process))return function(){};if(xX.equal(typeof Z,"function","a callback must be provided for exit handler"),s1===!1)m7();var q="exit";if(X&&X.alwaysLast)q="afterexit";var Q=function(){if(X0.removeListener(q,Z),X0.listeners("exit").length===0&&X0.listeners("afterexit").length===0)J4()};return X0.on(q,Z),Q},J4=function(){if(!s1||!a1(global.process))return;s1=!1,o1.forEach(function(X){try{n.removeListener(X,Y4[X])}catch(q){}}),n.emit=H4,n.reallyExit=u7,X0.count-=1},o2.exports.unload=J4,w1=function(X,q,Q){if(X0.emitted[X])return;X0.emitted[X]=!0,X0.emit(X,q,Q)},Y4={},o1.forEach(function(Z){Y4[Z]=function(){if(!a1(global.process))return;var q=n.listeners(Z);if(q.length===X0.count){if(J4(),w1("exit",null,Z),w1("afterexit",null,Z),PX&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),o2.exports.signals=function(){return o1},s1=!1,m7=function(){if(s1||!a1(global.process))return;s1=!0,X0.count+=1,o1=o1.filter(function(X){try{return n.on(X,Y4[X]),!0}catch(q){return!1}}),n.emit=vX,n.reallyExit=EX},o2.exports.load=m7,u7=n.reallyExit,EX=function(X){if(!a1(global.process))return;n.exitCode=X||0,w1("exit",n.exitCode,null),w1("afterexit",n.exitCode,null),u7.call(n,n.exitCode)},H4=n.emit,vX=function(X,q){if(X==="exit"&&a1(global.process)){if(q!==void 0)n.exitCode=q;var Q=H4.apply(this,arguments);return w1("exit",n.exitCode,null),w1("afterexit",n.exitCode,null),Q}else return H4.apply(this,arguments)}}var xX,o1,PX,a2,X0,J4,w1,Y4,s1,m7,u7,EX,H4,vX});var AG=d((bw,yX)=>{var DG=Symbol();function Cw(Z,X,q){let Q=X[DG];if(Q)return X.stat(Z,(J,Y)=>{if(J)return q(J);q(null,Y.mtime,Q)});let $=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,$,$,(J)=>{if(J)return q(J);X.stat(Z,(Y,H)=>{if(Y)return q(Y);let U=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,DG,{value:U}),q(null,H.mtime,U)})})}function Sw(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}bw.probe=Cw;bw.getMtime=Sw});var kG=d((lw,U4)=>{var gw=$0("path"),bX=NX(),mw=RG(),uw=FG(),TG=AG(),U1={};function K4(Z,X){return X.lockfilePath||`${Z}.lock`}function hX(Z,X,q){if(!X.realpath)return q(null,gw.resolve(Z));X.fs.realpath(Z,q)}function SX(Z,X,q){let Q=K4(Z,X);X.fs.mkdir(Q,($)=>{if(!$)return TG.probe(Q,X.fs,(J,Y,H)=>{if(J)return X.fs.rmdir(Q,()=>{}),q(J);q(null,Y,H)});if($.code!=="EEXIST")return q($);if(X.stale<=0)return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(Q,(J,Y)=>{if(J){if(J.code==="ENOENT")return SX(Z,{...X,stale:0},q);return q(J)}if(!jG(Y,X))return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));IG(Z,X,(H)=>{if(H)return q(H);SX(Z,{...X,stale:0},q)})})})}function jG(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function IG(Z,X,q){X.fs.rmdir(K4(Z,X),(Q)=>{if(Q&&Q.code!=="ENOENT")return q(Q);q()})}function p7(Z,X){let q=U1[Z];if(q.updateTimeout)return;if(q.updateDelay=q.updateDelay||X.update,q.updateTimeout=setTimeout(()=>{q.updateTimeout=null,X.fs.stat(q.lockfilePath,(Q,$)=>{let J=q.lastUpdate+X.stale<Date.now();if(Q){if(Q.code==="ENOENT"||J)return CX(Z,q,Object.assign(Q,{code:"ECOMPROMISED"}));return q.updateDelay=1000,p7(Z,X)}if(q.mtime.getTime()!==$.mtime.getTime())return CX(Z,q,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=TG.getMtime(q.mtimePrecision);X.fs.utimes(q.lockfilePath,H,H,(U)=>{let G=q.lastUpdate+X.stale<Date.now();if(q.released)return;if(U){if(U.code==="ENOENT"||G)return CX(Z,q,Object.assign(U,{code:"ECOMPROMISED"}));return q.updateDelay=1000,p7(Z,X)}q.mtime=H,q.lastUpdate=Date.now(),q.updateDelay=null,p7(Z,X)})})},q.updateDelay),q.updateTimeout.unref)q.updateTimeout.unref()}function CX(Z,X,q){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(U1[Z]===X)delete U1[Z];X.options.onCompromised(q)}function pw(Z,X,q){X={stale:1e4,update:null,realpath:!0,retries:0,fs:bX,onCompromised:(Q)=>{throw Q},...X},X.retries=X.retries||0,X.retries=typeof X.retries==="number"?{retries:X.retries}:X.retries,X.stale=Math.max(X.stale||0,2000),X.update=X.update==null?X.stale/2:X.update||0,X.update=Math.max(Math.min(X.update,X.stale/2),1000),hX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=mw.operation(X.retries);J.attempt(()=>{SX($,X,(Y,H,U)=>{if(J.retry(Y))return;if(Y)return q(J.mainError());let G=U1[$]={lockfilePath:K4($,X),mtime:H,mtimePrecision:U,options:X,lastUpdate:Date.now()};p7($,X),q(null,(W)=>{if(G.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));wG($,{...X,realpath:!1},W)})})})})}function wG(Z,X,q){X={fs:bX,realpath:!0,...X},hX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=U1[$];if(!J)return q(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));J.updateTimeout&&clearTimeout(J.updateTimeout),J.released=!0,delete U1[$],IG($,X,q)})}function dw(Z,X,q){X={stale:1e4,realpath:!0,fs:bX,...X},X.stale=Math.max(X.stale||0,2000),hX(Z,X,(Q,$)=>{if(Q)return q(Q);X.fs.stat(K4($,X),(J,Y)=>{if(J)return J.code==="ENOENT"?q(null,!1):q(J);return q(null,!jG(Y,X))})})}function cw(){return U1}uw(()=>{for(let Z in U1){let X=U1[Z].options;try{X.fs.rmdirSync(K4(Z,X))}catch(q){}}});lw.lock=pw;lw.unlock=wG;lw.check=dw;lw.getLocks=cw});var NG=d((Gn,OG)=>{var sw=NX();function rw(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],q={...Z};return X.forEach((Q)=>{q[Q]=(...$)=>{let J=$.pop(),Y;try{Y=Z[`${Q}Sync`](...$)}catch(H){return J(H)}J(null,Y)}}),q}function tw(Z){return(...X)=>new Promise((q,Q)=>{X.push(($,J)=>{if($)Q($);else q(J)}),Z(...X)})}function ew(Z){return(...X)=>{let q,Q;if(X.push(($,J)=>{q=$,Q=J}),Z(...X),q)throw q;return Q}}function Zk(Z){if(Z={...Z},Z.fs=rw(Z.fs||sw),typeof Z.retries==="number"&&Z.retries>0||Z.retries&&typeof Z.retries.retries==="number"&&Z.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return Z}OG.exports={toPromise:tw,toSync:ew,toSyncOptions:Zk}});var PG=d((Wn,k1)=>{var s2=kG(),{toPromise:d7,toSync:c7,toSyncOptions:fX}=NG();async function xG(Z,X){let q=await d7(s2.lock)(Z,X);return d7(q)}function Xk(Z,X){let q=c7(s2.lock)(Z,fX(X));return c7(q)}function qk(Z,X){return d7(s2.unlock)(Z,X)}function Qk(Z,X){return c7(s2.unlock)(Z,fX(X))}function $k(Z,X){return d7(s2.check)(Z,X)}function Jk(Z,X){return c7(s2.check)(Z,fX(X))}k1.exports=xG;k1.exports.lock=xG;k1.exports.unlock=qk;k1.exports.lockSync=Xk;k1.exports.unlockSync=Qk;k1.exports.check=$k;k1.exports.checkSync=Jk});function mX(){if(!gX)gX=PG();return gX}function Vn(Z,X){return mX().lock(Z,X)}function EG(Z,X){return mX().lockSync(Z,X)}function Bn(Z,X){return mX().check(Z,X)}var gX;var vG=()=>{};import{basename as i7,dirname as a7,join as O1}from"path";function Hk(){return pX}function O7(Z){CG=Z}function N7(Z,X,q){let Q=a7(Z);N().mkdirSync(Q);let J=t5(X,(Y,H)=>m(Y)!==m(q[H]));if(n2(Z,m(J,null,2),{encoding:"utf-8",mode:384}),Z===J0())pX++}function x7(Z,X,q){let Q=X(),$=a7(Z),J=N();J.mkdirSync($);let Y;try{let H=`${Z}.lock`,U=Date.now();if(Y=EG(Z,{lockfilePath:H,onCompromised:(z)=>{P(`Config lock compromised: ${z}`,{level:"error"})}}),Date.now()-U>100)P("Lock acquisition took longer than expected - another Claude instance may be running");if(CG&&Z===J0())try{let z=J.statSync(Z)}catch(z){if(B0(z)!=="ENOENT")throw z}let W=Y1(Z,X);if(Z===J0()&&m2(W))return P("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),!1;let V=q(W);if(V===W)return!1;let L=t5(V,(z,_)=>m(z)!==m(Q[_]));try{let z=i7(Z),_=o7();try{J.mkdirSync(_)}catch(j){if(B0(j)!=="EEXIST")throw j}let R=60000,M=J.readdirStringSync(_).filter((j)=>j.startsWith(`${z}.backup.`)).sort().reverse(),F=M[0],O=F?Number(F.split(".backup.").pop()):0,D=Number.isNaN(O)||Date.now()-O>=R,w=Gk(Z),T=D&&w;if(T){let j=O1(_,`${z}.backup.${Date.now()}`);J.copyFileSync(Z,j)}if(w){let A=T?J.readdirStringSync(_).filter((S)=>S.startsWith(`${z}.backup.`)).sort().reverse():M;for(let S of A.slice(5))try{J.unlinkSync(O1(_,S))}catch{}}}catch(z){if(B0(z)!=="ENOENT")P(`Failed to backup config: ${z}`,{level:"error"})}if(n2(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===J0())pX++;return!0}finally{if(Y)Y()}}function Kk(){return n7}function Uk(){if(n7)return;let Z=Date.now();Y0("info","enable_configs_started"),n7=!0,Y1(J0(),w0,!0),Y0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function o7(){return O1(Z0(),"backups")}function yG(Z){let X=N(),q=i7(Z),Q=o7();try{let Y=X.readdirStringSync(Q).filter((H)=>H.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return O1(Q,Y)}catch{}let $=a7(Z);try{let Y=X.readdirStringSync($).filter((U)=>U.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return O1($,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function Gk(Z){let X=N();try{return q0(M0(X.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function Wk(Z,X){let q=N(),Q=i7(Z),$=new Set;for(let J of[o7(),a7(Z)]){let Y;try{Y=q.readdirStringSync(J).filter((H)=>H.startsWith(`${Q}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let U=O1(J,H);if($.has(U))continue;$.add(U);try{let G=q0(M0(q.readFileSync(U,{encoding:"utf-8"})));return{config:{...X(),...G},backupPath:U}}catch{}}}return null}function Y1(Z,X,q){if(!n7)throw Error("Config accessed before allowed.");let Q=N();try{let $=Q.readFileSync(Z,{encoding:"utf-8"});try{let J=q0(M0($));return{...X(),...J}}catch(J){let Y=J instanceof Error?J.message:String(J);throw new l7(Y,Z,X())}}catch($){if(B0($)==="ENOENT"){let Y=yG(Z);if(Y)process.stderr.write(`
|
|
76
|
+
Claude configuration file not found at: ${Z}
|
|
77
|
+
A backup file exists at: ${Y}
|
|
78
|
+
You can manually restore it by running: cp "${Y}" "${Z}"
|
|
79
|
+
|
|
80
|
+
`);return X()}if($ instanceof l7&&q)throw $;if($ instanceof l7){if(P(`Config file corrupted, resetting to defaults: ${$.message}`,{level:"error"}),!uX){uX=!0;try{g($);let _=!1;try{Q.statSync(`${Z}.backup`),_=!0}catch{}}finally{uX=!1}}process.stderr.write(`
|
|
81
|
+
Claude configuration file at ${Z} is corrupted: ${$.message}
|
|
82
|
+
`);let Y=i7(Z),H=o7();try{Q.mkdirSync(H)}catch(_){if(B0(_)!=="EEXIST")throw _}let U=Q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),G,W=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let _ of U)try{let R=Q.readFileSync(O1(H,_),{encoding:"utf-8"});if(V===R){W=!0;break}}catch{}if(!W){G=O1(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,G),P(`Corrupted config backed up to: ${G}`,{level:"error"})}catch{}}let L=Wk(Z,X);if(L){if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
|
|
83
|
+
`);let _=!1;try{Q.copyFileSync(L.backupPath,Z),_=!0}catch{}return process.stderr.write(_?`Recovered configuration from backup: ${L.backupPath}
|
|
84
|
+
|
|
85
|
+
`:`Recovered configuration from backup (in memory): ${L.backupPath}
|
|
86
|
+
|
|
87
|
+
`),L.config}let z=yG(Z);if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
|
|
88
|
+
`);else if(W)process.stderr.write(`The corrupted file has already been backed up.
|
|
89
|
+
`);if(z)process.stderr.write(`A backup file exists at: ${z}
|
|
90
|
+
You can manually restore it by running: cp "${z}" "${Z}"
|
|
91
|
+
|
|
92
|
+
`);else process.stderr.write(`
|
|
93
|
+
`)}return X()}}var uX=!1,CG=null,pX=0,n7=!1;var P7=B(()=>{L$();V6();u2();E0();X4();r6();P0();n1();E7();z0();R6();vG();C0();L0()});import{readFile as Vk}from"fs/promises";import{join as Bk}from"path";async function G4(Z,X,q,Q){try{let $=await Vk(Bk(Z,"config"),"utf-8");return Lk($,X,q,Q)}catch{return null}}function Lk(Z,X,q,Q){let $=Z.split(`
|
|
94
|
+
`),J=X.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let U of $){let G=U.trim();if(G.length===0||G[0]==="#"||G[0]===";")continue;if(G[0]==="["){H=Mk(G,J,q);continue}if(!H)continue;let W=zk(G);if(W&&W.key.toLowerCase()===Y)return W.value}return null}function zk(Z){let X=0;while(X<Z.length&&Fk(Z[X]))X++;if(X===0)return null;let q=Z.slice(0,X);while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=="=")return null;X++;while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;let Q=_k(Z,X);return{key:q,value:Q}}function _k(Z,X){let q="",Q=!1,$=X;while($<Z.length){let J=Z[$];if(!Q&&(J==="#"||J===";"))break;if(J==='"'){Q=!Q,$++;continue}if(J==="\\"&&$+1<Z.length){let Y=Z[$+1];if(Q){switch(Y){case"n":q+=`
|
|
95
|
+
`;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Y;break}$+=2;continue}if(Y==="\\"){q+="\\",$+=2;continue}}q+=J,$++}if(!Q)q=Rk(q);return q}function Rk(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function Mk(Z,X,q){let Q=1;while(Q<Z.length&&Z[Q]!=="]"&&Z[Q]!==" "&&Z[Q]!=="\t"&&Z[Q]!=='"')Q++;if(Z.slice(1,Q).toLowerCase()!==X)return!1;if(q===null)return Q<Z.length&&Z[Q]==="]";while(Q<Z.length&&(Z[Q]===" "||Z[Q]==="\t"))Q++;if(Q>=Z.length||Z[Q]!=='"')return!1;Q++;let J="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){J+=Y,Q+=2;continue}J+=Y,Q+=2;continue}J+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return J===q}function Fk(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var SG=()=>{};import{unwatchFile as bG,watchFile as Dk}from"fs";import{readdir as Ak,readFile as r1,stat as Tk}from"fs/promises";import{join as f0,resolve as s7}from"path";function mn(){r2.clear()}async function s0(Z){let X=s7(Z??t()),q=r2.get(X);if(q!==void 0)return q;let Q=V4(X);if(!Q)return r2.set(X,null),null;let $=f0(Q,".git");try{if((await Tk($)).isFile()){let Y=(await r1($,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),U=s7(Q,H);return r2.set(X,U),U}}return r2.set(X,$),$}catch{return r2.set(X,null),null}}function r7(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function dX(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function W4(Z){try{let X=(await r1(f0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let q=X.slice(4).trim();if(q.startsWith("refs/heads/")){let $=q.slice(11);if(!r7($))return null;return{type:"branch",name:$}}if(!r7(q))return null;let Q=await t2(Z,q);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!dX(X))return null;return{type:"detached",sha:X}}catch{return null}}async function t2(Z,X){let q=await hG(Z,X);if(q)return q;let Q=await e2(Z);if(Q&&Q!==Z)return hG(Q,X);return null}async function hG(Z,X){try{let q=(await r1(f0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(!r7(Q))return null;return t2(Z,Q)}if(!dX(q))return null;return q}catch{}try{let q=await r1(f0(Z,"packed-refs"),"utf-8");for(let Q of q.split(`
|
|
96
|
+
`)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let $=Q.indexOf(" ");if($===-1)continue;if(Q.slice($+1)===X){let J=Q.slice(0,$);return dX(J)?J:null}}}catch{}return null}async function e2(Z){try{let X=(await r1(f0(Z,"commondir"),"utf-8")).trim();return s7(Z,X)}catch{return null}}async function jk(Z,X,q){try{let Q=(await r1(f0(Z,X),"utf-8")).trim();if(Q.startsWith("ref:")){let $=Q.slice(4).trim();if($.startsWith(q)){let J=$.slice(q.length);if(!r7(J))return null;return J}}}catch{}return null}class gG{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await s0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await e2(this.gitDir),this.watchPath(f0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(f0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Z4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Dk(Z,{interval:Ik},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await W4(this.gitDir),X=this.commonDir??this.gitDir,q=Z?.type==="branch"?f0(X,"refs","heads",Z.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)bG(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((Q)=>Q!==this.branchRefPath);if(this.branchRefPath=q,!q)return;this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await fG(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)bG(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let q=this.cache.get(Z);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let Q=await X(),$=this.cache.get(Z);if($&&!$.dirty)$.value=Q;if(!$)this.cache.set(Z,{value:Q,dirty:!1,compute:X});return Q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function wk(){let Z=await s0();if(!Z)return"HEAD";let X=await W4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function kk(){let Z=await s0();if(!Z)return"";let X=await W4(Z);if(!X)return"";if(X.type==="branch")return await t2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function Ok(){let Z=await s0();if(!Z)return null;let X=await G4(Z,"remote","origin","url");if(X)return X;let q=await e2(Z);if(q&&q!==Z)return G4(q,"remote","origin","url");return null}async function Nk(){let Z=await s0();if(!Z)return"main";let X=await e2(Z)??Z,q=await jk(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let Q of["main","master"])if(await t2(X,`refs/remotes/origin/${Q}`))return Q;return"main"}function mG(){return t7.get("branch",wk)}function uG(){return t7.get("head",kk)}function pG(){return t7.get("remoteUrl",Ok)}function dG(){return t7.get("defaultBranch",Nk)}async function un(Z){let X=await s0(Z);if(!X)return null;let q=await W4(X);if(!q)return null;if(q.type==="branch")return t2(X,`refs/heads/${q.name}`);return q.sha}async function pn(Z){let X;try{let Q=(await r1(f0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;X=s7(Z,Q.slice(7).trim())}catch{return null}let q=await W4(X);if(!q)return null;if(q.type==="branch")return t2(X,`refs/heads/${q.name}`);return q.sha}async function dn(Z){let X=await s0(Z);if(!X)return null;let q=await G4(X,"remote","origin","url");if(q)return q;let Q=await e2(X);if(Q&&Q!==X)return G4(Q,"remote","origin","url");return null}async function cG(){try{let Z=await s0();if(!Z)return 0;let X=await e2(Z)??Z;return(await Ak(f0(X,"worktrees"))).length+1}catch{return 1}}var r2,Ik=1000,t7;var lG=B(()=>{N1();pU();K1();B4();SG();r2=new Map;t7=new gG});import{readFileSync as cX,realpathSync as nG,statSync as iG}from"fs";import{readdir as xk,stat as Pk}from"fs/promises";import{basename as Ek,dirname as lX,join as _0,resolve as e7,sep as aG}from"path";function vk(){function Z(X){let q=oG(X);return q===sG?null:q}return Z.cache=oG.cache,Z}function yk(){function Z(X){let q=V4(X);if(!q)return null;return nX(q)}return Z.cache=nX.cache,Z}function Ck(Z){let X=new Set,q=[];for(let Q of Z){if(!Q||X.has(Q))continue;X.add(Q),q.push(Q)}return q}function $i(Z,X){return Ck([t1(Z),...X.map((q)=>t1(q))])}async function Ji(Z,X){let q=X?.maxDepth??3,Q=X?.maxDirs??1500,$=[],J=0,Y=async(U)=>{try{return await Pk(_0(U,".git")),!0}catch{return!1}},H=async(U,G)=>{if(G>q||J>=Q)return;let W;try{W=await xk(U,{withFileTypes:!0})}catch{return}for(let V of W){if(J>=Q)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||Sk.has(V.name))continue;let L=_0(U,V.name);if(J++,await Y(L)){$.push(nX(L.normalize("NFC")));continue}await H(L,G+1)}};return await H(Z,1),$}function Hi(Z){return s0(Z)}async function Vi(){try{let[Z,X,q,Q,$,J]=await Promise.all([bk(),hk(),tG(),fk(),gk(),uk()]);return{commitHash:Z,branchName:X,remoteUrl:q,isHeadOnRemote:Q,isClean:$,worktreeCount:J}}catch(Z){return null}}async function Bi(){let{parseGitRemote:Z}=await import("./detectRepository-1.1.38-fkd9xdma.mjs"),X=await tG();if(!X)return P("Local GitHub repo: unknown"),null;let q=Z(X);if(q&&q.host==="github.com"){let Q=`${q.owner}/${q.name}`;return P(`Local GitHub repo: ${Q}`),Q}return P("Local GitHub repo: unknown"),null}async function Li(){let{stdout:Z,code:X}=await T0(j0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:q,code:Q}=await T0(j0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let J=q.match(/HEAD branch: (\S+)/);if(J&&J[1])return`origin/${J[1]}`}let $=["origin/main","origin/staging","origin/master"];for(let J of $){let{code:Y}=await T0(j0(),["rev-parse","--verify",J],{preserveOutputOnError:!1});if(Y===0)return J}return null}function zi(){let Z=N(),X=t(),q=_0(X,".git");try{let Q=Z.statSync(q);if(Q.isFile())return!1;if(Q.isDirectory()){let $=_0(q,"HEAD");try{if(Z.statSync($).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(_0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(_0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(_0(X,"refs")).isDirectory())return!0}catch{}return!1}var sG,oG,V4,nX,t1,Sk,j0,Yi,rG=async(Z)=>{return V4(Z)!==null},bk=async()=>{return uG()},hk=async(Z)=>{if(Z){let{stdout:X,code:q}=await e1(j0(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return q===0?X.trim():""}return mG()},Ki=async()=>{return dG()},tG=async()=>{return pG()},fk=async()=>{let{code:Z}=await T0(j0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},Ui=async(Z)=>{let X=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:q,code:Q}=Z?await e1(j0(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await T0(j0(),X,{preserveOutputOnError:!1,useCwd:!0});if(Q!==0)return{ahead:0,behind:0};let $=q.trim().split(/\s+/);if($.length!==2)return{ahead:0,behind:0};let J=parseInt($[0],10),Y=parseInt($[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite(J)?J:0}},gk=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:q}=await T0(j0(),X,{preserveOutputOnError:!1});return q.trim().length===0},Gi=async()=>{let{stdout:Z}=await T0(j0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
|
|
97
|
+
`).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},mk=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"],{stdout:q}=Z?await e1(j0(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await T0(j0(),X,{preserveOutputOnError:!1}),Q=[],$=[];return q.trim().split(`
|
|
98
|
+
`).filter((J)=>J.length>0).forEach((J)=>{let Y=J.substring(0,2),H=J.substring(2).trim();if(Y==="??")$.push(H);else if(H)Q.push(H)}),{tracked:Q,untracked:$}},uk=async()=>{return cG()},Wi=async(Z)=>{try{let X=Z||`Claudin auto-stash - ${new Date().toISOString()}`,{untracked:q}=await mk();if(q.length>0){let{code:$}=await T0(j0(),["add",...q],{preserveOutputOnError:!1});if($!==0)return!1}let{code:Q}=await T0(j0(),["stash","push","--message",X],{preserveOutputOnError:!1});return Q===0}catch(X){return!1}};var B4=B(()=>{A1();K1();E0();X4();Z5();z0();lG();o4();k7();sG=Symbol("git-root-not-found"),oG=z1((Z)=>{let X=Date.now();Y0("info","find_git_root_started");let q=e7(Z),Q=q.substring(0,q.indexOf(aG)+1)||aG,$=0;while(q!==Q){try{let Y=_0(q,".git");$++;let H=iG(Y);if(H.isDirectory()||H.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),q.normalize("NFC")}catch{}let J=lX(q);if(J===q)break;q=J}try{let J=_0(Q,".git");$++;let Y=iG(J);if(Y.isDirectory()||Y.isFile())return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),Q.normalize("NFC")}catch{}return Y0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!1}),sG},(Z)=>Z,50),V4=vk();nX=z1((Z)=>{try{let X=cX(_0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let q=e7(Z,X.slice(7).trim()),Q=e7(q,cX(_0(q,"commondir"),"utf-8").trim());if(e7(lX(q))!==_0(Q,"worktrees"))return Z;if(nG(cX(_0(q,"gitdir"),"utf-8").trim())!==_0(nG(Z),".git"))return Z;if(Ek(Q)!==".git")return Q.normalize("NFC");return lX(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),t1=yk();Sk=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);j0=c(()=>{return w7("git")||"git"}),Yi=c(async()=>{let Z=Date.now();Y0("info","is_git_check_started");let X=V4(t())!==null;return Y0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});import{resolve as pk}from"path";function dk(){return}function L4(){let Z=x1(),X=Z2.get(Z);if(X!==void 0)return Z2.delete(Z),Z2.set(Z,X),X;let q=t1(Z),Q=q?j1(q):j1(pk(Z));if(Z2.size>=ck){let $=Z2.keys().next().value;if($!==void 0)Z2.delete($)}return Z2.set(Z,Q),Q}function z4(){let Z=L4(),X=a();if(!X.projects)return E1;let q=X.projects[Z]??E1;if(typeof q.allowedTools==="string")q.allowedTools=k0(q.allowedTools)??[];return q}function X5(Z){let X=L4(),q=null;try{if(x7(J0(),w0,($)=>{let J=$.projects?.[X]??E1,Y=Z(J);if(Y===J)return $;return q={...$,projects:{...$.projects,[X]:Y}},q})&&q)e6(q),t6()}catch(Q){P(`Failed to save config with lock: ${Q}`,{level:"error"});let $=Y1(J0(),w0);if(m2($)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=$.projects?.[X]??E1,Y=Z(J);if(Y===J)return;q={...$,projects:{...$.projects,[X]:Y}},N7(J0(),q,v1),e6(q),t6()}}var iX,ck=32,Z2;var aX=B(()=>{N1();V6();P7();u2();D6();E0();r6();Q4();B4();iX={...E1};Z2=new Map});import{resolve as oX}from"path";function lk(){ZW=!1}function nk(){return ZW||=ik()}function ik(){if(eG())return!0;let Z=a(),X=L4();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let Q=j1(t());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let J=j1(oX(Q,".."));if(J===Q)break;Q=J}return!1}function ak(Z){let X=a(),q=j1(oX(Z));while(!0){if(X.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=j1(oX(q,".."));if(Q===q)return!1;q=Q}}var ZW=!1;var XW=B(()=>{N1();u2();aX();K1();Q4()});function qW(Z,X,q,Q){if(!X)return{effective:q,status:"valid"};let $=parseInt(X,10);if(isNaN($)||$<=0){let J={effective:q,status:"invalid",message:`Invalid value "${X}" (using default: ${q})`};return P(`${Z} ${J.message}`),J}if($>Q){let J={effective:Q,status:"capped",message:`Capped from ${$} to ${Q}`};return P(`${Z} ${J.message}`),J}return{effective:$,status:"valid"}}var QW=B(()=>{E0()});function sk(Z,X,q){if(q!==void 0&&!q5(Z[X],q)||q===void 0&&!(X in Z))JW(Z,X,q)}var _4;var sX=B(()=>{ok();$W();_4=sk});function rk(Z){return function(X,q,Q){var $=-1,J=Object(X),Y=Q(X),H=Y.length;while(H--){var U=Y[Z?H:++$];if(q(J[U],U,J)===!1)break}return X}}var YW;var HW=B(()=>{YW=rk});var tk,KW;var UW=B(()=>{HW();tk=YW(),KW=tk});function ek(Z){return Q5(Z)&&$5(Z)}var VW;var BW=B(()=>{WW();GW();VW=ek});function HO(Z){if(!Q5(Z)||LW(Z)!=qO)return!1;var X=zW(Z);if(X===null)return!0;var q=JO.call(X,"constructor")&&X.constructor;return typeof q=="function"&&q instanceof q&&_W.call(q)==YO}var qO="[object Object]",QO,$O,_W,JO,YO,RW;var MW=B(()=>{ZO();XO();GW();QO=Function.prototype,$O=Object.prototype,_W=QO.toString,JO=$O.hasOwnProperty,YO=_W.call(Object);RW=HO});function KO(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var R4;var rX=B(()=>{R4=KO});function GO(Z){return FW(Z,J5(Z))}var AW;var TW=B(()=>{UO();DW();AW=GO});function DO(Z,X,q,Q,$,J,Y){var H=R4(Z,q),U=R4(X,q),G=Y.get(U);if(G){_4(Z,q,G);return}var W=J?J(H,U,q+"",Z,X,Y):void 0,V=W===void 0;if(V){var L=tX(U),z=!L&&IW(U),_=!L&&!z&&wW(U);if(W=U,L||z||_)if(tX(H))W=H;else if(VW(H))W=OW(H);else if(z)V=!1,W=kW(U,!0);else if(_)V=!1,W=NW(U,!0);else W=[];else if(RW(U)||eX(U)){if(W=H,eX(H))W=AW(H);else if(!r0(H)||jW(H))W=xW(U)}else V=!1}if(V)Y.set(U,W),$(W,U,Q,J,Y),Y.delete(U);_4(Z,q,W)}var PW;var EW=B(()=>{sX();_O();MO();RO();FO();BO();VO();BW();LO();WO();p4();MW();zO();rX();TW();PW=DO});function yW(Z,X,q,Q,$){if(Z===X)return;KW(X,function(J,Y){if($||($=new vW),r0(J))PW(Z,X,Y,q,yW,Q,$);else{var H=Q?Q(R4(Z,Y),J,Y+"",Z,X,$):void 0;if(H===void 0)H=J;_4(Z,Y,H)}},J5)}var CW;var SW=B(()=>{AO();sX();UW();EW();p4();DW();rX();CW=yW});function TO(Z,X,q){switch(q.length){case 0:return Z.call(X);case 1:return Z.call(X,q[0]);case 2:return Z.call(X,q[0],q[1]);case 3:return Z.call(X,q[0],q[1],q[2])}return Z.apply(X,q)}var bW;var hW=B(()=>{bW=TO});function jO(Z,X,q){return X=fW(X===void 0?Z.length-1:X,0),function(){var Q=arguments,$=-1,J=fW(Q.length-X,0),Y=Array(J);while(++$<J)Y[$]=Q[X+$];$=-1;var H=Array(X+1);while(++$<X)H[$]=Q[$];return H[X]=q(Y),bW(Z,this,H)}}var fW,gW;var mW=B(()=>{hW();fW=Math.max;gW=jO});function IO(Z){return function(){return Z}}var uW;var pW=B(()=>{uW=IO});var kO,cW;var lW=B(()=>{pW();wO();dW();kO=!Zq?Y5:function(Z,X){return Zq(Z,"toString",{configurable:!0,enumerable:!1,value:uW(X),writable:!0})},cW=kO});function PO(Z){var X=0,q=0;return function(){var Q=xO(),$=NO-(Q-q);if(q=Q,$>0){if(++X>=OO)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var OO=800,NO=16,xO,nW;var iW=B(()=>{xO=Date.now;nW=PO});var EO,aW;var oW=B(()=>{lW();iW();EO=nW(cW),aW=EO});function vO(Z,X){return aW(gW(Z,X,Y5),Z+"")}var sW;var rW=B(()=>{dW();mW();oW();sW=vO});function yO(Z,X,q){if(!r0(q))return!1;var Q=typeof X;if(Q=="number"?$5(q)&&d4(X,q.length):Q=="string"&&(X in q))return q5(q[X],Z);return!1}var tW;var eW=B(()=>{$W();WW();q$();p4();tW=yO});function CO(Z){return sW(function(X,q){var Q=-1,$=q.length,J=$>1?q[$-1]:void 0,Y=$>2?q[2]:void 0;if(J=Z.length>3&&typeof J=="function"?($--,J):void 0,Y&&tW(q[0],q[1],Y))J=$<3?void 0:J,$=1;X=Object(X);while(++Q<$){var H=q[Q];if(H)Z(X,H,Q,J)}return X})}var ZV;var XV=B(()=>{rW();eW();ZV=CO});var SO,G1;var qV=B(()=>{SW();XV();SO=ZV(function(Z,X,q,Q){CW(Z,X,q,Q)}),G1=SO});import{join as bO}from"path";function Qo(Z){M4=Z}function $o(){M4=null,Xq=void 0}function Jo(Z){return Xq=Z,Z}function fO(){return bO(Z0(),hO)}function gO(){try{let Z=H1(fO()),X=q0(M0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function H5(){if(Xq!==!0)return null;if(M4)return M4;let Z=gO();if(Z)return M4=Z,F4(),Z;return null}var hO="remote-settings.json",M4=null,Xq;var $V=B(()=>{P0();q4();R6();QV();L0()});function Ho(Z,X){return Z.flatMap((q,Q)=>Q?[X(Q),q]:[q])}function qq(Z,X){let q=0;for(let Q of Z)q+=+!!X(Q);return q}function JV(Z){return[...new Set(Z)]}var Qq=()=>{};import{appendFile as mO,mkdir as uO,readFile as pO,writeFile as dO}from"fs/promises";import{homedir as cO}from"os";import{dirname as lO,join as nO}from"path";async function iO(Z,X){let{code:q}=await e1("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return q===0}function aO(){return nO(cO(),".config","git","ignore")}async function YV(Z,X=t()){try{if(!await rG(X))return;let q=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await iO(Q,X))return;let $=aO(),J=lO($);await uO(J,{recursive:!0});try{if((await pO($,{encoding:"utf-8"})).includes(q))return;await mO($,`
|
|
99
|
+
${q}
|
|
100
|
+
`)}catch(Y){if(B0(Y)==="ENOENT")await dO($,`${q}
|
|
101
|
+
`,"utf-8");else throw Y}}catch(q){g(q)}}var HV=B(()=>{K1();n1();Z5();B4();C0()});function Do(Z){switch(Z){case"userSettings":return"user";case"projectSettings":return"project";case"localSettings":return"project, gitignored";case"flagSettings":return"cli flag";case"policySettings":return"managed"}}function Ao(Z){switch(Z){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"flagSettings":return"Flag";case"policySettings":return"Managed";case"plugin":return"Plugin";case"bundled":case"built-in":return"Built-in"}}function To(Z){switch(Z){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function jo(Z){switch(Z){case"userSettings":return"User settings";case"projectSettings":return"Shared project settings";case"localSettings":return"Project local settings";case"flagSettings":return"Command line arguments";case"policySettings":return"Enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"Command configuration";case"session":return"Current session"}}function Io(Z){if(Z==="")return[];let X=Z.split(",").map((Q)=>Q.trim()),q=[];for(let Q of X)switch(Q){case"user":q.push("userSettings");break;case"project":q.push("projectSettings");break;case"local":q.push("localSettings");break;default:throw Error(`Invalid setting source: ${Q}. Valid options are: user, project, local`)}return q}function D4(){let Z=KV(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function wo(Z){return D4().includes(Z)}var Fo,ko,UV="https://json.schemastore.org/claude-code-settings.json";var $q=B(()=>{N1();Fo=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];ko=["localSettings","projectSettings","userSettings"]});function GV(Z){K5.set(Z,Date.now())}function No(Z,X){let q=K5.get(Z);if(q!==void 0&&Date.now()-q<X)return K5.delete(Z),!0;return!1}function xo(){K5.clear()}var K5;var WV=B(()=>{K5=new Map});function VV(Z){let X=[],q=[];for(let Q of Z){if(typeof Q!=="string"||Q.trim().length===0){q.push({entry:String(Q??""),reason:"empty"});continue}if(Q.length>1e4){q.push({entry:Q,reason:"too-long"});continue}if(oO.test(Q)){q.push({entry:Q,reason:"control-characters"});continue}if(sO.test(Q)){q.push({entry:Q,reason:"invisible-characters"});continue}if(rO.test(Q)){q.push({entry:Q,reason:"settings-token"});continue}if(X.length>=200){q.push({entry:Q,reason:"over-entry-cap"});continue}X.push(Q.trim())}return{entries:X,dropped:q}}function vo(Z){return Z.some((X)=>X.trim()==="$defaults")}function XN(Z,X){if(Z.length===0)return[...X];let q=[],Q=!1;for(let $ of Z){if($.trim()==="$defaults"){if(!Q)q.push(...X),Q=!0;continue}q.push($)}return q}function yo(Z){let X=[],q=[];for(let Q of Z){let $=Q.trim();if(tO.test($)||eO.test($)||ZN.test($)){q.push({entry:Q,reason:"too-broad"});continue}X.push(Q)}return{entries:X,dropped:q}}function qN(Z){return Z.split(`
|
|
102
|
+
`).map((X)=>X.trim()).filter((X)=>X.startsWith("- ")).map((X)=>X.slice(2))}function Co(Z,X){if(Z.length===0)return X;let q=XN(Z,qN(X));if(q.length===0)return"";return`
|
|
103
|
+
${q.map((Q)=>`- ${Q}`).join(`
|
|
104
|
+
`)}
|
|
105
|
+
`}function BV(Z){switch(Z){case"empty":return"empty entry";case"control-characters":return"contains control characters";case"invisible-characters":return"contains invisible or bidirectional characters";case"settings-token":return"contains a settings delimiter token";case"too-long":return"longer than 10000 characters";case"over-entry-cap":return"beyond the 200-entry limit";case"too-broad":return"too broad for auto mode to honor safely"}}var Eo="$defaults",oO,sO,rO,tO,eO,ZN;var LV=B(()=>{oO=/[\u0000-\u001F\u007F-\u009F]/,sO=/[\p{Cf}\p{Zl}\p{Zp}\u2028\u2029\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,rO=/<\/?settings_/i,tO=/^[A-Za-z_][A-Za-z0-9_]*\((\*|:\*|\s*)\)$/,eO=/^(Bash|PowerShell)\(\s*(sh|bash|zsh|dash|ksh|fish|curl|wget|eval|python3?|node|perl|ruby|env|xargs|sudo|doas|pwsh|powershell)\b[^)]*\*[^)]*\)$/i,ZN=/^(?:allow\s+)?(?:any|all|every)\s+(?:tool\s+calls?|tool\s+uses?|commands?|bash\s+commands?|shell\s+commands?|actions?|operations?)\b/i});import{join as QN}from"path";var P1,A4;var U5=B(()=>{A1();p2();P1=c(function(){switch(A0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),A4=c(function(){return QN(P1(),"managed-settings.d")})});var $N,JN,zV;var _V=B(()=>{g0();X2();$N=I(()=>K.object({allowedDomains:K.array(K.string()).optional(),allowManagedDomainsOnly:K.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:K.array(K.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:K.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:K.boolean().optional(),httpProxyPort:K.number().optional(),socksProxyPort:K.number().optional()}).optional()),JN=I(()=>K.object({allowWrite:K.array(K.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:K.array(K.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:K.array(K.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:K.array(K.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:K.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),zV=I(()=>K.object({enabled:K.boolean().optional(),failIfUnavailable:K.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate."),autoAllowBashIfSandboxed:K.boolean().optional(),allowUnsandboxedCommands:K.boolean().optional().describe("Allow trusted, user-initiated commands to run outside the sandbox. When false, sandbox override requests are ignored and all commands must run sandboxed. Default: true."),network:$N(),filesystem:JN(),ignoreViolations:K.record(K.string(),K.array(K.string())).optional(),enableWeakerNestedSandbox:K.boolean().optional(),enableWeakerNetworkIsolation:K.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:K.array(K.string()).optional(),ripgrep:K.object({command:K.string(),args:K.array(K.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});var lo,no="∙",io="✻",ao="↑",oo="↓",so="↯",ro="○",to="◐",eo="●",Zs="◎",Xs="◉",qs="◍",Qs="▶",RV="⏸",$s="↻",Js="◇",Ys="◆",Hs="※",Ks="▎",Us,Gs="·✔︎·",Ws="×";var MV=B(()=>{r6();lo=g2.platform==="darwin"?"⏺":"●",Us=["·|·","·/·","·—·","·\\·"]});var _N={};Jq(_N,{toExternalPermissionMode:()=>GN,permissionModeTitle:()=>VN,permissionModeSymbol:()=>LN,permissionModeSchema:()=>HN,permissionModeFromString:()=>WN,isExternalPermissionMode:()=>UN,isDefaultMode:()=>BN,getModeColor:()=>zN,externalPermissionModeSchema:()=>KN,PERMISSION_MODES:()=>Z6,EXTERNAL_PERMISSION_MODES:()=>Yq});function UN(Z){return Z!=="auto"}function G5(Z){return FV[Z]??FV.default}function GN(Z){return G5(Z).external}function WN(Z){return Z6.includes(Z)?Z:"default"}function VN(Z){return G5(Z).title}function BN(Z){return Z==="default"||Z===void 0}function LN(Z){return G5(Z).symbol}function zN(Z){return G5(Z).color}var HN,KN,FV;var DV=B(()=>{g0();MV();YN();X2();HN=I(()=>K.enum(Z6)),KN=I(()=>K.enum(Yq)),FV={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:RV,color:"planMode",external:"plan"},acceptEdits:{title:"Accept edits",shortTitle:"Accept",symbol:"⏵⏵",color:"autoAccept",external:"acceptEdits"},bypassPermissions:{title:"Bypass Permissions",shortTitle:"Bypass",symbol:"⏵⏵",color:"error",external:"bypassPermissions"},dontAsk:{title:"Don't Ask",shortTitle:"DontAsk",symbol:"⏵⏵",color:"error",external:"dontAsk"},...{auto:{title:"Auto mode",shortTitle:"Auto",symbol:"⏵⏵",color:"warning",external:"default"}}}});var AV=()=>{};var TV;var jV=B(()=>{AV();TV=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","StopFailure","SubagentStart","SubagentStop","PreCompact","PostCompact","PermissionRequest","PermissionDenied","Setup","TeammateIdle","TaskCreated","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded","CwdChanged","FileChanged"]});var IV=()=>{};var wV=()=>{};var kV=B(()=>{jV();IV();wV()});var OV,js="bash";var NV=B(()=>{OV=["bash","powershell"]});function RN(){let Z=K.object({type:K.literal("command").describe("Shell command hook type"),command:K.string().describe("Shell command to execute"),if:W5(),shell:K.enum(OV).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:K.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:K.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async."),interactive:K.boolean().optional().describe("If true, stdin stays open after the input JSON so the hook can ask the user a question (the prompt protocol). Leave it off for an ordinary hook: it reads its input to EOF, and an stdin left open blocks it until its timeout.")}),X=K.object({type:K.literal("prompt").describe("LLM prompt hook type"),prompt:K.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:W5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:K.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-5"). If not specified, uses the default small fast model.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=K.object({type:K.literal("http").describe("HTTP hook type"),url:K.string().url().describe("URL to POST the hook input JSON to"),if:W5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:K.record(K.string(),K.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:K.array(K.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),Q=K.object({type:K.literal("agent").describe("Agentic verifier hook type"),prompt:K.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:W5(),timeout:K.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:K.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:q,AgentHookSchema:Q}}var W5,MN,FN,q2;var V5=B(()=>{kV();g0();X2();NV();W5=I(()=>K.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.'));MN=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:q,HttpHookSchema:Q}=RN();return K.discriminatedUnion("type",[Z,X,q,Q])}),FN=I(()=>K.object({matcher:K.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:K.array(MN()).describe("List of hooks to execute when the matcher matches")})),q2=I(()=>K.partialRecord(K.enum(TV),K.array(FN())))});var vs,ys,DN,xV,AN,TN,jN,IN,wN,kN,ON,B5,Cs;var PV=B(()=>{g0();X2();vs=I(()=>K.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),ys=I(()=>K.enum(["stdio","sse","sse-ide","http","ws","sdk"])),DN=I(()=>K.object({type:K.literal("stdio").optional(),command:K.string().min(1,"Command cannot be empty"),args:K.array(K.string()).default([]),env:K.record(K.string(),K.string()).optional()})),xV=I(()=>K.object({clientId:K.string().optional(),callbackPort:K.number().int().positive().optional(),authServerMetadataUrl:K.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional()})),AN=I(()=>K.object({type:K.literal("sse"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:xV().optional()})),TN=I(()=>K.object({type:K.literal("sse-ide"),url:K.string(),ideName:K.string(),ideRunningInWindows:K.boolean().optional()})),jN=I(()=>K.object({type:K.literal("ws-ide"),url:K.string(),ideName:K.string(),authToken:K.string().optional(),ideRunningInWindows:K.boolean().optional()})),IN=I(()=>K.object({type:K.literal("http"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:xV().optional()})),wN=I(()=>K.object({type:K.literal("ws"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional()})),kN=I(()=>K.object({type:K.literal("sdk"),name:K.string()})),ON=I(()=>K.object({type:K.literal("claudeai-proxy"),url:K.string(),id:K.string()})),B5=I(()=>K.union([DN(),AN(),TN(),jN(),IN(),wN(),kN(),ON()])),Cs=I(()=>K.object({mcpServers:K.record(K.string(),B5())}))});function ms(Z,X){let q=Z.toLowerCase();return X.autoUpdate??(L5.has(q)&&!NN.has(q))}function EN(Z){if(L5.has(Z.toLowerCase()))return!1;if(PN.test(Z))return!0;return xN.test(Z)}function vN(Z){let X=Z.trim(),q=yN.exec(X);if(q)return q[1].toLowerCase()==="github.com"&&q[2].toLowerCase()===X6;try{let Q=new URL(X);if(Q.protocol!=="https:"&&Q.protocol!=="ssh:")return!1;if(Q.hostname.toLowerCase()!=="github.com")return!1;return Q.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===X6}catch{return!1}}function us(Z,X){let q=Z.toLowerCase();if(!L5.has(q))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${X6}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${X6}/' can use this name.`;return null}if(X.source==="git"&&X.url){if(vN(X.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${X6}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${X6}' organization.`}function ds(Z){return typeof Z==="string"&&Z.startsWith("./")}function cs(Z){return Z.source==="file"||Z.source==="directory"}var L5,NN,xN,PN,X6="anthropics",yN,W1,q6,EV,Kq,Uq,CV,Gq,CN,ps,SN,bN,hN,fN,gN,mN,vV,uN,pN,SV,dN,cN,yV,lN,bV,nN,iN,T4,Hq,hV,aN,oN,ls,fV,sN,rN,tN,ns,eN,Zx,is,Xx,as;var gV=B(()=>{g0();V5();PV();X2();L5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),NN=new Set(["knowledge-work-plugins"]);xN=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,PN=/[^\u0020-\u007E]/;yN=/^git@([^:]+):([^/]+)\//i;W1=I(()=>K.string().startsWith("./")),q6=I(()=>W1().endsWith(".json")),EV=I(()=>K.union([W1().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),K.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),Kq=I(()=>W1().endsWith(".md")),Uq=I(()=>K.union([Kq(),W1()])),CV=I(()=>K.string().min(1,"Marketplace must have a name").refine((Z)=>!Z.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((Z)=>!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("..")&&Z!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((Z)=>!EN(Z),{message:"Marketplace name impersonates an official Anthropic/Claude marketplace"}).refine((Z)=>Z.toLowerCase()!=="inline",{message:'Marketplace name "inline" is reserved for --plugin-dir session plugins'}).refine((Z)=>Z.toLowerCase()!=="builtin",{message:'Marketplace name "builtin" is reserved for built-in plugins'})),Gq=I(()=>K.object({name:K.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:K.string().optional().describe("Contact email for support or feedback"),url:K.string().optional().describe("Website, GitHub profile, or organization URL")})),CN=I(()=>K.object({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:K.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:K.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:Gq().optional().describe("Information about the plugin creator or maintainer"),homepage:K.string().url().optional().describe("Plugin homepage or documentation URL"),repository:K.string().optional().describe("Source code repository URL"),license:K.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:K.array(K.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:K.array(rN()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),ps=I(()=>K.object({description:K.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:K.lazy(()=>q2()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),SN=I(()=>K.object({hooks:K.union([q6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>q2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),K.array(K.union([q6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>q2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),bN=I(()=>K.object({source:Uq().optional().describe("Path to command markdown file, relative to plugin root"),content:K.string().optional().describe("Inline markdown content for the command"),description:K.string().optional().describe("Command description override"),argumentHint:K.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:K.string().optional().describe("Default model for this command"),allowedTools:K.array(K.string()).optional().describe("Tools allowed when command runs")}).refine((Z)=>Z.source&&!Z.content||!Z.source&&Z.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),hN=I(()=>K.object({commands:K.union([Uq().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),K.array(Uq().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),K.record(K.string(),bN()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),fN=I(()=>K.object({agents:K.union([Kq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),K.array(Kq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")])})),gN=I(()=>K.object({skills:K.union([W1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),K.array(W1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),mN=I(()=>K.object({outputStyles:K.union([W1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),K.array(W1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),vV=I(()=>K.string().min(1)),uN=I(()=>K.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),pN=I(()=>K.object({mcpServers:K.union([q6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),EV().describe("Path or URL to MCPB file containing MCP server configuration"),K.record(K.string(),B5()).describe("MCP server configurations keyed by server name"),K.array(K.union([q6().describe("Path to MCP servers configuration file"),EV().describe("Path or URL to MCPB file"),K.record(K.string(),B5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),SV=I(()=>K.object({type:K.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:K.string().describe("Human-readable label shown in the config dialog"),description:K.string().describe("Help text shown beneath the field in the config dialog"),required:K.boolean().optional().describe("If true, validation fails when this field is empty"),default:K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]).optional().describe("Default value used when the user provides nothing"),multiple:K.boolean().optional().describe("For string type: allow an array of strings"),sensitive:K.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:K.number().optional().describe("Minimum value (number type only)"),max:K.number().optional().describe("Maximum value (number type only)")}).strict()),dN=I(()=>K.object({userConfig:K.record(K.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDIN_PLUGIN_OPTION_<KEY> env vars in hooks"),SV()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. "+"Note: sensitive values share a single keychain entry with OAuth tokens — keep "+"secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),cN=I(()=>K.object({channels:K.array(K.object({server:K.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:K.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:K.record(K.string(),SV()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),yV=I(()=>K.strictObject({command:K.string().min(1).refine((Z)=>{if(Z.includes(" ")&&!Z.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:K.array(vV()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:K.record(uN(),vV()).refine((Z)=>Object.keys(Z).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:K.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:K.record(K.string(),K.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:K.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:K.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:K.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:K.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:K.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:K.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:K.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),lN=I(()=>K.object({lspServers:K.union([q6().describe("Path to .lsp.json configuration file relative to plugin root"),K.record(K.string(),yV()).describe("LSP server configurations keyed by server name"),K.array(K.union([q6().describe("Path to LSP configuration file"),K.record(K.string(),yV()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),bV=I(()=>K.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,q=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||q.test(Z)},"Invalid npm package name format")),nN=I(()=>K.object({settings:K.record(K.string(),K.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),iN=I(()=>K.object({...CN().shape,...SN().partial().shape,...hN().partial().shape,...fN().partial().shape,...gN().partial().shape,...mN().partial().shape,...cN().partial().shape,...pN().partial().shape,...lN().partial().shape,...nN().partial().shape,...dN().partial().shape})),T4=I(()=>K.discriminatedUnion("source",[K.object({source:K.literal("url"),url:K.string().url().describe("Direct URL to marketplace.json file"),headers:K.record(K.string(),K.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),K.object({source:K.literal("git"),url:K.string().describe("Full git repository URL"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),K.object({source:K.literal("npm"),package:bV().describe("NPM package containing marketplace.json")}),K.object({source:K.literal("file"),path:K.string().describe("Local file path to marketplace.json")}),K.object({source:K.literal("directory"),path:K.string().describe("Local directory containing .claude-plugin/marketplace.json")}),K.object({source:K.literal("hostPattern"),hostPattern:K.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),K.object({source:K.literal("pathPattern"),pathPattern:K.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')}),K.object({source:K.literal("settings"),name:CV().refine((Z)=>!L5.has(Z.toLowerCase()),{message:"Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."}).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation "+"as PluginMarketplaceSchema plus reserved-name rejection — "+"validateOfficialNameSource runs after the disk write, too late to clean up."),plugins:K.array(aN()).describe("Plugin entries declared inline in settings.json"),owner:Gq().optional()}).describe("Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).")])),Hq=I(()=>K.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),hV=I(()=>K.union([W1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),K.object({source:K.literal("npm"),package:bV().or(K.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:K.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:K.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),K.object({source:K.literal("pip"),package:K.string().describe("Python package name as it appears on PyPI"),version:K.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:K.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),K.object({source:K.literal("url"),url:K.string().describe("Full git repository URL (https:// or git@)"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Hq().optional().describe("Specific commit SHA to use")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Hq().optional().describe("Specific commit SHA to use")}),K.object({source:K.literal("git-subdir"),url:K.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:K.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.'),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Hq().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")])),aN=I(()=>K.object({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Plugin name as it appears in the target repository"),source:hV().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:K.string().optional(),version:K.string().optional(),strict:K.boolean().optional()}).refine((Z)=>typeof Z.source!=="string",{message:'Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.'}));oN=I(()=>iN().partial().extend({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier matching the plugin name"),source:hV().describe("Where to fetch the plugin from"),category:K.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:K.array(K.string()).optional().describe("Tags for searchability and discovery"),strict:K.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),ls=I(()=>K.object({name:CV(),owner:Gq().describe("Marketplace maintainer or curator information"),plugins:K.array(oN()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:K.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:K.object({pluginRoot:K.string().optional().describe("Base path for relative plugin sources"),version:K.string().optional().describe("Marketplace version"),description:K.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:K.array(K.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),fV=I(()=>K.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),sN=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,rN=I(()=>K.union([K.string().regex(sN,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),K.object({name:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),tN=I(()=>K.object({version:K.string().describe("Currently installed version"),installedAt:K.string().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),installPath:K.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),ns=I(()=>K.object({version:K.literal(1).describe("Schema version 1"),plugins:K.record(fV(),tN()).describe("Map of plugin IDs to their installation metadata")})),eN=I(()=>K.enum(["managed","user","project","local"])),Zx=I(()=>K.object({scope:eN().describe("Installation scope"),projectPath:K.string().optional().describe("Project path (required for project/local scopes)"),installPath:K.string().describe("Absolute path to the versioned plugin directory"),version:K.string().optional().describe("Currently installed version"),installedAt:K.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins")})),is=I(()=>K.object({version:K.literal(2).describe("Schema version 2"),plugins:K.record(fV(),K.array(Zx())).describe("Map of plugin IDs to arrays of installation entries")})),Xx=I(()=>K.object({source:T4().describe("Where to fetch the marketplace from"),installLocation:K.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:K.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),as=I(()=>K.record(K.string(),Xx()))});function ss(Z){return Z.startsWith("claude.ai ")}function z5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var mV=()=>{};function uV(Z){let X=Z.split("__"),[q,Q,...$]=X;if(q!=="mcp"||!Q)return null;let J=$.length>0?$.join("__"):void 0;return{serverName:Q,toolName:J}}function qx(Z){return`mcp__${z5(Z)}__`}function Qx(Z,X){return`${qx(Z)}${z5(X)}`}function es(Z){return Z.mcpInfo?Qx(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function Zr(Z,X){let q=`mcp__${z5(X)}__`;return Z.replace(q,"")}function Xr(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let q=X.indexOf(" - ");if(q!==-1)return X.substring(q+3).trim();return X}var pV=B(()=>{mV()});var dV="Agent",Qr="Task",$r,Jr;var cV=B(()=>{$r=new Set(["Explore","Plan","WebResearcher","WebResearcherManager"]),Jr=new Set(["Explore"])});function Wq(){return!j4(process.env[$x])}function Ur(){return Wq()?{then:Yx()}:{}}function Gr(Z){return(Z.then??[]).map((X)=>X.trim()).filter((X)=>X.length>0)}function Wr(Z){if(typeof Z!=="object"||Z===null||!("then"in Z))return!1;let X=Z.then;return Array.isArray(X)&&X.some((q)=>typeof q==="object"&&q!==null&&q.ran===!0&&q.exitCode!==0)}var $x="CLAUDIN_EDIT_THEN",lV=3,Jx,Yx=()=>K.array(K.string()).max(lV).nullish().describe(Jx);var nV=B(()=>{g0();P0();Jx=`Up to ${lV} shell commands to run once the edit has applied — the test, typecheck or build that checks it. They run in order and stop at the first that fails, and their output comes back in this result, so the check needs no call of its own. Nothing runs if the edit fails.`});var iV="Patch",aV="apply_patch",Hx,Kx,zr;var oV=B(()=>{P0();nV();Hx=r(process.env.CLAUDIN_BASH_READ_CREDIT)?" — a Bash `cat` that printed the whole file counts too":"",Kx=Wq()?"\n- To check the change, put its test, typecheck or build command in `then`: it runs as soon as the patch applies, in this same call, and its output comes back with the result.":"",zr=`Apply a patch to one or more files in a single, atomic call. Use this to create, modify, delete, or rename several files at once.
|
|
106
|
+
|
|
107
|
+
The patch is a stripped-down, file-oriented diff format (the Codex "apply_patch" envelope). The whole patch goes in the single \`patchText\` parameter. Paths may be relative to the working directory or absolute.
|
|
108
|
+
|
|
109
|
+
The envelope is:
|
|
110
|
+
|
|
111
|
+
*** Begin Patch
|
|
112
|
+
[ one or more file sections ]
|
|
113
|
+
*** End Patch
|
|
114
|
+
|
|
115
|
+
Each file section starts with exactly one header:
|
|
116
|
+
|
|
117
|
+
*** Add File: <path> Create a new file. Every following line is a "+" line holding the initial contents. Fails if the file already exists.
|
|
118
|
+
*** Delete File: <path> Remove an existing file. Nothing follows the header.
|
|
119
|
+
*** Update File: <path> Patch an existing file in place. May be followed by an optional "*** Move to: <new path>" line to rename the file as part of the update.
|
|
120
|
+
|
|
121
|
+
Inside an Update section, changes are grouped into hunks. Each hunk begins with a "@@" line, followed by the change lines:
|
|
122
|
+
- a leading space (" ") marks an unchanged context line, present to anchor the hunk
|
|
123
|
+
- a leading "-" marks a removed line
|
|
124
|
+
- a leading "+" marks an added line
|
|
125
|
+
A hunk may end with "*** End of File" to anchor it to the end of the file.
|
|
126
|
+
|
|
127
|
+
The "@@" line is a one-line search cursor, not a unified-diff header:
|
|
128
|
+
- a bare "@@" is valid, and is the right default whenever the hunk's own context lines already locate it uniquely
|
|
129
|
+
- to point somewhere, copy ONE line from the file verbatim and whole — "@@ export function greet(name: string): string {", not a fragment like "@@ function greet(" — it is matched against an entire line
|
|
130
|
+
- the hunk body starts at the line AFTER it, so do not restate the anchored line as the hunk's first context line
|
|
131
|
+
- the cursor only moves forward: each "@@" must sit at or after the previous hunk's, so do not repeat one function signature across several hunks — give each its own nearby anchor, or a bare "@@"
|
|
132
|
+
|
|
133
|
+
Example:
|
|
134
|
+
|
|
135
|
+
*** Begin Patch
|
|
136
|
+
*** Add File: hello.txt
|
|
137
|
+
+Hello world
|
|
138
|
+
*** Update File: src/app.py
|
|
139
|
+
*** Move to: src/platform/main.py
|
|
140
|
+
@@ def greet():
|
|
141
|
+
- print("Hi")
|
|
142
|
+
+ print("Hello, world!")
|
|
143
|
+
*** Delete File: obsolete.txt
|
|
144
|
+
*** End Patch
|
|
145
|
+
|
|
146
|
+
Rules:
|
|
147
|
+
- Batch related edits into ONE call. When a change touches several files, put every file section in a single patch instead of making one Patch call per file — it is atomic and cheaper. Only split into separate calls when a later edit genuinely depends on the result of an earlier one.
|
|
148
|
+
- Typical flow for a multi-file change: map the targets with Grep/Glob, Read every one of them in ONE message (parallel Read calls), then send ONE patch. Reading them one at a time is what turns a single patch into N patches.
|
|
149
|
+
- The patch is all-or-nothing, so before you send it: give each file exactly ONE section, and anchor each hunk on lines you copied from the file (not remembered) — a single unread file, duplicate section, or mismatched context rejects the entire batch. When a call is rejected it lists every problem it found at once; fix them all before resubmitting rather than one at a time.
|
|
150
|
+
- Update and Delete need a prior Read of the file, and any Read counts: the whole file, an outline, a symbol, or a range${Hx}. Nothing has to be re-read, or read whole, to be allowed to patch — a hunk applies when its context and "-" lines match the file as it is on disk, so read only the lines you need to write it. Add does not require a prior read.
|
|
151
|
+
- Include enough context/"@@" anchors that each hunk matches a unique location.
|
|
152
|
+
- The patch is atomic: if any hunk fails to apply, no files are written.
|
|
153
|
+
- For new lines, always prefix them with "+", including when creating a file.
|
|
154
|
+
- To edit Jupyter notebooks (.ipynb), use the NotebookEdit tool instead.${Kx}`});var Vq="TaskOutput";var sV=()=>{};var rV="TaskStop",Mr=`
|
|
155
|
+
- Stops a running background task by its ID
|
|
156
|
+
- Takes a task_id parameter identifying the task to stop
|
|
157
|
+
- Returns a success or failure status
|
|
158
|
+
- Use this tool when you need to terminate a long-running task
|
|
159
|
+
`;var tV=()=>{};function Q6(Z){return Object.hasOwn(Bq,Z)?Bq[Z]:Z}function Ir(Z){let X=[];for(let[q,Q]of Object.entries(Bq))if(Q===Z)X.push(q);return X}function Ux(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function Gx(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function eV(Z){let X=Wx(Z,"(");if(X===-1)return{toolName:Q6(Z)};let q=Vx(Z,")");if(q===-1||q<=X)return{toolName:Q6(Z)};if(q!==Z.length-1)return{toolName:Q6(Z)};let Q=Z.substring(0,X),$=Z.substring(X+1,q);if(!Q)return{toolName:Q6(Z)};if($===""||$==="*")return{toolName:Q6(Q)};let J=Gx($);return{toolName:Q6(Q),ruleContent:J}}function wr(Z){if(!Z.ruleContent)return Z.toolName;let X=Ux(Z.ruleContent);return`${Z.toolName}(${X})`}function Wx(Z,X){for(let q=0;q<Z.length;q++)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}function Vx(Z,X){for(let q=Z.length-1;q>=0;q--)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}var Bq;var ZB=B(()=>{cV();oV();sV();tV();Bq={Task:dV,KillShell:rV,AgentOutputTool:Vq,BashOutputTool:Vq,[aV]:iV}});function Or(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function XB(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function qB(Z,X,q=X+"s"){return Z===1?X:q}function Nr(Z){let X=Z.indexOf(`
|
|
160
|
+
`);return X===-1?Z:Z.slice(0,X)}function xr(Z,X,q=0){let Q=0,$=Z.indexOf(X,q);while($!==-1)Q++,$=Z.indexOf(X,$+1);return Q}function Pr(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function Er(Z){return Z.replace(/\u3000/g," ")}function vr(Z,X=",",q=QB){let $="";for(let J of Z){let Y=$?X:"",H=Y+J;if($.length+H.length<=q)$+=H;else{let U=q-$.length-Y.length-14;if(U>0)$+=Y+J.slice(0,U)+"...[truncated]";else $+="...[truncated]";return $}}return $}class Bx{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=QB){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let q=this.maxSize-this.content.length;if(q>0)this.content+=X.slice(0,q);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
|
|
161
|
+
... [output truncated - ${X}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function yr(Z,X){let q=Z.split(`
|
|
162
|
+
`);if(q.length<=X)return Z;return q.slice(0,X).join(`
|
|
163
|
+
`)+"…"}var QB=33554432;var Lq=()=>{};function $B(Z){return _5.filePatternTools.includes(Z)}function JB(Z){return _5.bashPrefixTools.includes(Z)}function YB(Z){return Object.hasOwn(_5.customValidation,Z)?_5.customValidation[Z]:void 0}var _5;var HB=B(()=>{_5={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(Z)=>{if(Z.includes("*")||Z.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(Z)=>{if(Z.includes("://")||Z.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!Z.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function KB(Z,X){let q=0,Q=X-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;return q%2!==0}function zq(Z,X){let q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===X&&!KB(Z,Q))q++;return q}function Lx(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!KB(Z,X))return!0}return!1}function _q(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=zq(Z,"("),q=zq(Z,")");if(X!==q)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(Lx(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let Q=eV(Z),$=uV(Q.toolName);if($){if(Q.ruleContent!==void 0||zq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${$.serverName}__*" for all tools`,examples:[`mcp__${$.serverName}`,`mcp__${$.serverName}__*`,$.toolName&&$.toolName!=="*"?`mcp__${$.serverName}__${$.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Q.toolName||Q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Q.toolName[0]!==Q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${XB(String(Q.toolName))}"`};let J=YB(Q.toolName);if(J&&Q.ruleContent!==void 0){let Y=J(Q.ruleContent);if(!Y.valid)return Y}if(JB(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if($B(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${Q.toolName}(*.ts) - matches .ts files`,`${Q.toolName}(src/**) - matches all files in src`,`${Q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${Q.toolName}(*.js) - all .js files`,`${Q.toolName}(src/*) - all files directly in src`,`${Q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var R5;var Rq=B(()=>{g0();pV();X2();ZB();Lq();HB();R5=I(()=>K.string().superRefine((Z,X)=>{let q=_q(Z);if(!q.valid){let Q=q.error;if(q.suggestion)Q+=`. ${q.suggestion}`;if(q.examples&&q.examples.length>0)Q+=`. Examples: ${q.examples.join(", ")}`;X.addIssue({code:K.ZodIssueCode.custom,message:Q,params:{received:Z}})}}))});function cr(Z){if(!Z||typeof Z!=="object")return null;let X=Mq.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var Mq;var UB=B(()=>{g0();Mq=K.object({enabled:K.boolean().describe("Whether auto-fix is enabled"),lint:K.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:K.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:K.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:K.number().int().min(1000).max(300000).default(30000).describe("Timeout in ms for each lint/test command (default: 30000)")}).refine((Z)=>!Z.enabled||Z.lint!==void 0||Z.test!==void 0,{message:'At least one of "lint" or "test" must be set when enabled'})});function Qt(Z){return"serverName"in Z&&Z.serverName!==void 0}function $t(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Jt(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var zx,_x,Rx,Mx,Fx,GB,y0;var I4=B(()=>{g0();_V();X2();DV();gV();$q();Rq();V5();V5();UB();Qq();zx=I(()=>K.record(K.string(),K.coerce.string())),_x=I(()=>K.object({allow:K.array(R5()).optional().describe("List of permission rules for allowed operations"),deny:K.array(R5()).optional().describe("List of permission rules for denied operations"),ask:K.array(R5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:K.enum(Z6).optional().describe("Default permission mode when Claudin needs access"),disableBypassPermissionsMode:K.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:K.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:K.array(K.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Rx=I(()=>K.object({source:T4().describe("Where to fetch the marketplace from"),installLocation:K.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Mx=I(()=>K.object({serverName:K.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:K.array(K.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return qq([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),Fx=I(()=>K.object({serverName:K.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:K.array(K.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return qq([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),GB=["skills","agents","hooks","mcp"],y0=I(()=>K.object({$schema:K.literal(UV).optional().describe("JSON Schema reference for Claudin settings"),apiKeyHelper:K.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:K.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:K.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:K.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),fileSuggestion:K.object({type:K.literal("command"),command:K.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:K.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:K.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:zx().optional().describe("Environment variables to set for Claudin sessions"),attribution:K.object({commit:K.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:K.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claudin attribution if not set."),includeGitInstructions:K.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:_x().optional().describe("Tool usage permissions configuration"),model:K.string().optional().describe("Override the default model used by Claudin"),availableModels:K.array(K.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:K.record(K.string(),K.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:K.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:K.array(K.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:K.array(K.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:K.array(Mx()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:K.array(Fx()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:q2().optional().describe("Custom commands to run before/after tool executions"),autoFix:Mq.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:K.object({symlinkDirectories:K.array(K.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:K.array(K.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk."),baseRef:K.enum(["fresh","head"]).optional().describe('Base ref for new worktrees. "fresh" (default) branches from origin/<default-branch>; "head" branches from the current local HEAD.')}).optional().describe("Git worktree configuration for --worktree flag."),lsp:K.object({enabled:K.boolean().optional(),diagnosticsTimeoutMs:K.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudin waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).optional().describe("LSP subsystem configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). LSP servers themselves are provided exclusively by enabled plugins (.lsp.json)."),disableAllHooks:K.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:K.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:K.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:K.array(K.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:K.array(K.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:K.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:K.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:K.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>GB.includes(X)):Z,K.union([K.boolean(),K.array(K.enum(GB))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. '+"Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by "+"marketplace allowlist, everything else blocked here."),statusLine:K.object({type:K.literal("command"),command:K.string(),padding:K.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:K.record(K.string(),K.union([K.array(K.string()),K.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:K.record(K.string(),Rx()).check((Z)=>{for(let[X,q]of Object.entries(Z.value))if(q.source.source==="settings"&&q.source.name!==X)Z.issues.push({code:"custom",input:q.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${q.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudin/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:K.array(T4()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:K.array(T4()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:K.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:K.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:K.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:K.string().optional().describe("Controls the output style for assistant responses"),language:K.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:K.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:zV().optional(),feedbackSurveyRate:K.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:K.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:K.object({mode:K.enum(["append","replace"]),verbs:K.array(K.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:K.object({excludeDefault:K.boolean().optional(),tips:K.array(K.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:K.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:K.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:K.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:K.enum(["low","medium","high","xhigh","max","adaptive"]).optional().catch(void 0).describe("Persisted effort level for supported models. 'adaptive' sends no effort field so the model scales per request."),codingLoopXhighDefault:K.boolean().optional().catch(void 0).describe("When true, defaults effort to xhigh for Opus 4.8 (coding/high-autonomy loops). Overrides the medium default for Pro/Max/Team and ultrathink. Opus 4.8 only; other models are unaffected. Defaults to false."),advisorModel:K.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:K.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:K.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:K.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:K.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:K.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:K.array(K.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:K.record(K.string(),K.object({mcpServers:K.record(K.string(),K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:K.object({defaultEnvironmentId:K.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:K.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),minimumVersion:K.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:K.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to .claudin/plans/ in the project root."),channelsEnabled:K.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:K.array(K.object({marketplace:K.string(),plugin:K.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),prefersReducedMotion:K.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:K.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:K.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoMemoryProjectLocal:K.boolean().optional().describe("When true (the default), auto-memory for a git project defaults to <project>/.claudin/memory/ instead of the global ~/.claudin/projects/<sanitized-cwd>/memory/. Set to false to force the legacy global-only location. Ignored if set in projectSettings for security, same as autoMemoryDirectory."),autoDreamEnabled:K.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:K.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),crossSessionInbound:K.enum(["accept","hold","refuse"]).optional().catch(void 0).describe("What this session does with a message another Claudin session on this machine sends it: accept delivers it, hold asks you first, refuse turns it away. Unset: deliver when both sessions are on the same side of bypassPermissions, hold when they are not. Project and local settings can only make it stricter."),...{skipAutoPermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:K.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:K.object({allow:K.array(K.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:K.array(K.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:K.array(K.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:K.array(K.object({id:K.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:K.string().describe("Display name for the SSH connection"),sshHost:K.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:K.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:K.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:K.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:K.array(K.string()).optional().describe('Glob patterns or absolute paths of AGENTS.md/CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/AGENTS.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:K.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function Fq(){let Z=WB(y0(),{unrepresentable:"any"});return m(Z,null,2)}var VB=B(()=>{g0();L0();I4()});function BB(Z){let X=Dx.find((Q)=>Q.matches(Z));if(!X)return null;let q={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!q.suggestion)q.suggestion=`Valid values: ${Z.enumValues.map((Q)=>`"${Q}"`).join(", ")}`;if(!q.docLink&&Z.path){let Q=Z.path.split(".")[0];if(Q)q.docLink=Ax[Q]}return q}var Dx,Ax;var LB=B(()=>{Dx=[{matches:(Z)=>Z.path==="permissions.defaultMode"&&Z.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)'}},{matches:(Z)=>Z.path==="apiKeyHelper"&&Z.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(Z)=>Z.path==="cleanupPeriodDays"&&Z.code==="too_small"&&Z.expected==="0",tip:{suggestion:"Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."}},{matches:(Z)=>Z.path.startsWith("env.")&&Z.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"'}},{matches:(Z)=>(Z.path==="permissions.allow"||Z.path==="permissions.deny")&&Z.code==="invalid_type"&&Z.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(Z)=>Z.path.includes("hooks")&&Z.code==="invalid_type",tip:{suggestion:'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeGitInstructions": true'}},{matches:(Z)=>Z.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields"}},{matches:(Z)=>Z.code==="invalid_value"&&Z.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="object"&&Z.received===null&&Z.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(Z)=>Z.path==="permissions.additionalDirectories"&&Z.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command'}}],Ax={}});function zB(Z){return Z.code==="invalid_type"}function _B(Z){return Z.code==="invalid_value"}function Tx(Z){return Z.code==="unrecognized_keys"}function RB(Z){return Z.code==="too_small"}function Dq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function MB(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function $6(Z,X){return Z.issues.map((q)=>{let Q=q.path.map(String).join("."),$=q.message,J,Y,H,U,G;if(_B(q))Y=q.values.map((V)=>String(V)),H=Y.join(" | "),U=void 0,G=void 0;else if(zB(q)){H=q.expected;let V=MB(q.message);U=V??Dq(q.input),G=V??Dq(q.input)}else if(RB(q))H=String(q.minimum);else if(q.code==="custom"&&"params"in q)U=q.params.received,G=U;let W=BB({path:Q,code:q.code,expected:H,received:U,enumValues:Y,message:q.message,value:U});if(_B(q))J=Y?.map((V)=>`"${V}"`).join(", "),$=`Invalid value. Expected one of: ${J}`;else if(zB(q)){let V=MB(q.message)??Dq(q.input);if(q.expected==="object"&&V==="null"&&Q==="")$="Invalid or malformed JSON";else $=`Expected ${q.expected}, but received ${V}`}else if(Tx(q)){let V=q.keys.join(", ");$=`Unrecognized ${qB(q.keys.length,"field")}: ${V}`}else if(RB(q))$=`Number must be greater than or equal to ${q.minimum}`,J=String(q.minimum);return{file:X,path:Q,message:$,expected:J,invalidValue:G,suggestion:W?.suggestion,docLink:W?.docLink}})}function Ft(Z){try{let X=q0(Z),q=y0().strict().safeParse(X);if(q.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
|
|
164
|
+
`+$6(q.error,"settings").map((J)=>`- ${J.path}: ${J.message}`).join(`
|
|
165
|
+
`),fullSchema:Fq()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:Fq()}}}function M5(Z,X){if(!Z||typeof Z!=="object")return[];let q=Z;if(!q.permissions||typeof q.permissions!=="object")return[];let Q=q.permissions,$=[];for(let J of["allow","deny","ask"]){let Y=Q[J];if(!Array.isArray(Y))continue;Q[J]=Y.filter((H)=>{if(typeof H!=="string")return $.push({file:X,path:`permissions.${J}`,message:`Non-string value in ${J} array was removed`,invalidValue:H}),!1;let U=_q(H);if(!U.valid){let G=`Invalid permission rule "${H}" was skipped`;if(U.error)G+=`: ${U.error}`;if(U.suggestion)G+=`. ${U.suggestion}`;return $.push({file:X,path:`permissions.${J}`,message:G,invalidValue:H}),!1}return!0})}return $}var Aq=B(()=>{L0();Lq();Rq();VB();I4();LB()});import{userInfo as jx}from"os";function jB(){let Z="";try{Z=jx().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${FB}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${FB}.plist`,label:"device-level managed preferences"}),X}var FB="com.anthropic.claudecode",F5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",D5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",J6="Settings",DB="/usr/bin/plutil",AB,TB=5000;var Tq=B(()=>{AB=["-convert","json","-o","-","--"]});import{execFile as Ix}from"child_process";import{existsSync as wx}from"fs";function jq(Z,X){return new Promise((q)=>{Ix(Z,X,{encoding:"utf-8",timeout:TB},(Q,$)=>{q({stdout:$??"",code:Q?1:0})})})}function A5(){return(async()=>{if(process.platform==="darwin"){let Z=jB(),q=(await Promise.all(Z.map(async({path:Q,label:$})=>{if(!wx(Q))return{stdout:"",label:$,ok:!1};let{stdout:J,code:Y}=await jq(DB,[...AB,Q]);return{stdout:J,label:$,ok:Y===0&&!!J}}))).find((Q)=>Q.ok);return{plistStdouts:q?[{stdout:q.stdout,label:q.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([jq("reg",["query",F5,"/v",J6]),jq("reg",["query",D5,"/v",J6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function kt(){if(Iq)return;Iq=A5()}function IB(){return Iq}var Iq=null;var wB=B(()=>{Tq()});import{join as kB}from"path";function kx(){if(T5)return;T5=(async()=>{Y6("mdm_load_start");let Z=Date.now(),X=IB()??A5(),{mdm:q,hkcu:Q}=xB(await X);kq=q,Oq=Q,Y6("mdm_load_end");let $=Date.now()-Z;if(P(`MDM settings load completed in ${$}ms`),Object.keys(q.settings).length>0){P(`MDM settings found: ${Object.keys(q.settings).join(", ")}`);try{Y0("info","mdm_settings_loaded",{duration_ms:$,key_count:Object.keys(q.settings).length,error_count:q.errors.length})}catch{}}})()}async function mt(){if(!T5)kx();await T5}function j5(){return kq??V1}function I5(){return Oq??V1}function ut(Z,X){kq=Z,Oq=X}async function pt(){let Z=await A5();return xB(Z)}function wq(Z,X){let q=k0(Z,!1);if(!q||typeof q!=="object")return{settings:{},errors:[]};let Q=M5(q,X),$=y0().safeParse(q);if(!$.success){let J=$6($.error,X);return{settings:{},errors:[...Q,...J]}}return{settings:$.data,errors:Q}}function OB(Z,X="Settings"){let q=Z.split(/\r?\n/),Q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let J of q){let Y=J.match($);if(Y&&Y[1])return Y[1].trimEnd()}return null}function xB(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:q}=Z.plistStdouts[0],Q=wq(X,q);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:V1}}if(Z.hklmStdout){let X=OB(Z.hklmStdout);if(X){let q=wq(X,`Registry: ${F5}\\${J6}`);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:V1}}}if(Ox())return{mdm:V1,hkcu:V1};if(Z.hkcuStdout){let X=OB(Z.hkcuStdout);if(X){let q=wq(X,`Registry: ${D5}\\${J6}`);return{mdm:V1,hkcu:q}}}return{mdm:V1,hkcu:V1}}function Ox(){try{let Z=kB(P1(),"managed-settings.json"),X=H1(Z),q=k0(X,!1);if(q&&typeof q==="object"&&Object.keys(q).length>0)return!0}catch{}try{let Z=A4(),X=N().readdirSync(Z);for(let q of X){if(!(q.isFile()||q.isSymbolicLink())||!q.name.endsWith(".json")||q.name.startsWith("."))continue;try{let Q=H1(kB(Z,q.name)),$=k0(Q,!1);if($&&typeof $==="object"&&Object.keys($).length>0)return!0}catch{}}}catch{}return!1}var V1,kq=null,Oq=null,T5=null;var PB=B(()=>{E0();X4();q4();z0();D6();NB();U5();I4();Aq();Tq();wB();V1=Object.freeze({settings:{},errors:[]})});import{dirname as mB,join as w5,resolve as w4}from"path";function vq(){return w5(P1(),"managed-settings.json")}function yq(){let Z=[],X={},q=!1,{settings:Q,errors:$}=k4(vq());if(Z.push(...$),Q&&Object.keys(Q).length>0)X=G1(X,Q,Q2),q=!0;let J=A4();try{let Y=N().readdirSync(J).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:U,errors:G}=k4(w5(J,H));if(Z.push(...G),U&&Object.keys(U).length>0)X=G1(X,U,Q2),q=!0}}catch(Y){let H=B0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")g(Y)}return{settings:q?X:null,errors:Z}}function Re(){let{settings:Z}=k4(vq()),X=!!Z&&Object.keys(Z).length>0,q=!1,Q=A4();try{q=N().readdirSync(Q).some(($)=>($.isFile()||$.isSymbolicLink())&&$.name.endsWith(".json")&&!$.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:q}}function uB(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else g(Z)}function k4(Z){let X=bB(Z);if(X)return{settings:X.settings?xq(X.settings):null,errors:X.errors};let q=Nx(Z);return hB(Z,q),{settings:q.settings?xq(q.settings):null,errors:q.errors}}function Nx(Z){try{let{resolvedPath:X}=T1(N(),Z),q=H1(X);if(q.trim()==="")return{settings:{},errors:[]};let Q=k0(q,!1),$=M5(Q,Z),J=y0().safeParse(Q);if(!J.success){let Y=$6(J.error,Z);return{settings:null,errors:[...$,...Y]}}return{settings:J.data,errors:$}}catch(X){return uB(X,Z),{settings:null,errors:[]}}}function EB(Z){switch(Z){case"userSettings":return w4(Z0());case"policySettings":case"projectSettings":case"localSettings":return w4(x1());case"flagSettings":{let X=Pq();return X?mB(w4(X)):w4(x1())}}}function xx(){if(gB()||r(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function k5(Z){switch(Z){case"userSettings":return w5(EB(Z),xx());case"projectSettings":case"localSettings":return w5(EB(Z),pB(Z));case"policySettings":return vq();case"flagSettings":return Pq()}}function pB(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function u(Z){let X=CB(Z);if(X!==void 0)return X;let q=dB(Z);return SB(Z,q),q}function dB(Z){if(Z==="policySettings"){let Q=H5();if(Q&&Object.keys(Q).length>0)return Q;let $=j5();if(Object.keys($.settings).length>0)return $.settings;let{settings:J}=yq();if(J)return J;let Y=I5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=k5(Z),{settings:q}=X?k4(X):{settings:null};if(Z==="flagSettings"){let Q=Eq();if(Q){let $=y0().safeParse(Q);if($.success)return G1(q||{},$.data,Q2)}}return q}function Me(){let Z=H5();if(Z&&Object.keys(Z).length>0)return"remote";let X=j5();if(Object.keys(X.settings).length>0)return A0()==="macos"?"plist":"hklm";let{settings:q}=yq();if(q)return"file";let Q=I5();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function Fe(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let q=k5(Z);if(!q)return{error:null};try{N().mkdirSync(mB(q));let Q=dB(Z);if(!Q){let J=null;try{J=H1(q)}catch(Y){if(!l2(Y))throw Y}if(J!==null){let Y=k0(J);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${q}`)};if(Y&&typeof Y==="object")Q=Y,P(`Using raw settings from ${q} due to validation failure`)}}let $=G1(Q||{},X,(J,Y,H,U)=>{if(Y===void 0&&U&&typeof H==="string"){delete U[H];return}if(Array.isArray(Y))return Y;return});if(GV(q),n2(q,m($,null,2)+`
|
|
166
|
+
`),F4(),Z==="localSettings")YV(pB("localSettings"),x1())}catch(Q){let $=Error(`Failed to read raw settings from ${q}: ${Q}`);return g($),{error:$}}return{error:null}}function Px(Z,X){return JV([...Z,...X])}function Q2(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Px(Z,X);return}function De(Z){let X=y0().strip().parse(Z),q=["permissions","sandbox","hooks"],Q=[],$={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let J of Object.keys(X))if(q.includes(J)&&X[J]&&typeof X[J]==="object"){let Y=X[J],H=$[J];if(H){for(let U of Object.keys(Y))if(H.has(U))Q.push(`${J}.${U}`)}}else Q.push(J);return Q.sort()}function Ex(){if(Nq)return{settings:{},errors:[]};let Z=Date.now();Y6("loadSettingsFromDisk_start"),Y0("info","settings_load_started"),Nq=!0;try{let X=fB(),q={};if(X)q=G1(q,X,Q2);let Q=[],$=new Set,J=new Set;for(let Y of D4()){if(Y==="policySettings"){let U=null,G=[],W=H5();if(W&&Object.keys(W).length>0){let V=y0().safeParse(W);if(V.success)U=V.data;else G.push(...$6(V.error,"remote managed settings"))}if(!U){let V=j5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(!U){let{settings:V,errors:L}=yq();if(V)U=V;G.push(...L)}if(!U){let V=I5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(U)q=G1(q,U,Q2);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}continue}let H=k5(Y);if(H){let U=w4(H);if(!J.has(U)){J.add(U);let{settings:G,errors:W}=k4(H);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}if(G)q=G1(q,G,Q2)}}if(Y==="flagSettings"){let U=Eq();if(U){let G=y0().safeParse(U);if(G.success)q=G1(q,G.data,Q2)}}}return Y0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:J.size,error_count:Q.length}),{settings:q,errors:Q}}finally{Nq=!1}}function Cq(){let{settings:Z}=vx();return Z||{}}function Ae(){F4();let Z=[];for(let X of D4()){let q=u(X);if(q&&Object.keys(q).length>0)Z.push({source:X,settings:q})}return{effective:Cq(),sources:Z}}function vx(){let Z=vB();if(Z!==null)return Z;let X=Ex();return Y6("loadSettingsFromDisk_end"),yB(X),X}function Te(){return!!(u("userSettings")?.skipDangerousModePermissionPrompt||u("localSettings")?.skipDangerousModePermissionPrompt||u("flagSettings")?.skipDangerousModePermissionPrompt||u("policySettings")?.skipDangerousModePermissionPrompt)}function je(){return!!(u("userSettings")?.permissions?.allowBypassPermissionsMode||u("localSettings")?.permissions?.allowBypassPermissionsMode||u("flagSettings")?.permissions?.allowBypassPermissionsMode||u("policySettings")?.permissions?.allowBypassPermissionsMode)}function Ie(){{let Z=u("userSettings")?.skipAutoPermissionPrompt,X=u("localSettings")?.skipAutoPermissionPrompt,q=u("flagSettings")?.skipAutoPermissionPrompt,Q=u("policySettings")?.skipAutoPermissionPrompt,$=!!(Z||X||q||Q);return P(`[auto-mode] hasAutoModeOptIn=${$} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${q} policy=${Q}`),$}return!1}function we(){return u("policySettings")?.useAutoModeDuringPlan!==!1&&u("flagSettings")?.useAutoModeDuringPlan!==!1&&u("userSettings")?.useAutoModeDuringPlan!==!1&&u("localSettings")?.useAutoModeDuringPlan!==!1}function ke(){return yx().config}function yx(){return hx(u)}function hx(Z){let X=[],q=[],Q=[],$=[],J=(U,G,W)=>{if(!W)return;let V=VV(W);G.push(...V.entries);for(let L of V.dropped)$.push({section:U,entry:L.entry,reason:BV(L.reason)})};for(let U of Cx){let G=Z(U);if(!G)continue;let W=bx.safeParse(G.autoMode);if(W.success)J("allow",X,W.data.allow),J("soft_deny",q,W.data.soft_deny),J("environment",Q,W.data.environment)}let Y=[];for(let U of Sx){let G=Z(U);if(!G)continue;let W=G.autoMode;if(W&&typeof W==="object")Y.push(U)}return{config:X.length>0||q.length>0||Q.length>0?{...X.length>0&&{allow:X},...q.length>0&&{soft_deny:q},...Q.length>0&&{environment:Q}}:void 0,dropped:$,ignoredSources:Y}}function Oe(Z){for(let X of D4()){if(X==="policySettings")continue;let q=k5(X);if(!q)continue;try{let{resolvedPath:Q}=T1(N(),q),$=H1(Q);if(!$.trim())continue;let J=k0($,!1);if(J&&typeof J==="object"&&Z in J)return!0}catch(Q){uB(Q,q)}}return!1}var Nq=!1,Cx,Sx,bx;var cB=B(()=>{qV();g0();N1();$V();Qq();E0();X4();P0();n1();E7();q4();z0();HV();D6();C0();p2();L0();NB();$q();WV();LV();U5();PB();QV();I4();Aq();Cx=["userSettings","flagSettings","policySettings"],Sx=["projectSettings","localSettings"],bx=K.object({allow:K.array(K.string()).optional(),soft_deny:K.array(K.string()).optional(),deny:K.array(K.string()).optional(),environment:K.array(K.string()).optional()})});import{cpSync as fx,readFileSync as gx,readdirSync as mx}from"fs";import{join as ux}from"path";function iB(Z,X){if(Z===X)return;if(nB(X))return;if(!nB(Z))return;try{fx(Z,X,{recursive:!0,force:!1,errorOnExist:!1})}catch(q){g(Error(`Failed to migrate auto-memory from ${Z} to ${X}: ${q instanceof Error?q.message:String(q)}`))}}function nB(Z){try{if(gx(ux(Z,lB),"utf-8").trim())return!0}catch{}try{return mx(Z,{withFileTypes:!0}).some((X)=>X.isFile()&&X.name.endsWith(".md")&&X.name!==lB)}catch{return!1}}var lB="MEMORY.md";var aB=B(()=>{C0()});import{chmodSync as px}from"fs";import{homedir as dx}from"os";import{isAbsolute as cx,join as O4,normalize as Sq,sep as O5}from"path";function rB(){let Z=process.env.CLAUDIN_DISABLE_AUTO_MEMORY;if(r(Z))return!1;if(j4(Z))return!0;if(r(process.env.CLAUDIN_SIMPLE))return!1;if(r(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=Cq();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function lx(){return!j4(process.env.CLAUDIN_EXTRACT_MEMORIES)}function ne(){return lx()&&!sB()}function ie(){return qW("CLAUDIN_EXTRACT_MEMORIES_EVERY",process.env.CLAUDIN_EXTRACT_MEMORIES_EVERY,nx,1000).effective}function ix(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return Z0()}function tB(Z,X){if(!Z)return;let q=Z;if(X&&(q.startsWith("~/")||q.startsWith("~\\"))){let $=q.slice(2),J=Sq($||".");if(J==="."||J==="..")return;q=O4(dx(),$)}let Q=Sq(q).replace(/[/\\]+$/,"");if(!cx(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+O5).normalize("NFC")}function eB(){return tB(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function ox(){let Z=u("policySettings")?.autoMemoryDirectory??u("flagSettings")?.autoMemoryDirectory??u("localSettings")?.autoMemoryDirectory??u("userSettings")?.autoMemoryDirectory;return tB(Z,!0)}function ae(){return eB()!==void 0}function sx(){return(u("policySettings")?.autoMemoryProjectLocal??u("flagSettings")?.autoMemoryProjectLocal??u("localSettings")?.autoMemoryProjectLocal??u("userSettings")?.autoMemoryProjectLocal)!==!1}function rx(){return t1(N4())??N4()}function ZL(){return O4(x4(),ax)}function oe(Z){return Sq(Z).startsWith(x4())}var nx=15,oB="memory",ax="MEMORY.md",x4;var bq=B(()=>{A1();N1();P0();QW();B4();C0();Q4();cB();z0();aB();x4=c(()=>{let Z=eB()??ox();if(Z)return Z;let X=O4(ix(),"projects"),q=(O4(X,AX(rx()),oB)+O5).normalize("NFC");if(!sx())return q;let Q=t1(N4());if(!Q)return q;let $=(O4(Q,".claudin",oB)+O5).normalize("NFC");try{N().mkdirSync($,{mode:448})}catch(Y){return g(Y),q}let J=!1;try{let Y=N().realpathSync(Q),H=N().realpathSync($);if(J=H===Y||H.startsWith(Y+O5),!J)g(Error(`Auto-memory directory escapes project root via symlink: ${$} -> ${H}`))}catch(Y){g(Y)}if(!J)return q;try{px($,448)}catch{}return iB(q,$),$},()=>N4())});function P4(Z){if(Z===void 0)return!1;let X=Z.trim().toLowerCase();return X==="0"||X==="false"||X==="no"||X==="off"||X===""}function tx(){let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC,X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&P4(Z)||X!==void 0&&P4(X)){if(process.env.DISABLE_TELEMETRY&&!P4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function hq(){return tx()==="essential-traffic"}function fq(){if(!hq())return null;let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!P4(Z))return"CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC";let X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(X!==void 0&&!P4(X))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function XL(){let Z=fq();return Z==="claudin-default"?null:Z}var gq=()=>{};import{dirname as ex,join as qL}from"path";function $L(Z){return[qL(Z,N5),qL(Z,QL)]}function ZP(Z,X){let[q,Q]=$L(Z);return X(q)?q:Q}function XP(Z,X){return $L(Z).some((q)=>X(q))}function ee(Z,X){let q=Z;while(!0){if(XP(q,X))return ZP(q,X);let Q=ex(q);if(Q===q)return null;q=Q}}function Z00(Z){return Z===N5||Z===QL}var N5="AGENTS.md",QL="CLAUDE.md";var JL=()=>{};var UL={};Jq(UL,{isTeamMemoryEnabled:()=>YL,isTeamMemPath:()=>KL,isTeamMemLikelyGitIgnored:()=>KP,isTeamMemFile:()=>UP,getTeamMemPath:()=>HL,getTeamMemEntrypoint:()=>JP});import{readFileSync as qP}from"fs";import{join as mq,resolve as QP,sep as $P}from"path";function YL(){return rB()}function HL(){return(mq(x4(),"team")+$P).normalize("NFC")}function JP(){return mq(x4(),"team","MEMORY.md")}function KL(Z){let X=QP(Z),q=HL();return X.startsWith(q)}function UP(Z){return YL()&&KL(Z)}var YP,HP,KP;var GL=B(()=>{A1();bq();YP=/^\/?\.claudin\/?$/,HP=/^!\/?\.claudin\/memory\/team\/?/,KP=c((Z)=>{try{let X=qP(mq(Z,".gitignore"),"utf-8"),q=!1;for(let Q of X.split(`
|
|
167
|
+
`)){let $=Q.trim();if(!$||$.startsWith("#"))continue;if(YP.test($))q=!0;else if(HP.test($))q=!1}return q}catch{return!1}})});import{randomBytes as GP}from"crypto";import{join as H6}from"path";function WL(){return VL()!==null}function VP(){return WL()&&!r(process.env.FORCE_AUTOUPDATE_PLUGINS)}function BP(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function VL(Z){if(r(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let X=Z?.ignoreClaudinDefaultPrivacy?XL():fq();if(X)return{type:"env",envVar:X};let q=a();if(q.autoUpdates===!1&&(q.installMethod!=="native"||q.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function LP(){let Z=a();if(Z.userID)return Z.userID;let X=GP(32).toString("hex");return V0((q)=>({...q,userID:X})),X}function zP(){if(!a().firstStartTime){let X=new Date().toISOString();V0((q)=>({...q,firstStartTime:q.firstStartTime??X}))}}function _P(Z){let X=x1();switch(Z){case"User":return H6(Z0(),"CLAUDE.md");case"Local":return H6(X,"CLAUDE.local.md");case"Project":return H6(X,N5);case"Managed":return H6(P1(),"CLAUDE.md");case"AutoMem":return ZL()}return WP.getTeamMemEntrypoint()}function RP(){return H6(P1(),".claudin","rules")}function MP(){return H6(Z0(),"rules")}var WP;var BL=B(()=>{N1();bq();P0();gq();u2();U5();JL();WP=(GL(),E4(UL))});var FP,DP;var LL=B(()=>{FP=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],DP=["normal","vim"]});var uq=B(()=>{eQ();V6();P7();u2();aX();XW();BL();LL()});function x5(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function zL(Z){let X=x5(Z);return X.length>0?X[0]:Z.trim()}var pq=()=>{};import{randomBytes as AP}from"crypto";function K6(Z){return Z?.trim()??""}function G0(Z){let X=K6(Z);return X.length>0?X:void 0}function TP(Z){return K6(Z).replace(/\/+$/,"")}function jP(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function IP(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function wP(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[q,Q]of Object.entries(Z)){let $=K6(q),J=typeof Q==="string"?Q.trim():"";if($.length>0&&J.length>0)X[$]=J}return Object.keys(X).length>0?X:void 0}function kP(Z){if(!Z||typeof Z!=="object")return;let X={},q=G0(Z.codexAuthPath);if(q)X.codexAuthPath=q;let Q=G0(Z.codexAccountId);if(Q)X.codexAccountId=Q;let $=G0(Z.githubToken);if($)X.githubToken=$;let J=G0(Z.awsRegion);if(J)X.awsRegion=J;let Y=G0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=G0(Z.gcpRegion);if(H)X.gcpRegion=H;let U=G0(Z.azureResource);if(U)X.azureResource=U;let G=wP(Z.customHeaders);if(G)X.customHeaders=G;let W=IP(Z.reasoningEffort);if(W)X.reasoningEffort=W;return Object.keys(X).length>0?X:void 0}function DL(Z){let X=K6(Z.id),q=K6(Z.name),Q=jP(Z.provider),$=TP(Z.baseUrl),J=K6(Z.model);if(!X||!q||!$||Q!=="anthropic"&&!J)return null;let H={id:X,name:q,provider:Q,baseUrl:$,model:J,apiKey:G0(Z.apiKey)},U=kP(Z.extras);if(U)H.extras=U;return H}function OP(Z){let X=new Set,q=[];for(let Q of Z??[]){let $=DL(Q);if(!$||X.has($.id))continue;X.add($.id),q.push($)}return q}function NP(){return`provider_${AP(6).toString("hex")}`}function AL(Z,X=NP()){return DL({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function TL(Z,X=a()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function P00(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:_L,model:RL,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"zai":return{provider:"openai",name:"Z.AI (GLM Coding Plan)",baseUrl:"https://api.z.ai/api/coding/paas/v4",model:"glm-5.2",apiKey:"",requiresApiKey:!0};case"cloudflare-workers-ai":return{provider:"openai",name:"Cloudflare Workers AI",baseUrl:"https://api.cloudflare.com/client/v4/accounts/YOUR-ACCOUNT-ID/ai/v1",model:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"cloudflare-ai-gateway":return{provider:"openai",name:"Cloudflare AI Gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/YOUR-ACCOUNT-ID/default/compat",model:"workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:_L,model:RL,apiKey:"",requiresApiKey:!1}}}function m0(Z=a()){return OP(Z.providerProfiles)}function E00(Z=a()){return m0(Z).length>0}function B1(Z=a()){let X=m0(Z);if(X.length===0)return;let q=G0(z4().activeProviderProfileId);if(q){let $=X.find((J)=>J.id===q);if($)return $}let Q=G0(Z.activeProviderProfileId);return X.find(($)=>$.id===Q)??X[0]}function v00(){let Z=G0(z4().activeProviderProfileId);if(!Z)return;return m0().some((q)=>q.id===Z)?Z:void 0}function xP(){return G0(z4().activeProviderProfileId)}function y00(){return xP()!==void 0}function PP(){return G0(a().activeProviderProfileId)}function C00(Z,X){let q=AL(Z);if(!q)return null;let Q=X?.makeActive??!0;if(V0(($)=>{let Y=[...m0($),q],H=G0($.activeProviderProfileId),U=Q||!H||!Y.some((G)=>G.id===H)?q.id:H;return{...$,providerProfiles:Y,activeProviderProfileId:U}}),PP()===q.id)vP(q.id),CP();return q}function S00(Z,X){let q=AL(X,Z);if(!q)return null;let Q=!1;if(V0(($)=>{let J=m0($),Y=J.findIndex((L)=>L.id===Z);if(Y<0)return $;Q=!0;let H=[...J];H[Y]=q;let U={...$.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let G=G0($.activeProviderProfileId),W=G&&H.some((L)=>L.id===G)?G:H[0]?.id;return{...$,providerProfiles:H,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:W===Z?[]:$.openaiAdditionalModelOptionsCache}}),!Q)return null;return q}function b00(Z){let X=G0(Z);if(!X)return null;let q=B1();if(!q)return null;if(x5(q.model).includes(X))return q;V0((J)=>{let Y=m0(J),H=Y.findIndex((V)=>V.id===q.id);if(H<0)return J;let U=Y[H];if(U.model===X)return J;let G=[...Y];G[H]={...U,model:X};let W={...J.openaiAdditionalModelOptionsCacheByProfile??{}};return delete W[q.id],{...J,providerProfiles:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:[]}});let $=B1();if(!$||$.id!==q.id)return null;return $}function h00(){let Z=B1();if(!Z)return;V0((X)=>{let q=m0(X),Q=q.findIndex((H)=>H.id===Z.id);if(Q<0)return X;let $=q[Q];if(!$.model)return X;let J=[...q];J[Q]={...$,model:""};let Y={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...X,providerProfiles:J,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function EP(Z){let X=x5(Z.model);if(X.length===0)return[];return X.map((q)=>({value:q,label:q,description:`Provider: ${Z.name}`}))}function dq(Z,X){let q=EP(Z);return{openaiAdditionalModelOptionsCache:q.length>0?q:TL(Z.id,X),openaiAdditionalModelOptionsCacheByProfile:{...X.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:q.length>0?q:X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function vP(Z){let X=a(),Q=m0(X).find(($)=>$.id===Z);if(!Q)return null;return V0(($)=>({...$,activeProviderProfileId:Z,...dq(Q,$)})),Q}function f00(Z){if(Z===null){X5((J)=>({...J,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let $=B1();if($)ML($);return null}let q=m0().find(($)=>$.id===Z);if(!q)return null;let Q=!1;if(X5(($)=>{if(!m0().some((H)=>H.id===Z))return Q=!0,$;let Y={...$,activeProviderProfileId:Z};if($.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),Q)return null;return ML(q),q}function ML(Z){let X=a(),q=dq(Z,X),Q=X.openaiAdditionalModelOptionsCache??[],$=X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],J=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(FL(Q,q.openaiAdditionalModelOptionsCache??[])&&FL($,J))return;V0((Y)=>({...Y,...dq(Z,Y)}))}function FL(Z,X){if(Z.length!==X.length)return!1;for(let q=0;q<Z.length;q++)if(Z[q]!==X[q])return!1;return!0}function yP(Z,X){if(!Z)return{projects:Z,stripped:[]};let q=(J)=>{let Y=J?.activeProviderProfileId;return Y!=null&&X(Y)?Y:void 0};if(!Object.values(Z).some((J)=>q(J)!==void 0))return{projects:Z,stripped:[]};let Q=[];return{projects:Object.fromEntries(Object.entries(Z).map(([J,Y])=>{let H=q(Y);if(H!==void 0){let{activeProviderProfileId:U,activeModelForProject:G,activeModelForProjectProfileId:W,...V}=Y;return Q.push({path:J,activeProviderProfileId:H,activeModelForProject:G??void 0}),[J,V]}return[J,Y]})),stripped:Q}}function g00(Z){let X=!1,q;return V0((Q)=>{let $=m0(Q);if(!$.find((L)=>L.id===Z))return Q;X=!0;let Y=$.filter((L)=>L.id!==Z),H=G0(Q.activeProviderProfileId),G=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(G)q=Y.find((L)=>L.id===G)??Y[0];let W={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete W[Z];let{projects:V}=yP(Q.projects,(L)=>L===Z);return{...Q,providerProfiles:Y,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:G?TL(G,{...Q,openaiAdditionalModelOptionsCacheByProfile:W}):[],projects:V}}),{removed:X,activeProfileId:q?.id}}function m00(Z=a()){let X=B1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let q=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(q)return q;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function u00(Z){let X=B1();if(!X){V0((q)=>({...q,openaiAdditionalModelOptionsCache:Z}));return}V0((q)=>({...q,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function CP(){let Z=B1();if(!Z){V0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}V0((X)=>{let q={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete q[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:q}})}var _L="http://localhost:11434/v1",RL="llama3.1:8b";var jL=B(()=>{uq();pq()});function P5(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let q=Z.read();if(q!==null&&q!==void 0)return q;return X.read()||{}},async readAsync(){let q=await Z.readAsync();if(q!==null&&q!==void 0)return q;return await X.readAsync()||{}},update(q){let Q=Z.read(),$=Z.update(q);if($.success){if(Q===null)X.delete();return $}let J=X.update(q);if(J.success){if(Q!==null)Z.delete();return{success:!0,warning:J.warning}}return{success:!1}},delete(){let q=Z.delete(),Q=X.delete();return q||Q}}}var IL=()=>{};function E5(Z,X,q=10*kL*wL){let G=[];try{let Q;if(X===void 0)Q={};else if(X instanceof AbortSignal)Q={abortSignal:X,timeout:q};else Q=X;let{abortSignal:$,timeout:J=10*kL*wL,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;$?.throwIfAborted();const U=W2(G,I7`exec: ${Z.slice(0,200)}`,0);try{let z=x0(Z,{env:process.env,maxBuffer:1e6,timeout:J,cwd:t(),stdio:H,shell:!0,reject:!1,input:Y});if(!z.stdout)return null;return z.stdout.trim()||null}catch{return null}}catch(W){var V=W,L=1}finally{V2(G,V,L)}}var wL=1000,kL=60;var cq=B(()=>{b2();K1();L0()});import{createHash as SP}from"crypto";import{userInfo as bP}from"os";function $2(Z=""){let X=Z0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${SP("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${OL().OAUTH_FILE_SUFFIX}${Z}${Q}`}function v4(Z=""){return $2(Z)}function I0(){try{return process.env.USER||bP().username}catch{return"claude-code-user"}}function nq(){Q0.cache={data:null,cachedAt:0},Q0.generation++,Q0.readInFlight=null}function e00(Z){if(Q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}Q0.cache={data:X,cachedAt:Date.now()}}var u0="-credentials",lq=30000,Q0;var v5=B(()=>{gU();P0();Q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function fP(){try{let Z=v4(u0),X=I0(),{stdout:q,code:Q}=await T0("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(Q===0&&q)return q0(q.trim())}catch(Z){}return null}function H10(){if(U6!==void 0)return U6;if(process.platform!=="darwin")return U6=!1,!1;try{U6=x0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{U6=!1}return U6}var hP=4032,iq,U6;var NL=B(()=>{b2();E0();Z5();cq();L0();v5();iq={name:"keychain",read(){let Z=Q0.cache;if(Date.now()-Z.cachedAt<lq)return Z.data;try{let X=v4(u0),q=I0(),Q=E5(`security find-generic-password -a "${q}" -w -s "${X}"`);if(Q){let $=q0(Q);return Q0.cache={data:$,cachedAt:Date.now()},$}}catch(X){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),Q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return Q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=Q0.cache;if(Date.now()-Z.cachedAt<lq)return Z.data;if(Q0.readInFlight)return Q0.readInFlight;let X=Q0.generation,q=fP().then((Q)=>{if(X===Q0.generation){if(Q===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let $=Q??Z.data;return Q0.cache={data:$,cachedAt:Date.now()},Q0.readInFlight=null,$}return Q});return Q0.readInFlight=q,q},update(Z){nq();try{let X=v4(u0),q=I0(),Q=m(Z),$=Buffer.from(Q,"utf-8").toString("hex"),J=`add-generic-password -U -a "${q}" -s "${X}" -X "${$}"
|
|
168
|
+
`,Y;if(J.length<=hP)Y=x0("security",["-i"],{input:J,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=x0("security",["add-generic-password","-U","-a",q,"-s",X,"-X",$],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return Q0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){nq();try{let Z=v4(u0),X=I0();return E5(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var aq;var xL=B(()=>{b2();L0();v5();aq={name:"libsecret",read(){try{let Z=I0(),X=$2(u0),q=x0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(q.exitCode===0&&q.stdout)return q0(q.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=I0(),q=$2(u0),Q=m(Z);return{success:x0("secret-tool",["store","--label",q,"service",q,"account",X],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=I0(),X=$2(u0);return x0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as gP}from"path";function y4(Z){return Z.replace(/'/g,"''")}function y5(){return $2(u0)}function PL(){return`${y5()}:${I0()}`}function oq(){let Z=y5().replace(/[^a-zA-Z0-9._-]/g,"_");return gP(Z0(),`${Z}.secure.dpapi`)}function C4(Z,X){try{return x0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function sq(Z){return typeof Z==="string"?Z:""}function mP(Z,X){let q=sq(Z?.stderr).trim();if(q)return q;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function EL(){let Z=y5().replace(/"/g,'`"'),X=I0().replace(/"/g,'`"'),q=`
|
|
169
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
170
|
+
try {
|
|
171
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
172
|
+
$cred = $vault.Retrieve("${Z}", "${X}")
|
|
173
|
+
$cred.FillPassword()
|
|
174
|
+
[Console]::Out.Write($cred.Password)
|
|
175
|
+
} catch {
|
|
176
|
+
exit 1
|
|
177
|
+
}
|
|
178
|
+
`,Q=C4(q);if(Q?.exitCode===0&&Q.stdout)try{return q0(sq(Q.stdout))}catch{return null}return null}var rq;var vL=B(()=>{b2();P0();L0();v5();rq={name:"credential-locker-dpapi",read(){let Z=y4(oq()),X=y4(PL()),q=`
|
|
179
|
+
try {
|
|
180
|
+
Add-Type -AssemblyName System.Security
|
|
181
|
+
$path = '${Z}'
|
|
182
|
+
if (!(Test-Path -LiteralPath $path)) {
|
|
183
|
+
exit 1
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
$protectedBase64 = [System.IO.File]::ReadAllText(
|
|
187
|
+
$path,
|
|
188
|
+
[System.Text.Encoding]::UTF8
|
|
189
|
+
).Trim()
|
|
190
|
+
if (-not $protectedBase64) {
|
|
191
|
+
exit 1
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
$protectedBytes = [Convert]::FromBase64String($protectedBase64)
|
|
195
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
|
|
196
|
+
$bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
|
|
197
|
+
$protectedBytes,
|
|
198
|
+
$entropyBytes,
|
|
199
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
200
|
+
)
|
|
201
|
+
[Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
|
|
202
|
+
} catch {
|
|
203
|
+
exit 1
|
|
204
|
+
}
|
|
205
|
+
`,Q=C4(q);if(Q?.exitCode===0&&Q.stdout)try{return q0(sq(Q.stdout))}catch{return EL()}return EL()},async readAsync(){return this.read()},update(Z){let X=y4(oq()),q=y4(PL()),Q=m(Z),$=`
|
|
206
|
+
try {
|
|
207
|
+
Add-Type -AssemblyName System.Security
|
|
208
|
+
$path = '${X}'
|
|
209
|
+
$directory = [System.IO.Path]::GetDirectoryName($path)
|
|
210
|
+
if ($directory) {
|
|
211
|
+
[System.IO.Directory]::CreateDirectory($directory) | Out-Null
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
$payload = [Console]::In.ReadToEnd()
|
|
215
|
+
$bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
|
|
216
|
+
$entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
|
|
217
|
+
$protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
|
|
218
|
+
$bytes,
|
|
219
|
+
$entropyBytes,
|
|
220
|
+
[System.Security.Cryptography.DataProtectionScope]::CurrentUser
|
|
221
|
+
)
|
|
222
|
+
$protectedBase64 = [Convert]::ToBase64String($protectedBytes)
|
|
223
|
+
[System.IO.File]::WriteAllText(
|
|
224
|
+
$path,
|
|
225
|
+
$protectedBase64,
|
|
226
|
+
[System.Text.Encoding]::UTF8
|
|
227
|
+
)
|
|
228
|
+
} catch {
|
|
229
|
+
Write-Error $_.Exception.Message
|
|
230
|
+
exit 1
|
|
231
|
+
}
|
|
232
|
+
`,J=C4($,{input:Q});if(J?.exitCode===0)return{success:!0};return{success:!1,warning:mP(J,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
|
|
233
|
+
try {
|
|
234
|
+
$path = '${y4(oq())}'
|
|
235
|
+
if (Test-Path -LiteralPath $path) {
|
|
236
|
+
Remove-Item -LiteralPath $path -Force
|
|
237
|
+
}
|
|
238
|
+
} catch {
|
|
239
|
+
exit 1
|
|
240
|
+
}
|
|
241
|
+
`,q=C4(X),Q=y5().replace(/"/g,'`"'),$=I0().replace(/"/g,'`"'),J=`
|
|
242
|
+
Add-Type -AssemblyName System.Runtime.WindowsRuntime
|
|
243
|
+
try {
|
|
244
|
+
$vault = New-Object Windows.Security.Credentials.PasswordVault
|
|
245
|
+
$cred = $vault.Retrieve("${Q}", "${$}")
|
|
246
|
+
$vault.Remove($cred)
|
|
247
|
+
} catch {
|
|
248
|
+
exit 0
|
|
249
|
+
}
|
|
250
|
+
`,Y=C4(J);return(q?.exitCode??1)===0}}});import{chmodSync as uP}from"fs";import{join as pP}from"path";function C5(){let Z=Z0(),X=".credentials.json";return{storageDir:Z,storagePath:pP(Z,".credentials.json")}}var S4;var CL=B(()=>{P0();n1();z0();L0();S4={name:"plaintext",read(){let{storagePath:Z}=C5();try{let X=N().readFileSync(Z,{encoding:"utf8"});return q0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=C5();try{let X=await N().readFile(Z,{encoding:"utf8"});return q0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:q}=C5();try{N().mkdirSync(X)}catch(Q){if(B0(Q)!=="EEXIST")throw Q}return yL(q,m(Z),{encoding:"utf8",flush:!1}),uP(q,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=C5();try{return N().unlinkSync(Z),!0}catch(X){if(B0(X)==="ENOENT")return!0;return!1}}}});function SL(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?P5(iq,S4):iq;if(process.platform==="linux")return X?P5(aq,S4):aq;if(process.platform==="win32")return X?P5(rq,S4):rq;return X?S4:dP}var dP;var bL=B(()=>{IL();NL();xL();vL();CL();dP={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function b(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function tq(Z=process.env){return b(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function S10(Z=process.env){let X=b(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let q=Number.parseInt(X,10);if(Number.isInteger(q)&&q>=0&&q<=65535)return q;return 1455}function eq(Z){let X=Z.split(".");if(X.length<2)return;try{let q=X[1].replace(/-/g,"+").replace(/_/g,"/"),Q=q+"=".repeat((4-q.length%4)%4),$=Buffer.from(Q,"base64").toString("utf8"),J=JSON.parse($);return J&&typeof J==="object"?J:void 0}catch{return}}function p0(Z){if(!Z)return;let X=eq(Z),q=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0,Q=q?.organizations,$=Array.isArray(Q)&&Q.length>0&&typeof Q[0]==="object"?Q[0].id:void 0;return b(q?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id??$)??void 0}function b10(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return X}})}async function fL(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:tq(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),q=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!q.ok){let J=await q.text().catch(()=>"");throw Error(J.trim()?`Codex API key exchange failed (${q.status}): ${J.trim()}`:`Codex API key exchange failed with status ${q.status}.`)}let Q=await q.json(),$=b(Q.access_token);if(!$)throw Error("Codex API key exchange completed, but no API key token was returned.");return $}var v10="https://auth.openai.com",hL="https://auth.openai.com/oauth/token",y10="openid profile email offline_access api.connectors.read api.connectors.invoke",C10="codex_cli_rs";var ZQ=()=>{};function h5(){return SL({allowPlainTextFallback:!0})}function gL(Z){if(!Z)return;let q=eq(Z)?.exp;if(typeof q==="number"&&Number.isFinite(q))return q*1000;return}function h4(Z){if(!Z||typeof Z!=="object")return;let X=Z,q=b(X.apiKey),Q=b(X.accessToken);if(!Q)return;let $=b(X.refreshToken),J=b(X.idToken),Y=b(X.accountId)??p0(J)??p0(Q),H=b(X.profileId),U=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,G=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:q,accessToken:Q,refreshToken:$,idToken:J,accountId:Y,profileId:H,lastRefreshAt:U,lastRefreshFailureAt:G}}function nP(Z){let X=gL(Z.accessToken)??gL(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+cP}function mL(Z,X=Date.now()){let q=Math.max(Z.lastRefreshFailureAt??0,b5??0);if(!q)return!1;return X-q<lP}function iP(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let q=JSON.parse(X),Q=q.error&&typeof q.error==="object"?q.error:void 0,$=b(Q?.code??q.code),J=b(Q?.message??q.error_description)??X.trim();return $?`Codex token refresh failed (${$}): ${J}`:`Codex token refresh failed with status ${Z}: ${J}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function uL(){if(G6())return;try{let Z=h5().read();return h4(Z?.codex)}catch{return}}async function aP(){if(G6())return;try{let Z=await h5().readAsync();return h4(Z?.codex)}catch{return}}function pL(Z,X=Date.now()){return mL(Z,X)}function dL(Z){if(G6())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=h4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let q=h5(),Q=q.read()||{},$=h4(Q[S5]),J={...Q,[S5]:{...X,profileId:X.profileId??$?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=q.update(J);if(Y.success)b5=h4(J[S5])?.lastRefreshFailureAt??null;return Y}function oP(Z,X){if(!dL({...Z,lastRefreshFailureAt:X}).success)b5=X}function d10(){if(G6())return{success:!0};let Z=h5(),q={...Z.read()||{}};delete q[S5];let Q=Z.update(q);if(Q.success)b5=null;return Q}async function c10(Z){if(G6())return{refreshed:!1};if(f4()?.apiKey?.trim())return{refreshed:!1};let X=await aP();if(!X)return{refreshed:!1};let q=X.refreshToken;if(!q)return{refreshed:!1,credentials:X};if(!Z?.force&&!nP(X))return{refreshed:!1,credentials:X};if(mL(X))return{refreshed:!1,credentials:X};if(b4)return b4;return b4=(async()=>{let Q=Date.now();try{let $=new URLSearchParams({client_id:tq(),grant_type:"refresh_token",refresh_token:q}),J=await fetch(hL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:$,signal:AbortSignal.timeout(15000)});if(!J.ok){let V=await J.text().catch(()=>"");throw Error(iP(J.status,V))}let Y=await J.json(),H=b(Y.access_token);if(!H)throw Error("Codex token refresh succeeded without a new access token.");let U={accessToken:H,refreshToken:b(Y.refresh_token)??X.refreshToken,idToken:b(Y.id_token)??X.idToken,accountId:p0(Y.id_token)??p0(Y.access_token)??X.accountId,lastRefreshAt:Date.now()},G=U.idToken??X.idToken;if(G)U.apiKey=await fL(G).catch((V)=>{P(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${V instanceof Error?V.message:String(V)}`,{level:"warn"});return});let W=dL(U);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:U}}catch($){throw oP(X,Q),$}finally{b4=null}})(),b4}var S5="codex",cP=60000,lP=60000,b4=null,b5=null;var cL=B(()=>{J2();E0();P0();bL();ZQ()});import{existsSync as sP,readFileSync as rP}from"node:fs";import{isIP as tP}from"node:net";import{homedir as eP}from"node:os";import{join as lL}from"node:path";function e10(Z){if(!Z)return!1;try{let{hostname:X}=new URL(Z);return X==="api.x.ai"}catch{return!1}}function Z20(Z){if(!Z)return!1;try{let{hostname:X,pathname:q}=new URL(Z);return X==="api.kimi.com"&&q.startsWith("/coding")}catch{return!1}}function QE(Z){let X=Z.split(".").map((q)=>Number.parseInt(q,10));if(X.length!==4||X.some((q)=>Number.isNaN(q)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function $E(Z){let X=Z.split(":",1)[0];if(!X)return!1;let q=Number.parseInt(X,16);if(Number.isNaN(q))return!1;return(q&65024)===64512||(q&65472)===65152}function QQ(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function XQ(Z,X){for(let q of X){let Q=Z,$=!0;for(let Y of q){if(!Q||typeof Q!=="object"||!(Y in Q)){$=!1;break}Q=Q[Y]}if(!$)continue;let J=b(Q);if(J)return J}return}function JE(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh"||X==="max")return X;return}function nL(Z){let X=Z.trim(),q=X.indexOf("?");if(q===-1){let G=X.toLowerCase(),W=g5[G];if(W)return{raw:X,baseModel:W.model,reasoning:W.reasoningEffort?{effort:W.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let Q=X.slice(0,q).trim(),$=new URLSearchParams(X.slice(q+1)),J=Q.toLowerCase(),Y=g5[J],H=Y?.model??Q,U=JE($.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof U==="string"?{effort:U}:U}}function rL(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in g5}function $Q(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return XE.has(q)}function tL(Z){return $Q(Z)}function YE(Z,X){let q=QQ(X);return BE(q)||!q&&rL(Z)}function GE(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let q=HE.exec(X);if(!q)return!1;if(Number(q[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function eL(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let q=X.indexOf("%25");if(q!==-1)X=X.slice(0,q);if(qE.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let Q=tP(X);if(Q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||QE(X);if(Q===6)return $E(X);return!1}catch{return!1}}function f5(Z){return Z.replace(JQ,"")}function WE(Z){let X=f5(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function VE(Z){try{let X=new URL(Z),q=X.hostname.toLowerCase(),Q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return q.includes("ollama")||Q.includes("ollama")}catch{return!1}}function X20(Z){if(!eL(Z))return[];try{let X=new URL(Z),q=f5(X.toString()),Q=new Set([q]),$=[],J=(U,G)=>{let W=new URL(X.toString());W.hostname=U,W.pathname=G,W.search="",W.hash="";let V=f5(W.toString());if(Q.has(V))return;Q.add(V),$.push(V)},Y=WE(X.pathname);if(Y!==f5(X.pathname))J(X.hostname,Y);let H=X.hostname.toLowerCase().replace(UE,"");if(H==="localhost"||H==="::1")J("127.0.0.1",X.pathname||"/"),J("127.0.0.1",Y);return $}catch{return[]}}function q20(Z){if(!Z.hasTools)return!1;if(!eL(Z.baseUrl))return!1;return VE(Z.baseUrl)}function BE(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(JQ,"")==="/backend-api/codex"}catch{return!1}}function LE(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return sL;let Q=q.indexOf("/");if(Q!==-1)return q.slice(Q+1);return q}function iL(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return sL;return q}function oL(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com"||X.endsWith(".githubcopilot.com")||X.startsWith("copilot-api."))return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function YQ(Z){let X=Zz(),Q=X?.transport==="github_copilot",$=X?.model?.trim(),J=QQ(X?.baseUrl),Y=Z?.model?.trim()||$||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=nL(Y),U=QQ(Z?.baseUrl),G=U??J,V=Q&&rL(Y)&&G&&oL(G)==="custom"?void 0:G,L=U??V,z=$??"",R=$Q(z)?nL(z).baseModel:null,M=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,F=$Q(Y)||M,D=!Q&&F&&!(L&&L!==qQ)?ZE:L,w=Q?oL(L):"custom",T=Q&&w==="copilot",j=Q&&w==="models",A=Q&&w==="custom",S=Q?iL(Y):Y,k=YE(Y,D)||T&&GE(S)?"codex_responses":"chat_completions",x=T?LE(H.baseModel):j||A?iL(H.baseModel):H.baseModel,E=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:k,requestedModel:Y,resolvedModel:x,baseUrl:(D??(T&&k==="codex_responses"?aL:Q?aL:qQ)).replace(JQ,""),reasoning:E}}function Q20(Z){if(YQ({model:Z}).transport==="codex_responses")return!0;return Zz()?.transport==="github_copilot"}function Zz(){try{let{tryGetActiveProvider:Z}=(J2(),E4(g4));return Z()}catch{return null}}function $20(){let Z=null;try{let{tryGetActiveProvider:Q}=(J2(),E4(g4));Z=Q()}catch{Z=null}let X=Z?.transport;if(X!=="openai_compat"&&X!=="codex_responses"){if(!X||X==="anthropic")return"firstParty";return null}let q=YQ();if(q.transport!=="chat_completions")return null;return`openai:${q.baseUrl.toLowerCase()}`}function J20(){let Z=YQ();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();try{return new URL(X).hostname==="api.openai.com"}catch{return X===qQ}}function Xz(Z=process.env){let X=HQ();if(X)return X;let q=b(Z.CODEX_AUTH_JSON_PATH);if(q)return q;let Q=b(Z.CODEX_HOME);if(Q)return lL(Q,"auth.json");return lL(eP(),".codex","auth.json")}function HQ(){try{let{tryGetActiveProvider:Z}=(J2(),E4(g4));return b(Z()?.extras?.codexAuthPath)}catch{return}}function KQ(){try{let{tryGetActiveProvider:Z}=(J2(),E4(g4));return b(Z()?.extras?.codexAccountId)}catch{return}}function qz(Z){if(!sP(Z))return;try{let X=rP(Z,"utf8"),q=JSON.parse(X);return q&&typeof q==="object"?q:void 0}catch{return}}function Qz(Z){let{authJson:X,authPath:q,envAccountId:Q}=Z;if(!X)return{apiKey:"",authPath:q,source:Z.missingSource??"none"};let $=XQ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),J=XQ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??XQ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??p0($)??p0(J);if(!$)return{apiKey:"",accountId:Y,authPath:q,source:Z.missingSource??"none"};return{apiKey:$,accountId:Y,authPath:q,source:"auth.json"}}function $z(Z){let{storedCredentials:X,envAccountId:q}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:q??X.accountId??p0(X.idToken)??p0(X.accessToken),source:"secure-storage"}}function m5(Z,X){let q=b(Z.CODEX_API_KEY),$=KQ()??b(Z.CODEX_ACCOUNT_ID)??b(Z.CHATGPT_ACCOUNT_ID);if(q)return{apiKey:q,accountId:$??p0(q),source:"env"};let J=HQ();if(!Boolean(J??b(Z.CODEX_AUTH_JSON_PATH)??b(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:$,source:"none"};let H=Xz(Z),U=qz(H);return Qz({authJson:U,authPath:H,envAccountId:$})}function Y20(Z){let X=Z?.env??process.env,q=m5(X,{explicitAuthPathOnly:!0}),Q=Boolean(HQ()??b(X.CODEX_AUTH_JSON_PATH)??b(X.CODEX_HOME)),$=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||q.source==="env"||q.source==="auth.json")return q;if(Z?.storedCredentials?.accessToken)return $z({storedCredentials:Z.storedCredentials,envAccountId:KQ()??b(X.CODEX_ACCOUNT_ID)??b(X.CHATGPT_ACCOUNT_ID)});if($)return m5(X);return zE(X)}function zE(Z=process.env){let X=KQ()??b(Z.CODEX_ACCOUNT_ID)??b(Z.CHATGPT_ACCOUNT_ID),q=m5(Z,{explicitAuthPathOnly:!0});if(q.source==="env"||q.source==="auth.json"||q.authPath)return q;let Q=uL();if(Q?.accessToken){let $=$z({storedCredentials:Q,envAccountId:X});if(!(!$.accountId||pL(Q)))return $;let Y=Xz(Z),H=qz(Y),U=Qz({authJson:H,authPath:Y,envAccountId:X});if(U.apiKey)return{...U,accountId:U.accountId??$.accountId};return $}return m5(Z)}function _E(Z){let X=Z.trim().toLowerCase(),Q=X.split("?",1)[0]??X;return g5[Q]?.reasoningEffort}function H20(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;if(q==="gpt-5.3-codex-spark"||q==="codexspark")return!1;if(_E(q)!==void 0)return!0;return KE.test(q)}var qQ="https://api.openai.com/v1",ZE="https://chatgpt.com/backend-api/codex",t10="https://api.x.ai/v1",sL="gpt-4o",g5,XE,qE,HE,KE,JQ,UE,aL="https://api.githubcopilot.com";var Jz=B(()=>{cL();ZQ();g5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.6":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-sol":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-terra":{model:"gpt-5.6-terra",reasoningEffort:"high"},"gpt-5.6-luna":{model:"gpt-5.6-luna",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},XE=new Set(["codexplan","codexspark"]),qE=new Set(["localhost","127.0.0.1","::1"]);HE=/^gpt-(\d+)/,KE=/^gpt-5(?:[.-]|$)/,JQ=/\/+$/,UE=/^\[|\]$/g});var g4={};Jq(g4,{tryGetActiveProvider:()=>f4,invalidateActiveProviderCache:()=>DE,getActiveProvider:()=>Hz,_peekActiveProviderCacheForTesting:()=>AE,ActiveProviderNotConfiguredError:()=>u5});function RE(){if(Yz)return;Yz=!0,zX(()=>{Y2=null})}function ME(Z,X){switch(Z.provider){case"anthropic":return"anthropic";case"gemini":return"gemini";case"mistral":return"mistral";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai":default:{if(Z.extras?.githubToken)return"github_copilot";if(tL(X))return"codex_responses";return"openai_compat"}}}function FE(Z){let X=zL(Z.model);return{transport:ME(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function Hz(){if(RE(),Y2)return Y2;let Z=B1(a());if(!Z)throw new u5;return Y2=FE(Z),Y2}function f4(){try{return Hz()}catch(Z){if(Z instanceof u5)return null;throw Z}}function DE(){Y2=null}function AE(){return Y2}var u5,Y2=null,Yz=!1;var J2=B(()=>{uq();jL();pq();Jz();u5=class u5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function Uz(Z){return Z.replace(Kz,"").trim()||Z}function Gz(Z){return Z.replace(Kz,"").trim()}function B20(Z){return Z.replace(TE,"").trim()}var Kz,TE;var Wz=B(()=>{Kz=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;TE=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function T20(Z,X){let q=Z.firstPrompt?.startsWith(`<${zz}>`),Q=Z.firstPrompt?Gz(Z.firstPrompt):"",$=Q&&!q,J=Z.agentName||Z.customTitle||Z.summary||($?Q:void 0)||X||(q?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return Uz(J).trim()}function j20(Z){return Z.toISOString().replace(/[:.]/g,"-")}function wE(Z){if(p5.length>=IE)p5.shift();p5.push(Z)}function I20(Z){if(d0!==null)return;if(d0=Z,W6.length>0){let X=[...W6];W6.length=0;for(let q of X)switch(q.type){case"error":d0.logError(q.error);break;case"mcpError":d0.logMCPError(q.serverName,q.error);break;case"mcpDebug":d0.logMCPDebug(q.serverName,q.message);break}}}function g(Z){let X=Lz(Z);try{let q=f4()?.transport;if(q==="bedrock"||q==="vertex"||q==="foundry"||process.env.DISABLE_ERROR_REPORTING||hq())return;let $={error:X.stack||X.message,timestamp:new Date().toISOString()};if(wE($),d0===null){W6.push({type:"error",error:X});return}d0.logError(X)}catch{}}function k20(){return[...p5]}function O20(Z,X){try{if(d0===null){W6.push({type:"mcpError",serverName:Z,error:X});return}d0.logMCPError(Z,X)}catch{}}function N20(Z,X){try{if(d0===null){W6.push({type:"mcpDebug",serverName:Z,message:X});return}d0.logMCPDebug(Z,X)}catch{}}function x20(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:q,...Q}=Z;Vz(Q),Bz(null)}var IE=100,p5,W6,d0=null,w20;var C0=B(()=>{A1();N1();J2();jE();Wz();n1();gq();p5=[];W6=[];w20=c(()=>{return process.argv.includes("--hard-fail")})});import _z from"node:path";function NE(Z){return Z.includes(_z.sep)||Z.includes("/")||_z.isAbsolute(Z)}function xE(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(m4.test(X))return"Unsafe executable: control characters are not allowed";if(!NE(X)&&!OE.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function PE(Z){for(let X of Z)if(m4.test(X))return"Unsafe argument: control characters are not allowed";return null}function EE(Z){if(!Z)return null;if(m4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function vE(Z){if(!Z)return{};for(let[X,q]of Object.entries(Z)){if(m4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof q==="string"&&m4.test(q))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function yE(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function T0(Z,X,q={timeout:10*GQ*UQ,preserveOutputOnError:!0,useCwd:!0}){return e1(Z,X,{abortSignal:q.abortSignal,timeout:q.timeout,preserveOutputOnError:q.preserveOutputOnError,cwd:q.useCwd?t():void 0,env:q.env,stdin:q.stdin,input:q.input})}function e1(Z,X,{abortSignal:q,timeout:Q=10*GQ*UQ,preserveOutputOnError:$=!0,cwd:J,env:Y,maxBuffer:H=Rz,stdin:U,input:G}={timeout:10*GQ*UQ,preserveOutputOnError:!0,maxBuffer:Rz}){let W=xE(Z);if(W)return Promise.resolve({stdout:"",stderr:"",code:1,error:W});let V=PE(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=EE(J);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let z=vE(Y);if(z.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:z.error});return new Promise((_)=>{let R=G!==void 0?"pipe":U??"pipe",M=Mz.spawn(Z,X,{cwd:J,env:z.value,shell:!1,signal:q,stdio:[R,"pipe","pipe"]}),F=!1,O="",D="",w=0,T,j=!1,A=(x)=>{if(F)return;F=!0,_(x)},S=(x,E)=>{let h=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(h,"utf8"),w>H){M.kill(),A({stdout:$?O:"",stderr:$?D:"",code:1,error:"maxBuffer exceeded"});return}if(E==="stdout")O+=h;else D+=h};M.stdout?.on("data",(x)=>S(x,"stdout")),M.stderr?.on("data",(x)=>S(x,"stderr")),M.once("spawn",()=>{if(R==="pipe"&&M.stdin)if(G!==void 0)M.stdin.end(G);else M.stdin.end()}),M.once("error",(x)=>{g(x),A({stdout:"",stderr:"",code:1,error:x.message})});let k=Q>0?setTimeout(()=>{j=!0,M.kill()},Q):void 0;M.once("close",(x,E)=>{if(k)clearTimeout(k);T=E??void 0;let h=x??1;if(j){A({stdout:$?O:"",stderr:$?D:"",code:h,error:`Command timed out after ${Q}ms`});return}if(h!==0){if($)A({stdout:O,stderr:D,code:h,error:yE({signal:T},h)});else A({stdout:"",stderr:"",code:h});return}A({stdout:O,stderr:D,code:0})})})}var Mz,UQ=1000,GQ=60,Rz=1e6,m4,OE;var Z5=B(()=>{K1();C0();cq();Mz=kE(tQ(),1),m4=/[\0\r\n]/,OE=/^[A-Za-z0-9_.-]+$/});
|
|
251
|
+
export{kt as g9,wB as h9,u0 as i9,v4 as j9,I0 as k9,nq as l9,e00 as m9,v5 as n9,Q8 as o9,qJ as p9,EK as q9,vK as r9,YX as s9,b2 as t9,az as u9,v1 as v9,Z$ as w9,oz as x9,X$ as y9,sz as z9,Y$ as A9,H$ as B9,t5 as C9,L$ as D9,Y3 as E9,k$ as F9,P$ as G9,E$ as H9,Pv as I9,z1 as J9,o4 as K9,k0 as L9,fv as M9,K3 as N9,gv as O9,mv as P9,D6 as Q9,S$ as R9,cv as S9,lv as T9,b$ as U9,h2 as V9,HX as W9,CU as X9,w7 as Y9,k7 as Z9,SU as _9,bU as $9,J0 as a_,fI as b_,g2 as c_,Nc as d_,r6 as e_,cI as f_,zX as g_,V0 as h_,lI as i_,a as j_,sI as k_,rI as l_,tI as m_,eI as n_,Zw as o_,Xw as p_,Y0 as q_,cc as r_,X4 as s_,_X as t_,$w as u_,H1 as v_,q4 as w_,MX as x_,cU as y_,Xl as z_,A0 as A_,p2 as B_,Ul as C_,Yw as D_,v7 as E_,iU as F_,aU as G_,TX as H_,Rl as I_,Ml as J_,Fl as K_,Dl as L_,Al as M_,Q4 as N_,hl as O_,Rw as P_,fl as Q_,gl as R_,ml as S_,ul as T_,lU as U_,pl as V_,dl as W_,cl as X_,ll as Y_,nl as Z_,il as __,al as $_,ol as a$,sl as b$,rl as c$,n2 as d$,tl as e$,el as f$,ZG as g$,Zn as h$,E7 as i$,Vn as j$,Bn as k$,vG as l$,Hk as m$,Kk as n$,Uk as o$,tQ as p$,E5 as q$,T0 as r$,e1 as s$,Z5 as t$,G4 as u$,SG as v$,mn as w$,s0 as x$,t2 as y$,e2 as z$,un as A$,pn as B$,dn as C$,lG as D$,V4 as E$,t1 as F$,Ck as G$,$i as H$,Ji as I$,j0 as J$,Yi as K$,Hi as L$,rG as M$,bk as N$,hk as O$,Ki as P$,tG as Q$,fk as R$,Ui as S$,gk as T$,Gi as U$,mk as V$,uk as W$,Wi as X$,Vi as Y$,Bi as Z$,Li as _$,zi as $$,B4 as aaa,dk as baa,L4 as caa,z4 as daa,X5 as eaa,lk as faa,nk as gaa,ak as haa,qW as iaa,QW as jaa,KW as kaa,UW as laa,RW as maa,MW as naa,gW as oaa,mW as paa,aW as qaa,oW as raa,Qo as saa,$o as taa,Jo as uaa,fO as vaa,H5 as waa,$V as xaa,Ho as yaa,qq as zaa,JV as Aaa,Qq as Baa,iO as Caa,YV as Daa,HV as Eaa,Fo as Faa,Do as Gaa,Ao as Haa,To as Iaa,jo as Jaa,Io as Kaa,D4 as Laa,wo as Maa,ko as Naa,$q as Oaa,No as Paa,xo as Qaa,WV as Raa,Eo as Saa,VV as Taa,vo as Uaa,XN as Vaa,yo as Waa,qN as Xaa,Co as Yaa,BV as Zaa,LV as _aa,P1 as $aa,A4 as aba,U5 as bba,lo as cba,no as dba,io as eba,ao as fba,oo as gba,so as hba,ro as iba,to as jba,eo as kba,Zs as lba,Xs as mba,qs as nba,Qs as oba,RV as pba,$s as qba,Js as rba,Ys as sba,Hs as tba,Ks as uba,Us as vba,Gs as wba,Ws as xba,MV as yba,HN as zba,KN as Aba,UN as Bba,GN as Cba,WN as Dba,VN as Eba,BN as Fba,LN as Gba,zN as Hba,_N as Iba,DV as Jba,TV as Kba,jV as Lba,kV as Mba,js as Nba,NV as Oba,q2 as Pba,vs as Qba,DN as Rba,B5 as Sba,Cs as Tba,PV as Uba,L5 as Vba,ms as Wba,us as Xba,ps as Yba,yV as Zba,iN as _ba,ds as $ba,cs as aca,oN as bca,ls as cca,fV as dca,ns as eca,is as fca,as as gca,gV as hca,ss as ica,z5 as jca,mV as kca,uV as lca,qx as mca,Qx as nca,es as oca,Zr as pca,Xr as qca,pV as rca,dV as sca,Qr as tca,$r as uca,Jr as vca,cV as wca,Wq as xca,Ur as yca,Gr as zca,Wr as Aca,nV as Bca,iV as Cca,aV as Dca,zr as Eca,oV as Fca,Vq as Gca,sV as Hca,rV as Ica,Mr as Jca,tV as Kca,Q6 as Lca,Ir as Mca,eV as Nca,wr as Oca,ZB as Pca,Or as Qca,XB as Rca,qB as Sca,Nr as Tca,xr as Uca,Pr as Vca,Er as Wca,vr as Xca,Bx as Yca,yr as Zca,Lq as _ca,cr as $ca,UB as ada,GB as bda,y0 as cda,Qt as dda,$t as eda,Jt as fda,I4 as gda,Ft as hda,Aq as ida,mt as jda,j5 as kda,I5 as lda,ut as mda,pt as nda,PB as oda,yq as pda,Re as qda,k4 as rda,EB as sda,k5 as tda,pB as uda,u as vda,Me as wda,Fe as xda,Q2 as yda,De as zda,Cq as Ada,Ae as Bda,vx as Cda,Te as Dda,je as Eda,Ie as Fda,we as Gda,ke as Hda,yx as Ida,Cx as Jda,Sx as Kda,hx as Lda,Oe as Mda,cB as Nda,rB as Oda,lx as Pda,ne as Qda,ie as Rda,ix as Sda,ae as Tda,x4 as Uda,ZL as Vda,oe as Wda,bq as Xda,hq as Yda,XL as Zda,gq as _da,N5 as $da,$L as aea,ZP as bea,ee as cea,Z00 as dea,JL as eea,YL as fea,HL as gea,KP as hea,KL as iea,UP as jea,UL as kea,GL as lea,WL as mea,VP as nea,BP as oea,VL as pea,LP as qea,zP as rea,_P as sea,RP as tea,MP as uea,FP as vea,DP as wea,uq as xea,x5 as yea,zL as zea,pq as Aea,P00 as Bea,m0 as Cea,E00 as Dea,B1 as Eea,v00 as Fea,xP as Gea,y00 as Hea,PP as Iea,C00 as Jea,S00 as Kea,b00 as Lea,h00 as Mea,EP as Nea,vP as Oea,f00 as Pea,yP as Qea,g00 as Rea,m00 as Sea,u00 as Tea,CP as Uea,jL as Vea,H10 as Wea,NL as Xea,SL as Yea,bL as Zea,v10 as _ea,y10 as $ea,C10 as afa,b as bfa,tq as cfa,S10 as dfa,p0 as efa,b10 as ffa,fL as gfa,ZQ as hfa,aP as ifa,dL as jfa,d10 as kfa,c10 as lfa,cL as mfa,qQ as nfa,ZE as ofa,t10 as pfa,e10 as qfa,Z20 as rfa,eL as sfa,X20 as tfa,q20 as ufa,BE as vfa,oL as wfa,YQ as xfa,Q20 as yfa,$20 as zfa,J20 as Afa,Y20 as Bfa,zE as Cfa,_E as Dfa,H20 as Efa,Jz as Ffa,u5 as Gfa,Hz as Hfa,f4 as Ifa,DE as Jfa,AE as Kfa,J2 as Lfa,Uz as Mfa,Gz as Nfa,B20 as Ofa,Wz as Pfa,T20 as Qfa,j20 as Rfa,I20 as Sfa,g as Tfa,k20 as Ufa,O20 as Vfa,N20 as Wfa,x20 as Xfa,C0 as Yfa};
|