peachsim 0.1.780 → 0.1.782

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 (83) hide show
  1. package/cli/commands/detox.ts +6 -2
  2. package/detox/expectations.ts +1 -1
  3. package/detox/gestures.ts +1 -1
  4. package/detox/index.ts +27 -3
  5. package/detox/navigation-lifecycle.ts +1 -1
  6. package/dist-lib/agent-daemon-client.cjs +1 -1
  7. package/dist-lib/agent-events.cjs +1 -1
  8. package/dist-lib/agent-identity.cjs +1 -1
  9. package/dist-lib/agent-sessions.cjs +1 -1
  10. package/dist-lib/attached-projects.cjs +1 -1
  11. package/dist-lib/auth/shared-session.cjs +1 -1
  12. package/dist-lib/backend-origin.cjs +1 -1
  13. package/dist-lib/beta.cjs +1 -1
  14. package/dist-lib/beta.mjs +1 -1
  15. package/dist-lib/bridge-constants.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.cjs +1 -1
  17. package/dist-lib/bridge-contract-input.mjs +1 -1
  18. package/dist-lib/bridge-contract.cjs +1 -1
  19. package/dist-lib/bridge-contract.mjs +1 -1
  20. package/dist-lib/capture-contract.cjs +1 -1
  21. package/dist-lib/capture-contract.mjs +1 -1
  22. package/dist-lib/cli-constants.cjs +1 -1
  23. package/dist-lib/cloud-contract.cjs +1 -1
  24. package/dist-lib/cloud-contract.mjs +1 -1
  25. package/dist-lib/cloud-test-args.cjs +1 -1
  26. package/dist-lib/cloud-test-args.mjs +1 -1
  27. package/dist-lib/cloud.cjs +1 -1
  28. package/dist-lib/cloud.mjs +1 -1
  29. package/dist-lib/config.cjs +1 -1
  30. package/dist-lib/detox/index.cjs +3533 -133
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +6781 -2442
  34. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +4664 -1266
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +1114 -2
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/plist.cjs +1 -1
  55. package/dist-lib/plist.mjs +1 -1
  56. package/dist-lib/profiles.cjs +1 -1
  57. package/dist-lib/public-brand.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.cjs +1 -1
  59. package/dist-lib/react-native-host-modules.mjs +1 -1
  60. package/dist-lib/render-mode.cjs +1 -1
  61. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  62. package/dist-lib/sdk.cjs +1 -1
  63. package/dist-lib/sdk.mjs +1 -1
  64. package/dist-lib/skills.cjs +9017 -366
  65. package/dist-lib/swift-compile.cjs +1 -1
  66. package/dist-lib/swift-compile.mjs +1 -1
  67. package/dist-lib/swift-package.cjs +1 -1
  68. package/dist-lib/swift-package.mjs +1 -1
  69. package/dist-lib/swift-submit.cjs +1 -1
  70. package/dist-lib/swift-submit.mjs +1 -1
  71. package/dist-lib/swift-toolchain.cjs +1 -1
  72. package/dist-lib/swift.cjs +1 -1
  73. package/dist-lib/vite-swift.cjs +2229 -583
  74. package/dist-lib/vite.cjs +38 -16
  75. package/package.json +1 -1
  76. package/skills/contrast/SKILL.md +2 -0
  77. package/src/one-widget-package.ts +202 -0
  78. package/src/oneWidgetContract.ts +16 -0
  79. package/src/swift-host.ts +56 -29
  80. package/src/swift-standin-emit.ts +471 -242
  81. package/src/swift-standins.ts +288 -40
  82. package/src/vite-plugin-one.ts +45 -17
  83. package/src/vite-plugin-swift.ts +2 -0
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.780 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.782 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -32,6 +32,1118 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  ));
33
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
34
 
