sootsim 0.1.128 → 0.1.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-KVBASG57.js → agent-KNT2MNHS.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-CSUCCH35.js → agent-wrapper-OQ6MXYSM.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-LK57Q63V.js → app-fonts-5YH5C37X.js} +2 -2
  5. package/dist-cli/chunks/{assert-LMMXHK7P.js → assert-7GTOVITS.js} +2 -2
  6. package/dist-cli/chunks/auto-bootstrap-7QUYTCK3.js +2 -0
  7. package/dist-cli/chunks/beta-TKYV2VUL.js +2 -0
  8. package/dist-cli/chunks/{chunk-TT5RWL45.js → chunk-3QB2RIJ3.js} +2 -2
  9. package/dist-cli/chunks/{chunk-7SSQQWXI.js → chunk-4A5BPDNH.js} +2 -2
  10. package/dist-cli/chunks/{chunk-KABJPUT4.js → chunk-4KQKAI4R.js} +1 -1
  11. package/dist-cli/chunks/chunk-4TWK4GWQ.js +2 -0
  12. package/dist-cli/chunks/chunk-544KNXXS.js +1 -0
  13. package/dist-cli/chunks/{chunk-PINZJVS6.js → chunk-5IYZIY67.js} +1 -1
  14. package/dist-cli/chunks/{chunk-KBW2VI34.js → chunk-5QO3N7MG.js} +1 -1
  15. package/dist-cli/chunks/{chunk-X33P2PIG.js → chunk-6YFOOGMX.js} +1 -1
  16. package/dist-cli/chunks/{chunk-TGMTCNZ2.js → chunk-6YKC2PAW.js} +2 -2
  17. package/dist-cli/chunks/{chunk-PSL42AVT.js → chunk-77BLGF7T.js} +2 -2
  18. package/dist-cli/chunks/{chunk-P4W42H4A.js → chunk-7NG5U6NK.js} +3 -3
  19. package/dist-cli/chunks/{chunk-JBVHVSVC.js → chunk-7YASUTHS.js} +2 -2
  20. package/dist-cli/chunks/{chunk-ZTHTQNVD.js → chunk-BIWTU6Y6.js} +6 -6
  21. package/dist-cli/chunks/{chunk-XF5W3CGA.js → chunk-DLYAXBRT.js} +2 -2
  22. package/dist-cli/chunks/{chunk-DTHD7QGU.js → chunk-DRHDI7V4.js} +2 -2
  23. package/dist-cli/chunks/{chunk-HTFFTIEU.js → chunk-FGMOSDCQ.js} +1 -1
  24. package/dist-cli/chunks/{chunk-YKUW3QNP.js → chunk-H6WPFY4K.js} +2 -2
  25. package/dist-cli/chunks/{chunk-MQFUXG7V.js → chunk-HCGT7RFQ.js} +1 -1
  26. package/dist-cli/chunks/chunk-HKKCAEKK.js +1 -0
  27. package/dist-cli/chunks/{chunk-AJ34QMR4.js → chunk-IGQ54SMC.js} +2 -2
  28. package/dist-cli/chunks/{chunk-KG3XVCAL.js → chunk-JALLIXYA.js} +2 -2
  29. package/dist-cli/chunks/{chunk-SKW6NBUP.js → chunk-K5N6S6MK.js} +2 -2
  30. package/dist-cli/chunks/{chunk-B3HLOZ3N.js → chunk-KYJJSQWY.js} +2 -2
  31. package/dist-cli/chunks/{chunk-E3NRRI4M.js → chunk-LBRLBJAS.js} +1 -1
  32. package/dist-cli/chunks/{chunk-J7TYQVOU.js → chunk-MOO23TCK.js} +1 -1
  33. package/dist-cli/chunks/{chunk-374XJJVQ.js → chunk-MWZ2K75V.js} +1 -1
  34. package/dist-cli/chunks/{chunk-OAZYZXMH.js → chunk-NEXDOXJ3.js} +1 -1
  35. package/dist-cli/chunks/{chunk-CYKPWI35.js → chunk-OHPV4WP2.js} +1 -1
  36. package/dist-cli/chunks/{chunk-DKK3CC3D.js → chunk-OOTZNIHU.js} +2 -2
  37. package/dist-cli/chunks/{chunk-H7O2EPCU.js → chunk-OP5XM4ED.js} +2 -2
  38. package/dist-cli/chunks/{chunk-ASKSZHOR.js → chunk-PBYFOCRO.js} +3 -3
  39. package/dist-cli/chunks/{chunk-HMBYOS66.js → chunk-QDMM6U4X.js} +2 -2
  40. package/dist-cli/chunks/{chunk-OULIZJPC.js → chunk-R35KFNWH.js} +2 -2
  41. package/dist-cli/chunks/{chunk-QNKKUBAX.js → chunk-RSJKAVWL.js} +2 -2
  42. package/dist-cli/chunks/{chunk-HDW4B3FW.js → chunk-SK4G3KBR.js} +2 -2
  43. package/dist-cli/chunks/{chunk-3AAJ272V.js → chunk-SPJXGCEP.js} +1 -1
  44. package/dist-cli/chunks/{chunk-OLXRO2UE.js → chunk-T77EKSH4.js} +1 -1
  45. package/dist-cli/chunks/{chunk-HNRZM6GI.js → chunk-TCYVPNQO.js} +3 -3
  46. package/dist-cli/chunks/chunk-TOPGPGVZ.js +1 -0
  47. package/dist-cli/chunks/{chunk-ZB2LBNNH.js → chunk-VGCTSDGM.js} +54 -14
  48. package/dist-cli/chunks/{chunk-WCJMLITZ.js → chunk-XPYODDHV.js} +1 -1
  49. package/dist-cli/chunks/{chunk-WBVNZ7R3.js → chunk-XRIPNBCE.js} +2 -2
  50. package/dist-cli/chunks/{chunk-SQRVXVCM.js → chunk-YRRFLKL4.js} +1 -1
  51. package/dist-cli/chunks/{chunk-WEGRCMET.js → chunk-YYCJASBO.js} +2 -2
  52. package/dist-cli/chunks/cli-version-SHSHHYXU.js +2 -0
  53. package/dist-cli/chunks/{compat-WT4WILUH.js → compat-NXBN3X4Z.js} +3 -3
  54. package/dist-cli/chunks/{config-GKCHSOOI.js → config-TBUMHWAL.js} +2 -2
  55. package/dist-cli/chunks/control-CAPNUH2B.js +2 -0
  56. package/dist-cli/chunks/{cpu-profile-HAHWXEDN.js → cpu-profile-UFGS2RPI.js} +2 -2
  57. package/dist-cli/chunks/{daemon-Z2O7JY3O.js → daemon-BUW7GFTP.js} +2 -2
  58. package/dist-cli/chunks/{debug-C7NG2DAG.js → debug-7TLF5GM5.js} +3 -3
  59. package/dist-cli/chunks/{detox-Q45XNNH3.js → detox-MPVMCPWZ.js} +2 -2
  60. package/dist-cli/chunks/{device-55XBOVDK.js → device-APKKBXMJ.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-I44BNF4T.js → diagnose-FVLVFNDW.js} +2 -2
  62. package/dist-cli/chunks/drivers-QQJOT5IF.js +2 -0
  63. package/dist-cli/chunks/{electron-XR7UGDZD.js → electron-X2DEUVXA.js} +3 -3
  64. package/dist-cli/chunks/flow-SOFJ7QI3.js +2 -0
  65. package/dist-cli/chunks/help-ZFJBFDNU.js +2 -0
  66. package/dist-cli/chunks/{hints-GTUK7PES.js → hints-D47SYWGV.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-N6TCKIQQ.js → home-paths-23FGUKN4.js} +2 -2
  68. package/dist-cli/chunks/{inspect-7WV43JZ3.js → inspect-HEJB6NB6.js} +4 -4
  69. package/dist-cli/chunks/install-5XBIUQGH.js +2 -0
  70. package/dist-cli/chunks/{install-desktop-GFQYXJVD.js → install-desktop-5ZBMF444.js} +3 -3
  71. package/dist-cli/chunks/{keys-KHRGMVKB.js → keys-CI2XOBPT.js} +2 -2
  72. package/dist-cli/chunks/{launch-EXL7RKQ7.js → launch-6R6RY6R5.js} +3 -3
  73. package/dist-cli/chunks/{login-VCD33FX6.js → login-VLLUNVK7.js} +4 -4
  74. package/dist-cli/chunks/{logout-E2T66AOL.js → logout-D4YKYIDG.js} +2 -2
  75. package/dist-cli/chunks/{maestro-ZANP2BL4.js → maestro-KLROSFMP.js} +2 -2
  76. package/dist-cli/chunks/{preview-UBXWRORY.js → preview-O4365QYC.js} +2 -2
  77. package/dist-cli/chunks/{profile-XMGEEZ5K.js → profile-VAEKDLEX.js} +2 -2
  78. package/dist-cli/chunks/{react-D6L6HQOQ.js → react-MMA3LE34.js} +2 -2
  79. package/dist-cli/chunks/{record-JOHCXOWR.js → record-GVWF4BNF.js} +2 -2
  80. package/dist-cli/chunks/runtime-ZE6YLTHF.js +2 -0
  81. package/dist-cli/chunks/{runtime-delivery-HERSJG4G.js → runtime-delivery-4SSWMW25.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-B7OWAB6E.js → screenshot-C72QGUMV.js} +2 -2
  83. package/dist-cli/chunks/{screenshot-mode-Z5BJFBTW.js → screenshot-mode-OCTJDADF.js} +2 -2
  84. package/dist-cli/chunks/{screenshots-XV6WVUPL.js → screenshots-AWDE4NDZ.js} +2 -2
  85. package/dist-cli/chunks/{server-GKB36CKN.js → server-K6KOFHSQ.js} +12 -12
  86. package/dist-cli/chunks/setup-repo-KZDLN5I2.js +2 -0
  87. package/dist-cli/chunks/{skills-KZMAEPI7.js → skills-DIETG7L3.js} +2 -2
  88. package/dist-cli/chunks/{start-U476YCIN.js → start-R54AVUYP.js} +4 -4
  89. package/dist-cli/chunks/store-3I5TVDYR.js +2 -0
  90. package/dist-cli/chunks/telemetry-MZWJNMXL.js +2 -0
  91. package/dist-cli/chunks/{test-KZKN34BL.js → test-6EZ2YHEN.js} +3 -3
  92. package/dist-cli/chunks/{three-mode-HCUMT2OW.js → three-mode-FWE57WZP.js} +2 -2
  93. package/dist-cli/chunks/{timeline-EVARJJIQ.js → timeline-4FFLAGNO.js} +2 -2
  94. package/dist-cli/chunks/{upgrade-NJMIIBUR.js → upgrade-RI62D65F.js} +2 -2
  95. package/dist-cli/chunks/upload-2OQWKQOR.js +2 -0
  96. package/dist-cli/chunks/{version-VENV6XNR.js → version-RHWBKIPW.js} +2 -2
  97. package/dist-cli/chunks/web-U4RROYGL.js +2 -0
  98. package/dist-cli/chunks/{what-happened-P6T4UG2I.js → what-happened-QYK3MLTS.js} +2 -2
  99. package/dist-cli/chunks/{whoami-MVMHRDM6.js → whoami-XO5L3YTX.js} +2 -2
  100. package/dist-lib/agent-daemon-client.cjs +1 -1
  101. package/dist-lib/agent-events.cjs +1 -1
  102. package/dist-lib/agent-sessions.cjs +1 -1
  103. package/dist-lib/attached-projects.cjs +1 -1
  104. package/dist-lib/auth/shared-session.cjs +1 -1
  105. package/dist-lib/backend-origin.cjs +1 -1
  106. package/dist-lib/beta.cjs +1 -1
  107. package/dist-lib/beta.mjs +1 -1
  108. package/dist-lib/bridge-constants.cjs +1 -1
  109. package/dist-lib/cli-constants.cjs +1 -1
  110. package/dist-lib/config.cjs +1 -1
  111. package/dist-lib/detox/index.cjs +1 -1
  112. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  113. package/dist-lib/home-paths.cjs +1 -1
  114. package/dist-lib/host/bridge-host.cjs +20 -7
  115. package/dist-lib/host/fetch-proxy-handler.cjs +20 -7
  116. package/dist-lib/host/fetch-proxy-overrides.cjs +10 -6
  117. package/dist-lib/host/fetch-proxy-overrides.mjs +10 -6
  118. package/dist-lib/host/websocket-proxy.cjs +1 -1
  119. package/dist-lib/index.cjs +1 -1
  120. package/dist-lib/metro.cjs +1 -1
  121. package/dist-lib/profiles.cjs +1 -1
  122. package/dist-lib/render-mode.cjs +1 -1
  123. package/dist-lib/scripts/demo-app-registry.cjs +1 -1
  124. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  125. package/dist-lib/sdk.cjs +51 -2
  126. package/dist-lib/sdk.mjs +51 -2
  127. package/dist-lib/skills.cjs +27 -13
  128. package/dist-lib/vite.cjs +1 -1
  129. package/package.json +1 -1
  130. package/src/host/fetch-proxy-handler.ts +23 -2
  131. package/src/host/fetch-proxy-overrides.ts +17 -5
  132. package/dist-cli/chunks/auto-bootstrap-CTWKEM4V.js +0 -2
  133. package/dist-cli/chunks/beta-KGUBAGXH.js +0 -2
  134. package/dist-cli/chunks/chunk-3TDPLIKL.js +0 -2
  135. package/dist-cli/chunks/chunk-N2VJC564.js +0 -1
  136. package/dist-cli/chunks/chunk-UNV6BGOP.js +0 -1
  137. package/dist-cli/chunks/chunk-ZE7W2MTD.js +0 -1
  138. package/dist-cli/chunks/cli-version-INZLODFN.js +0 -2
  139. package/dist-cli/chunks/control-MSK5L3VF.js +0 -2
  140. package/dist-cli/chunks/drivers-SYUDXJZK.js +0 -2
  141. package/dist-cli/chunks/flow-66GRPHHA.js +0 -2
  142. package/dist-cli/chunks/help-4VBCUZAR.js +0 -2
  143. package/dist-cli/chunks/install-55EDLMPA.js +0 -2
  144. package/dist-cli/chunks/runtime-SX4NL3N4.js +0 -2
  145. package/dist-cli/chunks/setup-repo-UKVZZ52B.js +0 -2
  146. package/dist-cli/chunks/store-JUR4T52G.js +0 -2
  147. package/dist-cli/chunks/telemetry-BZJQZXB2.js +0 -2
  148. package/dist-cli/chunks/upload-INJR46LD.js +0 -2
  149. package/dist-cli/chunks/web-2ZJXPNQQ.js +0 -2
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{A,B,C,D,E,F,G,H,I,J,K,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,F as activeRuntimeDir,l as activeRuntimeFile,t as cacheDir,J as claimDaemonLockfile,E as compareSemver,v as configFilePath,r as daemonAppBundlePath,q as daemonAppDir,s as daemonAppLauncherPath,u as daemonLockfilePath,m as electronDir,n as electronUserDataDir,o as electronVersionDir,A as ensureSootsimHome,H as isDaemonLockfileFresh,h as isDevWorkstation,g as isSootsimDevCheckout,D as listInstalledRuntimes,p as profilesDir,B as readActiveRuntime,G as readDaemonLockfile,w as readSharedConfig,y as readTelemetryEnabled,K as removeDaemonLockfile,k as runtimeDir,j as runtimesDir,i as shouldSkipPersistentDaemon,f as sootsimHomeDir,C as writeActiveRuntime,I as writeDaemonLockfile,x as writeSharedConfig,z as writeTelemetryEnabled};
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{A,B,C,D,E,F,G,H,I,J,K,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,F as activeRuntimeDir,l as activeRuntimeFile,t as cacheDir,J as claimDaemonLockfile,E as compareSemver,v as configFilePath,r as daemonAppBundlePath,q as daemonAppDir,s as daemonAppLauncherPath,u as daemonLockfilePath,m as electronDir,n as electronUserDataDir,o as electronVersionDir,A as ensureSootsimHome,H as isDaemonLockfileFresh,h as isDevWorkstation,g as isSootsimDevCheckout,D as listInstalledRuntimes,p as profilesDir,B as readActiveRuntime,G as readDaemonLockfile,w as readSharedConfig,y as readTelemetryEnabled,K as removeDaemonLockfile,k as runtimeDir,j as runtimesDir,i as shouldSkipPersistentDaemon,f as sootsimHomeDir,C as writeActiveRuntime,I as writeDaemonLockfile,x as writeSharedConfig,z as writeTelemetryEnabled};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as G}from"./chunk-7SSQQWXI.js";import{a as wt,b as xt}from"./chunk-HTFFTIEU.js";import{a as Ye,h as $e,k as ee}from"./chunk-JBVHVSVC.js";import{b as $t,c as St,j as vt}from"./chunk-KG3XVCAL.js";import"./chunk-XF5W3CGA.js";import{a as Z,b as A,c as P,d as Pe,e as re,f as Y,g as ce,h as pe,i as yt,j as ht,k as Re,l as bt}from"./chunk-WEGRCMET.js";import{A as mt,E as pt,G as le,H as ft,N as gt,a as be,b as Ge,c as Xe,d as Ve,e as Qe,f as Ze,g as et,h as tt,i as ot,j as st,k as _e,l as Oe,p as Ae,q as nt,r as rt,s as we,t as it,u as xe,v as at,w as lt,x as ct,y as dt,z as ut}from"./chunk-ZB2LBNNH.js";import"./chunk-E3NRRI4M.js";import{c as He,e as Ue,f as Ke,g as ze,h as Fe}from"./chunk-OULIZJPC.js";import"./chunk-QNKKUBAX.js";import"./chunk-OAZYZXMH.js";import"./chunk-ZE7W2MTD.js";import"./chunk-SKW6NBUP.js";import"./chunk-OLXRO2UE.js";import{b as qe}from"./chunk-CYKPWI35.js";import{a as Je}from"./chunk-374XJJVQ.js";import{a as Ie,c as Ne}from"./chunk-J7TYQVOU.js";import{a as We}from"./chunk-3TDPLIKL.js";import"./chunk-PINZJVS6.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import{existsSync as co,mkdirSync as uo,readFileSync as mo,rmSync as kt,writeFileSync as po}from"fs";import{tmpdir as fo}from"os";import{dirname as go,join as yo,resolve as ho}from"path";var fe=1,bo="SOOTSIM_INSPECT_NOTICE_PATH",wo=300*1e3,xo=15e3;function Tt(){return ho(process.env[bo]||yo(fo(),"sootsim-inspect-notice-state.json"))}function $o(e,c){return Object.fromEntries(Object.entries(e).filter(([,n])=>typeof n?.signature=="string"&&Number.isFinite(n?.updatedAt)&&c-n.updatedAt<=wo))}function So(e){let c=Tt();if(!co(c))return{version:fe,entries:{}};try{let n=JSON.parse(mo(c,"utf8"));return n.version!==fe||!n.entries||typeof n.entries!="object"?(kt(c,{force:!0}),{version:fe,entries:{}}):{version:fe,entries:$o(n.entries,e)}}catch{return kt(c,{force:!0}),{version:fe,entries:{}}}}function vo(e){let c=Tt();uo(go(c),{recursive:!0}),po(c,JSON.stringify(e,null,2)+`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as G}from"./chunk-4A5BPDNH.js";import{a as wt,b as xt}from"./chunk-FGMOSDCQ.js";import{a as Ye,h as $e,k as ee}from"./chunk-7YASUTHS.js";import{b as $t,c as St,j as vt}from"./chunk-JALLIXYA.js";import"./chunk-DLYAXBRT.js";import{a as Z,b as A,c as P,d as Pe,e as re,f as Y,g as ce,h as pe,i as yt,j as ht,k as Re,l as bt}from"./chunk-YYCJASBO.js";import{A as mt,E as pt,G as le,H as ft,N as gt,a as be,b as Ge,c as Xe,d as Ve,e as Qe,f as Ze,g as et,h as tt,i as ot,j as st,k as _e,l as Oe,p as Ae,q as nt,r as rt,s as we,t as it,u as xe,v as at,w as lt,x as ct,y as dt,z as ut}from"./chunk-VGCTSDGM.js";import"./chunk-LBRLBJAS.js";import{c as He,e as Ue,f as Ke,g as ze,h as Fe}from"./chunk-R35KFNWH.js";import"./chunk-RSJKAVWL.js";import"./chunk-NEXDOXJ3.js";import"./chunk-544KNXXS.js";import"./chunk-K5N6S6MK.js";import"./chunk-T77EKSH4.js";import{b as qe}from"./chunk-OHPV4WP2.js";import{a as Je}from"./chunk-MWZ2K75V.js";import{a as Ie,c as Ne}from"./chunk-MOO23TCK.js";import{a as We}from"./chunk-4TWK4GWQ.js";import"./chunk-5IYZIY67.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import{existsSync as co,mkdirSync as uo,readFileSync as mo,rmSync as kt,writeFileSync as po}from"fs";import{tmpdir as fo}from"os";import{dirname as go,join as yo,resolve as ho}from"path";var fe=1,bo="SOOTSIM_INSPECT_NOTICE_PATH",wo=300*1e3,xo=15e3;function Tt(){return ho(process.env[bo]||yo(fo(),"sootsim-inspect-notice-state.json"))}function $o(e,c){return Object.fromEntries(Object.entries(e).filter(([,n])=>typeof n?.signature=="string"&&Number.isFinite(n?.updatedAt)&&c-n.updatedAt<=wo))}function So(e){let c=Tt();if(!co(c))return{version:fe,entries:{}};try{let n=JSON.parse(mo(c,"utf8"));return n.version!==fe||!n.entries||typeof n.entries!="object"?(kt(c,{force:!0}),{version:fe,entries:{}}):{version:fe,entries:$o(n.entries,e)}}catch{return kt(c,{force:!0}),{version:fe,entries:{}}}}function vo(e){let c=Tt();uo(go(c),{recursive:!0}),po(c,JSON.stringify(e,null,2)+`
3
3
  `)}function ko(e,c){let n=c.trim()||"default";return`${e}:${n}`}function Ee(e,c,n,l={}){let m=l.nowMs??Date.now(),a=l.cooldownMs??xo,g=So(m),y=ko(e,c),T=g.entries[y];return T&&T.signature===n&&m-T.updatedAt<a?!1:(g.entries[y]={signature:n,updatedAt:m},vo(g),!0)}var To={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},Mo={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function Io(e,c={}){return{...e?To:Mo,...c}}function de(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function No(e,c){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??c??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function ge(e,c){let n=Io(!!c.agent,c.timing),l=0,m=null,a=null;try{await ee({bridge:e,maxMs:n.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let g=Date.now()+n.deadlineMs;for(;Date.now()<=g||l===0;){l++;let y=await c.resolve();if(m=y,y?.error==="bridge-not-ready"||y?.ambiguous||y?.nthOutOfRange)return{payload:y,result:null,attempts:l,failure:"special"};if(y&&typeof y.cx=="number"&&typeof y.cy=="number"){let M=await e.send({type:"tap",x:y.cx,y:y.cy,target:No(y,c.textFallback)});if(a=M,de(M))return{payload:y,result:M,attempts:l}}let T=g-Date.now();if(T<=0)break;try{await ee({bridge:e,maxMs:Math.min(T,n.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(M=>setTimeout(M,Math.min(120,T)))}}return{payload:m,result:a,attempts:l,failure:m&&typeof m.cx=="number"?"missed":"not-found"}}async function Mt(e,c,n,l){return e.send({type:"tap",x:c,y:n,...l?{target:l}:{}})}async function It(e,c,n={}){let l=JSON.stringify(c);return ge(e,{agent:n.agent,timing:n.timing,resolve:()=>e.send({type:"evaluate",code:`(async () => {
4
4
  const t = window.__sootsimTest
5
5
  if (!t) return null
@@ -205,7 +205,7 @@ import{a as G}from"./chunk-7SSQQWXI.js";import{a as wt,b as xt}from"./chunk-HTFF
205
205
  `);;)console.clear(),await V(),await Z(T);else await V()}var Fo=["SOOTSIM_AGENT","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","CURSOR_TRACE_ID","AIDER_MODEL"];function ue(){if(process.env.SOOTSIM_AGENT==="0")return!1;for(let e of Fo){let c=process.env[e];if(c&&c.trim()&&c!=="0")return!0}return!1}async function At(e){let{bridge:c,args:n,effectiveArgs:l,positional:m,inspectUsage:a}=e,g=S=>{let N=l.indexOf(S);return N>=0&&N+1<l.length?l[N+1]:null},y=S=>l.includes(S),T=g("--testid")||g("--test-id"),M=g("--role"),h=g("--type"),k=g("--text"),_=y("--pressable"),I=y("--visible"),R=y("--interactive-targets")||y("--actions"),j=!T&&!M&&!h&&!k&&!_&&!I&&!R?m[1]:null,d=k??j,z=await st(c,{testId:T,role:M,type:h,text:d,pressable:_,visible:I,interactive:R});z||(console.error(a("find","<text> | --text <t> | --testid <id> | --role <r> | --type <t> | --pressable | --visible | --interactive-targets")),process.exit(1));let{mode:B,result:D}=z,V=A(n),te=n.includes("--verbose")||n.includes("--dump");if(V)B==="interactive-targets"&&Array.isArray(D)?P(_e(D).map(S=>({...S,tap:Oe(S)}))):P(D??null);else if(Array.isArray(D))if(D.length===0){console.log(` no ${B} nodes found`);let S=await c.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()"});typeof S=="number"&&S<10&&G("app-still-loading",S)}else if(B==="interactive-targets"){let S=_e(D);console.log(` found ${S.length} interactive target${S.length===1?"":"s"} (sorted by score):`);for(let N of S.slice(0,20)){let J=N.absolutePosition?`@(${Math.round(N.absolutePosition.x)},${Math.round(N.absolutePosition.y)})`:"",W=N.layout?`${Math.round(N.layout.width)}x${Math.round(N.layout.height)}`:"?x?",X=N.text?` "${N.text.slice(0,30)}"`:"",Q=N.testID?` #${N.testID}`:"",ne=N.accessibilityLabel?` \u24D8"${String(N.accessibilityLabel).slice(0,24)}"`:"",me=N.accessibilityRole?`[${N.accessibilityRole}]`:N.type,C=Oe(N);console.log(` ${me}${X}${ne}${Q} ${W} ${J}`),console.log(` \u2192 ${C}`),te&&console.log(Ce(JSON.stringify(N,null,2)," "))}S.length>20&&console.log(` ... and ${S.length-20} more`)}else{console.log(` found ${D.length} node${D.length===1?"":"s"} (${B}):`);for(let S of D.slice(0,20)){let N=S.absolutePosition?`@(${Math.round(S.absolutePosition.x)},${Math.round(S.absolutePosition.y)})`:"",J=S.layout?`${Math.round(S.layout.width)}x${Math.round(S.layout.height)}`:"?x?",W=S.text?` "${S.text.slice(0,30)}"`:"",X=S.testID?` #${S.testID}`:"",Q=S.pressable?" (tap)":"",ne=S.accessibilityRole?`[${S.accessibilityRole}]`:S.type;console.log(` ${ne}${W}${X} ${J} ${N}${Q}`),te&&console.log(Ce(JSON.stringify(S,null,2)," "))}D.length>20&&console.log(` ... and ${D.length-20} more`)}else if(D==null)console.log(` not found: ${d||T||M||h||""||B}`),T&&G("wait-selector-for-missing-testid",T);else{let S=D;if(S.type&&S.absolutePosition){let N=`@(${Math.round(S.absolutePosition.x)},${Math.round(S.absolutePosition.y)})`,J=S.layout?`${Math.round(S.layout.width)}x${Math.round(S.layout.height)}`:"?x?",W=S.text?` "${S.text.slice(0,40)}"`:"",X=S.testID?` #${S.testID}`:"",Q=S.pressable?" (tap)":"",ne=S.accessibilityRole?`[${S.accessibilityRole}]`:S.type;console.log(` ${ne}${W}${X} ${J} ${N}${Q}`),te&&console.log(Ce(JSON.stringify(S,null,2)," "))}else console.log(JSON.stringify(D,null,2))}}function Ce(e,c){return e.split(`
206
206
  `).map(n=>c+n).join(`
207
207
  `)}async function Pt(e){let{bridge:c,args:n}=e,l=A(n);await ce(c,{verbose:!l});let m=await et(c);if(l){P({count:m.length,elements:m});return}console.log(` layout (${m.length} element${m.length===1?"":"s"}):
208
- `),console.log(tt(m))}async function Rt(e,c={}){let n=await pt(e);if("error"in n&&(console.error(n.error),process.exit(1)),c.json){console.log(JSON.stringify(n,null,2));return}let{visible:l,spec:m,mode:a,shifted:g,capsLock:y,accessoryBarId:T}=n,M=[];M.push(`keyboard: ${l?"visible":"hidden"}`),m?(M.push(` type: ${m.keyboardType}`),M.push(` returnKey: ${m.returnKeyType}`),M.push(` autoCap: ${m.autoCapitalize}`),M.push(` autoCorrect: ${m.autoCorrect?"on":"off"}`),M.push(` appearance: ${m.keyboardAppearance}`),m.secureTextEntry&&M.push(" secureTextEntry: true"),m.enablesReturnKeyAutomatically&&M.push(` return: ${m.currentTextIsEmpty?"disabled (empty)":"enabled"}`)):M.push(" spec: <none> (shown via dev-tools with no TextInput)"),M.push(` mode: ${a}${g?" (shifted)":""}${y?" (caps)":""}`),T&&M.push(` accessoryBar: ${T}`),console.log(M.join(`
208
+ `),console.log(tt(m,{styling:n.includes("--styling")}))}async function Rt(e,c={}){let n=await pt(e);if("error"in n&&(console.error(n.error),process.exit(1)),c.json){console.log(JSON.stringify(n,null,2));return}let{visible:l,spec:m,mode:a,shifted:g,capsLock:y,accessoryBarId:T}=n,M=[];M.push(`keyboard: ${l?"visible":"hidden"}`),m?(M.push(` type: ${m.keyboardType}`),M.push(` returnKey: ${m.returnKeyType}`),M.push(` autoCap: ${m.autoCapitalize}`),M.push(` autoCorrect: ${m.autoCorrect?"on":"off"}`),M.push(` appearance: ${m.keyboardAppearance}`),m.secureTextEntry&&M.push(" secureTextEntry: true"),m.enablesReturnKeyAutomatically&&M.push(` return: ${m.currentTextIsEmpty?"disabled (empty)":"enabled"}`)):M.push(" spec: <none> (shown via dev-tools with no TextInput)"),M.push(` mode: ${a}${g?" (shifted)":""}${y?" (caps)":""}`),T&&M.push(` accessoryBar: ${T}`),console.log(M.join(`
209
209
  `))}async function Et(e){let c=await e.bridge.listSims(),n=e.args.includes("--all"),l=e.args.find((y,T)=>e.args[T-1]==="--bundle"),m=e.args.find((y,T)=>e.args[T-1]==="--app-port"),a=e.args.includes("--primary"),g=c.filter(y=>!(a&&!y.isPrimary||l&&!(y.url??"").includes(l)||m&&!(y.url??"").includes(`/rn/${m}`)||!n&&!l&&!m&&!a&&!(y.url&&(y.url.includes("bundle=")||y.url.includes("/index.bundle")))&&y.id!==e.simId));if(A(e.args)){P(g.map(y=>({...y,active:y.id===e.simId})));return}vt(g,e.simId),g.length<c.length&&!A(e.args)&&console.log(` (${c.length-g.length} more hidden \u2014 pass --all to show)`)}function ie(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function Se(e,c){return c<=0?"?":`${(e/c*100).toFixed(0)}%`}async function Dt(e,c={args:[]}){let n=await gt(e);if(A(c.args)){P(n);return}if(console.log(" memory:"),n.imageLoader){let l=n.imageLoader;console.log(" image-loader cache"),console.log(` entries: ${l.cacheEntries} / ${l.cacheMaxEntries} (${Se(l.cacheEntries,l.cacheMaxEntries)})`),console.log(` pixel bytes: ${ie(l.cachePixelBytes)} / ${ie(l.cachePixelBudget)} (${Se(l.cachePixelBytes,l.cachePixelBudget)})`),console.log(` pending: ${l.pendingFetches} fetches, ${l.pendingBytes} bytes`),console.log(` failed uris: ${l.failedUris}`),console.log(` snapshots: ${l.snapshots}`),console.log(` camera frames: ${l.cameraFrames}`)}else console.log(" image-loader cache: not available (engine pre-rebuild?)");if(n.workerHeap){let l=n.workerHeap;console.log(" worker heap (chrome only)"),console.log(` used: ${ie(l.usedJSHeapSize)} / ${ie(l.jsHeapSizeLimit)} (${Se(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${ie(l.totalJSHeapSize)}`)}if(n.hostHeap){let l=n.hostHeap;console.log(" host heap (chrome only)"),console.log(` used: ${ie(l.usedJSHeapSize)} / ${ie(l.jsHeapSizeLimit)} (${Se(l.usedJSHeapSize,l.jsHeapSizeLimit)})`),console.log(` total: ${ie(l.totalJSHeapSize)}`)}}function ye(e){let c=e.indexOf("--testid");if(c>=0&&e[c+1])return{mode:"testid",value:e[c+1]};let n=e.indexOf("--test-id");if(n>=0&&e[n+1])return{mode:"testid",value:e[n+1]};let l=e.indexOf("--text");return l>=0&&e[l+1]?{mode:"text",value:e[l+1]}:null}async function ve(e,c){let n=JSON.stringify(c.value),l=c.mode==="testid"?`(await t.findByTestId(${n})) || (await t.findById(${n}))`:`await t.findByText(${n})`;return await e.send({type:"evaluate",code:`(async () => {
210
210
  const t = window.__sootsimTest
211
211
  if (!t) return null
@@ -315,7 +315,7 @@ import{a as G}from"./chunk-7SSQQWXI.js";import{a as wt,b as xt}from"./chunk-HTFF
315
315
  `);console.log(`${t??""}
316
316
 
317
317
  ${s}
318
- `),process.exit(0)}let _=m.wsPort,I=m.simId,R=m.simIdSource,j=m.commandTimeoutMs;if(g==="list"&&l.some(o=>o==="--drivers"||o==="-D")){let{buildDriverListRows:o}=await import("./drivers-SYUDXJZK.js"),t=o();console.log(` available drivers (${t.length}):
318
+ `),process.exit(0)}let _=m.wsPort,I=m.simId,R=m.simIdSource,j=m.commandTimeoutMs;if(g==="list"&&l.some(o=>o==="--drivers"||o==="-D")){let{buildDriverListRows:o}=await import("./drivers-QQJOT5IF.js"),t=o();console.log(` available drivers (${t.length}):
319
319
  `);let s=Math.max(...t.map(i=>i.id.length),6),r=Math.max(...t.map(i=>i.kind.length),4);for(let i of t){let u=i.available?"\u2713":"\u2717",p=i.id.padEnd(s),b=i.kind.padEnd(r);console.log(` ${u} ${p} ${b} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let d=Ue(m),z=I||"default",B=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),D=200;function V(o){let t=o.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(o)?.[1]?.trim(),i=/<body[^>]*>([\s\S]*?)<\//i.exec(o)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=r||i||"html error page";return`<html ${o.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return t.length<=D?t:`${t.slice(0,D)}\u2026 (+${t.length-D} more bytes)`}function te(o){let t=o.displayUrl||o.url;return o.status!=null?`${o.method} ${t} -> ${o.status}${o.statusText?` ${o.statusText}`:""}`:o.error?`${o.method} ${t} -> ${o.error}`:`${o.method} ${t}`}async function S(o){let t=ue()?5e3:1500;try{let{settled:s,elapsed:r}=await ee({bridge:o,maxMs:t,pollMs:32,stablePolls:2});s||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
320
320
  `)}catch{}}function N(o,t){console.error(` tap failed: ${o} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function J(){try{return await d.send({type:"evaluate",code:`(() => ({
321
321
  console: ${xe},
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-QDMM6U4X.js";import"./chunk-XPYODDHV.js";import"./chunk-TCYVPNQO.js";import"./chunk-R35KFNWH.js";import"./chunk-OHPV4WP2.js";import"./chunk-IGQ54SMC.js";import"./chunk-OP5XM4ED.js";import"./chunk-5IYZIY67.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as b}from"./chunk-WCJMLITZ.js";import{a as x}from"./chunk-OAZYZXMH.js";import"./chunk-KABJPUT4.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as k}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function _({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function I(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as b}from"./chunk-XPYODDHV.js";import{a as x}from"./chunk-NEXDOXJ3.js";import"./chunk-4KQKAI4R.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as k}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function _({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(A(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function I(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
3
3
  `),t=e[e.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=k(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),r=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return r.status!==0&&console.warn(` warning: failed to unmount ${t} (${r.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(n){let o=k(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(n,e),D(n),S(e,493),e}async function B(n){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",n],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),n}async function G(n){(n.includes("--help")||n.includes("-h"))&&(console.log(`
4
4
  sootsim install-desktop \u2014 download and install the optional desktop GUI
5
5
 
@@ -20,4 +20,4 @@ examples:
20
20
  `),process.exit(0));let o=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=x();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
21
21
  `);try{await _({url:t.url,dest:i,onProgress:(r,m)=>{let $=Date.now();$-d<100&&r<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0}),console.error(`
22
22
  download failed: ${r instanceof Error?r.message:String(r)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
23
- `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-BZJQZXB2.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{G as runInstallDesktop};
23
+ `);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-MZWJNMXL.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{G as runInstallDesktop};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as l,b as d,c as k,d as y,e as g}from"./chunk-DKK3CC3D.js";import{d as c}from"./chunk-H7O2EPCU.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as l,b as d,c as k,d as y,e as g}from"./chunk-OOTZNIHU.js";import{d as c}from"./chunk-OP5XM4ED.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
3
3
  created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
4
4
  secret: ${t.secret}
5
5
  `),console.log(` copy this now \u2014 we can't show it again.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-N2VJC564.js";import{b as h}from"./chunk-QNKKUBAX.js";import{a as d}from"./chunk-OAZYZXMH.js";import"./chunk-ZE7W2MTD.js";import"./chunk-SKW6NBUP.js";import"./chunk-OLXRO2UE.js";import"./chunk-CYKPWI35.js";import{A as t,B as u,F as m,G as r,H as a,h as l,i as c}from"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import{spawn as v}from"child_process";import{existsSync as w}from"fs";async function O(n){if(n.includes("--help")||n.includes("-h")){console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-TOPGPGVZ.js";import{b as h}from"./chunk-RSJKAVWL.js";import{a as d}from"./chunk-NEXDOXJ3.js";import"./chunk-544KNXXS.js";import"./chunk-K5N6S6MK.js";import"./chunk-T77EKSH4.js";import"./chunk-OHPV4WP2.js";import{A as t,B as u,F as m,G as r,H as a,h as l,i as c}from"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import{spawn as v}from"child_process";import{existsSync as w}from"fs";async function O(n){if(n.includes("--help")||n.includes("-h")){console.log(`
3
3
  sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
4
4
 
5
5
  usage:
@@ -13,4 +13,4 @@ options:
13
13
  examples:
14
14
  sootsim launch
15
15
  sootsim launch --version 1.2.3
16
- `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),s=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;t(),await x({skipAutoInstall:e,channel:s,explicitVersion:f}),await p(),await k()}async function x(n){let e=u(),i=m();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:s}=await import("./runtime-SX4NL3N4.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await s(["install",...o],{channel:n.channel})}async function p(){let n=r();if(a(n))return;if(c()){let o=l()?"this is a dev workstation (IS_TAMAGUI_DEV=1)":"this is a dev checkout";console.error(` not spawning a standalone sootsim daemon \u2014 ${o}.`),console.error(" the live `bun dev` stack hosts the bridge in-process (run it, or its electron);"),console.error(" set SOOTSIM_FORCE_DAEMON_INSTALL=1 to spawn one here on purpose."),process.exit(1)}console.log("sootsim: starting daemon");let e=g();v(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let s=Date.now()+8e3;for(;Date.now()<s;){let o=r();if(a(o))return;await D(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function k(){d()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await h.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function g(){let n=process.argv[1];return n&&w(n)?n:"sootsim"}function D(n){return new Promise(e=>setTimeout(e,n))}async function R(){t(),await p()}export{R as ensureDaemonRunning,O as runLaunch};
16
+ `);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),s=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;t(),await x({skipAutoInstall:e,channel:s,explicitVersion:f}),await p(),await k()}async function x(n){let e=u(),i=m();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:s}=await import("./runtime-ZE6YLTHF.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await s(["install",...o],{channel:n.channel})}async function p(){let n=r();if(a(n))return;if(c()){let o=l()?"this is a dev workstation (IS_TAMAGUI_DEV=1)":"this is a dev checkout";console.error(` not spawning a standalone sootsim daemon \u2014 ${o}.`),console.error(" the live `bun dev` stack hosts the bridge in-process (run it, or its electron);"),console.error(" set SOOTSIM_FORCE_DAEMON_INSTALL=1 to spawn one here on purpose."),process.exit(1)}console.log("sootsim: starting daemon");let e=g();v(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let s=Date.now()+8e3;for(;Date.now()<s;){let o=r();if(a(o))return;await D(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function k(){d()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await h.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function g(){let n=process.argv[1];return n&&w(n)?n:"sootsim"}function D(n){return new Promise(e=>setTimeout(e,n))}async function R(){t(),await p()}export{R as ensureDaemonRunning,O as runLaunch};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as g,d as m}from"./chunk-H7O2EPCU.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function L(){console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as g,d as m}from"./chunk-OP5XM4ED.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(r){if(r)return r;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function L(){console.log(`
3
3
  sootsim login \u2014 sign in so desktop uploads can attach to your account
4
4
 
5
5
  usage:
@@ -21,6 +21,6 @@ options:
21
21
  <p style="color:#ccc">${r}</p>
22
22
  </div>
23
23
  </body>
24
- </html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe")}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-BZJQZXB2.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(o=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
24
+ </html>`}async function P(r){try{let e=await fetch(`${r.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(e.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!e.ok){let c=await e.text().catch(()=>"");return{ok:!1,error:`dev-login ${e.status}: ${c}`}}let t=await e.json();return t.token?{ok:!0,token:t.token,userId:t.user?.id,email:t.email}:{ok:!1,error:"dev-login response missing token"}}catch(e){return{ok:!1,error:e instanceof Error?e.message:"dev-login fetch failed"}}}function A(r){try{let e=new URL(r).hostname.replace(/^\[|\]$/g,"").toLowerCase();return!!(e==="localhost"||/^127(?:\.\d{1,3}){3}$/.test(e)||e==="::1"||e==="0.0.0.0"||e.endsWith(".local")||e.endsWith(".localhost")||e==="host.containers.internal"||e==="host.docker.internal"||e==="host.orb.internal"||e==="host.lima.internal"||e==="fd07:b51a:cc66:f0::fe")}catch{return!1}}async function G(r){(r.includes("--help")||r.includes("-h"))&&(L(),process.exit(0));let e=[...r],t=await x(R(e,"--origin"));if(A(t)){console.log(` detected local origin (${t}) \u2014 signing in as dev user`);let o=await P(t);if(o.ok){g({token:o.token,user:o.userId?{id:o.userId,email:o.email}:null,origin:t,source:"cli"});let s=await m(t),l=s?.user?.email||o.email||s?.user?.id||o.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-MZWJNMXL.js");n({event:"cli_login_succeeded",identity:{userId:o.userId??s?.user?.id??null},properties:{origin:t,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${o.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(o=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,f=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),f){n.end(u(`sign-in failed: ${f}`)),o({ok:!1,error:f}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),o({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),o({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),o({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),o({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){o({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${t.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",t),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
25
25
  ${n.toString()}
26
- `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-BZJQZXB2.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-BZJQZXB2.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
26
+ `),T(n.toString())})});if(!i.ok){let{trackCliEvent:o,flushCliTelemetry:s}=await import("./telemetry-MZWJNMXL.js");o({event:"cli_login_failed",properties:{origin:t,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}g({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:t,source:"cli"});let d=await m(t),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-MZWJNMXL.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:t}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r,b as i}from"./chunk-AJ34QMR4.js";import{a as t,c as o}from"./chunk-H7O2EPCU.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r,b as i}from"./chunk-IGQ54SMC.js";import{a as t,c as o}from"./chunk-OP5XM4ED.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as h,c as w}from"./chunk-P4W42H4A.js";import"./chunk-WBVNZ7R3.js";import"./chunk-UNV6BGOP.js";import"./chunk-HDW4B3FW.js";import"./chunk-ZTHTQNVD.js";import"./chunk-DKK3CC3D.js";import"./chunk-JBVHVSVC.js";import"./chunk-KG3XVCAL.js";import"./chunk-XF5W3CGA.js";import"./chunk-WEGRCMET.js";import"./chunk-ZB2LBNNH.js";import"./chunk-E3NRRI4M.js";import"./chunk-OULIZJPC.js";import"./chunk-QNKKUBAX.js";import"./chunk-OAZYZXMH.js";import"./chunk-ZE7W2MTD.js";import"./chunk-SKW6NBUP.js";import"./chunk-OLXRO2UE.js";import"./chunk-CYKPWI35.js";import"./chunk-AJ34QMR4.js";import"./chunk-H7O2EPCU.js";import"./chunk-DTHD7QGU.js";import"./chunk-3TDPLIKL.js";import"./chunk-PINZJVS6.js";import"./chunk-TT5RWL45.js";import"./chunk-X33P2PIG.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as h,c as w}from"./chunk-7NG5U6NK.js";import"./chunk-XRIPNBCE.js";import"./chunk-HKKCAEKK.js";import"./chunk-SK4G3KBR.js";import"./chunk-BIWTU6Y6.js";import"./chunk-OOTZNIHU.js";import"./chunk-7YASUTHS.js";import"./chunk-JALLIXYA.js";import"./chunk-DLYAXBRT.js";import"./chunk-YYCJASBO.js";import"./chunk-VGCTSDGM.js";import"./chunk-LBRLBJAS.js";import"./chunk-R35KFNWH.js";import"./chunk-RSJKAVWL.js";import"./chunk-NEXDOXJ3.js";import"./chunk-544KNXXS.js";import"./chunk-K5N6S6MK.js";import"./chunk-T77EKSH4.js";import"./chunk-OHPV4WP2.js";import"./chunk-IGQ54SMC.js";import"./chunk-OP5XM4ED.js";import"./chunk-DRHDI7V4.js";import"./chunk-4TWK4GWQ.js";import"./chunk-5IYZIY67.js";import"./chunk-3QB2RIJ3.js";import"./chunk-6YFOOGMX.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import*as i from"fs";import*as l from"path";var v=[".maestro","maestro"];function x(){console.log(`
3
3
  sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-KABJPUT4.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-4KQKAI4R.js";import{resolve as c,dirname as m}from"path";import{fileURLToPath as a}from"url";var t=m(a(import.meta.resolve("sootsim-engine/package.json")));async function g(o,r){(o.includes("--help")||o.includes("-h"))&&(console.log(`
3
3
  sootsim preview \u2014 production-like preview
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as s,c as i,d as t,e as n,f as c}from"./chunk-SKW6NBUP.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";function f(){console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as s,c as i,d as t,e as n,f as c}from"./chunk-K5N6S6MK.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";function f(){console.log(`
3
3
  sootsim profile \u2014 manage isolated storage profiles
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as w,e as b,h as m,i as f}from"./chunk-OULIZJPC.js";import"./chunk-CYKPWI35.js";import"./chunk-PINZJVS6.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";function h(){console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as w,e as b,h as m,i as f}from"./chunk-R35KFNWH.js";import"./chunk-OHPV4WP2.js";import"./chunk-5IYZIY67.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";function h(){console.log(`
3
3
  sootsim react \u2014 inspect React component render cost in the tenant worker
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P}from"./chunk-HDW4B3FW.js";import"./chunk-ZTHTQNVD.js";import{d as Z,f as ee}from"./chunk-DKK3CC3D.js";import"./chunk-E3NRRI4M.js";import{c as b,e as v,f as Y}from"./chunk-OULIZJPC.js";import"./chunk-ZE7W2MTD.js";import{d as X}from"./chunk-OLXRO2UE.js";import{b as Q}from"./chunk-CYKPWI35.js";import"./chunk-AJ34QMR4.js";import"./chunk-H7O2EPCU.js";import"./chunk-PINZJVS6.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import{existsSync as we,mkdirSync as B,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as D,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=3e4;async function W(e,r,o,i){let t=Math.max(2e4,i+Re);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P}from"./chunk-SK4G3KBR.js";import"./chunk-BIWTU6Y6.js";import{d as Z,f as ee}from"./chunk-OOTZNIHU.js";import"./chunk-LBRLBJAS.js";import{c as b,e as v,f as Y}from"./chunk-R35KFNWH.js";import"./chunk-544KNXXS.js";import{d as X}from"./chunk-T77EKSH4.js";import{b as Q}from"./chunk-OHPV4WP2.js";import"./chunk-IGQ54SMC.js";import"./chunk-OP5XM4ED.js";import"./chunk-5IYZIY67.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import{existsSync as we,mkdirSync as B,readdirSync as he,readFileSync as be,rmSync as J,writeFileSync as I}from"fs";import{homedir as ve,tmpdir as ye}from"os";import{dirname as D,extname as oe,join as N,resolve as Se}from"path";var z=24e4,Re=3e4;async function W(e,r,o,i){let t=Math.max(2e4,i+Re);try{return await e.send({type:"evaluate",code:r},{timeoutMs:t})}catch(n){let s=n instanceof Error?n.message:String(n);/^command timed out after \d+s$/.test(s)&&(console.error(` ${o} stalled \u2014 the render host did not finish within ${Math.round(t/1e3)}s; it is likely contended or wedged.
3
3
  the capture lock auto-releases, so simply retry the recording.
4
4
  if it persists, recover the sim with \`sootsim close --sim <id>\`.`),process.exit(1)),/render host not available|already streaming|already recording/i.test(s)&&(console.error(` ${o} failed: ${s}
5
5
  a prior recording was abandoned and its capture is still
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b}from"./chunk-PBYFOCRO.js";import"./chunk-R35KFNWH.js";import"./chunk-OHPV4WP2.js";import"./chunk-5IYZIY67.js";import"./chunk-H6WPFY4K.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";export{b as formatReleaseEntry,a as runRuntime};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-YKUW3QNP.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,n as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as fetchRuntimeReleases,l as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,k as resolveRuntimeVersion,f as runtimeManifestUrl,i as runtimeReleasesUrl,g as runtimeTarballUrl,m as updateRuntimeToLatest};
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-H6WPFY4K.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";export{a as DEFAULT_RUNTIME_CDN_ORIGIN,b as RUNTIME_CDN_ORIGIN_ENV,c as RUNTIME_CHANNEL_ENV,n as checkRuntimeUpToDate,h as fetchRuntimeManifest,j as fetchRuntimeReleases,l as installRuntime,d as resolveRuntimeCdnOrigin,e as resolveRuntimeChannel,k as resolveRuntimeVersion,f as runtimeManifestUrl,i as runtimeReleasesUrl,g as runtimeTarballUrl,m as updateRuntimeToLatest};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as S}from"./chunk-WBVNZ7R3.js";import"./chunk-UNV6BGOP.js";import{a as b}from"./chunk-HTFFTIEU.js";import{c as g,d as w,e as y,f as v,h as x}from"./chunk-OULIZJPC.js";import"./chunk-CYKPWI35.js";import"./chunk-DTHD7QGU.js";import"./chunk-PINZJVS6.js";import"./chunk-TT5RWL45.js";import{f as m}from"./chunk-X33P2PIG.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import{mkdirSync as A,writeFileSync as R}from"fs";import{dirname as E,resolve as F}from"path";async function J(t,o){let e=U(t);(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as S}from"./chunk-XRIPNBCE.js";import"./chunk-HKKCAEKK.js";import{a as b}from"./chunk-FGMOSDCQ.js";import{c as g,d as w,e as y,f as v,h as x}from"./chunk-R35KFNWH.js";import"./chunk-OHPV4WP2.js";import"./chunk-DRHDI7V4.js";import"./chunk-5IYZIY67.js";import"./chunk-3QB2RIJ3.js";import{f as m}from"./chunk-6YFOOGMX.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import{mkdirSync as A,writeFileSync as R}from"fs";import{dirname as E,resolve as F}from"path";async function J(t,o){let e=U(t);(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim screenshot \u2014 capture the canvas as a PNG
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as o}from"./chunk-TGMTCNZ2.js";import"./chunk-OULIZJPC.js";import"./chunk-CYKPWI35.js";import"./chunk-PINZJVS6.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as o}from"./chunk-6YKC2PAW.js";import"./chunk-R35KFNWH.js";import"./chunk-OHPV4WP2.js";import"./chunk-5IYZIY67.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";async function n(e,s){(e.includes("--help")||e.includes("-h"))&&(console.log(`
3
3
  sootsim screenshot-mode \u2014 toggle the screenshot-mode chrome overlay
4
4
 
5
5
  usage:
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.128 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{b as Y}from"./chunk-P4W42H4A.js";import{b as j}from"./chunk-WBVNZ7R3.js";import"./chunk-UNV6BGOP.js";import"./chunk-HDW4B3FW.js";import"./chunk-ZTHTQNVD.js";import"./chunk-DKK3CC3D.js";import{b as O}from"./chunk-JBVHVSVC.js";import"./chunk-KG3XVCAL.js";import"./chunk-XF5W3CGA.js";import"./chunk-WEGRCMET.js";import"./chunk-ZB2LBNNH.js";import"./chunk-E3NRRI4M.js";import"./chunk-OULIZJPC.js";import"./chunk-QNKKUBAX.js";import"./chunk-OAZYZXMH.js";import"./chunk-ZE7W2MTD.js";import"./chunk-SKW6NBUP.js";import"./chunk-OLXRO2UE.js";import"./chunk-CYKPWI35.js";import"./chunk-AJ34QMR4.js";import"./chunk-H7O2EPCU.js";import"./chunk-DTHD7QGU.js";import"./chunk-3TDPLIKL.js";import"./chunk-PINZJVS6.js";import"./chunk-TT5RWL45.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-X33P2PIG.js";import"./chunk-KBW2VI34.js";import"./chunk-KABJPUT4.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";case"straight":default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
1
+ /*! sootsim v0.1.130 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{b as Y}from"./chunk-7NG5U6NK.js";import{b as j}from"./chunk-XRIPNBCE.js";import"./chunk-HKKCAEKK.js";import"./chunk-SK4G3KBR.js";import"./chunk-BIWTU6Y6.js";import"./chunk-OOTZNIHU.js";import{b as O}from"./chunk-7YASUTHS.js";import"./chunk-JALLIXYA.js";import"./chunk-DLYAXBRT.js";import"./chunk-YYCJASBO.js";import"./chunk-VGCTSDGM.js";import"./chunk-LBRLBJAS.js";import"./chunk-R35KFNWH.js";import"./chunk-RSJKAVWL.js";import"./chunk-NEXDOXJ3.js";import"./chunk-544KNXXS.js";import"./chunk-K5N6S6MK.js";import"./chunk-T77EKSH4.js";import"./chunk-OHPV4WP2.js";import"./chunk-IGQ54SMC.js";import"./chunk-OP5XM4ED.js";import"./chunk-DRHDI7V4.js";import"./chunk-4TWK4GWQ.js";import"./chunk-5IYZIY67.js";import"./chunk-3QB2RIJ3.js";import{a as w,b as D,c as k,d as z,e as x,f as T}from"./chunk-6YFOOGMX.js";import"./chunk-5QO3N7MG.js";import"./chunk-4KQKAI4R.js";import{mkdirSync as B,readFileSync as pe,writeFileSync as G}from"fs";import{tmpdir as je}from"os";import C from"path";import{mkdirSync as I,readFileSync as Q,writeFileSync as H}from"fs";import F from"path";function _(e){return e.replace(/\\/g,"/").replace(/\.png$/i,"").trim().split("/").filter(Boolean).join("--").replace(/[^A-Za-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"slide"}function v(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}function ee(e){let t=e.trim();return/^#[0-9a-f]{3}$/i.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t}function M(e,t){let o=ee(e),i=Math.max(0,Math.min(1,t)),n=o.match(/^#([0-9a-f]{6})$/i);if(n){let s=n[1],r=Number.parseInt(s.slice(0,2),16),a=Number.parseInt(s.slice(2,4),16),u=Number.parseInt(s.slice(4,6),16);return`rgba(${r}, ${a}, ${u}, ${i})`}return o.startsWith("rgb(")?o.replace(/^rgb\((.+)\)$/i,`rgba($1, ${i})`):o}function te(e){if(e.type==="solid")return e.color||"#000000";let t=e.direction??180,o=e.stops?.map(i=>`${i.color} ${i.offset}%`).join(", ")||"#000000 0%, #111111 100%";return`linear-gradient(${t}deg, ${o})`}function re(e){let t=e.glow;return t?`radial-gradient(circle at 50% 24%, ${M(t,.46)} 0%, ${M(t,.2)} 24%, rgba(0,0,0,0) 62%)`:"none"}function A(e){switch(e){case"tilted-left":return"perspective(2400px) rotateY(10deg) rotateZ(-2deg)";case"tilted-right":return"perspective(2400px) rotateY(-10deg) rotateZ(2deg)";case"cut-bottom":return"translateY(10%) scale(1.08)";case"cut-top":return"translateY(-16%) scale(1.08)";case"straight":default:return"none"}}function L(...e){let t=e.map(o=>o.trim()).filter(o=>o.length>0&&o!=="none");return t.length>0?t.join(" "):"none"}function E(e){let t=M(e.color,e.opacity),o=M(e.color,e.opacity*.52);return`drop-shadow(0 34px ${e.spread}px ${o}) drop-shadow(0 0 ${e.blur}px ${t})`}function R(e,t){return!t.glow||e.color&&e.color!==w.color?e:{...e,color:t.glow}}function oe(e,t){if(e==="editorial-left"){let n=Math.round(t.height*.056),s=Math.round(t.height*.022);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.12)}px`,`left:${Math.round(t.width*.085)}px`,`width:${Math.round(t.width*.42)}px`,"text-align:left","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.92;`,subStyle:`font-size:${s}px;line-height:1.36;max-width:${Math.round(t.width*.36)}px;`,eyebrowStyle:"align-items:flex-start;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.68*(a.scale??r.scale)),l=Math.round(t.height*(.03+r.offsetY+(a.offsetY??0))),c=a.pose||r.pose||"tilted-right",m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.18)+l}px`,`left:${Math.round(t.width*.56)}px`,`width:${p}px`,"transform-origin:center center",`transform:${A(c)}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}if(e==="minimal-bottom"){let n=Math.round(t.height*.041),s=Math.round(t.height*.019);return{copyStyle:["position:absolute",`left:${Math.round(t.width*.12)}px`,`right:${Math.round(t.width*.12)}px`,`bottom:${Math.round(t.height*.085)}px`,"text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${n}px;line-height:0.96;`,subStyle:`font-size:${s}px;line-height:1.34;max-width:${Math.round(t.width*.56)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(r,a,u)=>{let p=Math.round(t.width*.84*(a.scale??r.scale)),l=Math.round(t.height*(r.offsetY+(a.offsetY??0))),c=a.pose||r.pose,m=R(r.shadow,u);return["position:absolute",`top:${Math.round(t.height*.075)+l}px`,"left:50%",`width:${p}px`,"transform-origin:center center",`transform:${L("translateX(-50%)",A(c))}`,`filter:${E(m)}`,"z-index:2"].join(";")}}}let o=Math.round(t.height*.04),i=Math.round(t.height*.019);return{copyStyle:["position:absolute",`top:${Math.round(t.height*.084)}px`,"left:50%",`width:${Math.round(t.width*.88)}px`,"transform:translateX(-50%)","text-align:center","z-index:3"].join(";"),titleStyle:`font-size:${o}px;line-height:0.92;`,subStyle:`font-size:${i}px;line-height:1.34;max-width:${Math.round(t.width*.6)}px;margin:0 auto;`,eyebrowStyle:"align-items:center;",deviceStyle:(n,s,r)=>{let a=t.name==="ipad-13"?.54:.64,u=Math.round(t.width*a*(s.scale??n.scale)),p=Math.round(t.height*(n.offsetY+(s.offsetY??0))),l=s.pose||n.pose,c=R(n.shadow,r);return["position:absolute",`top:${Math.round(t.height*(t.name==="ipad-13"?.25:.28))+p}px`,"left:50%",`width:${u}px`,"transform-origin:center top",`transform:${L("translateX(-50%)",A(l))}`,`filter:${E(c)}`,"z-index:2"].join(";")}}}function ne({canvas:e,compose:t,slide:o,imageDataUrl:i}){let n=o.background??t.background,s=oe(t.text.preset,e),r=t.text.preset!=="none"&&!!(o.eyebrow||o.headline||o.subheadline),a=s.deviceStyle(t.frame,o,n),u=o.headline?`<div style="font-weight:780;white-space:pre-line;text-wrap:balance;${s.titleStyle}">${v(o.headline)}</div>`:"",p=o.subheadline?`<div style="margin-top:${Math.round(e.height*.018)}px;color:${t.text.subColor};white-space:pre-line;text-wrap:balance;${s.subStyle}">${v(o.subheadline)}</div>`:"",l=o.eyebrow?`<div style="display:flex;${s.eyebrowStyle}margin-bottom:${Math.round(e.height*.016)}px;"><div style="font-size:${Math.round(e.height*.014)}px;font-weight:700;letter-spacing:0.18em;text-transform:uppercase;color:${t.text.eyebrowColor};">${v(o.eyebrow)}</div></div>`:"";return`<!doctype html>
3
3
  <html>
4
4
  <head>
5
5
  <meta charset="utf-8" />