peachsim 0.1.2605 → 0.1.2607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/cli/commands/package.ts +71 -39
  2. package/cli/commands/perf-native.ts +259 -6
  3. package/cli/commands/shell-url.ts +1 -0
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +2 -2
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +5 -5
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +3 -3
  16. package/dist-lib/bundle-channel.cjs +1520 -932
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +3 -3
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +3 -3
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +2 -2
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +7 -7
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +5 -5
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/esm-chunks/{acorn-UNOYFUKI.mjs → acorn-KFWXYMX5.mjs} +3 -3
  30. package/dist-lib/esm-chunks/{chunk-WSRPZF7M.mjs → chunk-6JPUMAC2.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-M4G5YUO7.mjs → chunk-6NDABMDX.mjs} +3 -3
  32. package/dist-lib/esm-chunks/{chunk-GT54N3GG.mjs → chunk-7SKDPTZN.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-FXONOT2L.mjs → chunk-ACAXWH62.mjs} +1 -1
  34. package/dist-lib/esm-chunks/chunk-ARYRQJUB.mjs +326 -0
  35. package/dist-lib/esm-chunks/{chunk-WB2EBX5Q.mjs → chunk-BNAXRY5Q.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-AST6VA7D.mjs → chunk-CA64UUHF.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-B54SPDLA.mjs → chunk-DBW62F4N.mjs} +3 -2
  38. package/dist-lib/esm-chunks/{chunk-7K33ENH6.mjs → chunk-ESS2CG5G.mjs} +5 -5
  39. package/dist-lib/esm-chunks/{chunk-LFN7VAPB.mjs → chunk-IGSLOAPL.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-RJCM34J7.mjs → chunk-KIIALACX.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-YO756PYQ.mjs → chunk-LJZ373SO.mjs} +819 -681
  42. package/dist-lib/esm-chunks/{chunk-VRQPEROV.mjs → chunk-M4ORY3NH.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-3XUIDCBF.mjs → chunk-MBWWOGI5.mjs} +4 -4
  44. package/dist-lib/esm-chunks/{chunk-M3V4F5OV.mjs → chunk-O5BPZVLB.mjs} +5 -5
  45. package/dist-lib/esm-chunks/chunk-P5Q5QCTP.mjs +32 -0
  46. package/dist-lib/esm-chunks/{chunk-O55DZ2EL.mjs → chunk-QJUAWJDB.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-HHS4A7GI.mjs → chunk-RIDXKGBZ.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-LG76KUUO.mjs → chunk-TD2DBEKQ.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-AYHTHFG4.mjs → chunk-UTSB5CDG.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-UPUOCALX.mjs → chunk-WMWOBH7E.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-6TE7WLSF.mjs → chunk-ZNGLVJYL.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-YRBZCLVD.mjs → metro-layout-parser-UY3B6VGU.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-S7KR6TKE.mjs → swift-package-prebuilt-HDHPWS44.mjs} +10 -10
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-3JNA7PCB.mjs → swift-sdk-app-module-U6G5RZV2.mjs} +14 -14
  55. package/dist-lib/esm-chunks/{swift-sdk-image-3P4IUP2A.mjs → swift-sdk-image-PVDA2MVM.mjs} +14 -14
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-EA2RYBM4.mjs → swift-sdk-image-producer-YHPS3KNR.mjs} +4 -4
  57. package/dist-lib/expo-swift-bundle.cjs +1519 -931
  58. package/dist-lib/expo-swift-metadata.cjs +1 -1
  59. package/dist-lib/expo-swift-metadata.mjs +7 -7
  60. package/dist-lib/home-paths.cjs +1 -1
  61. package/dist-lib/host/bridge-host.cjs +1677 -947
  62. package/dist-lib/host/fetch-proxy-handler.cjs +44 -37
  63. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  64. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  65. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  66. package/dist-lib/host/websocket-proxy.cjs +1 -1
  67. package/dist-lib/index.cjs +1 -1
  68. package/dist-lib/kotlin-host.cjs +1 -1
  69. package/dist-lib/menu.cjs +1 -1
  70. package/dist-lib/menu.mjs +3 -3
  71. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  72. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  73. package/dist-lib/metro-production-bundle.cjs +1 -1
  74. package/dist-lib/metro-production-bundle.mjs +4 -4
  75. package/dist-lib/native-app-identity-project.cjs +540 -247
  76. package/dist-lib/native-app-identity-project.mjs +218 -1828
  77. package/dist-lib/native-app-identity.cjs +1 -1
  78. package/dist-lib/native-app-identity.mjs +6 -6
  79. package/dist-lib/native-firebase-metadata.cjs +1 -1
  80. package/dist-lib/native-firebase-metadata.mjs +3 -3
  81. package/dist-lib/pdfium-raster.cjs +1 -1
  82. package/dist-lib/pdfium-raster.mjs +2 -2
  83. package/dist-lib/plist.cjs +327 -15
  84. package/dist-lib/plist.mjs +13 -5
  85. package/dist-lib/profiles.cjs +1 -1
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +82 -129
  88. package/dist-lib/public-origins-lib.json +69 -140
  89. package/dist-lib/react-native-host-modules.cjs +1 -1
  90. package/dist-lib/react-native-host-modules.mjs +2 -2
  91. package/dist-lib/reap-browser.cjs +1 -1
  92. package/dist-lib/scripts/dev-server-scanner.cjs +211 -3
  93. package/dist-lib/sdk.cjs +1 -1
  94. package/dist-lib/sdk.mjs +8 -8
  95. package/dist-lib/skills.cjs +1693 -963
  96. package/dist-lib/swift-compile.cjs +812 -673
  97. package/dist-lib/swift-compile.mjs +10 -10
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +3 -3
  100. package/dist-lib/swift-submit.cjs +1 -1
  101. package/dist-lib/swift-submit.mjs +6 -6
  102. package/dist-lib/swift-svg-raster.cjs +1 -1
  103. package/dist-lib/swift-svg-raster.mjs +2 -2
  104. package/dist-lib/swift-toolchain.cjs +3 -2
  105. package/dist-lib/swift.cjs +1 -1
  106. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  108. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  109. package/dist-lib/vendor/acorn.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/stream-json.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase.cjs +1 -1
  117. package/dist-lib/vendor/terser.cjs +1 -1
  118. package/dist-lib/vendor/valibot.cjs +1 -1
  119. package/dist-lib/vendor/ws.cjs +1 -1
  120. package/dist-lib/vendor/zod.cjs +1 -1
  121. package/dist-lib/worklet-executable.cjs +1 -1
  122. package/dist-lib/worklet-executable.mjs +3 -3
  123. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +38 -2
  124. package/dist-types/packages/peach-globals/src/canvasAgentContract.d.ts +8 -0
  125. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  126. package/package.json +1 -6
  127. package/src/agent-prompt.ts +5 -1
  128. package/src/bazel-project.ts +1 -1
  129. package/src/expo-native-prebuilt.ts +1 -1
  130. package/src/expo-workspace-exclusion.ts +1 -1
  131. package/src/gitignore.ts +175 -0
  132. package/src/intent-definition/plist-reader.ts +22 -168
  133. package/src/one-native-controls-package.ts +143 -1
  134. package/src/oneNativeControlsContract.ts +1 -0
  135. package/src/plist-bytes.ts +144 -2
  136. package/src/plist.ts +359 -2
  137. package/src/swift-compile-budget.ts +28 -7
  138. package/src/swift-compile.ts +972 -809
  139. package/src/swift-guest-compile.ts +3 -0
  140. package/src/swift-toolchain.ts +4 -1
  141. package/src/xcode-project.ts +1 -1
  142. package/dist-lib/esm-chunks/chunk-OW4VRQKO.mjs +0 -10993
  143. package/dist-lib/esm-chunks/chunk-ZSHGFGW7.mjs +0 -65
  144. package/dist-lib/vendor/@xmldom/xmldom.cjs +0 -6481
  145. package/dist-lib/vendor/bplist-parser.cjs +0 -1589
  146. package/dist-lib/vendor/ignore.cjs +0 -455
  147. package/dist-lib/vendor/plist.cjs +0 -10978
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2605 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2607 | (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;
@@ -120,7 +120,8 @@ function registerSwiftHostCompiler(release, pin2) {
120
120
  }
121
121
  function swiftToolchainBin(release) {
122
122
  if (process.platform === "darwin") {
123
- const dirs = [import_node_os.default.homedir(), "/"].map(
123
+ const bases = [.../* @__PURE__ */ new Set([import_node_os.default.homedir(), import_node_path3.default.dirname(peachHome()), "/"])];
124
+ const dirs = bases.map(
124
125
  (base) => import_node_path3.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
125
126
  );
126
127
  const found = dirs.find((dir) => import_node_fs3.default.existsSync(import_node_path3.default.join(dir, "swift")));
@@ -2111,7 +2112,7 @@ var init_swift_compile = __esm({
2111
2112
  };
2112
2113
  OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
2113
2114
  NON_IOS_MODULES = /* @__PURE__ */ new Set(["FoundationNetworking", "WASILibc"]);
2114
- compilerSourceDigest = true ? "6fbcbab3535da2f464a19f4d3c1db8a7e4b393927e5158477332f4cc978cc22f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
2115
+ compilerSourceDigest = true ? "203439fc20df8d328b0c245496fc6db90092265409adb61b593725e82ce837de" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
2115
2116
  NOT_ON_IOS = new RegExp(
2116
2117
  `\\b(?:os\\(\\s*WASI\\s*\\)|canImport\\(\\s*(?:${[...NON_IOS_MODULES].join("|")})\\s*\\))`,
2117
2118
  "g"
@@ -2159,6 +2160,7 @@ var init_swift_compile = __esm({
2159
2160
  rootLocks = host[ROOT_LOCKS] ??= /* @__PURE__ */ new Map();
2160
2161
  SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
2161
2162
  frameworkProductsReceiptSchema = v6.object({
2163
+ root: v6.string(),
2162
2164
  modules: v6.string(),
2163
2165
  objects: v6.array(v6.string()),
2164
2166
  lazyObjects: v6.array(v6.string()),
@@ -2753,29 +2755,29 @@ function readSiriEntitlement(dictionary2) {
2753
2755
  function nonEmptyString(value) {
2754
2756
  return typeof value === "string" && value.length > 0 ? value : null;
2755
2757
  }
2756
- function readGoogleSignInConfiguration(plist4, resources) {
2758
+ function readGoogleSignInConfiguration(plist, resources) {
2757
2759
  const clientIds = {};
2758
2760
  for (const [file, value] of Object.entries(resources)) {
2759
2761
  if (isRecord(value) && typeof value.CLIENT_ID === "string")
2760
2762
  clientIds[file.split("/").pop()?.replace(/\.plist$/, "") ?? file] = value.CLIENT_ID;
2761
2763
  }
2762
2764
  const urlSchemes = [];
2763
- for (const entry of Array.isArray(plist4.CFBundleURLTypes) ? plist4.CFBundleURLTypes : []) {
2765
+ for (const entry of Array.isArray(plist.CFBundleURLTypes) ? plist.CFBundleURLTypes : []) {
2764
2766
  if (!isRecord(entry) || !Array.isArray(entry.CFBundleURLSchemes)) continue;
2765
2767
  for (const scheme of entry.CFBundleURLSchemes)
2766
2768
  if (typeof scheme === "string") urlSchemes.push(scheme);
2767
2769
  }
2768
2770
  return {
2769
- clientId: plist4.GIDClientID,
2770
- serverClientId: plist4.GIDServerClientID,
2771
- hostedDomain: plist4.GIDHostedDomain,
2772
- openIDRealm: plist4.GIDOpenIDRealm,
2771
+ clientId: plist.GIDClientID,
2772
+ serverClientId: plist.GIDServerClientID,
2773
+ hostedDomain: plist.GIDHostedDomain,
2774
+ openIDRealm: plist.GIDOpenIDRealm,
2773
2775
  urlSchemes,
2774
2776
  clientIds
2775
2777
  };
2776
2778
  }
2777
- function plistString(plist4, key) {
2778
- const match = plist4.match(new RegExp(`<key>${key}</key>\\s*<string>([^<]*)</string>`));
2779
+ function plistString(plist, key) {
2780
+ const match = plist.match(new RegExp(`<key>${key}</key>\\s*<string>([^<]*)</string>`));
2779
2781
  return match ? match[1].trim() : null;
2780
2782
  }
2781
2783
  function resolvePlistStrings(value, settings) {
@@ -2851,9 +2853,9 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
2851
2853
  candidates.push({ name: match[1], settings });
2852
2854
  }
2853
2855
  const plistMatch = (settings) => {
2854
- const plist4 = settings.INFOPLIST_FILE;
2855
- if (!plist4) return false;
2856
- const normalized = plist4.replace(/^"|"$/g, "");
2856
+ const plist = settings.INFOPLIST_FILE;
2857
+ if (!plist) return false;
2858
+ const normalized = plist.replace(/^"|"$/g, "");
2857
2859
  return normalized === infoPlistRelativePath || infoPlistRelativePath.endsWith(`/${normalized}`) || normalized.endsWith(`/${infoPlistRelativePath}`);
2858
2860
  };
2859
2861
  const named = (settings) => resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings) === targetName;
@@ -2966,41 +2968,41 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2966
2968
  );
2967
2969
  if (legacy) Object.assign(settings, legacy);
2968
2970
  }
2969
- let plist4;
2971
+ let plist;
2970
2972
  const infoPlistPath = settings.INFOPLIST_FILE;
2971
2973
  if (infoPlistPath) {
2972
2974
  const normalized = infoPlistPath.replace(/^"|"$/g, "");
2973
- plist4 = files[`ios/${normalized}`] ?? files[normalized] ?? Object.entries(files).find(([k]) => k.endsWith(`/${normalized}`))?.[1];
2975
+ plist = files[`ios/${normalized}`] ?? files[normalized] ?? Object.entries(files).find(([k]) => k.endsWith(`/${normalized}`))?.[1];
2974
2976
  }
2975
- if (!plist4) {
2976
- plist4 = files[`ios/${targetName}/Info.plist`] ?? files[`${targetName}/Info.plist`] ?? Object.entries(files).find(([k]) => k.endsWith(`/${targetName}/Info.plist`))?.[1];
2977
+ if (!plist) {
2978
+ plist = files[`ios/${targetName}/Info.plist`] ?? files[`${targetName}/Info.plist`] ?? Object.entries(files).find(([k]) => k.endsWith(`/${targetName}/Info.plist`))?.[1];
2977
2979
  }
2978
- if (!plist4) return null;
2980
+ if (!plist) return null;
2979
2981
  const bundleIdentifier = identityFieldFrom(
2980
2982
  settings,
2981
- plistString(plist4, "CFBundleIdentifier"),
2983
+ plistString(plist, "CFBundleIdentifier"),
2982
2984
  settings.PRODUCT_BUNDLE_IDENTIFIER
2983
2985
  );
2984
2986
  if (!bundleIdentifier) return null;
2985
2987
  const appVersion = identityFieldFrom(
2986
2988
  settings,
2987
- plistString(plist4, "CFBundleShortVersionString"),
2989
+ plistString(plist, "CFBundleShortVersionString"),
2988
2990
  settings.MARKETING_VERSION
2989
2991
  );
2990
2992
  const buildVersion = identityFieldFrom(
2991
2993
  settings,
2992
- plistString(plist4, "CFBundleVersion"),
2994
+ plistString(plist, "CFBundleVersion"),
2993
2995
  settings.CURRENT_PROJECT_VERSION
2994
2996
  );
2995
2997
  if (!appVersion || !buildVersion) return null;
2996
2998
  const bundleName = identityFieldFrom(
2997
2999
  settings,
2998
- plistString(plist4, "CFBundleName"),
3000
+ plistString(plist, "CFBundleName"),
2999
3001
  settings.PRODUCT_NAME
3000
3002
  ) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName);
3001
3003
  if (!bundleName) return null;
3002
- const applicationName = identityFieldFrom(settings, plistString(plist4, "CFBundleDisplayName"), void 0) ?? bundleName;
3003
- const dictionary2 = parseInfoPlist(plist4);
3004
+ const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? bundleName;
3005
+ const dictionary2 = parseInfoPlist(plist);
3004
3006
  if (!isRecord(dictionary2)) throw new Error("native app Info.plist is not a dictionary");
3005
3007
  let keychainAccessGroups;
3006
3008
  let siriEntitled = false;
@@ -3260,16 +3262,452 @@ function extractNativeAppIdentityFromFiles(files, platform, parseInfoPlist, iosT
3260
3262
  }
3261
3263
 
3262
3264
  // src/plist.ts
3263
- var import_plist = __toESM(require("peachsim/vendor/plist"), 1);
3265
+ var NAMED_ENTITIES = {
3266
+ amp: "&",
3267
+ lt: "<",
3268
+ gt: ">",
3269
+ quot: '"',
3270
+ apos: "'"
3271
+ };
3272
+ function decodeXmlEntities(text3) {
3273
+ if (!text3.includes("&")) return text3;
3274
+ return text3.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g, (full, entity) => {
3275
+ if (entity.startsWith("#x") || entity.startsWith("#X")) {
3276
+ const code = Number.parseInt(entity.slice(2), 16);
3277
+ return Number.isFinite(code) ? String.fromCodePoint(code) : full;
3278
+ }
3279
+ if (entity.startsWith("#")) {
3280
+ const code = Number.parseInt(entity.slice(1), 10);
3281
+ return Number.isFinite(code) ? String.fromCodePoint(code) : full;
3282
+ }
3283
+ return NAMED_ENTITIES[entity] ?? full;
3284
+ });
3285
+ }
3286
+ function escapeXmlText(text3) {
3287
+ return text3.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3288
+ }
3289
+ function parseXmlDocument(input) {
3290
+ const source = input.startsWith("\uFEFF") ? input.slice(1) : input;
3291
+ const len = source.length;
3292
+ let pos = 0;
3293
+ const skipIgnorable = () => {
3294
+ while (pos < len) {
3295
+ while (pos < len && /\s/.test(source[pos])) pos++;
3296
+ if (source.startsWith("<!--", pos)) {
3297
+ const end = source.indexOf("-->", pos + 4);
3298
+ if (end === -1) throw new Error("unterminated XML comment");
3299
+ pos = end + 3;
3300
+ continue;
3301
+ }
3302
+ if (source.startsWith("<?", pos)) {
3303
+ const end = source.indexOf("?>", pos + 2);
3304
+ if (end === -1) throw new Error("unterminated XML processing instruction");
3305
+ pos = end + 2;
3306
+ continue;
3307
+ }
3308
+ if (source.startsWith("<!DOCTYPE", pos)) {
3309
+ pos += 9;
3310
+ let depth = 0;
3311
+ let quote = "";
3312
+ while (pos < len) {
3313
+ const ch = source[pos];
3314
+ pos++;
3315
+ if (quote) {
3316
+ if (ch === quote) quote = "";
3317
+ } else if (ch === '"' || ch === "'") {
3318
+ quote = ch;
3319
+ } else if (ch === "[") {
3320
+ depth++;
3321
+ } else if (ch === "]") {
3322
+ depth = Math.max(0, depth - 1);
3323
+ } else if (ch === ">" && depth === 0) {
3324
+ break;
3325
+ }
3326
+ }
3327
+ continue;
3328
+ }
3329
+ break;
3330
+ }
3331
+ };
3332
+ const readElement = () => {
3333
+ if (source[pos] !== "<") {
3334
+ throw new Error(`expected XML tag at offset ${pos}`);
3335
+ }
3336
+ pos++;
3337
+ const nameStart = pos;
3338
+ while (pos < len && /[^\s/>]/.test(source[pos])) pos++;
3339
+ const tag = source.slice(nameStart, pos);
3340
+ if (!tag) throw new Error(`empty XML tag name at offset ${nameStart}`);
3341
+ let quote = "";
3342
+ let selfClosing = false;
3343
+ while (pos < len) {
3344
+ const ch = source[pos];
3345
+ if (quote) {
3346
+ pos++;
3347
+ if (ch === quote) quote = "";
3348
+ continue;
3349
+ }
3350
+ if (ch === '"' || ch === "'") {
3351
+ quote = ch;
3352
+ pos++;
3353
+ continue;
3354
+ }
3355
+ if (ch === "/" && source[pos + 1] === ">") {
3356
+ selfClosing = true;
3357
+ pos += 2;
3358
+ break;
3359
+ }
3360
+ if (ch === ">") {
3361
+ pos++;
3362
+ break;
3363
+ }
3364
+ pos++;
3365
+ }
3366
+ if (selfClosing) {
3367
+ return { tag, children: [], text: "" };
3368
+ }
3369
+ const children = [];
3370
+ let text3 = "";
3371
+ while (pos < len) {
3372
+ if (source.startsWith("<!--", pos)) {
3373
+ const end2 = source.indexOf("-->", pos + 4);
3374
+ if (end2 === -1) throw new Error("unterminated XML comment");
3375
+ pos = end2 + 3;
3376
+ continue;
3377
+ }
3378
+ if (source.startsWith("<![CDATA[", pos)) {
3379
+ const end2 = source.indexOf("]]>", pos + 9);
3380
+ if (end2 === -1) throw new Error("unterminated CDATA section");
3381
+ text3 += source.slice(pos + 9, end2);
3382
+ pos = end2 + 3;
3383
+ continue;
3384
+ }
3385
+ if (source.startsWith("</", pos)) {
3386
+ pos += 2;
3387
+ const closeStart = pos;
3388
+ while (pos < len && /[^\s>]/.test(source[pos])) pos++;
3389
+ const closeTag = source.slice(closeStart, pos);
3390
+ while (pos < len && /\s/.test(source[pos])) pos++;
3391
+ if (source[pos] !== ">") throw new Error(`malformed closing tag </${closeTag}>`);
3392
+ pos++;
3393
+ if (closeTag !== tag) {
3394
+ throw new Error(`mismatched XML closing tag </${closeTag}> for <${tag}>`);
3395
+ }
3396
+ return { tag, children, text: text3 };
3397
+ }
3398
+ if (source[pos] === "<") {
3399
+ children.push(readElement());
3400
+ continue;
3401
+ }
3402
+ const nextTag = source.indexOf("<", pos);
3403
+ const end = nextTag === -1 ? len : nextTag;
3404
+ text3 += decodeXmlEntities(source.slice(pos, end));
3405
+ pos = end;
3406
+ }
3407
+ throw new Error(`unclosed XML tag <${tag}>`);
3408
+ };
3409
+ skipIgnorable();
3410
+ if (pos >= len) throw new Error("empty XML plist document");
3411
+ return readElement();
3412
+ }
3413
+ function parseXmlPlist(source, options2 = {}) {
3414
+ const root = parseXmlDocument(source);
3415
+ if (root.tag !== "plist") {
3416
+ throw new Error(`expected <plist> root element, got <${root.tag}>`);
3417
+ }
3418
+ if (root.children.length === 0) {
3419
+ if (options2.strict) throw new Error("<plist> element has no root value");
3420
+ return void 0;
3421
+ }
3422
+ if (options2.strict && root.children.length !== 1) {
3423
+ throw new Error("<plist> element must contain exactly one root value");
3424
+ }
3425
+ const leafText = (node) => {
3426
+ if (options2.strict && node.children.length > 0) {
3427
+ throw new Error(`<${node.tag}> must not contain child elements`);
3428
+ }
3429
+ return node.text;
3430
+ };
3431
+ const visit = (node) => {
3432
+ switch (node.tag) {
3433
+ case "dict": {
3434
+ const result = {};
3435
+ if (options2.strict && node.children.length % 2 !== 0) {
3436
+ throw new Error("<dict> must contain key/value pairs");
3437
+ }
3438
+ for (let i = 0; i + 1 < node.children.length; i += 2) {
3439
+ const keyNode = node.children[i];
3440
+ if (keyNode.tag !== "key") {
3441
+ throw new Error(`expected <key> in <dict>, got <${keyNode.tag}>`);
3442
+ }
3443
+ result[leafText(keyNode)] = visit(node.children[i + 1]);
3444
+ }
3445
+ return result;
3446
+ }
3447
+ case "array":
3448
+ return node.children.map(visit);
3449
+ case "string":
3450
+ return leafText(node);
3451
+ case "integer": {
3452
+ const raw = leafText(node).trim();
3453
+ if (options2.onInteger) return options2.onInteger(raw);
3454
+ if (!raw) throw new Error("empty <integer> element");
3455
+ return Number.parseInt(raw, 10);
3456
+ }
3457
+ case "real": {
3458
+ const raw = leafText(node).trim();
3459
+ if (options2.onReal) return options2.onReal(raw);
3460
+ if (!raw) throw new Error("empty <real> element");
3461
+ return Number.parseFloat(raw);
3462
+ }
3463
+ case "true":
3464
+ return true;
3465
+ case "false":
3466
+ return false;
3467
+ case "data":
3468
+ return Buffer.from(leafText(node).replace(/\s+/g, ""), "base64");
3469
+ case "date":
3470
+ return new Date(leafText(node).trim());
3471
+ default:
3472
+ throw new Error(`unsupported plist element ${node.tag}`);
3473
+ }
3474
+ };
3475
+ return visit(root.children[0]);
3476
+ }
3477
+ function parsePlist(source) {
3478
+ const root = parseXmlDocument(source);
3479
+ if (root.tag !== "plist") {
3480
+ throw new Error(`expected <plist> root element, got <${root.tag}>`);
3481
+ }
3482
+ if (root.children.length === 0) return {};
3483
+ const visit = (node) => {
3484
+ switch (node.tag) {
3485
+ case "dict": {
3486
+ const result = {};
3487
+ for (let i = 0; i + 1 < node.children.length; i += 2) {
3488
+ const keyNode = node.children[i];
3489
+ if (keyNode.tag !== "key") {
3490
+ throw new Error(`expected <key> in <dict>, got <${keyNode.tag}>`);
3491
+ }
3492
+ result[keyNode.text] = visit(node.children[i + 1]);
3493
+ }
3494
+ return result;
3495
+ }
3496
+ case "array":
3497
+ return node.children.map(visit);
3498
+ case "string":
3499
+ return node.text;
3500
+ case "integer": {
3501
+ const raw = node.text.trim();
3502
+ if (!raw) throw new Error("empty <integer> element");
3503
+ return Number.parseInt(raw, 10);
3504
+ }
3505
+ case "real": {
3506
+ const raw = node.text.trim();
3507
+ if (!raw) throw new Error("empty <real> element");
3508
+ return Number.parseFloat(raw);
3509
+ }
3510
+ case "true":
3511
+ return true;
3512
+ case "false":
3513
+ return false;
3514
+ case "data":
3515
+ return Buffer.from(node.text.replace(/\s+/g, ""), "base64");
3516
+ case "date":
3517
+ return new Date(node.text.trim());
3518
+ default:
3519
+ throw new Error(`unsupported plist element ${node.tag}`);
3520
+ }
3521
+ };
3522
+ return visit(root.children[0]);
3523
+ }
3264
3524
  function parsePlistSource(source) {
3265
- return import_plist.default.parse(source);
3525
+ return parseXmlPlist(source);
3526
+ }
3527
+ function renderValue(value, indent) {
3528
+ if (value === void 0 || value === null) return null;
3529
+ if (typeof value === "string") {
3530
+ return `${indent}<string>${escapeXmlText(value)}</string>`;
3531
+ }
3532
+ if (typeof value === "boolean") {
3533
+ return `${indent}${value ? "<true/>" : "<false/>"}`;
3534
+ }
3535
+ if (typeof value === "number") {
3536
+ if (Number.isInteger(value) && !Object.is(value, -0)) {
3537
+ return `${indent}<integer>${value}</integer>`;
3538
+ }
3539
+ return `${indent}<real>${value}</real>`;
3540
+ }
3541
+ if (value instanceof Date) {
3542
+ return `${indent}<date>${value.toISOString().replace(/\.\d{3}Z$/, "Z")}</date>`;
3543
+ }
3544
+ if (Buffer.isBuffer(value) || value instanceof Uint8Array) {
3545
+ const encoded = Buffer.from(value).toString("base64");
3546
+ return encoded ? `${indent}<data>${encoded}</data>` : `${indent}<data/>`;
3547
+ }
3548
+ if (Array.isArray(value)) {
3549
+ const items2 = value.map((entry) => renderValue(entry, `${indent} `)).filter((entry) => entry !== null);
3550
+ if (items2.length === 0) return `${indent}<array/>`;
3551
+ return `${indent}<array>
3552
+ ${items2.join("\n")}
3553
+ ${indent}</array>`;
3554
+ }
3555
+ if (typeof value === "object") {
3556
+ const lines = [];
3557
+ for (const [key, entry] of Object.entries(value)) {
3558
+ const rendered = renderValue(entry, `${indent} `);
3559
+ if (rendered === null) continue;
3560
+ lines.push(`${indent} <key>${escapeXmlText(key)}</key>`);
3561
+ lines.push(rendered);
3562
+ }
3563
+ if (lines.length === 0) return `${indent}<dict/>`;
3564
+ return `${indent}<dict>
3565
+ ${lines.join("\n")}
3566
+ ${indent}</dict>`;
3567
+ }
3568
+ throw new Error(`unsupported plist value type: ${typeof value}`);
3569
+ }
3570
+ function buildPlist(value) {
3571
+ const body = renderValue(value, " ");
3572
+ return [
3573
+ '<?xml version="1.0" encoding="UTF-8"?>',
3574
+ '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
3575
+ '<plist version="1.0">',
3576
+ ...body ? [body] : [],
3577
+ "</plist>",
3578
+ ""
3579
+ ].join("\n");
3266
3580
  }
3267
3581
 
3268
3582
  // src/plist-bytes.ts
3269
- var import_bplist_parser = __toESM(require("peachsim/vendor/bplist-parser"), 1);
3583
+ var import_strict = __toESM(require("node:assert/strict"), 1);
3584
+ function defaultInteger(value) {
3585
+ return value >= BigInt(Number.MIN_SAFE_INTEGER) && value <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(value) : value;
3586
+ }
3587
+ function parseBinaryPlist(source, options2 = {}) {
3588
+ const bytes = Buffer.isBuffer(source) ? source : Buffer.from(source);
3589
+ (0, import_strict.default)(bytes.length >= 40, "binary plist is too short");
3590
+ (0, import_strict.default)(bytes.toString("ascii", 0, 8) === "bplist00", "invalid binary plist header");
3591
+ const trailer = bytes.length - 32;
3592
+ const offsetWidth = bytes[trailer + 6];
3593
+ const refWidth = bytes[trailer + 7];
3594
+ (0, import_strict.default)(offsetWidth > 0 && offsetWidth <= 8 && refWidth > 0 && refWidth <= 8);
3595
+ const count = Number(bytes.readBigUInt64BE(trailer + 8));
3596
+ const root = Number(bytes.readBigUInt64BE(trailer + 16));
3597
+ const table = Number(bytes.readBigUInt64BE(trailer + 24));
3598
+ (0, import_strict.default)(
3599
+ table >= 8 && table < trailer && count > 0 && count <= (trailer - table) / offsetWidth
3600
+ );
3601
+ const unsigned = (at, width) => {
3602
+ (0, import_strict.default)(at >= 8 && at + width <= trailer);
3603
+ let result = 0n;
3604
+ for (let i = at; i < at + width; i++) result = result * 256n + BigInt(bytes[i]);
3605
+ return result;
3606
+ };
3607
+ const cache = /* @__PURE__ */ new Map();
3608
+ const visiting = /* @__PURE__ */ new Set();
3609
+ const visit = (ref) => {
3610
+ (0, import_strict.default)(ref >= 0 && ref < count && !visiting.has(ref));
3611
+ if (cache.has(ref)) return cache.get(ref);
3612
+ visiting.add(ref);
3613
+ const at = Number(unsigned(table + ref * offsetWidth, offsetWidth));
3614
+ (0, import_strict.default)(at >= 8 && at < table);
3615
+ const marker = bytes[at];
3616
+ const type = marker >> 4;
3617
+ let length = marker & 15;
3618
+ let data = at + 1;
3619
+ if (length === 15 && [4, 5, 6, 7, 10, 12, 13].includes(type)) {
3620
+ (0, import_strict.default)(data < table && bytes[data] >> 4 === 1);
3621
+ const width = 2 ** (bytes[data] & 15);
3622
+ (0, import_strict.default)(width <= 8 && data + 1 + width <= table);
3623
+ length = Number(unsigned(data + 1, width));
3624
+ data += 1 + width;
3625
+ }
3626
+ const end = (size) => {
3627
+ (0, import_strict.default)(Number.isSafeInteger(size) && data + size <= table);
3628
+ return data + size;
3629
+ };
3630
+ const references = (total) => {
3631
+ end(total * refWidth);
3632
+ return Array.from(
3633
+ { length: total },
3634
+ (_, i) => visit(Number(unsigned(data + i * refWidth, refWidth)))
3635
+ );
3636
+ };
3637
+ let value;
3638
+ switch (type) {
3639
+ case 0:
3640
+ if (!options2.strict && marker === 0) {
3641
+ value = null;
3642
+ break;
3643
+ }
3644
+ (0, import_strict.default)(marker === 8 || marker === 9);
3645
+ value = marker === 9;
3646
+ break;
3647
+ case 1: {
3648
+ const size = 2 ** length;
3649
+ (0, import_strict.default)(size <= 16);
3650
+ end(size);
3651
+ const raw = unsigned(data, size);
3652
+ const signed = size >= 8 ? BigInt.asIntN(size * 8, raw) : raw;
3653
+ value = options2.onInteger ? options2.onInteger(signed) : defaultInteger(signed);
3654
+ break;
3655
+ }
3656
+ case 2: {
3657
+ (0, import_strict.default)(length === 2 || length === 3);
3658
+ end(2 ** length);
3659
+ const real = length === 2 ? bytes.readFloatBE(data) : bytes.readDoubleBE(data);
3660
+ value = options2.onReal ? options2.onReal(real) : real;
3661
+ break;
3662
+ }
3663
+ case 3:
3664
+ (0, import_strict.default)(length === 3);
3665
+ end(8);
3666
+ value = new Date(Date.UTC(2001, 0, 1) + bytes.readDoubleBE(data) * 1e3);
3667
+ break;
3668
+ case 4:
3669
+ value = bytes.subarray(data, end(length));
3670
+ break;
3671
+ case 5:
3672
+ value = bytes.toString("ascii", data, end(length));
3673
+ break;
3674
+ case 6:
3675
+ value = Buffer.from(bytes.subarray(data, end(length * 2))).swap16().toString("utf16le");
3676
+ break;
3677
+ case 7:
3678
+ value = bytes.toString("utf8", data, end(length));
3679
+ break;
3680
+ case 8: {
3681
+ if (options2.strict) throw new Error(`unsupported binary plist type ${type}`);
3682
+ const size = length + 1;
3683
+ (0, import_strict.default)(size >= 1 && size <= 8);
3684
+ end(size);
3685
+ value = { UID: Number(unsigned(data, size)) };
3686
+ break;
3687
+ }
3688
+ case 10:
3689
+ case 12:
3690
+ value = references(length);
3691
+ break;
3692
+ case 13: {
3693
+ const elements = references(length * 2);
3694
+ const keys = elements.slice(0, length);
3695
+ (0, import_strict.default)(keys.every((key) => typeof key === "string"));
3696
+ value = Object.fromEntries(keys.map((key, i) => [key, elements[length + i]]));
3697
+ break;
3698
+ }
3699
+ default:
3700
+ throw new Error(`unsupported binary plist type ${type}`);
3701
+ }
3702
+ visiting.delete(ref);
3703
+ cache.set(ref, value);
3704
+ return value;
3705
+ };
3706
+ return visit(root);
3707
+ }
3270
3708
  function parsePlistBytes(source, parseXml2 = parsePlistSource) {
3271
3709
  const bytes = Buffer.from(source);
3272
- return bytes.subarray(0, 8).toString("ascii") === "bplist00" ? import_bplist_parser.default.parseBuffer(bytes)[0] : parseXml2(bytes.toString("utf8"));
3710
+ return bytes.subarray(0, 8).toString("ascii") === "bplist00" ? parseBinaryPlist(bytes) : parseXml2(bytes.toString("utf8"));
3273
3711
  }
3274
3712
 
3275
3713
  // src/native-app-identity-project.ts
@@ -3281,7 +3719,6 @@ var import_node_crypto33 = require("node:crypto");
3281
3719
  var import_node_fs50 = __toESM(require("node:fs"), 1);
3282
3720
  var import_node_module = require("node:module");
3283
3721
  var import_node_path52 = __toESM(require("node:path"), 1);
3284
- var import_plist4 = __toESM(require("peachsim/vendor/plist"), 1);
3285
3722
 
3286
3723
  // src/bazel-project.ts
3287
3724
  var import_node_child_process4 = require("node:child_process");
@@ -3289,7 +3726,6 @@ var import_node_crypto4 = require("node:crypto");
3289
3726
  var import_node_fs6 = __toESM(require("node:fs"), 1);
3290
3727
  var import_node_os2 = __toESM(require("node:os"), 1);
3291
3728
  var import_node_path8 = __toESM(require("node:path"), 1);
3292
- var import_plist3 = __toESM(require("peachsim/vendor/plist"), 1);
3293
3729
  init_is_record();
3294
3730
  var LIBRARY_RULES = /* @__PURE__ */ new Set(["swift_library", "objc_library", "cc_library"]);
3295
3731
  var QUERIED_RULES = [
@@ -4067,7 +4503,7 @@ ${published.map(
4067
4503
  const contents = new Map([
4068
4504
  [
4069
4505
  "Info.plist",
4070
- import_plist3.default.build({
4506
+ buildPlist({
4071
4507
  AvailableLibraries: [
4072
4508
  {
4073
4509
  LibraryIdentifier: "ios-arm64-simulator",
@@ -4152,7 +4588,7 @@ ${published.map(
4152
4588
  const infoPlistReady = infoPlistFiles.every((file) => import_node_fs6.default.existsSync(file));
4153
4589
  const info = {};
4154
4590
  for (const file of infoPlistReady ? infoPlistFiles : []) {
4155
- const fragment = import_plist3.default.parse(import_node_fs6.default.readFileSync(file, "utf8"));
4591
+ const fragment = parsePlist(import_node_fs6.default.readFileSync(file, "utf8"));
4156
4592
  if (!fragment || typeof fragment !== "object" || Array.isArray(fragment) || fragment instanceof Date || Buffer.isBuffer(fragment))
4157
4593
  throw new Error(`${file} is not a plist dictionary`);
4158
4594
  for (const [key, value] of Object.entries(fragment)) {
@@ -4221,7 +4657,7 @@ ${published.map(
4221
4657
  rootDir: root,
4222
4658
  projectFiles: buildFiles.sort(),
4223
4659
  projectDirs: [root],
4224
- infoPlist: infoPlistReady ? import_plist3.default.build(info) : null,
4660
+ infoPlist: infoPlistReady ? buildPlist(info) : null,
4225
4661
  infoPlistFile: null,
4226
4662
  postBundleScripts: [],
4227
4663
  appIconName: "",
@@ -4626,7 +5062,7 @@ var import_node_path13 = require("node:path");
4626
5062
  var import_node_crypto7 = require("node:crypto");
4627
5063
  var import_node_fs10 = require("node:fs");
4628
5064
  var import_node_path11 = require("node:path");
4629
- var swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"c64b677c93e48d61c71b371d887e9db8506c32ef968ed50d9468de1f67fe5d8d","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"4f54e110f6f2f72da6d20ca6fc1a10c7dbd0cd462b7dd3959351e107c4aa7548","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"81f36daeda9ac5c81a5631fdcab42fb12d09a74705915b8861f404d0db2e01c5","xcode-target-members.ts":"96f6a9f5567a4fbd9806252229b35b9a451a112b20f70f8c20189ffd428815fd","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path11.join)(__sootsim_import_meta_dirname, ".."));
5065
+ var swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"c64b677c93e48d61c71b371d887e9db8506c32ef968ed50d9468de1f67fe5d8d","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"32bf10d6f3396dd1a20ff6d415499a5990ec2550c63306fd9ef071bdf4a58f1e","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"fe50b74f53082e75bb32393ada42bbbcb0ff982024a026b4b673f2004dd404d8","xcode-target-members.ts":"96f6a9f5567a4fbd9806252229b35b9a451a112b20f70f8c20189ffd428815fd","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path11.join)(__sootsim_import_meta_dirname, ".."));
4630
5066
 
4631
5067
  // src/swift-coverage/xcode-asset-symbols.ts
4632
5068
  var import_node_fs11 = require("node:fs");
@@ -4848,7 +5284,7 @@ var import_node_fs49 = __toESM(require("node:fs"), 1);
4848
5284
  var import_node_path50 = __toESM(require("node:path"), 1);
4849
5285
 
4850
5286
  // src/intent-definition/fields.ts
4851
- var import_strict = __toESM(require("node:assert/strict"), 1);
5287
+ var import_strict2 = __toESM(require("node:assert/strict"), 1);
4852
5288
 
4853
5289
  // src/intent-definition/system-types.ts
4854
5290
  var systemEnumHashes = /* @__PURE__ */ new Map([
@@ -5138,13 +5574,13 @@ function intentModelVersion(value) {
5138
5574
  return value === "1.0" || value === "1.1" ? value : "1.2";
5139
5575
  }
5140
5576
  function modelList(value, key) {
5141
- (0, import_strict.default)(value && typeof value === "object");
5577
+ (0, import_strict2.default)(value && typeof value === "object");
5142
5578
  const entries = Reflect.get(value, key) ?? [];
5143
- (0, import_strict.default)(Array.isArray(entries));
5579
+ (0, import_strict2.default)(Array.isArray(entries));
5144
5580
  return entries;
5145
5581
  }
5146
5582
  function identifier(value) {
5147
- (0, import_strict.default)(
5583
+ (0, import_strict2.default)(
5148
5584
  typeof value === "string" && /^[_\p{ID_Start}][_\p{ID_Continue}]*$/u.test(value),
5149
5585
  `invalid intent identifier ${String(value)}`
5150
5586
  );
@@ -5152,18 +5588,18 @@ function identifier(value) {
5152
5588
  }
5153
5589
  function intentClassIdentifier(value) {
5154
5590
  const name2 = identifier(value);
5155
- (0, import_strict.default)(/^[A-Za-z_0-9]+$/.test(name2), `invalid intent class name ${name2}`);
5591
+ (0, import_strict2.default)(/^[A-Za-z_0-9]+$/.test(name2), `invalid intent class name ${name2}`);
5156
5592
  return name2;
5157
5593
  }
5158
5594
  function readSwiftField(value, key, customTypes) {
5159
- (0, import_strict.default)(value && typeof value === "object");
5595
+ (0, import_strict2.default)(value && typeof value === "object");
5160
5596
  const get = (property) => Reflect.get(value, key + property);
5161
5597
  const name2 = identifier(get("Name"));
5162
5598
  let kind = intentParameterKind(get("Type"));
5163
5599
  let enumeration = get("EnumType");
5164
5600
  let object4 = get("ObjectType");
5165
- (0, import_strict.default)(enumeration === void 0 || kind === "Integer");
5166
- (0, import_strict.default)(object4 === void 0 || kind === "Object");
5601
+ (0, import_strict2.default)(enumeration === void 0 || kind === "Integer");
5602
+ (0, import_strict2.default)(object4 === void 0 || kind === "Object");
5167
5603
  const custom = enumeration ?? object4;
5168
5604
  let customName;
5169
5605
  if (custom !== void 0) {
@@ -5178,7 +5614,7 @@ function readSwiftField(value, key, customTypes) {
5178
5614
  }
5179
5615
  } else {
5180
5616
  customName = customTypes.get(name3);
5181
- (0, import_strict.default)(customName, "unknown intent parameter type: " + name3);
5617
+ (0, import_strict2.default)(customName, "unknown intent parameter type: " + name3);
5182
5618
  }
5183
5619
  }
5184
5620
  const type = types.get(kind);
@@ -5188,7 +5624,7 @@ function readSwiftField(value, key, customTypes) {
5188
5624
  const valueType = multiple ? `[${array6}]` : base;
5189
5625
  const resolves = get("SupportsResolution") === true;
5190
5626
  const explicitReasons = modelList(value, key + "UnsupportedReasons").map((entry) => {
5191
- (0, import_strict.default)(entry && typeof entry === "object");
5627
+ (0, import_strict2.default)(entry && typeof entry === "object");
5192
5628
  return identifier(Reflect.get(entry, key + "UnsupportedReasonCode"));
5193
5629
  });
5194
5630
  const defaults = resolves && !customName ? defaultUnsupportedReasons(kind) : [];
@@ -5279,7 +5715,7 @@ fatalError()
5279
5715
  }
5280
5716
  function customObjectFields(definition, customTypes) {
5281
5717
  return modelList(definition, "INTypeProperties").filter((entry) => {
5282
- (0, import_strict.default)(entry && typeof entry === "object");
5718
+ (0, import_strict2.default)(entry && typeof entry === "object");
5283
5719
  return Reflect.get(entry, "INTypePropertyDefault") !== true;
5284
5720
  }).map((entry) => {
5285
5721
  const field = readSwiftField(entry, "INTypeProperty", customTypes);
@@ -5288,11 +5724,11 @@ function customObjectFields(definition, customTypes) {
5288
5724
  }
5289
5725
 
5290
5726
  // src/intent-definition/metadata.ts
5291
- var import_strict3 = __toESM(require("node:assert/strict"), 1);
5727
+ var import_strict4 = __toESM(require("node:assert/strict"), 1);
5292
5728
  var import_node_crypto31 = require("node:crypto");
5293
5729
 
5294
5730
  // src/intent-definition/hash-input.ts
5295
- var import_strict2 = __toESM(require("node:assert/strict"), 1);
5731
+ var import_strict3 = __toESM(require("node:assert/strict"), 1);
5296
5732
  var IntentReal = class {
5297
5733
  constructor(value) {
5298
5734
  this.value = value;
@@ -5326,7 +5762,7 @@ function intentHashInput(root, propertyTypes = []) {
5326
5762
  integer2(18, BigInt(value.length));
5327
5763
  for (const item of value) append(item);
5328
5764
  } else {
5329
- (0, import_strict2.default)(
5765
+ (0, import_strict3.default)(
5330
5766
  value && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype
5331
5767
  );
5332
5768
  const keys = Object.keys(value).sort();
@@ -5437,7 +5873,7 @@ var widgetArraySizes = {
5437
5873
  };
5438
5874
  function normalizedEnums(input) {
5439
5875
  return modelList(input, "INEnums").map((value) => {
5440
- (0, import_strict3.default)(dictionary(value));
5876
+ (0, import_strict4.default)(dictionary(value));
5441
5877
  return {
5442
5878
  ...value,
5443
5879
  INEnumName: intentClassIdentifier(value.INEnumName),
@@ -5455,7 +5891,7 @@ function localizationIdentifier(field, key) {
5455
5891
  }
5456
5892
  function normalizedMetadata(type, source, field) {
5457
5893
  const defaults = typeMetadata.get(type) ?? {};
5458
- (0, import_strict3.default)(source === void 0 || dictionary(source));
5894
+ (0, import_strict4.default)(source === void 0 || dictionary(source));
5459
5895
  const metadata = source ? { ...source } : Object.fromEntries(
5460
5896
  Object.entries(defaults).map(([key, value]) => {
5461
5897
  const qualified = `INIntentParameterMetadata${key}`;
@@ -5484,7 +5920,7 @@ var defaultReasonMessages = /* @__PURE__ */ new Map([
5484
5920
  function normalizedReasons(parameter, kind, field) {
5485
5921
  const reasons = /* @__PURE__ */ new Map();
5486
5922
  for (const reason of modelList(parameter, "INIntentParameterUnsupportedReasons")) {
5487
- (0, import_strict3.default)(dictionary(reason));
5923
+ (0, import_strict4.default)(dictionary(reason));
5488
5924
  const code = identifier(reason.INIntentParameterUnsupportedReasonCode);
5489
5925
  const text3 = reason.INIntentParameterUnsupportedReasonFormatString;
5490
5926
  reasons.set(
@@ -5521,17 +5957,17 @@ function compileIntentMetadata(input, enums, prefix) {
5521
5957
  }
5522
5958
  const objectHashes = /* @__PURE__ */ new Map();
5523
5959
  for (const declaration of modelList(input, "INTypes")) {
5524
- (0, import_strict3.default)(dictionary(declaration) && typeof declaration.INTypeName === "string");
5960
+ (0, import_strict4.default)(dictionary(declaration) && typeof declaration.INTypeName === "string");
5525
5961
  objectHashes.set(declaration.INTypeName, intentSipHash(intentHashInput(declaration)));
5526
5962
  }
5527
5963
  const intents = modelList(input, "INIntents").map((value) => {
5528
- (0, import_strict3.default)(dictionary(value));
5964
+ (0, import_strict4.default)(dictionary(value));
5529
5965
  const name2 = intentClassIdentifier(value.INIntentName);
5530
5966
  const system = value.INIntentType === "System";
5531
5967
  const propertyTypes = [];
5532
5968
  const parameters = modelList(value, "INIntentParameters").map(
5533
5969
  (parameter, position) => {
5534
- (0, import_strict3.default)(dictionary(parameter));
5970
+ (0, import_strict4.default)(dictionary(parameter));
5535
5971
  const enumName = parameter.INIntentParameterEnumType;
5536
5972
  const objectName = parameter.INIntentParameterObjectType;
5537
5973
  const reference = enumName ?? objectName;
@@ -5558,7 +5994,7 @@ function compileIntentMetadata(input, enums, prefix) {
5558
5994
  }
5559
5995
  } else {
5560
5996
  const localHash = hashes.get(typeName);
5561
- (0, import_strict3.default)(localHash !== void 0, `unknown intent parameter type: ${typeName}`);
5997
+ (0, import_strict4.default)(localHash !== void 0, `unknown intent parameter type: ${typeName}`);
5562
5998
  hash2 = localHash;
5563
5999
  }
5564
6000
  }
@@ -5584,7 +6020,7 @@ function compileIntentMetadata(input, enums, prefix) {
5584
6020
  if (parameter.INIntentParameterSupportsMultipleValues && parameter.INIntentParameterFixedSizeArray) {
5585
6021
  const sizes = /* @__PURE__ */ new Map();
5586
6022
  for (const size of modelList(parameter, "INIntentParameterArraySizes")) {
5587
- (0, import_strict3.default)(
6023
+ (0, import_strict4.default)(
5588
6024
  dictionary(size) && typeof size.INIntentParameterArraySizeSizeClass === "string"
5589
6025
  );
5590
6026
  sizes.set(size.INIntentParameterArraySizeSizeClass, size);
@@ -5708,7 +6144,7 @@ function formatPlistReal(value) {
5708
6144
  return `${sign}${digits.slice(0, point)}.${digits.slice(point)}`;
5709
6145
  }
5710
6146
  function writeIntentDefinition(input, prefix) {
5711
- (0, import_strict3.default)(dictionary(input));
6147
+ (0, import_strict4.default)(dictionary(input));
5712
6148
  const escape = (text3) => text3.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
5713
6149
  const lines = [
5714
6150
  '<?xml version="1.0" encoding="UTF-8"?>',
@@ -5745,7 +6181,7 @@ function writeIntentDefinition(input, prefix) {
5745
6181
  lines.push(`${indent}</array>`);
5746
6182
  }
5747
6183
  } else {
5748
- (0, import_strict3.default)(dictionary(value));
6184
+ (0, import_strict4.default)(dictionary(value));
5749
6185
  const keys = Object.keys(value).sort();
5750
6186
  if (keys.length === 0) lines.push(`${indent}<dict/>`);
5751
6187
  else {
@@ -5779,186 +6215,43 @@ function writeIntentDefinition(input, prefix) {
5779
6215
  }
5780
6216
 
5781
6217
  // src/intent-definition/plist-reader.ts
5782
- var import_strict4 = __toESM(require("node:assert/strict"), 1);
5783
- var import_xmldom = require("peachsim/vendor/@xmldom/xmldom");
6218
+ var import_strict5 = __toESM(require("node:assert/strict"), 1);
5784
6219
  function safeNumber(value) {
5785
6220
  return value >= BigInt(Number.MIN_SAFE_INTEGER) && value <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(value) : value;
5786
6221
  }
5787
6222
  function xmlPlist(bytes) {
5788
6223
  const encoding = bytes[0] === 255 && bytes[1] === 254 ? "utf-16le" : bytes[0] === 254 && bytes[1] === 255 ? "utf-16be" : "utf-8";
5789
6224
  const text3 = new TextDecoder(encoding, { fatal: true }).decode(bytes);
5790
- const document = new import_xmldom.DOMParser({
5791
- onError(_level, message) {
5792
- throw new Error(message);
5793
- }
5794
- }).parseFromString(text3, "application/xml");
5795
- const children = (element) => Array.from(element.children);
5796
- const contents = (element) => {
5797
- (0, import_strict4.default)(element.children.length === 0);
5798
- return element.textContent ?? "";
5799
- };
5800
- const visit = (element) => {
5801
- switch (element.tagName) {
5802
- case "dict": {
5803
- const entries = children(element);
5804
- (0, import_strict4.default)(entries.length % 2 === 0);
5805
- const pairs = [];
5806
- for (let i = 0; i < entries.length; i += 2) {
5807
- const key = entries[i];
5808
- (0, import_strict4.default)(key.tagName === "key");
5809
- pairs.push([contents(key), visit(entries[i + 1])]);
5810
- }
5811
- return Object.fromEntries(pairs);
5812
- }
5813
- case "array":
5814
- return children(element).map(visit);
5815
- case "string":
5816
- return contents(element);
5817
- case "integer": {
5818
- const value = contents(element).trim();
5819
- (0, import_strict4.default)(value.length > 0);
5820
- return safeNumber(BigInt(value));
5821
- }
5822
- case "real": {
5823
- const value = contents(element).trim();
5824
- (0, import_strict4.default)(value.length > 0);
5825
- return new IntentReal(
5826
- /^[+-]?inf(?:inity)?$/i.test(value) ? value.startsWith("-") ? -Infinity : Infinity : Number(value)
5827
- );
5828
- }
5829
- case "true":
5830
- return true;
5831
- case "false":
5832
- return false;
5833
- case "data":
5834
- return Buffer.from(contents(element), "base64");
5835
- case "date":
5836
- return new Date(contents(element));
5837
- default:
5838
- throw new Error(`unsupported plist element ${element.tagName}`);
5839
- }
5840
- };
5841
- const plist4 = document.documentElement;
5842
- (0, import_strict4.default)(plist4?.tagName === "plist" && plist4.children.length === 1);
5843
- return visit(plist4.children[0]);
5844
- }
5845
- function binaryPlist2(bytes) {
5846
- (0, import_strict4.default)(bytes.length >= 40);
5847
- const trailer = bytes.length - 32;
5848
- const offsetWidth = bytes[trailer + 6];
5849
- const refWidth = bytes[trailer + 7];
5850
- (0, import_strict4.default)(offsetWidth > 0 && offsetWidth <= 8 && refWidth > 0 && refWidth <= 8);
5851
- const count = Number(bytes.readBigUInt64BE(trailer + 8));
5852
- const root = Number(bytes.readBigUInt64BE(trailer + 16));
5853
- const table = Number(bytes.readBigUInt64BE(trailer + 24));
5854
- (0, import_strict4.default)(
5855
- table >= 8 && table < trailer && count > 0 && count <= (trailer - table) / offsetWidth
5856
- );
5857
- const unsigned = (at, width) => {
5858
- (0, import_strict4.default)(at >= 8 && at + width <= trailer);
5859
- let result = 0n;
5860
- for (let i = at; i < at + width; i++) result = result * 256n + BigInt(bytes[i]);
5861
- return result;
5862
- };
5863
- const cache = /* @__PURE__ */ new Map();
5864
- const visiting = /* @__PURE__ */ new Set();
5865
- const visit = (ref) => {
5866
- (0, import_strict4.default)(ref >= 0 && ref < count && !visiting.has(ref));
5867
- if (cache.has(ref)) return cache.get(ref);
5868
- visiting.add(ref);
5869
- const at = Number(unsigned(table + ref * offsetWidth, offsetWidth));
5870
- (0, import_strict4.default)(at >= 8 && at < table);
5871
- const marker = bytes[at];
5872
- const type = marker >> 4;
5873
- let length = marker & 15;
5874
- let data = at + 1;
5875
- if (length === 15 && [4, 5, 6, 7, 10, 13].includes(type)) {
5876
- (0, import_strict4.default)(data < table && bytes[data] >> 4 === 1);
5877
- const width = 2 ** (bytes[data] & 15);
5878
- (0, import_strict4.default)(width <= 8 && data + 1 + width <= table);
5879
- length = Number(unsigned(data + 1, width));
5880
- data += 1 + width;
5881
- }
5882
- const end = (size) => {
5883
- (0, import_strict4.default)(Number.isSafeInteger(size) && data + size <= table);
5884
- return data + size;
5885
- };
5886
- const references = (total) => {
5887
- end(total * refWidth);
5888
- return Array.from(
5889
- { length: total },
5890
- (_, i) => visit(Number(unsigned(data + i * refWidth, refWidth)))
6225
+ return parseXmlPlist(text3, {
6226
+ strict: true,
6227
+ onInteger(raw) {
6228
+ (0, import_strict5.default)(raw.length > 0);
6229
+ return safeNumber(BigInt(raw));
6230
+ },
6231
+ onReal(raw) {
6232
+ (0, import_strict5.default)(raw.length > 0);
6233
+ return new IntentReal(
6234
+ /^[+-]?inf(?:inity)?$/i.test(raw) ? raw.startsWith("-") ? -Infinity : Infinity : Number(raw)
5891
6235
  );
5892
- };
5893
- let value;
5894
- switch (type) {
5895
- case 0:
5896
- (0, import_strict4.default)(marker === 8 || marker === 9);
5897
- value = marker === 9;
5898
- break;
5899
- case 1: {
5900
- const size = 2 ** length;
5901
- (0, import_strict4.default)(size <= 16);
5902
- end(size);
5903
- const integer2 = unsigned(data, size);
5904
- value = safeNumber(size >= 8 ? BigInt.asIntN(size * 8, integer2) : integer2);
5905
- break;
5906
- }
5907
- case 2:
5908
- (0, import_strict4.default)(length === 2 || length === 3);
5909
- end(2 ** length);
5910
- value = new IntentReal(
5911
- length === 2 ? bytes.readFloatBE(data) : bytes.readDoubleBE(data)
5912
- );
5913
- break;
5914
- case 3:
5915
- (0, import_strict4.default)(length === 3);
5916
- end(8);
5917
- value = new Date(Date.UTC(2001, 0, 1) + bytes.readDoubleBE(data) * 1e3);
5918
- break;
5919
- case 4:
5920
- value = bytes.subarray(data, end(length));
5921
- break;
5922
- case 5:
5923
- value = bytes.toString("ascii", data, end(length));
5924
- break;
5925
- case 6:
5926
- value = Buffer.from(bytes.subarray(data, end(length * 2))).swap16().toString("utf16le");
5927
- break;
5928
- case 7:
5929
- value = bytes.toString("utf8", data, end(length));
5930
- break;
5931
- case 10:
5932
- value = references(length);
5933
- break;
5934
- case 13: {
5935
- const elements = references(length * 2);
5936
- const keys = elements.slice(0, length);
5937
- (0, import_strict4.default)(keys.every((key) => typeof key === "string"));
5938
- value = Object.fromEntries(keys.map((key, i) => [key, elements[length + i]]));
5939
- break;
5940
- }
5941
- default:
5942
- throw new Error(`unsupported binary plist type ${type}`);
5943
6236
  }
5944
- visiting.delete(ref);
5945
- cache.set(ref, value);
5946
- return value;
5947
- };
5948
- return visit(root);
6237
+ });
5949
6238
  }
5950
6239
  function parseIntentPlist(bytes) {
5951
- return bytes.toString("ascii", 0, 8) === "bplist00" ? binaryPlist2(bytes) : xmlPlist(bytes);
6240
+ return bytes.toString("ascii", 0, 8) === "bplist00" ? parseBinaryPlist(bytes, {
6241
+ strict: true,
6242
+ onInteger: safeNumber,
6243
+ onReal: (value) => new IntentReal(value)
6244
+ }) : xmlPlist(bytes);
5952
6245
  }
5953
6246
 
5954
6247
  // src/intent-definition/source.ts
5955
- var import_strict8 = __toESM(require("node:assert/strict"), 1);
6248
+ var import_strict9 = __toESM(require("node:assert/strict"), 1);
5956
6249
 
5957
6250
  // src/intent-definition/objective-c.ts
5958
- var import_strict6 = __toESM(require("node:assert/strict"), 1);
6251
+ var import_strict7 = __toESM(require("node:assert/strict"), 1);
5959
6252
 
5960
6253
  // src/intent-definition/response.ts
5961
- var import_strict5 = __toESM(require("node:assert/strict"), 1);
6254
+ var import_strict6 = __toESM(require("node:assert/strict"), 1);
5962
6255
  var responseCodes = [
5963
6256
  "unspecified",
5964
6257
  "ready",
@@ -5974,10 +6267,10 @@ function readIntentResponse(definition, customTypes) {
5974
6267
  );
5975
6268
  const definitions = new Map(
5976
6269
  modelList(definition, "INIntentResponseCodes").map((entry) => {
5977
- (0, import_strict5.default)(entry && typeof entry === "object");
6270
+ (0, import_strict6.default)(entry && typeof entry === "object");
5978
6271
  const name2 = identifier(Reflect.get(entry, "INIntentResponseCodeName"));
5979
6272
  const message = Reflect.get(entry, "INIntentResponseCodeFormatString");
5980
- (0, import_strict5.default)(message === void 0 || typeof message === "string");
6273
+ (0, import_strict6.default)(message === void 0 || typeof message === "string");
5981
6274
  const referenced = new Set(
5982
6275
  [
5983
6276
  ...String(message ?? "").matchAll(
@@ -5988,7 +6281,7 @@ function readIntentResponse(definition, customTypes) {
5988
6281
  const names = [...referenced].sort();
5989
6282
  const parameters = names.map((name3) => {
5990
6283
  const field = fields.find((field2) => field2.name === name3);
5991
- (0, import_strict5.default)(field, "unknown intent response field " + name3);
6284
+ (0, import_strict6.default)(field, "unknown intent response field " + name3);
5992
6285
  return field;
5993
6286
  });
5994
6287
  return [
@@ -6054,7 +6347,7 @@ var array5 = (element) => `NSArray<${element}> *`;
6054
6347
  function objcAvailability(swift) {
6055
6348
  if (!swift) return "";
6056
6349
  const version = /^@available\(iOS ([\d.]+), macOS ([\d.]+), watchOS ([\d.]+), \*\)$/.exec(swift);
6057
- (0, import_strict6.default)(version);
6350
+ (0, import_strict7.default)(version);
6058
6351
  return ` API_AVAILABLE(ios(${version[1]}), macos(${version[2]}), watchos(${version[3]}))`;
6059
6352
  }
6060
6353
  function objcElement(field) {
@@ -6083,7 +6376,7 @@ function headerImports(fields, visibility, module2) {
6083
6376
  return [...imports].join("\n");
6084
6377
  }
6085
6378
  function objcIntentSource(name2, prefix, definition, customTypes, version, visibility, module2) {
6086
- (0, import_strict6.default)(definition && typeof definition === "object");
6379
+ (0, import_strict7.default)(definition && typeof definition === "object");
6087
6380
  const klass = prefix + name2 + "Intent";
6088
6381
  const response = klass + "Response";
6089
6382
  const attr = hidden(visibility);
@@ -6122,7 +6415,7 @@ function objcIntentSource(name2, prefix, definition, customTypes, version, visib
6122
6415
  };
6123
6416
  const constructors = [...definitions].filter(([, definition2]) => definition2.parameters.length > 0).map(([code, { parameters: parameters2, availability }]) => {
6124
6417
  const [first, ...rest] = parameters2;
6125
- (0, import_strict6.default)(first);
6418
+ (0, import_strict7.default)(first);
6126
6419
  const selector = `${code}IntentResponseWith${upper(first.name)}:(${objcType(first)})${first.name}` + rest.map((field) => ` ${field.name}:(${objcType(field)})${field.name}`).join("");
6127
6420
  return {
6128
6421
  code,
@@ -6220,15 +6513,15 @@ ${reasons.map(
6220
6513
  return { header, implementation };
6221
6514
  }
6222
6515
  function objcEnumSource(definition, label, prefix, visibility) {
6223
- (0, import_strict6.default)(definition && typeof definition === "object");
6516
+ (0, import_strict7.default)(definition && typeof definition === "object");
6224
6517
  const name2 = prefix + label;
6225
6518
  const attr = hidden(visibility);
6226
6519
  const bases = [attr, available].filter(Boolean).join(" ");
6227
6520
  const cases = modelList(definition, "INEnumValues").map((entry) => {
6228
- (0, import_strict6.default)(entry && typeof entry === "object");
6521
+ (0, import_strict7.default)(entry && typeof entry === "object");
6229
6522
  const value = identifier(Reflect.get(entry, "INEnumValueName"));
6230
6523
  const index = Reflect.get(entry, "INEnumValueIndex") ?? 0;
6231
- (0, import_strict6.default)(typeof index === "number" && Number.isSafeInteger(index));
6524
+ (0, import_strict7.default)(typeof index === "number" && Number.isSafeInteger(index));
6232
6525
  return ` ${name2}${upper(value)} = ${index}`;
6233
6526
  });
6234
6527
  const success = `+ (instancetype)successWithResolved${label}:(${name2})resolvedValue`;
@@ -6314,9 +6607,9 @@ ${confirm} {
6314
6607
  }
6315
6608
 
6316
6609
  // src/intent-definition/swift.ts
6317
- var import_strict7 = __toESM(require("node:assert/strict"), 1);
6610
+ var import_strict8 = __toESM(require("node:assert/strict"), 1);
6318
6611
  function swiftIntentSource(name2, prefix, definition, customTypes, version, access) {
6319
- (0, import_strict7.default)(definition && typeof definition === "object");
6612
+ (0, import_strict8.default)(definition && typeof definition === "object");
6320
6613
  const klass = `${prefix}${name2}Intent`;
6321
6614
  const response = `${klass}Response`;
6322
6615
  const parameters = modelList(definition, "INIntentParameters").map(
@@ -6420,17 +6713,17 @@ ${access} class func unsupported(forReason reason: ${base}UnsupportedReason) ->
6420
6713
 
6421
6714
  // src/intent-definition/source.ts
6422
6715
  function swiftEnumSource(definition, visibility, prefix = "") {
6423
- (0, import_strict8.default)(definition && typeof definition === "object");
6716
+ (0, import_strict9.default)(definition && typeof definition === "object");
6424
6717
  const unprefixed = identifier(Reflect.get(definition, "INEnumName"));
6425
6718
  const name2 = prefix + unprefixed;
6426
6719
  const values = Reflect.get(definition, "INEnumValues");
6427
- (0, import_strict8.default)(Array.isArray(values));
6720
+ (0, import_strict9.default)(Array.isArray(values));
6428
6721
  const access = visibility === "project" ? "internal" : "public";
6429
6722
  const cases = values.map((entry) => {
6430
- (0, import_strict8.default)(entry && typeof entry === "object");
6723
+ (0, import_strict9.default)(entry && typeof entry === "object");
6431
6724
  const name3 = identifier(Reflect.get(entry, "INEnumValueName"));
6432
6725
  const index = Reflect.get(entry, "INEnumValueIndex") ?? 0;
6433
- (0, import_strict8.default)(typeof index === "number" && Number.isSafeInteger(index));
6726
+ (0, import_strict9.default)(typeof index === "number" && Number.isSafeInteger(index));
6434
6727
  return ` case \`${name3}\` = ${index}`;
6435
6728
  });
6436
6729
  return `#if canImport(Intents)
@@ -6455,7 +6748,7 @@ ${access} class ${name2}ResolutionResult: INEnumResolutionResult {
6455
6748
  `;
6456
6749
  }
6457
6750
  function emitIntentSource(definition, prefix, visibility, language, module2) {
6458
- (0, import_strict8.default)(definition && typeof definition === "object");
6751
+ (0, import_strict9.default)(definition && typeof definition === "object");
6459
6752
  const intents = modelList(definition, "INIntents");
6460
6753
  const types2 = modelList(definition, "INTypes");
6461
6754
  const enums = modelList(definition, "INEnums");
@@ -6465,7 +6758,7 @@ function emitIntentSource(definition, prefix, visibility, language, module2) {
6465
6758
  intentModelVersion(Reflect.get(definition, "INIntentDefinitionModelVersion"))
6466
6759
  );
6467
6760
  const nameOf = (entry, key) => {
6468
- (0, import_strict8.default)(entry && typeof entry === "object");
6761
+ (0, import_strict9.default)(entry && typeof entry === "object");
6469
6762
  return identifier(Reflect.get(entry, key));
6470
6763
  };
6471
6764
  const typeNames = types2.map((type) => nameOf(type, "INTypeName"));
@@ -6505,7 +6798,7 @@ function emitIntentSource(definition, prefix, visibility, language, module2) {
6505
6798
  });
6506
6799
  }
6507
6800
  for (const intent of intents) {
6508
- (0, import_strict8.default)(intent && typeof intent === "object");
6801
+ (0, import_strict9.default)(intent && typeof intent === "object");
6509
6802
  if (Reflect.get(intent, "INIntentType") === "System") continue;
6510
6803
  const name2 = identifier(Reflect.get(intent, "INIntentName"));
6511
6804
  const filename = `${prefix}${name2}Intent`;
@@ -7280,7 +7573,7 @@ function expandValue(value, settings) {
7280
7573
  return value;
7281
7574
  }
7282
7575
  function processedInfoPlist(name2, file, settings, settingKeys) {
7283
- const source = file ? import_plist4.default.parse(import_node_fs50.default.readFileSync(file, "utf8")) : {};
7576
+ const source = file ? parsePlist(import_node_fs50.default.readFileSync(file, "utf8")) : {};
7284
7577
  if (!source || typeof source !== "object" || Array.isArray(source) || source instanceof Date || Buffer.isBuffer(source))
7285
7578
  throw new Error(`${name2} Info.plist must contain a dictionary`);
7286
7579
  const info = {};
@@ -7855,7 +8148,7 @@ ${output}`
7855
8148
  );
7856
8149
  let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
7857
8150
  if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs50.default.existsSync(infoPlistOutput)) {
7858
- const info = import_plist4.default.parse(import_node_fs50.default.readFileSync(infoPlistOutput, "utf8"));
8151
+ const info = parsePlist(import_node_fs50.default.readFileSync(infoPlistOutput, "utf8"));
7859
8152
  const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
7860
8153
  if (typeof declared === "string") launchName = expand(declared, settings);
7861
8154
  }
@@ -8889,7 +9182,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
8889
9182
  }
8890
9183
  return {
8891
9184
  ref,
8892
- framework: Object.assign(module3, { frameworkInfoPlist: import_plist4.default.build(info2) })
9185
+ framework: Object.assign(module3, { frameworkInfoPlist: buildPlist(info2) })
8893
9186
  };
8894
9187
  });
8895
9188
  const frameworks = frameworkTargets.map(({ framework }) => framework);
@@ -8956,9 +9249,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
8956
9249
  path: bundlePath,
8957
9250
  ...product ? {
8958
9251
  resources: product.module.resources,
8959
- infoPlist: import_plist4.default.build(
9252
+ infoPlist: buildPlist(
8960
9253
  expandValue(
8961
- import_plist4.default.parse(import_node_fs50.default.readFileSync(infoFile, "utf8")),
9254
+ parsePlist(import_node_fs50.default.readFileSync(infoFile, "utf8")),
8962
9255
  product.productSettings
8963
9256
  )
8964
9257
  )
@@ -8980,7 +9273,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
8980
9273
  settingKeys
8981
9274
  );
8982
9275
  const bundleIdentifier = productSettings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
8983
- const entitlements = entitlementsFile ? import_plist4.default.parse(import_node_fs50.default.readFileSync(entitlementsFile, "utf8")) : void 0;
9276
+ const entitlements = entitlementsFile ? parsePlist(import_node_fs50.default.readFileSync(entitlementsFile, "utf8")) : void 0;
8984
9277
  const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
8985
9278
  entitlements,
8986
9279
  (value) => expand(value, (key) => {
@@ -9326,7 +9619,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
9326
9619
  ].sort(),
9327
9620
  projectDirs: [...new Set(used.map((project) => project.projectDir))].sort(),
9328
9621
  appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
9329
- infoPlist: infoPlistPending ? null : import_plist4.default.build(info),
9622
+ infoPlist: infoPlistPending ? null : buildPlist(info),
9330
9623
  infoPlistFile,
9331
9624
  ...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
9332
9625
  siriEntitled: readSiriEntitlement(entitlements),