35
+ // ../../node_modules/json5/lib/unicode.js
36
+ var require_unicode = __commonJS({
37
+ "../../node_modules/json5/lib/unicode.js"(exports2, module2) {
38
+ module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
39
+ 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]/;
40
+ 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]/;
41
+ }
42
+ });
43
+
44
+ // ../../node_modules/json5/lib/util.js
45
+ var require_util = __commonJS({
46
+ "../../node_modules/json5/lib/util.js"(exports2, module2) {
47
+ var unicode = require_unicode();
48
+ module2.exports = {
49
+ isSpaceSeparator(c) {
50
+ return typeof c === "string" && unicode.Space_Separator.test(c);
51
+ },
52
+ isIdStartChar(c) {
53
+ return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c));
54
+ },
55
+ isIdContinueChar(c) {
56
+ return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c));
57
+ },
58
+ isDigit(c) {
59
+ return typeof c === "string" && /[0-9]/.test(c);
60
+ },
61
+ isHexDigit(c) {
62
+ return typeof c === "string" && /[0-9A-Fa-f]/.test(c);
63
+ }
64
+ };
65
+ }
66
+ });
67
+
68
+ // ../../node_modules/json5/lib/parse.js
69
+ var require_parse = __commonJS({
70
+ "../../node_modules/json5/lib/parse.js"(exports2, module2) {
71
+ var util = require_util();
72
+ var source;
73
+ var parseState;
74
+ var stack;
75
+ var pos;
76
+ var line;
77
+ var column;
78
+ var token;
79
+ var key;
80
+ var root;
81
+ module2.exports = function parse2(text, reviver) {
82
+ source = String(text);
83
+ parseState = "start";
84
+ stack = [];
85
+ pos = 0;
86
+ line = 1;
87
+ column = 0;
88
+ token = void 0;
89
+ key = void 0;
90
+ root = void 0;
91
+ do {
92
+ token = lex();
93
+ parseStates[parseState]();
94
+ } while (token.type !== "eof");
95
+ if (typeof reviver === "function") {
96
+ return internalize({ "": root }, "", reviver);
97
+ }
98
+ return root;
99
+ };
100
+ function internalize(holder, name2, reviver) {
101
+ const value = holder[name2];
102
+ if (value != null && typeof value === "object") {
103
+ if (Array.isArray(value)) {
104
+ for (let i = 0; i < value.length; i++) {
105
+ const key2 = String(i);
106
+ const replacement = internalize(value, key2, reviver);
107
+ if (replacement === void 0) {
108
+ delete value[key2];
109
+ } else {
110
+ Object.defineProperty(value, key2, {
111
+ value: replacement,
112
+ writable: true,
113
+ enumerable: true,
114
+ configurable: true
115
+ });
116
+ }
117
+ }
118
+ } else {
119
+ for (const key2 in value) {
120
+ const replacement = internalize(value, key2, reviver);
121
+ if (replacement === void 0) {
122
+ delete value[key2];
123
+ } else {
124
+ Object.defineProperty(value, key2, {
125
+ value: replacement,
126
+ writable: true,
127
+ enumerable: true,
128
+ configurable: true
129
+ });
130
+ }
131
+ }
132
+ }
133
+ }
134
+ return reviver.call(holder, name2, value);
135
+ }
136
+ var lexState;
137
+ var buffer;
138
+ var doubleQuote;
139
+ var sign;
140
+ var c;
141
+ function lex() {
142
+ lexState = "default";
143
+ buffer = "";
144
+ doubleQuote = false;
145
+ sign = 1;
146
+ for (; ; ) {
147
+ c = peek();
148
+ const token2 = lexStates[lexState]();
149
+ if (token2) {
150
+ return token2;
151
+ }
152
+ }
153
+ }
154
+ function peek() {
155
+ if (source[pos]) {
156
+ return String.fromCodePoint(source.codePointAt(pos));
157
+ }
158
+ }
159
+ function read() {
160
+ const c2 = peek();
161
+ if (c2 === "\n") {
162
+ line++;
163
+ column = 0;
164
+ } else if (c2) {
165
+ column += c2.length;
166
+ } else {
167
+ column++;
168
+ }
169
+ if (c2) {
170
+ pos += c2.length;
171
+ }
172
+ return c2;
173
+ }
174
+ var lexStates = {
175
+ default() {
176
+ switch (c) {
177
+ case " ":
178
+ case "\v":
179
+ case "\f":
180
+ case " ":
181
+ case "\xA0":
182
+ case "\uFEFF":
183
+ case "\n":
184
+ case "\r":
185
+ case "\u2028":
186
+ case "\u2029":
187
+ read();
188
+ return;
189
+ case "/":
190
+ read();
191
+ lexState = "comment";
192
+ return;
193
+ case void 0:
194
+ read();
195
+ return newToken("eof");
196
+ }
197
+ if (util.isSpaceSeparator(c)) {
198
+ read();
199
+ return;
200
+ }
201
+ return lexStates[parseState]();
202
+ },
203
+ comment() {
204
+ switch (c) {
205
+ case "*":
206
+ read();
207
+ lexState = "multiLineComment";
208
+ return;
209
+ case "/":
210
+ read();
211
+ lexState = "singleLineComment";
212
+ return;
213
+ }
214
+ throw invalidChar(read());
215
+ },
216
+ multiLineComment() {
217
+ switch (c) {
218
+ case "*":
219
+ read();
220
+ lexState = "multiLineCommentAsterisk";
221
+ return;
222
+ case void 0:
223
+ throw invalidChar(read());
224
+ }
225
+ read();
226
+ },
227
+ multiLineCommentAsterisk() {
228
+ switch (c) {
229
+ case "*":
230
+ read();
231
+ return;
232
+ case "/":
233
+ read();
234
+ lexState = "default";
235
+ return;
236
+ case void 0:
237
+ throw invalidChar(read());
238
+ }
239
+ read();
240
+ lexState = "multiLineComment";
241
+ },
242
+ singleLineComment() {
243
+ switch (c) {
244
+ case "\n":
245
+ case "\r":
246
+ case "\u2028":
247
+ case "\u2029":
248
+ read();
249
+ lexState = "default";
250
+ return;
251
+ case void 0:
252
+ read();
253
+ return newToken("eof");
254
+ }
255
+ read();
256
+ },
257
+ value() {
258
+ switch (c) {
259
+ case "{":
260
+ case "[":
261
+ return newToken("punctuator", read());
262
+ case "n":
263
+ read();
264
+ literal("ull");
265
+ return newToken("null", null);
266
+ case "t":
267
+ read();
268
+ literal("rue");
269
+ return newToken("boolean", true);
270
+ case "f":
271
+ read();
272
+ literal("alse");
273
+ return newToken("boolean", false);
274
+ case "-":
275
+ case "+":
276
+ if (read() === "-") {
277
+ sign = -1;
278
+ }
279
+ lexState = "sign";
280
+ return;
281
+ case ".":
282
+ buffer = read();
283
+ lexState = "decimalPointLeading";
284
+ return;
285
+ case "0":
286
+ buffer = read();
287
+ lexState = "zero";
288
+ return;
289
+ case "1":
290
+ case "2":
291
+ case "3":
292
+ case "4":
293
+ case "5":
294
+ case "6":
295
+ case "7":
296
+ case "8":
297
+ case "9":
298
+ buffer = read();
299
+ lexState = "decimalInteger";
300
+ return;
301
+ case "I":
302
+ read();
303
+ literal("nfinity");
304
+ return newToken("numeric", Infinity);
305
+ case "N":
306
+ read();
307
+ literal("aN");
308
+ return newToken("numeric", NaN);
309
+ case '"':
310
+ case "'":
311
+ doubleQuote = read() === '"';
312
+ buffer = "";
313
+ lexState = "string";
314
+ return;
315
+ }
316
+ throw invalidChar(read());
317
+ },
318
+ identifierNameStartEscape() {
319
+ if (c !== "u") {
320
+ throw invalidChar(read());
321
+ }
322
+ read();
323
+ const u = unicodeEscape();
324
+ switch (u) {
325
+ case "$":
326
+ case "_":
327
+ break;
328
+ default:
329
+ if (!util.isIdStartChar(u)) {
330
+ throw invalidIdentifier();
331
+ }
332
+ break;
333
+ }
334
+ buffer += u;
335
+ lexState = "identifierName";
336
+ },
337
+ identifierName() {
338
+ switch (c) {
339
+ case "$":
340
+ case "_":
341
+ case "\u200C":
342
+ case "\u200D":
343
+ buffer += read();
344
+ return;
345
+ case "\\":
346
+ read();
347
+ lexState = "identifierNameEscape";
348
+ return;
349
+ }
350
+ if (util.isIdContinueChar(c)) {
351
+ buffer += read();
352
+ return;
353
+ }
354
+ return newToken("identifier", buffer);
355
+ },
356
+ identifierNameEscape() {
357
+ if (c !== "u") {
358
+ throw invalidChar(read());
359
+ }
360
+ read();
361
+ const u = unicodeEscape();
362
+ switch (u) {
363
+ case "$":
364
+ case "_":
365
+ case "\u200C":
366
+ case "\u200D":
367
+ break;
368
+ default:
369
+ if (!util.isIdContinueChar(u)) {
370
+ throw invalidIdentifier();
371
+ }
372
+ break;
373
+ }
374
+ buffer += u;
375
+ lexState = "identifierName";
376
+ },
377
+ sign() {
378
+ switch (c) {
379
+ case ".":
380
+ buffer = read();
381
+ lexState = "decimalPointLeading";
382
+ return;
383
+ case "0":
384
+ buffer = read();
385
+ lexState = "zero";
386
+ return;
387
+ case "1":
388
+ case "2":
389
+ case "3":
390
+ case "4":
391
+ case "5":
392
+ case "6":
393
+ case "7":
394
+ case "8":
395
+ case "9":
396
+ buffer = read();
397
+ lexState = "decimalInteger";
398
+ return;
399
+ case "I":
400
+ read();
401
+ literal("nfinity");
402
+ return newToken("numeric", sign * Infinity);
403
+ case "N":
404
+ read();
405
+ literal("aN");
406
+ return newToken("numeric", NaN);
407
+ }
408
+ throw invalidChar(read());
409
+ },
410
+ zero() {
411
+ switch (c) {
412
+ case ".":
413
+ buffer += read();
414
+ lexState = "decimalPoint";
415
+ return;
416
+ case "e":
417
+ case "E":
418
+ buffer += read();
419
+ lexState = "decimalExponent";
420
+ return;
421
+ case "x":
422
+ case "X":
423
+ buffer += read();
424
+ lexState = "hexadecimal";
425
+ return;
426
+ }
427
+ return newToken("numeric", sign * 0);
428
+ },
429
+ decimalInteger() {
430
+ switch (c) {
431
+ case ".":
432
+ buffer += read();
433
+ lexState = "decimalPoint";
434
+ return;
435
+ case "e":
436
+ case "E":
437
+ buffer += read();
438
+ lexState = "decimalExponent";
439
+ return;
440
+ }
441
+ if (util.isDigit(c)) {
442
+ buffer += read();
443
+ return;
444
+ }
445
+ return newToken("numeric", sign * Number(buffer));
446
+ },
447
+ decimalPointLeading() {
448
+ if (util.isDigit(c)) {
449
+ buffer += read();
450
+ lexState = "decimalFraction";
451
+ return;
452
+ }
453
+ throw invalidChar(read());
454
+ },
455
+ decimalPoint() {
456
+ switch (c) {
457
+ case "e":
458
+ case "E":
459
+ buffer += read();
460
+ lexState = "decimalExponent";
461
+ return;
462
+ }
463
+ if (util.isDigit(c)) {
464
+ buffer += read();
465
+ lexState = "decimalFraction";
466
+ return;
467
+ }
468
+ return newToken("numeric", sign * Number(buffer));
469
+ },
470
+ decimalFraction() {
471
+ switch (c) {
472
+ case "e":
473
+ case "E":
474
+ buffer += read();
475
+ lexState = "decimalExponent";
476
+ return;
477
+ }
478
+ if (util.isDigit(c)) {
479
+ buffer += read();
480
+ return;
481
+ }
482
+ return newToken("numeric", sign * Number(buffer));
483
+ },
484
+ decimalExponent() {
485
+ switch (c) {
486
+ case "+":
487
+ case "-":
488
+ buffer += read();
489
+ lexState = "decimalExponentSign";
490
+ return;
491
+ }
492
+ if (util.isDigit(c)) {
493
+ buffer += read();
494
+ lexState = "decimalExponentInteger";
495
+ return;
496
+ }
497
+ throw invalidChar(read());
498
+ },
499
+ decimalExponentSign() {
500
+ if (util.isDigit(c)) {
501
+ buffer += read();
502
+ lexState = "decimalExponentInteger";
503
+ return;
504
+ }
505
+ throw invalidChar(read());
506
+ },
507
+ decimalExponentInteger() {
508
+ if (util.isDigit(c)) {
509
+ buffer += read();
510
+ return;
511
+ }
512
+ return newToken("numeric", sign * Number(buffer));
513
+ },
514
+ hexadecimal() {
515
+ if (util.isHexDigit(c)) {
516
+ buffer += read();
517
+ lexState = "hexadecimalInteger";
518
+ return;
519
+ }
520
+ throw invalidChar(read());
521
+ },
522
+ hexadecimalInteger() {
523
+ if (util.isHexDigit(c)) {
524
+ buffer += read();
525
+ return;
526
+ }
527
+ return newToken("numeric", sign * Number(buffer));
528
+ },
529
+ string() {
530
+ switch (c) {
531
+ case "\\":
532
+ read();
533
+ buffer += escape();
534
+ return;
535
+ case '"':
536
+ if (doubleQuote) {
537
+ read();
538
+ return newToken("string", buffer);
539
+ }
540
+ buffer += read();
541
+ return;
542
+ case "'":
543
+ if (!doubleQuote) {
544
+ read();
545
+ return newToken("string", buffer);
546
+ }
547
+ buffer += read();
548
+ return;
549
+ case "\n":
550
+ case "\r":
551
+ throw invalidChar(read());
552
+ case "\u2028":
553
+ case "\u2029":
554
+ separatorChar(c);
555
+ break;
556
+ case void 0:
557
+ throw invalidChar(read());
558
+ }
559
+ buffer += read();
560
+ },
561
+ start() {
562
+ switch (c) {
563
+ case "{":
564
+ case "[":
565
+ return newToken("punctuator", read());
566
+ }
567
+ lexState = "value";
568
+ },
569
+ beforePropertyName() {
570
+ switch (c) {
571
+ case "$":
572
+ case "_":
573
+ buffer = read();
574
+ lexState = "identifierName";
575
+ return;
576
+ case "\\":
577
+ read();
578
+ lexState = "identifierNameStartEscape";
579
+ return;
580
+ case "}":
581
+ return newToken("punctuator", read());
582
+ case '"':
583
+ case "'":
584
+ doubleQuote = read() === '"';
585
+ lexState = "string";
586
+ return;
587
+ }
588
+ if (util.isIdStartChar(c)) {
589
+ buffer += read();
590
+ lexState = "identifierName";
591
+ return;
592
+ }
593
+ throw invalidChar(read());
594
+ },
595
+ afterPropertyName() {
596
+ if (c === ":") {
597
+ return newToken("punctuator", read());
598
+ }
599
+ throw invalidChar(read());
600
+ },
601
+ beforePropertyValue() {
602
+ lexState = "value";
603
+ },
604
+ afterPropertyValue() {
605
+ switch (c) {
606
+ case ",":
607
+ case "}":
608
+ return newToken("punctuator", read());
609
+ }
610
+ throw invalidChar(read());
611
+ },
612
+ beforeArrayValue() {
613
+ if (c === "]") {
614
+ return newToken("punctuator", read());
615
+ }
616
+ lexState = "value";
617
+ },
618
+ afterArrayValue() {
619
+ switch (c) {
620
+ case ",":
621
+ case "]":
622
+ return newToken("punctuator", read());
623
+ }
624
+ throw invalidChar(read());
625
+ },
626
+ end() {
627
+ throw invalidChar(read());
628
+ }
629
+ };
630
+ function newToken(type, value) {
631
+ return {
632
+ type,
633
+ value,
634
+ line,
635
+ column
636
+ };
637
+ }
638
+ function literal(s) {
639
+ for (const c2 of s) {
640
+ const p = peek();
641
+ if (p !== c2) {
642
+ throw invalidChar(read());
643
+ }
644
+ read();
645
+ }
646
+ }
647
+ function escape() {
648
+ const c2 = peek();
649
+ switch (c2) {
650
+ case "b":
651
+ read();
652
+ return "\b";
653
+ case "f":
654
+ read();
655
+ return "\f";
656
+ case "n":
657
+ read();
658
+ return "\n";
659
+ case "r":
660
+ read();
661
+ return "\r";
662
+ case "t":
663
+ read();
664
+ return " ";
665
+ case "v":
666
+ read();
667
+ return "\v";
668
+ case "0":
669
+ read();
670
+ if (util.isDigit(peek())) {
671
+ throw invalidChar(read());
672
+ }
673
+ return "\0";
674
+ case "x":
675
+ read();
676
+ return hexEscape();
677
+ case "u":
678
+ read();
679
+ return unicodeEscape();
680
+ case "\n":
681
+ case "\u2028":
682
+ case "\u2029":
683
+ read();
684
+ return "";
685
+ case "\r":
686
+ read();
687
+ if (peek() === "\n") {
688
+ read();
689
+ }
690
+ return "";
691
+ case "1":
692
+ case "2":
693
+ case "3":
694
+ case "4":
695
+ case "5":
696
+ case "6":
697
+ case "7":
698
+ case "8":
699
+ case "9":
700
+ throw invalidChar(read());
701
+ case void 0:
702
+ throw invalidChar(read());
703
+ }
704
+ return read();
705
+ }
706
+ function hexEscape() {
707
+ let buffer2 = "";
708
+ let c2 = peek();
709
+ if (!util.isHexDigit(c2)) {
710
+ throw invalidChar(read());
711
+ }
712
+ buffer2 += read();
713
+ c2 = peek();
714
+ if (!util.isHexDigit(c2)) {
715
+ throw invalidChar(read());
716
+ }
717
+ buffer2 += read();
718
+ return String.fromCodePoint(parseInt(buffer2, 16));
719
+ }
720
+ function unicodeEscape() {
721
+ let buffer2 = "";
722
+ let count = 4;
723
+ while (count-- > 0) {
724
+ const c2 = peek();
725
+ if (!util.isHexDigit(c2)) {
726
+ throw invalidChar(read());
727
+ }
728
+ buffer2 += read();
729
+ }
730
+ return String.fromCodePoint(parseInt(buffer2, 16));
731
+ }
732
+ var parseStates = {
733
+ start() {
734
+ if (token.type === "eof") {
735
+ throw invalidEOF();
736
+ }
737
+ push();
738
+ },
739
+ beforePropertyName() {
740
+ switch (token.type) {
741
+ case "identifier":
742
+ case "string":
743
+ key = token.value;
744
+ parseState = "afterPropertyName";
745
+ return;
746
+ case "punctuator":
747
+ pop();
748
+ return;
749
+ case "eof":
750
+ throw invalidEOF();
751
+ }
752
+ },
753
+ afterPropertyName() {
754
+ if (token.type === "eof") {
755
+ throw invalidEOF();
756
+ }
757
+ parseState = "beforePropertyValue";
758
+ },
759
+ beforePropertyValue() {
760
+ if (token.type === "eof") {
761
+ throw invalidEOF();
762
+ }
763
+ push();
764
+ },
765
+ beforeArrayValue() {
766
+ if (token.type === "eof") {
767
+ throw invalidEOF();
768
+ }
769
+ if (token.type === "punctuator" && token.value === "]") {
770
+ pop();
771
+ return;
772
+ }
773
+ push();
774
+ },
775
+ afterPropertyValue() {
776
+ if (token.type === "eof") {
777
+ throw invalidEOF();
778
+ }
779
+ switch (token.value) {
780
+ case ",":
781
+ parseState = "beforePropertyName";
782
+ return;
783
+ case "}":
784
+ pop();
785
+ }
786
+ },
787
+ afterArrayValue() {
788
+ if (token.type === "eof") {
789
+ throw invalidEOF();
790
+ }
791
+ switch (token.value) {
792
+ case ",":
793
+ parseState = "beforeArrayValue";
794
+ return;
795
+ case "]":
796
+ pop();
797
+ }
798
+ },
799
+ end() {
800
+ }
801
+ };
802
+ function push() {
803
+ let value;
804
+ switch (token.type) {
805
+ case "punctuator":
806
+ switch (token.value) {
807
+ case "{":
808
+ value = {};
809
+ break;
810
+ case "[":
811
+ value = [];
812
+ break;
813
+ }
814
+ break;
815
+ case "null":
816
+ case "boolean":
817
+ case "numeric":
818
+ case "string":
819
+ value = token.value;
820
+ break;
821
+ }
822
+ if (root === void 0) {
823
+ root = value;
824
+ } else {
825
+ const parent = stack[stack.length - 1];
826
+ if (Array.isArray(parent)) {
827
+ parent.push(value);
828
+ } else {
829
+ Object.defineProperty(parent, key, {
830
+ value,
831
+ writable: true,
832
+ enumerable: true,
833
+ configurable: true
834
+ });
835
+ }
836
+ }
837
+ if (value !== null && typeof value === "object") {
838
+ stack.push(value);
839
+ if (Array.isArray(value)) {
840
+ parseState = "beforeArrayValue";
841
+ } else {
842
+ parseState = "beforePropertyName";
843
+ }
844
+ } else {
845
+ const current = stack[stack.length - 1];
846
+ if (current == null) {
847
+ parseState = "end";
848
+ } else if (Array.isArray(current)) {
849
+ parseState = "afterArrayValue";
850
+ } else {
851
+ parseState = "afterPropertyValue";
852
+ }
853
+ }
854
+ }
855
+ function pop() {
856
+ stack.pop();
857
+ const current = stack[stack.length - 1];
858
+ if (current == null) {
859
+ parseState = "end";
860
+ } else if (Array.isArray(current)) {
861
+ parseState = "afterArrayValue";
862
+ } else {
863
+ parseState = "afterPropertyValue";
864
+ }
865
+ }
866
+ function invalidChar(c2) {
867
+ if (c2 === void 0) {
868
+ return syntaxError(`JSON5: invalid end of input at ${line}:${column}`);
869
+ }
870
+ return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`);
871
+ }
872
+ function invalidEOF() {
873
+ return syntaxError(`JSON5: invalid end of input at ${line}:${column}`);
874
+ }
875
+ function invalidIdentifier() {
876
+ column -= 5;
877
+ return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`);
878
+ }
879
+ function separatorChar(c2) {
880
+ console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`);
881
+ }
882
+ function formatChar(c2) {
883
+ const replacements = {
884
+ "'": "\\'",
885
+ '"': '\\"',
886
+ "\\": "\\\\",
887
+ "\b": "\\b",
888
+ "\f": "\\f",
889
+ "\n": "\\n",
890
+ "\r": "\\r",
891
+ " ": "\\t",
892
+ "\v": "\\v",
893
+ "\0": "\\0",
894
+ "\u2028": "\\u2028",
895
+ "\u2029": "\\u2029"
896
+ };
897
+ if (replacements[c2]) {
898
+ return replacements[c2];
899
+ }
900
+ if (c2 < " ") {
901
+ const hexString = c2.charCodeAt(0).toString(16);
902
+ return "\\x" + ("00" + hexString).substring(hexString.length);
903
+ }
904
+ return c2;
905
+ }
906
+ function syntaxError(message) {
907
+ const err = new SyntaxError(message);
908
+ err.lineNumber = line;
909
+ err.columnNumber = column;
910
+ return err;
911
+ }
912
+ }
913
+ });
914
+
915
+ // ../../node_modules/json5/lib/stringify.js
916
+ var require_stringify = __commonJS({
917
+ "../../node_modules/json5/lib/stringify.js"(exports2, module2) {
918
+ var util = require_util();
919
+ module2.exports = function stringify4(value, replacer, space) {
920
+ const stack = [];
921
+ let indent = "";
922
+ let propertyList;
923
+ let replacerFunc;
924
+ let gap = "";
925
+ let quote;
926
+ if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) {
927
+ space = replacer.space;
928
+ quote = replacer.quote;
929
+ replacer = replacer.replacer;
930
+ }
931
+ if (typeof replacer === "function") {
932
+ replacerFunc = replacer;
933
+ } else if (Array.isArray(replacer)) {
934
+ propertyList = [];
935
+ for (const v of replacer) {
936
+ let item;
937
+ if (typeof v === "string") {
938
+ item = v;
939
+ } else if (typeof v === "number" || v instanceof String || v instanceof Number) {
940
+ item = String(v);
941
+ }
942
+ if (item !== void 0 && propertyList.indexOf(item) < 0) {
943
+ propertyList.push(item);
944
+ }
945
+ }
946
+ }
947
+ if (space instanceof Number) {
948
+ space = Number(space);
949
+ } else if (space instanceof String) {
950
+ space = String(space);
951
+ }
952
+ if (typeof space === "number") {
953
+ if (space > 0) {
954
+ space = Math.min(10, Math.floor(space));
955
+ gap = " ".substr(0, space);
956
+ }
957
+ } else if (typeof space === "string") {
958
+ gap = space.substr(0, 10);
959
+ }
960
+ return serializeProperty("", { "": value });
961
+ function serializeProperty(key, holder) {
962
+ let value2 = holder[key];
963
+ if (value2 != null) {
964
+ if (typeof value2.toJSON5 === "function") {
965
+ value2 = value2.toJSON5(key);
966
+ } else if (typeof value2.toJSON === "function") {
967
+ value2 = value2.toJSON(key);
968
+ }
969
+ }
970
+ if (replacerFunc) {
971
+ value2 = replacerFunc.call(holder, key, value2);
972
+ }
973
+ if (value2 instanceof Number) {
974
+ value2 = Number(value2);
975
+ } else if (value2 instanceof String) {
976
+ value2 = String(value2);
977
+ } else if (value2 instanceof Boolean) {
978
+ value2 = value2.valueOf();
979
+ }
980
+ switch (value2) {
981
+ case null:
982
+ return "null";
983
+ case true:
984
+ return "true";
985
+ case false:
986
+ return "false";
987
+ }
988
+ if (typeof value2 === "string") {
989
+ return quoteString(value2, false);
990
+ }
991
+ if (typeof value2 === "number") {
992
+ return String(value2);
993
+ }
994
+ if (typeof value2 === "object") {
995
+ return Array.isArray(value2) ? serializeArray(value2) : serializeObject(value2);
996
+ }
997
+ return void 0;
998
+ }
999
+ function quoteString(value2) {
1000
+ const quotes = {
1001
+ "'": 0.1,
1002
+ '"': 0.2
1003
+ };
1004
+ const replacements = {
1005
+ "'": "\\'",
1006
+ '"': '\\"',
1007
+ "\\": "\\\\",
1008
+ "\b": "\\b",
1009
+ "\f": "\\f",
1010
+ "\n": "\\n",
1011
+ "\r": "\\r",
1012
+ " ": "\\t",
1013
+ "\v": "\\v",
1014
+ "\0": "\\0",
1015
+ "\u2028": "\\u2028",
1016
+ "\u2029": "\\u2029"
1017
+ };
1018
+ let product = "";
1019
+ for (let i = 0; i < value2.length; i++) {
1020
+ const c = value2[i];
1021
+ switch (c) {
1022
+ case "'":
1023
+ case '"':
1024
+ quotes[c]++;
1025
+ product += c;
1026
+ continue;
1027
+ case "\0":
1028
+ if (util.isDigit(value2[i + 1])) {
1029
+ product += "\\x00";
1030
+ continue;
1031
+ }
1032
+ }
1033
+ if (replacements[c]) {
1034
+ product += replacements[c];
1035
+ continue;
1036
+ }
1037
+ if (c < " ") {
1038
+ let hexString = c.charCodeAt(0).toString(16);
1039
+ product += "\\x" + ("00" + hexString).substring(hexString.length);
1040
+ continue;
1041
+ }
1042
+ product += c;
1043
+ }
1044
+ const quoteChar = quote || Object.keys(quotes).reduce((a, b) => quotes[a] < quotes[b] ? a : b);
1045
+ product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]);
1046
+ return quoteChar + product + quoteChar;
1047
+ }
1048
+ function serializeObject(value2) {
1049
+ if (stack.indexOf(value2) >= 0) {
1050
+ throw TypeError("Converting circular structure to JSON5");
1051
+ }
1052
+ stack.push(value2);
1053
+ let stepback = indent;
1054
+ indent = indent + gap;
1055
+ let keys = propertyList || Object.keys(value2);
1056
+ let partial = [];
1057
+ for (const key of keys) {
1058
+ const propertyString = serializeProperty(key, value2);
1059
+ if (propertyString !== void 0) {
1060
+ let member = serializeKey(key) + ":";
1061
+ if (gap !== "") {
1062
+ member += " ";
1063
+ }
1064
+ member += propertyString;
1065
+ partial.push(member);
1066
+ }
1067
+ }
1068
+ let final;
1069
+ if (partial.length === 0) {
1070
+ final = "{}";
1071
+ } else {
1072
+ let properties;
1073
+ if (gap === "") {
1074
+ properties = partial.join(",");
1075
+ final = "{" + properties + "}";
1076
+ } else {
1077
+ let separator = ",\n" + indent;
1078
+ properties = partial.join(separator);
1079
+ final = "{\n" + indent + properties + ",\n" + stepback + "}";
1080
+ }
1081
+ }
1082
+ stack.pop();
1083
+ indent = stepback;
1084
+ return final;
1085
+ }
1086
+ function serializeKey(key) {
1087
+ if (key.length === 0) {
1088
+ return quoteString(key, true);
1089
+ }
1090
+ const firstChar = String.fromCodePoint(key.codePointAt(0));
1091
+ if (!util.isIdStartChar(firstChar)) {
1092
+ return quoteString(key, true);
1093
+ }
1094
+ for (let i = firstChar.length; i < key.length; i++) {
1095
+ if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
1096
+ return quoteString(key, true);
1097
+ }
1098
+ }
1099
+ return key;
1100
+ }
1101
+ function serializeArray(value2) {
1102
+ if (stack.indexOf(value2) >= 0) {
1103
+ throw TypeError("Converting circular structure to JSON5");
1104
+ }
1105
+ stack.push(value2);
1106
+ let stepback = indent;
1107
+ indent = indent + gap;
1108
+ let partial = [];
1109
+ for (let i = 0; i < value2.length; i++) {
1110
+ const propertyString = serializeProperty(String(i), value2);
1111
+ partial.push(propertyString !== void 0 ? propertyString : "null");
1112
+ }
1113
+ let final;
1114
+ if (partial.length === 0) {
1115
+ final = "[]";
1116
+ } else {
1117
+ if (gap === "") {
1118
+ let properties = partial.join(",");
1119
+ final = "[" + properties + "]";
1120
+ } else {
1121
+ let separator = ",\n" + indent;
1122
+ let properties = partial.join(separator);
1123
+ final = "[\n" + indent + properties + ",\n" + stepback + "]";
1124
+ }
1125
+ }
1126
+ stack.pop();
1127
+ indent = stepback;
1128
+ return final;
1129
+ }
1130
+ };
1131
+ }
1132
+ });
1133
+
1134
+ // ../../node_modules/json5/lib/index.js
1135
+ var require_lib = __commonJS({
1136
+ "../../node_modules/json5/lib/index.js"(exports2, module2) {
1137
+ var parse2 = require_parse();
1138
+ var stringify4 = require_stringify();
1139
+ var JSON52 = {
1140
+ parse: parse2,
1141
+ stringify: stringify4
1142
+ };
1143
+ module2.exports = JSON52;
1144
+ }
1145
+ });
1146
+
35
1147
  // detox/motion-change.cjs
36
1148
  var require_motion_change = __commonJS({
37
1149
  "detox/motion-change.cjs"(exports2, module2) {
@@ -239,8 +1351,11 @@ __export(detox_exports, {
239
1351
  module.exports = __toCommonJS(detox_exports);
240
1352
  var import_crypto = require("crypto");
241
1353
  var fs = __toESM(require("fs"), 1);
1354
+ var import_node_child_process2 = require("node:child_process");
1355
+ var import_node_module = require("node:module");
1356
+ var import_node_util = require("node:util");
242
1357
  var path = __toESM(require("path"), 1);
243
- var import_playwright = require("playwright");
1358
+ var import_playwright_core = require("playwright-core");
244
1359
 
245
1360
  // ../../scripts/lib/reap-browser.ts
246
1361
  var import_node_child_process = require("node:child_process");
@@ -1468,11 +2583,11 @@ async function automateWebViewFrames(context, names, helpers) {
1468
2583
  let encoded = body.body;
1469
2584
  if (!body.base64Encoded) {
1470
2585
  const bytes = new TextEncoder().encode(body.body);
1471
- let binary = "";
2586
+ let binary2 = "";
1472
2587
  for (let index = 0; index < bytes.length; index += 32768) {
1473
- binary += String.fromCharCode(...bytes.subarray(index, index + 32768));
2588
+ binary2 += String.fromCharCode(...bytes.subarray(index, index + 32768));
1474
2589
  }
1475
- encoded = btoa(binary);
2590
+ encoded = btoa(binary2);
1476
2591
  }
1477
2592
  return browserSession.send("Fetch.fulfillRequest", {
1478
2593
  requestId,
@@ -2543,155 +3658,2419 @@ function getVisibleHarnessAppForUrl(initUrl) {
2543
3658
  hidden: true
2544
3659
  };
2545
3660
  }
2546
- if (readRemoteEngineParam(parsed.search, parsed.hash)) {
2547
- return {
2548
- id: REMOTE_DISPLAY_SHELL_APP_ID,
2549
- name: "Remote",
2550
- color: "#0f172a",
2551
- icon: "R",
2552
- hidden: true
2553
- };
3661
+ if (readRemoteEngineParam(parsed.search, parsed.hash)) {
3662
+ return {
3663
+ id: REMOTE_DISPLAY_SHELL_APP_ID,
3664
+ name: "Remote",
3665
+ color: "#0f172a",
3666
+ icon: "R",
3667
+ hidden: true
3668
+ };
3669
+ }
3670
+ } catch {
3671
+ }
3672
+ return null;
3673
+ }
3674
+ function isAppBootTargetUrl(initUrl) {
3675
+ if (!initUrl) return false;
3676
+ if (getVisibleHarnessAppForUrl(initUrl)) return true;
3677
+ try {
3678
+ const parsed = new URL(initUrl);
3679
+ return parsed.searchParams.has("nativePreview") || parsed.searchParams.has("bundle") || parsed.searchParams.has("app") || /\/app\/[^/]+$/i.test(parsed.pathname) || /\/rn(?:\/[^/]+)?$/i.test(parsed.pathname) || /\/dock\/[^/]+$/i.test(parsed.pathname);
3680
+ } catch {
3681
+ return false;
3682
+ }
3683
+ }
3684
+
3685
+ // cli/ws-bridge.ts
3686
+ var import_ws = require("ws");
3687
+
3688
+ // src/simulator-route.ts
3689
+ var PEACH_SIMULATOR_PATH = "/simulator";
3690
+ var SIMULATOR_DOCUMENT_PATH = new RegExp(
3691
+ `^${PEACH_SIMULATOR_PATH}(?:/(?:rn(?:/[^/]+)?|app/[^/]+|dock/[^/]+))?/?$`
3692
+ );
3693
+
3694
+ // src/bridge-constants.ts
3695
+ var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
3696
+ var DEFAULT_SOOTSIM_BRIDGE_URL = `http://localhost:${DEFAULT_SOOTSIM_BRIDGE_PORT}/`;
3697
+ function parsePort(value) {
3698
+ if (typeof value === "number") {
3699
+ return Number.isInteger(value) && value > 0 ? value : null;
3700
+ }
3701
+ if (typeof value !== "string") return null;
3702
+ const trimmed = value.trim();
3703
+ if (!trimmed) return null;
3704
+ const parsed = Number(trimmed);
3705
+ return Number.isInteger(parsed) && parsed > 0 ? parsed : null;
3706
+ }
3707
+ function parsePortOffset(value) {
3708
+ const parsed = parsePort(value);
3709
+ return parsed === null ? 0 : parsed;
3710
+ }
3711
+ function resolveSootsimBridgePort(input = {}) {
3712
+ const explicitPort = parsePort(input.explicitPort);
3713
+ if (explicitPort !== null) return explicitPort;
3714
+ return DEFAULT_SOOTSIM_BRIDGE_PORT + parsePortOffset(input.portOffset);
3715
+ }
3716
+ function resolveSootsimBridgePortForHttpPort(input) {
3717
+ const explicitPort = parsePort(input.explicitPort);
3718
+ if (explicitPort !== null) return explicitPort;
3719
+ const httpPort = parsePort(input.httpPort);
3720
+ const portOffset = httpPort === null ? 0 : Math.max(0, httpPort - input.baseHttpPort);
3721
+ return resolveSootsimBridgePort({ portOffset });
3722
+ }
3723
+ var HOSTED_SHELL_PATH = new RegExp(`^(?:${PEACH_SIMULATOR_PATH}|/sootsim)(?:/|$)`);
3724
+ var AUTOMATION_SIM_IDLE_REAP_TTL_MS = 5 * 6e4;
3725
+
3726
+ // src/home-paths.ts
3727
+ var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
3728
+
3729
+ // ../peach-engine/src/metro-fingerprint-registry-client.ts
3730
+ var import_metro_fingerprint_registry = require("peachsim/metro-fingerprint-registry");
3731
+
3732
+ // ../peach-engine/src/metro-fingerprint.ts
3733
+ var import_metro_production_bundle = require("peachsim/metro-production-bundle");
3734
+ var import_react_native_host_modules = require("peachsim/react-native-host-modules");
3735
+
3736
+ // src/cloud-contract.ts
3737
+ var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
3738
+ var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
3739
+ var RNX_CLOUD_COMMAND_SCOPES = {
3740
+ state: "read",
3741
+ tree: "read",
3742
+ query: "read",
3743
+ resolve: "read",
3744
+ screenshot: "read",
3745
+ capture: "read",
3746
+ captureRegions: "read",
3747
+ memory: "read",
3748
+ diagnostics: "read",
3749
+ storageSnapshot: "read",
3750
+ perform: "drive",
3751
+ waitFor: "drive",
3752
+ tap: "drive",
3753
+ longPress: "drive",
3754
+ settle: "drive",
3755
+ openUrl: "drive",
3756
+ setAppearance: "drive",
3757
+ keyboard: "drive",
3758
+ focus: "drive",
3759
+ flowStatus: "drive",
3760
+ reset: "reset",
3761
+ camera: "media",
3762
+ location: "media",
3763
+ // string evaluation and arbitrary bridge calls are maestro's boundary: the
3764
+ // customer sdk never carries this scope, and the service grants it only to
3765
+ // the account api key caller. close rides along, since ending the page ends
3766
+ // the sim and belongs to the sim's owner rather than any driver.
3767
+ evaluate: "debug",
3768
+ call: "debug",
3769
+ close: "debug"
3770
+ };
3771
+ function scopeTableKeys() {
3772
+ return Object.keys(RNX_CLOUD_COMMAND_SCOPES).filter(
3773
+ (key) => Object.prototype.hasOwnProperty.call(RNX_CLOUD_COMMAND_SCOPES, key)
3774
+ );
3775
+ }
3776
+ var RNX_CLOUD_COMMAND_TYPES = Object.freeze(scopeTableKeys());
3777
+ var RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
3778
+ var RNX_CLOUD_TOKEN_SCOPES = Object.freeze([
3779
+ "read",
3780
+ "drive",
3781
+ "reset",
3782
+ "media"
3783
+ ]);
3784
+ var RNX_CLOUD_ALL_COMMAND_SCOPES = Object.freeze(["read", "drive", "reset", "media", "debug"]);
3785
+
3786
+ // src/public-brand.ts
3787
+ var name = "Peach";
3788
+ var peachPublicBrand = Object.freeze({
3789
+ name,
3790
+ packageName: "peachsim",
3791
+ commandName: "peach",
3792
+ domain: "peachsim.com",
3793
+ origin: "https://peachsim.com"
3794
+ });
3795
+ var rnxPublicBrand = peachPublicBrand;
3796
+
3797
+ // cli/run-rnx.ts
3798
+ var import_node_async_hooks = require("node:async_hooks");
3799
+ var sinks = new import_node_async_hooks.AsyncLocalStorage();
3800
+
3801
+ // cli/cloud-session.ts
3802
+ var MAX_ENCODED_SESSION_BYTES = 32 * 1024;
3803
+ var RNX_SHELL_UPDATE_PREFIX = "__RNX_SHELL_UPDATE_V1__";
3804
+ var RNX_SHELL_UPDATE_SET_PREFIX = `${RNX_SHELL_UPDATE_PREFIX}set:`;
3805
+ var RNX_SHELL_UPDATE_UNSET = `${RNX_SHELL_UPDATE_PREFIX}unset`;
3806
+
3807
+ // cli/commands/detect.ts
3808
+ var import_json5 = __toESM(require_lib(), 1);
3809
+
3810
+ // ../../node_modules/yaml/browser/dist/nodes/identity.js
3811
+ var ALIAS = Symbol.for("yaml.alias");
3812
+ var DOC = Symbol.for("yaml.document");
3813
+ var MAP = Symbol.for("yaml.map");
3814
+ var PAIR = Symbol.for("yaml.pair");
3815
+ var SCALAR = Symbol.for("yaml.scalar");
3816
+ var SEQ = Symbol.for("yaml.seq");
3817
+ var NODE_TYPE = Symbol.for("yaml.node.type");
3818
+ var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS;
3819
+ var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC;
3820
+ var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP;
3821
+ var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR;
3822
+ var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR;
3823
+ var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ;
3824
+ function isCollection(node) {
3825
+ if (node && typeof node === "object")
3826
+ switch (node[NODE_TYPE]) {
3827
+ case MAP:
3828
+ case SEQ:
3829
+ return true;
3830
+ }
3831
+ return false;
3832
+ }
3833
+ function isNode(node) {
3834
+ if (node && typeof node === "object")
3835
+ switch (node[NODE_TYPE]) {
3836
+ case ALIAS:
3837
+ case MAP:
3838
+ case SCALAR:
3839
+ case SEQ:
3840
+ return true;
3841
+ }
3842
+ return false;
3843
+ }
3844
+ var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
3845
+
3846
+ // ../../node_modules/yaml/browser/dist/visit.js
3847
+ var BREAK = Symbol("break visit");
3848
+ var SKIP = Symbol("skip children");
3849
+ var REMOVE = Symbol("remove node");
3850
+ function visit(node, visitor) {
3851
+ const visitor_ = initVisitor(visitor);
3852
+ if (isDocument(node)) {
3853
+ const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
3854
+ if (cd === REMOVE)
3855
+ node.contents = null;
3856
+ } else
3857
+ visit_(null, node, visitor_, Object.freeze([]));
3858
+ }
3859
+ visit.BREAK = BREAK;
3860
+ visit.SKIP = SKIP;
3861
+ visit.REMOVE = REMOVE;
3862
+ function visit_(key, node, visitor, path2) {
3863
+ const ctrl = callVisitor(key, node, visitor, path2);
3864
+ if (isNode(ctrl) || isPair(ctrl)) {
3865
+ replaceNode(key, path2, ctrl);
3866
+ return visit_(key, ctrl, visitor, path2);
3867
+ }
3868
+ if (typeof ctrl !== "symbol") {
3869
+ if (isCollection(node)) {
3870
+ path2 = Object.freeze(path2.concat(node));
3871
+ for (let i = 0; i < node.items.length; ++i) {
3872
+ const ci = visit_(i, node.items[i], visitor, path2);
3873
+ if (typeof ci === "number")
3874
+ i = ci - 1;
3875
+ else if (ci === BREAK)
3876
+ return BREAK;
3877
+ else if (ci === REMOVE) {
3878
+ node.items.splice(i, 1);
3879
+ i -= 1;
3880
+ }
3881
+ }
3882
+ } else if (isPair(node)) {
3883
+ path2 = Object.freeze(path2.concat(node));
3884
+ const ck = visit_("key", node.key, visitor, path2);
3885
+ if (ck === BREAK)
3886
+ return BREAK;
3887
+ else if (ck === REMOVE)
3888
+ node.key = null;
3889
+ const cv = visit_("value", node.value, visitor, path2);
3890
+ if (cv === BREAK)
3891
+ return BREAK;
3892
+ else if (cv === REMOVE)
3893
+ node.value = null;
3894
+ }
3895
+ }
3896
+ return ctrl;
3897
+ }
3898
+ async function visitAsync(node, visitor) {
3899
+ const visitor_ = initVisitor(visitor);
3900
+ if (isDocument(node)) {
3901
+ const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
3902
+ if (cd === REMOVE)
3903
+ node.contents = null;
3904
+ } else
3905
+ await visitAsync_(null, node, visitor_, Object.freeze([]));
3906
+ }
3907
+ visitAsync.BREAK = BREAK;
3908
+ visitAsync.SKIP = SKIP;
3909
+ visitAsync.REMOVE = REMOVE;
3910
+ async function visitAsync_(key, node, visitor, path2) {
3911
+ const ctrl = await callVisitor(key, node, visitor, path2);
3912
+ if (isNode(ctrl) || isPair(ctrl)) {
3913
+ replaceNode(key, path2, ctrl);
3914
+ return visitAsync_(key, ctrl, visitor, path2);
3915
+ }
3916
+ if (typeof ctrl !== "symbol") {
3917
+ if (isCollection(node)) {
3918
+ path2 = Object.freeze(path2.concat(node));
3919
+ for (let i = 0; i < node.items.length; ++i) {
3920
+ const ci = await visitAsync_(i, node.items[i], visitor, path2);
3921
+ if (typeof ci === "number")
3922
+ i = ci - 1;
3923
+ else if (ci === BREAK)
3924
+ return BREAK;
3925
+ else if (ci === REMOVE) {
3926
+ node.items.splice(i, 1);
3927
+ i -= 1;
3928
+ }
3929
+ }
3930
+ } else if (isPair(node)) {
3931
+ path2 = Object.freeze(path2.concat(node));
3932
+ const ck = await visitAsync_("key", node.key, visitor, path2);
3933
+ if (ck === BREAK)
3934
+ return BREAK;
3935
+ else if (ck === REMOVE)
3936
+ node.key = null;
3937
+ const cv = await visitAsync_("value", node.value, visitor, path2);
3938
+ if (cv === BREAK)
3939
+ return BREAK;
3940
+ else if (cv === REMOVE)
3941
+ node.value = null;
3942
+ }
3943
+ }
3944
+ return ctrl;
3945
+ }
3946
+ function initVisitor(visitor) {
3947
+ if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) {
3948
+ return Object.assign({
3949
+ Alias: visitor.Node,
3950
+ Map: visitor.Node,
3951
+ Scalar: visitor.Node,
3952
+ Seq: visitor.Node
3953
+ }, visitor.Value && {
3954
+ Map: visitor.Value,
3955
+ Scalar: visitor.Value,
3956
+ Seq: visitor.Value
3957
+ }, visitor.Collection && {
3958
+ Map: visitor.Collection,
3959
+ Seq: visitor.Collection
3960
+ }, visitor);
3961
+ }
3962
+ return visitor;
3963
+ }
3964
+ function callVisitor(key, node, visitor, path2) {
3965
+ if (typeof visitor === "function")
3966
+ return visitor(key, node, path2);
3967
+ if (isMap(node))
3968
+ return visitor.Map?.(key, node, path2);
3969
+ if (isSeq(node))
3970
+ return visitor.Seq?.(key, node, path2);
3971
+ if (isPair(node))
3972
+ return visitor.Pair?.(key, node, path2);
3973
+ if (isScalar(node))
3974
+ return visitor.Scalar?.(key, node, path2);
3975
+ if (isAlias(node))
3976
+ return visitor.Alias?.(key, node, path2);
3977
+ return void 0;
3978
+ }
3979
+ function replaceNode(key, path2, node) {
3980
+ const parent = path2[path2.length - 1];
3981
+ if (isCollection(parent)) {
3982
+ parent.items[key] = node;
3983
+ } else if (isPair(parent)) {
3984
+ if (key === "key")
3985
+ parent.key = node;
3986
+ else
3987
+ parent.value = node;
3988
+ } else if (isDocument(parent)) {
3989
+ parent.contents = node;
3990
+ } else {
3991
+ const pt = isAlias(parent) ? "alias" : "scalar";
3992
+ throw new Error(`Cannot replace node with ${pt} parent`);
3993
+ }
3994
+ }
3995
+
3996
+ // ../../node_modules/yaml/browser/dist/doc/directives.js
3997
+ var escapeChars = {
3998
+ "!": "%21",
3999
+ ",": "%2C",
4000
+ "[": "%5B",
4001
+ "]": "%5D",
4002
+ "{": "%7B",
4003
+ "}": "%7D"
4004
+ };
4005
+ var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]);
4006
+ var Directives = class _Directives {
4007
+ constructor(yaml, tags) {
4008
+ this.docStart = null;
4009
+ this.docEnd = false;
4010
+ this.yaml = Object.assign({}, _Directives.defaultYaml, yaml);
4011
+ this.tags = Object.assign({}, _Directives.defaultTags, tags);
4012
+ }
4013
+ clone() {
4014
+ const copy = new _Directives(this.yaml, this.tags);
4015
+ copy.docStart = this.docStart;
4016
+ return copy;
4017
+ }
4018
+ /**
4019
+ * During parsing, get a Directives instance for the current document and
4020
+ * update the stream state according to the current version's spec.
4021
+ */
4022
+ atDocument() {
4023
+ const res = new _Directives(this.yaml, this.tags);
4024
+ switch (this.yaml.version) {
4025
+ case "1.1":
4026
+ this.atNextDocument = true;
4027
+ break;
4028
+ case "1.2":
4029
+ this.atNextDocument = false;
4030
+ this.yaml = {
4031
+ explicit: _Directives.defaultYaml.explicit,
4032
+ version: "1.2"
4033
+ };
4034
+ this.tags = Object.assign({}, _Directives.defaultTags);
4035
+ break;
4036
+ }
4037
+ return res;
4038
+ }
4039
+ /**
4040
+ * @param onError - May be called even if the action was successful
4041
+ * @returns `true` on success
4042
+ */
4043
+ add(line, onError) {
4044
+ if (this.atNextDocument) {
4045
+ this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" };
4046
+ this.tags = Object.assign({}, _Directives.defaultTags);
4047
+ this.atNextDocument = false;
4048
+ }
4049
+ const parts = line.trim().split(/[ \t]+/);
4050
+ const name2 = parts.shift();
4051
+ switch (name2) {
4052
+ case "%TAG": {
4053
+ if (parts.length !== 2) {
4054
+ onError(0, "%TAG directive should contain exactly two parts");
4055
+ if (parts.length < 2)
4056
+ return false;
4057
+ }
4058
+ const [handle, prefix] = parts;
4059
+ this.tags[handle] = prefix;
4060
+ return true;
4061
+ }
4062
+ case "%YAML": {
4063
+ this.yaml.explicit = true;
4064
+ if (parts.length !== 1) {
4065
+ onError(0, "%YAML directive should contain exactly one part");
4066
+ return false;
4067
+ }
4068
+ const [version] = parts;
4069
+ if (version === "1.1" || version === "1.2") {
4070
+ this.yaml.version = version;
4071
+ return true;
4072
+ } else {
4073
+ const isValid = /^\d+\.\d+$/.test(version);
4074
+ onError(6, `Unsupported YAML version ${version}`, isValid);
4075
+ return false;
4076
+ }
4077
+ }
4078
+ default:
4079
+ onError(0, `Unknown directive ${name2}`, true);
4080
+ return false;
4081
+ }
4082
+ }
4083
+ /**
4084
+ * Resolves a tag, matching handles to those defined in %TAG directives.
4085
+ *
4086
+ * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
4087
+ * `'!local'` tag, or `null` if unresolvable.
4088
+ */
4089
+ tagName(source, onError) {
4090
+ if (source === "!")
4091
+ return "!";
4092
+ if (source[0] !== "!") {
4093
+ onError(`Not a valid tag: ${source}`);
4094
+ return null;
4095
+ }
4096
+ if (source[1] === "<") {
4097
+ const verbatim = source.slice(2, -1);
4098
+ if (verbatim === "!" || verbatim === "!!") {
4099
+ onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
4100
+ return null;
4101
+ }
4102
+ if (source[source.length - 1] !== ">")
4103
+ onError("Verbatim tags must end with a >");
4104
+ return verbatim;
4105
+ }
4106
+ const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
4107
+ if (!suffix)
4108
+ onError(`The ${source} tag has no suffix`);
4109
+ const prefix = this.tags[handle];
4110
+ if (prefix) {
4111
+ try {
4112
+ return prefix + decodeURIComponent(suffix);
4113
+ } catch (error) {
4114
+ onError(String(error));
4115
+ return null;
4116
+ }
4117
+ }
4118
+ if (handle === "!")
4119
+ return source;
4120
+ onError(`Could not resolve tag: ${source}`);
4121
+ return null;
4122
+ }
4123
+ /**
4124
+ * Given a fully resolved tag, returns its printable string form,
4125
+ * taking into account current tag prefixes and defaults.
4126
+ */
4127
+ tagString(tag) {
4128
+ for (const [handle, prefix] of Object.entries(this.tags)) {
4129
+ if (tag.startsWith(prefix))
4130
+ return handle + escapeTagName(tag.substring(prefix.length));
4131
+ }
4132
+ return tag[0] === "!" ? tag : `!<${tag}>`;
4133
+ }
4134
+ toString(doc) {
4135
+ const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
4136
+ const tagEntries = Object.entries(this.tags);
4137
+ let tagNames;
4138
+ if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
4139
+ const tags = {};
4140
+ visit(doc.contents, (_key, node) => {
4141
+ if (isNode(node) && node.tag)
4142
+ tags[node.tag] = true;
4143
+ });
4144
+ tagNames = Object.keys(tags);
4145
+ } else
4146
+ tagNames = [];
4147
+ for (const [handle, prefix] of tagEntries) {
4148
+ if (handle === "!!" && prefix === "tag:yaml.org,2002:")
4149
+ continue;
4150
+ if (!doc || tagNames.some((tn) => tn.startsWith(prefix)))
4151
+ lines.push(`%TAG ${handle} ${prefix}`);
4152
+ }
4153
+ return lines.join("\n");
4154
+ }
4155
+ };
4156
+ Directives.defaultYaml = { explicit: false, version: "1.2" };
4157
+ Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
4158
+
4159
+ // ../../node_modules/yaml/browser/dist/doc/anchors.js
4160
+ function anchorIsValid(anchor) {
4161
+ if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
4162
+ const sa = JSON.stringify(anchor);
4163
+ const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
4164
+ throw new Error(msg);
4165
+ }
4166
+ return true;
4167
+ }
4168
+
4169
+ // ../../node_modules/yaml/browser/dist/doc/applyReviver.js
4170
+ function applyReviver(reviver, obj, key, val) {
4171
+ if (val && typeof val === "object") {
4172
+ if (Array.isArray(val)) {
4173
+ for (let i = 0, len = val.length; i < len; ++i) {
4174
+ const v0 = val[i];
4175
+ const v1 = applyReviver(reviver, val, String(i), v0);
4176
+ if (v1 === void 0)
4177
+ delete val[i];
4178
+ else if (v1 !== v0)
4179
+ val[i] = v1;
4180
+ }
4181
+ } else if (val instanceof Map) {
4182
+ for (const k of Array.from(val.keys())) {
4183
+ const v0 = val.get(k);
4184
+ const v1 = applyReviver(reviver, val, k, v0);
4185
+ if (v1 === void 0)
4186
+ val.delete(k);
4187
+ else if (v1 !== v0)
4188
+ val.set(k, v1);
4189
+ }
4190
+ } else if (val instanceof Set) {
4191
+ for (const v0 of Array.from(val)) {
4192
+ const v1 = applyReviver(reviver, val, v0, v0);
4193
+ if (v1 === void 0)
4194
+ val.delete(v0);
4195
+ else if (v1 !== v0) {
4196
+ val.delete(v0);
4197
+ val.add(v1);
4198
+ }
4199
+ }
4200
+ } else {
4201
+ for (const [k, v0] of Object.entries(val)) {
4202
+ const v1 = applyReviver(reviver, val, k, v0);
4203
+ if (v1 === void 0)
4204
+ delete val[k];
4205
+ else if (v1 !== v0)
4206
+ val[k] = v1;
4207
+ }
4208
+ }
4209
+ }
4210
+ return reviver.call(obj, key, val);
4211
+ }
4212
+
4213
+ // ../../node_modules/yaml/browser/dist/nodes/toJS.js
4214
+ function toJS(value, arg, ctx) {
4215
+ if (Array.isArray(value))
4216
+ return value.map((v, i) => toJS(v, String(i), ctx));
4217
+ if (value && typeof value.toJSON === "function") {
4218
+ if (!ctx || !hasAnchor(value))
4219
+ return value.toJSON(arg, ctx);
4220
+ const data = { aliasCount: 0, count: 1, res: void 0 };
4221
+ ctx.anchors.set(value, data);
4222
+ ctx.onCreate = (res2) => {
4223
+ data.res = res2;
4224
+ delete ctx.onCreate;
4225
+ };
4226
+ const res = value.toJSON(arg, ctx);
4227
+ if (ctx.onCreate)
4228
+ ctx.onCreate(res);
4229
+ return res;
4230
+ }
4231
+ if (typeof value === "bigint" && !ctx?.keep)
4232
+ return Number(value);
4233
+ return value;
4234
+ }
4235
+
4236
+ // ../../node_modules/yaml/browser/dist/nodes/Node.js
4237
+ var NodeBase = class {
4238
+ constructor(type) {
4239
+ Object.defineProperty(this, NODE_TYPE, { value: type });
4240
+ }
4241
+ /** Create a copy of this node. */
4242
+ clone() {
4243
+ const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
4244
+ if (this.range)
4245
+ copy.range = this.range.slice();
4246
+ return copy;
4247
+ }
4248
+ /** A plain JavaScript representation of this node. */
4249
+ toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
4250
+ if (!isDocument(doc))
4251
+ throw new TypeError("A document argument is required");
4252
+ const ctx = {
4253
+ anchors: /* @__PURE__ */ new Map(),
4254
+ doc,
4255
+ keep: true,
4256
+ mapAsMap: mapAsMap === true,
4257
+ mapKeyWarned: false,
4258
+ maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100
4259
+ };
4260
+ const res = toJS(this, "", ctx);
4261
+ if (typeof onAnchor === "function")
4262
+ for (const { count, res: res2 } of ctx.anchors.values())
4263
+ onAnchor(res2, count);
4264
+ return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res;
4265
+ }
4266
+ };
4267
+
4268
+ // ../../node_modules/yaml/browser/dist/nodes/Alias.js
4269
+ var Alias = class extends NodeBase {
4270
+ constructor(source) {
4271
+ super(ALIAS);
4272
+ this.source = source;
4273
+ Object.defineProperty(this, "tag", {
4274
+ set() {
4275
+ throw new Error("Alias nodes cannot have tags");
4276
+ }
4277
+ });
4278
+ }
4279
+ /**
4280
+ * Resolve the value of this alias within `doc`, finding the last
4281
+ * instance of the `source` anchor before this node.
4282
+ */
4283
+ resolve(doc, ctx) {
4284
+ if (ctx?.maxAliasCount === 0)
4285
+ throw new ReferenceError("Alias resolution is disabled");
4286
+ let nodes;
4287
+ if (ctx?.aliasResolveCache) {
4288
+ nodes = ctx.aliasResolveCache;
4289
+ } else {
4290
+ nodes = [];
4291
+ visit(doc, {
4292
+ Node: (_key, node) => {
4293
+ if (isAlias(node) || hasAnchor(node))
4294
+ nodes.push(node);
4295
+ }
4296
+ });
4297
+ if (ctx)
4298
+ ctx.aliasResolveCache = nodes;
4299
+ }
4300
+ let found = void 0;
4301
+ for (const node of nodes) {
4302
+ if (node === this)
4303
+ break;
4304
+ if (node.anchor === this.source)
4305
+ found = node;
4306
+ }
4307
+ return found;
4308
+ }
4309
+ toJSON(_arg, ctx) {
4310
+ if (!ctx)
4311
+ return { source: this.source };
4312
+ const { anchors, doc, maxAliasCount } = ctx;
4313
+ const source = this.resolve(doc, ctx);
4314
+ if (!source) {
4315
+ const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
4316
+ throw new ReferenceError(msg);
4317
+ }
4318
+ let data = anchors.get(source);
4319
+ if (!data) {
4320
+ toJS(source, null, ctx);
4321
+ data = anchors.get(source);
4322
+ }
4323
+ if (data?.res === void 0) {
4324
+ const msg = "This should not happen: Alias anchor was not resolved?";
4325
+ throw new ReferenceError(msg);
4326
+ }
4327
+ if (maxAliasCount >= 0) {
4328
+ data.count += 1;
4329
+ if (data.aliasCount === 0)
4330
+ data.aliasCount = getAliasCount(doc, source, anchors);
4331
+ if (data.count * data.aliasCount > maxAliasCount) {
4332
+ const msg = "Excessive alias count indicates a resource exhaustion attack";
4333
+ throw new ReferenceError(msg);
4334
+ }
4335
+ }
4336
+ return data.res;
4337
+ }
4338
+ toString(ctx, _onComment, _onChompKeep) {
4339
+ const src = `*${this.source}`;
4340
+ if (ctx) {
4341
+ anchorIsValid(this.source);
4342
+ if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
4343
+ const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
4344
+ throw new Error(msg);
4345
+ }
4346
+ if (ctx.implicitKey)
4347
+ return `${src} `;
4348
+ }
4349
+ return src;
4350
+ }
4351
+ };
4352
+ function getAliasCount(doc, node, anchors) {
4353
+ if (isAlias(node)) {
4354
+ const source = node.resolve(doc);
4355
+ const anchor = anchors && source && anchors.get(source);
4356
+ return anchor ? anchor.count * anchor.aliasCount : 0;
4357
+ } else if (isCollection(node)) {
4358
+ let count = 0;
4359
+ for (const item of node.items) {
4360
+ const c = getAliasCount(doc, item, anchors);
4361
+ if (c > count)
4362
+ count = c;
4363
+ }
4364
+ return count;
4365
+ } else if (isPair(node)) {
4366
+ const kc = getAliasCount(doc, node.key, anchors);
4367
+ const vc = getAliasCount(doc, node.value, anchors);
4368
+ return Math.max(kc, vc);
4369
+ }
4370
+ return 1;
4371
+ }
4372
+
4373
+ // ../../node_modules/yaml/browser/dist/nodes/Scalar.js
4374
+ var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
4375
+ var Scalar = class extends NodeBase {
4376
+ constructor(value) {
4377
+ super(SCALAR);
4378
+ this.value = value;
4379
+ }
4380
+ toJSON(arg, ctx) {
4381
+ return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
4382
+ }
4383
+ toString() {
4384
+ return String(this.value);
4385
+ }
4386
+ };
4387
+ Scalar.BLOCK_FOLDED = "BLOCK_FOLDED";
4388
+ Scalar.BLOCK_LITERAL = "BLOCK_LITERAL";
4389
+ Scalar.PLAIN = "PLAIN";
4390
+ Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
4391
+ Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
4392
+
4393
+ // ../../node_modules/yaml/browser/dist/doc/createNode.js
4394
+ var defaultTagPrefix = "tag:yaml.org,2002:";
4395
+ function findTagObject(value, tagName, tags) {
4396
+ if (tagName) {
4397
+ const match = tags.filter((t) => t.tag === tagName);
4398
+ const tagObj = match.find((t) => !t.format) ?? match[0];
4399
+ if (!tagObj)
4400
+ throw new Error(`Tag ${tagName} not found`);
4401
+ return tagObj;
4402
+ }
4403
+ return tags.find((t) => t.identify?.(value) && !t.format);
4404
+ }
4405
+ function createNode(value, tagName, ctx) {
4406
+ if (isDocument(value))
4407
+ value = value.contents;
4408
+ if (isNode(value))
4409
+ return value;
4410
+ if (isPair(value)) {
4411
+ const map2 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
4412
+ map2.items.push(value);
4413
+ return map2;
4414
+ }
4415
+ if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
4416
+ value = value.valueOf();
4417
+ }
4418
+ const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema4, sourceObjects } = ctx;
4419
+ let ref = void 0;
4420
+ if (aliasDuplicateObjects && value && typeof value === "object") {
4421
+ ref = sourceObjects.get(value);
4422
+ if (ref) {
4423
+ ref.anchor ?? (ref.anchor = onAnchor(value));
4424
+ return new Alias(ref.anchor);
4425
+ } else {
4426
+ ref = { anchor: null, node: null };
4427
+ sourceObjects.set(value, ref);
4428
+ }
4429
+ }
4430
+ if (tagName?.startsWith("!!"))
4431
+ tagName = defaultTagPrefix + tagName.slice(2);
4432
+ let tagObj = findTagObject(value, tagName, schema4.tags);
4433
+ if (!tagObj) {
4434
+ if (value && typeof value.toJSON === "function") {
4435
+ value = value.toJSON();
4436
+ }
4437
+ if (!value || typeof value !== "object") {
4438
+ const node2 = new Scalar(value);
4439
+ if (ref)
4440
+ ref.node = node2;
4441
+ return node2;
4442
+ }
4443
+ tagObj = value instanceof Map ? schema4[MAP] : Symbol.iterator in Object(value) ? schema4[SEQ] : schema4[MAP];
4444
+ }
4445
+ if (onTagObj) {
4446
+ onTagObj(tagObj);
4447
+ delete ctx.onTagObj;
4448
+ }
4449
+ const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar(value);
4450
+ if (tagName)
4451
+ node.tag = tagName;
4452
+ else if (!tagObj.default)
4453
+ node.tag = tagObj.tag;
4454
+ if (ref)
4455
+ ref.node = node;
4456
+ return node;
4457
+ }
4458
+
4459
+ // ../../node_modules/yaml/browser/dist/nodes/Collection.js
4460
+ function collectionFromPath(schema4, path2, value) {
4461
+ let v = value;
4462
+ for (let i = path2.length - 1; i >= 0; --i) {
4463
+ const k = path2[i];
4464
+ if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4465
+ const a = [];
4466
+ a[k] = v;
4467
+ v = a;
4468
+ } else {
4469
+ v = /* @__PURE__ */ new Map([[k, v]]);
4470
+ }
4471
+ }
4472
+ return createNode(v, void 0, {
4473
+ aliasDuplicateObjects: false,
4474
+ keepUndefined: false,
4475
+ onAnchor: () => {
4476
+ throw new Error("This should not happen, please report a bug.");
4477
+ },
4478
+ schema: schema4,
4479
+ sourceObjects: /* @__PURE__ */ new Map()
4480
+ });
4481
+ }
4482
+ var isEmptyPath = (path2) => path2 == null || typeof path2 === "object" && !!path2[Symbol.iterator]().next().done;
4483
+ var Collection = class extends NodeBase {
4484
+ constructor(type, schema4) {
4485
+ super(type);
4486
+ Object.defineProperty(this, "schema", {
4487
+ value: schema4,
4488
+ configurable: true,
4489
+ enumerable: false,
4490
+ writable: true
4491
+ });
4492
+ }
4493
+ /**
4494
+ * Create a copy of this collection.
4495
+ *
4496
+ * @param schema - If defined, overwrites the original's schema
4497
+ */
4498
+ clone(schema4) {
4499
+ const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
4500
+ if (schema4)
4501
+ copy.schema = schema4;
4502
+ copy.items = copy.items.map((it) => isNode(it) || isPair(it) ? it.clone(schema4) : it);
4503
+ if (this.range)
4504
+ copy.range = this.range.slice();
4505
+ return copy;
4506
+ }
4507
+ /**
4508
+ * Adds a value to the collection. For `!!map` and `!!omap` the value must
4509
+ * be a Pair instance or a `{ key, value }` object, which may not have a key
4510
+ * that already exists in the map.
4511
+ */
4512
+ addIn(path2, value) {
4513
+ if (isEmptyPath(path2))
4514
+ this.add(value);
4515
+ else {
4516
+ const [key, ...rest] = path2;
4517
+ const node = this.get(key, true);
4518
+ if (isCollection(node))
4519
+ node.addIn(rest, value);
4520
+ else if (node === void 0 && this.schema)
4521
+ this.set(key, collectionFromPath(this.schema, rest, value));
4522
+ else
4523
+ throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
4524
+ }
4525
+ }
4526
+ /**
4527
+ * Removes a value from the collection.
4528
+ * @returns `true` if the item was found and removed.
4529
+ */
4530
+ deleteIn(path2) {
4531
+ const [key, ...rest] = path2;
4532
+ if (rest.length === 0)
4533
+ return this.delete(key);
4534
+ const node = this.get(key, true);
4535
+ if (isCollection(node))
4536
+ return node.deleteIn(rest);
4537
+ else
4538
+ throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
4539
+ }
4540
+ /**
4541
+ * Returns item at `key`, or `undefined` if not found. By default unwraps
4542
+ * scalar values from their surrounding node; to disable set `keepScalar` to
4543
+ * `true` (collections are always returned intact).
4544
+ */
4545
+ getIn(path2, keepScalar) {
4546
+ const [key, ...rest] = path2;
4547
+ const node = this.get(key, true);
4548
+ if (rest.length === 0)
4549
+ return !keepScalar && isScalar(node) ? node.value : node;
4550
+ else
4551
+ return isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
4552
+ }
4553
+ hasAllNullValues(allowScalar) {
4554
+ return this.items.every((node) => {
4555
+ if (!isPair(node))
4556
+ return false;
4557
+ const n = node.value;
4558
+ return n == null || allowScalar && isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
4559
+ });
4560
+ }
4561
+ /**
4562
+ * Checks if the collection includes a value with the key `key`.
4563
+ */
4564
+ hasIn(path2) {
4565
+ const [key, ...rest] = path2;
4566
+ if (rest.length === 0)
4567
+ return this.has(key);
4568
+ const node = this.get(key, true);
4569
+ return isCollection(node) ? node.hasIn(rest) : false;
4570
+ }
4571
+ /**
4572
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
4573
+ * boolean to add/remove the item from the set.
4574
+ */
4575
+ setIn(path2, value) {
4576
+ const [key, ...rest] = path2;
4577
+ if (rest.length === 0) {
4578
+ this.set(key, value);
4579
+ } else {
4580
+ const node = this.get(key, true);
4581
+ if (isCollection(node))
4582
+ node.setIn(rest, value);
4583
+ else if (node === void 0 && this.schema)
4584
+ this.set(key, collectionFromPath(this.schema, rest, value));
4585
+ else
4586
+ throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
4587
+ }
4588
+ }
4589
+ };
4590
+
4591
+ // ../../node_modules/yaml/browser/dist/stringify/stringifyComment.js
4592
+ var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
4593
+ function indentComment(comment, indent) {
4594
+ if (/^\n+$/.test(comment))
4595
+ return comment.substring(1);
4596
+ return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
4597
+ }
4598
+ var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
4599
+
4600
+ // ../../node_modules/yaml/browser/dist/stringify/foldFlowLines.js
4601
+ var FOLD_FLOW = "flow";
4602
+ var FOLD_BLOCK = "block";
4603
+ var FOLD_QUOTED = "quoted";
4604
+ function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
4605
+ if (!lineWidth || lineWidth < 0)
4606
+ return text;
4607
+ if (lineWidth < minContentWidth)
4608
+ minContentWidth = 0;
4609
+ const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
4610
+ if (text.length <= endStep)
4611
+ return text;
4612
+ const folds = [];
4613
+ const escapedFolds = {};
4614
+ let end = lineWidth - indent.length;
4615
+ if (typeof indentAtStart === "number") {
4616
+ if (indentAtStart > lineWidth - Math.max(2, minContentWidth))
4617
+ folds.push(0);
4618
+ else
4619
+ end = lineWidth - indentAtStart;
4620
+ }
4621
+ let split = void 0;
4622
+ let prev = void 0;
4623
+ let overflow = false;
4624
+ let i = -1;
4625
+ let escStart = -1;
4626
+ let escEnd = -1;
4627
+ if (mode === FOLD_BLOCK) {
4628
+ i = consumeMoreIndentedLines(text, i, indent.length);
4629
+ if (i !== -1)
4630
+ end = i + endStep;
4631
+ }
4632
+ for (let ch; ch = text[i += 1]; ) {
4633
+ if (mode === FOLD_QUOTED && ch === "\\") {
4634
+ escStart = i;
4635
+ switch (text[i + 1]) {
4636
+ case "x":
4637
+ i += 3;
4638
+ break;
4639
+ case "u":
4640
+ i += 5;
4641
+ break;
4642
+ case "U":
4643
+ i += 9;
4644
+ break;
4645
+ default:
4646
+ i += 1;
4647
+ }
4648
+ escEnd = i;
4649
+ }
4650
+ if (ch === "\n") {
4651
+ if (mode === FOLD_BLOCK)
4652
+ i = consumeMoreIndentedLines(text, i, indent.length);
4653
+ end = i + indent.length + endStep;
4654
+ split = void 0;
4655
+ } else {
4656
+ if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
4657
+ const next = text[i + 1];
4658
+ if (next && next !== " " && next !== "\n" && next !== " ")
4659
+ split = i;
4660
+ }
4661
+ if (i >= end) {
4662
+ if (split) {
4663
+ folds.push(split);
4664
+ end = split + endStep;
4665
+ split = void 0;
4666
+ } else if (mode === FOLD_QUOTED) {
4667
+ while (prev === " " || prev === " ") {
4668
+ prev = ch;
4669
+ ch = text[i += 1];
4670
+ overflow = true;
4671
+ }
4672
+ const j = i > escEnd + 1 ? i - 2 : escStart - 1;
4673
+ if (escapedFolds[j])
4674
+ return text;
4675
+ folds.push(j);
4676
+ escapedFolds[j] = true;
4677
+ end = j + endStep;
4678
+ split = void 0;
4679
+ } else {
4680
+ overflow = true;
4681
+ }
4682
+ }
4683
+ }
4684
+ prev = ch;
4685
+ }
4686
+ if (overflow && onOverflow)
4687
+ onOverflow();
4688
+ if (folds.length === 0)
4689
+ return text;
4690
+ if (onFold)
4691
+ onFold();
4692
+ let res = text.slice(0, folds[0]);
4693
+ for (let i2 = 0; i2 < folds.length; ++i2) {
4694
+ const fold = folds[i2];
4695
+ const end2 = folds[i2 + 1] || text.length;
4696
+ if (fold === 0)
4697
+ res = `
4698
+ ${indent}${text.slice(0, end2)}`;
4699
+ else {
4700
+ if (mode === FOLD_QUOTED && escapedFolds[fold])
4701
+ res += `${text[fold]}\\`;
4702
+ res += `
4703
+ ${indent}${text.slice(fold + 1, end2)}`;
4704
+ }
4705
+ }
4706
+ return res;
4707
+ }
4708
+ function consumeMoreIndentedLines(text, i, indent) {
4709
+ let end = i;
4710
+ let start = i + 1;
4711
+ let ch = text[start];
4712
+ while (ch === " " || ch === " ") {
4713
+ if (i < start + indent) {
4714
+ ch = text[++i];
4715
+ } else {
4716
+ do {
4717
+ ch = text[++i];
4718
+ } while (ch && ch !== "\n");
4719
+ end = i;
4720
+ start = i + 1;
4721
+ ch = text[start];
4722
+ }
4723
+ }
4724
+ return end;
4725
+ }
4726
+
4727
+ // ../../node_modules/yaml/browser/dist/stringify/stringifyString.js
4728
+ var getFoldOptions = (ctx, isBlock) => ({
4729
+ indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
4730
+ lineWidth: ctx.options.lineWidth,
4731
+ minContentWidth: ctx.options.minContentWidth
4732
+ });
4733
+ var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str);
4734
+ function lineLengthOverLimit(str, lineWidth, indentLength) {
4735
+ if (!lineWidth || lineWidth < 0)
4736
+ return false;
4737
+ const limit = lineWidth - indentLength;
4738
+ const strLen = str.length;
4739
+ if (strLen <= limit)
4740
+ return false;
4741
+ for (let i = 0, start = 0; i < strLen; ++i) {
4742
+ if (str[i] === "\n") {
4743
+ if (i - start > limit)
4744
+ return true;
4745
+ start = i + 1;
4746
+ if (strLen - start <= limit)
4747
+ return false;
4748
+ }
4749
+ }
4750
+ return true;
4751
+ }
4752
+ function doubleQuotedString(value, ctx) {
4753
+ const json = JSON.stringify(value);
4754
+ if (ctx.options.doubleQuotedAsJSON)
4755
+ return json;
4756
+ const { implicitKey } = ctx;
4757
+ const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
4758
+ const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
4759
+ let str = "";
4760
+ let start = 0;
4761
+ for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
4762
+ if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
4763
+ str += json.slice(start, i) + "\\ ";
4764
+ i += 1;
4765
+ start = i;
4766
+ ch = "\\";
4767
+ }
4768
+ if (ch === "\\")
4769
+ switch (json[i + 1]) {
4770
+ case "u":
4771
+ {
4772
+ str += json.slice(start, i);
4773
+ const code = json.substr(i + 2, 4);
4774
+ switch (code) {
4775
+ case "0000":
4776
+ str += "\\0";
4777
+ break;
4778
+ case "0007":
4779
+ str += "\\a";
4780
+ break;
4781
+ case "000b":
4782
+ str += "\\v";
4783
+ break;
4784
+ case "001b":
4785
+ str += "\\e";
4786
+ break;
4787
+ case "0085":
4788
+ str += "\\N";
4789
+ break;
4790
+ case "00a0":
4791
+ str += "\\_";
4792
+ break;
4793
+ case "2028":
4794
+ str += "\\L";
4795
+ break;
4796
+ case "2029":
4797
+ str += "\\P";
4798
+ break;
4799
+ default:
4800
+ if (code.substr(0, 2) === "00")
4801
+ str += "\\x" + code.substr(2);
4802
+ else
4803
+ str += json.substr(i, 6);
4804
+ }
4805
+ i += 5;
4806
+ start = i + 1;
4807
+ }
4808
+ break;
4809
+ case "n":
4810
+ if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
4811
+ i += 1;
4812
+ } else {
4813
+ str += json.slice(start, i) + "\n\n";
4814
+ while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
4815
+ str += "\n";
4816
+ i += 2;
4817
+ }
4818
+ str += indent;
4819
+ if (json[i + 2] === " ")
4820
+ str += "\\";
4821
+ i += 1;
4822
+ start = i + 1;
4823
+ }
4824
+ break;
4825
+ default:
4826
+ i += 1;
4827
+ }
4828
+ }
4829
+ str = start ? str + json.slice(start) : json;
4830
+ return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
4831
+ }
4832
+ function singleQuotedString(value, ctx) {
4833
+ if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
4834
+ return doubleQuotedString(value, ctx);
4835
+ const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
4836
+ const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&
4837
+ ${indent}`) + "'";
4838
+ return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false));
4839
+ }
4840
+ function quotedString(value, ctx) {
4841
+ const { singleQuote } = ctx.options;
4842
+ let qs;
4843
+ if (singleQuote === false)
4844
+ qs = doubleQuotedString;
4845
+ else {
4846
+ const hasDouble = value.includes('"');
4847
+ const hasSingle = value.includes("'");
4848
+ if (hasDouble && !hasSingle)
4849
+ qs = singleQuotedString;
4850
+ else if (hasSingle && !hasDouble)
4851
+ qs = doubleQuotedString;
4852
+ else
4853
+ qs = singleQuote ? singleQuotedString : doubleQuotedString;
4854
+ }
4855
+ return qs(value, ctx);
4856
+ }
4857
+ var blockEndNewlines;
4858
+ try {
4859
+ blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
4860
+ } catch {
4861
+ blockEndNewlines = /\n+(?!\n|$)/g;
4862
+ }
4863
+ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
4864
+ const { blockQuote, commentString, lineWidth } = ctx.options;
4865
+ if (!blockQuote || /\n[\t ]+$/.test(value)) {
4866
+ return quotedString(value, ctx);
4867
+ }
4868
+ const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
4869
+ const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
4870
+ if (!value)
4871
+ return literal ? "|\n" : ">\n";
4872
+ let chomp;
4873
+ let endStart;
4874
+ for (endStart = value.length; endStart > 0; --endStart) {
4875
+ const ch = value[endStart - 1];
4876
+ if (ch !== "\n" && ch !== " " && ch !== " ")
4877
+ break;
4878
+ }
4879
+ let end = value.substring(endStart);
4880
+ const endNlPos = end.indexOf("\n");
4881
+ if (endNlPos === -1) {
4882
+ chomp = "-";
4883
+ } else if (value === end || endNlPos !== end.length - 1) {
4884
+ chomp = "+";
4885
+ if (onChompKeep)
4886
+ onChompKeep();
4887
+ } else {
4888
+ chomp = "";
4889
+ }
4890
+ if (end) {
4891
+ value = value.slice(0, -end.length);
4892
+ if (end[end.length - 1] === "\n")
4893
+ end = end.slice(0, -1);
4894
+ end = end.replace(blockEndNewlines, `$&${indent}`);
4895
+ }
4896
+ let startWithSpace = false;
4897
+ let startEnd;
4898
+ let startNlPos = -1;
4899
+ for (startEnd = 0; startEnd < value.length; ++startEnd) {
4900
+ const ch = value[startEnd];
4901
+ if (ch === " ")
4902
+ startWithSpace = true;
4903
+ else if (ch === "\n")
4904
+ startNlPos = startEnd;
4905
+ else
4906
+ break;
4907
+ }
4908
+ let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);
4909
+ if (start) {
4910
+ value = value.substring(start.length);
4911
+ start = start.replace(/\n+/g, `$&${indent}`);
4912
+ }
4913
+ const indentSize = indent ? "2" : "1";
4914
+ let header = (startWithSpace ? indentSize : "") + chomp;
4915
+ if (comment) {
4916
+ header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
4917
+ if (onComment)
4918
+ onComment();
4919
+ }
4920
+ if (!literal) {
4921
+ const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
4922
+ let literalFallback = false;
4923
+ const foldOptions = getFoldOptions(ctx, true);
4924
+ if (blockQuote !== "folded" && type !== Scalar.BLOCK_FOLDED) {
4925
+ foldOptions.onOverflow = () => {
4926
+ literalFallback = true;
4927
+ };
4928
+ }
4929
+ const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);
4930
+ if (!literalFallback)
4931
+ return `>${header}
4932
+ ${indent}${body}`;
4933
+ }
4934
+ value = value.replace(/\n+/g, `$&${indent}`);
4935
+ return `|${header}
4936
+ ${indent}${start}${value}${end}`;
4937
+ }
4938
+ function plainString(item, ctx, onComment, onChompKeep) {
4939
+ const { type, value } = item;
4940
+ const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
4941
+ if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) {
4942
+ return quotedString(value, ctx);
4943
+ }
4944
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
4945
+ return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
4946
+ }
4947
+ if (!implicitKey && !inFlow && type !== Scalar.PLAIN && value.includes("\n")) {
4948
+ return blockString(item, ctx, onComment, onChompKeep);
4949
+ }
4950
+ if (containsDocumentMarker(value)) {
4951
+ if (indent === "") {
4952
+ ctx.forceBlockIndent = true;
4953
+ return blockString(item, ctx, onComment, onChompKeep);
4954
+ } else if (implicitKey && indent === indentStep) {
4955
+ return quotedString(value, ctx);
4956
+ }
4957
+ }
4958
+ const str = value.replace(/\n+/g, `$&
4959
+ ${indent}`);
4960
+ if (actualString) {
4961
+ const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str);
4962
+ const { compat, tags } = ctx.doc.schema;
4963
+ if (tags.some(test) || compat?.some(test))
4964
+ return quotedString(value, ctx);
4965
+ }
4966
+ return implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false));
4967
+ }
4968
+ function stringifyString(item, ctx, onComment, onChompKeep) {
4969
+ const { implicitKey, inFlow } = ctx;
4970
+ const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
4971
+ let { type } = item;
4972
+ if (type !== Scalar.QUOTE_DOUBLE) {
4973
+ if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
4974
+ type = Scalar.QUOTE_DOUBLE;
4975
+ }
4976
+ const _stringify = (_type) => {
4977
+ switch (_type) {
4978
+ case Scalar.BLOCK_FOLDED:
4979
+ case Scalar.BLOCK_LITERAL:
4980
+ return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
4981
+ case Scalar.QUOTE_DOUBLE:
4982
+ return doubleQuotedString(ss.value, ctx);
4983
+ case Scalar.QUOTE_SINGLE:
4984
+ return singleQuotedString(ss.value, ctx);
4985
+ case Scalar.PLAIN:
4986
+ return plainString(ss, ctx, onComment, onChompKeep);
4987
+ default:
4988
+ return null;
2554
4989
  }
2555
- } catch {
4990
+ };
4991
+ let res = _stringify(type);
4992
+ if (res === null) {
4993
+ const { defaultKeyType, defaultStringType } = ctx.options;
4994
+ const t = implicitKey && defaultKeyType || defaultStringType;
4995
+ res = _stringify(t);
4996
+ if (res === null)
4997
+ throw new Error(`Unsupported default string type ${t}`);
2556
4998
  }
2557
- return null;
4999
+ return res;
2558
5000
  }
2559
- function isAppBootTargetUrl(initUrl) {
2560
- if (!initUrl) return false;
2561
- if (getVisibleHarnessAppForUrl(initUrl)) return true;
2562
- try {
2563
- const parsed = new URL(initUrl);
2564
- return parsed.searchParams.has("nativePreview") || parsed.searchParams.has("bundle") || parsed.searchParams.has("app") || /\/app\/[^/]+$/i.test(parsed.pathname) || /\/rn(?:\/[^/]+)?$/i.test(parsed.pathname) || /\/dock\/[^/]+$/i.test(parsed.pathname);
2565
- } catch {
2566
- return false;
5001
+
5002
+ // ../../node_modules/yaml/browser/dist/stringify/stringify.js
5003
+ function createStringifyContext(doc, options) {
5004
+ const opt = Object.assign({
5005
+ blockQuote: true,
5006
+ commentString: stringifyComment,
5007
+ defaultKeyType: null,
5008
+ defaultStringType: "PLAIN",
5009
+ directives: null,
5010
+ doubleQuotedAsJSON: false,
5011
+ doubleQuotedMinMultiLineLength: 40,
5012
+ falseStr: "false",
5013
+ flowCollectionPadding: true,
5014
+ indentSeq: true,
5015
+ lineWidth: 80,
5016
+ minContentWidth: 20,
5017
+ nullStr: "null",
5018
+ simpleKeys: false,
5019
+ singleQuote: null,
5020
+ trailingComma: false,
5021
+ trueStr: "true",
5022
+ verifyAliasOrder: true
5023
+ }, doc.schema.toStringOptions, options);
5024
+ let inFlow;
5025
+ switch (opt.collectionStyle) {
5026
+ case "block":
5027
+ inFlow = false;
5028
+ break;
5029
+ case "flow":
5030
+ inFlow = true;
5031
+ break;
5032
+ default:
5033
+ inFlow = null;
2567
5034
  }
5035
+ return {
5036
+ anchors: /* @__PURE__ */ new Set(),
5037
+ doc,
5038
+ flowCollectionPadding: opt.flowCollectionPadding ? " " : "",
5039
+ indent: "",
5040
+ indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ",
5041
+ inFlow,
5042
+ options: opt
5043
+ };
5044
+ }
5045
+ function getTagObject(tags, item) {
5046
+ if (item.tag) {
5047
+ const match = tags.filter((t) => t.tag === item.tag);
5048
+ if (match.length > 0)
5049
+ return match.find((t) => t.format === item.format) ?? match[0];
5050
+ }
5051
+ let tagObj = void 0;
5052
+ let obj;
5053
+ if (isScalar(item)) {
5054
+ obj = item.value;
5055
+ let match = tags.filter((t) => t.identify?.(obj));
5056
+ if (match.length > 1) {
5057
+ const testMatch = match.filter((t) => t.test);
5058
+ if (testMatch.length > 0)
5059
+ match = testMatch;
5060
+ }
5061
+ tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);
5062
+ } else {
5063
+ obj = item;
5064
+ tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
5065
+ }
5066
+ if (!tagObj) {
5067
+ const name2 = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
5068
+ throw new Error(`Tag not resolved for ${name2} value`);
5069
+ }
5070
+ return tagObj;
5071
+ }
5072
+ function stringifyProps(node, tagObj, { anchors, doc }) {
5073
+ if (!doc.directives)
5074
+ return "";
5075
+ const props = [];
5076
+ const anchor = (isScalar(node) || isCollection(node)) && node.anchor;
5077
+ if (anchor && anchorIsValid(anchor)) {
5078
+ anchors.add(anchor);
5079
+ props.push(`&${anchor}`);
5080
+ }
5081
+ const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
5082
+ if (tag)
5083
+ props.push(doc.directives.tagString(tag));
5084
+ return props.join(" ");
5085
+ }
5086
+ function stringify(item, ctx, onComment, onChompKeep) {
5087
+ if (isPair(item))
5088
+ return item.toString(ctx, onComment, onChompKeep);
5089
+ if (isAlias(item)) {
5090
+ if (ctx.doc.directives)
5091
+ return item.toString(ctx);
5092
+ if (ctx.resolvedAliases?.has(item)) {
5093
+ throw new TypeError(`Cannot stringify circular structure without alias nodes`);
5094
+ } else {
5095
+ if (ctx.resolvedAliases)
5096
+ ctx.resolvedAliases.add(item);
5097
+ else
5098
+ ctx.resolvedAliases = /* @__PURE__ */ new Set([item]);
5099
+ item = item.resolve(ctx.doc);
5100
+ }
5101
+ }
5102
+ let tagObj = void 0;
5103
+ const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
5104
+ tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
5105
+ const props = stringifyProps(node, tagObj, ctx);
5106
+ if (props.length > 0)
5107
+ ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
5108
+ const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
5109
+ if (!props)
5110
+ return str;
5111
+ return isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
5112
+ ${ctx.indent}${str}`;
2568
5113
  }
