peachsim 0.1.1667 → 0.1.1674

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 (204) hide show
  1. package/README.md +1 -1
  2. package/cli/bridge-flow-runner.ts +4 -1
  3. package/cli/commands/coverage-swift.ts +291 -0
  4. package/cli/commands/coverage.ts +168 -24
  5. package/cli/commands/diagnose.ts +1 -19
  6. package/cli/commands/inspect/settling.ts +37 -4
  7. package/cli/commands/react.ts +3 -18
  8. package/cli/commands/screenshot.ts +1 -1
  9. package/cli/commands/screenshots-capture.ts +1 -1
  10. package/cli/drivers/playwright-provisioning.ts +1 -4
  11. package/cli/drivers/playwright.ts +15 -1
  12. package/cli/scene-video.ts +1 -1
  13. package/cli/ui.ts +20 -0
  14. package/cli/ws-bridge.ts +7 -36
  15. package/detox/frame-identity.cjs +21 -0
  16. package/detox/frame-identity.d.cts +6 -0
  17. package/detox/index.ts +39 -33
  18. package/detox/jest-environment.cjs +4 -1
  19. package/detox/jest-setup-after-env.cjs +0 -4
  20. package/detox/navigation-lifecycle.ts +2 -2
  21. package/detox/proof-observer.ts +126 -0
  22. package/dist-lib/agent-daemon-client.cjs +29 -1
  23. package/dist-lib/agent-events.cjs +1 -1
  24. package/dist-lib/attached-projects.cjs +10 -1
  25. package/dist-lib/auth/shared-session.cjs +1 -1
  26. package/dist-lib/backend-origin.cjs +1 -1
  27. package/dist-lib/beta.cjs +1 -1
  28. package/dist-lib/beta.mjs +1 -1
  29. package/dist-lib/bridge-constants.cjs +1 -1
  30. package/dist-lib/bridge-contract-input.cjs +1 -1
  31. package/dist-lib/bridge-contract-input.mjs +1 -1
  32. package/dist-lib/bridge-contract.cjs +1 -1
  33. package/dist-lib/bridge-contract.mjs +1 -1
  34. package/dist-lib/bundle-channel.cjs +557 -158
  35. package/dist-lib/capture-contract.cjs +1 -1
  36. package/dist-lib/capture-contract.mjs +1 -1
  37. package/dist-lib/cloud-contract.cjs +1 -1
  38. package/dist-lib/cloud-contract.mjs +1 -1
  39. package/dist-lib/cloud-test-args.cjs +1 -1
  40. package/dist-lib/cloud-test-args.mjs +1 -1
  41. package/dist-lib/cloud.cjs +1 -1
  42. package/dist-lib/cloud.mjs +1 -1
  43. package/dist-lib/config.cjs +1 -1
  44. package/dist-lib/config.mjs +1 -1
  45. package/dist-lib/detox/index.cjs +5098 -7344
  46. package/dist-lib/detox/jest-environment.cjs +4 -1
  47. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  48. package/dist-lib/expo-swift-bundle.cjs +602 -152
  49. package/dist-lib/expo-swift-metadata.cjs +1 -1
  50. package/dist-lib/expo-swift-metadata.mjs +1 -1
  51. package/dist-lib/home-paths.cjs +1 -1
  52. package/dist-lib/host/bridge-host.cjs +688 -194
  53. package/dist-lib/host/fetch-proxy-handler.cjs +6 -3
  54. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  55. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  56. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  57. package/dist-lib/host/websocket-proxy.cjs +1 -1
  58. package/dist-lib/index.cjs +247 -11
  59. package/dist-lib/jump-to-source-babel.cjs +1 -1
  60. package/dist-lib/jump-to-source-native.cjs +1 -1
  61. package/dist-lib/kotlin-host.cjs +1 -1
  62. package/dist-lib/menu.cjs +1 -1
  63. package/dist-lib/menu.mjs +1 -1
  64. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  65. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  66. package/dist-lib/metro-production-bundle.cjs +10 -1
  67. package/dist-lib/metro-production-bundle.mjs +12 -1
  68. package/dist-lib/metro.cjs +155 -5
  69. package/dist-lib/native-app-identity-project.cjs +43 -5
  70. package/dist-lib/native-app-identity-project.mjs +43 -5
  71. package/dist-lib/native-app-identity.cjs +1 -1
  72. package/dist-lib/native-app-identity.mjs +1 -1
  73. package/dist-lib/native-firebase-metadata.cjs +1 -1
  74. package/dist-lib/native-firebase-metadata.mjs +1 -1
  75. package/dist-lib/plist.cjs +1 -1
  76. package/dist-lib/plist.mjs +1 -1
  77. package/dist-lib/profiles.cjs +21 -1
  78. package/dist-lib/public-brand.cjs +1 -1
  79. package/dist-lib/public-origins-lib-esm.json +73 -27
  80. package/dist-lib/public-origins-lib-static.json +1 -1
  81. package/dist-lib/public-origins-lib.json +563 -183
  82. package/dist-lib/react-native-host-modules.cjs +1 -1
  83. package/dist-lib/react-native-host-modules.mjs +1 -1
  84. package/dist-lib/reap-browser.cjs +964 -0
  85. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  86. package/dist-lib/sdk.cjs +38 -5
  87. package/dist-lib/sdk.mjs +38 -5
  88. package/dist-lib/skills.cjs +1031 -530
  89. package/dist-lib/swift-compile.cjs +298 -86
  90. package/dist-lib/swift-compile.mjs +298 -86
  91. package/dist-lib/swift-package.cjs +53 -4
  92. package/dist-lib/swift-package.mjs +52 -4
  93. package/dist-lib/swift-submit.cjs +2 -2
  94. package/dist-lib/swift-submit.mjs +2 -2
  95. package/dist-lib/swift-toolchain.cjs +25 -44
  96. package/dist-lib/swift.cjs +1 -1
  97. package/dist-lib/vite-swift.cjs +603 -114
  98. package/dist-lib/vite.cjs +65 -3
  99. package/dist-lib/worklet-executable.cjs +1 -1
  100. package/dist-lib/worklet-executable.mjs +1 -1
  101. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +7 -0
  102. package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
  103. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
  104. package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +2 -1
  105. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +4 -1
  107. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +7 -0
  108. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +24 -0
  109. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +4 -2
  110. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
  111. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -0
  112. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +18 -0
  113. package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
  114. package/dist-types/packages/peach-globals/src/index.d.ts +2 -2
  115. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
  116. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  117. package/package.json +1 -1
  118. package/runtime-companion.json +1 -1
  119. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +2 -0
  120. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +54 -0
  121. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +23 -4
  122. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStore.h +439 -0
  123. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreCopySpecific.h +216 -0
  124. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreKey.h +267 -0
  125. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetwork.h +204 -0
  126. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConfiguration.h +1393 -0
  127. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConnection.h +568 -0
  128. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkReachability.h +369 -0
  129. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h +473 -0
  130. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesPath.h +179 -0
  131. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesSetSpecific.h +95 -0
  132. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h +2395 -0
  133. package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h +184 -0
  134. package/sdk/ios/usr/include/_ctype.h +388 -0
  135. package/sdk/ios/usr/include/_inttypes.h +296 -0
  136. package/sdk/ios/usr/include/_locale.h +83 -0
  137. package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
  138. package/sdk/ios/usr/include/_time.h +207 -0
  139. package/sdk/ios/usr/include/ctype.h +70 -0
  140. package/sdk/ios/usr/include/dispatch/dispatch.h +69 -6
  141. package/sdk/ios/usr/include/inttypes.h +35 -0
  142. package/sdk/ios/usr/include/libkern/OSByteOrder.h +315 -0
  143. package/sdk/ios/usr/include/libkern/machine/OSByteOrder.h +147 -0
  144. package/sdk/ios/usr/include/locale.h +59 -0
  145. package/sdk/ios/usr/include/runetype.h +118 -0
  146. package/sdk/ios/usr/include/setjmp.h +99 -0
  147. package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
  148. package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
  149. package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
  150. package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
  151. package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
  152. package/sdk/ios/usr/include/sys/cdefs.h +2 -0
  153. package/sdk/ios/usr/include/time.h +67 -2
  154. package/src/bridge-contract.ts +42 -0
  155. package/src/chromium-admission.ts +196 -0
  156. package/src/host/bridge-host.ts +6 -43
  157. package/src/host/rolldown-bundle-forward.ts +4 -1
  158. package/src/launch-deadline.ts +74 -0
  159. package/src/nitro-adapter.lock.json +3 -3
  160. package/src/profiles.ts +21 -0
  161. package/src/react-native-coverage/capability-reference-resolution.ts +402 -0
  162. package/src/react-native-coverage/capability-source-references.ts +1296 -0
  163. package/src/react-native-coverage/native-typescript-parser.ts +74 -0
  164. package/src/react-native-coverage/project-aliases.ts +207 -0
  165. package/src/react-native-coverage/verified-reach.ts +47 -0
  166. package/src/reap-browser.ts +1019 -0
  167. package/src/skills/builtin/a11y-review.ts +1 -1
  168. package/src/skills/builtin/perf-profile.ts +1 -1
  169. package/src/skills/builtin/screenshot-all.ts +1 -1
  170. package/src/skills/builtin/visual-diff.ts +1 -1
  171. package/src/swift-compile.ts +109 -57
  172. package/src/swift-coverage/indexdump.ts +80 -0
  173. package/src/swift-coverage/indexing.ts +147 -0
  174. package/src/swift-coverage/package.ts +230 -0
  175. package/src/swift-coverage/provenance.ts +47 -0
  176. package/src/swift-coverage/reader.ts +81 -0
  177. package/src/swift-coverage/source.ts +252 -0
  178. package/src/swift-coverage/types.ts +58 -0
  179. package/src/swift-coverage/xcode-assets.ts +175 -0
  180. package/src/swift-coverage/xcode-bridging.ts +160 -0
  181. package/src/swift-coverage/xcode-packages.ts +251 -0
  182. package/src/swift-coverage/xcode-strings.ts +78 -0
  183. package/src/swift-coverage/xcode.ts +656 -0
  184. package/src/swift-distribution.lock.json +8 -8
  185. package/src/swift-host.ts +21 -1
  186. package/src/swift-objc-compile.ts +7 -3
  187. package/src/swift-objc-import.ts +191 -27
  188. package/src/swift-objc-metadata.ts +2 -2
  189. package/src/swift-objc-standin.ts +9 -2
  190. package/src/swift-package-manifest.ts +134 -13
  191. package/src/swift-package.ts +69 -4
  192. package/src/swift-standins.ts +4 -1
  193. package/src/swift-submit.ts +2 -1
  194. package/src/swift-toolchain.ts +36 -61
  195. package/src/worker-system-chunks.ts +3 -10
  196. package/src/xcode-project.ts +5 -5
  197. package/detox/attempt-events.cjs +0 -914
  198. package/detox/attempt-events.d.cts +0 -113
  199. package/detox/motion-change.cjs +0 -524
  200. package/detox/motion-change.d.cts +0 -140
  201. package/detox/motion-leg-starts.cjs +0 -20
  202. package/detox/motion-leg-starts.d.cts +0 -8
  203. package/detox/proof-frame.cjs +0 -190
  204. package/detox/record-block-execution.cjs +0 -78
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1667 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -35,6 +35,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  ));
36
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
 
38
+ // <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
39
+ var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
40
+ "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
41
+ }
42
+ });
43
+
38
44
  // src/home-paths.ts
