peachsim 0.1.2489 → 0.1.2491

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 (145) hide show
  1. package/cli/bridge-flow-runner.ts +190 -167
  2. package/cli/cloud-client.ts +7 -2
  3. package/cli/commands/control.ts +36 -26
  4. package/cli/commands/inspect/settling.ts +7 -2
  5. package/cli/commands/kotlin.ts +2 -0
  6. package/cli/commands/swift.ts +3 -0
  7. package/cli/native-input.ts +2 -0
  8. package/dist-lib/agent-daemon-client.cjs +1 -1
  9. package/dist-lib/agent-events.cjs +1 -1
  10. package/dist-lib/attached-projects.cjs +1 -1
  11. package/dist-lib/auth/shared-session.cjs +1 -1
  12. package/dist-lib/backend-origin.cjs +1 -1
  13. package/dist-lib/beta.cjs +1 -1
  14. package/dist-lib/beta.mjs +2 -2
  15. package/dist-lib/bridge-constants.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.cjs +1 -1
  17. package/dist-lib/bridge-contract-input.mjs +5 -5
  18. package/dist-lib/bridge-contract.cjs +1 -1
  19. package/dist-lib/bridge-contract.mjs +3 -3
  20. package/dist-lib/bundle-channel.cjs +3 -3
  21. package/dist-lib/capture-contract.cjs +1 -1
  22. package/dist-lib/capture-contract.mjs +3 -3
  23. package/dist-lib/cloud-contract.cjs +1 -1
  24. package/dist-lib/cloud-contract.mjs +3 -3
  25. package/dist-lib/cloud-test-args.cjs +1 -1
  26. package/dist-lib/cloud-test-args.mjs +2 -2
  27. package/dist-lib/cloud.cjs +1 -1
  28. package/dist-lib/cloud.mjs +7 -7
  29. package/dist-lib/config.cjs +1 -1
  30. package/dist-lib/config.mjs +5 -5
  31. package/dist-lib/detox/index.cjs +8 -3
  32. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  33. package/dist-lib/esm-chunks/{acorn-46P725QB.mjs → acorn-2J725R5I.mjs} +3 -3
  34. package/dist-lib/esm-chunks/{chunk-PWLDSFLP.mjs → chunk-2HK4H7ZI.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-NN6KHA6F.mjs → chunk-6VR25SPG.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-T53UQ6V7.mjs → chunk-6XNOBDYY.mjs} +3 -3
  37. package/dist-lib/esm-chunks/{chunk-K3NXHJBV.mjs → chunk-7VU3MCJG.mjs} +12 -12
  38. package/dist-lib/esm-chunks/{chunk-FXOLLJ7N.mjs → chunk-7WLZ4NHN.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-CB2MREW2.mjs → chunk-AQZG62OH.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-FNFDX5OA.mjs → chunk-EIM3TPVZ.mjs} +2 -2
  41. package/dist-lib/esm-chunks/{chunk-QR4AFBNL.mjs → chunk-EMQ3TSAN.mjs} +5 -5
  42. package/dist-lib/esm-chunks/{chunk-KFJJOPLU.mjs → chunk-EN5F4P2G.mjs} +5 -5
  43. package/dist-lib/esm-chunks/{chunk-G4KFSINI.mjs → chunk-EZBJ5J3I.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-MOGXM5NJ.mjs → chunk-FX5ONYBN.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-HO4COZOG.mjs → chunk-GNJLEHNW.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-ST7BG6HB.mjs → chunk-GQJ6AWTA.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-5F5TV3M5.mjs → chunk-GV6SJTHZ.mjs} +4 -4
  48. package/dist-lib/esm-chunks/{chunk-ZGCWGHEX.mjs → chunk-IUJGRRA5.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-E7Z6E4VM.mjs → chunk-KYB5R7DP.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-XYRP56S5.mjs → chunk-MAHSHPSW.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-2ZAKSUG3.mjs → chunk-NLX75NDQ.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{chunk-75IXYYPA.mjs → chunk-NPNMSHHT.mjs} +1 -1
  53. package/dist-lib/esm-chunks/{chunk-FMR76G4M.mjs → chunk-PE74RKR2.mjs} +1 -1
  54. package/dist-lib/esm-chunks/{chunk-YH2VVDO2.mjs → chunk-Z2NSJMVJ.mjs} +1 -1
  55. package/dist-lib/esm-chunks/{metro-layout-parser-FPL6XENQ.mjs → metro-layout-parser-G37VWZEJ.mjs} +3 -3
  56. package/dist-lib/esm-chunks/{swift-package-prebuilt-FYUAWFYO.mjs → swift-package-prebuilt-SEN55VIB.mjs} +10 -10
  57. package/dist-lib/esm-chunks/{swift-sdk-app-module-RVHNFMEY.mjs → swift-sdk-app-module-UK4USPH3.mjs} +13 -13
  58. package/dist-lib/esm-chunks/{swift-sdk-image-JHQ6DP5G.mjs → swift-sdk-image-IBWK7WQH.mjs} +13 -13
  59. package/dist-lib/esm-chunks/{swift-sdk-image-producer-XQ5W4ONP.mjs → swift-sdk-image-producer-NLZJWZSK.mjs} +4 -4
  60. package/dist-lib/expo-swift-bundle.cjs +2 -2
  61. package/dist-lib/expo-swift-metadata.cjs +1 -1
  62. package/dist-lib/expo-swift-metadata.mjs +7 -7
  63. package/dist-lib/home-paths.cjs +1 -1
  64. package/dist-lib/host/bridge-host.cjs +31 -8
  65. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  66. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  67. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  68. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  69. package/dist-lib/host/websocket-proxy.cjs +1 -1
  70. package/dist-lib/index.cjs +11 -5
  71. package/dist-lib/kotlin-host.cjs +1 -1
  72. package/dist-lib/menu.cjs +1 -1
  73. package/dist-lib/menu.mjs +3 -3
  74. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  75. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  76. package/dist-lib/metro-production-bundle.cjs +1 -1
  77. package/dist-lib/metro-production-bundle.mjs +4 -4
  78. package/dist-lib/native-app-identity-project.cjs +1 -1
  79. package/dist-lib/native-app-identity-project.mjs +15 -15
  80. package/dist-lib/native-app-identity.cjs +1 -1
  81. package/dist-lib/native-app-identity.mjs +6 -6
  82. package/dist-lib/native-firebase-metadata.cjs +1 -1
  83. package/dist-lib/native-firebase-metadata.mjs +3 -3
  84. package/dist-lib/pdfium-raster.cjs +1 -1
  85. package/dist-lib/pdfium-raster.mjs +2 -2
  86. package/dist-lib/plist.cjs +1 -1
  87. package/dist-lib/plist.mjs +3 -3
  88. package/dist-lib/profiles.cjs +1 -1
  89. package/dist-lib/public-brand.cjs +1 -1
  90. package/dist-lib/public-origins-lib-esm.json +79 -79
  91. package/dist-lib/public-origins-lib.json +69 -69
  92. package/dist-lib/react-native-host-modules.cjs +1 -1
  93. package/dist-lib/react-native-host-modules.mjs +2 -2
  94. package/dist-lib/reap-browser.cjs +1 -1
  95. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  96. package/dist-lib/sdk.cjs +8 -3
  97. package/dist-lib/sdk.mjs +14 -9
  98. package/dist-lib/skills.cjs +223 -208
  99. package/dist-lib/swift-compile.cjs +1 -1
  100. package/dist-lib/swift-compile.mjs +10 -10
  101. package/dist-lib/swift-package.cjs +1 -1
  102. package/dist-lib/swift-package.mjs +3 -3
  103. package/dist-lib/swift-submit.cjs +1 -1
  104. package/dist-lib/swift-submit.mjs +5 -5
  105. package/dist-lib/swift-svg-raster.cjs +1 -1
  106. package/dist-lib/swift-svg-raster.mjs +2 -2
  107. package/dist-lib/swift-toolchain.cjs +1 -1
  108. package/dist-lib/swift.cjs +1 -1
  109. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  110. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  111. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  112. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  113. package/dist-lib/vendor/acorn.cjs +1 -1
  114. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  115. package/dist-lib/vendor/ignore.cjs +1 -1
  116. package/dist-lib/vendor/magic-string.cjs +1 -1
  117. package/dist-lib/vendor/plist.cjs +1 -1
  118. package/dist-lib/vendor/smol-toml.cjs +1 -1
  119. package/dist-lib/vendor/stream-json.cjs +1 -1
  120. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  121. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  122. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  123. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  124. package/dist-lib/vendor/sucrase.cjs +1 -1
  125. package/dist-lib/vendor/terser.cjs +1 -1
  126. package/dist-lib/vendor/valibot.cjs +1 -1
  127. package/dist-lib/vendor/ws.cjs +1 -1
  128. package/dist-lib/vendor/zod.cjs +1 -1
  129. package/dist-lib/worklet-executable.cjs +1 -1
  130. package/dist-lib/worklet-executable.mjs +3 -3
  131. package/dist-types/packages/peach-engine/src/render-worker/auxPointerContract.d.ts +4 -0
  132. package/dist-types/packages/peach-engine/src/render-worker/host.d.ts +187 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/live-frame-to-shell.d.ts +2 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +10 -10
  135. package/dist-types/packages/peach-engine/src/render-worker/render-host-ref.d.ts +14 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/surface-ownerContract.d.ts +2 -0
  137. package/dist-types/packages/peach-globals/src/index.d.ts +2 -2
  138. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  139. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +13 -1
  140. package/package.json +1 -1
  141. package/src/bridge-contract.ts +2 -17
  142. package/src/connect.ts +1 -1
  143. package/src/swift-host.ts +11 -2
  144. package/src/swift-sdk-later-data.ts +21 -4
  145. package/src/swift-startup-split.ts +6 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2489 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2491 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -35508,7 +35508,7 @@ var init_swift_standin_digest = __esm({
35508
35508
 
35509
35509
  // src/expo-native-compiler-digest.ts
35510
35510
  function expoNativeCompilerDigestValue() {
35511
- return true ? "ecafe9dff251decb45af7e610bd212d9ce7e82092d88a9781627d952631dc0b0" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35511
+ return true ? "5ecccf2b494fb8b3c2cf21811592de3c3ec410e9cae0e92acb330c9e1365b32d" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35512
35512
  }
35513
35513
  var import_node_crypto12;
35514
35514
  var init_expo_native_compiler_digest = __esm({
@@ -117969,10 +117969,16 @@ function readSdkPieces(directory2) {
117969
117969
  edgeSources[i] = edges[i * 2];
117970
117970
  edgeTargets[i] = edges[i * 2 + 1];
117971
117971
  }
117972
+ const recordSymbol = manifest.strings.indexOf("__peach_sdk_records");
117973
+ const recordIndex = recordSymbol < 0 ? -1 : block2("pieceSymbols").indexOf(recordSymbol);
117974
+ const records = order.find(
117975
+ (field2) => fields[field2 + 5] <= recordIndex && recordIndex < fields[field2 + 5] + fields[field2 + 6]
117976
+ );
117972
117977
  const result = {
117973
117978
  starts,
117974
117979
  ends,
117975
117980
  walked,
117981
+ swiftRecordsAddress: records === void 0 ? void 0 : fields[records],
117976
117982
  edgeSources,
117977
117983
  edgeTargets,
117978
117984
  functionSlots: block2("functionSlots").slice(),
@@ -118159,9 +118165,16 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
118159
118165
  for (const value of decoded.values)
118160
118166
  if (value >= 0n && value < 2n ** 32n) seed(Number(value));
118161
118167
  for (let i = 0; i < decoded.memory.length; i += 3) seed(decoded.memory[i]);
118162
- for (const { address, bytes } of runs)
118168
+ for (const { address, bytes } of runs) {
118169
+ if (address === pieces.swiftRecordsAddress) {
118170
+ seed(address);
118171
+ const records = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
118172
+ for (let offset = 9 * 4; offset < records.byteLength; offset += 4)
118173
+ seed((records.getUint32(offset, true) & ~3) >>> 0);
118174
+ }
118163
118175
  for (let piece = firstAtOrAfter(pieces.ends, address + 1); piece < pieces.starts.length && pieces.starts[piece] < address + bytes.length; piece++)
118164
118176
  if (pieces.walked[piece] || !groups[piece]) seeds.push(piece);
118177
+ }
118165
118178
  closeOverData(pieces, eager, seeds);
118166
118179
  const now = [];
118167
118180
  const deferred = /* @__PURE__ */ new Map();
@@ -120053,7 +120066,8 @@ async function splitSwiftApp(bytes, launch2) {
120053
120066
  const parent = (0, import_node_path131.join)(swiftCacheDir(), "swift-projects", launch2.artifactHash, "artifact");
120054
120067
  const environment = launch2.environment.length ? `-${digest2(Buffer.from(JSON.stringify(launch2.environment)))}` : "";
120055
120068
  const guest = launch2.guest ? `-${digest2(Buffer.from(launch2.guest.source))}` : "";
120056
- const cache = (0, import_node_path131.join)(parent, `startup-v7-${platform}${environment}${guest}`);
120069
+ const args = launch2.arguments?.length ? `-argv-${digest2(Buffer.from(JSON.stringify(launch2.arguments)))}` : "";
120070
+ const cache = (0, import_node_path131.join)(parent, `startup-v7-${platform}${environment}${guest}${args}`);
120057
120071
  return readSwiftStartupImage(cache) ?? await withStartupWork(bytes, async (work) => {
120058
120072
  const profile = (0, import_node_path131.join)(work.directory, "startup.profile");
120059
120073
  await profileStartup(work, launch2, "url", profile);
@@ -120278,6 +120292,7 @@ async function bootSwiftPreview(launch2, profile) {
120278
120292
  compositorBackend: "ganesh"
120279
120293
  }).toString();
120280
120294
  for (const entry of launch2.environment) url.searchParams.append("env", entry);
120295
+ for (const arg of launch2.arguments ?? []) url.searchParams.append("arg", arg);
120281
120296
  const page = await browser.newPage();
120282
120297
  const launchErrors = [];
120283
120298
  page.on(
@@ -122974,7 +122989,7 @@ async function swiftPackageWatchFiles(packagePath, moduleRoot) {
122974
122989
  ...moduleRoot ? swiftModuleInputFiles(moduleRoot).map((file) => import_node_path132.default.join(moduleRoot, file)) : []
122975
122990
  ]);
122976
122991
  }
122977
- async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origin, hosted, signal, startupEnvironment = [], startupRuntimeUrl, startupGuest) {
122992
+ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origin, hosted, signal, startupEnvironment = [], startupRuntimeUrl, startupGuest, startupArguments = []) {
122978
122993
  packagePath = import_node_fs132.default.realpathSync(packagePath);
122979
122994
  const project2 = projectFor(packagePath, hosted, signal);
122980
122995
  const limits = inputLimits(Boolean(project2.hosted));
@@ -123079,6 +123094,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
123079
123094
  (profileOrigin) => metadata(profileOrigin, artifact),
123080
123095
  {
123081
123096
  environment: startupEnvironment,
123097
+ arguments: startupArguments,
123082
123098
  guest: startupGuest
123083
123099
  },
123084
123100
  startupRuntimeUrl
@@ -123104,7 +123120,8 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
123104
123120
  const key2 = JSON.stringify([
123105
123121
  startupEnvironment,
123106
123122
  startupRuntimeUrl?.origin,
123107
- startupGuest
123123
+ startupGuest,
123124
+ startupArguments
123108
123125
  ]);
123109
123126
  let startup = profiles2.get(key2);
123110
123127
  if (!startup) {
@@ -123117,6 +123134,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
123117
123134
  runtimeRoot,
123118
123135
  artifactHash: artifact.hash,
123119
123136
  environment: startupEnvironment,
123137
+ arguments: startupArguments,
123120
123138
  guest: startupGuest,
123121
123139
  metadata: (profileOrigin) => metadata(profileOrigin, artifact, sdkDigest),
123122
123140
  serveAsset: serveSwiftPackageAsset
@@ -123183,7 +123201,12 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
123183
123201
  function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, runtimeRootOverride) {
123184
123202
  const { key: key2 } = sdk2;
123185
123203
  const app = (0, import_node_crypto79.createHash)("sha256").update(
123186
- JSON.stringify([packagePath, launch2.environment, runtimeRootOverride?.origin])
123204
+ JSON.stringify([
123205
+ packagePath,
123206
+ launch2.environment,
123207
+ runtimeRootOverride?.origin,
123208
+ ...launch2.arguments?.length ? [launch2.arguments] : []
123209
+ ])
123187
123210
  ).update(launch2.guest?.source ?? "").digest("hex").slice(0, 16);
123188
123211
  const cacheKey = `${key2}/${app}`;
123189
123212
  const cached5 = sdkStartups.get(cacheKey);
@@ -141384,7 +141407,7 @@ var init_nitro_superset = __esm({
141384
141407
  init_nitroContract();
141385
141408
  init_swift_standin_digest();
141386
141409
  NITRO_SUPERSET_ENTRY_NAME = "superset";
141387
- NITRO_COMPILER_DIGEST = true ? "f84323d638f6444cfb056b1f53a800c9bd57365b9dd3defc1240e748208970b8" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141410
+ NITRO_COMPILER_DIGEST = true ? "097fb16a90d75a58d72e248c50ca50ffc19e408ef55dd189995ea63ac6f66dbb" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141388
141411
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
141389
141412
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
141390
141413
  published3 = /* @__PURE__ */ new Map();
@@ -147216,6 +147239,7 @@ async function deleteRemoteSim(options2) {
147216
147239
  return { simId: parsed2.simId, status: parsed2.status };
147217
147240
  }
147218
147241
  function resolveCloudSessionForParsed(parsed2) {
147242
+ if (parsed2.explicitPort) return null;
147219
147243
  const session = readCloudSession();
147220
147244
  if (!session) return null;
147221
147245
  if (session.service === "box") {
@@ -175255,7 +175279,8 @@ async function prepareSwiftInput(input, opts = {}) {
175255
175279
  opts.signal,
175256
175280
  opts.startupEnvironment,
175257
175281
  opts.startupRuntimeUrl,
175258
- { packageName: name3, source: guestSource }
175282
+ { packageName: name3, source: guestSource },
175283
+ opts.startupArguments
175259
175284
  );
175260
175285
  return { guestSource, metadata };
175261
175286
  },
@@ -175639,7 +175664,8 @@ async function runKotlin(args, opts = {}) {
175639
175664
  port: opts.port,
175640
175665
  resources,
175641
175666
  signal: controller.signal,
175642
- ownerPid: process.pid
175667
+ ownerPid: process.pid,
175668
+ launchArguments: opts.launchArguments
175643
175669
  }
175644
175670
  );
175645
175671
  code = await waitForGuestCompletion(resources, controller.signal, "Kotlin app");
@@ -175785,6 +175811,7 @@ async function runSwift(args, opts = {}) {
175785
175811
  hosted: hosted ?? void 0,
175786
175812
  signal: controller.signal,
175787
175813
  startupEnvironment: opts.startupEnvironment,
175814
+ startupArguments: opts.launchArguments,
175788
175815
  startupRuntimeUrl: baseUrl ? new URL(baseUrl) : void 0
175789
175816
  });
175790
175817
  const { host: host2, module: module2, appInfo } = prepared;
@@ -176003,7 +176030,8 @@ async function runSwift(args, opts = {}) {
176003
176030
  port: opts.port,
176004
176031
  resources,
176005
176032
  signal: controller.signal,
176006
- ownerPid: process.pid
176033
+ ownerPid: process.pid,
176034
+ launchArguments: opts.launchArguments
176007
176035
  }
176008
176036
  );
176009
176037
  code = await waitForGuestCompletion(resources, controller.signal, "Swift preview");
@@ -177004,20 +177032,6 @@ async function runOpenCommand(args, opts = {}) {
177004
177032
  }
177005
177033
  }
177006
177034
  async function openSim(args, opts) {
177007
- const binary2 = args.find((arg) => !arg.startsWith("-") && isAppBinaryPath(arg));
177008
- if (binary2) {
177009
- try {
177010
- const { bundlePath, platform: platform3 } = extractAppBinaryBundle(binary2);
177011
- args = args.map((arg) => arg === binary2 ? bundlePath : arg);
177012
- if (platform3 === "android" && !args.includes("--device") && !args.includes("-d"))
177013
- args = [...args, "--device", "pixel-8"];
177014
- } catch (error) {
177015
- console.error(
177016
- ` peach open: ${error instanceof Error ? error.message : String(error)}`
177017
- );
177018
- peachExit(1);
177019
- }
177020
- }
177021
177035
  const openArgOptions = {
177022
177036
  stripBooleanFlags: [
177023
177037
  "--new",
@@ -177071,9 +177085,22 @@ async function openSim(args, opts) {
177071
177085
  const booleanFlags = new Set(openArgOptions.stripBooleanFlags);
177072
177086
  const valueFlags = new Set(openArgOptions.stripValueFlags);
177073
177087
  const bridgeValueFlags = new Set(BRIDGE_VALUE_FLAGS);
177088
+ const launchArgs = [...opts.launchArguments ?? []];
177089
+ const launchArgIndices = /* @__PURE__ */ new Set();
177074
177090
  for (let i = 0; i < args.length; i++) {
177075
177091
  const arg = args[i];
177076
177092
  if (arg === "--") break;
177093
+ if (arg === "--arg") {
177094
+ const value = args[i + 1];
177095
+ if (value === void 0) {
177096
+ console.error(" peach open: --arg expects a value");
177097
+ peachExit(1);
177098
+ }
177099
+ launchArgs.push(value);
177100
+ launchArgIndices.add(i);
177101
+ launchArgIndices.add(++i);
177102
+ continue;
177103
+ }
177077
177104
  if (valueFlags.has(arg) || bridgeValueFlags.has(arg)) {
177078
177105
  i++;
177079
177106
  continue;
@@ -177093,6 +177120,21 @@ async function openSim(args, opts) {
177093
177120
  peachExit(1);
177094
177121
  }
177095
177122
  }
177123
+ if (launchArgIndices.size) args = args.filter((_, index) => !launchArgIndices.has(index));
177124
+ const binary2 = args.find((arg) => !arg.startsWith("-") && isAppBinaryPath(arg));
177125
+ if (binary2) {
177126
+ try {
177127
+ const { bundlePath, platform: platform3 } = extractAppBinaryBundle(binary2);
177128
+ args = args.map((arg) => arg === binary2 ? bundlePath : arg);
177129
+ if (platform3 === "android" && !args.includes("--device") && !args.includes("-d"))
177130
+ args = [...args, "--device", "pixel-8"];
177131
+ } catch (error) {
177132
+ console.error(
177133
+ ` peach open: ${error instanceof Error ? error.message : String(error)}`
177134
+ );
177135
+ peachExit(1);
177136
+ }
177137
+ }
177096
177138
  const parsed2 = parseBridgeCliArgs(args, {
177097
177139
  ...openArgOptions,
177098
177140
  port: opts.port,
@@ -177205,10 +177247,15 @@ async function openSim(args, opts) {
177205
177247
  ...settingsToArgs(settings),
177206
177248
  ...opts.stream ? [(await Promise.resolve().then(() => (init_stream(), stream_exports))).STREAM_FLAG] : []
177207
177249
  ];
177208
- const code = nativeInput.kind === "kotlin" ? await (await Promise.resolve().then(() => (init_kotlin(), kotlin_exports))).runKotlin(nativeArgs, { port: opts.port, openArgs: previewArgs }) : await (await Promise.resolve().then(() => (init_swift2(), swift_exports))).runSwift(nativeArgs, {
177250
+ const code = nativeInput.kind === "kotlin" ? await (await Promise.resolve().then(() => (init_kotlin(), kotlin_exports))).runKotlin(nativeArgs, {
177209
177251
  port: opts.port,
177210
177252
  openArgs: previewArgs,
177211
- startupEnvironment: envArgs
177253
+ launchArguments: launchArgs
177254
+ }) : await (await Promise.resolve().then(() => (init_swift2(), swift_exports))).runSwift(nativeArgs, {
177255
+ port: opts.port,
177256
+ openArgs: previewArgs,
177257
+ startupEnvironment: envArgs,
177258
+ launchArguments: launchArgs
177212
177259
  });
177213
177260
  if (code) peachExit(code);
177214
177261
  return;
@@ -177432,11 +177479,6 @@ async function openSim(args, opts) {
177432
177479
  );
177433
177480
  peachExit(1);
177434
177481
  }
177435
- const launchArgs = args.flatMap((arg, i) => args[i - 1] === "--arg" ? [arg] : []);
177436
- if (args.at(-1) === "--arg") {
177437
- console.error(" peach open: --arg expects a value");
177438
- peachExit(1);
177439
- }
177440
177482
  const viewportArg = args.find((_, i) => args[i - 1] === "--viewport");
177441
177483
  const viewportMatch = viewportArg ? /^(\d+)x(\d+)$/.exec(viewportArg) : null;
177442
177484
  if (viewportArg && !viewportMatch) {
@@ -178633,7 +178675,9 @@ function renderActivityIdleScript({
178633
178675
  }
178634
178676
  const blockers = []
178635
178677
  const stats = await Promise.race([
178636
- Promise.resolve().then(() => host?.queryStats(false)).catch(() => null),
178678
+ Promise.resolve()
178679
+ .then(() => host?.queryReadinessStats ? host.queryReadinessStats() : host?.queryStats(false))
178680
+ .catch(() => null),
178637
178681
  new Promise((resolve) => setTimeout(() => resolve(null), 500)),
178638
178682
  ])
178639
178683
  if (stats) {
@@ -178789,7 +178833,10 @@ async function waitForSootsimIdle({
178789
178833
  const motionRead = strict || screenStill
178790
178834
  ? answer(() => globalThis.__sootsimTest?.listAnimations?.()).catch(() => null)
178791
178835
  : null
178792
- const statsRead = answer(() => globalThis.__sootsimRenderHost?.queryStats?.(false)).catch(() => null)
178836
+ const host = globalThis.__sootsimRenderHost
178837
+ const statsRead = answer(() =>
178838
+ host?.queryReadinessStats ? host.queryReadinessStats() : host?.queryStats?.(false)
178839
+ ).catch(() => null)
178793
178840
  // image preparation ends in the tenant before the compositor decodes
178794
178841
  // and realizes its pixels. both owners must finish before settling.
178795
178842
  // the compositor rejects a stats request it is too busy to answer.
@@ -180532,178 +180579,145 @@ var init_bridge_flow_runner = __esm({
180532
180579
  // (match scoped to a container). a nested selector resolves the same way,
180533
180580
  // and a relative filter holds when ANY match of its anchor satisfies it.
180534
180581
  async findElementScoped(opts, preferHittable = false) {
180535
- const screen = await this.screenBounds();
180536
- const candidates = await this.evaluate(`(async () => {
180537
- const test = globalThis.__sootsimTest
180538
- if (!test || !test.queryAll) return null
180539
- const selector = ${JSON.stringify(opts)}
180540
- const compile = ${maestroSelectorMatcher.toString()}
180541
- // relative filters need their anchors too; other id selectors only
180542
- // project matching nodes, retaining every duplicate for ordering below.
180543
- // patterns accepting an absent id also need unidentified nodes.
180544
- const idMatcher = selector.id == null ? null : compile(selector.id, 'id')
180545
- const needsAnchors = ['childOf', 'below', 'above', 'leftOf', 'rightOf']
180546
- .some((key) => selector[key] != null)
180547
- const query = idMatcher && !idMatcher(null) && !needsAnchors
180548
- ? { idPattern: { source: idMatcher.source, flags: idMatcher.flags, matchLastSegment: true } }
180549
- : {}
180550
- const all = ((await test.queryAll(query)) || []).filter(
180551
- (n) => n && n.absolutePosition && n.layout,
180552
- )
180553
- // maestro reads ios frames as integer edges (AXElement.boundsString)
180554
- const bounds = (n) => {
180555
- const left = Math.trunc(n.absolutePosition.x)
180556
- const top = Math.trunc(n.absolutePosition.y)
180557
- return {
180558
- x: left,
180559
- y: top,
180560
- width: Math.trunc(n.absolutePosition.x + n.layout.width) - left,
180561
- height: Math.trunc(n.absolutePosition.y + n.layout.height) - top,
180562
- }
180563
- }
180564
- const painted = (n) => (n.visibleFrame?.area ?? 0) > 0
180565
- // one viewport contract, shared with isOffscreen in
180566
- // commands/inspect/resolve-target.ts: a center on the edge still takes
180567
- // a tap, so the edge counts as on screen here too.
180568
- const centerOnScreen = (n) => {
180569
- const cx = n.absolutePosition.x + n.layout.width / 2
180570
- const cy = n.absolutePosition.y + n.layout.height / 2
180571
- return cx >= 0 && cx <= ${screen.width} && cy >= 0 && cy <= ${screen.height}
180572
- }
180573
- const byPosition = (a, b) =>
180574
- a.absolutePosition.y - b.absolutePosition.y ||
180575
- a.absolutePosition.x - b.absolutePosition.x
180576
- const relative = {
180577
- below: (n, other) => bounds(n).y > bounds(other).y,
180578
- above: (n, other) => bounds(n).y < bounds(other).y,
180579
- leftOf: (n, other) => bounds(n).x < bounds(other).x,
180580
- rightOf: (n, other) => bounds(n).x > bounds(other).x,
180581
- }
180582
- const traitFilters = {
180583
- TEXT: (n) => n.text != null,
180584
- SQUARE: (n) => {
180585
- const b = bounds(n)
180586
- return Math.abs(1 - b.width / b.height) < 0.03
180587
- },
180588
- LONG_TEXT: (n) => (n.text?.length ?? 0) > 200,
180589
- }
180590
- const matchAll = (raw) => {
180591
- const sel = typeof raw === 'string' ? { text: raw } : raw
180592
- const matchesId = sel.id == null ? null : compile(sel.id, 'id')
180593
- const matchesText = sel.text == null ? null : compile(sel.text, 'text')
180594
- let candidates = all.filter((n) =>
180595
- (!matchesId || matchesId(n.testID)) &&
180596
- (!matchesText || matchesText(n.text) || matchesText(n.accessibilityLabel) || matchesText(n.placeholder)),
180597
- )
180598
- if (sel.width != null || sel.height != null) {
180599
- const tolerance = sel.tolerance ?? 0
180600
- candidates = candidates.filter((n) => {
180601
- const b = bounds(n)
180602
- return (sel.width == null || Math.abs(b.width - sel.width) <= tolerance) &&
180603
- (sel.height == null || Math.abs(b.height - sel.height) <= tolerance)
180604
- })
180605
- }
180606
- for (const trait of sel.traits ? String(sel.traits).split(' ') : []) {
180607
- const filter = traitFilters[trait.replaceAll('-', '_').toUpperCase()]
180608
- if (!filter) throw new Error('unknown selector trait: ' + trait)
180609
- candidates = candidates.filter(filter)
180610
- }
180611
- // ios reports isEnabled / isSelected from the accessibility traits
180612
- // react native derives from accessibilityState
180613
- if (sel.enabled != null) {
180614
- candidates = candidates.filter((n) => !n.accessibilityState?.disabled === sel.enabled)
180615
- }
180616
- if (sel.selected != null) {
180617
- candidates = candidates.filter((n) => !!n.accessibilityState?.selected === sel.selected)
180618
- }
180619
- // maestro's ios checked: a switch whose value is "1". react native
180620
- // gives the switch role that trait and reports "1" from
180621
- // accessibilityState.checked; a checkbox role gets no trait, so ios
180622
- // never reads it as checked.
180623
- if (sel.checked != null) {
180624
- candidates = candidates.filter(
180625
- (n) =>
180626
- (n.accessibilityRole === 'switch' && n.accessibilityState?.checked === true) ===
180627
- sel.checked,
180628
- )
180629
- }
180630
- for (const key of Object.keys(relative)) {
180631
- if (sel[key] == null) continue
180632
- const anchors = pick(matchAll(sel[key]), sel[key].index)
180633
- candidates = candidates.filter((n) => anchors.some((other) => relative[key](n, other)))
180634
- }
180635
- // scope before visibility: childOf narrows the match set first, so a
180636
- // clipped sliver inside the container survives to resolve (and refuse
180637
- // honestly) instead of being discarded for a hittable duplicate the
180638
- // scope then removes.
180639
- if (sel.childOf) {
180640
- const containers = matchAll(sel.childOf)
180641
- const container = containers.find(painted) ?? containers[0]
180642
- if (!container) return []
180643
- const x0 = container.absolutePosition.x
180644
- const y0 = container.absolutePosition.y
180645
- const x1 = x0 + container.layout.width
180646
- const y1 = y0 + container.layout.height
180647
- candidates = candidates.filter((n) => {
180648
- const cx = n.absolutePosition.x + n.layout.width / 2
180649
- const cy = n.absolutePosition.y + n.layout.height / 2
180650
- return cx >= x0 && cx <= x1 && cy >= y0 && cy <= y1
180651
- })
180652
- }
180653
- // prefer painted matches, then on-screen ones (findByTestId's
180654
- // visible-first behavior); only fall back to off-screen ones when
180655
- // nothing is on-screen, so index: still resolves a target that needs
180656
- // scrolling into view. a screen still mounted under the one on top
180657
- // paints nothing, and maestro's hierarchy never holds it.
180658
- const onScreen = candidates.filter(centerOnScreen)
180659
- // without an explicit index, prefer a painted match whose center is
180660
- // on screen: a painted sliver with its center off screen cannot take
180661
- // a tap at its center, so a duplicate id resolves to the hittable
180662
- // match. an explicit index keeps the full painted order, and a
180663
- // clipped-only match still resolves so the tap reports honestly.
180664
- const paintedCandidates = candidates.filter(painted)
180665
- if (paintedCandidates.length > 0) {
180666
- if (sel.index == null) {
180667
- const hittable = paintedCandidates.filter(centerOnScreen)
180668
- candidates = hittable.length > 0 ? hittable : paintedCandidates
180669
- } else {
180670
- candidates = paintedCandidates
180671
- }
180672
- } else if (onScreen.length > 0) candidates = onScreen
180673
- // maestro's index: sorts matches by frame y, then x, and without an
180674
- // index takes the first in the ios hierarchy, which lays siblings out
180675
- // by position rather than subview order (RAN on ios 27: two views with
180676
- // one identifier, the first subview moved below by a transform, maestro
180677
- // takes the upper one). a list that renders rows in key order and
180678
- // places them by transform still resolves its top row.
180679
- candidates.sort(byPosition)
180680
- if (sel.index == null && sel.text && !sel.id) {
180681
- candidates.sort((a, b) => (a.text || '').length - (b.text || '').length)
180682
- }
180683
- return candidates
180684
- }
180685
- // maestro Filters.index: a negative index counts from the end
180686
- const pick = (candidates, rawIndex) => {
180687
- if (rawIndex == null) return candidates
180688
- const index = Math.trunc(Number(rawIndex))
180689
- const resolved = index >= 0 ? index : candidates.length + index
180690
- return candidates[resolved] ? [candidates[resolved]] : []
180691
- }
180692
- const matches = pick(matchAll(selector), selector.index)
180693
- const nodes = ${JSON.stringify(preferHittable && opts.index == null)} ? matches : matches.slice(0, 1)
180694
- return nodes.map((node) => ({
180695
- nodeId: typeof node.nodeId === 'number' ? node.nodeId : null,
180696
- id: node.id || null,
180697
- testID: node.testID || null,
180698
- text: node.text || null,
180699
- absolutePosition: node.absolutePosition,
180700
- layout: node.layout,
180701
- // authoritative visibility, as in findElement above.
180702
- visibleFrame: node.visibleFrame || null,
180703
- isTextInput: !!node.isTextInput,
180704
- }))
180705
- })()`);
180706
- if (!candidates?.length) return null;
180582
+ const relativeKeys = ["below", "above", "leftOf", "rightOf"];
180583
+ const needsAnchors = opts.childOf != null || relativeKeys.some((key2) => opts[key2] != null);
180584
+ const recordQuery = this.bridge.send({
180585
+ type: "query",
180586
+ simId: this.opts.simId,
180587
+ query: { kind: "nodes", id: needsAnchors ? void 0 : opts.id }
180588
+ });
180589
+ const [screen, result] = await Promise.all([this.screenBounds(), recordQuery]);
180590
+ const all = result.records;
180591
+ if (!Array.isArray(all)) throw new Error("engine returned no selector node records");
180592
+ const bounds = (n) => {
180593
+ const left = Math.trunc(n.absolutePosition.x);
180594
+ const top = Math.trunc(n.absolutePosition.y);
180595
+ return {
180596
+ x: left,
180597
+ y: top,
180598
+ width: Math.trunc(n.absolutePosition.x + n.layout.width) - left,
180599
+ height: Math.trunc(n.absolutePosition.y + n.layout.height) - top
180600
+ };
180601
+ };
180602
+ const painted = (n) => (n.visibleFrame?.area ?? 0) > 0;
180603
+ const centerOnScreen = (n) => {
180604
+ const cx = n.absolutePosition.x + n.layout.width / 2;
180605
+ const cy = n.absolutePosition.y + n.layout.height / 2;
180606
+ return cx >= 0 && cx <= screen.width && cy >= 0 && cy <= screen.height;
180607
+ };
180608
+ const byPosition = (a, b) => a.absolutePosition.y - b.absolutePosition.y || a.absolutePosition.x - b.absolutePosition.x;
180609
+ const relative6 = {
180610
+ below: (n, other) => bounds(n).y > bounds(other).y,
180611
+ above: (n, other) => bounds(n).y < bounds(other).y,
180612
+ leftOf: (n, other) => bounds(n).x < bounds(other).x,
180613
+ rightOf: (n, other) => bounds(n).x > bounds(other).x
180614
+ };
180615
+ const traitFilters = /* @__PURE__ */ new Map([
180616
+ ["TEXT", (node) => node.text != null],
180617
+ [
180618
+ "SQUARE",
180619
+ (node) => {
180620
+ const frame = bounds(node);
180621
+ return Math.abs(1 - frame.width / frame.height) < 0.03;
180622
+ }
180623
+ ],
180624
+ ["LONG_TEXT", (node) => (node.text?.length ?? 0) > 200]
180625
+ ]);
180626
+ const matchAll = (raw2) => {
180627
+ const sel = typeof raw2 === "string" ? { text: raw2 } : raw2;
180628
+ const matchesId = sel.id == null ? null : maestroSelectorMatcher(sel.id, "id");
180629
+ const matchesText = sel.text == null ? null : maestroSelectorMatcher(sel.text, "text");
180630
+ let candidates2 = all.filter(
180631
+ (n) => (!matchesId || matchesId(n.testID)) && (!matchesText || matchesText(n.text) || matchesText(n.accessibilityLabel) || matchesText(n.placeholder))
180632
+ );
180633
+ if (sel.width != null || sel.height != null) {
180634
+ const tolerance = sel.tolerance ?? 0;
180635
+ candidates2 = candidates2.filter((n) => {
180636
+ const b = bounds(n);
180637
+ return (sel.width == null || Math.abs(b.width - sel.width) <= tolerance) && (sel.height == null || Math.abs(b.height - sel.height) <= tolerance);
180638
+ });
180639
+ }
180640
+ for (const trait of sel.traits ? String(sel.traits).split(" ") : []) {
180641
+ const filter = traitFilters.get(trait.replaceAll("-", "_").toUpperCase());
180642
+ if (!filter) throw new Error("unknown selector trait: " + trait);
180643
+ candidates2 = candidates2.filter(filter);
180644
+ }
180645
+ if (sel.enabled != null) {
180646
+ candidates2 = candidates2.filter(
180647
+ (n) => !n.accessibilityState?.disabled === sel.enabled
180648
+ );
180649
+ }
180650
+ if (sel.selected != null) {
180651
+ candidates2 = candidates2.filter(
180652
+ (n) => !!n.accessibilityState?.selected === sel.selected
180653
+ );
180654
+ }
180655
+ if (sel.checked != null) {
180656
+ candidates2 = candidates2.filter(
180657
+ (n) => (n.accessibilityRole === "switch" && n.accessibilityState?.checked === true) === sel.checked
180658
+ );
180659
+ }
180660
+ for (const key2 of relativeKeys) {
180661
+ const anchor = sel[key2];
180662
+ if (anchor == null) continue;
180663
+ const anchors = pick2(
180664
+ matchAll(anchor),
180665
+ typeof anchor === "string" ? void 0 : anchor.index
180666
+ );
180667
+ candidates2 = candidates2.filter(
180668
+ (n) => anchors.some((other) => relative6[key2](n, other))
180669
+ );
180670
+ }
180671
+ if (sel.childOf) {
180672
+ const containers = matchAll(sel.childOf);
180673
+ const container = containers.find(painted) ?? containers[0];
180674
+ if (!container) return [];
180675
+ const x0 = container.absolutePosition.x;
180676
+ const y0 = container.absolutePosition.y;
180677
+ const x1 = x0 + container.layout.width;
180678
+ const y1 = y0 + container.layout.height;
180679
+ candidates2 = candidates2.filter((n) => {
180680
+ const cx = n.absolutePosition.x + n.layout.width / 2;
180681
+ const cy = n.absolutePosition.y + n.layout.height / 2;
180682
+ return cx >= x0 && cx <= x1 && cy >= y0 && cy <= y1;
180683
+ });
180684
+ }
180685
+ const onScreen = candidates2.filter(centerOnScreen);
180686
+ const paintedCandidates = candidates2.filter(painted);
180687
+ if (paintedCandidates.length > 0) {
180688
+ if (sel.index == null) {
180689
+ const hittable = paintedCandidates.filter(centerOnScreen);
180690
+ candidates2 = hittable.length > 0 ? hittable : paintedCandidates;
180691
+ } else {
180692
+ candidates2 = paintedCandidates;
180693
+ }
180694
+ } else if (onScreen.length > 0) candidates2 = onScreen;
180695
+ candidates2.sort(byPosition);
180696
+ if (sel.index == null && sel.text && !sel.id) {
180697
+ candidates2.sort((a, b) => (a.text || "").length - (b.text || "").length);
180698
+ }
180699
+ return candidates2;
180700
+ };
180701
+ const pick2 = (candidates2, rawIndex) => {
180702
+ if (rawIndex == null) return candidates2;
180703
+ const index = Math.trunc(Number(rawIndex));
180704
+ const resolved = index >= 0 ? index : candidates2.length + index;
180705
+ return candidates2[resolved] ? [candidates2[resolved]] : [];
180706
+ };
180707
+ const matches = pick2(matchAll(opts), opts.index);
180708
+ const nodes = preferHittable && opts.index == null ? matches : matches.slice(0, 1);
180709
+ const candidates = nodes.map((node) => ({
180710
+ nodeId: typeof node.nodeId === "number" ? node.nodeId : null,
180711
+ id: node.id || null,
180712
+ testID: node.testID || null,
180713
+ text: node.text || null,
180714
+ absolutePosition: node.absolutePosition,
180715
+ layout: node.layout,
180716
+ // authoritative visibility, as in findElement above.
180717
+ visibleFrame: node.visibleFrame || null,
180718
+ isTextInput: !!node.isTextInput
180719
+ }));
180720
+ if (!candidates.length) return null;
180707
180721
  return preferHittable && opts.index == null ? this.preferHittableCandidate(candidates) : candidates[0];
180708
180722
  }
180709
180723
  async preferHittableCandidate(candidates) {
@@ -180974,13 +180988,14 @@ var init_bridge_flow_runner = __esm({
180974
180988
  const element = await this.findElement(opts);
180975
180989
  if (!element) return false;
180976
180990
  const frame = element.visibleFrame;
180977
- const usable = !!frame && Number.isFinite(frame.width) && Number.isFinite(frame.height) && Number.isFinite(frame.area);
180991
+ const area = frame?.area;
180992
+ const usable = !!frame && Number.isFinite(frame.width) && Number.isFinite(frame.height) && typeof area === "number" && Number.isFinite(area);
180978
180993
  if (!usable) {
180979
180994
  throw new Error(
180980
180995
  `authoritative visibility unavailable for ${JSON.stringify(opts)}: the engine returned visibleFrame ${JSON.stringify(frame ?? null)}`
180981
180996
  );
180982
180997
  }
180983
- return frame.width > 0 && frame.height > 0 && frame.area > 0;
180998
+ return frame.width > 0 && frame.height > 0 && area > 0;
180984
180999
  }
180985
181000
  async inputText(text7) {
180986
181001
  if (!await this.waitForFocusedTextInput()) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2489 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2491 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;