2569
5114
 
2570
- // cli/ws-bridge.ts
2571
- var import_ws = require("ws");
5115
+ // ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
5116
+ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
5117
+ const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
5118
+ let keyComment = isNode(key) && key.comment || null;
5119
+ if (simpleKeys) {
5120
+ if (keyComment) {
5121
+ throw new Error("With simple keys, key nodes cannot have comments");
5122
+ }
5123
+ if (isCollection(key) || !isNode(key) && typeof key === "object") {
5124
+ const msg = "With simple keys, collection cannot be used as a key value";
5125
+ throw new Error(msg);
5126
+ }
5127
+ }
5128
+ let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || isCollection(key) || (isScalar(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object"));
5129
+ ctx = Object.assign({}, ctx, {
5130
+ allNullValues: false,
5131
+ implicitKey: !explicitKey && (simpleKeys || !allNullValues),
5132
+ indent: indent + indentStep
5133
+ });
5134
+ let keyCommentDone = false;
5135
+ let chompKeep = false;
5136
+ let str = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
5137
+ if (!explicitKey && !ctx.inFlow && str.length > 1024) {
5138
+ if (simpleKeys)
5139
+ throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
5140
+ explicitKey = true;
5141
+ }
5142
+ if (ctx.inFlow) {
5143
+ if (allNullValues || value == null) {
5144
+ if (keyCommentDone && onComment)
5145
+ onComment();
5146
+ return str === "" ? "?" : explicitKey ? `? ${str}` : str;
5147
+ }
5148
+ } else if (allNullValues && !simpleKeys || value == null && explicitKey) {
5149
+ str = `? ${str}`;
5150
+ if (keyComment && !keyCommentDone) {
5151
+ str += lineComment(str, ctx.indent, commentString(keyComment));
5152
+ } else if (chompKeep && onChompKeep)
5153
+ onChompKeep();
5154
+ return str;
5155
+ }
5156
+ if (keyCommentDone)
5157
+ keyComment = null;
5158
+ if (explicitKey) {
5159
+ if (keyComment)
5160
+ str += lineComment(str, ctx.indent, commentString(keyComment));
5161
+ str = `? ${str}
5162
+ ${indent}:`;
5163
+ } else {
5164
+ str = `${str}:`;
5165
+ if (keyComment)
5166
+ str += lineComment(str, ctx.indent, commentString(keyComment));
5167
+ }
5168
+ let vsb, vcb, valueComment;
5169
+ if (isNode(value)) {
5170
+ vsb = !!value.spaceBefore;
5171
+ vcb = value.commentBefore;
5172
+ valueComment = value.comment;
5173
+ } else {
5174
+ vsb = false;
5175
+ vcb = null;
5176
+ valueComment = null;
5177
+ if (value && typeof value === "object")
5178
+ value = doc.createNode(value);
5179
+ }
5180
+ ctx.implicitKey = false;
5181
+ if (!explicitKey && !keyComment && isScalar(value))
5182
+ ctx.indentAtStart = str.length + 1;
5183
+ chompKeep = false;
5184
+ if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
5185
+ ctx.indent = ctx.indent.substring(2);
5186
+ }
5187
+ let valueCommentDone = false;
5188
+ const valueStr = stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
5189
+ let ws = " ";
5190
+ if (keyComment || vsb || vcb) {
5191
+ ws = vsb ? "\n" : "";
5192
+ if (vcb) {
5193
+ const cs = commentString(vcb);
5194
+ ws += `
5195
+ ${indentComment(cs, ctx.indent)}`;
5196
+ }
5197
+ if (valueStr === "" && !ctx.inFlow) {
5198
+ if (ws === "\n" && valueComment)
5199
+ ws = "\n\n";
5200
+ } else {
5201
+ ws += `
5202
+ ${ctx.indent}`;
5203
+ }
5204
+ } else if (!explicitKey && isCollection(value)) {
5205
+ const vs0 = valueStr[0];
5206
+ const nl0 = valueStr.indexOf("\n");
5207
+ const hasNewline = nl0 !== -1;
5208
+ const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;
5209
+ if (hasNewline || !flow) {
5210
+ let hasPropsLine = false;
5211
+ if (hasNewline && (vs0 === "&" || vs0 === "!")) {
5212
+ let sp0 = valueStr.indexOf(" ");
5213
+ if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") {
5214
+ sp0 = valueStr.indexOf(" ", sp0 + 1);
5215
+ }
5216
+ if (sp0 === -1 || nl0 < sp0)
5217
+ hasPropsLine = true;
5218
+ }
5219
+ if (!hasPropsLine)
5220
+ ws = `
5221
+ ${ctx.indent}`;
5222
+ }
5223
+ } else if (valueStr === "" || valueStr[0] === "\n") {
5224
+ ws = "";
5225
+ }
5226
+ str += ws + valueStr;
5227
+ if (ctx.inFlow) {
5228
+ if (valueCommentDone && onComment)
5229
+ onComment();
5230
+ } else if (valueComment && !valueCommentDone) {
5231
+ str += lineComment(str, ctx.indent, commentString(valueComment));
5232
+ } else if (chompKeep && onChompKeep) {
5233
+ onChompKeep();
5234
+ }
5235
+ return str;
5236
+ }
2572
5237
 