39
45
  function rnxHomeDir() {
40
46
  const override = process.env[PEACH_HOME_ENV];
@@ -61,6 +67,7 @@ var import_node_os, import_node_path, PEACH_HOME_ENV, DAEMON_LOCKFILE_MAX_BYTES;
61
67
  var init_home_paths = __esm({
62
68
  "src/home-paths.ts"() {
63
69
  "use strict";
70
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
64
71
  import_node_os = require("node:os");
65
72
  import_node_path = __toESM(require("node:path"), 1);
66
73
  PEACH_HOME_ENV = "PEACH_HOME";
@@ -383,6 +390,7 @@ var import_node_child_process2, import_node_fs, import_node_os2, import_node_pat
383
390
  var init_process_group = __esm({
384
391
  "src/process-group.ts"() {
385
392
  "use strict";
393
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
386
394
  import_node_child_process2 = require("node:child_process");
387
395
  import_node_fs = require("node:fs");
388
396
  import_node_os2 = require("node:os");
@@ -398,6 +406,7 @@ var init_process_group = __esm({
398
406
  // ../../node_modules/json5/lib/unicode.js
399
407
  var require_unicode = __commonJS({
400
408
  "../../node_modules/json5/lib/unicode.js"(exports2, module2) {
409
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
401
410
  module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
402
411
  module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
403
412
  module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
@@ -407,6 +416,7 @@ var require_unicode = __commonJS({
407
416
  // ../../node_modules/json5/lib/util.js
408
417
  var require_util = __commonJS({
409
418
  "../../node_modules/json5/lib/util.js"(exports2, module2) {
419
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
410
420
  var unicode = require_unicode();
411
421
  module2.exports = {
412
422
  isSpaceSeparator(c) {
@@ -431,6 +441,7 @@ var require_util = __commonJS({
431
441
  // ../../node_modules/json5/lib/parse.js
432
442
  var require_parse = __commonJS({
433
443
  "../../node_modules/json5/lib/parse.js"(exports2, module2) {
444
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
434
445
  var util = require_util();
435
446
  var source;
436
447
  var parseState;
@@ -1278,6 +1289,7 @@ var require_parse = __commonJS({
1278
1289
  // ../../node_modules/json5/lib/stringify.js
1279
1290
  var require_stringify = __commonJS({
1280
1291
  "../../node_modules/json5/lib/stringify.js"(exports2, module2) {
1292
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1281
1293
  var util = require_util();
1282
1294
  module2.exports = function stringify4(value, replacer, space) {
1283
1295
  const stack = [];
@@ -1497,6 +1509,7 @@ var require_stringify = __commonJS({
1497
1509
  // ../../node_modules/json5/lib/index.js
1498
1510
  var require_lib = __commonJS({
1499
1511
  "../../node_modules/json5/lib/index.js"(exports2, module2) {
1512
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1500
1513
  var parse3 = require_parse();
1501
1514
  var stringify4 = require_stringify();
1502
1515
  var JSON52 = {
@@ -1511,6 +1524,7 @@ var require_lib = __commonJS({
1511
1524
  var init_version = __esm({
1512
1525
  "../contrast-runtime-delivery/src/version.ts"() {
1513
1526
  "use strict";
1527
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1514
1528
  }
1515
1529
  });
1516
1530
 
@@ -1518,6 +1532,7 @@ var init_version = __esm({
1518
1532
  var init_product = __esm({
1519
1533
  "../contrast-runtime-delivery/src/product.ts"() {
1520
1534
  "use strict";
1535
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1521
1536
  init_version();
1522
1537
  }
1523
1538
  });
@@ -1665,6 +1680,7 @@ var import_node_child_process9, import_node_crypto10, import_node_fs12, import_n
1665
1680
  var init_src = __esm({
1666
1681
  "../contrast-runtime-delivery/src/index.ts"() {
1667
1682
  "use strict";
1683
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1668
1684
  import_node_child_process9 = require("node:child_process");
1669
1685
  import_node_crypto10 = __toESM(require("node:crypto"), 1);
1670
1686
  import_node_fs12 = __toESM(require("node:fs"), 1);
@@ -1697,13 +1713,19 @@ __export(vite_plugin_swift_exports, {
1697
1713
  swiftPlugin: () => swiftPlugin
1698
1714
  });
1699
1715
  module.exports = __toCommonJS(vite_plugin_swift_exports);
1716
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1700
1717
  var import_node_fs24 = __toESM(require("node:fs"), 1);
1701
1718
  var import_node_path25 = __toESM(require("node:path"), 1);
1702
1719
 
1703
1720
  // ../sootsim-swift/src/bundleAssets.ts
1721
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1704
1722
  var import_svgpath = __toESM(require("svgpath"), 1);
1705
1723
 
1724
+ // src/assetCatalogContract.ts
1725
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1726
+
1706
1727
  // src/swiftContract.ts
1728
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1707
1729
  function isSwiftObjCPeerStartup(value) {
1708
1730
  return value !== null && typeof value === "object" && "registration" in value && isSwiftResourcePath(value.registration) && value.registration.endsWith(".swift") && Object.keys(value).length === 1;
1709
1731
  }
@@ -2081,6 +2103,7 @@ function resolveSwiftImageResourceUrls(resources, origin) {
2081
2103
  }
2082
2104
 
2083
2105
  // ../sootsim-swift/src/entryModule.ts
2106
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2084
2107
  function nativeExportLines(args, commonjs) {
2085
2108
  const native = args.native;
2086
2109
  if (!native) return [];
@@ -2108,12 +2131,16 @@ function swiftEntryModuleEsm(args) {
2108
2131
  }
2109
2132
 
2110
2133
  // src/swift-compile.ts
2134
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2111
2135
  var import_node_child_process7 = require("node:child_process");
2112
2136
  var import_node_crypto7 = require("node:crypto");
2113
2137
  var import_node_fs8 = require("node:fs");
2114
2138
  var import_node_os4 = __toESM(require("node:os"), 1);
2115
2139
  var import_node_path10 = __toESM(require("node:path"), 1);
2116
2140
 
2141
+ // ../../node_modules/yaml/browser/index.js
2142
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2143
+
2117
2144
  // ../../node_modules/yaml/browser/dist/index.js
2118
2145
  var dist_exports = {};
2119
2146
  __export(dist_exports, {
@@ -2147,8 +2174,16 @@ __export(dist_exports, {
2147
2174
  visit: () => visit,
2148
2175
  visitAsync: () => visitAsync
2149
2176
  });
2177
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2178
+
2179
+ // ../../node_modules/yaml/browser/dist/compose/composer.js
2180
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2181
+
2182
+ // ../../node_modules/yaml/browser/dist/doc/directives.js
2183
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2150
2184
 
2151
2185
  // ../../node_modules/yaml/browser/dist/nodes/identity.js
2186
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2152
2187
  var ALIAS = Symbol.for("yaml.alias");
2153
2188
  var DOC = Symbol.for("yaml.document");
2154
2189
  var MAP = Symbol.for("yaml.map");
@@ -2185,6 +2220,7 @@ function isNode(node) {
2185
2220
  var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
2186
2221
 
2187
2222
  // ../../node_modules/yaml/browser/dist/visit.js
2223
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2188
2224
  var BREAK = Symbol("break visit");
2189
2225
  var SKIP = Symbol("skip children");
2190
2226
  var REMOVE = Symbol("remove node");
@@ -2497,7 +2533,14 @@ var Directives = class _Directives {
2497
2533
  Directives.defaultYaml = { explicit: false, version: "1.2" };
2498
2534
  Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
2499
2535
 
2536
+ // ../../node_modules/yaml/browser/dist/doc/Document.js
2537
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2538
+
2539
+ // ../../node_modules/yaml/browser/dist/nodes/Alias.js
2540
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2541
+
2500
2542
  // ../../node_modules/yaml/browser/dist/doc/anchors.js
2543
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2501
2544
  function anchorIsValid(anchor) {
2502
2545
  if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
2503
2546
  const sa = JSON.stringify(anchor);
@@ -2556,7 +2599,11 @@ function createNodeAnchors(doc, prefix) {
2556
2599
  };
2557
2600
  }
2558
2601
 
2602
+ // ../../node_modules/yaml/browser/dist/nodes/Node.js
2603
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2604
+
2559
2605
  // ../../node_modules/yaml/browser/dist/doc/applyReviver.js
2606
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2560
2607
  function applyReviver(reviver, obj, key2, val) {
2561
2608
  if (val && typeof val === "object") {
2562
2609
  if (Array.isArray(val)) {
@@ -2601,6 +2648,7 @@ function applyReviver(reviver, obj, key2, val) {
2601
2648
  }
2602
2649
 
2603
2650
  // ../../node_modules/yaml/browser/dist/nodes/toJS.js
2651
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2604
2652
  function toJS(value, arg, ctx) {
2605
2653
  if (Array.isArray(value))
2606
2654
  return value.map((v, i) => toJS(v, String(i), ctx));
@@ -2760,7 +2808,14 @@ function getAliasCount(doc, node, anchors) {
2760
2808
  return 1;
2761
2809
  }
2762
2810
 
2811
+ // ../../node_modules/yaml/browser/dist/nodes/Collection.js
2812
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2813
+
2814
+ // ../../node_modules/yaml/browser/dist/doc/createNode.js
2815
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2816
+
2763
2817
  // ../../node_modules/yaml/browser/dist/nodes/Scalar.js
2818
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2764
2819
  var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
2765
2820
  var Scalar = class extends NodeBase {
2766
2821
  constructor(value) {
@@ -2978,7 +3033,17 @@ var Collection = class extends NodeBase {
2978
3033
  }
2979
3034
  };
2980
3035
 
3036
+ // ../../node_modules/yaml/browser/dist/nodes/Pair.js
3037
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3038
+
3039
+ // ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
3040
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3041
+
3042
+ // ../../node_modules/yaml/browser/dist/stringify/stringify.js
3043
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3044
+
2981
3045
  // ../../node_modules/yaml/browser/dist/stringify/stringifyComment.js
3046
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2982
3047
  var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
2983
3048
  function indentComment(comment, indent) {
2984
3049
  if (/^\n+$/.test(comment))
@@ -2987,7 +3052,11 @@ function indentComment(comment, indent) {
2987
3052
  }
2988
3053
  var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
2989
3054
 
3055
+ // ../../node_modules/yaml/browser/dist/stringify/stringifyString.js
3056
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3057
+
2990
3058
  // ../../node_modules/yaml/browser/dist/stringify/foldFlowLines.js
3059
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2991
3060
  var FOLD_FLOW = "flow";
2992
3061
  var FOLD_BLOCK = "block";
2993
3062
  var FOLD_QUOTED = "quoted";
@@ -3625,7 +3694,11 @@ ${ctx.indent}`;
3625
3694
  return str2;
3626
3695
  }
3627
3696
 
3697
+ // ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
3698
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3699
+
3628
3700
  // ../../node_modules/yaml/browser/dist/log.js
3701
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3629
3702
  function warn(logLevel, warning) {
3630
3703
  if (logLevel === "debug" || logLevel === "warn") {
3631
3704
  console.warn(warning);
@@ -3633,6 +3706,7 @@ function warn(logLevel, warning) {
3633
3706
  }
3634
3707
 
3635
3708
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
3709
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3636
3710
  var MERGE_KEY = "<<";
3637
3711
  var merge = {
3638
3712
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
@@ -3764,7 +3838,17 @@ var Pair = class _Pair {
3764
3838
  }
3765
3839
  };
3766
3840
 
3841
+ // ../../node_modules/yaml/browser/dist/schema/Schema.js
3842
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3843
+
3844
+ // ../../node_modules/yaml/browser/dist/schema/common/map.js
3845
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3846
+
3847
+ // ../../node_modules/yaml/browser/dist/nodes/YAMLMap.js
3848
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3849
+
3767
3850
  // ../../node_modules/yaml/browser/dist/stringify/stringifyCollection.js
3851
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
3768
3852
  function stringifyCollection(collection, ctx, options) {
3769
3853
  const flow = ctx.inFlow ?? collection.flow;
3770
3854
  const stringify4 = flow ? stringifyFlowCollection : stringifyBlockCollection;
@@ -4051,7 +4135,11 @@ var map = {
4051
4135
  createNode: (schema4, obj, ctx) => YAMLMap.from(schema4, obj, ctx)
4052
4136
  };
4053
4137
 
4138
+ // ../../node_modules/yaml/browser/dist/schema/common/seq.js
4139
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4140
+
4054
4141
  // ../../node_modules/yaml/browser/dist/nodes/YAMLSeq.js
4142
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4055
4143
  var YAMLSeq = class extends Collection {
4056
4144
  static get tagName() {
4057
4145
  return "tag:yaml.org,2002:seq";
@@ -4170,6 +4258,7 @@ var seq = {
4170
4258
  };
4171
4259
 
4172
4260
  // ../../node_modules/yaml/browser/dist/schema/common/string.js
4261
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4173
4262
  var string = {
4174
4263
  identify: (value) => typeof value === "string",
4175
4264
  default: true,
@@ -4181,7 +4270,11 @@ var string = {
4181
4270
  }
4182
4271
  };
4183
4272
 
4273
+ // ../../node_modules/yaml/browser/dist/schema/tags.js
4274
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4275
+
4184
4276
  // ../../node_modules/yaml/browser/dist/schema/common/null.js
4277
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4185
4278
  var nullTag = {
4186
4279
  identify: (value) => value == null,
4187
4280
  createNode: () => new Scalar(null),
@@ -4193,6 +4286,7 @@ var nullTag = {
4193
4286
  };
4194
4287
 
4195
4288
  // ../../node_modules/yaml/browser/dist/schema/core/bool.js
4289
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4196
4290
  var boolTag = {
4197
4291
  identify: (value) => typeof value === "boolean",
4198
4292
  default: true,
@@ -4209,7 +4303,11 @@ var boolTag = {
4209
4303
  }
4210
4304
  };
4211
4305
 
4306
+ // ../../node_modules/yaml/browser/dist/schema/core/float.js
4307
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4308
+
4212
4309
  // ../../node_modules/yaml/browser/dist/stringify/stringifyNumber.js
4310
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4213
4311
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
4214
4312
  if (typeof value === "bigint")
4215
4313
  return String(value);
@@ -4267,6 +4365,7 @@ var float = {
4267
4365
  };
4268
4366
 
4269
4367
  // ../../node_modules/yaml/browser/dist/schema/core/int.js
4368
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4270
4369
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
4271
4370
  var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
4272
4371
  function intStringify(node, radix, prefix) {
@@ -4303,6 +4402,7 @@ var intHex = {
4303
4402
  };
4304
4403
 
4305
4404
  // ../../node_modules/yaml/browser/dist/schema/core/schema.js
4405
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4306
4406
  var schema = [
4307
4407
  map,
4308
4408
  seq,
@@ -4318,6 +4418,7 @@ var schema = [
4318
4418
  ];
4319
4419
 
4320
4420
  // ../../node_modules/yaml/browser/dist/schema/json/schema.js
4421
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4321
4422
  function intIdentify2(value) {
4322
4423
  return typeof value === "bigint" || Number.isInteger(value);
4323
4424
  }
@@ -4376,6 +4477,7 @@ var jsonError = {
4376
4477
  var schema2 = [map, seq].concat(jsonScalars, jsonError);
4377
4478
 
4378
4479
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
4480
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4379
4481
  var binary = {
4380
4482
  identify: (value) => value instanceof Uint8Array,
4381
4483
  // Buffer inherits from Uint8Array
@@ -4428,7 +4530,11 @@ var binary = {
4428
4530
  }
4429
4531
  };
4430
4532
 
4533
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
4534
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4535
+
4431
4536
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
4537
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4432
4538
  function resolvePairs(seq2, onError) {
4433
4539
  if (isSeq(seq2)) {
4434
4540
  for (let i = 0; i < seq2.items.length; ++i) {
@@ -4560,7 +4666,11 @@ var omap = {
4560
4666
  createNode: (schema4, iterable, ctx) => YAMLOMap.from(schema4, iterable, ctx)
4561
4667
  };
4562
4668
 
4669
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js
4670
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4671
+
4563
4672
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
4673
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4564
4674
  function boolStringify({ value, source }, ctx) {
4565
4675
  const boolObj = value ? trueTag : falseTag;
4566
4676
  if (source && boolObj.test.test(source))
@@ -4585,6 +4695,7 @@ var falseTag = {
4585
4695
  };
4586
4696
 
4587
4697
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/float.js
4698
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4588
4699
  var floatNaN2 = {
4589
4700
  identify: (value) => typeof value === "number",
4590
4701
  default: true,
@@ -4624,6 +4735,7 @@ var float2 = {
4624
4735
  };
4625
4736
 
4626
4737
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/int.js
4738
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4627
4739
  var intIdentify3 = (value) => typeof value === "bigint" || Number.isInteger(value);
4628
4740
  function intResolve2(str2, offset, radix, { intAsBigInt }) {
4629
4741
  const sign = str2[0];
@@ -4693,6 +4805,7 @@ var intHex2 = {
4693
4805
  };
4694
4806
 
4695
4807
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
4808
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4696
4809
  var YAMLSet = class _YAMLSet extends YAMLMap {
4697
4810
  constructor(schema4) {
4698
4811
  super(schema4);
@@ -4772,6 +4885,7 @@ var set = {
4772
4885
  };
4773
4886
 
4774
4887
  // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
4888
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4775
4889
  function parseSexagesimal(str2, asBigInt) {
4776
4890
  const sign = str2[0];
4777
4891
  const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
@@ -4968,6 +5082,7 @@ var Schema = class _Schema {
4968
5082
  };
4969
5083
 
4970
5084
  // ../../node_modules/yaml/browser/dist/stringify/stringifyDocument.js
5085
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4971
5086
  function stringifyDocument(doc, options) {
4972
5087
  const lines = [];
4973
5088
  let hasDirectives = options.directives === true;
@@ -5331,6 +5446,7 @@ function assertCollection(contents) {
5331
5446
  }
5332
5447
 
5333
5448
  // ../../node_modules/yaml/browser/dist/errors.js
5449
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5334
5450
  var YAMLError = class extends Error {
5335
5451
  constructor(name3, pos, code, message) {
5336
5452
  super();
@@ -5386,7 +5502,20 @@ ${pointer}
5386
5502
  }
5387
5503
  };
5388
5504
 
5505
+ // ../../node_modules/yaml/browser/dist/compose/compose-doc.js
5506
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5507
+
5508
+ // ../../node_modules/yaml/browser/dist/compose/compose-node.js
5509
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5510
+
5511
+ // ../../node_modules/yaml/browser/dist/compose/compose-collection.js
5512
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5513
+
5514
+ // ../../node_modules/yaml/browser/dist/compose/resolve-block-map.js
5515
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5516
+
5389
5517
  // ../../node_modules/yaml/browser/dist/compose/resolve-props.js
5518
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5390
5519
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
5391
5520
  let spaceBefore = false;
5392
5521
  let atNewline = startOnNewline;
@@ -5515,6 +5644,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
5515
5644
  }
5516
5645
 
5517
5646
  // ../../node_modules/yaml/browser/dist/compose/util-contains-newline.js
5647
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5518
5648
  function containsNewline(key2) {
5519
5649
  if (!key2)
5520
5650
  return null;
@@ -5551,6 +5681,7 @@ function containsNewline(key2) {
5551
5681
  }
5552
5682
 
5553
5683
  // ../../node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
5684
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5554
5685
  function flowIndentCheck(indent, fc, onError) {
5555
5686
  if (fc?.type === "flow-collection") {
5556
5687
  const end = fc.end[0];
@@ -5562,6 +5693,7 @@ function flowIndentCheck(indent, fc, onError) {
5562
5693
  }
5563
5694
 
5564
5695
  // ../../node_modules/yaml/browser/dist/compose/util-map-includes.js
5696
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5565
5697
  function mapIncludes(ctx, items2, search) {
5566
5698
  const { uniqueKeys } = ctx.options;
5567
5699
  if (uniqueKeys === false)
@@ -5667,6 +5799,7 @@ function resolveBlockMap({ composeNode: composeNode2, composeEmptyNode: composeE
5667
5799
  }
5668
5800
 
5669
5801
  // ../../node_modules/yaml/browser/dist/compose/resolve-block-seq.js
5802
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5670
5803
  function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode: composeEmptyNode2 }, ctx, bs, onError, tag) {
5671
5804
  const NodeClass = tag?.nodeClass ?? YAMLSeq;
5672
5805
  const seq2 = new NodeClass(ctx.schema);
@@ -5708,7 +5841,11 @@ function resolveBlockSeq({ composeNode: composeNode2, composeEmptyNode: composeE
5708
5841
  return seq2;
5709
5842
  }
5710
5843
 
5844
+ // ../../node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
5845
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5846
+
5711
5847
  // ../../node_modules/yaml/browser/dist/compose/resolve-end.js
5848
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5712
5849
  function resolveEnd(end, offset, reqSpace, onError) {
5713
5850
  let comment = "";
5714
5851
  if (end) {
@@ -5977,7 +6114,11 @@ function composeCollection(CN2, ctx, token, props, onError) {
5977
6114
  return node;
5978
6115
  }
5979
6116
 
6117
+ // ../../node_modules/yaml/browser/dist/compose/compose-scalar.js
6118
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6119
+
5980
6120
  // ../../node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
6121
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5981
6122
  function resolveBlockScalar(ctx, scalar, onError) {
5982
6123
  const start = scalar.offset;
5983
6124
  const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
@@ -6154,6 +6295,7 @@ function splitLines(source) {
6154
6295
  }
6155
6296
 
6156
6297
  // ../../node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
6298
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6157
6299
  function resolveFlowScalar(scalar, strict, onError) {
6158
6300
  const { offset, type, source, end } = scalar;
6159
6301
  let _type;
@@ -6437,6 +6579,7 @@ function findScalarTagByTest({ atKey, directives, schema: schema4 }, value, toke
6437
6579
  }
6438
6580
 
6439
6581
  // ../../node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
6582
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6440
6583
  function emptyScalarPosition(offset, before, pos) {
6441
6584
  if (before) {
6442
6585
  pos ?? (pos = before.length);
@@ -6796,8 +6939,10 @@ __export(cst_exports, {
6796
6939
  tokenType: () => tokenType,
6797
6940
  visit: () => visit2
6798
6941
  });
6942
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6799
6943
 
6800
6944
  // ../../node_modules/yaml/browser/dist/parse/cst-scalar.js
6945
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6801
6946
  function resolveAsScalar(token, strict = true, onError) {
6802
6947
  if (token) {
6803
6948
  const _onError = (pos, code, message) => {
@@ -6971,6 +7116,7 @@ function setFlowScalarValue(token, source, type) {
6971
7116
  }
6972
7117
 
6973
7118
  // ../../node_modules/yaml/browser/dist/parse/cst-stringify.js
7119
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6974
7120
  var stringify2 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
6975
7121
  function stringifyToken(token) {
6976
7122
  switch (token.type) {
@@ -7026,6 +7172,7 @@ function stringifyItem({ start, key: key2, sep, value }) {
7026
7172
  }
7027
7173
 
7028
7174
  // ../../node_modules/yaml/browser/dist/parse/cst-visit.js
7175
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7029
7176
  var BREAK2 = Symbol("break visit");
7030
7177
  var SKIP2 = Symbol("skip children");
7031
7178
  var REMOVE2 = Symbol("remove item");
@@ -7163,6 +7310,7 @@ function tokenType(source) {
7163
7310
  }
7164
7311
 
7165
7312
  // ../../node_modules/yaml/browser/dist/parse/lexer.js
7313
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7166
7314
  function isEmpty(ch) {
7167
7315
  switch (ch) {
7168
7316
  case void 0:
@@ -7745,6 +7893,7 @@ var Lexer = class {
7745
7893
  };
7746
7894
 
7747
7895
  // ../../node_modules/yaml/browser/dist/parse/line-counter.js
7896
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7748
7897
  var LineCounter = class {
7749
7898
  constructor() {
7750
7899
  this.lineStarts = [];
@@ -7770,6 +7919,7 @@ var LineCounter = class {
7770
7919
  };
7771
7920
 
7772
7921
  // ../../node_modules/yaml/browser/dist/parse/parser.js
7922
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
7773
7923
  function includesToken(list2, type) {
7774
7924
  for (let i = 0; i < list2.length; ++i)
7775
7925
  if (list2[i].type === type)
@@ -8633,6 +8783,7 @@ var Parser = class {
8633
8783
  };
8634
8784
 
8635
8785
  // ../../node_modules/yaml/browser/dist/public-api.js
8786
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8636
8787
  function parseOptions(options) {
8637
8788
  const prettyErrors = options.prettyErrors !== false;
8638
8789
  const lineCounter = options.lineCounter || prettyErrors && new LineCounter() || null;
@@ -8717,6 +8868,7 @@ function stringify3(value, replacer, options) {
8717
8868
  var browser_default = dist_exports;
8718
8869
 
8719
8870
  // src/admitted-mac-build.ts
8871
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8720
8872
  var import_node_child_process = require("node:child_process");
8721
8873
  function windowAdmission() {
8722
8874
  const result = (0, import_node_child_process.spawnSync)("tm", ["window", "ancestor", "--json"], {
@@ -8746,6 +8898,7 @@ function admittedMacBuilderSlot(env = process.env) {
8746
8898
  init_home_paths();
8747
8899
 
8748
8900
  // src/is-record.ts
8901
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8749
8902
  function isRecord(value) {
8750
8903
  return typeof value === "object" && value !== null && !Array.isArray(value);
8751
8904
  }
@@ -8753,7 +8906,11 @@ function isRecord(value) {
8753
8906
  // src/swift-compile.ts
8754
8907
  init_process_group();
8755
8908
 
8909
+ // src/swift-compiler-digest.ts
8910
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8911
+
8756
8912
  // src/swift-objc-sdk-tree.ts
8913
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8757
8914
  var import_node_fs2 = require("node:fs");
8758
8915
  var import_node_path3 = __toESM(require("node:path"), 1);
8759
8916
  function readIosSdkTree(root) {
@@ -8767,6 +8924,7 @@ function readIosSdkTree(root) {
8767
8924
  }
8768
8925
 
8769
8926
  // src/swift-design-time.ts
8927
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
8770
8928
  var IDENT = /[A-Za-z_À-￿$0-9]/;
8771
8929
  function tokenize(source) {
8772
8930
  const tokens = [];
@@ -9187,6 +9345,7 @@ function designTimeDiagnostic(output, files2) {
9187
9345
  }
9188
9346
 
9189
9347
  // src/swift-distribution-contract.ts
9348
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9190
9349
  var SWIFT_DISTRIBUTION_MANIFEST = "distribution.json";
9191
9350
  var SWIFT_DISTRIBUTION_HOSTS = [
9192
9351
  "darwin-arm64",
@@ -9259,6 +9418,7 @@ function swiftDistributionKey(id, host2) {
9259
9418
  }
9260
9419
 
9261
9420
  // src/swift-icu.ts
9421
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9262
9422
  var import_node_child_process4 = require("node:child_process");
9263
9423
  var import_node_crypto2 = require("node:crypto");
9264
9424
  var import_node_fs4 = require("node:fs");
@@ -9267,6 +9427,7 @@ var import_node_util = require("node:util");
9267
9427
  var import_node_zlib = require("node:zlib");
9268
9428
 
9269
9429
  // src/swift-toolchain.ts
9430
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9270
9431
  var import_node_child_process3 = require("node:child_process");
9271
9432
  var import_node_crypto = require("node:crypto");
9272
9433
  var import_node_fs3 = __toESM(require("node:fs"), 1);
@@ -9284,7 +9445,17 @@ function sourceSwiftCheckout() {
9284
9445
  }
9285
9446
  function swiftSdkOptions() {
9286
9447
  const directory = process.env.PEACH_SWIFT_SDKS_PATH;
9287
- return directory ? ["--swift-sdks-path", import_node_path4.default.resolve(directory)] : [];
9448
+ if (directory) return ["--swift-sdks-path", import_node_path4.default.resolve(directory)];
9449
+ if (scratch && process.platform === "linux") {
9450
+ const config = process.env.XDG_CONFIG_HOME;
9451
+ if (config !== void 0 && !import_node_path4.default.isAbsolute(config))
9452
+ throw new Error("XDG_CONFIG_HOME must be an absolute path");
9453
+ return [
9454
+ "--swift-sdks-path",
9455
+ config === void 0 ? import_node_path4.default.join(import_node_os3.default.userInfo().homedir, ".swiftpm", "swift-sdks") : import_node_path4.default.join(config, "swiftpm", "swift-sdks")
9456
+ ];
9457
+ }
9458
+ return [];
9288
9459
  }
9289
9460
  var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae";
9290
9461
  var SWIFT_HOST_COMPILER_ID = "0d775d32d7c74eae";
@@ -9343,10 +9514,16 @@ function peachHome() {
9343
9514
  return override ? import_node_path4.default.resolve(override) : import_node_path4.default.join(import_node_os3.default.homedir(), ".peach");
9344
9515
  }
9345
9516
  var scratch;
9346
- var swiftHome;
9347
9517
  function swiftEnvironment(base = process.env) {
9348
9518
  if (!scratch) return base;
9349
- return swiftHome ? { ...base, TMPDIR: scratch, HOME: swiftHome } : { ...base, TMPDIR: scratch };
9519
+ return {
9520
+ ...base,
9521
+ TMPDIR: scratch.directory,
9522
+ XDG_CONFIG_HOME: import_node_path4.default.join(scratch.home, ".config"),
9523
+ XDG_CACHE_HOME: import_node_path4.default.join(scratch.home, ".cache"),
9524
+ XDG_DATA_HOME: import_node_path4.default.join(scratch.home, ".local", "share"),
9525
+ ...process.platform === "linux" ? { HOME: scratch.home } : {}
9526
+ };
9350
9527
  }
9351
9528
  function swiftSourceSdk(root) {
9352
9529
  const pin = JSON.parse(
@@ -9467,7 +9644,7 @@ function verifySwiftSdk(swift, sdk) {
9467
9644
  function installSwiftSdkArchive(swift, sdk, archive) {
9468
9645
  validateSwiftSdkIdentity(sdk);
9469
9646
  const staging = import_node_fs3.default.realpathSync(
9470
- import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch ?? import_node_os3.default.tmpdir(), "peach-sdk-verification-"))
9647
+ import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch?.directory ?? import_node_os3.default.tmpdir(), "peach-sdk-verification-"))
9471
9648
  );
9472
9649
  try {
9473
9650
  if (swiftFileChecksum(archive) !== sdk.wasmSdkChecksum)
@@ -9543,7 +9720,7 @@ function installSwiftWasmSdk(release, sdk) {
9543
9720
  } catch {
9544
9721
  }
9545
9722
  const swift = import_node_path4.default.join(swiftCompiler(release), "swift");
9546
- const staging = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch ?? import_node_os3.default.tmpdir(), "builder-swift-sdk-"));
9723
+ const staging = import_node_fs3.default.mkdtempSync(import_node_path4.default.join(scratch?.directory ?? import_node_os3.default.tmpdir(), "builder-swift-sdk-"));
9547
9724
  const archive = import_node_path4.default.join(staging, "sdk.artifactbundle.tar.gz");
9548
9725
  try {
9549
9726
  if (sdk.wasmSdkUrl.startsWith("file:"))
@@ -9779,6 +9956,7 @@ function icuSegment(object2) {
9779
9956
  }
9780
9957
 
9781
9958
  // src/swift-objc-export.ts
9959
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
9782
9960
  var import_node_crypto3 = require("node:crypto");
9783
9961
  function swiftObjCExports(args) {
9784
9962
  const classes = [];
@@ -10219,6 +10397,7 @@ _objcRegisterPeerClass(${owner.name}.self, nativeName: "${owner.native}")
10219
10397
  }
10220
10398
 
10221
10399
  // src/swift-objc-import.ts
10400
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
10222
10401
  var import_node_crypto4 = require("node:crypto");
10223
10402
  var SwiftObjCImportError = class extends Error {
10224
10403
  };
@@ -10355,6 +10534,7 @@ function swiftObjCImports(graphs, options) {
10355
10534
  const categories = /* @__PURE__ */ new Map();
10356
10535
  const functions = /* @__PURE__ */ new Map();
10357
10536
  const typedefs = /* @__PURE__ */ new Map();
10537
+ const wrappedTypedefs = /* @__PURE__ */ new Map();
10358
10538
  const visit3 = (node) => {
10359
10539
  if (!record(node)) return;
10360
10540
  if (node.kind === "ObjCInterfaceDecl" && typeof node.name === "string" && selected.has(node.name)) {
@@ -10376,6 +10556,9 @@ function swiftObjCImports(graphs, options) {
10376
10556
  if (node.kind === "TypedefDecl" && typeof node.name === "string" && record(node.type)) {
10377
10557
  const canonical2 = node.type.desugaredQualType ?? node.type.qualType;
10378
10558
  if (typeof canonical2 === "string") typedefs.set(node.name, canonical2);
10559
+ if (nodes(node.inner).some((attribute) => attribute.kind === "SwiftNewTypeAttr")) {
10560
+ wrappedTypedefs.set(node.name, [...wrappedTypedefs.get(node.name) ?? [], node]);
10561
+ }
10379
10562
  }
10380
10563
  for (const child of nodes(node.inner)) visit3(child);
10381
10564
  };
@@ -10383,14 +10566,29 @@ function swiftObjCImports(graphs, options) {
10383
10566
  fail("declarations", "expected a complete Clang translation unit AST");
10384
10567
  visit3(options.clangAST);
10385
10568
  const symbols = /* @__PURE__ */ new Map();
10569
+ const seenSymbols = /* @__PURE__ */ new Set();
10386
10570
  for (const graph of graphs) {
10387
10571
  if (graph.module.name !== options.module)
10388
10572
  fail("declarations", `symbol graph belongs to ${graph.module.name}`);
10389
10573
  for (const symbol of graph.symbols) {
10390
- const previous = symbols.get(symbol.identifier.precise);
10391
- if (previous && JSON.stringify(previous) !== JSON.stringify(symbol))
10392
- fail(symbol.identifier.precise, "ambiguous imported declaration");
10393
- symbols.set(symbol.identifier.precise, symbol);
10574
+ if (symbol.availability?.some(
10575
+ (entry) => entry.isUnconditionallyUnavailable && (!entry.domain || entry.domain === "Swift" || entry.domain === "iOS")
10576
+ ))
10577
+ continue;
10578
+ const key2 = JSON.stringify([
10579
+ symbol.identifier.precise,
10580
+ symbol.kind.identifier,
10581
+ symbol.pathComponents,
10582
+ symbol.declarationFragments,
10583
+ symbol.functionSignature,
10584
+ symbol.accessLevel,
10585
+ symbol.availability
10586
+ ]);
10587
+ if (seenSymbols.has(key2)) continue;
10588
+ seenSymbols.add(key2);
10589
+ const overloads = symbols.get(symbol.identifier.precise) ?? [];
10590
+ overloads.push(symbol);
10591
+ symbols.set(symbol.identifier.precise, overloads);
10394
10592
  }
10395
10593
  }
10396
10594
  const classes = [];
@@ -10405,7 +10603,10 @@ function swiftObjCImports(graphs, options) {
10405
10603
  types.set(name3, nativeName);
10406
10604
  }
10407
10605
  for (const nativeName of [...selected].sort()) {
10408
- const symbol = symbols.get(`c:objc(cs)${nativeName}`);
10606
+ const candidates = symbols.get(`c:objc(cs)${nativeName}`);
10607
+ if (candidates && candidates.length !== 1)
10608
+ fail(nativeName, "ambiguous imported class declaration");
10609
+ const symbol = candidates?.[0];
10409
10610
  const name3 = symbol?.pathComponents[0];
10410
10611
  if (!symbol || symbol.kind.identifier !== "swift.class" || !name3 || !identifier(name3))
10411
10612
  fail(nativeName, "missing Swift-imported class declaration");
@@ -10420,6 +10621,70 @@ function swiftObjCImports(graphs, options) {
10420
10621
  types.set(name3, nativeName);
10421
10622
  classes.push({ name: name3, nativeName });
10422
10623
  }
10624
+ const wrapperMembers = /* @__PURE__ */ new Map();
10625
+ const wrapperConformances = /* @__PURE__ */ new Map();
10626
+ for (const graph of graphs)
10627
+ for (const edge of graph.relationships)
10628
+ if (edge.kind === "conformsTo" && edge.source.includes("@T@")) {
10629
+ const protocols = wrapperConformances.get(edge.source) ?? /* @__PURE__ */ new Set();
10630
+ protocols.add(edge.target);
10631
+ wrapperConformances.set(edge.source, protocols);
10632
+ }
10633
+ for (const candidates of symbols.values())
10634
+ for (const member of candidates)
10635
+ if (member.pathComponents.length === 2 && ["init(rawValue:)", "init(_:)"].includes(member.pathComponents[1])) {
10636
+ const owner = member.pathComponents[0];
10637
+ wrapperMembers.set(owner, [...wrapperMembers.get(owner) ?? [], member]);
10638
+ }
10639
+ const stringWrappers = /* @__PURE__ */ new Map();
10640
+ const wrapperSymbols = [...symbols].filter(
10641
+ ([usr, candidates]) => usr.includes("@T@") && candidates[0]?.kind.identifier === "swift.struct"
10642
+ ).sort(([left], [right]) => left.localeCompare(right));
10643
+ for (const [usr, candidates] of wrapperSymbols) {
10644
+ const nativeName = /^c:.*@T@([A-Za-z_]\w*)$/.exec(usr)?.[1];
10645
+ if (!nativeName) continue;
10646
+ const originals = wrappedTypedefs.get(nativeName);
10647
+ const declaration = originals?.[0];
10648
+ if (!declaration || !record(declaration.type)) continue;
10649
+ const original = declaration.type.desugaredQualType ?? declaration.type.qualType;
10650
+ if (typeof original !== "string" || original.replace(/\s/g, "") !== "NSString*")
10651
+ continue;
10652
+ const symbol = candidates[0];
10653
+ const name3 = symbol.pathComponents[0];
10654
+ if (candidates.length !== 1 || originals?.length !== 1 || symbol.pathComponents.length !== 1 || !name3 || !identifier(name3) || types.has(name3) || stringWrappers.has(name3) || symbol.accessLevel !== "public" || text2(symbol.declarationFragments ?? []).trim() !== `struct ${name3}` || symbol.availability?.length)
10655
+ fail(usr, "typed string wrapper identity is unqualified");
10656
+ if (!["s:SY", "s:SH", "s:SQ", "s:s8SendableP"].every(
10657
+ (protocol) => wrapperConformances.get(usr)?.has(protocol)
10658
+ ))
10659
+ fail(usr, "typed string wrapper conformances are unqualified");
10660
+ const members = wrapperMembers.get(name3) ?? [];
10661
+ const initializers = members.filter(
10662
+ (member) => member.pathComponents[1] === "init(rawValue:)"
10663
+ );
10664
+ if (initializers.length !== 1 || initializers[0].kind.identifier !== "swift.init" || initializers[0].accessLevel !== "public" || text2(initializers[0].declarationFragments ?? []).trim() !== "init(rawValue: String)" || !initializers[0].declarationFragments?.some(
10665
+ (part) => part.kind === "typeIdentifier" && part.preciseIdentifier === "s:SS"
10666
+ ))
10667
+ fail(usr, "typed string wrapper raw initializer is unqualified");
10668
+ const unlabelled = members.filter((member) => member.pathComponents[1] === "init(_:)");
10669
+ if (unlabelled.length > 1 || unlabelled.length === 1 && (unlabelled[0].kind.identifier !== "swift.init" || unlabelled[0].accessLevel !== "public" || text2(unlabelled[0].declarationFragments ?? []).trim() !== "init(_ rawValue: String)" || !unlabelled[0].declarationFragments?.some(
10670
+ (part) => part.kind === "typeIdentifier" && part.preciseIdentifier === "s:SS"
10671
+ )))
10672
+ fail(usr, "typed string wrapper unlabeled initializer is unqualified");
10673
+ stringWrappers.set(
10674
+ name3,
10675
+ [
10676
+ `public struct ${swiftName(name3)}: Swift.RawRepresentable, Swift.Hashable, Swift.Equatable, Swift._SwiftNewtypeWrapper, Swift._ObjectiveCBridgeable, Swift.Sendable {`,
10677
+ " public typealias RawValue = Swift.String",
10678
+ " public typealias _ObjectiveCType = Foundation.NSString",
10679
+ " private let _rawValue: Swift.String",
10680
+ " public var rawValue: Swift.String { _rawValue }",
10681
+ " public init(rawValue: Swift.String) { _rawValue = rawValue }",
10682
+ ...unlabelled.length ? [" public init(_ rawValue: Swift.String) { _rawValue = rawValue }"] : [],
10683
+ "}",
10684
+ ""
10685
+ ].join("\n")
10686
+ );
10687
+ }
10423
10688
  const type = (parts, where) => {
10424
10689
  const written = text2(parts).trim();
10425
10690
  const optional = /[?!]$/.test(written);
@@ -10442,7 +10707,7 @@ function swiftObjCImports(graphs, options) {
10442
10707
  Double: "double"
10443
10708
  };
10444
10709
  if (!optional && primitive[written] && !parts.some(
10445
- (part) => part.preciseIdentifier?.startsWith("c:") || part.preciseIdentifier && symbols.get(part.preciseIdentifier)?.kind.identifier === "swift.class"
10710
+ (part) => part.preciseIdentifier?.startsWith("c:") || part.preciseIdentifier && symbols.get(part.preciseIdentifier)?.[0]?.kind.identifier === "swift.class"
10446
10711
  ))
10447
10712
  return {
10448
10713
  swift: `Swift.${written === "()" ? "Void" : written}`,
@@ -10454,7 +10719,7 @@ function swiftObjCImports(graphs, options) {
10454
10719
  const identifiers = parts.filter((part) => part.kind === "typeIdentifier");
10455
10720
  const id = identifiers.length === 1 ? identifiers[0]?.preciseIdentifier : void 0;
10456
10721
  const native = id && nativeClass(id);
10457
- const swiftClass = id ? symbols.get(id) : void 0;
10722
+ const swiftClass = id ? symbols.get(id)?.[0] : void 0;
10458
10723
  const resolved = native ? names.get(native) : swiftClass?.kind.identifier === "swift.class" && swiftClass.pathComponents.length === 1 && swiftClass.pathComponents[0] === spelling && types.has(spelling) ? spelling : void 0;
10459
10724
  if (!resolved || identifiers[0]?.spelling !== spelling || spelling !== resolved && spelling !== native)
10460
10725
  return fail(
@@ -10515,7 +10780,8 @@ function swiftObjCImports(graphs, options) {
10515
10780
  );
10516
10781
  };
10517
10782
  const membersByClass = /* @__PURE__ */ new Map();
10518
- for (const symbol of symbols.values()) {
10783
+ const importedSymbols = [...symbols.values()].flat();
10784
+ for (const symbol of importedSymbols) {
10519
10785
  const owner = /^c:objc\(cs\)([A-Za-z_]\w*)\(/.exec(symbol.identifier.precise)?.[1];
10520
10786
  if (owner && selected.has(owner)) {
10521
10787
  const members = membersByClass.get(owner);
@@ -10642,27 +10908,40 @@ function swiftObjCImports(graphs, options) {
10642
10908
  (n) => nodes(n.inner)
10643
10909
  );
10644
10910
  for (const member of members) {
10645
- if (member.kind === "ObjCMethodDecl" && typeof member.name === "string" && (/^init(?:$|[^a-z])/.test(member.name.replace(/^_+/, "")) || nodes(member.inner).some(
10911
+ if (member.kind === "ObjCMethodDecl" && typeof member.name === "string" && member.name !== "init" && (/^init(?:$|[^a-z])/.test(member.name.replace(/^_+/, "")) || nodes(member.inner).some(
10646
10912
  (attribute) => attribute.kind === "NSConsumesSelfAttr" || attribute.kind === "ObjCDesignatedInitializerAttr"
10647
- )))
10913
+ )) && !nodes(member.inner).some((attribute) => attribute.kind === "UnavailableAttr"))
10648
10914
  fail(
10649
10915
  `${nativeName}.${member.name}`,
10650
10916
  "explicit or designated initialization is unqualified"
10651
10917
  );
10652
- if (member.variadic === true)
10653
- fail(`${nativeName}.${member.name}`, "variadic methods are unqualified");
10654
- }
10655
- const constructor = thunk(
10656
- `${nativeName}:new`,
10657
- raw2,
10658
- [],
10659
- null,
10660
- `[[${nativeName} alloc] init]`
10661
- );
10918
+ }
10662
10919
  const body = [
10663
- `public required init(_objcRetained: Swift.UnsafeMutableRawPointer) { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: _objcRetained) }`,
10664
- `public init() { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: ${constructor}()!) }`
10920
+ `public required init(_objcRetained: Swift.UnsafeMutableRawPointer) { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); super.init(_objcRetained: _objcRetained) }`
10665
10921
  ];
10922
+ const defaultInitializer = members.find(
10923
+ (member) => member.kind === "ObjCMethodDecl" && member.instance === true && member.name === "init"
10924
+ );
10925
+ const importedInitializer = symbols.get(`c:objc(cs)${nativeName}(im)init`);
10926
+ const initializerSpelling = importedInitializer?.[0] ? text2(importedInitializer[0].declarationFragments ?? []).trim() : "init()";
10927
+ if (!/^init[?!]?\(\)$/.test(initializerSpelling))
10928
+ fail(`${nativeName}.init`, "default initializer signature is unqualified");
10929
+ if (!defaultInitializer || !nodes(defaultInitializer.inner).some(
10930
+ (attribute) => attribute.kind === "UnavailableAttr"
10931
+ )) {
10932
+ if (defaultInitializer && (importedInitializer?.length !== 1 || importedInitializer[0]?.kind.identifier !== "swift.init"))
10933
+ fail(`${nativeName}.init`, "missing Swift-imported default initializer");
10934
+ const constructor = thunk(
10935
+ `${nativeName}:new`,
10936
+ raw2,
10937
+ [],
10938
+ null,
10939
+ `[[${nativeName} alloc] init]`
10940
+ );
10941
+ body.push(
10942
+ `public ${initializerSpelling} { precondition(Self.self == ${swiftName(name3)}.self, "Swift subclass construction is unqualified"); ${/^init[?!]/.test(initializerSpelling) ? `guard let _peer = ${constructor}() else { return nil }; super.init(_objcRetained: _peer)` : `super.init(_objcRetained: ${constructor}()!)`} }`
10943
+ );
10944
+ }
10666
10945
  bodies.set(name3, body);
10667
10946
  const prefix = `c:objc(cs)${nativeName}`;
10668
10947
  for (const symbol of membersByClass.get(nativeName) ?? []) {
@@ -10680,16 +10959,19 @@ function swiftObjCImports(graphs, options) {
10680
10959
  (m) => m.kind === (property ? "ObjCPropertyDecl" : "ObjCMethodDecl") && m.name === selector && (property ? m.class !== true === instance : m.instance === instance)
10681
10960
  );
10682
10961
  if (!decl) fail(usr, "member absent from original Clang interface");
10962
+ if (decl.variadic === true)
10963
+ fail(`${nativeName}.${selector}`, "variadic methods are unqualified");
10683
10964
  const parts = symbol.declarationFragments ?? [];
10684
10965
  const written = text2(parts);
10685
10966
  if (symbol.availability?.length || /@|\b(?:optional|nonisolated|isolated|async|throws|rethrows)\b/.test(written))
10686
10967
  fail(usr, "availability and asynchronous or throwing imports are unqualified");
10687
10968
  if (nodes(decl.inner).some(
10688
- (a) => /^(?:Unavailable|SwiftPrivate|SwiftAsync|SwiftError|ObjCRequiresSuper|NSConsumesSelf)Attr$/.test(
10969
+ (a) => /^(?:Unavailable|SwiftPrivate|SwiftAsync|SwiftError|ObjCRequiresSuper)Attr$/.test(
10689
10970
  String(a.kind)
10690
- )
10971
+ ) || a.kind === "NSConsumesSelfAttr" && selector !== "init"
10691
10972
  ))
10692
10973
  fail(usr, "member attributes require a qualified importer path");
10974
+ if (selector === "init" && symbol.kind.identifier === "swift.init") continue;
10693
10975
  const receiver = instance ? "_object" : nativeName;
10694
10976
  const access = symbol.accessLevel === "open" ? "open" : "public";
10695
10977
  const memberName = parts.find((part) => part.kind === "identifier")?.spelling;
@@ -10768,7 +11050,7 @@ function swiftObjCImports(graphs, options) {
10768
11050
  }
10769
11051
  }
10770
11052
  const importedFunctions = [];
10771
- for (const symbol of symbols.values()) {
11053
+ for (const symbol of importedSymbols) {
10772
11054
  if (symbol.kind.identifier !== "swift.func") continue;
10773
11055
  const usr = symbol.identifier.precise;
10774
11056
  const native = /^c:@F@([A-Za-z_]\w*)$/.exec(usr)?.[1];
@@ -10809,7 +11091,7 @@ function swiftObjCImports(graphs, options) {
10809
11091
  `public func ${swiftName(name3)}(${argumentsSwift}) -> ${result.swift} { ${result.c === "void" ? "" : "return "}${local}(${parameters.map((p) => swiftName(p.name)).join(", ")}) }`
10810
11092
  );
10811
11093
  }
10812
- if (!classes.length && !importedFunctions.length)
11094
+ if (!classes.length && !importedFunctions.length && !stringWrappers.size)
10813
11095
  fail("declarations", "no represented original Objective-C classes or C functions");
10814
11096
  const registerFunction = `_peachRegisterObjCImports_${hash(options.module)}`;
10815
11097
  const registration = [
@@ -10822,12 +11104,14 @@ function swiftObjCImports(graphs, options) {
10822
11104
  ""
10823
11105
  ].join("\n");
10824
11106
  const swift = [
10825
- ...classes.length ? ["import Foundation", "import PeachObjC"] : [],
11107
+ ...classes.length || stringWrappers.size ? ["import Foundation"] : [],
11108
+ ...classes.length ? ["import PeachObjC"] : [],
10826
11109
  "",
10827
11110
  ...external,
10828
11111
  "",
10829
11112
  ...importedFunctions,
10830
11113
  "",
11114
+ ...stringWrappers.values(),
10831
11115
  ...classes.flatMap((c) => [
10832
11116
  `open class ${swiftName(c.name)}: PeachObjC._ObjCForeignObject {`,
10833
11117
  ...bodies.get(c.name).map((line) => ` ${line}`),
@@ -10845,7 +11129,11 @@ function swiftObjCImports(graphs, options) {
10845
11129
  };
10846
11130
  }
10847
11131
 
11132
+ // src/swift-objc-metadata.ts
11133
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11134
+
10848
11135
  // src/swift-objc-sdk.ts
11136
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
10849
11137
  var import_node_path6 = __toESM(require("node:path"), 1);
10850
11138
  var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
10851
11139
  var OVERLAY_PATH = /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/;
@@ -10867,12 +11155,15 @@ for (const [file, text5] of tree) {
10867
11155
  }
10868
11156
 
10869
11157
  // src/swift-objc-standin.ts
11158
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
10870
11159
  var import_node_child_process5 = require("node:child_process");
10871
11160
  var import_node_crypto5 = require("node:crypto");
10872
11161
  var import_node_fs5 = __toESM(require("node:fs"), 1);
10873
11162
  var import_node_path7 = __toESM(require("node:path"), 1);
10874
- var OBJC_IMPORT_VERSION = "3";
11163
+ var OBJC_IMPORT_VERSION = "4";
10875
11164
  var NATIVE_GRAPH_SDK_VERSION = "27.1";
11165
+ var WASI_EMULATION = ["_WASI_EMULATED_SIGNAL", "_WASI_EMULATED_MMAN"];
11166
+ var WASI_EMULATION_FLAGS = WASI_EMULATION.map((name3) => `-D${name3}`);
10876
11167
  var NATIVE_GRAPH_INPUTS = {
10877
11168
  sdk: NATIVE_GRAPH_SDK_VERSION,
10878
11169
  settings: "e68503e5e534e9194af5efe8c636ca8b824e2d8237c5f38ec84aa4d155bc8418",
@@ -11151,7 +11442,9 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original) {
11151
11442
  "-module-cache-path",
11152
11443
  import_node_path7.default.join(cacheDir5, "ios-module-cache"),
11153
11444
  "-minimum-access-level",
11154
- "public",
11445
+ // symbol graphs hide public underscored names at the public threshold.
11446
+ // original clang headers remain the declaration boundary.
11447
+ original ? "internal" : "public",
11155
11448
  "-skip-synthesized-members",
11156
11449
  "-omit-extension-block-symbols",
11157
11450
  "-output-dir",
@@ -11540,6 +11833,7 @@ function validateObjcPeerStartupLibraries(libraries) {
11540
11833
  }
11541
11834
 
11542
11835
  // src/swift-package.ts
11836
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11543
11837
  function swiftImplicitResourcePaths(paths) {
11544
11838
  return paths.filter(
11545
11839
  (file) => !file.endsWith(".swift") && (/\.(xcassets|xcstrings|nib|xib|storyboard|xcdatamodeld|xcdatamodel|xcmappingmodel|metal|xcprivacy)(?:\/|$)/.test(
@@ -11656,6 +11950,51 @@ function swiftTargetModuleName(name3) {
11656
11950
  function swiftPackageIdentity(url) {
11657
11951
  return (url.split("/").pop() ?? url).replace(/\.git$/, "").toLowerCase();
11658
11952
  }
11953
+ function clangMacroSetting(macro) {
11954
+ const [name3, ...value] = macro.split("=");
11955
+ return value.length === 0 ? `.define(${JSON.stringify(name3)})` : `.define(${JSON.stringify(name3)}, to: ${JSON.stringify(value.join("="))})`;
11956
+ }
11957
+ var swiftEscapes = {
11958
+ "\\": "\\",
11959
+ '"': '"',
11960
+ "'": "'",
11961
+ n: "\n",
11962
+ r: "\r",
11963
+ t: " "
11964
+ };
11965
+ function settingDefines(call, tool) {
11966
+ const defines = [];
11967
+ for (const open of call.matchAll(new RegExp(`\\b${tool}Settings\\s*:\\s*\\[`, "g"))) {
11968
+ let depth = 1;
11969
+ let index = open.index + open[0].length;
11970
+ const start = index;
11971
+ for (; index < call.length && depth > 0; index++) {
11972
+ const char = call[index];
11973
+ if (char === '"') {
11974
+ for (index++; index < call.length && call[index] !== '"'; index++)
11975
+ if (call[index] === "\\") index++;
11976
+ } else if (char === "[") depth++;
11977
+ else if (char === "]") depth--;
11978
+ }
11979
+ const body = call.slice(start, index - 1);
11980
+ for (const match of body.matchAll(
11981
+ /\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*(?:,\s*to:\s*"((?:[^"\\]|\\.)*)"\s*)?\)/g
11982
+ )) {
11983
+ const name3 = match[1];
11984
+ defines.push(
11985
+ match[2] === void 0 ? name3 : `${name3}=${match[2].replace(/\\(.)/g, (_, escape) => {
11986
+ const value = swiftEscapes[escape];
11987
+ if (value === void 0)
11988
+ throw new Error(
11989
+ `Unsupported escape \\${escape} in the value of macro ${name3}`
11990
+ );
11991
+ return value;
11992
+ })}`
11993
+ );
11994
+ }
11995
+ }
11996
+ return defines;
11997
+ }
11659
11998
  function swiftManifestTargets(manifest, resourcePaths = []) {
11660
11999
  const implicitResources = swiftImplicitResourcePaths(resourcePaths);
11661
12000
  const targets = [];
@@ -11683,9 +12022,9 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
11683
12022
  const cxxInterop = /\.interoperabilityMode\(\s*\.Cxx\s*\)/.test(
11684
12023
  call.replace(/"(?:\\.|[^"\\])*"/g, "")
11685
12024
  );
11686
- const defines = [
11687
- ...call.matchAll(/\.define\(\s*"([A-Za-z_][A-Za-z0-9_]*)"\s*\)/g)
11688
- ].map((match) => match[1]);
12025
+ const defines = settingDefines(call, "swift").map((define) => define.split("=")[0]);
12026
+ const cDefines = settingDefines(call, "c");
12027
+ const cxxDefines = settingDefines(call, "cxx");
11689
12028
  const linkedLibraries = [...call.matchAll(/\.linkedLibrary\(\s*"([^"]+)"\s*\)/g)].map(
11690
12029
  (match) => match[1]
11691
12030
  );
@@ -11728,6 +12067,8 @@ function swiftManifestTargets(manifest, resourcePaths = []) {
11728
12067
  mainActorIsolation,
11729
12068
  ...cxxInterop ? { cxxInterop: true } : {},
11730
12069
  ...defines.length === 0 ? {} : { defines },
12070
+ ...cDefines.length === 0 ? {} : { cDefines },
12071
+ ...cxxDefines.length === 0 ? {} : { cxxDefines },
11731
12072
  ...linkedLibraries.length === 0 ? {} : { linkedLibraries },
11732
12073
  resources,
11733
12074
  ...dependencies.length === 0 ? {} : { dependencies },
@@ -11865,6 +12206,7 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
11865
12206
  }
11866
12207
 
11867
12208
  // src/swift-root-lock.ts
12209
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
11868
12210
  var import_node_child_process6 = require("node:child_process");
11869
12211
  var import_node_crypto6 = require("node:crypto");
11870
12212
  var import_node_fs6 = require("node:fs");
@@ -12058,6 +12400,7 @@ async function withSwiftRootLock(root, work, signal) {
12058
12400
  }
12059
12401
 
12060
12402
  // src/xcode-header-search.ts
12403
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12061
12404
  var import_node_fs7 = __toESM(require("node:fs"), 1);
12062
12405
  var import_node_path9 = __toESM(require("node:path"), 1);
12063
12406
  function headerMap(entries) {
@@ -12632,7 +12975,7 @@ var EXECUTABLE_LINK_FLAGS = ` "-Xclang-linker", "-O0",
12632
12975
  `;
12633
12976
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12634
12977
  var MULTI_MANIFEST_VERSION = 40;
12635
- var compilerSourceDigest = true ? "baf55512a114f4eec85d80685c9e0f04d08ac1ad34d8c18745c233b3d7827025" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12978
+ var compilerSourceDigest = true ? "9c8bf514e9d972c32ef441bda4effae79610e2c5add1faca769349803321528f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12636
12979
  function swiftArtifactHash(input, release, moduleRoot) {
12637
12980
  const hash2 = (0, import_node_crypto7.createHash)("sha256");
12638
12981
  hash2.update(`swift-compile
@@ -12749,6 +13092,7 @@ function emitSwiftPackageManifest(args) {
12749
13092
  const linkedNativeModules = [...args.native?.entries() ?? []].flatMap(
12750
13093
  ([name3, value]) => value.clang ? [name3] : []
12751
13094
  );
13095
+ const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
12752
13096
  const stanza = (target) => {
12753
13097
  if (target.systemLibrary)
12754
13098
  return ` .systemLibrary(name: ${JSON.stringify(target.name)}, path: ${JSON.stringify(target.path)}),`;
@@ -12825,10 +13169,15 @@ function emitSwiftPackageManifest(args) {
12825
13169
  .unsafeFlags(["-Xlinker", "--strip-all"], .when(configuration: .release)),
12826
13170
  ]` : librarySettings.length > 0 ? `,
12827
13171
  linkerSettings: [${librarySettings.join(", ")}]` : "";
13172
+ const cDefines = macroSettings(target.cDefines);
13173
+ const cxxDefines = macroSettings(target.cxxDefines);
12828
13174
  const nativeSettings = native?.clang ? [
12829
- `cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.flags])})]`,
12830
- `cxxSettings: [${defines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.cxxFlags])})]`
12831
- ].join(", ") : `${args.objcExports ? `cSettings: [.unsafeFlags(${JSON.stringify(args.objcExports.flags)})], ` : ""}cxxSettings: [${defines} .unsafeFlags(["-fno-cxx-modules"])]`;
13175
+ `cSettings: [${cDefines} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.flags])})]`,
13176
+ `cxxSettings: [${cxxDefines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native.clang.cxxFlags])})]`
13177
+ ].join(", ") : [
13178
+ `cSettings: [${cDefines} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native?.flags ?? []])})]`,
13179
+ `cxxSettings: [${cxxDefines} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], ...native?.cxxFlags ?? []])})]`
13180
+ ].join(", ");
12832
13181
  return [
12833
13182
  ` ${kind}(`,
12834
13183
  ` name: "${target.name}",`,
@@ -12838,7 +13187,7 @@ function emitSwiftPackageManifest(args) {
12838
13187
  ...native?.clang ? [
12839
13188
  ` sources: ${JSON.stringify(native.clang.sources.map((source) => import_node_path10.default.posix.join(native.path, source)))},`,
12840
13189
  ` publicHeadersPath: ${JSON.stringify(import_node_path10.default.posix.dirname(native.clang.modulemap))},`
12841
- ] : [],
13190
+ ] : native?.flags ? [` sources: ${JSON.stringify(native.sources)},`] : [],
12842
13191
  // the native backend supplies dependency module maps without their
12843
13192
  // compiled modules. textual c++ includes keep those dependencies usable.
12844
13193
  ` ${clang ? nativeSettings : swiftSettings}${link}`,
@@ -12864,24 +13213,26 @@ function emitSwiftPackageManifest(args) {
12864
13213
  ' publicHeadersPath: "include",',
12865
13214
  ` cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports.flags.filter((flag) => flag !== "-fobjc-arc"), "-fno-objc-arc", "-Xclang", "-disable-objc-default-synthesize-properties"])})]),`
12866
13215
  ] : [],
12867
- ...[...args.native?.entries() ?? []].flatMap(
12868
- ([name3, native]) => native.late ? (native.groups ?? [
13216
+ ...[...args.native?.entries() ?? []].flatMap(([name3, native]) => {
13217
+ const late = native.late;
13218
+ const owner = targets.find((target) => target.name === name3);
13219
+ return late ? (native.groups ?? [
12869
13220
  {
12870
- name: native.late.name,
13221
+ name: late.name,
12871
13222
  sources: native.lateSources,
12872
13223
  flags: [],
12873
13224
  cxxFlags: []
12874
13225
  }
12875
13226
  ]).flatMap((group) => [
12876
13227
  ` .target(name: ${JSON.stringify(group.name)},`,
12877
- ` dependencies: ${JSON.stringify(args.native?.get(name3)?.mixed ? [] : [name3])},`,
13228
+ ` dependencies: ${JSON.stringify(native.mixed ? [] : [name3, ...late.producers])},`,
12878
13229
  ` path: ${JSON.stringify(native.clang ? "." : native.path)},`,
12879
13230
  ` sources: ${JSON.stringify(native.clang ? group.sources.map((source) => import_node_path10.default.posix.join(native.path, source)) : group.sources)},`,
12880
13231
  ` publicHeadersPath: ${JSON.stringify(native.clang ? import_node_path10.default.posix.dirname(native.clang.modulemap) : "include")},`,
12881
- ` cSettings: [.unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...group.flags])})],`,
12882
- ` cxxSettings: [.unsafeFlags(${JSON.stringify(["-fno-cxx-modules", "-I", native.includeDirectory, "-I", args.headerDirectory, ...group.cxxFlags])})]),`
12883
- ]) : []
12884
- ),
13232
+ ` cSettings: [${macroSettings(owner?.cDefines)} .unsafeFlags(${JSON.stringify([...args.objcExports?.flags ?? args.nativeFlags ?? [], ...group.flags])})],`,
13233
+ ` cxxSettings: [${macroSettings(owner?.cxxDefines)} .unsafeFlags(${JSON.stringify(["-fno-cxx-modules", ...args.objcExports?.flags ?? args.nativeFlags ?? [], "-I", native.includeDirectory, "-I", args.headerDirectory, ...group.cxxFlags])})]),`
13234
+ ]) : [];
13235
+ }),
12885
13236
  args.cxxLanguageStandard ? ` ],
12886
13237
  cxxLanguageStandard: .${args.cxxLanguageStandard}` : " ]",
12887
13238
  ")",
@@ -16873,7 +17224,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
16873
17224
  else files2.set(file, prior);
16874
17225
  }
16875
17226
  targetStagedFiles.delete(target.name);
16876
- if (entries.some(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file)) && (swift || input.nativeTargets?.some((value) => value.name === target.name) && entries.some(([file]) => /\.mm?$/.test(file)))) {
17227
+ if (entries.some(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file)) && (swift || input.nativeTargets?.some((value) => value.name === target.name))) {
16877
17228
  if (!swift) {
16878
17229
  const unprepared = import_node_path10.default.join(
16879
17230
  layout.root,
@@ -16946,8 +17297,42 @@ function writeSwiftProject(layout, input, moduleRoot) {
16946
17297
  const entries = targetEntries(target);
16947
17298
  const units = entries.filter(([file]) => /\.(?:c|cc|cpp|cxx|m|mm)$/.test(file));
16948
17299
  if (units.length === 0) continue;
17300
+ const includes = `${prefix}include/`;
17301
+ const consumers = /* @__PURE__ */ new Map();
17302
+ const reverse = /* @__PURE__ */ new Map();
17303
+ for (const [file, contents] of entries) {
17304
+ const producers2 = /* @__PURE__ */ new Set();
17305
+ const source = contents.replace(/\/\*[\s\S]*?\*\//g, "");
17306
+ for (const match of source.matchAll(
17307
+ /^\s*#\s*(?:include|import)\s*[<"]([^>"]+)[>"]/gm
17308
+ )) {
17309
+ const include2 = match[1];
17310
+ const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
17311
+ if (producer && targets.some((value) => value.name === producer))
17312
+ producers2.add(producer);
17313
+ const local = [
17314
+ import_node_path10.default.posix.join(import_node_path10.default.posix.dirname(file), include2),
17315
+ `${includes}${include2}`
17316
+ ].find((candidate) => input.files[candidate] !== void 0);
17317
+ if (local) {
17318
+ reverse.set(local, [...reverse.get(local) ?? [], file]);
17319
+ }
17320
+ }
17321
+ consumers.set(file, producers2);
17322
+ }
17323
+ const queue = [...consumers.keys()].filter((file) => consumers.get(file).size > 0);
17324
+ for (let index = 0; index < queue.length; index++) {
17325
+ const file = queue[index];
17326
+ for (const parent of reverse.get(file) ?? []) {
17327
+ const inherited = consumers.get(parent);
17328
+ const before = inherited.size;
17329
+ for (const producer of consumers.get(file)) inherited.add(producer);
17330
+ if (before !== inherited.size) queue.push(parent);
17331
+ }
17332
+ }
17333
+ const late = units.filter(([file]) => consumers.get(file).size > 0);
16949
17334
  const settings = input.nativeTargets?.find((value) => value.name === target.name);
16950
- if (entries.some(([file]) => file.endsWith(".swift")) || settings && units.some(([file]) => /\.mm?$/.test(file))) {
17335
+ if (settings || entries.some(([file]) => file.endsWith(".swift"))) {
16951
17336
  try {
16952
17337
  if (!settings)
16953
17338
  throw new Error(
@@ -17015,7 +17400,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
17015
17400
  return relative.split("/").some((part) => part.startsWith(".")) ? import_node_path10.default.posix.join(HIDDEN_UNITS, relative.replaceAll(/(^|\/)\./g, "$1%2E")) : relative;
17016
17401
  };
17017
17402
  const accessorFlags = accessor ? ["-include", accessorHeader] : [];
17018
- let nativeC = false;
17403
+ let nativeC = !roots2.length && !entries.some(([file]) => file.endsWith(".swift")) && !units.some(([file]) => /\.mm?$/.test(file));
17019
17404
  if (roots2.length) {
17020
17405
  const sourceHeaders = import_node_path10.default.join(
17021
17406
  layout.root,
@@ -17114,7 +17499,13 @@ export *
17114
17499
  )
17115
17500
  ];
17116
17501
  const cxx = /\.(?:cc|cpp|cxx|mm)$/.test(file);
17117
- const identity = (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify([cxx, perFile])).digest("hex").slice(0, 12);
17502
+ const identity = (0, import_node_crypto7.createHash)("sha256").update(
17503
+ JSON.stringify([
17504
+ cxx,
17505
+ perFile,
17506
+ ...nativeC && !roots2.length ? [(consumers.get(file)?.size ?? 0) > 0] : []
17507
+ ])
17508
+ ).digest("hex").slice(0, 12);
17118
17509
  const group = groups.get(identity) ?? {
17119
17510
  name: `${target.name}${nativeC ? "Native" : "Swift"}Implementation_${identity}`,
17120
17511
  sources: [],
@@ -17149,6 +17540,31 @@ export *
17149
17540
  accessor.body
17150
17541
  );
17151
17542
  }
17543
+ if (nativeC && !roots2.length) {
17544
+ const lateSources = new Set(late.map(([file]) => unitSource(file)));
17545
+ const owner = [...groups.values()].find(
17546
+ (group) => group.sources.every((source) => !lateSources.has(source))
17547
+ );
17548
+ const implementations = [...groups.values()].filter((group) => group !== owner);
17549
+ native.set(target.name, {
17550
+ path: target.path,
17551
+ includeDirectory: include2,
17552
+ sources: owner?.sources ?? [],
17553
+ lateSources: implementations.flatMap((group) => group.sources),
17554
+ flags: owner?.flags ?? flags,
17555
+ cxxFlags: owner?.cxxFlags ?? flags,
17556
+ ...implementations.length ? {
17557
+ groups: implementations,
17558
+ late: {
17559
+ name: `${target.name}NativeImplementation`,
17560
+ producers: [
17561
+ ...new Set(late.flatMap(([file]) => [...consumers.get(file)]))
17562
+ ].sort()
17563
+ }
17564
+ } : {}
17565
+ });
17566
+ continue;
17567
+ }
17152
17568
  if (nativeC) {
17153
17569
  const modulemaps = Object.entries(settings.productHeaders).filter(
17154
17570
  ([product2]) => product2.endsWith("/Modules/module.modulemap")
@@ -17219,40 +17635,6 @@ export *
17219
17635
  }
17220
17636
  continue;
17221
17637
  }
17222
- const includes = `${prefix}include/`;
17223
- const consumers = /* @__PURE__ */ new Map();
17224
- const reverse = /* @__PURE__ */ new Map();
17225
- for (const [file, contents] of entries) {
17226
- const producers2 = /* @__PURE__ */ new Set();
17227
- const source = contents.replace(/\/\*[\s\S]*?\*\//g, "");
17228
- for (const match of source.matchAll(
17229
- /^\s*#\s*(?:include|import)\s*[<"]([^>"]+)[>"]/gm
17230
- )) {
17231
- const include2 = match[1];
17232
- const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
17233
- if (producer && targets.some((value) => value.name === producer))
17234
- producers2.add(producer);
17235
- const local = [
17236
- import_node_path10.default.posix.join(import_node_path10.default.posix.dirname(file), include2),
17237
- `${includes}${include2}`
17238
- ].find((candidate) => input.files[candidate] !== void 0);
17239
- if (local) {
17240
- reverse.set(local, [...reverse.get(local) ?? [], file]);
17241
- }
17242
- }
17243
- consumers.set(file, producers2);
17244
- }
17245
- const queue = [...consumers.keys()].filter((file) => consumers.get(file).size > 0);
17246
- for (let index = 0; index < queue.length; index++) {
17247
- const file = queue[index];
17248
- for (const parent of reverse.get(file) ?? []) {
17249
- const inherited = consumers.get(parent);
17250
- const before = inherited.size;
17251
- for (const producer of consumers.get(file)) inherited.add(producer);
17252
- if (before !== inherited.size) queue.push(parent);
17253
- }
17254
- }
17255
- const late = units.filter(([file]) => consumers.get(file).size > 0);
17256
17638
  native.set(target.name, {
17257
17639
  path: target.path,
17258
17640
  includeDirectory: import_node_path10.default.join(layout.root, includes),
@@ -17481,6 +17863,7 @@ ${[
17481
17863
  "-fobjc-exceptions",
17482
17864
  "-fexceptions",
17483
17865
  "-fwasm-exceptions",
17866
+ ...WASI_EMULATION_FLAGS,
17484
17867
  "-fobjc-arc",
17485
17868
  "-fblocks",
17486
17869
  "-F",
@@ -18168,11 +18551,13 @@ function compileSwiftProjectUnit(input, options) {
18168
18551
  }
18169
18552
 
18170
18553
  // src/swift-host.ts
18554
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18171
18555
  var import_node_crypto14 = require("node:crypto");
18172
18556
  var import_node_fs21 = __toESM(require("node:fs"), 1);
18173
18557
  var import_node_path22 = __toESM(require("node:path"), 1);
18174
18558
 
18175
18559
  // ../sootsim-swift/src/stringCatalog.ts
18560
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18176
18561
  function isRecord2(value) {
18177
18562
  return value !== null && typeof value === "object" && !Array.isArray(value);
18178
18563
  }
@@ -18344,12 +18729,17 @@ function compileStringCatalog(source, name3) {
18344
18729
  );
18345
18730
  }
18346
18731
 
18732
+ // cli/auth.ts
18733
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18734
+
18347
18735
  // src/auth/shared-session.ts
18736
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18348
18737
  var import_node_fs9 = require("node:fs");
18349
18738
  var import_node_path11 = require("node:path");
18350
18739
  init_home_paths();
18351
18740
 
18352
18741
  // src/public-brand.ts
18742
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18353
18743
  var name2 = "Peach";
18354
18744
  var peachPublicBrand = Object.freeze({
18355
18745
  name: name2,
@@ -18447,6 +18837,7 @@ function readSharedDesktopAuthSession() {
18447
18837
  }
18448
18838
 
18449
18839
  // cli/run-rnx.ts
18840
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18450
18841
  var import_node_async_hooks = require("node:async_hooks");
18451
18842
  var sinks = new import_node_async_hooks.AsyncLocalStorage();
18452
18843
 
@@ -18515,6 +18906,7 @@ function authHeaderValue(auth) {
18515
18906
  }
18516
18907
 
18517
18908
  // src/backend-origin.ts
18909
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18518
18910
  var DEFAULT_CONTRAST_BACKEND_ORIGIN = "https://peachsim.com";
18519
18911
  function normalizeHostname(hostname) {
18520
18912
  return hostname.replace(/^\[|\]$/g, "").toLowerCase();
@@ -18833,7 +19225,29 @@ var ios_sdk_frameworks_default = {
18833
19225
  ]
18834
19226
  };
18835
19227
 
19228
+ // src/native-app-identity-project.ts
19229
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19230
+
19231
+ // src/android-app-identity.ts
19232
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19233
+
19234
+ // src/android-string-value.ts
19235
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19236
+
19237
+ // src/android-xml.ts
19238
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19239
+
19240
+ // src/native-app-identity.ts
19241
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19242
+
19243
+ // src/bundleGlobalFooter.ts
19244
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19245
+
19246
+ // src/nativeAppIconContract.ts
19247
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19248
+
18836
19249
  // src/openstep-plist.ts
19250
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18837
19251
  var isDict = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
18838
19252
  var str = (value) => typeof value === "string" ? value : void 0;
18839
19253
  var list = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
@@ -18929,6 +19343,7 @@ function parseOpenStepPlist(text5) {
18929
19343
  }
18930
19344
 
18931
19345
  // src/xcode-target-members.ts
19346
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
18932
19347
  var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
18933
19348
  var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
18934
19349
  function xcodePathResolver(objects, projectDir, join3) {
@@ -19020,12 +19435,14 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
19020
19435
  }
19021
19436
 
19022
19437
  // src/plist.ts
19438
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19023
19439
  var import_plist = __toESM(require("plist"), 1);
19024
19440
  function parsePlistSource(source) {
19025
19441
  return import_plist.default.parse(source);
19026
19442
  }
19027
19443
 
19028
19444
  // src/xcode-project.ts
19445
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19029
19446
  var import_node_child_process8 = require("node:child_process");
19030
19447
  var import_node_crypto8 = require("node:crypto");
19031
19448
  var import_node_fs10 = __toESM(require("node:fs"), 1);
@@ -19033,6 +19450,7 @@ var import_node_path13 = __toESM(require("node:path"), 1);
19033
19450
  var import_plist2 = __toESM(require("plist"), 1);
19034
19451
 
19035
19452
  // src/xcode-json-project.ts
19453
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
19036
19454
  var import_node_path12 = __toESM(require("node:path"), 1);
19037
19455
  var import_json5 = __toESM(require_lib(), 1);
19038
19456
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -19510,10 +19928,10 @@ function loadProject(xcodeproj) {
19510
19928
  const projectFile = xcodeProjectFile(xcodeproj);
19511
19929
  if (!projectFile)
19512
19930
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
19513
- const mtimeMs = import_node_fs10.default.statSync(projectFile).mtimeMs;
19514
- const cached2 = loaded.get(projectFile);
19515
- if (cached2?.mtimeMs === mtimeMs) return cached2.project;
19516
19931
  const source = import_node_fs10.default.readFileSync(projectFile, "utf8");
19932
+ const digest = (0, import_node_crypto8.createHash)("sha256").update(source).digest("hex");
19933
+ const cached2 = loaded.get(projectFile);
19934
+ if (cached2?.digest === digest) return cached2.project;
19517
19935
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
19518
19936
  if (!isDict(root) || !isDict(root.objects)) {
19519
19937
  throw new Error(`${projectFile} has no objects table`);
@@ -19540,7 +19958,7 @@ function loadProject(xcodeproj) {
19540
19958
  object: object2,
19541
19959
  resolvePath
19542
19960
  };
19543
- loaded.set(projectFile, { mtimeMs, project: result });
19961
+ loaded.set(projectFile, { digest, project: result });
19544
19962
  return result;
19545
19963
  }
19546
19964
  function defaultConfiguration(project) {
@@ -20488,6 +20906,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
20488
20906
  }
20489
20907
 
20490
20908
  // src/swift-binary-modules.ts
20909
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20491
20910
  var import_node_crypto9 = require("node:crypto");
20492
20911
  var import_node_fs11 = __toESM(require("node:fs"), 1);
20493
20912
  var import_node_path14 = __toESM(require("node:path"), 1);
@@ -20570,6 +20989,7 @@ async function swiftBinaryModules(binary2) {
20570
20989
  }
20571
20990
 
20572
20991
  // src/swift-distribution.ts
20992
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20573
20993
  var import_node_fs13 = __toESM(require("node:fs"), 1);
20574
20994
  var import_node_os6 = __toESM(require("node:os"), 1);
20575
20995
  var import_node_path16 = __toESM(require("node:path"), 1);
@@ -20578,12 +20998,12 @@ init_home_paths();
20578
20998
 
20579
20999
  // src/swift-distribution.lock.json
20580
21000
  var swift_distribution_lock_default = {
20581
- id: "ca4dfda0ca14bc49",
21001
+ id: "433f607a19978269",
20582
21002
  release: "swift-6.4.0-RELEASE-custom-0d775d32d7c74eae",
20583
21003
  wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-f02bd198",
20584
21004
  wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-f02bd198.artifactbundle.tar.gz",
20585
21005
  wasmSdkChecksum: "1e19ea768fd4e821aae34b8966c4ddcee45615c4b3cf018979b061aee2fb5504",
20586
- source: "33e8641403dd73a7ce0ca902007e3a36407e1f0b",
21006
+ source: "f52d21b43f5cba9bd52f1665697284e46d16c0d9",
20587
21007
  targets: [
20588
21008
  "ImagePlayground",
20589
21009
  "QuickLookThumbnailing",
@@ -20772,16 +21192,16 @@ var swift_distribution_lock_default = {
20772
21192
  },
20773
21193
  hosts: {
20774
21194
  "darwin-arm64": {
20775
- sha256: "8679052c4c2b21ad748a8db40cdbc0c91ab14a29fc06bbed777efb57030c01fa",
20776
- size: 70963039
21195
+ sha256: "0b814aa2ced56e4452c82227c4251036346015ba6445e742070ee221c53fc575",
21196
+ size: 71080069
20777
21197
  },
20778
21198
  "linux-x64": {
20779
- sha256: "a1719d844e2f45e8c9a2ccb9dbe7857978918639a3933c225a328d84cae235cf",
20780
- size: 70968746
21199
+ sha256: "62e67740951c7972fde15bc074fe8838f308432a8521e93691035e7fc105b716",
21200
+ size: 71085950
20781
21201
  },
20782
21202
  "linux-arm64": {
20783
- sha256: "3da8f2c920e65c633b5310c778b4a5c54b0f5f8278d58fd109f3db4310794c04",
20784
- size: 70967077
21203
+ sha256: "f900ab5b6a4823966cebe291c91710e6323185df971c667c25ddcc1427935b52",
21204
+ size: 71084016
20785
21205
  }
20786
21206
  }
20787
21207
  };
@@ -20943,11 +21363,13 @@ function swiftModuleToolchain(root) {
20943
21363
  }
20944
21364
 
20945
21365
  // src/swift-objc-compile.ts
21366
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20946
21367
  var import_node_fs17 = __toESM(require("node:fs"), 1);
20947
21368
  var import_node_path20 = __toESM(require("node:path"), 1);
20948
21369
  init_home_paths();
20949
21370
 
20950
21371
  // src/swift-package-manifest.ts
21372
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20951
21373
  var import_node_child_process10 = require("node:child_process");
20952
21374
  var import_node_crypto11 = require("node:crypto");
20953
21375
  var import_node_fs14 = __toESM(require("node:fs"), 1);
@@ -20967,25 +21389,37 @@ var record2 = (value) => value && typeof value === "object" && !Array.isArray(va
20967
21389
  var array = (value) => Array.isArray(value) ? value : [];
20968
21390
  var string2 = (value) => typeof value === "string" ? value : void 0;
20969
21391
  function swiftCommand() {
20970
- return process.platform === "darwin" ? { file: "xcrun", args: ["swift"] } : { file: import_node_path17.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift"), args: [] };
21392
+ return process.platform === "darwin" ? (
21393
+ // runner-toolchain-platform: darwin
21394
+ (0, import_node_child_process10.execFileSync)("xcrun", ["--find", "swift"], { encoding: "utf8" }).trim()
21395
+ ) : import_node_path17.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
20971
21396
  }
20972
21397
  var cacheDir3 = import_node_path17.default.join(cacheDir(), "swift-manifests");
20973
21398
  var evaluated = /* @__PURE__ */ new Map();
20974
21399
  function dump(dir) {
20975
21400
  const manifests = import_node_fs14.default.readdirSync(dir).filter((name3) => /^Package(@swift-[\d.]+)?\.swift$/.test(name3)).sort();
20976
21401
  const command = swiftCommand();
20977
- const key2 = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify([command, import_node_path17.default.resolve(dir)])).update(
21402
+ const toolchain = {
21403
+ path: command,
21404
+ realpath: import_node_fs14.default.realpathSync(command),
21405
+ sha256: (0, import_node_crypto11.createHash)("sha256").update(import_node_fs14.default.readFileSync(command)).digest("hex"),
21406
+ version: (0, import_node_child_process10.execFileSync)(command, ["--version"], {
21407
+ encoding: "utf8",
21408
+ env: swiftEnvironment(),
21409
+ stdio: ["ignore", "pipe", "pipe"]
21410
+ }).trim()
21411
+ };
21412
+ const key2 = (0, import_node_crypto11.createHash)("sha256").update(JSON.stringify([toolchain, import_node_path17.default.resolve(dir)])).update(
20978
21413
  manifests.map((name3) => `${name3}\0${import_node_fs14.default.readFileSync(import_node_path17.default.join(dir, name3), "utf8")}`).join("\0")
20979
21414
  ).digest("hex").slice(0, 32);
20980
21415
  const cached2 = import_node_path17.default.join(cacheDir3, `${key2}.json`);
20981
21416
  if (import_node_fs14.default.existsSync(cached2))
20982
- return { key: key2, raw: record2(JSON.parse(import_node_fs14.default.readFileSync(cached2, "utf8"))) };
21417
+ return { key: key2, toolchain, raw: record2(JSON.parse(import_node_fs14.default.readFileSync(cached2, "utf8"))) };
20983
21418
  let output;
20984
21419
  try {
20985
21420
  output = (0, import_node_child_process10.execFileSync)(
20986
- command.file,
21421
+ command,
20987
21422
  [
20988
- ...command.args,
20989
21423
  "package",
20990
21424
  ...swiftPackageCacheOptions(),
20991
21425
  "--package-path",
@@ -21010,7 +21444,7 @@ function dump(dir) {
21010
21444
  }
21011
21445
  import_node_fs14.default.mkdirSync(cacheDir3, { recursive: true });
21012
21446
  import_node_fs14.default.writeFileSync(cached2, output);
21013
- return { key: key2, raw: record2(JSON.parse(output)) };
21447
+ return { key: key2, toolchain, raw: record2(JSON.parse(output)) };
21014
21448
  }
21015
21449
  function defaultTraits(manifest) {
21016
21450
  const traits = new Map(
@@ -21038,15 +21472,18 @@ function linksOnIOS(condition, traits) {
21038
21472
  }
21039
21473
  function swiftPackageManifest(dir) {
21040
21474
  dir = import_node_fs14.default.realpathSync(dir);
21041
- const { key: key2, raw: raw2 } = dump(dir);
21475
+ const { key: key2, raw: raw2, toolchain } = dump(dir);
21042
21476
  const known = evaluated.get(key2);
21043
21477
  if (known) return known;
21044
21478
  const traits = defaultTraits(raw2);
21045
21479
  const tools = Number(
21046
21480
  /^(\d+)/.exec(string2(record2(raw2.toolsVersion)._version) ?? "5")?.[1] ?? 5
21047
21481
  );
21048
- const declaredModes = array(raw2.swiftLanguageVersions).flatMap((mode) => {
21049
- const major = Number(/^(\d+)/.exec(string2(mode) ?? "")?.[1]);
21482
+ const declaredModeValues = array(raw2.swiftLanguageVersions).flatMap(
21483
+ (mode) => string2(mode) ?? []
21484
+ );
21485
+ const declaredModes = declaredModeValues.flatMap((mode) => {
21486
+ const major = Number(/^(\d+)/.exec(mode)?.[1]);
21050
21487
  return Number.isFinite(major) ? [major] : [];
21051
21488
  });
21052
21489
  const packageMode = Math.max(
@@ -21109,10 +21546,14 @@ function swiftPackageManifest(dir) {
21109
21546
  });
21110
21547
  }
21111
21548
  let languageMode = packageMode;
21549
+ let sourceLanguageMode = declaredModeValues.length ? declaredModeValues.reduce(
21550
+ (highest, mode) => Number(mode) > Number(highest) ? mode : highest
21551
+ ) : tools >= 6 ? "6" : tools >= 5 ? "5" : string2(record2(raw2.toolsVersion)._version) ?? "unknown";
21112
21552
  let mainActorIsolation = false;
21113
21553
  const defines = [];
21114
21554
  const libraries = [];
21115
21555
  const nativeSettings = [];
21556
+ const unsupportedSwiftSettings = [];
21116
21557
  for (const [tool, standard] of [
21117
21558
  ["c", string2(raw2.cLanguageStandard)],
21118
21559
  ["cxx", string2(raw2.cxxLanguageStandard)]
@@ -21123,6 +21564,16 @@ function swiftPackageManifest(dir) {
21123
21564
  for (const setting of array(target.settings)) {
21124
21565
  const { kind: rawKind, tool, condition } = record2(setting);
21125
21566
  const settingKind = record2(rawKind);
21567
+ if (tool === "swift") {
21568
+ const kinds = Object.keys(settingKind);
21569
+ const supported = kinds.length === 1 && (kinds[0] === "define" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(
21570
+ string2(record2(settingKind.define)._0) ?? ""
21571
+ ) || kinds[0] === "swiftLanguageMode" && Object.keys(record2(condition)).length === 0 || kinds[0] === "defaultIsolation" && Object.keys(record2(condition)).length === 0 && ["MainActor", "nonisolated"].includes(
21572
+ string2(record2(settingKind.defaultIsolation)._0) ?? ""
21573
+ ));
21574
+ if (!supported)
21575
+ unsupportedSwiftSettings.push(JSON.stringify({ kind: rawKind, condition }));
21576
+ }
21126
21577
  if ((tool === "c" || tool === "cxx") && linksOnIOS(condition, traits)) {
21127
21578
  const config = string2(record2(condition).config);
21128
21579
  const header = string2(record2(settingKind.headerSearchPath)._0);
@@ -21142,6 +21593,7 @@ function swiftPackageManifest(dir) {
21142
21593
  });
21143
21594
  }
21144
21595
  const mode = string2(record2(settingKind.swiftLanguageMode)._0);
21596
+ if (tool === "swift" && mode) sourceLanguageMode = mode;
21145
21597
  if (mode)
21146
21598
  languageMode = Math.max(5, Number(/^(\d+)/.exec(mode)?.[1] ?? languageMode));
21147
21599
  if (string2(record2(settingKind.defaultIsolation)._0) === "MainActor")
@@ -21163,6 +21615,10 @@ function swiftPackageManifest(dir) {
21163
21615
  });
21164
21616
  }
21165
21617
  }
21618
+ if (!["5", "6"].includes(sourceLanguageMode))
21619
+ unsupportedSwiftSettings.push(
21620
+ `unsupported Swift language mode: ${sourceLanguageMode}`
21621
+ );
21166
21622
  targets.set(name4, {
21167
21623
  name: name4,
21168
21624
  type: kind,
@@ -21176,6 +21632,8 @@ function swiftPackageManifest(dir) {
21176
21632
  libraries,
21177
21633
  nativeSettings,
21178
21634
  declaresResources: array(target.resources).length > 0,
21635
+ hasPluginUsages: array(target.pluginUsages).length > 0,
21636
+ unsupportedSwiftSettings,
21179
21637
  publicHeadersPath: string2(target.publicHeadersPath) ?? "include",
21180
21638
  url: string2(target.url) ?? null,
21181
21639
  checksum: string2(target.checksum) ?? null
@@ -21183,7 +21641,7 @@ function swiftPackageManifest(dir) {
21183
21641
  }
21184
21642
  const name3 = string2(raw2.name);
21185
21643
  if (!name3) throw new Error(`swiftpm returned no package name for ${dir}`);
21186
- const manifest = { name: name3, dir, products, targets, packages };
21644
+ const manifest = { name: name3, dir, products, targets, packages, toolchain };
21187
21645
  evaluated.set(key2, manifest);
21188
21646
  return manifest;
21189
21647
  }
@@ -21212,6 +21670,7 @@ function swiftTargetFiles(manifest, target) {
21212
21670
  }
21213
21671
 
21214
21672
  // src/swift-packages.ts
21673
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21215
21674
  var import_node_child_process11 = require("node:child_process");
21216
21675
  var import_node_crypto12 = require("node:crypto");
21217
21676
  var import_node_fs15 = __toESM(require("node:fs"), 1);
@@ -21493,6 +21952,7 @@ function resolveSwiftPackages(options) {
21493
21952
  }
21494
21953
 
21495
21954
  // src/swift-source-file.ts
21955
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21496
21956
  var import_node_fs16 = __toESM(require("node:fs"), 1);
21497
21957
  var import_node_path19 = __toESM(require("node:path"), 1);
21498
21958
  function readPackageFile(root, file, maxBytes) {
@@ -21696,16 +22156,19 @@ function xcodeObjCInputs(app, binaries) {
21696
22156
  }
21697
22157
 
21698
22158
  // src/swift-standin-config.ts
22159
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21699
22160
  var import_acorn = require("acorn");
21700
22161
  var import_sucrase = require("sucrase");
21701
22162
 
21702
22163
  // src/swift-standins.ts
22164
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21703
22165
  var import_node_child_process12 = require("node:child_process");
21704
22166
  var import_node_crypto13 = require("node:crypto");
21705
22167
  var import_node_fs20 = __toESM(require("node:fs"), 1);
21706
22168
  var import_node_path21 = __toESM(require("node:path"), 1);
21707
22169
 
21708
22170
  // src/cli-version.ts
22171
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21709
22172
  var import_node_fs18 = require("node:fs");
21710
22173
  var import_node_url2 = require("node:url");
21711
22174
  var import_meta = {};
@@ -21738,6 +22201,7 @@ function getCliVersion() {
21738
22201
  init_home_paths();
21739
22202
 
21740
22203
  // src/output-lock-stdio.ts
22204
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21741
22205
  var import_node_fs19 = require("node:fs");
21742
22206
  function outputLockStdio(standard, env = process.env) {
21743
22207
  const stdio = [...standard];
@@ -21764,6 +22228,7 @@ function outputLockStdio(standard, env = process.env) {
21764
22228
  }
21765
22229
 
21766
22230
  // src/swift-standin-emit.ts
22231
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21767
22232
  var STANDIN_EMIT_VERSION = "12";
21768
22233
  var STANDIN_IMPORTS = ["Foundation", "UIKit"];
21769
22234
  var TYPE_KINDS = /* @__PURE__ */ new Set([
@@ -22523,7 +22988,6 @@ function stripDefaults(decl) {
22523
22988
 
22524
22989
  // src/swift-standins.ts
22525
22990
  var TRIPLE = "wasm32-unknown-wasip1";
22526
- var WASI_EMULATION = ["_WASI_EMULATED_SIGNAL", "_WASI_EMULATED_MMAN"];
22527
22991
  var cacheDir4 = import_node_path21.default.join(cacheDir(), "swift-standins");
22528
22992
  var SWIFT_STANDINS_DIR = "__standins__";
22529
22993
  function exec(file, args, cwd) {
@@ -23085,6 +23549,7 @@ ${roots.map((file) => ` header "${file}"
23085
23549
  TRIPLE,
23086
23550
  "--sysroot",
23087
23551
  sysroot,
23552
+ ...WASI_EMULATION_FLAGS,
23088
23553
  "-fsyntax-only",
23089
23554
  "-I",
23090
23555
  include,
@@ -23151,6 +23616,7 @@ ${roots.map((file) => ` header "${file}"
23151
23616
  TRIPLE,
23152
23617
  "--sysroot",
23153
23618
  sysroot,
23619
+ ...WASI_EMULATION_FLAGS,
23154
23620
  "-fsyntax-only",
23155
23621
  "-I",
23156
23622
  include,
@@ -23778,6 +24244,7 @@ function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new Set()
23778
24244
  }
23779
24245
 
23780
24246
  // src/swift-submit.ts
24247
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23781
24248
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
23782
24249
  var MAX_SWIFT_COMPILE_FILES = 256;
23783
24250
  var DEFAULT_SWIFT_COMPILE_BUILD_MS = 10 * 6e4;
@@ -23792,7 +24259,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
23792
24259
  var MAX_SWIFT_COMPILE_IMAGES = 128;
23793
24260
  var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
23794
24261
  var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
23795
- var SWIFT_HOST_ABI = 47;
24262
+ var SWIFT_HOST_ABI = 48;
23796
24263
  var POLL_INTERVAL_MS = 1500;
23797
24264
  function swiftNativeEntry(native, file) {
23798
24265
  return {
@@ -24155,8 +24622,14 @@ function xcodeLayout(root) {
24155
24622
  if (relative2 === ".." || relative2.startsWith(`..${import_node_path22.default.sep}`) || import_node_path22.default.isAbsolute(relative2))
24156
24623
  throw new Error(`swift input escapes the selected package: ${target.dir}`);
24157
24624
  const posix = relative2.split(import_node_path22.default.sep).join(import_node_path22.default.posix.sep);
24625
+ const packageMacros = [
24626
+ "SWIFT_PACKAGE=1",
24627
+ ...packageConfiguration === "debug" ? ["DEBUG=1"] : []
24628
+ ];
24158
24629
  targets.push({
24159
24630
  ...target,
24631
+ cDefines: packageMacros,
24632
+ cxxDefines: packageMacros,
24160
24633
  path: target.remote ? import_node_path22.default.posix.join(XCODE_PACKAGES_DIR, posix) : posix,
24161
24634
  exclude: [],
24162
24635
  defines: [
@@ -24313,6 +24786,12 @@ function xcodeManifest(layout) {
24313
24786
  ...target.mainActorIsolation ? [".defaultIsolation(MainActor.self)"] : [],
24314
24787
  ...(target.defines ?? []).map((name3) => `.define(${JSON.stringify(name3)})`)
24315
24788
  ].join(", ")}]`;
24789
+ const clangSettings = (target) => [
24790
+ ["cSettings", target.cDefines],
24791
+ ["cxxSettings", target.cxxDefines]
24792
+ ].map(
24793
+ ([label, macros]) => macros?.length ? `${label}: [${macros.map(clangMacroSetting).join(", ")}], ` : ""
24794
+ ).join("");
24316
24795
  const libraries = (target) => target.linkedLibraries?.length ? `, linkerSettings: [${target.linkedLibraries.map((name3) => `.linkedLibrary(${JSON.stringify(name3)})`).join(", ")}]` : "";
24317
24796
  return [
24318
24797
  "// swift-tools-version: 6.2",
@@ -24320,7 +24799,7 @@ function xcodeManifest(layout) {
24320
24799
  'let package = Package(name: "app", targets: [',
24321
24800
  ` .executableTarget(name: "${layout.app.moduleName}", path: "${XCODE_APP_DIR}", ${settings(layout.app)}),`,
24322
24801
  ...layout.targets.map(
24323
- (target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: ${JSON.stringify((target.dependencies ?? []).map((dependency) => dependency.name))}, path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${settings(target)}${libraries(target)}),`
24802
+ (target) => target.systemLibrary ? ` .systemLibrary(name: "${target.name}", path: "${target.path}"),` : ` .target(name: "${target.name}", dependencies: ${JSON.stringify((target.dependencies ?? []).map((dependency) => dependency.name))}, path: "${target.path}", ${target.exclude.length > 0 ? `exclude: ${JSON.stringify(target.exclude)}, ` : ""}${target.resources ? "resources: [], " : ""}${clangSettings(target)}${settings(target)}${libraries(target)}),`
24324
24803
  ),
24325
24804
  "])",
24326
24805
  ""
@@ -25219,6 +25698,7 @@ function disposeSwiftProject(packagePath, signal) {
25219
25698
  }
25220
25699
 
25221
25700
  // src/swift-vite-lifetime.ts
25701
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25222
25702
  var LIFETIME = Symbol.for("peach.swift-vite-lifetime");
25223
25703
  function swiftViteLifetime(server) {
25224
25704
  const existing = server[LIFETIME];
@@ -25250,12 +25730,14 @@ function swiftViteLifetime(server) {
25250
25730
  }
25251
25731
 
25252
25732
  // src/one-widget-package.ts
25733
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25253
25734
  var import_node_crypto16 = require("node:crypto");
25254
25735
  var import_node_fs23 = __toESM(require("node:fs"), 1);
25255
25736
  var import_node_os7 = __toESM(require("node:os"), 1);
25256
25737
  var import_node_path24 = __toESM(require("node:path"), 1);
25257
25738
 
25258
25739
  // src/one-widget-metadata.ts
25740
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25259
25741
  var import_node_child_process13 = require("node:child_process");
25260
25742
  var import_node_crypto15 = require("node:crypto");
25261
25743
  var import_node_fs22 = __toESM(require("node:fs"), 1);
@@ -25264,8 +25746,15 @@ var import_node_path23 = __toESM(require("node:path"), 1);
25264
25746
  var import_node_util2 = require("node:util");
25265
25747
 
25266
25748
  // cli/internal-child.ts
25749
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25267
25750
  var RNX_FORKED_SCRIPT_ENV = "PEACH_RUNS_FORKED_SCRIPTS";
25268
25751
 
25752
+ // src/oneWidgetContract.ts
25753
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25754
+
25755
+ // src/native-dev-bundle-url.ts
25756
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
25757
+
25269
25758
  // src/oneWidgetContract.ts
25270
25759
  var HOME_WIDGET_FAMILIES = [
25271
25760
  "systemSmall",