2573
- // src/simulator-route.ts
2574
- var PEACH_SIMULATOR_PATH = "/simulator";
2575
- var SIMULATOR_DOCUMENT_PATH = new RegExp(
2576
- `^${PEACH_SIMULATOR_PATH}(?:/(?:rn(?:/[^/]+)?|app/[^/]+|dock/[^/]+))?/?$`
2577
- );
5238
+ // ../../node_modules/yaml/browser/dist/log.js
5239
+ function warn(logLevel, warning) {
5240
+ if (logLevel === "debug" || logLevel === "warn") {
5241
+ console.warn(warning);
5242
+ }
5243
+ }
2578
5244
 
2579
- // src/bridge-constants.ts
2580
- var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
2581
- var DEFAULT_SOOTSIM_BRIDGE_URL = `http://localhost:${DEFAULT_SOOTSIM_BRIDGE_PORT}/`;
2582
- function parsePort(value) {
2583
- if (typeof value === "number") {
2584
- return Number.isInteger(value) && value > 0 ? value : null;
5245
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
5246
+ var MERGE_KEY = "<<";
5247
+ var merge = {
5248
+ identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
5249
+ default: "key",
5250
+ tag: "tag:yaml.org,2002:merge",
5251
+ test: /^<<$/,
5252
+ resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {
5253
+ addToJSMap: addMergeToJSMap
5254
+ }),
5255
+ stringify: () => MERGE_KEY
5256
+ };
5257
+ var isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
5258
+ function addMergeToJSMap(ctx, map2, value) {
5259
+ const source = resolveAliasValue(ctx, value);
5260
+ if (isSeq(source))
5261
+ for (const it of source.items)
5262
+ mergeValue(ctx, map2, it);
5263
+ else if (Array.isArray(source))
5264
+ for (const it of source)
5265
+ mergeValue(ctx, map2, it);
5266
+ else
5267
+ mergeValue(ctx, map2, source);
5268
+ }
5269
+ function mergeValue(ctx, map2, value) {
5270
+ const source = resolveAliasValue(ctx, value);
5271
+ if (!isMap(source))
5272
+ throw new Error("Merge sources must be maps or map aliases");
5273
+ const srcMap = source.toJSON(null, ctx, Map);
5274
+ for (const [key, value2] of srcMap) {
5275
+ if (map2 instanceof Map) {
5276
+ if (!map2.has(key))
5277
+ map2.set(key, value2);
5278
+ } else if (map2 instanceof Set) {
5279
+ map2.add(key);
5280
+ } else if (!Object.prototype.hasOwnProperty.call(map2, key)) {
5281
+ Object.defineProperty(map2, key, {
5282
+ value: value2,
5283
+ writable: true,
5284
+ enumerable: true,
5285
+ configurable: true
5286
+ });
5287
+ }
2585
5288
  }
2586
- if (typeof value !== "string") return null;
2587
- const trimmed = value.trim();
2588
- if (!trimmed) return null;
2589
- const parsed = Number(trimmed);
2590
- return Number.isInteger(parsed) && parsed > 0 ? parsed : null;
5289
+ return map2;
2591
5290
  }
2592
- function parsePortOffset(value) {
2593
- const parsed = parsePort(value);
2594
- return parsed === null ? 0 : parsed;
5291
+ function resolveAliasValue(ctx, value) {
5292
+ return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
2595
5293
  }
2596
- function resolveSootsimBridgePort(input = {}) {
2597
- const explicitPort = parsePort(input.explicitPort);
2598
- if (explicitPort !== null) return explicitPort;
2599
- return DEFAULT_SOOTSIM_BRIDGE_PORT + parsePortOffset(input.portOffset);
5294
+
5295
+ // ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
5296
+ function addPairToJSMap(ctx, map2, { key, value }) {
5297
+ if (isNode(key) && key.addToJSMap)
5298
+ key.addToJSMap(ctx, map2, value);
5299
+ else if (isMergeKey(ctx, key))
5300
+ addMergeToJSMap(ctx, map2, value);
5301
+ else {
5302
+ const jsKey = toJS(key, "", ctx);
5303
+ if (map2 instanceof Map) {
5304
+ map2.set(jsKey, toJS(value, jsKey, ctx));
5305
+ } else if (map2 instanceof Set) {
5306
+ map2.add(jsKey);
5307
+ } else {
5308
+ const stringKey = stringifyKey(key, jsKey, ctx);
5309
+ const jsValue = toJS(value, stringKey, ctx);
5310
+ if (stringKey in map2)
5311
+ Object.defineProperty(map2, stringKey, {
5312
+ value: jsValue,
5313
+ writable: true,
5314
+ enumerable: true,
5315
+ configurable: true
5316
+ });
5317
+ else
5318
+ map2[stringKey] = jsValue;
5319
+ }
5320
+ }
5321
+ return map2;
5322
+ }
5323
+ function stringifyKey(key, jsKey, ctx) {
5324
+ if (jsKey === null)
5325
+ return "";
5326
+ if (typeof jsKey !== "object")
5327
+ return String(jsKey);
5328
+ if (isNode(key) && ctx?.doc) {
5329
+ const strCtx = createStringifyContext(ctx.doc, {});
5330
+ strCtx.anchors = /* @__PURE__ */ new Set();
5331
+ for (const node of ctx.anchors.keys())
5332
+ strCtx.anchors.add(node.anchor);
5333
+ strCtx.inFlow = true;
5334
+ strCtx.inStringifyKey = true;
5335
+ const strKey = key.toString(strCtx);
5336
+ if (!ctx.mapKeyWarned) {
5337
+ let jsonStr = JSON.stringify(strKey);
5338
+ if (jsonStr.length > 40)
5339
+ jsonStr = jsonStr.substring(0, 36) + '..."';
5340
+ warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
5341
+ ctx.mapKeyWarned = true;
5342
+ }
5343
+ return strKey;
5344
+ }
5345
+ return JSON.stringify(jsKey);
2600
5346
  }
2601
- function resolveSootsimBridgePortForHttpPort(input) {
2602
- const explicitPort = parsePort(input.explicitPort);
2603
- if (explicitPort !== null) return explicitPort;
2604
- const httpPort = parsePort(input.httpPort);
2605
- const portOffset = httpPort === null ? 0 : Math.max(0, httpPort - input.baseHttpPort);
2606
- return resolveSootsimBridgePort({ portOffset });
5347
+
5348
+ // ../../node_modules/yaml/browser/dist/nodes/Pair.js
5349
+ function createPair(key, value, ctx) {
5350
+ const k = createNode(key, void 0, ctx);
5351
+ const v = createNode(value, void 0, ctx);
5352
+ return new Pair(k, v);
5353
+ }
5354
+ var Pair = class _Pair {
5355
+ constructor(key, value = null) {
5356
+ Object.defineProperty(this, NODE_TYPE, { value: PAIR });
5357
+ this.key = key;
5358
+ this.value = value;
5359
+ }
5360
+ clone(schema4) {
5361
+ let { key, value } = this;
5362
+ if (isNode(key))
5363
+ key = key.clone(schema4);
5364
+ if (isNode(value))
5365
+ value = value.clone(schema4);
5366
+ return new _Pair(key, value);
5367
+ }
5368
+ toJSON(_, ctx) {
5369
+ const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
5370
+ return addPairToJSMap(ctx, pair, this);
5371
+ }
5372
+ toString(ctx, onComment, onChompKeep) {
5373
+ return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);
5374
+ }
5375
+ };
5376
+
5377
+ // ../../node_modules/yaml/browser/dist/stringify/stringifyCollection.js
5378
+ function stringifyCollection(collection, ctx, options) {
5379
+ const flow = ctx.inFlow ?? collection.flow;
5380
+ const stringify4 = flow ? stringifyFlowCollection : stringifyBlockCollection;
5381
+ return stringify4(collection, ctx, options);
5382
+ }
5383
+ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
5384
+ const { indent, options: { commentString } } = ctx;
5385
+ const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
5386
+ let chompKeep = false;
5387
+ const lines = [];
5388
+ for (let i = 0; i < items.length; ++i) {
5389
+ const item = items[i];
5390
+ let comment2 = null;
5391
+ if (isNode(item)) {
5392
+ if (!chompKeep && item.spaceBefore)
5393
+ lines.push("");
5394
+ addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
5395
+ if (item.comment)
5396
+ comment2 = item.comment;
5397
+ } else if (isPair(item)) {
5398
+ const ik = isNode(item.key) ? item.key : null;
5399
+ if (ik) {
5400
+ if (!chompKeep && ik.spaceBefore)
5401
+ lines.push("");
5402
+ addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
5403
+ }
5404
+ }
5405
+ chompKeep = false;
5406
+ let str2 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
5407
+ if (comment2)
5408
+ str2 += lineComment(str2, itemIndent, commentString(comment2));
5409
+ if (chompKeep && comment2)
5410
+ chompKeep = false;
5411
+ lines.push(blockItemPrefix + str2);
5412
+ }
5413
+ let str;
5414
+ if (lines.length === 0) {
5415
+ str = flowChars.start + flowChars.end;
5416
+ } else {
5417
+ str = lines[0];
5418
+ for (let i = 1; i < lines.length; ++i) {
5419
+ const line = lines[i];
5420
+ str += line ? `
5421
+ ${indent}${line}` : "\n";
5422
+ }
5423
+ }
5424
+ if (comment) {
5425
+ str += "\n" + indentComment(commentString(comment), indent);
5426
+ if (onComment)
5427
+ onComment();
5428
+ } else if (chompKeep && onChompKeep)
5429
+ onChompKeep();
5430
+ return str;
5431
+ }
5432
+ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
5433
+ const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
5434
+ itemIndent += indentStep;
5435
+ const itemCtx = Object.assign({}, ctx, {
5436
+ indent: itemIndent,
5437
+ inFlow: true,
5438
+ type: null
5439
+ });
5440
+ let reqNewline = false;
5441
+ let linesAtValue = 0;
5442
+ const lines = [];
5443
+ for (let i = 0; i < items.length; ++i) {
5444
+ const item = items[i];
5445
+ let comment = null;
5446
+ if (isNode(item)) {
5447
+ if (item.spaceBefore)
5448
+ lines.push("");
5449
+ addCommentBefore(ctx, lines, item.commentBefore, false);
5450
+ if (item.comment)
5451
+ comment = item.comment;
5452
+ } else if (isPair(item)) {
5453
+ const ik = isNode(item.key) ? item.key : null;
5454
+ if (ik) {
5455
+ if (ik.spaceBefore)
5456
+ lines.push("");
5457
+ addCommentBefore(ctx, lines, ik.commentBefore, false);
5458
+ if (ik.comment)
5459
+ reqNewline = true;
5460
+ }
5461
+ const iv = isNode(item.value) ? item.value : null;
5462
+ if (iv) {
5463
+ if (iv.comment)
5464
+ comment = iv.comment;
5465
+ if (iv.commentBefore)
5466
+ reqNewline = true;
5467
+ } else if (item.value == null && ik?.comment) {
5468
+ comment = ik.comment;
5469
+ }
5470
+ }
5471
+ if (comment)
5472
+ reqNewline = true;
5473
+ let str = stringify(item, itemCtx, () => comment = null);
5474
+ reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
5475
+ if (i < items.length - 1) {
5476
+ str += ",";
5477
+ } else if (ctx.options.trailingComma) {
5478
+ if (ctx.options.lineWidth > 0) {
5479
+ reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
5480
+ }
5481
+ if (reqNewline) {
5482
+ str += ",";
5483
+ }
5484
+ }
5485
+ if (comment)
5486
+ str += lineComment(str, itemIndent, commentString(comment));
5487
+ lines.push(str);
5488
+ linesAtValue = lines.length;
5489
+ }
5490
+ const { start, end } = flowChars;
5491
+ if (lines.length === 0) {
5492
+ return start + end;
5493
+ } else {
5494
+ if (!reqNewline) {
5495
+ const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
5496
+ reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
5497
+ }
5498
+ if (reqNewline) {
5499
+ let str = start;
5500
+ for (const line of lines)
5501
+ str += line ? `
5502
+ ${indentStep}${indent}${line}` : "\n";
5503
+ return `${str}
5504
+ ${indent}${end}`;
5505
+ } else {
5506
+ return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
5507
+ }
5508
+ }
5509
+ }
5510
+ function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
5511
+ if (comment && chompKeep)
5512
+ comment = comment.replace(/^\n+/, "");
5513
+ if (comment) {
5514
+ const ic = indentComment(commentString(comment), indent);
5515
+ lines.push(ic.trimStart());
5516
+ }
2607
5517
  }
2608
- var HOSTED_SHELL_PATH = new RegExp(`^(?:${PEACH_SIMULATOR_PATH}|/sootsim)(?:/|$)`);
2609
- var AUTOMATION_SIM_IDLE_REAP_TTL_MS = 5 * 6e4;
2610
5518
 
2611
- // src/home-paths.ts
2612
- var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
5519
+ // ../../node_modules/yaml/browser/dist/nodes/YAMLMap.js
5520
+ function findPair(items, key) {
5521
+ const k = isScalar(key) ? key.value : key;
5522
+ for (const it of items) {
5523
+ if (isPair(it)) {
5524
+ if (it.key === key || it.key === k)
5525
+ return it;
5526
+ if (isScalar(it.key) && it.key.value === k)
5527
+ return it;
5528
+ }
5529
+ }
5530
+ return void 0;
5531
+ }
5532
+ var YAMLMap = class extends Collection {
5533
+ static get tagName() {
5534
+ return "tag:yaml.org,2002:map";
5535
+ }
5536
+ constructor(schema4) {
5537
+ super(MAP, schema4);
5538
+ this.items = [];
5539
+ }
5540
+ /**
5541
+ * A generic collection parsing method that can be extended
5542
+ * to other node classes that inherit from YAMLMap
5543
+ */
5544
+ static from(schema4, obj, ctx) {
5545
+ const { keepUndefined, replacer } = ctx;
5546
+ const map2 = new this(schema4);
5547
+ const add = (key, value) => {
5548
+ if (typeof replacer === "function")
5549
+ value = replacer.call(obj, key, value);
5550
+ else if (Array.isArray(replacer) && !replacer.includes(key))
5551
+ return;
5552
+ if (value !== void 0 || keepUndefined)
5553
+ map2.items.push(createPair(key, value, ctx));
5554
+ };
5555
+ if (obj instanceof Map) {
5556
+ for (const [key, value] of obj)
5557
+ add(key, value);
5558
+ } else if (obj && typeof obj === "object") {
5559
+ for (const key of Object.keys(obj))
5560
+ add(key, obj[key]);
5561
+ }
5562
+ if (typeof schema4.sortMapEntries === "function") {
5563
+ map2.items.sort(schema4.sortMapEntries);
5564
+ }
5565
+ return map2;
5566
+ }
5567
+ /**
5568
+ * Adds a value to the collection.
5569
+ *
5570
+ * @param overwrite - If not set `true`, using a key that is already in the
5571
+ * collection will throw. Otherwise, overwrites the previous value.
5572
+ */
5573
+ add(pair, overwrite) {
5574
+ let _pair;
5575
+ if (isPair(pair))
5576
+ _pair = pair;
5577
+ else if (!pair || typeof pair !== "object" || !("key" in pair)) {
5578
+ _pair = new Pair(pair, pair?.value);
5579
+ } else
5580
+ _pair = new Pair(pair.key, pair.value);
5581
+ const prev = findPair(this.items, _pair.key);
5582
+ const sortEntries = this.schema?.sortMapEntries;
5583
+ if (prev) {
5584
+ if (!overwrite)
5585
+ throw new Error(`Key ${_pair.key} already set`);
5586
+ if (isScalar(prev.value) && isScalarValue(_pair.value))
5587
+ prev.value.value = _pair.value;
5588
+ else
5589
+ prev.value = _pair.value;
5590
+ } else if (sortEntries) {
5591
+ const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0);
5592
+ if (i === -1)
5593
+ this.items.push(_pair);
5594
+ else
5595
+ this.items.splice(i, 0, _pair);
5596
+ } else {
5597
+ this.items.push(_pair);
5598
+ }
5599
+ }
5600
+ delete(key) {
5601
+ const it = findPair(this.items, key);
5602
+ if (!it)
5603
+ return false;
5604
+ const del = this.items.splice(this.items.indexOf(it), 1);
5605
+ return del.length > 0;
5606
+ }
5607
+ get(key, keepScalar) {
5608
+ const it = findPair(this.items, key);
5609
+ const node = it?.value;
5610
+ return (!keepScalar && isScalar(node) ? node.value : node) ?? void 0;
5611
+ }
5612
+ has(key) {
5613
+ return !!findPair(this.items, key);
5614
+ }
5615
+ set(key, value) {
5616
+ this.add(new Pair(key, value), true);
5617
+ }
5618
+ /**
5619
+ * @param ctx - Conversion context, originally set in Document#toJS()
5620
+ * @param {Class} Type - If set, forces the returned collection type
5621
+ * @returns Instance of Type, Map, or Object
5622
+ */
5623
+ toJSON(_, ctx, Type) {
5624
+ const map2 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
5625
+ if (ctx?.onCreate)
5626
+ ctx.onCreate(map2);
5627
+ for (const item of this.items)
5628
+ addPairToJSMap(ctx, map2, item);
5629
+ return map2;
5630
+ }
5631
+ toString(ctx, onComment, onChompKeep) {
5632
+ if (!ctx)
5633
+ return JSON.stringify(this);
5634
+ for (const item of this.items) {
5635
+ if (!isPair(item))
5636
+ throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
5637
+ }
5638
+ if (!ctx.allNullValues && this.hasAllNullValues(false))
5639
+ ctx = Object.assign({}, ctx, { allNullValues: true });
5640
+ return stringifyCollection(this, ctx, {
5641
+ blockItemPrefix: "",
5642
+ flowChars: { start: "{", end: "}" },
5643
+ itemIndent: ctx.indent || "",
5644
+ onChompKeep,
5645
+ onComment
5646
+ });
5647
+ }
5648
+ };
2613
5649
 
2614
- // ../peach-engine/src/metro-fingerprint-registry-client.ts
2615
- var import_metro_fingerprint_registry = require("peachsim/metro-fingerprint-registry");
5650
+ // ../../node_modules/yaml/browser/dist/schema/common/map.js
5651
+ var map = {
5652
+ collection: "map",
5653
+ default: true,
5654
+ nodeClass: YAMLMap,
5655
+ tag: "tag:yaml.org,2002:map",
5656
+ resolve(map2, onError) {
5657
+ if (!isMap(map2))
5658
+ onError("Expected a mapping for this tag");
5659
+ return map2;
5660
+ },
5661
+ createNode: (schema4, obj, ctx) => YAMLMap.from(schema4, obj, ctx)
5662
+ };
2616
5663
 
2617
- // ../peach-engine/src/metro-fingerprint.ts
2618
- var import_metro_production_bundle = require("peachsim/metro-production-bundle");
2619
- var import_react_native_host_modules = require("peachsim/react-native-host-modules");
5664
+ // ../../node_modules/yaml/browser/dist/nodes/YAMLSeq.js
5665
+ var YAMLSeq = class extends Collection {
5666
+ static get tagName() {
5667
+ return "tag:yaml.org,2002:seq";
5668
+ }
5669
+ constructor(schema4) {
5670
+ super(SEQ, schema4);
5671
+ this.items = [];
5672
+ }
5673
+ add(value) {
5674
+ this.items.push(value);
5675
+ }
5676
+ /**
5677
+ * Removes a value from the collection.
5678
+ *
5679
+ * `key` must contain a representation of an integer for this to succeed.
5680
+ * It may be wrapped in a `Scalar`.
5681
+ *
5682
+ * @returns `true` if the item was found and removed.
5683
+ */
5684
+ delete(key) {
5685
+ const idx = asItemIndex(key);
5686
+ if (typeof idx !== "number")
5687
+ return false;
5688
+ const del = this.items.splice(idx, 1);
5689
+ return del.length > 0;
5690
+ }
5691
+ get(key, keepScalar) {
5692
+ const idx = asItemIndex(key);
5693
+ if (typeof idx !== "number")
5694
+ return void 0;
5695
+ const it = this.items[idx];
5696
+ return !keepScalar && isScalar(it) ? it.value : it;
5697
+ }
5698
+ /**
5699
+ * Checks if the collection includes a value with the key `key`.
5700
+ *
5701
+ * `key` must contain a representation of an integer for this to succeed.
5702
+ * It may be wrapped in a `Scalar`.
5703
+ */
5704
+ has(key) {
5705
+ const idx = asItemIndex(key);
5706
+ return typeof idx === "number" && idx < this.items.length;
5707
+ }
5708
+ /**
5709
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
5710
+ * boolean to add/remove the item from the set.
5711
+ *
5712
+ * If `key` does not contain a representation of an integer, this will throw.
5713
+ * It may be wrapped in a `Scalar`.
5714
+ */
5715
+ set(key, value) {
5716
+ const idx = asItemIndex(key);
5717
+ if (typeof idx !== "number")
5718
+ throw new Error(`Expected a valid index, not ${key}.`);
5719
+ const prev = this.items[idx];
5720
+ if (isScalar(prev) && isScalarValue(value))
5721
+ prev.value = value;
5722
+ else
5723
+ this.items[idx] = value;
5724
+ }
5725
+ toJSON(_, ctx) {
5726
+ const seq2 = [];
5727
+ if (ctx?.onCreate)
5728
+ ctx.onCreate(seq2);
5729
+ let i = 0;
5730
+ for (const item of this.items)
5731
+ seq2.push(toJS(item, String(i++), ctx));
5732
+ return seq2;
5733
+ }
5734
+ toString(ctx, onComment, onChompKeep) {
5735
+ if (!ctx)
5736
+ return JSON.stringify(this);
5737
+ return stringifyCollection(this, ctx, {
5738
+ blockItemPrefix: "- ",
5739
+ flowChars: { start: "[", end: "]" },
5740
+ itemIndent: (ctx.indent || "") + " ",
5741
+ onChompKeep,
5742
+ onComment
5743
+ });
5744
+ }
5745
+ static from(schema4, obj, ctx) {
5746
+ const { replacer } = ctx;
5747
+ const seq2 = new this(schema4);
5748
+ if (obj && Symbol.iterator in Object(obj)) {
5749
+ let i = 0;
5750
+ for (let it of obj) {
5751
+ if (typeof replacer === "function") {
5752
+ const key = obj instanceof Set ? it : String(i++);
5753
+ it = replacer.call(obj, key, it);
5754
+ }
5755
+ seq2.items.push(createNode(it, void 0, ctx));
5756
+ }
5757
+ }
5758
+ return seq2;
5759
+ }
5760
+ };
5761
+ function asItemIndex(key) {
5762
+ let idx = isScalar(key) ? key.value : key;
5763
+ if (idx && typeof idx === "string")
5764
+ idx = Number(idx);
5765
+ return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
5766
+ }
2620
5767
 
2621
- // src/cloud-contract.ts
2622
- var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
2623
- var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
2624
- var RNX_CLOUD_COMMAND_SCOPES = {
2625
- state: "read",
2626
- tree: "read",
2627
- query: "read",
2628
- resolve: "read",
2629
- screenshot: "read",
2630
- capture: "read",
2631
- captureRegions: "read",
2632
- memory: "read",
2633
- diagnostics: "read",
2634
- storageSnapshot: "read",
2635
- perform: "drive",
2636
- waitFor: "drive",
2637
- tap: "drive",
2638
- longPress: "drive",
2639
- settle: "drive",
2640
- openUrl: "drive",
2641
- setAppearance: "drive",
2642
- keyboard: "drive",
2643
- focus: "drive",
2644
- flowStatus: "drive",
2645
- reset: "reset",
2646
- camera: "media",
2647
- location: "media",
2648
- // string evaluation and arbitrary bridge calls are maestro's boundary: the
2649
- // customer sdk never carries this scope, and the service grants it only to
2650
- // the account api key caller. close rides along, since ending the page ends
2651
- // the sim and belongs to the sim's owner rather than any driver.
2652
- evaluate: "debug",
2653
- call: "debug",
2654
- close: "debug"
5768
+ // ../../node_modules/yaml/browser/dist/schema/common/seq.js
5769
+ var seq = {
5770
+ collection: "seq",
5771
+ default: true,
5772
+ nodeClass: YAMLSeq,
5773
+ tag: "tag:yaml.org,2002:seq",
5774
+ resolve(seq2, onError) {
5775
+ if (!isSeq(seq2))
5776
+ onError("Expected a sequence for this tag");
5777
+ return seq2;
5778
+ },
5779
+ createNode: (schema4, obj, ctx) => YAMLSeq.from(schema4, obj, ctx)
2655
5780
  };
2656
- function scopeTableKeys() {
2657
- return Object.keys(RNX_CLOUD_COMMAND_SCOPES).filter(
2658
- (key) => Object.prototype.hasOwnProperty.call(RNX_CLOUD_COMMAND_SCOPES, key)
2659
- );
5781
+
5782
+ // ../../node_modules/yaml/browser/dist/schema/json/schema.js
5783
+ function intIdentify(value) {
5784
+ return typeof value === "bigint" || Number.isInteger(value);
2660
5785
  }
2661
- var RNX_CLOUD_COMMAND_TYPES = Object.freeze(scopeTableKeys());
2662
- var RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
2663
- var RNX_CLOUD_TOKEN_SCOPES = Object.freeze([
2664
- "read",
2665
- "drive",
2666
- "reset",
2667
- "media"
2668
- ]);
2669
- var RNX_CLOUD_ALL_COMMAND_SCOPES = Object.freeze(["read", "drive", "reset", "media", "debug"]);
5786
+ var stringifyJSON = ({ value }) => JSON.stringify(value);
5787
+ var jsonScalars = [
5788
+ {
5789
+ identify: (value) => typeof value === "string",
5790
+ default: true,
5791
+ tag: "tag:yaml.org,2002:str",
5792
+ resolve: (str) => str,
5793
+ stringify: stringifyJSON
5794
+ },
5795
+ {
5796
+ identify: (value) => value == null,
5797
+ createNode: () => new Scalar(null),
5798
+ default: true,
5799
+ tag: "tag:yaml.org,2002:null",
5800
+ test: /^null$/,
5801
+ resolve: () => null,
5802
+ stringify: stringifyJSON
5803
+ },
5804
+ {
5805
+ identify: (value) => typeof value === "boolean",
5806
+ default: true,
5807
+ tag: "tag:yaml.org,2002:bool",
5808
+ test: /^true$|^false$/,
5809
+ resolve: (str) => str === "true",
5810
+ stringify: stringifyJSON
5811
+ },
5812
+ {
5813
+ identify: intIdentify,
5814
+ default: true,
5815
+ tag: "tag:yaml.org,2002:int",
5816
+ test: /^-?(?:0|[1-9][0-9]*)$/,
5817
+ resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),
5818
+ stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
5819
+ },
5820
+ {
5821
+ identify: (value) => typeof value === "number",
5822
+ default: true,
5823
+ tag: "tag:yaml.org,2002:float",
5824
+ test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
5825
+ resolve: (str) => parseFloat(str),
5826
+ stringify: stringifyJSON
5827
+ }
5828
+ ];
5829
+ var jsonError = {
5830
+ default: true,
5831
+ tag: "",
5832
+ test: /^/,
5833
+ resolve(str, onError) {
5834
+ onError(`Unresolved plain scalar ${JSON.stringify(str)}`);
5835
+ return str;
5836
+ }
5837
+ };
5838
+ var schema = [map, seq].concat(jsonScalars, jsonError);
2670
5839
 
2671
- // src/public-brand.ts
2672
- var name = "Peach";
2673
- var peachPublicBrand = Object.freeze({
2674
- name,
2675
- packageName: "peachsim",
2676
- commandName: "peach",
2677
- domain: "peachsim.com",
2678
- origin: "https://peachsim.com"
2679
- });
2680
- var rnxPublicBrand = peachPublicBrand;
5840
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
5841
+ function createPairs(schema4, iterable, ctx) {
5842
+ const { replacer } = ctx;
5843
+ const pairs2 = new YAMLSeq(schema4);
5844
+ pairs2.tag = "tag:yaml.org,2002:pairs";
5845
+ let i = 0;
5846
+ if (iterable && Symbol.iterator in Object(iterable))
5847
+ for (let it of iterable) {
5848
+ if (typeof replacer === "function")
5849
+ it = replacer.call(iterable, String(i++), it);
5850
+ let key, value;
5851
+ if (Array.isArray(it)) {
5852
+ if (it.length === 2) {
5853
+ key = it[0];
5854
+ value = it[1];
5855
+ } else
5856
+ throw new TypeError(`Expected [key, value] tuple: ${it}`);
5857
+ } else if (it && it instanceof Object) {
5858
+ const keys = Object.keys(it);
5859
+ if (keys.length === 1) {
5860
+ key = keys[0];
5861
+ value = it[key];
5862
+ } else {
5863
+ throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
5864
+ }
5865
+ } else {
5866
+ key = it;
5867
+ }
5868
+ pairs2.items.push(createPair(key, value, ctx));
5869
+ }
5870
+ return pairs2;
5871
+ }
2681
5872
 
2682
- // cli/run-rnx.ts
2683
- var import_node_async_hooks = require("node:async_hooks");
2684
- var sinks = new import_node_async_hooks.AsyncLocalStorage();
5873
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
5874
+ var YAMLOMap = class _YAMLOMap extends YAMLSeq {
5875
+ constructor() {
5876
+ super();
5877
+ this.add = YAMLMap.prototype.add.bind(this);
5878
+ this.delete = YAMLMap.prototype.delete.bind(this);
5879
+ this.get = YAMLMap.prototype.get.bind(this);
5880
+ this.has = YAMLMap.prototype.has.bind(this);
5881
+ this.set = YAMLMap.prototype.set.bind(this);
5882
+ this.tag = _YAMLOMap.tag;
5883
+ }
5884
+ /**
5885
+ * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
5886
+ * but TypeScript won't allow widening the signature of a child method.
5887
+ */
5888
+ toJSON(_, ctx) {
5889
+ if (!ctx)
5890
+ return super.toJSON(_);
5891
+ const map2 = /* @__PURE__ */ new Map();
5892
+ if (ctx?.onCreate)
5893
+ ctx.onCreate(map2);
5894
+ for (const pair of this.items) {
5895
+ let key, value;
5896
+ if (isPair(pair)) {
5897
+ key = toJS(pair.key, "", ctx);
5898
+ value = toJS(pair.value, key, ctx);
5899
+ } else {
5900
+ key = toJS(pair, "", ctx);
5901
+ }
5902
+ if (map2.has(key))
5903
+ throw new Error("Ordered maps must not include duplicate keys");
5904
+ map2.set(key, value);
5905
+ }
5906
+ return map2;
5907
+ }
5908
+ static from(schema4, iterable, ctx) {
5909
+ const pairs2 = createPairs(schema4, iterable, ctx);
5910
+ const omap2 = new this();
5911
+ omap2.items = pairs2.items;
5912
+ return omap2;
5913
+ }
5914
+ };
5915
+ YAMLOMap.tag = "tag:yaml.org,2002:omap";
2685
5916
 
2686
- // cli/cloud-session.ts
2687
- var MAX_ENCODED_SESSION_BYTES = 32 * 1024;
2688
- var RNX_SHELL_UPDATE_PREFIX = "__RNX_SHELL_UPDATE_V1__";
2689
- var RNX_SHELL_UPDATE_SET_PREFIX = `${RNX_SHELL_UPDATE_PREFIX}set:`;
2690
- var RNX_SHELL_UPDATE_UNSET = `${RNX_SHELL_UPDATE_PREFIX}unset`;
5917
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
5918
+ var YAMLSet = class _YAMLSet extends YAMLMap {
5919
+ constructor(schema4) {
5920
+ super(schema4);
5921
+ this.tag = _YAMLSet.tag;
5922
+ }
5923
+ add(key) {
5924
+ let pair;
5925
+ if (isPair(key))
5926
+ pair = key;
5927
+ else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
5928
+ pair = new Pair(key.key, null);
5929
+ else
5930
+ pair = new Pair(key, null);
5931
+ const prev = findPair(this.items, pair.key);
5932
+ if (!prev)
5933
+ this.items.push(pair);
5934
+ }
5935
+ /**
5936
+ * If `keepPair` is `true`, returns the Pair matching `key`.
5937
+ * Otherwise, returns the value of that Pair's key.
5938
+ */
5939
+ get(key, keepPair) {
5940
+ const pair = findPair(this.items, key);
5941
+ return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair;
5942
+ }
5943
+ set(key, value) {
5944
+ if (typeof value !== "boolean")
5945
+ throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
5946
+ const prev = findPair(this.items, key);
5947
+ if (prev && !value) {
5948
+ this.items.splice(this.items.indexOf(prev), 1);
5949
+ } else if (!prev && value) {
5950
+ this.items.push(new Pair(key));
5951
+ }
5952
+ }
5953
+ toJSON(_, ctx) {
5954
+ return super.toJSON(_, ctx, Set);
5955
+ }
5956
+ toString(ctx, onComment, onChompKeep) {
5957
+ if (!ctx)
5958
+ return JSON.stringify(this);
5959
+ if (this.hasAllNullValues(true))
5960
+ return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
5961
+ else
5962
+ throw new Error("Set items must all have null values");
5963
+ }
5964
+ static from(schema4, iterable, ctx) {
5965
+ const { replacer } = ctx;
5966
+ const set2 = new this(schema4);
5967
+ if (iterable && Symbol.iterator in Object(iterable))
5968
+ for (let value of iterable) {
5969
+ if (typeof replacer === "function")
5970
+ value = replacer.call(iterable, value, value);
5971
+ set2.items.push(createPair(value, null, ctx));
5972
+ }
5973
+ return set2;
5974
+ }
5975
+ };
5976
+ YAMLSet.tag = "tag:yaml.org,2002:set";
2691
5977
 
2692
- // cli/commands/detect.ts
2693
- var import_json5 = __toESM(require("json5"), 1);
2694
- var import_yaml = require("yaml");
5978
+ // ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
5979
+ function parseSexagesimal(str, asBigInt) {
5980
+ const sign = str[0];
5981
+ const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
5982
+ const num = (n) => asBigInt ? BigInt(n) : Number(n);
5983
+ const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
5984
+ return sign === "-" ? num(-1) * res : res;
5985
+ }
5986
+ var timestamp = {
5987
+ identify: (value) => value instanceof Date,
5988
+ default: true,
5989
+ tag: "tag:yaml.org,2002:timestamp",
5990
+ // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
5991
+ // may be omitted altogether, resulting in a date format. In such a case, the time part is
5992
+ // assumed to be 00:00:00Z (start of day, UTC).
5993
+ test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
5994
+ resolve(str) {
5995
+ const match = str.match(timestamp.test);
5996
+ if (!match)
5997
+ throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
5998
+ const [, year, month, day, hour, minute, second] = match.map(Number);
5999
+ const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0;
6000
+ let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
6001
+ const tz = match[8];
6002
+ if (tz && tz !== "Z") {
6003
+ let d = parseSexagesimal(tz, false);
6004
+ if (Math.abs(d) < 30)
6005
+ d *= 60;
6006
+ date -= 6e4 * d;
6007
+ }
6008
+ return new Date(date);
6009
+ },
6010
+ stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
6011
+ };
6012
+
6013
+ // ../../node_modules/yaml/browser/dist/parse/cst-visit.js
6014
+ var BREAK2 = Symbol("break visit");
6015
+ var SKIP2 = Symbol("skip children");
6016
+ var REMOVE2 = Symbol("remove item");
6017
+ function visit2(cst, visitor) {
6018
+ if ("type" in cst && cst.type === "document")
6019
+ cst = { start: cst.start, value: cst.value };
6020
+ _visit(Object.freeze([]), cst, visitor);
6021
+ }
6022
+ visit2.BREAK = BREAK2;
6023
+ visit2.SKIP = SKIP2;
6024
+ visit2.REMOVE = REMOVE2;
6025
+ visit2.itemAtPath = (cst, path2) => {
6026
+ let item = cst;
6027
+ for (const [field, index] of path2) {
6028
+ const tok = item?.[field];
6029
+ if (tok && "items" in tok) {
6030
+ item = tok.items[index];
6031
+ } else
6032
+ return void 0;
6033
+ }
6034
+ return item;
6035
+ };
6036
+ visit2.parentCollection = (cst, path2) => {
6037
+ const parent = visit2.itemAtPath(cst, path2.slice(0, -1));
6038
+ const field = path2[path2.length - 1][0];
6039
+ const coll = parent?.[field];
6040
+ if (coll && "items" in coll)
6041
+ return coll;
6042
+ throw new Error("Parent collection not found");
6043
+ };
6044
+ function _visit(path2, item, visitor) {
6045
+ let ctrl = visitor(item, path2);
6046
+ if (typeof ctrl === "symbol")
6047
+ return ctrl;
6048
+ for (const field of ["key", "value"]) {
6049
+ const token = item[field];
6050
+ if (token && "items" in token) {
6051
+ for (let i = 0; i < token.items.length; ++i) {
6052
+ const ci = _visit(Object.freeze(path2.concat([[field, i]])), token.items[i], visitor);
6053
+ if (typeof ci === "number")
6054
+ i = ci - 1;
6055
+ else if (ci === BREAK2)
6056
+ return BREAK2;
6057
+ else if (ci === REMOVE2) {
6058
+ token.items.splice(i, 1);
6059
+ i -= 1;
6060
+ }
6061
+ }
6062
+ if (typeof ctrl === "function" && field === "key")
6063
+ ctrl = ctrl(item, path2);
6064
+ }
6065
+ }
6066
+ return typeof ctrl === "function" ? ctrl(item, path2) : ctrl;
6067
+ }
6068
+
6069
+ // ../../node_modules/yaml/browser/dist/parse/lexer.js
6070
+ var hexDigits = new Set("0123456789ABCDEFabcdef");
6071
+ var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
6072
+ var flowIndicatorChars = new Set(",[]{}");
6073
+ var invalidAnchorChars = new Set(" ,[]{}\n\r ");
2695
6074
 
2696
6075
  // cli/cloud-client.ts
2697
6076
  var DEFAULT_RNX_CLOUD_ORIGIN = rnxPublicBrand.origin;
@@ -5721,9 +9100,30 @@ var device = {
5721
9100
  return;
5722
9101
  }
5723
9102
  if (!_browser) {
9103
+ const executablePath = import_playwright_core.chromium.executablePath();
9104
+ if (!fs.existsSync(executablePath)) {
9105
+ const requireDriver = (0, import_node_module.createRequire)(path.join(__dirname, "index.cjs"));
9106
+ const cliPath = path.join(
9107
+ path.dirname(requireDriver.resolve("playwright-core/package.json")),
9108
+ "cli.js"
9109
+ );
9110
+ try {
9111
+ await (0, import_node_util.promisify)(import_node_child_process2.execFile)(process.execPath, [cliPath, "install", "chromium"], {
9112
+ timeout: 6e5,
9113
+ maxBuffer: 4 * 1024 * 1024
9114
+ });
9115
+ } catch (error) {
9116
+ throw new Error("Peach Detox could not install its Chromium browser", {
9117
+ cause: error
9118
+ });
9119
+ }
9120
+ }
5724
9121
  const launched = await launchReapedChromeScoped(
5725
- (options) => import_playwright.chromium.launch(options),
5726
- { headless: true, ignoreDefaultArgs: ["--disable-popup-blocking"] }
9122
+ (options) => import_playwright_core.chromium.launch(options),
9123
+ {
9124
+ headless: true,
9125
+ ignoreDefaultArgs: ["--disable-popup-blocking"]
9126
+ }
5727
9127
  );
5728
9128
  _browser = launched.browser;
5729
9129
  _reapBrowserNow = launched.reapNow;