@nstudio/nativescript-compiler 0.0.0-stage → 9.2.0-alpha.9

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 (1610) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +72 -2
  3. package/bin/build-dist.mjs +145 -0
  4. package/bin/ns-compiled-adapter.js +46 -0
  5. package/bin/ns-compiled-doctor.js +15 -0
  6. package/bin/ns-compiled-retrace.js +16 -0
  7. package/bin/ns-compiled-verify.js +15 -0
  8. package/bin/ns-compiled.js +26 -0
  9. package/bin/strip-types.js +18 -0
  10. package/config.d.ts +41 -0
  11. package/dist/adapters/active.js +59 -0
  12. package/dist/adapters/first-party.js +12 -0
  13. package/dist/adapters/framework.js +135 -0
  14. package/dist/adapters/hooks.js +115 -0
  15. package/dist/adapters/load.js +188 -0
  16. package/dist/api/adapter-api.js +2 -0
  17. package/dist/api/binding-api.js +11 -0
  18. package/dist/api/elements.js +21 -0
  19. package/dist/api/ir.js +29 -0
  20. package/dist/api/listview.js +27 -0
  21. package/dist/api/rewrite.js +98 -0
  22. package/dist/api/typescript-internal.d.ts +35 -0
  23. package/dist/cli/commands/compile-android.cjs +79 -0
  24. package/dist/cli/commands/compile-doctor.cjs +45 -0
  25. package/dist/cli/commands/compile-ios.cjs +77 -0
  26. package/dist/cli/commands/compile-retrace.cjs +40 -0
  27. package/dist/cli/commands/compile-verify.cjs +73 -0
  28. package/dist/cli/contracts.cjs +36 -0
  29. package/dist/cli/runtime.cjs +166 -0
  30. package/dist/css/css.js +118 -0
  31. package/dist/css/worker.js +242 -0
  32. package/dist/driver/cli.js +95 -0
  33. package/dist/driver/compile.js +571 -0
  34. package/dist/driver/contract.js +136 -0
  35. package/dist/driver/mirror.js +71 -0
  36. package/dist/driver/paths.js +19 -0
  37. package/dist/driver/preflight.js +206 -0
  38. package/dist/driver/toolchain.js +46 -0
  39. package/dist/driver/unimplemented.js +326 -0
  40. package/dist/kit/core-source.js +107 -0
  41. package/dist/kit/kit-index.js +105 -0
  42. package/dist/kit/manifest.js +468 -0
  43. package/dist/kit/overlay.js +56 -0
  44. package/dist/kit/swift-declarations.js +643 -0
  45. package/dist/kotlin/access.js +624 -0
  46. package/dist/kotlin/app-modules.js +111 -0
  47. package/dist/kotlin/arguments.js +397 -0
  48. package/dist/kotlin/assignment.js +226 -0
  49. package/dist/kotlin/builtins.js +575 -0
  50. package/dist/kotlin/calls.js +516 -0
  51. package/dist/kotlin/checked.js +61 -0
  52. package/dist/kotlin/class-accessors.js +129 -0
  53. package/dist/kotlin/class-constructor.js +117 -0
  54. package/dist/kotlin/class-declaration.js +308 -0
  55. package/dist/kotlin/class-fields.js +361 -0
  56. package/dist/kotlin/class-methods.js +213 -0
  57. package/dist/kotlin/classes.js +333 -0
  58. package/dist/kotlin/components.js +445 -0
  59. package/dist/kotlin/construction.js +228 -0
  60. package/dist/kotlin/control-flow.js +188 -0
  61. package/dist/kotlin/conversion.js +513 -0
  62. package/dist/kotlin/core-api.js +762 -0
  63. package/dist/kotlin/core-index.js +228 -0
  64. package/dist/kotlin/declarations.js +461 -0
  65. package/dist/kotlin/diagnostics.js +28 -0
  66. package/dist/kotlin/expression-statements.js +227 -0
  67. package/dist/kotlin/expressions.js +461 -0
  68. package/dist/kotlin/functions.js +474 -0
  69. package/dist/kotlin/global-calls.js +307 -0
  70. package/dist/kotlin/install.js +89 -0
  71. package/dist/kotlin/key-plans.js +117 -0
  72. package/dist/kotlin/kit-gen.js +581 -0
  73. package/dist/kotlin/ktfmt.js +60 -0
  74. package/dist/kotlin/library.js +62 -0
  75. package/dist/kotlin/literals.js +593 -0
  76. package/dist/kotlin/loops.js +184 -0
  77. package/dist/kotlin/mixins.js +103 -0
  78. package/dist/kotlin/modules.js +769 -0
  79. package/dist/kotlin/names.js +274 -0
  80. package/dist/kotlin/narrowing.js +180 -0
  81. package/dist/kotlin/native/api.js +117 -0
  82. package/dist/kotlin/native/bridging.js +254 -0
  83. package/dist/kotlin/native/calls.js +408 -0
  84. package/dist/kotlin/native/classfiles.js +524 -0
  85. package/dist/kotlin/native/classpath.js +32 -0
  86. package/dist/kotlin/native/conversions.js +280 -0
  87. package/dist/kotlin/native/extend.js +302 -0
  88. package/dist/kotlin/native/members.js +240 -0
  89. package/dist/kotlin/native/overloads.js +253 -0
  90. package/dist/kotlin/native/subclasses.js +378 -0
  91. package/dist/kotlin/native/types.js +421 -0
  92. package/dist/kotlin/operators.js +445 -0
  93. package/dist/kotlin/optional-chains.js +279 -0
  94. package/dist/kotlin/overrides.js +825 -0
  95. package/dist/kotlin/placement.js +746 -0
  96. package/dist/kotlin/prototype-calls.js +154 -0
  97. package/dist/kotlin/render.js +363 -0
  98. package/dist/kotlin/state-backend.js +123 -0
  99. package/dist/kotlin/statements.js +426 -0
  100. package/dist/kotlin/static-calls.js +296 -0
  101. package/dist/kotlin/syntax.js +689 -0
  102. package/dist/kotlin/translator-types.js +1 -0
  103. package/dist/kotlin/translator.js +806 -0
  104. package/dist/kotlin/type-facts.js +414 -0
  105. package/dist/kotlin/type-tests.js +250 -0
  106. package/dist/kotlin/types.js +655 -0
  107. package/dist/kotlin/untyped-values.js +354 -0
  108. package/dist/plugins/bindings-android.js +69 -0
  109. package/dist/plugins/bindings.js +93 -0
  110. package/dist/plugins/native-android.js +582 -0
  111. package/dist/plugins/native-ios.js +632 -0
  112. package/dist/plugins/resolve.js +108 -0
  113. package/dist/plugins/source.js +1040 -0
  114. package/dist/program/app-modules.js +52 -0
  115. package/dist/program/app-paths.js +60 -0
  116. package/dist/program/build-caches.js +14 -0
  117. package/dist/program/build-context.js +48 -0
  118. package/dist/program/constructor-factories.js +134 -0
  119. package/dist/program/core-facts.js +151 -0
  120. package/dist/program/core-patches.js +59 -0
  121. package/dist/program/env.js +4 -0
  122. package/dist/program/module-order.js +123 -0
  123. package/dist/program/order.js +23 -0
  124. package/dist/program/patterns.js +99 -0
  125. package/dist/program/platform.js +401 -0
  126. package/dist/program/program.js +726 -0
  127. package/dist/program/properties.js +61 -0
  128. package/dist/program/reach.js +444 -0
  129. package/dist/program/source-lines.js +268 -0
  130. package/dist/program/stable-names.js +112 -0
  131. package/dist/semantics/apis/api.js +31 -0
  132. package/dist/semantics/apis/array.js +69 -0
  133. package/dist/semantics/apis/bigint.js +53 -0
  134. package/dist/semantics/apis/console.js +29 -0
  135. package/dist/semantics/apis/date.js +7 -0
  136. package/dist/semantics/apis/globals.js +40 -0
  137. package/dist/semantics/apis/json.js +6 -0
  138. package/dist/semantics/apis/mapset.js +21 -0
  139. package/dist/semantics/apis/math.js +48 -0
  140. package/dist/semantics/apis/number.js +33 -0
  141. package/dist/semantics/apis/object.js +25 -0
  142. package/dist/semantics/apis/operators.js +316 -0
  143. package/dist/semantics/apis/promise.js +22 -0
  144. package/dist/semantics/apis/regexp.js +15 -0
  145. package/dist/semantics/apis/statics.js +61 -0
  146. package/dist/semantics/apis/string.js +45 -0
  147. package/dist/semantics/ast.js +315 -0
  148. package/dist/semantics/async.js +582 -0
  149. package/dist/semantics/class-plan.js +168 -0
  150. package/dist/semantics/classes.js +425 -0
  151. package/dist/semantics/config.js +29 -0
  152. package/dist/semantics/constant-init.js +107 -0
  153. package/dist/semantics/conversion.js +255 -0
  154. package/dist/semantics/decision-trace.js +304 -0
  155. package/dist/semantics/facts.js +433 -0
  156. package/dist/semantics/forms/by-name.js +338 -0
  157. package/dist/semantics/forms/flow.js +336 -0
  158. package/dist/semantics/forms/forms.js +311 -0
  159. package/dist/semantics/forms/observers.js +513 -0
  160. package/dist/semantics/forms/open.js +218 -0
  161. package/dist/semantics/forms/place-calls.js +387 -0
  162. package/dist/semantics/forms/placements.js +296 -0
  163. package/dist/semantics/forms/results.js +307 -0
  164. package/dist/semantics/forms/union-find.js +157 -0
  165. package/dist/semantics/globals.js +46 -0
  166. package/dist/semantics/lang/arrays.js +238 -0
  167. package/dist/semantics/lang/fields.js +211 -0
  168. package/dist/semantics/lang/members.js +277 -0
  169. package/dist/semantics/lang/prototypes.js +180 -0
  170. package/dist/semantics/lang/this-args.js +189 -0
  171. package/dist/semantics/lang.js +232 -0
  172. package/dist/semantics/ledger.js +157 -0
  173. package/dist/semantics/limits.js +11 -0
  174. package/dist/semantics/losses.js +201 -0
  175. package/dist/semantics/lowering-methods.js +42 -0
  176. package/dist/semantics/marks.js +39 -0
  177. package/dist/semantics/nullish.js +918 -0
  178. package/dist/semantics/observers.js +1 -0
  179. package/dist/semantics/placement.js +698 -0
  180. package/dist/semantics/platform-globals.js +20 -0
  181. package/dist/semantics/read-sites.js +29 -0
  182. package/dist/semantics/refusals.js +206 -0
  183. package/dist/semantics/refuse-construction.js +64 -0
  184. package/dist/semantics/refuse-receivers.js +189 -0
  185. package/dist/semantics/refuse-scope.js +82 -0
  186. package/dist/semantics/regexp.js +219 -0
  187. package/dist/semantics/result-shapes.js +203 -0
  188. package/dist/semantics/runtime.js +482 -0
  189. package/dist/semantics/shape-defined-keys.js +146 -0
  190. package/dist/semantics/shape-instance-keys.js +230 -0
  191. package/dist/semantics/shape-map.js +72 -0
  192. package/dist/semantics/shapes.js +660 -0
  193. package/dist/semantics/sharing.js +406 -0
  194. package/dist/semantics/signals.js +166 -0
  195. package/dist/semantics/spelled.js +45 -0
  196. package/dist/semantics/states/by-name.js +46 -0
  197. package/dist/semantics/states/elements.js +310 -0
  198. package/dist/semantics/states/fields.js +308 -0
  199. package/dist/semantics/states/foreign.js +208 -0
  200. package/dist/semantics/states/lenient.js +246 -0
  201. package/dist/semantics/states/missing.js +289 -0
  202. package/dist/semantics/states/nil.js +223 -0
  203. package/dist/semantics/states/parameters.js +191 -0
  204. package/dist/semantics/states/predicates.js +232 -0
  205. package/dist/semantics/states/reads.js +247 -0
  206. package/dist/semantics/states/results.js +113 -0
  207. package/dist/semantics/states/untrusted.js +141 -0
  208. package/dist/semantics/states/untyped.js +194 -0
  209. package/dist/semantics/states/value-states.js +422 -0
  210. package/dist/semantics/tdz.js +106 -0
  211. package/dist/semantics/threading.js +77 -0
  212. package/dist/semantics/throws.js +878 -0
  213. package/dist/semantics/top-names.js +59 -0
  214. package/dist/semantics/translator-methods.js +597 -0
  215. package/dist/semantics/trust.js +321 -0
  216. package/dist/semantics/type-methods.js +168 -0
  217. package/dist/semantics/type-step.js +116 -0
  218. package/dist/semantics/types.js +456 -0
  219. package/dist/semantics/worker-state.js +198 -0
  220. package/dist/swift/access.js +749 -0
  221. package/dist/swift/app-modules.js +41 -0
  222. package/dist/swift/arguments.js +236 -0
  223. package/dist/swift/assignment.js +270 -0
  224. package/dist/swift/availability.js +146 -0
  225. package/dist/swift/builtins.js +822 -0
  226. package/dist/swift/calls.js +493 -0
  227. package/dist/swift/casts.js +218 -0
  228. package/dist/swift/checked.js +433 -0
  229. package/dist/swift/class-accessors.js +139 -0
  230. package/dist/swift/class-constructor.js +139 -0
  231. package/dist/swift/class-declaration.js +282 -0
  232. package/dist/swift/class-fields.js +360 -0
  233. package/dist/swift/class-methods.js +229 -0
  234. package/dist/swift/classes.js +522 -0
  235. package/dist/swift/components.js +386 -0
  236. package/dist/swift/construction.js +287 -0
  237. package/dist/swift/control-flow.js +210 -0
  238. package/dist/swift/conversion.js +425 -0
  239. package/dist/swift/core-api.js +1068 -0
  240. package/dist/swift/declarations.js +389 -0
  241. package/dist/swift/enums.js +58 -0
  242. package/dist/swift/expression-statements.js +312 -0
  243. package/dist/swift/expressions.js +568 -0
  244. package/dist/swift/from-any.js +316 -0
  245. package/dist/swift/functions.js +487 -0
  246. package/dist/swift/generics.js +124 -0
  247. package/dist/swift/global-calls.js +217 -0
  248. package/dist/swift/install.js +109 -0
  249. package/dist/swift/key-plans.js +136 -0
  250. package/dist/swift/kit-gen.js +605 -0
  251. package/dist/swift/lenient.js +468 -0
  252. package/dist/swift/library.js +109 -0
  253. package/dist/swift/literals.js +509 -0
  254. package/dist/swift/loops.js +244 -0
  255. package/dist/swift/marks.js +212 -0
  256. package/dist/swift/members.js +253 -0
  257. package/dist/swift/method-values.js +177 -0
  258. package/dist/swift/mixins.js +113 -0
  259. package/dist/swift/modules.js +969 -0
  260. package/dist/swift/names.js +371 -0
  261. package/dist/swift/narrowing.js +170 -0
  262. package/dist/swift/native/api.js +269 -0
  263. package/dist/swift/native/bridging.js +240 -0
  264. package/dist/swift/native/calls.js +586 -0
  265. package/dist/swift/native/conversions.js +532 -0
  266. package/dist/swift/native/dispatch.js +218 -0
  267. package/dist/swift/native/members.js +416 -0
  268. package/dist/swift/native/sdk-tables.js +772 -0
  269. package/dist/swift/native/sdk-types.js +1 -0
  270. package/dist/swift/native/sdk.js +409 -0
  271. package/dist/swift/native/subclasses.js +533 -0
  272. package/dist/swift/object-classes.js +396 -0
  273. package/dist/swift/operators.js +571 -0
  274. package/dist/swift/optional-chains.js +405 -0
  275. package/dist/swift/parameters.js +210 -0
  276. package/dist/swift/placement.js +896 -0
  277. package/dist/swift/protocols.js +164 -0
  278. package/dist/swift/prototype-calls.js +227 -0
  279. package/dist/swift/render.js +385 -0
  280. package/dist/swift/results.js +370 -0
  281. package/dist/swift/state-backend.js +243 -0
  282. package/dist/swift/statements.js +505 -0
  283. package/dist/swift/static-calls.js +320 -0
  284. package/dist/swift/syntax.js +916 -0
  285. package/dist/swift/translator-types.js +1 -0
  286. package/dist/swift/translator.js +886 -0
  287. package/dist/swift/type-facts.js +539 -0
  288. package/dist/swift/type-tests.js +211 -0
  289. package/dist/swift/types.js +659 -0
  290. package/dist/targets/android/build.js +598 -0
  291. package/dist/targets/android/compose-mapping.js +218 -0
  292. package/dist/targets/android/deprecations.js +81 -0
  293. package/dist/targets/android/resources.js +80 -0
  294. package/dist/targets/ios/build.js +583 -0
  295. package/dist/targets/ios/core-native.js +149 -0
  296. package/dist/targets/ios/dependencies.js +464 -0
  297. package/dist/targets/ios/plist.js +127 -0
  298. package/dist/targets/ios/resources.js +285 -0
  299. package/dist/targets/ios/retrace.js +196 -0
  300. package/dist/targets/ios/signing.js +84 -0
  301. package/dist/targets/ios/xcodegen.js +39 -0
  302. package/dist/targets/resources.js +180 -0
  303. package/dist/template/model.js +38 -0
  304. package/dist/template/plan.js +576 -0
  305. package/dist/tools/doctor.js +172 -0
  306. package/dist/tools/retrace.js +116 -0
  307. package/dist/tools/verify.js +330 -0
  308. package/dist/types/adapter-api.d.ts +683 -0
  309. package/dist/types/binding-api.d.ts +48 -0
  310. package/dist/types/elements.d.ts +10 -0
  311. package/dist/types/ir.d.ts +245 -0
  312. package/dist/types/listview.d.ts +15 -0
  313. package/dist/types/rewrite.d.ts +18 -0
  314. package/dist/types/typescript-internal.d.ts +35 -0
  315. package/dist/xml/app.js +65 -0
  316. package/dist/xml/bindings.js +308 -0
  317. package/dist/xml/contexts.js +296 -0
  318. package/dist/xml/fold.js +170 -0
  319. package/dist/xml/keys.js +146 -0
  320. package/dist/xml/pages.js +550 -0
  321. package/dist/xml/plan.js +650 -0
  322. package/docs/CLI.md +131 -0
  323. package/docs/cli/compile-android.md +30 -0
  324. package/docs/cli/compile-doctor.md +18 -0
  325. package/docs/cli/compile-ios.md +30 -0
  326. package/docs/cli/compile-retrace.md +18 -0
  327. package/docs/cli/compile-verify.md +18 -0
  328. package/docs/cli/compile.md +15 -0
  329. package/kit-android/build.gradle.kts +65 -0
  330. package/kit-android/consumer-rules.pro +7 -0
  331. package/kit-android/generated/kotlin/org/nativescript/kit/__Exports.kt +966 -0
  332. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +125 -0
  333. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +39497 -0
  334. package/kit-android/generated/kotlin/org/nativescript/kit/abortcontroller_abortsignal.kt +101 -0
  335. package/kit-android/generated/kotlin/org/nativescript/kit/abortcontroller_index.kt +109 -0
  336. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +547 -0
  337. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_properties.kt +263 -0
  338. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_index.kt +6 -0
  339. package/kit-android/generated/kotlin/org/nativescript/kit/application_application.kt +2656 -0
  340. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +1932 -0
  341. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_interfaces.kt +6 -0
  342. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_shims.kt +111 -0
  343. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers.kt +198 -0
  344. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +270 -0
  345. package/kit-android/generated/kotlin/org/nativescript/kit/application_index.kt +6 -0
  346. package/kit-android/generated/kotlin/org/nativescript/kit/application_scene_delegate_bridge.kt +233 -0
  347. package/kit-android/generated/kotlin/org/nativescript/kit/application_settings_application_settings_common.kt +28 -0
  348. package/kit-android/generated/kotlin/org/nativescript/kit/application_settings_index.kt +188 -0
  349. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_common.kt +707 -0
  350. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_types.kt +6 -0
  351. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +368 -0
  352. package/kit-android/generated/kotlin/org/nativescript/kit/color_index.kt +37 -0
  353. package/kit-android/generated/kotlin/org/nativescript/kit/color_known_colors.kt +418 -0
  354. package/kit-android/generated/kotlin/org/nativescript/kit/com.tns.FragmentClass.kt +287 -0
  355. package/kit-android/generated/kotlin/org/nativescript/kit/com.tns.NativeScriptActivity.kt +263 -0
  356. package/kit-android/generated/kotlin/org/nativescript/kit/com.tns.OnBackPressedCallback.kt +116 -0
  357. package/kit-android/generated/kotlin/org/nativescript/kit/connectivity_index.kt +289 -0
  358. package/kit-android/generated/kotlin/org/nativescript/kit/core_types_animation_types.kt +56 -0
  359. package/kit-android/generated/kotlin/org/nativescript/kit/core_types_index.kt +427 -0
  360. package/kit-android/generated/kotlin/org/nativescript/kit/core_types_validators.kt +34 -0
  361. package/kit-android/generated/kotlin/org/nativescript/kit/css_CSS3Parser.kt +954 -0
  362. package/kit-android/generated/kotlin/org/nativescript/kit/css_CSSNativeScript.kt +205 -0
  363. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +270 -0
  364. package/kit-android/generated/kotlin/org/nativescript/kit/css_parser.kt +885 -0
  365. package/kit-android/generated/kotlin/org/nativescript/kit/css_system_classes.kt +98 -0
  366. package/kit-android/generated/kotlin/org/nativescript/kit/css_value_reworkcss_value.kt +214 -0
  367. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +798 -0
  368. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +1175 -0
  369. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +271 -0
  370. package/kit-android/generated/kotlin/org/nativescript/kit/file_system_file_system_access.kt +3828 -0
  371. package/kit-android/generated/kotlin/org/nativescript/kit/file_system_index.kt +1669 -0
  372. package/kit-android/generated/kotlin/org/nativescript/kit/fps_meter_fps_native.kt +177 -0
  373. package/kit-android/generated/kotlin/org/nativescript/kit/fps_meter_index.kt +93 -0
  374. package/kit-android/generated/kotlin/org/nativescript/kit/globals_global_utils.kt +185 -0
  375. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_interfaces.kt +14 -0
  376. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_http_request_common.kt +41 -0
  377. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +119 -0
  378. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +61 -0
  379. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +237 -0
  380. package/kit-android/generated/kotlin/org/nativescript/kit/http_index.kt +155 -0
  381. package/kit-android/generated/kotlin/org/nativescript/kit/image_asset_image_asset_common.kt +201 -0
  382. package/kit-android/generated/kotlin/org/nativescript/kit/image_asset_index.kt +119 -0
  383. package/kit-android/generated/kotlin/org/nativescript/kit/image_source_image_source_common.kt +26 -0
  384. package/kit-android/generated/kotlin/org/nativescript/kit/image_source_index.kt +846 -0
  385. package/kit-android/generated/kotlin/org/nativescript/kit/js_libs_easysax_easysax.kt +1045 -0
  386. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +166 -0
  387. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +391 -0
  388. package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_helpers.kt +45 -0
  389. package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_index.kt +185 -0
  390. package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_non_bundle_workflow_compat.kt +262 -0
  391. package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_qualifier_matcher_index.kt +305 -0
  392. package/kit-android/generated/kotlin/org/nativescript/kit/native_window_index.kt +6 -0
  393. package/kit-android/generated/kotlin/org/nativescript/kit/native_window_native_window.kt +397 -0
  394. package/kit-android/generated/kotlin/org/nativescript/kit/native_window_native_window_common.kt +685 -0
  395. package/kit-android/generated/kotlin/org/nativescript/kit/native_window_native_window_interfaces.kt +51 -0
  396. package/kit-android/generated/kotlin/org/nativescript/kit/native_window_window_base.kt +223 -0
  397. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_index.kt +4 -0
  398. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +755 -0
  399. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_stringify.kt +212 -0
  400. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_types.kt +65 -0
  401. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptComponentCallbacks.kt +57 -0
  402. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +579 -0
  403. package/kit-android/generated/kotlin/org/nativescript/kit/platform_common.kt +20 -0
  404. package/kit-android/generated/kotlin/org/nativescript/kit/platform_device_index.kt +251 -0
  405. package/kit-android/generated/kotlin/org/nativescript/kit/platform_index.kt +6 -0
  406. package/kit-android/generated/kotlin/org/nativescript/kit/platform_screen_index.kt +183 -0
  407. package/kit-android/generated/kotlin/org/nativescript/kit/profiling_index.kt +485 -0
  408. package/kit-android/generated/kotlin/org/nativescript/kit/text_formatted_string.kt +6 -0
  409. package/kit-android/generated/kotlin/org/nativescript/kit/text_index.kt +15 -0
  410. package/kit-android/generated/kotlin/org/nativescript/kit/text_span.kt +6 -0
  411. package/kit-android/generated/kotlin/org/nativescript/kit/text_text_common.kt +277 -0
  412. package/kit-android/generated/kotlin/org/nativescript/kit/trace_index.kt +480 -0
  413. package/kit-android/generated/kotlin/org/nativescript/kit/ui_action_bar_action_bar_common.kt +1081 -0
  414. package/kit-android/generated/kotlin/org/nativescript/kit/ui_action_bar_index.kt +1207 -0
  415. package/kit-android/generated/kotlin/org/nativescript/kit/ui_activity_indicator_activity_indicator_common.kt +89 -0
  416. package/kit-android/generated/kotlin/org/nativescript/kit/ui_activity_indicator_index.kt +171 -0
  417. package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_common.kt +518 -0
  418. package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_shared.kt +6 -0
  419. package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_types.kt +6 -0
  420. package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_index.kt +1539 -0
  421. package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_keyframe_animation.kt +1081 -0
  422. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_binding_builder.kt +369 -0
  423. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_component_builder_index.kt +487 -0
  424. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +1938 -0
  425. package/kit-android/generated/kotlin/org/nativescript/kit/ui_button_button_common.kt +70 -0
  426. package/kit-android/generated/kotlin/org/nativescript/kit/ui_button_index.kt +367 -0
  427. package/kit-android/generated/kotlin/org/nativescript/kit/ui_content_view_index.kt +220 -0
  428. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_bindable_expressions.kt +735 -0
  429. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_bindable_resources.kt +17 -0
  430. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_bindable_types.kt +6 -0
  431. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +4970 -0
  432. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_index.kt +1342 -0
  433. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_control_state_change_index.kt +52 -0
  434. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +3578 -0
  435. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_property_shared.kt +44 -0
  436. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +3261 -0
  437. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_utils.kt +16 -0
  438. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_index.kt +4716 -0
  439. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_overflow_edges.kt +82 -0
  440. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_common.kt +3597 -0
  441. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_helper_index.kt +134 -0
  442. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_helper_view_helper_common.kt +360 -0
  443. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_helper_view_helper_shared.kt +6 -0
  444. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_interfaces.kt +349 -0
  445. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +266 -0
  446. package/kit-android/generated/kotlin/org/nativescript/kit/ui_date_picker_date_picker_common.kt +369 -0
  447. package/kit-android/generated/kotlin/org/nativescript/kit/ui_date_picker_index.kt +427 -0
  448. package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_dialogs_common.kt +428 -0
  449. package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_index.kt +689 -0
  450. package/kit-android/generated/kotlin/org/nativescript/kit/ui_editable_text_base_editable_text_base_common.kt +421 -0
  451. package/kit-android/generated/kotlin/org/nativescript/kit/ui_editable_text_base_index.kt +1140 -0
  452. package/kit-android/generated/kotlin/org/nativescript/kit/ui_embedding_index.kt +34 -0
  453. package/kit-android/generated/kotlin/org/nativescript/kit/ui_enums_enums.kt +6 -0
  454. package/kit-android/generated/kotlin/org/nativescript/kit/ui_enums_index.kt +6 -0
  455. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_activity.kt +210 -0
  456. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment.kt +88 -0
  457. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions.kt +1544 -0
  458. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions_types.kt +25 -0
  459. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_common.kt +1350 -0
  460. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_constants.kt +10 -0
  461. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helper_for_android.kt +615 -0
  462. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helpers.kt +42 -0
  463. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_interfaces.kt +22 -0
  464. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_stack.kt +112 -0
  465. package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_index.kt +1890 -0
  466. package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_gestures_common.kt +208 -0
  467. package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_gestures_types.kt +348 -0
  468. package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_index.kt +1785 -0
  469. package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_touch_manager.kt +288 -0
  470. package/kit-android/generated/kotlin/org/nativescript/kit/ui_html_view_html_view_common.kt +121 -0
  471. package/kit-android/generated/kotlin/org/nativescript/kit/ui_html_view_index.kt +283 -0
  472. package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_cache_image_cache_common.kt +450 -0
  473. package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_cache_index.kt +225 -0
  474. package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_image_common.kt +574 -0
  475. package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_index.kt +493 -0
  476. package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_symbol_effects.kt +31 -0
  477. package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_symbol_effects_common.kt +138 -0
  478. package/kit-android/generated/kotlin/org/nativescript/kit/ui_label_index.kt +108 -0
  479. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_absolute_layout_absolute_layout_common.kt +167 -0
  480. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_absolute_layout_index.kt +94 -0
  481. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_dock_layout_dock_layout_common.kt +157 -0
  482. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_dock_layout_index.kt +124 -0
  483. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_flexbox_layout_common.kt +1004 -0
  484. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt +675 -0
  485. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_grid_layout_grid_layout_common.kt +1011 -0
  486. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_grid_layout_index.kt +450 -0
  487. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_index.kt +6 -0
  488. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_layout_base.kt +123 -0
  489. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_layout_base_common.kt +442 -0
  490. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_container_index.kt +25 -0
  491. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_container_liquid_glass_container_common.kt +38 -0
  492. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_index.kt +30 -0
  493. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_liquid_glass_common.kt +25 -0
  494. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_root_layout_index.kt +556 -0
  495. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_root_layout_root_layout_common.kt +930 -0
  496. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_root_layout_root_layout_stack.kt +49 -0
  497. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_stack_layout_index.kt +63 -0
  498. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_stack_layout_stack_layout_common.kt +83 -0
  499. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_wrap_layout_index.kt +106 -0
  500. package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_wrap_layout_wrap_layout_common.kt +185 -0
  501. package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_picker_index.kt +400 -0
  502. package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_picker_list_picker_common.kt +260 -0
  503. package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_view_index.kt +2406 -0
  504. package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_view_list_view_common.kt +912 -0
  505. package/kit-android/generated/kotlin/org/nativescript/kit/ui_page_events.kt +17 -0
  506. package/kit-android/generated/kotlin/org/nativescript/kit/ui_page_index.kt +241 -0
  507. package/kit-android/generated/kotlin/org/nativescript/kit/ui_page_page_common.kt +449 -0
  508. package/kit-android/generated/kotlin/org/nativescript/kit/ui_placeholder_index.kt +61 -0
  509. package/kit-android/generated/kotlin/org/nativescript/kit/ui_placeholder_placeholder_common.kt +6 -0
  510. package/kit-android/generated/kotlin/org/nativescript/kit/ui_progress_index.kt +204 -0
  511. package/kit-android/generated/kotlin/org/nativescript/kit/ui_progress_progress_common.kt +129 -0
  512. package/kit-android/generated/kotlin/org/nativescript/kit/ui_proxy_view_container_index.kt +457 -0
  513. package/kit-android/generated/kotlin/org/nativescript/kit/ui_repeater_index.kt +523 -0
  514. package/kit-android/generated/kotlin/org/nativescript/kit/ui_scroll_view_index.kt +400 -0
  515. package/kit-android/generated/kotlin/org/nativescript/kit/ui_scroll_view_scroll_view_common.kt +402 -0
  516. package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_index.kt +711 -0
  517. package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_search_bar_common.kt +186 -0
  518. package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_index.kt +774 -0
  519. package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_segmented_bar_common.kt +409 -0
  520. package/kit-android/generated/kotlin/org/nativescript/kit/ui_slider_index.kt +477 -0
  521. package/kit-android/generated/kotlin/org/nativescript/kit/ui_slider_slider_common.kt +234 -0
  522. package/kit-android/generated/kotlin/org/nativescript/kit/ui_split_view_index.kt +25 -0
  523. package/kit-android/generated/kotlin/org/nativescript/kit/ui_split_view_split_view_common.kt +446 -0
  524. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_background.kt +268 -0
  525. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_background_common.kt +771 -0
  526. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_box_shadow.kt +108 -0
  527. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_clip_path_function.kt +129 -0
  528. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_converters.kt +92 -0
  529. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_animation_parser.kt +416 -0
  530. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_selector.kt +3532 -0
  531. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_shadow.kt +38 -0
  532. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_stroke.kt +30 -0
  533. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_transform.kt +366 -0
  534. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_utils.kt +249 -0
  535. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_font.kt +488 -0
  536. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_font_common.kt +446 -0
  537. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_font_interfaces.kt +6 -0
  538. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_length_shared.kt +264 -0
  539. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_linear_gradient.kt +136 -0
  540. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +1345 -0
  541. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +2907 -0
  542. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +3031 -0
  543. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_styling_profile.kt +6 -0
  544. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_styling_shared.kt +6 -0
  545. package/kit-android/generated/kotlin/org/nativescript/kit/ui_switch_index.kt +295 -0
  546. package/kit-android/generated/kotlin/org/nativescript/kit/ui_switch_switch_common.kt +139 -0
  547. package/kit-android/generated/kotlin/org/nativescript/kit/ui_tab_view_index.kt +1977 -0
  548. package/kit-android/generated/kotlin/org/nativescript/kit/ui_tab_view_tab_view_common.kt +902 -0
  549. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_formatted_string.kt +471 -0
  550. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_index.kt +1662 -0
  551. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_span.kt +284 -0
  552. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_text_base_common.kt +792 -0
  553. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_field_index.kt +211 -0
  554. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_field_text_field_common.kt +115 -0
  555. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_index.kt +94 -0
  556. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +140 -0
  557. package/kit-android/generated/kotlin/org/nativescript/kit/ui_time_picker_index.kt +225 -0
  558. package/kit-android/generated/kotlin/org/nativescript/kit/ui_time_picker_time_picker_common.kt +699 -0
  559. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_fade_transition.kt +68 -0
  560. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_flip_transition.kt +209 -0
  561. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_index.kt +160 -0
  562. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_modal_transition.kt +49 -0
  563. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_page_transition.kt +416 -0
  564. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_shared_transition.kt +457 -0
  565. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_shared_transition_helper.kt +46 -0
  566. package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_slide_transition.kt +294 -0
  567. package/kit-android/generated/kotlin/org/nativescript/kit/ui_utils.kt +20 -0
  568. package/kit-android/generated/kotlin/org/nativescript/kit/ui_web_view_index.kt +595 -0
  569. package/kit-android/generated/kotlin/org/nativescript/kit/ui_web_view_web_view_common.kt +209 -0
  570. package/kit-android/generated/kotlin/org/nativescript/kit/ui_web_view_web_view_interfaces.kt +6 -0
  571. package/kit-android/generated/kotlin/org/nativescript/kit/utils_animation_helpers.kt +76 -0
  572. package/kit-android/generated/kotlin/org/nativescript/kit/utils_common.kt +224 -0
  573. package/kit-android/generated/kotlin/org/nativescript/kit/utils_constants.kt +22 -0
  574. package/kit-android/generated/kotlin/org/nativescript/kit/utils_debug.kt +9 -0
  575. package/kit-android/generated/kotlin/org/nativescript/kit/utils_debug_source.kt +246 -0
  576. package/kit-android/generated/kotlin/org/nativescript/kit/utils_index.kt +296 -0
  577. package/kit-android/generated/kotlin/org/nativescript/kit/utils_layout_helper_index.kt +139 -0
  578. package/kit-android/generated/kotlin/org/nativescript/kit/utils_layout_helper_layout_helper_common.kt +61 -0
  579. package/kit-android/generated/kotlin/org/nativescript/kit/utils_layout_helper_layout_helper_shared.kt +23 -0
  580. package/kit-android/generated/kotlin/org/nativescript/kit/utils_lazy.kt +20 -0
  581. package/kit-android/generated/kotlin/org/nativescript/kit/utils_macrotask_scheduler.kt +45 -0
  582. package/kit-android/generated/kotlin/org/nativescript/kit/utils_mainthread_helper.kt +64 -0
  583. package/kit-android/generated/kotlin/org/nativescript/kit/utils_module_merge.kt +13 -0
  584. package/kit-android/generated/kotlin/org/nativescript/kit/utils_native_helper.kt +79 -0
  585. package/kit-android/generated/kotlin/org/nativescript/kit/utils_native_helper_for_android.kt +805 -0
  586. package/kit-android/generated/kotlin/org/nativescript/kit/utils_number_utils.kt +66 -0
  587. package/kit-android/generated/kotlin/org/nativescript/kit/utils_platform_check.kt +15 -0
  588. package/kit-android/generated/kotlin/org/nativescript/kit/utils_shared.kt +65 -0
  589. package/kit-android/generated/kotlin/org/nativescript/kit/utils_types.kt +229 -0
  590. package/kit-android/generated/kotlin/org/nativescript/kit/utils_utils_shared.kt +16 -0
  591. package/kit-android/generated/kotlin/org/nativescript/kit/xml_index.kt +869 -0
  592. package/kit-android/generated/manifest.json +860 -0
  593. package/kit-android/generated/source-lines.json +1 -0
  594. package/kit-android/gradle/wrapper/gradle-wrapper.jar +0 -0
  595. package/kit-android/gradle/wrapper/gradle-wrapper.properties +6 -0
  596. package/kit-android/gradlew +240 -0
  597. package/kit-android/overlays/xml-free/kotlin/org/nativescript/kit/ui_builder_index.kt +524 -0
  598. package/kit-android/overlays/xml-free/kotlin/org/nativescript/kit/ui_core_bindable_index.kt +1335 -0
  599. package/kit-android/overlays/xml-free/overlay.json +20 -0
  600. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/AnimationFrame.kt +68 -0
  601. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/CoreBridge.kt +302 -0
  602. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/Modal.kt +61 -0
  603. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/NativeScriptApplication.kt +230 -0
  604. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/Regions.kt +289 -0
  605. package/kit-android/src/main/kotlin/org/nativescript/kit/ChangeDetection.kt +28 -0
  606. package/kit-android/src/main/kotlin/org/nativescript/kit/ColorMix.kt +643 -0
  607. package/kit-android/src/main/kotlin/org/nativescript/kit/JS.kt +10 -0
  608. package/kit-android/src/main/kotlin/org/nativescript/kit/MainThread.kt +10 -0
  609. package/kit-android/src/main/kotlin/org/nativescript/kit/Signals.kt +866 -0
  610. package/kit-android/src/main/kotlin/org/nativescript/kit/UncaughtErrors.kt +51 -0
  611. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +731 -0
  612. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ArrayLike.kt +781 -0
  613. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/BigInt.kt +136 -0
  614. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/CSSCalc.kt +109 -0
  615. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Collections.kt +426 -0
  616. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/CorePackages.kt +13 -0
  617. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Date.kt +573 -0
  618. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Dynamic.kt +668 -0
  619. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ES2023.kt +93 -0
  620. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ErrorOrigin.kt +17 -0
  621. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Errors.kt +270 -0
  622. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/HostObjects.kt +72 -0
  623. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Inspect.kt +814 -0
  624. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +651 -0
  625. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Iterators.kt +746 -0
  626. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +587 -0
  627. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Language.kt +518 -0
  628. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Lowering.kt +70 -0
  629. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Number.kt +367 -0
  630. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Promise.kt +680 -0
  631. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Prototypes.kt +292 -0
  632. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Reactive.kt +36 -0
  633. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Realm.kt +85 -0
  634. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/RegExp.kt +2245 -0
  635. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ShortestDouble.kt +157 -0
  636. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +398 -0
  637. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ThrownValue.kt +34 -0
  638. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Timers.kt +182 -0
  639. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/TypedArrays.kt +993 -0
  640. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/URI.kt +74 -0
  641. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Values.kt +1237 -0
  642. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Views.kt +52 -0
  643. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Weak.kt +110 -0
  644. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/WinterTC.kt +356 -0
  645. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Workers.kt +312 -0
  646. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +536 -0
  647. package/kit-apple/Overlays/xml-free/Core/ui.core.bindable.index.swift +1375 -0
  648. package/kit-apple/Overlays/xml-free/overlay.json +34 -0
  649. package/kit-apple/Package.swift +17 -0
  650. package/kit-apple/Sources/NativeScriptKit/AnimationFrame.swift +41 -0
  651. package/kit-apple/Sources/NativeScriptKit/AppModules.swift +88 -0
  652. package/kit-apple/Sources/NativeScriptKit/ApplicationDelegateClass.swift +273 -0
  653. package/kit-apple/Sources/NativeScriptKit/CSSCalc.swift +111 -0
  654. package/kit-apple/Sources/NativeScriptKit/ChangeDetection.swift +31 -0
  655. package/kit-apple/Sources/NativeScriptKit/ColorMix.swift +577 -0
  656. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity0.swift +1413 -0
  657. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +6525 -0
  658. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +4713 -0
  659. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +5428 -0
  660. package/kit-apple/Sources/NativeScriptKit/Core/Object_Accuracy_AndroidActionBarIconVisibility_AndroidActionItemPosition_AnimationCurve_AutocapitalizationType_BackgroundRepeat_and_26_more_630c32.swift +472 -0
  661. package/kit-apple/Sources/NativeScriptKit/Core/Object_ArrayExpression_BinaryExpression_CallExpression_ChainExpression_ConditionalExpression_Identifier_and_10_more_f883bf.swift +359 -0
  662. package/kit-apple/Sources/NativeScriptKit/Core/Object_Tab_NewLine_excl_quot_QUOT_num_and_287_more_88aef2.swift +2190 -0
  663. package/kit-apple/Sources/NativeScriptKit/Core/Object_Unknown_QuirksMode_IgnoreCase_CaseSensitive.swift +122 -0
  664. package/kit-apple/Sources/NativeScriptKit/Core/Object_a_b_c_d_tx_ty.swift +123 -0
  665. package/kit-apple/Sources/NativeScriptKit/Core/Object_a_h_s_l.swift +85 -0
  666. package/kit-apple/Sources/NativeScriptKit/Core/Object_a_h_s_v.swift +85 -0
  667. package/kit-apple/Sources/NativeScriptKit/Core/Object_a_r_g_b.swift +85 -0
  668. package/kit-apple/Sources/NativeScriptKit/Core/Object_activate_deactivate_background_foreground_close_attached_and_26_more_127a37.swift +448 -0
  669. package/kit-apple/Sources/NativeScriptKit/Core/Object_activeType.swift +65 -0
  670. package/kit-apple/Sources/NativeScriptKit/Core/Object_alert_confirm_prompt_login_action.swift +118 -0
  671. package/kit-apple/Sources/NativeScriptKit/Core/Object_align_offset.swift +94 -0
  672. package/kit-apple/Sources/NativeScriptKit/Core/Object_android_ios_visionos_apple.swift +109 -0
  673. package/kit-apple/Sources/NativeScriptKit/Core/Object_angle_colors.swift +81 -0
  674. package/kit-apple/Sources/NativeScriptKit/Core/Object_animations.swift +66 -0
  675. package/kit-apple/Sources/NativeScriptKit/Core/Object_animations_completion.swift +73 -0
  676. package/kit-apple/Sources/NativeScriptKit/Core/Object_axis_value.swift +80 -0
  677. package/kit-apple/Sources/NativeScriptKit/Core/Object_backgroundColor_scale_translate_rotate_opacity_width_height_valueSource_duration_curve_forceLayer.swift +257 -0
  678. package/kit-apple/Sources/NativeScriptKit/Core/Object_body.swift +78 -0
  679. package/kit-apple/Sources/NativeScriptKit/Core/Object_boundsChanged_sizeChanged.swift +80 -0
  680. package/kit-apple/Sources/NativeScriptKit/Core/Object_callback_thisArg_once.swift +112 -0
  681. package/kit-apple/Sources/NativeScriptKit/Core/Object_collections_createUIDocumentInteractionControllerDelegate_getCurrentAppPath_getRootViewController_getVisibleViewController_getWindow_and_10_more_6713a9.swift +281 -0
  682. package/kit-apple/Sources/NativeScriptKit/Core/Object_color.swift +64 -0
  683. package/kit-apple/Sources/NativeScriptKit/Core/Object_color_backgroundColor.swift +81 -0
  684. package/kit-apple/Sources/NativeScriptKit/Core/Object_color_offset.swift +94 -0
  685. package/kit-apple/Sources/NativeScriptKit/Core/Object_component_exports.swift +95 -0
  686. package/kit-apple/Sources/NativeScriptKit/Core/Object_component_exports_.swift +94 -0
  687. package/kit-apple/Sources/NativeScriptKit/Core/Object_connectionOptions.swift +66 -0
  688. package/kit-apple/Sources/NativeScriptKit/Core/Object_constructor_hasOwnProperty_isPrototypeOf_propertyIsEnumerable_toLocaleString_toString_and_21_more_e9ed9b.swift +331 -0
  689. package/kit-apple/Sources/NativeScriptKit/Core/Object_content_statusCode_headers.swift +106 -0
  690. package/kit-apple/Sources/NativeScriptKit/Core/Object_context_closeCallback_fullscreen_animated_stretched.swift +149 -0
  691. package/kit-apple/Sources/NativeScriptKit/Core/Object_context_parent_name_elementName_templateItems_errorFormat_sourceTracker_xmlModule.swift +185 -0
  692. package/kit-apple/Sources/NativeScriptKit/Core/Object_counters_timeline.swift +95 -0
  693. package/kit-apple/Sources/NativeScriptKit/Core/Object_create.swift +78 -0
  694. package/kit-apple/Sources/NativeScriptKit/Core/Object_createSelector_SelectorCore_SimpleSelector_InvalidSelector_UniversalSelector_TypeSelector_and_12_more_71e044.swift +315 -0
  695. package/kit-apple/Sources/NativeScriptKit/Core/Object_curve.swift +78 -0
  696. package/kit-apple/Sources/NativeScriptKit/Core/Object_defaultValue_name_cssName_affectsLayout.swift +131 -0
  697. package/kit-apple/Sources/NativeScriptKit/Core/Object_defaultValue_name_cssName_valueConverter.swift +113 -0
  698. package/kit-apple/Sources/NativeScriptKit/Core/Object_defaultValue_name_cssName_valueConverter_.swift +113 -0
  699. package/kit-apple/Sources/NativeScriptKit/Core/Object_deg_rad_grad_turn.swift +105 -0
  700. package/kit-apple/Sources/NativeScriptKit/Core/Object_duration_damping.swift +80 -0
  701. package/kit-apple/Sources/NativeScriptKit/Core/Object_duration_repeatCount_delay_curve_propertyNameToAnimate_subPropertiesToAnimate_fromValue_toValue.swift +211 -0
  702. package/kit-apple/Sources/NativeScriptKit/Core/Object_duration_spring.swift +90 -0
  703. package/kit-apple/Sources/NativeScriptKit/Core/Object_edge_interaction.swift +94 -0
  704. package/kit-apple/Sources/NativeScriptKit/Core/Object_effectType_onCreate.swift +86 -0
  705. package/kit-apple/Sources/NativeScriptKit/Core/Object_effectType_targetView.swift +73 -0
  706. package/kit-apple/Sources/NativeScriptKit/Core/Object_effectType_targetView_toGlassStyleFn.swift +110 -0
  707. package/kit-apple/Sources/NativeScriptKit/Core/Object_empty_text_json_blob_arraybuffer.swift +108 -0
  708. package/kit-apple/Sources/NativeScriptKit/Core/Object_enterFrom_exitTo.swift +95 -0
  709. package/kit-apple/Sources/NativeScriptKit/Core/Object_entry_isBackNavigation_navigationType.swift +115 -0
  710. package/kit-apple/Sources/NativeScriptKit/Core/Object_entry_resolvedPage_navDepth_fragmentTag.swift +133 -0
  711. package/kit-apple/Sources/NativeScriptKit/Core/Object_entry_resolvedPage_navDepth_fragmentTag_frameId.swift +162 -0
  712. package/kit-apple/Sources/NativeScriptKit/Core/Object_enumerable_configurable_get_set.swift +123 -0
  713. package/kit-apple/Sources/NativeScriptKit/Core/Object_enumerable_configurable_get_set_.swift +122 -0
  714. package/kit-apple/Sources/NativeScriptKit/Core/Object_enumerable_configurable_get_set__.swift +122 -0
  715. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_android_ios_newValue_object.swift +147 -0
  716. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_data.swift +94 -0
  717. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_action_index_removed_addedCount.swift +153 -0
  718. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_action_index_removed_addedCount_.swift +154 -0
  719. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_action_index_removed_addedCount__.swift +152 -0
  720. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_android_ios_error.swift +148 -0
  721. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_context_closeCallback.swift +133 -0
  722. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_context_isBackNavigation.swift +132 -0
  723. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_cssFile.swift +110 -0
  724. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_cssFile_.swift +95 -0
  725. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_cssText.swift +110 -0
  726. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_data.swift +112 -0
  727. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_data_.swift +114 -0
  728. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_error.swift +111 -0
  729. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_count.swift +120 -0
  730. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +168 -0
  731. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios.swift +97 -0
  732. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_.swift +111 -0
  733. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android.swift +129 -0
  734. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_cssFile.swift +138 -0
  735. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_isBack_entry_fromEntry.swift +130 -0
  736. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_key_error.swift +128 -0
  737. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_key_image.swift +129 -0
  738. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_matches_media.swift +111 -0
  739. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_newValue.swift +95 -0
  740. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +104 -0
  741. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex_.swift +121 -0
  742. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_propertyName_value_oldValue.swift +147 -0
  743. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_text_ios.swift +113 -0
  744. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_type_view_ios.swift +117 -0
  745. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_url_navigationType_error.swift +158 -0
  746. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_url_navigationType_error_.swift +160 -0
  747. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_viewController.swift +114 -0
  748. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_view_context.swift +130 -0
  749. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window.swift +103 -0
  750. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_newValue.swift +123 -0
  751. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene.swift +105 -0
  752. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_.swift +105 -0
  753. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_shortcutItem_completionHandler.swift +157 -0
  754. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_shortcutItem_completionHandler_.swift +158 -0
  755. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_uiWindow_connectionOptions.swift +137 -0
  756. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_uiWindow_connectionOptions_.swift +137 -0
  757. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_urlContexts.swift +120 -0
  758. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_urlContexts_.swift +120 -0
  759. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_userActivity.swift +121 -0
  760. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_userActivity_.swift +121 -0
  761. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_rootView.swift +80 -0
  762. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_type.swift +80 -0
  763. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_type_object.swift +111 -0
  764. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_window_object.swift +103 -0
  765. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventType_position_prefix_namespace_elementName_attributes_data.swift +169 -0
  766. package/kit-apple/Sources/NativeScriptKit/Core/Object_exists_isDirectory.swift +80 -0
  767. package/kit-apple/Sources/NativeScriptKit/Core/Object_f_s_t_a.swift +85 -0
  768. package/kit-apple/Sources/NativeScriptKit/Core/Object_folder_path.swift +94 -0
  769. package/kit-apple/Sources/NativeScriptKit/Core/Object_fontFamily_fontSize_fontWeight_fontVariationSettings_isBold_isItalic.swift +130 -0
  770. package/kit-apple/Sources/NativeScriptKit/Core/Object_fontStyle_fontVariant_fontWeight.swift +95 -0
  771. package/kit-apple/Sources/NativeScriptKit/Core/Object_h_s_l.swift +78 -0
  772. package/kit-apple/Sources/NativeScriptKit/Core/Object_h_s_v.swift +78 -0
  773. package/kit-apple/Sources/NativeScriptKit/Core/Object_headers_timestamp_headersSize_method_postData_url.swift +173 -0
  774. package/kit-apple/Sources/NativeScriptKit/Core/Object_highlighted.swift +66 -0
  775. package/kit-apple/Sources/NativeScriptKit/Core/Object_horizontal_vertical.swift +80 -0
  776. package/kit-apple/Sources/NativeScriptKit/Core/Object_hour_minute.swift +80 -0
  777. package/kit-apple/Sources/NativeScriptKit/Core/Object_id_type.swift +94 -0
  778. package/kit-apple/Sources/NativeScriptKit/Core/Object_id_type_action.swift +108 -0
  779. package/kit-apple/Sources/NativeScriptKit/Core/Object_id_type_percent.swift +108 -0
  780. package/kit-apple/Sources/NativeScriptKit/Core/Object_import_type.swift +80 -0
  781. package/kit-apple/Sources/NativeScriptKit/Core/Object_inset_color_values.swift +87 -0
  782. package/kit-apple/Sources/NativeScriptKit/Core/Object_inset_offsetX_offsetY_blurRadius_spreadRadius_color.swift +147 -0
  783. package/kit-apple/Sources/NativeScriptKit/Core/Object_inset_offsetX_offsetY_blurRadius_spreadRadius_color_.swift +126 -0
  784. package/kit-apple/Sources/NativeScriptKit/Core/Object_instance.swift +64 -0
  785. package/kit-apple/Sources/NativeScriptKit/Core/Object_instance_instanceModule.swift +97 -0
  786. package/kit-apple/Sources/NativeScriptKit/Core/Object_instance_property.swift +86 -0
  787. package/kit-apple/Sources/NativeScriptKit/Core/Object_instance_property_.swift +72 -0
  788. package/kit-apple/Sources/NativeScriptKit/Core/Object_interactiveBegan.swift +66 -0
  789. package/kit-apple/Sources/NativeScriptKit/Core/Object_interactiveBegan_interactiveCancelled.swift +81 -0
  790. package/kit-apple/Sources/NativeScriptKit/Core/Object_interactiveCancelled.swift +66 -0
  791. package/kit-apple/Sources/NativeScriptKit/Core/Object_interactive_pageStart_pageEnd_pageOut_pageReturn_instance_activeType.swift +165 -0
  792. package/kit-apple/Sources/NativeScriptKit/Core/Object_inverse_type_features.swift +95 -0
  793. package/kit-apple/Sources/NativeScriptKit/Core/Object_ios.swift +78 -0
  794. package/kit-apple/Sources/NativeScriptKit/Core/Object_iosNotificationType.swift +66 -0
  795. package/kit-apple/Sources/NativeScriptKit/Core/Object_iosNotificationType_message.swift +80 -0
  796. package/kit-apple/Sources/NativeScriptKit/Core/Object_ios_.swift +64 -0
  797. package/kit-apple/Sources/NativeScriptKit/Core/Object_ios_scene.swift +80 -0
  798. package/kit-apple/Sources/NativeScriptKit/Core/Object_isMatch_getMatchOccurences_getMatchValue.swift +101 -0
  799. package/kit-apple/Sources/NativeScriptKit/Core/Object_iterator_prototype_for_keyFor_hasInstance_isConcatSpreadable_and_19_more_91b5f3.swift +413 -0
  800. package/kit-apple/Sources/NativeScriptKit/Core/Object_keepAspectRatio_autoScaleFactor.swift +73 -0
  801. package/kit-apple/Sources/NativeScriptKit/Core/Object_key_createView.swift +95 -0
  802. package/kit-apple/Sources/NativeScriptKit/Core/Object_key_createView_.swift +97 -0
  803. package/kit-apple/Sources/NativeScriptKit/Core/Object_launchData.swift +68 -0
  804. package/kit-apple/Sources/NativeScriptKit/Core/Object_left_right.swift +95 -0
  805. package/kit-apple/Sources/NativeScriptKit/Core/Object_left_right_center_top_bottom.swift +115 -0
  806. package/kit-apple/Sources/NativeScriptKit/Core/Object_lifecycle_timeline.swift +80 -0
  807. package/kit-apple/Sources/NativeScriptKit/Core/Object_line_column.swift +80 -0
  808. package/kit-apple/Sources/NativeScriptKit/Core/Object_location.swift +64 -0
  809. package/kit-apple/Sources/NativeScriptKit/Core/Object_location_length.swift +80 -0
  810. package/kit-apple/Sources/NativeScriptKit/Core/Object_m.swift +64 -0
  811. package/kit-apple/Sources/NativeScriptKit/Core/Object_maskPath_shadowPath.swift +95 -0
  812. package/kit-apple/Sources/NativeScriptKit/Core/Object_matches_media.swift +80 -0
  813. package/kit-apple/Sources/NativeScriptKit/Core/Object_measuredWidth_measuredHeight.swift +81 -0
  814. package/kit-apple/Sources/NativeScriptKit/Core/Object_message.swift +64 -0
  815. package/kit-apple/Sources/NativeScriptKit/Core/Object_method.swift +64 -0
  816. package/kit-apple/Sources/NativeScriptKit/Core/Object_method_postData.swift +80 -0
  817. package/kit-apple/Sources/NativeScriptKit/Core/Object_modifier_property_value.swift +87 -0
  818. package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName.swift +65 -0
  819. package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName_.swift +78 -0
  820. package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName_create_transition.swift +93 -0
  821. package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName_transition.swift +76 -0
  822. package/kit-apple/Sources/NativeScriptKit/Core/Object_name.swift +64 -0
  823. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged.swift +103 -0
  824. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged_.swift +98 -0
  825. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged__.swift +100 -0
  826. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged___.swift +102 -0
  827. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueConverter.swift +96 -0
  828. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueConverter_valueChanged.swift +115 -0
  829. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName.swift +80 -0
  830. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_defaultValue_valueConverter_valueChanged.swift +139 -0
  831. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_defaultValue_valueConverter_valueChanged_.swift +159 -0
  832. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueChanged.swift +114 -0
  833. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueChanged_valueConverter.swift +130 -0
  834. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueChanged_valueConverter_.swift +134 -0
  835. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueConverter.swift +133 -0
  836. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueConverter_.swift +113 -0
  837. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue.swift +94 -0
  838. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueChanged_valueConverter.swift +183 -0
  839. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueConverter.swift +168 -0
  840. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueConverter_.swift +169 -0
  841. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueConverter_valueChanged.swift +181 -0
  842. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter.swift +128 -0
  843. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter_.swift +128 -0
  844. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter__.swift +128 -0
  845. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter_valueChanged.swift +139 -0
  846. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_equalityComparer_valueChanged_valueConverter.swift +162 -0
  847. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_equalityComparer_valueConverter.swift +150 -0
  848. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter.swift +113 -0
  849. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter_.swift +113 -0
  850. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter__.swift +114 -0
  851. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter___.swift +113 -0
  852. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter_valueChanged.swift +121 -0
  853. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_equalityComparer_defaultValue_valueConverter.swift +129 -0
  854. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_equalityComparer_valueConverter.swift +114 -0
  855. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter.swift +130 -0
  856. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter_.swift +133 -0
  857. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter__.swift +130 -0
  858. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter___.swift +131 -0
  859. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter____.swift +133 -0
  860. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter_____.swift +131 -0
  861. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged.swift +99 -0
  862. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged_equalityComparer_valueConverter.swift +153 -0
  863. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged_equalityComparer_valueConverter_.swift +132 -0
  864. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged_valueConverter.swift +118 -0
  865. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter.swift +95 -0
  866. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter_.swift +95 -0
  867. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter__.swift +95 -0
  868. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter_valueChanged.swift +114 -0
  869. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue.swift +80 -0
  870. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_.swift +94 -0
  871. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue__.swift +80 -0
  872. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue___.swift +81 -0
  873. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout.swift +95 -0
  874. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_equalityComparer_valueConverter_valueChanged.swift +163 -0
  875. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueChanged_coerceValue_valueConverter.swift +144 -0
  876. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueChanged_valueConverter.swift +124 -0
  877. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter.swift +135 -0
  878. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter_.swift +114 -0
  879. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter__.swift +114 -0
  880. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter___.swift +135 -0
  881. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter____.swift +114 -0
  882. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter_valueChanged.swift +122 -0
  883. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_coerceValue_valueChanged_valueConverter.swift +125 -0
  884. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_coerceValue_valueConverter.swift +116 -0
  885. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_coerceValue_valueConverter_.swift +115 -0
  886. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_coerceValue_valueChanged_valueConverter.swift +170 -0
  887. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueChanged.swift +111 -0
  888. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueConverter.swift +116 -0
  889. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueConverter_.swift +139 -0
  890. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueConverter__.swift +136 -0
  891. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged.swift +92 -0
  892. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_.swift +92 -0
  893. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_coerceValue_valueConverter.swift +126 -0
  894. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_equalityComparer_valueConverter.swift +146 -0
  895. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter.swift +107 -0
  896. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter_.swift +107 -0
  897. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter__.swift +108 -0
  898. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter___.swift +108 -0
  899. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter____.swift +128 -0
  900. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter_____.swift +108 -0
  901. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter______.swift +126 -0
  902. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter.swift +98 -0
  903. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_.swift +96 -0
  904. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter__.swift +97 -0
  905. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter___.swift +98 -0
  906. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter____.swift +100 -0
  907. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_coerceValue.swift +115 -0
  908. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_valueChanged.swift +107 -0
  909. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_valueChanged_.swift +107 -0
  910. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_duration.swift +80 -0
  911. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_equalityComparer_valueConverter.swift +101 -0
  912. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_equalityComparer_valueConverter_.swift +100 -0
  913. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_equalityComparer_valueConverter__.swift +119 -0
  914. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_keyframes_mediaQueryString.swift +117 -0
  915. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged.swift +82 -0
  916. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_.swift +82 -0
  917. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged__.swift +84 -0
  918. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged___.swift +84 -0
  919. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged____.swift +82 -0
  920. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_____.swift +82 -0
  921. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged______.swift +82 -0
  922. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_______.swift +81 -0
  923. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged________.swift +86 -0
  924. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_________.swift +92 -0
  925. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged__________.swift +90 -0
  926. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_valueConverter.swift +101 -0
  927. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_valueConverter_.swift +119 -0
  928. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_valueConverter__.swift +101 -0
  929. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueConverter.swift +81 -0
  930. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueConverter_.swift +81 -0
  931. package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueConverter__.swift +82 -0
  932. package/kit-apple/Sources/NativeScriptKit/Core/Object_navigatingToEvent_navigatedToEvent_navigatingFromEvent_navigatedFromEvent.swift +116 -0
  933. package/kit-apple/Sources/NativeScriptKit/Core/Object_normalState_selectedState.swift +81 -0
  934. package/kit-apple/Sources/NativeScriptKit/Core/Object_num_regexp_string_name_privateId_eof_and_71_more_93cbae.swift +688 -0
  935. package/kit-apple/Sources/NativeScriptKit/Core/Object_object_eventName_propertyName_value_oldValue_origin.swift +154 -0
  936. package/kit-apple/Sources/NativeScriptKit/Core/Object_object_eventName_scrollX_scrollY.swift +105 -0
  937. package/kit-apple/Sources/NativeScriptKit/Core/Object_object_eventName_scrollX_scrollY_.swift +121 -0
  938. package/kit-apple/Sources/NativeScriptKit/Core/Object_opacity_color_tapToClose_animation_ignoreShadeRestore.swift +131 -0
  939. package/kit-apple/Sources/NativeScriptKit/Core/Object_orientation_systemAppearance.swift +100 -0
  940. package/kit-apple/Sources/NativeScriptKit/Core/Object_orientation_systemAppearance_.swift +81 -0
  941. package/kit-apple/Sources/NativeScriptKit/Core/Object_page_toPage.swift +94 -0
  942. package/kit-apple/Sources/NativeScriptKit/Core/Object_page_toPage_.swift +95 -0
  943. package/kit-apple/Sources/NativeScriptKit/Core/Object_parent_name_items.swift +111 -0
  944. package/kit-apple/Sources/NativeScriptKit/Core/Object_path_name.swift +72 -0
  945. package/kit-apple/Sources/NativeScriptKit/Core/Object_path_name_extension.swift +86 -0
  946. package/kit-apple/Sources/NativeScriptKit/Core/Object_pattern_flags.swift +80 -0
  947. package/kit-apple/Sources/NativeScriptKit/Core/Object_position_systemIcon.swift +94 -0
  948. package/kit-apple/Sources/NativeScriptKit/Core/Object_prefix_namespace_name.swift +113 -0
  949. package/kit-apple/Sources/NativeScriptKit/Core/Object_presented_presenting_independent.swift +98 -0
  950. package/kit-apple/Sources/NativeScriptKit/Core/Object_propName_propValue.swift +80 -0
  951. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value.swift +95 -0
  952. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value_.swift +95 -0
  953. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value__.swift +96 -0
  954. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value___.swift +94 -0
  955. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value____.swift +80 -0
  956. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value_____.swift +80 -0
  957. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value______.swift +80 -0
  958. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value_______.swift +83 -0
  959. package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value________.swift +83 -0
  960. package/kit-apple/Sources/NativeScriptKit/Core/Object_r_g_b.swift +78 -0
  961. package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_cooked.swift +94 -0
  962. package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_cooked_.swift +80 -0
  963. package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_requestURL_toNativeImage_toNativeString.swift +114 -0
  964. package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_requestURL_toNativeImage_toNativeString_.swift +135 -0
  965. package/kit-apple/Sources/NativeScriptKit/Core/Object_recognizer_target.swift +96 -0
  966. package/kit-apple/Sources/NativeScriptKit/Core/Object_repeatX_repeatY_posX_posY.swift +93 -0
  967. package/kit-apple/Sources/NativeScriptKit/Core/Object_requestTime_proxyStart_proxyEnd_dnsStart_dnsEnd_connectStart_and_9_more_3e958e.swift +248 -0
  968. package/kit-apple/Sources/NativeScriptKit/Core/Object_result_text.swift +94 -0
  969. package/kit-apple/Sources/NativeScriptKit/Core/Object_result_userName_password.swift +102 -0
  970. package/kit-apple/Sources/NativeScriptKit/Core/Object_right_left.swift +80 -0
  971. package/kit-apple/Sources/NativeScriptKit/Core/Object_row_col.swift +72 -0
  972. package/kit-apple/Sources/NativeScriptKit/Core/Object_rules.swift +66 -0
  973. package/kit-apple/Sources/NativeScriptKit/Core/Object_rules_.swift +78 -0
  974. package/kit-apple/Sources/NativeScriptKit/Core/Object_safeArea_fullscreen_inWindow.swift +107 -0
  975. package/kit-apple/Sources/NativeScriptKit/Core/Object_scale_translate_rotate.swift +100 -0
  976. package/kit-apple/Sources/NativeScriptKit/Core/Object_scale_tx_ty.swift +86 -0
  977. package/kit-apple/Sources/NativeScriptKit/Core/Object_sceneWillConnect_sceneDidActivate_sceneWillResignActive_sceneWillEnterForeground_sceneDidEnterBackground_sceneDidDisconnect_and_1_more_1be9d4.swift +159 -0
  978. package/kit-apple/Sources/NativeScriptKit/Core/Object_scene_uiWindow.swift +80 -0
  979. package/kit-apple/Sources/NativeScriptKit/Core/Object_shape_rule.swift +80 -0
  980. package/kit-apple/Sources/NativeScriptKit/Core/Object_sharedElements_presented_presenting.swift +115 -0
  981. package/kit-apple/Sources/NativeScriptKit/Core/Object_sharedTransitionTag_zIndex.swift +100 -0
  982. package/kit-apple/Sources/NativeScriptKit/Core/Object_showing.swift +64 -0
  983. package/kit-apple/Sources/NativeScriptKit/Core/Object_snap_endFrame_endCornerRadius_srcSharedView.swift +112 -0
  984. package/kit-apple/Sources/NativeScriptKit/Core/Object_sourceProperty_expression_twoWay_source_defaultProperty.swift +120 -0
  985. package/kit-apple/Sources/NativeScriptKit/Core/Object_sourceProperty_targetProperty_expression.swift +111 -0
  986. package/kit-apple/Sources/NativeScriptKit/Core/Object_sourceProperty_targetProperty_expression_twoWay_compiled.swift +145 -0
  987. package/kit-apple/Sources/NativeScriptKit/Core/Object_spans.swift +66 -0
  988. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value.swift +86 -0
  989. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_.swift +86 -0
  990. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value__.swift +89 -0
  991. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value___.swift +100 -0
  992. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value____.swift +86 -0
  993. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_____.swift +88 -0
  994. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value______.swift +89 -0
  995. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_______.swift +89 -0
  996. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value________.swift +89 -0
  997. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_________.swift +89 -0
  998. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value__________.swift +89 -0
  999. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value___________.swift +87 -0
  1000. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value____________.swift +90 -0
  1001. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_____________.swift +89 -0
  1002. package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value______________.swift +90 -0
  1003. package/kit-apple/Sources/NativeScriptKit/Core/Object_status_headers.swift +83 -0
  1004. package/kit-apple/Sources/NativeScriptKit/Core/Object_status_statusText.swift +80 -0
  1005. package/kit-apple/Sources/NativeScriptKit/Core/Object_status_statusText_headers_url.swift +110 -0
  1006. package/kit-apple/Sources/NativeScriptKit/Core/Object_targetProperty.swift +66 -0
  1007. package/kit-apple/Sources/NativeScriptKit/Core/Object_targetProperty_sourceProperty.swift +73 -0
  1008. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_backgroundColor_scale_translate_rotate_opacity_width_height_valueSource_duration_curve_forceLayer.swift +264 -0
  1009. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_opacity_backgroundColor_translate_scale_height_width_rotate_duration_delay_iterations_curve.swift +252 -0
  1010. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve.swift +152 -0
  1011. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve_.swift +152 -0
  1012. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve__.swift +153 -0
  1013. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve___.swift +151 -0
  1014. package/kit-apple/Sources/NativeScriptKit/Core/Object_target_translate_scale_rotate_opacity_duration_curve.swift +165 -0
  1015. package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_delay_velocity_animateOptions_animations_completion.swift +165 -0
  1016. package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_velocity.swift +101 -0
  1017. package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_velocity_delay.swift +118 -0
  1018. package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_velocity_delay_animations_completion.swift +142 -0
  1019. package/kit-apple/Sources/NativeScriptKit/Core/Object_textColor_tintColor.swift +72 -0
  1020. package/kit-apple/Sources/NativeScriptKit/Core/Object_text_iosFont_color_backgroundColor_textDecoration_baselineOffset_index.swift +144 -0
  1021. package/kit-apple/Sources/NativeScriptKit/Core/Object_title_cancelButtonText.swift +94 -0
  1022. package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_cancelButtonText.swift +96 -0
  1023. package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_cancelButtonText_inputType.swift +112 -0
  1024. package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_cancelButtonText_message.swift +112 -0
  1025. package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_message.swift +95 -0
  1026. package/kit-apple/Sources/NativeScriptKit/Core/Object_title_section.swift +80 -0
  1027. package/kit-apple/Sources/NativeScriptKit/Core/Object_toArrayBuffer_toString_toJSON_toImage_toFile.swift +142 -0
  1028. package/kit-apple/Sources/NativeScriptKit/Core/Object_toString_charAt_charCodeAt_concat_indexOf_lastIndexOf_and_44_more_fc25df.swift +481 -0
  1029. package/kit-apple/Sources/NativeScriptKit/Core/Object_topLeft_topRight_bottomLeft_bottomRight.swift +110 -0
  1030. package/kit-apple/Sources/NativeScriptKit/Core/Object_top_bottom.swift +80 -0
  1031. package/kit-apple/Sources/NativeScriptKit/Core/Object_top_left_bottom_right.swift +109 -0
  1032. package/kit-apple/Sources/NativeScriptKit/Core/Object_top_right_bottom_left.swift +122 -0
  1033. package/kit-apple/Sources/NativeScriptKit/Core/Object_top_right_bottom_left_.swift +109 -0
  1034. package/kit-apple/Sources/NativeScriptKit/Core/Object_totalTime_count_currentStart_runCount.swift +110 -0
  1035. package/kit-apple/Sources/NativeScriptKit/Core/Object_touches_event.swift +80 -0
  1036. package/kit-apple/Sources/NativeScriptKit/Core/Object_transitionContext.swift +66 -0
  1037. package/kit-apple/Sources/NativeScriptKit/Core/Object_translateX_translateY_scaleX_scaleY_rotate_opacity.swift +118 -0
  1038. package/kit-apple/Sources/NativeScriptKit/Core/Object_translateX_translateY_scaleX_scaleY_rotate_opacity_duration_curve.swift +151 -0
  1039. package/kit-apple/Sources/NativeScriptKit/Core/Object_translate_rotate_scale.swift +102 -0
  1040. package/kit-apple/Sources/NativeScriptKit/Core/Object_type.swift +64 -0
  1041. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_action_value_namespace_ignoreCase.swift +152 -0
  1042. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_action_value_namespace_ignoreCase_.swift +133 -0
  1043. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_data.swift +78 -0
  1044. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_data_.swift +92 -0
  1045. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_namespace.swift +102 -0
  1046. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_prelude_block.swift +120 -0
  1047. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_text.swift +104 -0
  1048. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_text_components.swift +113 -0
  1049. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_namespace.swift +94 -0
  1050. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_path.swift +72 -0
  1051. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_prelude_block.swift +111 -0
  1052. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_property_value.swift +94 -0
  1053. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_quote_string_value.swift +101 -0
  1054. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_selectors_declarations.swift +96 -0
  1055. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_start_end.swift +94 -0
  1056. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_start_end_left_right.swift +127 -0
  1057. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_start_end_name.swift +118 -0
  1058. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_string.swift +80 -0
  1059. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_string_unit_value.swift +101 -0
  1060. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_stylesheet.swift +83 -0
  1061. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text.swift +72 -0
  1062. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text_.swift +97 -0
  1063. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text__.swift +86 -0
  1064. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text_associatedToken_values.swift +125 -0
  1065. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_direction_object_eventName.swift +159 -0
  1066. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_eventName_object_getPointerCount_getX_getY.swift +187 -0
  1067. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_object_eventName.swift +152 -0
  1068. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_object_eventName_state.swift +167 -0
  1069. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_rotation_object_eventName_state.swift +182 -0
  1070. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_scale_getFocusX_getFocusY_object_eventName_state.swift +194 -0
  1071. package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_startX_startY_deltaX_deltaY_object_eventName_state.swift +201 -0
  1072. package/kit-apple/Sources/NativeScriptKit/Core/Object_uri_message_time.swift +108 -0
  1073. package/kit-apple/Sources/NativeScriptKit/Core/Object_url_method.swift +80 -0
  1074. package/kit-apple/Sources/NativeScriptKit/Core/Object_url_source.swift +95 -0
  1075. package/kit-apple/Sources/NativeScriptKit/Core/Object_url_source_.swift +94 -0
  1076. package/kit-apple/Sources/NativeScriptKit/Core/Object_url_status_statusText_headers_mimeType_fromDiskCache_timing_headersSize.swift +201 -0
  1077. package/kit-apple/Sources/NativeScriptKit/Core/Object_value_unit.swift +80 -0
  1078. package/kit-apple/Sources/NativeScriptKit/Core/Object_value_unit_.swift +94 -0
  1079. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_index.swift +95 -0
  1080. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_index_.swift +94 -0
  1081. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_isPresented_startFrame_snapshot_endFrame_startTransform_and_5_more_20e753.swift +234 -0
  1082. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_options.swift +94 -0
  1083. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_options_.swift +94 -0
  1084. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_startFrame_endFrame_snapshot_startOpacity_endOpacity_propertiesToMatch_zIndex.swift +186 -0
  1085. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_startFrame_endFrame_startOpacity_endOpacity_propertiesToMatch_imageSourceChangeListener.swift +181 -0
  1086. package/kit-apple/Sources/NativeScriptKit/Core/Object_view_type_animation.swift +86 -0
  1087. package/kit-apple/Sources/NativeScriptKit/Core/Object_width_color.swift +86 -0
  1088. package/kit-apple/Sources/NativeScriptKit/Core/Object_width_height.swift +80 -0
  1089. package/kit-apple/Sources/NativeScriptKit/Core/Object_width_height_.swift +95 -0
  1090. package/kit-apple/Sources/NativeScriptKit/Core/Object_width_height_os_deviceType.swift +109 -0
  1091. package/kit-apple/Sources/NativeScriptKit/Core/Object_windowOpen_windowClose_primaryWindowChanged.swift +96 -0
  1092. package/kit-apple/Sources/NativeScriptKit/Core/Object_window_isPrimary.swift +80 -0
  1093. package/kit-apple/Sources/NativeScriptKit/Core/Object_window_isPrimary_data_ios.swift +118 -0
  1094. package/kit-apple/Sources/NativeScriptKit/Core/Object_xRadius_yRadius_maxRadius.swift +87 -0
  1095. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y.swift +85 -0
  1096. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_.swift +72 -0
  1097. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y__.swift +86 -0
  1098. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y___.swift +72 -0
  1099. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y____.swift +86 -0
  1100. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_____.swift +77 -0
  1101. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y______.swift +74 -0
  1102. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_______.swift +89 -0
  1103. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y________.swift +88 -0
  1104. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_________.swift +77 -0
  1105. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_width_height.swift +101 -0
  1106. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_z.swift +94 -0
  1107. package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_z_.swift +78 -0
  1108. package/kit-apple/Sources/NativeScriptKit/Core/Object_xmlns.swift +64 -0
  1109. package/kit-apple/Sources/NativeScriptKit/Core/Object_xs_ys_xt_yt_rx_ry_rz.swift +106 -0
  1110. package/kit-apple/Sources/NativeScriptKit/Core/__Export.AndroidApplication.swift +18 -0
  1111. package/kit-apple/Sources/NativeScriptKit/Core/__Export.AndroidHelper.swift +18 -0
  1112. package/kit-apple/Sources/NativeScriptKit/Core/__Export.AnimationCurve.swift +18 -0
  1113. package/kit-apple/Sources/NativeScriptKit/Core/__Export.Application.swift +18 -0
  1114. package/kit-apple/Sources/NativeScriptKit/Core/__Export.CSSHelper.swift +20 -0
  1115. package/kit-apple/Sources/NativeScriptKit/Core/__Export.CSSType.swift +20 -0
  1116. package/kit-apple/Sources/NativeScriptKit/Core/__Export.Device.swift +18 -0
  1117. package/kit-apple/Sources/NativeScriptKit/Core/__Export.Dialogs.swift +18 -0
  1118. package/kit-apple/Sources/NativeScriptKit/Core/__Export.Enums.swift +20 -0
  1119. package/kit-apple/Sources/NativeScriptKit/Core/__Export.NativeWindowEvents.swift +20 -0
  1120. package/kit-apple/Sources/NativeScriptKit/Core/__Export.PseudoClassHandler.swift +20 -0
  1121. package/kit-apple/Sources/NativeScriptKit/Core/__Export.SceneEvents.swift +20 -0
  1122. package/kit-apple/Sources/NativeScriptKit/Core/__Export.WindowEvents.swift +20 -0
  1123. package/kit-apple/Sources/NativeScriptKit/Core/__Export._resetRootView.swift +18 -0
  1124. package/kit-apple/Sources/NativeScriptKit/Core/__Export._resolveAnimationCurve.swift +20 -0
  1125. package/kit-apple/Sources/NativeScriptKit/Core/__Export._setResolver.swift +20 -0
  1126. package/kit-apple/Sources/NativeScriptKit/Core/__Export._updateCharactersInRangeReplacementString.swift +23 -0
  1127. package/kit-apple/Sources/NativeScriptKit/Core/__Export.action.swift +20 -0
  1128. package/kit-apple/Sources/NativeScriptKit/Core/__Export.addCss.swift +18 -0
  1129. package/kit-apple/Sources/NativeScriptKit/Core/__Export.addTaggedAdditionalCSS.swift +20 -0
  1130. package/kit-apple/Sources/NativeScriptKit/Core/__Export.addWeakEventListener.swift +22 -0
  1131. package/kit-apple/Sources/NativeScriptKit/Core/__Export.alert.swift +20 -0
  1132. package/kit-apple/Sources/NativeScriptKit/Core/__Export.android.swift +18 -0
  1133. package/kit-apple/Sources/NativeScriptKit/Core/__Export.androidDynamicElevationOffsetProperty.swift +20 -0
  1134. package/kit-apple/Sources/NativeScriptKit/Core/__Export.androidElevationProperty.swift +18 -0
  1135. package/kit-apple/Sources/NativeScriptKit/Core/__Export.animationTimingFunctionConverter.swift +20 -0
  1136. package/kit-apple/Sources/NativeScriptKit/Core/__Export.autocapitalizationTypeProperty.swift +20 -0
  1137. package/kit-apple/Sources/NativeScriptKit/Core/__Export.autocorrectProperty.swift +18 -0
  1138. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundColorProperty.swift +18 -0
  1139. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundEvent.swift +18 -0
  1140. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundImageProperty.swift +18 -0
  1141. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundInternalProperty.swift +18 -0
  1142. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundPositionProperty.swift +18 -0
  1143. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundRepeatProperty.swift +18 -0
  1144. package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundSizeProperty.swift +18 -0
  1145. package/kit-apple/Sources/NativeScriptKit/Core/__Export.booleanConverter.swift +20 -0
  1146. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomColorProperty.swift +18 -0
  1147. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomLeftRadiusProperty.swift +20 -0
  1148. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomRightRadiusProperty.swift +20 -0
  1149. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomWidthProperty.swift +18 -0
  1150. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderLeftColorProperty.swift +18 -0
  1151. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderLeftWidthProperty.swift +18 -0
  1152. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderRightColorProperty.swift +18 -0
  1153. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderRightWidthProperty.swift +18 -0
  1154. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopColorProperty.swift +18 -0
  1155. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopLeftRadiusProperty.swift +18 -0
  1156. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopRightRadiusProperty.swift +18 -0
  1157. package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopWidthProperty.swift +18 -0
  1158. package/kit-apple/Sources/NativeScriptKit/Core/__Export.clipPathProperty.swift +18 -0
  1159. package/kit-apple/Sources/NativeScriptKit/Core/__Export.colorProperty.swift +18 -0
  1160. package/kit-apple/Sources/NativeScriptKit/Core/__Export.columnGapProperty.swift +18 -0
  1161. package/kit-apple/Sources/NativeScriptKit/Core/__Export.confirm.swift +20 -0
  1162. package/kit-apple/Sources/NativeScriptKit/Core/__Export.cornerShapeProperty.swift +18 -0
  1163. package/kit-apple/Sources/NativeScriptKit/Core/__Export.directionProperty.swift +18 -0
  1164. package/kit-apple/Sources/NativeScriptKit/Core/__Export.discardedErrorEvent.swift +18 -0
  1165. package/kit-apple/Sources/NativeScriptKit/Core/__Export.displayedEvent.swift +18 -0
  1166. package/kit-apple/Sources/NativeScriptKit/Core/__Export.eachDescendant.swift +20 -0
  1167. package/kit-apple/Sources/NativeScriptKit/Core/__Export.editableProperty.swift +18 -0
  1168. package/kit-apple/Sources/NativeScriptKit/Core/__Export.ensureA11yClasses.swift +20 -0
  1169. package/kit-apple/Sources/NativeScriptKit/Core/__Export.exitEvent.swift +18 -0
  1170. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontFamilyProperty.swift +18 -0
  1171. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontInternalProperty.swift +18 -0
  1172. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontScaleChangedEvent.swift +18 -0
  1173. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontScaleInternalProperty.swift +20 -0
  1174. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontSizeProperty.swift +18 -0
  1175. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontStyleProperty.swift +18 -0
  1176. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontVariationSettingsProperty.swift +20 -0
  1177. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontWeightProperty.swift +18 -0
  1178. package/kit-apple/Sources/NativeScriptKit/Core/__Export.foregroundEvent.swift +18 -0
  1179. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fromObject.swift +20 -0
  1180. package/kit-apple/Sources/NativeScriptKit/Core/__Export.fromObjectRecursive.swift +20 -0
  1181. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getAncestor.swift +20 -0
  1182. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getAndroidAccessibilityManager.swift +20 -0
  1183. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getCssFileName.swift +18 -0
  1184. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getCurrentFontScale.swift +20 -0
  1185. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getCurrentPage.swift +20 -0
  1186. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getFileAccess.swift +20 -0
  1187. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getMainEntry.swift +18 -0
  1188. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getNativeApp.swift +20 -0
  1189. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getNativeApplication.swift +18 -0
  1190. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getResources.swift +18 -0
  1191. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getRootLayout.swift +20 -0
  1192. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getRootLayoutById.swift +20 -0
  1193. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getRootView.swift +18 -0
  1194. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getTransformedText.swift +20 -0
  1195. package/kit-apple/Sources/NativeScriptKit/Core/__Export.getViewById.swift +20 -0
  1196. package/kit-apple/Sources/NativeScriptKit/Core/__Export.hasLaunched.swift +18 -0
  1197. package/kit-apple/Sources/NativeScriptKit/Core/__Export.hasListeners.swift +18 -0
  1198. package/kit-apple/Sources/NativeScriptKit/Core/__Export.heightProperty.swift +18 -0
  1199. package/kit-apple/Sources/NativeScriptKit/Core/__Export.hintProperty.swift +18 -0
  1200. package/kit-apple/Sources/NativeScriptKit/Core/__Export.horizontalAlignmentProperty.swift +18 -0
  1201. package/kit-apple/Sources/NativeScriptKit/Core/__Export.inBackground.swift +18 -0
  1202. package/kit-apple/Sources/NativeScriptKit/Core/__Export.initAccessibilityCssHelper.swift +20 -0
  1203. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isAccessibilityServiceEnabled.swift +20 -0
  1204. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isAndroid.swift +18 -0
  1205. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isApple.swift +18 -0
  1206. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isEmbedded.swift +20 -0
  1207. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isIOS.swift +18 -0
  1208. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isUserInteractionEnabledProperty.swift +20 -0
  1209. package/kit-apple/Sources/NativeScriptKit/Core/__Export.isVisionOS.swift +18 -0
  1210. package/kit-apple/Sources/NativeScriptKit/Core/__Export.keyboardTypeProperty.swift +18 -0
  1211. package/kit-apple/Sources/NativeScriptKit/Core/__Export.launchEvent.swift +18 -0
  1212. package/kit-apple/Sources/NativeScriptKit/Core/__Export.layoutDirection.swift +18 -0
  1213. package/kit-apple/Sources/NativeScriptKit/Core/__Export.layoutDirectionChanged.swift +18 -0
  1214. package/kit-apple/Sources/NativeScriptKit/Core/__Export.layoutDirectionChangedEvent.swift +18 -0
  1215. package/kit-apple/Sources/NativeScriptKit/Core/__Export.letterSpacingProperty.swift +18 -0
  1216. package/kit-apple/Sources/NativeScriptKit/Core/__Export.lineHeightProperty.swift +18 -0
  1217. package/kit-apple/Sources/NativeScriptKit/Core/__Export.loadAppCss.swift +18 -0
  1218. package/kit-apple/Sources/NativeScriptKit/Core/__Export.login.swift +20 -0
  1219. package/kit-apple/Sources/NativeScriptKit/Core/__Export.lowMemoryEvent.swift +18 -0
  1220. package/kit-apple/Sources/NativeScriptKit/Core/__Export.makeParser.swift +22 -0
  1221. package/kit-apple/Sources/NativeScriptKit/Core/__Export.makeValidator.swift +20 -0
  1222. package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginBottomProperty.swift +18 -0
  1223. package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginLeftProperty.swift +18 -0
  1224. package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginRightProperty.swift +18 -0
  1225. package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginTopProperty.swift +18 -0
  1226. package/kit-apple/Sources/NativeScriptKit/Core/__Export.maxHeightProperty.swift +18 -0
  1227. package/kit-apple/Sources/NativeScriptKit/Core/__Export.maxLengthProperty.swift +18 -0
  1228. package/kit-apple/Sources/NativeScriptKit/Core/__Export.maxWidthProperty.swift +18 -0
  1229. package/kit-apple/Sources/NativeScriptKit/Core/__Export.minHeightProperty.swift +18 -0
  1230. package/kit-apple/Sources/NativeScriptKit/Core/__Export.minWidthProperty.swift +18 -0
  1231. package/kit-apple/Sources/NativeScriptKit/Core/__Export.notify.swift +18 -0
  1232. package/kit-apple/Sources/NativeScriptKit/Core/__Export.off.swift +18 -0
  1233. package/kit-apple/Sources/NativeScriptKit/Core/__Export.on.swift +18 -0
  1234. package/kit-apple/Sources/NativeScriptKit/Core/__Export.opacityProperty.swift +18 -0
  1235. package/kit-apple/Sources/NativeScriptKit/Core/__Export.orientation.swift +18 -0
  1236. package/kit-apple/Sources/NativeScriptKit/Core/__Export.orientationChangedEvent.swift +18 -0
  1237. package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingBottomProperty.swift +18 -0
  1238. package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingInternalProperty.swift +18 -0
  1239. package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingLeftProperty.swift +18 -0
  1240. package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingRightProperty.swift +18 -0
  1241. package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingTopProperty.swift +18 -0
  1242. package/kit-apple/Sources/NativeScriptKit/Core/__Export.parseCSSShadow.swift +20 -0
  1243. package/kit-apple/Sources/NativeScriptKit/Core/__Export.parseCSSStroke.swift +20 -0
  1244. package/kit-apple/Sources/NativeScriptKit/Core/__Export.parseKeyframeDeclarations.swift +22 -0
  1245. package/kit-apple/Sources/NativeScriptKit/Core/__Export.perspectiveProperty.swift +18 -0
  1246. package/kit-apple/Sources/NativeScriptKit/Core/__Export.placeholderColorProperty.swift +20 -0
  1247. package/kit-apple/Sources/NativeScriptKit/Core/__Export.platformNames.swift +18 -0
  1248. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profile.swift +22 -0
  1249. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingDisable.swift +20 -0
  1250. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingDumpProfiles.swift +20 -0
  1251. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingEnable.swift +20 -0
  1252. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingIsRunning.swift +20 -0
  1253. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingResetProfiles.swift +20 -0
  1254. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStart.swift +20 -0
  1255. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStartCPU.swift +20 -0
  1256. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStop.swift +20 -0
  1257. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStopCPU.swift +20 -0
  1258. package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingUptime.swift +20 -0
  1259. package/kit-apple/Sources/NativeScriptKit/Core/__Export.prompt.swift +20 -0
  1260. package/kit-apple/Sources/NativeScriptKit/Core/__Export.querySelectorAll.swift +20 -0
  1261. package/kit-apple/Sources/NativeScriptKit/Core/__Export.removeTaggedAdditionalCSS.swift +20 -0
  1262. package/kit-apple/Sources/NativeScriptKit/Core/__Export.removeWeakEventListener.swift +22 -0
  1263. package/kit-apple/Sources/NativeScriptKit/Core/__Export.resetRootView.swift +18 -0
  1264. package/kit-apple/Sources/NativeScriptKit/Core/__Export.resolveFileNameFromUrl.swift +23 -0
  1265. package/kit-apple/Sources/NativeScriptKit/Core/__Export.resumeEvent.swift +18 -0
  1266. package/kit-apple/Sources/NativeScriptKit/Core/__Export.returnKeyTypeProperty.swift +20 -0
  1267. package/kit-apple/Sources/NativeScriptKit/Core/__Export.rotateProperty.swift +18 -0
  1268. package/kit-apple/Sources/NativeScriptKit/Core/__Export.rotateXProperty.swift +18 -0
  1269. package/kit-apple/Sources/NativeScriptKit/Core/__Export.rotateYProperty.swift +18 -0
  1270. package/kit-apple/Sources/NativeScriptKit/Core/__Export.rowGapProperty.swift +18 -0
  1271. package/kit-apple/Sources/NativeScriptKit/Core/__Export.run.swift +18 -0
  1272. package/kit-apple/Sources/NativeScriptKit/Core/__Export.sanitizeModuleName.swift +20 -0
  1273. package/kit-apple/Sources/NativeScriptKit/Core/__Export.scaleXProperty.swift +18 -0
  1274. package/kit-apple/Sources/NativeScriptKit/Core/__Export.scaleYProperty.swift +18 -0
  1275. package/kit-apple/Sources/NativeScriptKit/Core/__Export.sendAccessibilityEvent.swift +18 -0
  1276. package/kit-apple/Sources/NativeScriptKit/Core/__Export.setActivityCallbacks.swift +20 -0
  1277. package/kit-apple/Sources/NativeScriptKit/Core/__Export.setAutoSystemAppearanceChanged.swift +18 -0
  1278. package/kit-apple/Sources/NativeScriptKit/Core/__Export.setCssFileName.swift +18 -0
  1279. package/kit-apple/Sources/NativeScriptKit/Core/__Export.setMaxRefreshRate.swift +18 -0
  1280. package/kit-apple/Sources/NativeScriptKit/Core/__Export.setNativeApp.swift +20 -0
  1281. package/kit-apple/Sources/NativeScriptKit/Core/__Export.setResources.swift +18 -0
  1282. package/kit-apple/Sources/NativeScriptKit/Core/__Export.suspendEvent.swift +18 -0
  1283. package/kit-apple/Sources/NativeScriptKit/Core/__Export.suspended.swift +18 -0
  1284. package/kit-apple/Sources/NativeScriptKit/Core/__Export.systemAppearance.swift +18 -0
  1285. package/kit-apple/Sources/NativeScriptKit/Core/__Export.systemAppearanceChanged.swift +18 -0
  1286. package/kit-apple/Sources/NativeScriptKit/Core/__Export.systemAppearanceChangedEvent.swift +18 -0
  1287. package/kit-apple/Sources/NativeScriptKit/Core/__Export.textAlignmentProperty.swift +18 -0
  1288. package/kit-apple/Sources/NativeScriptKit/Core/__Export.textDecorationProperty.swift +18 -0
  1289. package/kit-apple/Sources/NativeScriptKit/Core/__Export.textOverflowProperty.swift +18 -0
  1290. package/kit-apple/Sources/NativeScriptKit/Core/__Export.textShadowProperty.swift +18 -0
  1291. package/kit-apple/Sources/NativeScriptKit/Core/__Export.textStrokeProperty.swift +18 -0
  1292. package/kit-apple/Sources/NativeScriptKit/Core/__Export.textTransformProperty.swift +18 -0
  1293. package/kit-apple/Sources/NativeScriptKit/Core/__Export.timeConverter.swift +20 -0
  1294. package/kit-apple/Sources/NativeScriptKit/Core/__Export.translateXProperty.swift +18 -0
  1295. package/kit-apple/Sources/NativeScriptKit/Core/__Export.translateYProperty.swift +18 -0
  1296. package/kit-apple/Sources/NativeScriptKit/Core/__Export.uncaughtErrorEvent.swift +18 -0
  1297. package/kit-apple/Sources/NativeScriptKit/Core/__Export.unsetValue.swift +18 -0
  1298. package/kit-apple/Sources/NativeScriptKit/Core/__Export.updateAccessibilityProperties.swift +20 -0
  1299. package/kit-apple/Sources/NativeScriptKit/Core/__Export.updateCurrentHelperClasses.swift +21 -0
  1300. package/kit-apple/Sources/NativeScriptKit/Core/__Export.updateTextTriggerProperty.swift +20 -0
  1301. package/kit-apple/Sources/NativeScriptKit/Core/__Export.verticalAlignmentProperty.swift +18 -0
  1302. package/kit-apple/Sources/NativeScriptKit/Core/__Export.visibilityProperty.swift +18 -0
  1303. package/kit-apple/Sources/NativeScriptKit/Core/__Export.whiteSpaceProperty.swift +18 -0
  1304. package/kit-apple/Sources/NativeScriptKit/Core/__Export.widthProperty.swift +18 -0
  1305. package/kit-apple/Sources/NativeScriptKit/Core/__Export.zIndexProperty.swift +18 -0
  1306. package/kit-apple/Sources/NativeScriptKit/Core/__Modules.swift +17 -0
  1307. package/kit-apple/Sources/NativeScriptKit/Core/__Namespace.Http.swift +23 -0
  1308. package/kit-apple/Sources/NativeScriptKit/Core/__Namespace.Utils.swift +201 -0
  1309. package/kit-apple/Sources/NativeScriptKit/Core/abortcontroller.abortsignal.swift +109 -0
  1310. package/kit-apple/Sources/NativeScriptKit/Core/abortcontroller.index.swift +118 -0
  1311. package/kit-apple/Sources/NativeScriptKit/Core/accessibility.accessibility-common.swift +572 -0
  1312. package/kit-apple/Sources/NativeScriptKit/Core/accessibility.accessibility-properties.swift +258 -0
  1313. package/kit-apple/Sources/NativeScriptKit/Core/accessibility.index.swift +16 -0
  1314. package/kit-apple/Sources/NativeScriptKit/Core/application-settings.application-settings-common.swift +36 -0
  1315. package/kit-apple/Sources/NativeScriptKit/Core/application-settings.index.ios.swift +157 -0
  1316. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +2095 -0
  1317. package/kit-apple/Sources/NativeScriptKit/Core/application.application-interfaces.swift +16 -0
  1318. package/kit-apple/Sources/NativeScriptKit/Core/application.application-shims.swift +212 -0
  1319. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +3854 -0
  1320. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +224 -0
  1321. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers.ios.swift +57 -0
  1322. package/kit-apple/Sources/NativeScriptKit/Core/application.index.ios.swift +16 -0
  1323. package/kit-apple/Sources/NativeScriptKit/Core/application.scene-delegate-bridge.swift +234 -0
  1324. package/kit-apple/Sources/NativeScriptKit/Core/color.color-common.swift +756 -0
  1325. package/kit-apple/Sources/NativeScriptKit/Core/color.color-types.swift +16 -0
  1326. package/kit-apple/Sources/NativeScriptKit/Core/color.color-utils.swift +388 -0
  1327. package/kit-apple/Sources/NativeScriptKit/Core/color.index.ios.swift +100 -0
  1328. package/kit-apple/Sources/NativeScriptKit/Core/color.known-colors.swift +520 -0
  1329. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +190 -0
  1330. package/kit-apple/Sources/NativeScriptKit/Core/core-types.animation-types.swift +87 -0
  1331. package/kit-apple/Sources/NativeScriptKit/Core/core-types.index.swift +361 -0
  1332. package/kit-apple/Sources/NativeScriptKit/Core/core-types.validators.swift +62 -0
  1333. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +220 -0
  1334. package/kit-apple/Sources/NativeScriptKit/Core/css-value.reworkcss-value.swift +280 -0
  1335. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1012 -0
  1336. package/kit-apple/Sources/NativeScriptKit/Core/css.CSSNativeScript.swift +264 -0
  1337. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +971 -0
  1338. package/kit-apple/Sources/NativeScriptKit/Core/css.system-classes.swift +120 -0
  1339. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +700 -0
  1340. package/kit-apple/Sources/NativeScriptKit/Core/data.observable.index.swift +1166 -0
  1341. package/kit-apple/Sources/NativeScriptKit/Core/data.virtual-array.index.swift +326 -0
  1342. package/kit-apple/Sources/NativeScriptKit/Core/fetch.index.swift +1201 -0
  1343. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +1450 -0
  1344. package/kit-apple/Sources/NativeScriptKit/Core/file-system.index.swift +1756 -0
  1345. package/kit-apple/Sources/NativeScriptKit/Core/fps-meter.fps-native.ios.swift +227 -0
  1346. package/kit-apple/Sources/NativeScriptKit/Core/fps-meter.index.swift +141 -0
  1347. package/kit-apple/Sources/NativeScriptKit/Core/globals.global-utils.swift +252 -0
  1348. package/kit-apple/Sources/NativeScriptKit/Core/http.http-interfaces.swift +24 -0
  1349. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +59 -0
  1350. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +413 -0
  1351. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request.http-request-common.swift +57 -0
  1352. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request.index.ios.swift +101 -0
  1353. package/kit-apple/Sources/NativeScriptKit/Core/http.index.swift +175 -0
  1354. package/kit-apple/Sources/NativeScriptKit/Core/image-asset.image-asset-common.swift +285 -0
  1355. package/kit-apple/Sources/NativeScriptKit/Core/image-asset.index.ios.swift +205 -0
  1356. package/kit-apple/Sources/NativeScriptKit/Core/image-source.image-source-common.swift +40 -0
  1357. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +1130 -0
  1358. package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +1388 -0
  1359. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +30789 -0
  1360. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +3383 -0
  1361. package/kit-apple/Sources/NativeScriptKit/Core/matrix.index.swift +151 -0
  1362. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +468 -0
  1363. package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.helpers.swift +57 -0
  1364. package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.index.swift +220 -0
  1365. package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.non-bundle-workflow-compat.swift +262 -0
  1366. package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.qualifier-matcher.index.swift +330 -0
  1367. package/kit-apple/Sources/NativeScriptKit/Core/native-window.index.swift +16 -0
  1368. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window-common.swift +730 -0
  1369. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window-interfaces.swift +46 -0
  1370. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +521 -0
  1371. package/kit-apple/Sources/NativeScriptKit/Core/native-window.window-base.swift +298 -0
  1372. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.index.swift +16 -0
  1373. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +668 -0
  1374. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +221 -0
  1375. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +62 -0
  1376. package/kit-apple/Sources/NativeScriptKit/Core/platform.common.swift +25 -0
  1377. package/kit-apple/Sources/NativeScriptKit/Core/platform.device.index.ios.swift +289 -0
  1378. package/kit-apple/Sources/NativeScriptKit/Core/platform.index.swift +16 -0
  1379. package/kit-apple/Sources/NativeScriptKit/Core/platform.screen.index.ios.swift +217 -0
  1380. package/kit-apple/Sources/NativeScriptKit/Core/profiling.index.swift +528 -0
  1381. package/kit-apple/Sources/NativeScriptKit/Core/text.formatted-string.swift +16 -0
  1382. package/kit-apple/Sources/NativeScriptKit/Core/text.index.ios.swift +25 -0
  1383. package/kit-apple/Sources/NativeScriptKit/Core/text.span.swift +16 -0
  1384. package/kit-apple/Sources/NativeScriptKit/Core/text.text-common.swift +309 -0
  1385. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +513 -0
  1386. package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.action-bar-common.swift +1270 -0
  1387. package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +1480 -0
  1388. package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.activity-indicator-common.swift +81 -0
  1389. package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.index.ios.swift +175 -0
  1390. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.animation-common.swift +581 -0
  1391. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.animation-shared.swift +16 -0
  1392. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.animation-types.swift +16 -0
  1393. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +2204 -0
  1394. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.keyframe-animation.swift +1213 -0
  1395. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.binding-builder.swift +318 -0
  1396. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.component-builder.index.swift +387 -0
  1397. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +2026 -0
  1398. package/kit-apple/Sources/NativeScriptKit/Core/ui.button.button-common.swift +75 -0
  1399. package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +614 -0
  1400. package/kit-apple/Sources/NativeScriptKit/Core/ui.content-view.index.swift +291 -0
  1401. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.bindable-expressions.swift +770 -0
  1402. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.bindable-resources.swift +30 -0
  1403. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.bindable-types.swift +16 -0
  1404. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.expression-parser.swift +5297 -0
  1405. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.index.swift +1376 -0
  1406. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.control-state-change.index.ios.swift +197 -0
  1407. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +3899 -0
  1408. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.property-shared.swift +53 -0
  1409. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +3522 -0
  1410. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.utils.swift +32 -0
  1411. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +3318 -0
  1412. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +4347 -0
  1413. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.index.ios.swift +1417 -0
  1414. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.view-helper-common.swift +337 -0
  1415. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.view-helper-shared.swift +16 -0
  1416. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-interfaces.swift +272 -0
  1417. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.weak-event-listener.index.swift +323 -0
  1418. package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.date-picker-common.swift +335 -0
  1419. package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.index.ios.swift +609 -0
  1420. package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.dialogs-common.swift +486 -0
  1421. package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.index.ios.swift +677 -0
  1422. package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.editable-text-base-common.swift +378 -0
  1423. package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.index.ios.swift +512 -0
  1424. package/kit-apple/Sources/NativeScriptKit/Core/ui.embedding.index.ios.swift +25 -0
  1425. package/kit-apple/Sources/NativeScriptKit/Core/ui.enums.enums.swift +16 -0
  1426. package/kit-apple/Sources/NativeScriptKit/Core/ui.enums.index.swift +16 -0
  1427. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.fragment.ios.swift +26 -0
  1428. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.fragment.transitions.types.swift +23 -0
  1429. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +1526 -0
  1430. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-constants.swift +21 -0
  1431. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-helpers.swift +40 -0
  1432. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-interfaces.swift +26 -0
  1433. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-stack.swift +138 -0
  1434. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +1794 -0
  1435. package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.gestures-common.swift +269 -0
  1436. package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.gestures-types.swift +77 -0
  1437. package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.index.ios.swift +1453 -0
  1438. package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.touch-manager.swift +451 -0
  1439. package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.html-view-common.swift +106 -0
  1440. package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +301 -0
  1441. package/kit-apple/Sources/NativeScriptKit/Core/ui.image-cache.image-cache-common.swift +479 -0
  1442. package/kit-apple/Sources/NativeScriptKit/Core/ui.image-cache.index.ios.swift +232 -0
  1443. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.image-common.swift +399 -0
  1444. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +499 -0
  1445. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.symbol-effects-common.swift +150 -0
  1446. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.symbol-effects.ios.swift +148 -0
  1447. package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +483 -0
  1448. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.absolute-layout.absolute-layout-common.swift +172 -0
  1449. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.absolute-layout.index.ios.swift +189 -0
  1450. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.dock-layout.dock-layout-common.swift +157 -0
  1451. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.dock-layout.index.ios.swift +264 -0
  1452. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.flexbox-layout-common.swift +1028 -0
  1453. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +3238 -0
  1454. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.grid-layout.grid-layout-common.swift +1014 -0
  1455. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.grid-layout.index.ios.swift +2435 -0
  1456. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.index.swift +16 -0
  1457. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base-common.swift +591 -0
  1458. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base.ios.swift +135 -0
  1459. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.index.ios.swift +364 -0
  1460. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.liquid-glass-container-common.swift +49 -0
  1461. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.index.ios.swift +238 -0
  1462. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.liquid-glass-common.swift +34 -0
  1463. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.index.ios.swift +347 -0
  1464. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-common.swift +964 -0
  1465. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-stack.swift +59 -0
  1466. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.stack-layout.index.ios.swift +350 -0
  1467. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.stack-layout.stack-layout-common.swift +72 -0
  1468. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.wrap-layout.index.ios.swift +357 -0
  1469. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.wrap-layout.wrap-layout-common.swift +188 -0
  1470. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.index.ios.swift +374 -0
  1471. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.list-picker-common.swift +252 -0
  1472. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +2611 -0
  1473. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.list-view-common.swift +950 -0
  1474. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.events.swift +23 -0
  1475. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +1340 -0
  1476. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.page-common.swift +520 -0
  1477. package/kit-apple/Sources/NativeScriptKit/Core/ui.placeholder.index.swift +63 -0
  1478. package/kit-apple/Sources/NativeScriptKit/Core/ui.placeholder.placeholder-common.swift +16 -0
  1479. package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.index.ios.swift +173 -0
  1480. package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.progress-common.swift +111 -0
  1481. package/kit-apple/Sources/NativeScriptKit/Core/ui.proxy-view-container.index.swift +497 -0
  1482. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +535 -0
  1483. package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +699 -0
  1484. package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.scroll-view-common.swift +414 -0
  1485. package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.index.ios.swift +609 -0
  1486. package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.search-bar-common.swift +162 -0
  1487. package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.index.ios.swift +470 -0
  1488. package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.segmented-bar-common.swift +448 -0
  1489. package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.index.ios.swift +593 -0
  1490. package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.slider-common.swift +211 -0
  1491. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +1459 -0
  1492. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.split-view-common.swift +410 -0
  1493. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background-common.swift +809 -0
  1494. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2290 -0
  1495. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.box-shadow.swift +138 -0
  1496. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +198 -0
  1497. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.converters.swift +105 -0
  1498. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +493 -0
  1499. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +4016 -0
  1500. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-shadow.swift +48 -0
  1501. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-stroke.swift +41 -0
  1502. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-transform.swift +406 -0
  1503. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-utils.swift +297 -0
  1504. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +477 -0
  1505. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-interfaces.swift +16 -0
  1506. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font.ios.swift +416 -0
  1507. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.length-shared.swift +343 -0
  1508. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.linear-gradient.swift +162 -0
  1509. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-properties.swift +2524 -0
  1510. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +3330 -0
  1511. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +905 -0
  1512. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.styling-profile.swift +16 -0
  1513. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.styling-shared.swift +16 -0
  1514. package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.index.ios.swift +508 -0
  1515. package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.switch-common.swift +143 -0
  1516. package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +2284 -0
  1517. package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.tab-view-common.swift +985 -0
  1518. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +801 -0
  1519. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.index.ios.swift +1264 -0
  1520. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.span.swift +476 -0
  1521. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.text-base-common.swift +1046 -0
  1522. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.index.ios.swift +912 -0
  1523. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.text-field-common.swift +121 -0
  1524. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.index.ios.swift +1030 -0
  1525. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +138 -0
  1526. package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.index.ios.swift +473 -0
  1527. package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.time-picker-common.swift +536 -0
  1528. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.fade-transition.ios.swift +265 -0
  1529. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +159 -0
  1530. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +635 -0
  1531. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +1167 -0
  1532. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +3673 -0
  1533. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition.swift +492 -0
  1534. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.slide-transition.ios.swift +328 -0
  1535. package/kit-apple/Sources/NativeScriptKit/Core/ui.utils.ios.swift +132 -0
  1536. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.index.ios.swift +827 -0
  1537. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-common.swift +206 -0
  1538. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-interfaces.swift +16 -0
  1539. package/kit-apple/Sources/NativeScriptKit/Core/utils.animation-helpers.swift +84 -0
  1540. package/kit-apple/Sources/NativeScriptKit/Core/utils.common.swift +278 -0
  1541. package/kit-apple/Sources/NativeScriptKit/Core/utils.constants.ios.swift +33 -0
  1542. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +271 -0
  1543. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug.swift +20 -0
  1544. package/kit-apple/Sources/NativeScriptKit/Core/utils.index.ios.swift +205 -0
  1545. package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.index.ios.swift +131 -0
  1546. package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.layout-helper-common.swift +87 -0
  1547. package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.layout-helper-shared.swift +28 -0
  1548. package/kit-apple/Sources/NativeScriptKit/Core/utils.lazy.swift +39 -0
  1549. package/kit-apple/Sources/NativeScriptKit/Core/utils.macrotask-scheduler.swift +71 -0
  1550. package/kit-apple/Sources/NativeScriptKit/Core/utils.mainthread-helper.ios.swift +52 -0
  1551. package/kit-apple/Sources/NativeScriptKit/Core/utils.module-merge.swift +27 -0
  1552. package/kit-apple/Sources/NativeScriptKit/Core/utils.native-helper.ios.swift +734 -0
  1553. package/kit-apple/Sources/NativeScriptKit/Core/utils.number-utils.swift +79 -0
  1554. package/kit-apple/Sources/NativeScriptKit/Core/utils.platform-check.swift +25 -0
  1555. package/kit-apple/Sources/NativeScriptKit/Core/utils.shared.swift +84 -0
  1556. package/kit-apple/Sources/NativeScriptKit/Core/utils.types.swift +308 -0
  1557. package/kit-apple/Sources/NativeScriptKit/Core/utils.utils-shared.swift +31 -0
  1558. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +1726 -0
  1559. package/kit-apple/Sources/NativeScriptKit/Core/xml.index.swift +775 -0
  1560. package/kit-apple/Sources/NativeScriptKit/CoreBridge.swift +388 -0
  1561. package/kit-apple/Sources/NativeScriptKit/CoreConnectivity.swift +46 -0
  1562. package/kit-apple/Sources/NativeScriptKit/CoreLifetimes.swift +15 -0
  1563. package/kit-apple/Sources/NativeScriptKit/CorePackages.swift +59 -0
  1564. package/kit-apple/Sources/NativeScriptKit/JS.swift +94 -0
  1565. package/kit-apple/Sources/NativeScriptKit/Modal.swift +65 -0
  1566. package/kit-apple/Sources/NativeScriptKit/Probe.swift +97 -0
  1567. package/kit-apple/Sources/NativeScriptKit/Regions.swift +291 -0
  1568. package/kit-apple/Sources/NativeScriptKit/Runtime/AbsentModules.swift +64 -0
  1569. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +1640 -0
  1570. package/kit-apple/Sources/NativeScriptKit/Runtime/ArrayLike.swift +859 -0
  1571. package/kit-apple/Sources/NativeScriptKit/Runtime/BigInt.swift +338 -0
  1572. package/kit-apple/Sources/NativeScriptKit/Runtime/BuiltinValues.swift +45 -0
  1573. package/kit-apple/Sources/NativeScriptKit/Runtime/Collections.swift +609 -0
  1574. package/kit-apple/Sources/NativeScriptKit/Runtime/Date.swift +269 -0
  1575. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +470 -0
  1576. package/kit-apple/Sources/NativeScriptKit/Runtime/ES2023.swift +105 -0
  1577. package/kit-apple/Sources/NativeScriptKit/Runtime/Errors.swift +402 -0
  1578. package/kit-apple/Sources/NativeScriptKit/Runtime/Functions.swift +340 -0
  1579. package/kit-apple/Sources/NativeScriptKit/Runtime/Inspect.swift +758 -0
  1580. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +42 -0
  1581. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +728 -0
  1582. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +898 -0
  1583. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +874 -0
  1584. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +588 -0
  1585. package/kit-apple/Sources/NativeScriptKit/Runtime/Native.swift +819 -0
  1586. package/kit-apple/Sources/NativeScriptKit/Runtime/NativeStack.swift +66 -0
  1587. package/kit-apple/Sources/NativeScriptKit/Runtime/Number.swift +599 -0
  1588. package/kit-apple/Sources/NativeScriptKit/Runtime/Promise.swift +810 -0
  1589. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +471 -0
  1590. package/kit-apple/Sources/NativeScriptKit/Runtime/Reactive.swift +34 -0
  1591. package/kit-apple/Sources/NativeScriptKit/Runtime/Record.swift +59 -0
  1592. package/kit-apple/Sources/NativeScriptKit/Runtime/RegExp.swift +576 -0
  1593. package/kit-apple/Sources/NativeScriptKit/Runtime/RegExpEngine.swift +1918 -0
  1594. package/kit-apple/Sources/NativeScriptKit/Runtime/Stack.swift +20 -0
  1595. package/kit-apple/Sources/NativeScriptKit/Runtime/StringUTF16.swift +179 -0
  1596. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +142 -0
  1597. package/kit-apple/Sources/NativeScriptKit/Runtime/Threads.swift +275 -0
  1598. package/kit-apple/Sources/NativeScriptKit/Runtime/Timers.swift +240 -0
  1599. package/kit-apple/Sources/NativeScriptKit/Runtime/TypedArrays.swift +996 -0
  1600. package/kit-apple/Sources/NativeScriptKit/Runtime/URI.swift +94 -0
  1601. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +2061 -0
  1602. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +97 -0
  1603. package/kit-apple/Sources/NativeScriptKit/Runtime/Weak.swift +135 -0
  1604. package/kit-apple/Sources/NativeScriptKit/Runtime/WinterTC.swift +484 -0
  1605. package/kit-apple/Sources/NativeScriptKit/Signals.swift +952 -0
  1606. package/kit-apple/Sources/NativeScriptKit/UncaughtErrors.swift +37 -0
  1607. package/package.json +94 -4
  1608. package/verify/ui-driver/Host/App.swift +7 -0
  1609. package/verify/ui-driver/Tests/Driver.swift +54 -0
  1610. package/verify/ui-driver/project.yml +35 -0
@@ -0,0 +1,1918 @@
1
+ import Foundation
2
+
3
+ // The pattern grammar and matcher behind `JSRegExp`, ported from kit-android's RegExp.kt and kept parallel to it
4
+ // section by section, so that a fix to one ports to the other: a parser for ECMA-262 §22.2.1 (with Annex B's
5
+ // web-compatible forms outside `u`/`v` mode) and a backtracking matcher over UTF-16 code units, or code points in
6
+ // `u`/`v` mode. Errors carry V8's messages. NSRegularExpression (ICU) is not used: its `\d`, `\w`, `$`, `.`, case
7
+ // folding, captures in quantified groups and unset backreferences differ from JavaScript's.
8
+
9
+ // Pattern syntax
10
+
11
+ struct RegexSyntaxError: Error {
12
+ let message: String
13
+ }
14
+
15
+ private let INFINITE = Int.max
16
+
17
+ nonisolated class RNode {
18
+ nonisolated deinit {}
19
+ }
20
+ final class RSeq: RNode {
21
+ let items: [RNode]
22
+ init(_ items: [RNode]) { self.items = items }
23
+ }
24
+ final class RAlt: RNode {
25
+ let alternatives: [RNode]
26
+ init(_ alternatives: [RNode]) { self.alternatives = alternatives }
27
+ }
28
+ final class RChar: RNode {
29
+ let cp: Int, ignoreCase: Bool
30
+ init(_ cp: Int, _ ignoreCase: Bool) { self.cp = cp; self.ignoreCase = ignoreCase }
31
+ }
32
+ final class RClass: RNode {
33
+ let set: RSet, negated: Bool, ignoreCase: Bool
34
+ init(_ set: RSet, _ negated: Bool, _ ignoreCase: Bool) { self.set = set; self.negated = negated; self.ignoreCase = ignoreCase }
35
+ }
36
+ final class RAssertion: RNode {
37
+ let kind: UInt16, multiline: Bool, wordExtras: Bool
38
+ init(_ kind: UInt16, _ multiline: Bool, _ wordExtras: Bool) { self.kind = kind; self.multiline = multiline; self.wordExtras = wordExtras }
39
+ }
40
+ final class RGroup: RNode {
41
+ let index: Int, body: RNode
42
+ init(_ index: Int, _ body: RNode) { self.index = index; self.body = body }
43
+ }
44
+ final class RLook: RNode {
45
+ let ahead: Bool, negative: Bool, body: RNode
46
+ init(_ ahead: Bool, _ negative: Bool, _ body: RNode) { self.ahead = ahead; self.negative = negative; self.body = body }
47
+ }
48
+ final class RBackReference: RNode {
49
+ var groups: [Int]
50
+ let ignoreCase: Bool
51
+ init(_ groups: [Int], _ ignoreCase: Bool) { self.groups = groups; self.ignoreCase = ignoreCase }
52
+ }
53
+ final class RRepeat: RNode {
54
+ let body: RNode, min: Int, max: Int, greedy: Bool, firstGroup: Int, groupCount: Int
55
+ init(_ body: RNode, _ min: Int, _ max: Int, _ greedy: Bool, _ firstGroup: Int, _ groupCount: Int) {
56
+ self.body = body; self.min = min; self.max = max; self.greedy = greedy; self.firstGroup = firstGroup; self.groupCount = groupCount
57
+ }
58
+ }
59
+
60
+ /// A class's members: code point ranges and predicates (class escapes, property escapes).
61
+ final class RSet {
62
+ nonisolated deinit {}
63
+ var ranges: [(Int, Int)] = []
64
+ var predicates: [(Int) -> Bool] = []
65
+
66
+ @discardableResult func add(_ lo: Int, _ hi: Int? = nil) -> RSet { ranges.append((lo, hi ?? lo)); return self }
67
+ @discardableResult func add(_ test: @escaping (Int) -> Bool) -> RSet { predicates.append(test); return self }
68
+ func addAll(_ other: RSet) { ranges += other.ranges; predicates += other.predicates }
69
+
70
+ func contains(_ cp: Int) -> Bool {
71
+ for r in ranges where cp >= r.0 && cp <= r.1 { return true }
72
+ for p in predicates where p(cp) { return true }
73
+ return false
74
+ }
75
+ }
76
+
77
+ @inline(__always) private func u(_ c: Unicode.Scalar) -> UInt16 { UInt16(c.value) }
78
+ @inline(__always) func isLeadUnit(_ c: UInt16) -> Bool { c & 0xFC00 == 0xD800 }
79
+ @inline(__always) func isTrailUnit(_ c: UInt16) -> Bool { c & 0xFC00 == 0xDC00 }
80
+ @inline(__always) private func isSurrogateCode(_ c: Int) -> Bool { c >= 0xD800 && c <= 0xDFFF }
81
+ @inline(__always) private func charCount(_ cp: Int) -> Int { cp > 0xFFFF ? 2 : 1 }
82
+ private func scalar(_ cp: Int) -> Unicode.Scalar? { cp < 0 ? nil : Unicode.Scalar(UInt32(cp)) }
83
+
84
+ private func isLineTerminator(_ c: Int) -> Bool { c == 0x0A || c == 0x0D || c == 0x2028 || c == 0x2029 }
85
+ private func isDecimalDigit(_ c: Int) -> Bool { c >= 0x30 && c <= 0x39 }
86
+ private func isBasicWordChar(_ c: Int) -> Bool { (c >= 0x61 && c <= 0x7A) || (c >= 0x41 && c <= 0x5A) || (c >= 0x30 && c <= 0x39) || c == 0x5F }
87
+ private func isJSWhitespace(_ c: Int) -> Bool { c <= 0xFFFF && jsIsWhitespace(UInt16(c)) }
88
+ private func isHexDigit(_ c: UInt16) -> Bool { (c >= 0x30 && c <= 0x39) || (c >= 0x61 && c <= 0x66) || (c >= 0x41 && c <= 0x46) }
89
+ private func hexValue(_ c: UInt16) -> Int { c <= 0x39 ? Int(c) - 0x30 : (Int(c) | 0x20) - 0x61 + 10 }
90
+ private func isDigitUnit(_ c: UInt16) -> Bool { c >= 0x30 && c <= 0x39 }
91
+ private func isAsciiLetter(_ c: UInt16) -> Bool { (c >= 0x61 && c <= 0x7A) || (c >= 0x41 && c <= 0x5A) }
92
+
93
+ /// Canonicalize (§22.2.2.7.3) and the inverse classes it induces, built on first use of the `i` flag.
94
+ enum CaseFolding {
95
+ /// Outside unicode mode: toUppercase per the Unicode Default Case Conversion, kept only when one code unit,
96
+ /// and never from beyond ASCII into it.
97
+ private static let upper: [UInt16] = {
98
+ var table = (0..<0x10000).map { UInt16($0) }
99
+ for c in 0..<0x10000 where !isSurrogateCode(c) {
100
+ guard let s = scalar(c), s.properties.changesWhenUppercased else { continue }
101
+ let mapped = Array(s.properties.uppercaseMapping.utf16)
102
+ if mapped.count == 1 && !(c >= 128 && mapped[0] < 128) { table[c] = mapped[0] }
103
+ }
104
+ return table
105
+ }()
106
+
107
+ private static let unitClasses: [Int: [Int]] = classes(0xFFFF) { canonicalize($0, false) }
108
+ private static let pointClasses: [Int: [Int]] = classes(0x10FFFF) { canonicalize($0, true) }
109
+
110
+ /// Only characters that change under some case mapping canonicalize to another.
111
+ private static func classes(_ last: Int, _ canon: (Int) -> Int) -> [Int: [Int]] {
112
+ var members: [Int: [Int]] = [:]
113
+ for c in 0...last {
114
+ guard let s = scalar(c), s.properties.changesWhenCaseMapped else { continue }
115
+ let k = canon(c)
116
+ if k != c { members[k, default: [k]].append(c) }
117
+ }
118
+ return members
119
+ }
120
+
121
+ private static func single(_ mapping: String, _ c: Int) -> Int {
122
+ let scalars = mapping.unicodeScalars
123
+ return scalars.count == 1 ? Int(scalars.first!.value) : c
124
+ }
125
+
126
+ /// Simple case folding as lower(upper(c)), with the exceptions CaseFolding.txt makes: the dotted and dotless i
127
+ /// fold only to themselves, and three characters without case mappings fold. Swift exposes full mappings only:
128
+ /// one that is more than one character stands for no simple mapping.
129
+ static func canonicalize(_ c: Int, _ unicode: Bool) -> Int {
130
+ if !unicode { return c <= 0xFFFF ? Int(upper[c]) : c }
131
+ switch c {
132
+ case 0x130, 0x131: return c
133
+ case 0x1FD3: return 0x390
134
+ case 0x1FE3: return 0x3B0
135
+ case 0xFB05: return 0xFB06
136
+ default:
137
+ guard let s = scalar(c), s.properties.changesWhenCaseMapped else { return c }
138
+ let up = single(s.properties.uppercaseMapping, c)
139
+ guard let t = scalar(up) else { return up }
140
+ return single(t.properties.lowercaseMapping, up)
141
+ }
142
+ }
143
+
144
+ /// Every character whose canonical form is `canon`'s.
145
+ static func equivalents(_ canon: Int, _ unicode: Bool) -> [Int]? { (unicode ? pointClasses : unitClasses)[canon] }
146
+ }
147
+
148
+ /// Whether `set` holds `c` or a character with the same canonical form (CharacterSetMatcher under `i`).
149
+ private func caseClosedContains(_ set: RSet, _ c: Int, _ unicode: Bool) -> Bool {
150
+ if set.contains(c) { return true }
151
+ guard let members = CaseFolding.equivalents(CaseFolding.canonicalize(c, unicode), unicode) else { return false }
152
+ for m in members where m != c && set.contains(m) { return true }
153
+ return false
154
+ }
155
+
156
+ /// A `v`-mode class: its single characters as a test, and its strings of other lengths.
157
+ private struct SetClass {
158
+ let test: (Int) -> Bool
159
+ let strings: Set<[UInt16]>
160
+ }
161
+
162
+ private struct SetOperand {
163
+ let cp: Int
164
+ let set: SetClass?
165
+ }
166
+
167
+ private struct NamedGroup {
168
+ let name: String, index: Int, path: [[Int]]
169
+ }
170
+
171
+ /// The pattern grammar of §22.2.1, with Annex B §B.1.2 outside unicode mode.
172
+ final class RegexParser {
173
+ nonisolated deinit {}
174
+ private let p: [UInt16]
175
+ private var ignoreCase: Bool, multiline: Bool, dotAll: Bool
176
+ private let unicodeMode: Bool, setsMode: Bool
177
+ private var pos = 0
178
+ private var groupCount = 0
179
+ private let totalGroups: Int
180
+ private let hasNamedGroups: Bool
181
+ private var names: [NamedGroup] = []
182
+ private var namedReferences: [(String, RBackReference)] = []
183
+ /// Per enclosing disjunction: its number and the alternative being parsed.
184
+ private var path: [[Int]] = []
185
+ private var disjunctions = 0
186
+
187
+ init(_ pattern: String, ignoreCase: Bool, multiline: Bool, dotAll: Bool, unicodeMode: Bool, setsMode: Bool) {
188
+ p = Array(pattern.utf16)
189
+ self.ignoreCase = ignoreCase
190
+ self.multiline = multiline
191
+ self.dotAll = dotAll
192
+ self.unicodeMode = unicodeMode
193
+ self.setsMode = setsMode
194
+ var count = 0
195
+ var named = false
196
+ var i = 0
197
+ var inClass = false
198
+ while i < p.count {
199
+ let c = p[i]
200
+ if c == u("\\") { i += 1 }
201
+ else if inClass { if c == u("]") { inClass = false } }
202
+ else if c == u("[") { inClass = true }
203
+ else if c == u("(") {
204
+ if i + 1 < p.count && p[i + 1] == u("?") {
205
+ if i + 3 < p.count && p[i + 2] == u("<") && p[i + 3] != u("=") && p[i + 3] != u("!") { count += 1; named = true }
206
+ } else { count += 1 }
207
+ }
208
+ i += 1
209
+ }
210
+ totalGroups = count
211
+ hasNamedGroups = named
212
+ }
213
+
214
+ private func error(_ message: String) -> RegexSyntaxError { RegexSyntaxError(message: message) }
215
+
216
+ func parse() throws -> RegexProgram {
217
+ let root = try parseDisjunction()
218
+ if pos < p.count { throw error("Unmatched ')'") }
219
+ for (name, ref) in namedReferences {
220
+ let groups = names.filter { $0.name == name }.map { $0.index }
221
+ if groups.isEmpty { throw error("Invalid named capture referenced") }
222
+ ref.groups = groups
223
+ }
224
+ return RegexProgram(root, groupCount, names.map { ($0.name, $0.index) }, unicodeMode)
225
+ }
226
+
227
+ private func at(_ text: String, _ i: Int? = nil) -> Bool {
228
+ var k = i ?? pos
229
+ for c in text.utf16 {
230
+ guard k < p.count, p[k] == c else { return false }
231
+ k += 1
232
+ }
233
+ return true
234
+ }
235
+
236
+ private func codePointAt(_ i: Int) -> Int {
237
+ let c = p[i]
238
+ if isLeadUnit(c), i + 1 < p.count, isTrailUnit(p[i + 1]) { return 0x10000 + ((Int(c) - 0xD800) << 10) + (Int(p[i + 1]) - 0xDC00) }
239
+ return Int(c)
240
+ }
241
+
242
+ private func peekCodePoint() -> Int { unicodeMode ? codePointAt(pos) : Int(p[pos]) }
243
+
244
+ private func parseDisjunction() throws -> RNode {
245
+ path.append([disjunctions, 0])
246
+ disjunctions += 1
247
+ var alternatives = [try parseAlternative()]
248
+ while pos < p.count && p[pos] == u("|") {
249
+ pos += 1
250
+ path[path.count - 1][1] += 1
251
+ alternatives.append(try parseAlternative())
252
+ }
253
+ path.removeLast()
254
+ return alternatives.count == 1 ? alternatives[0] : RAlt(alternatives)
255
+ }
256
+
257
+ private func parseAlternative() throws -> RNode {
258
+ var items: [RNode] = []
259
+ while pos < p.count && p[pos] != u("|") && p[pos] != u(")") { items.append(try parseTerm()) }
260
+ return items.count == 1 ? items[0] : RSeq(items)
261
+ }
262
+
263
+ private func atQuantifier() -> Bool {
264
+ guard pos < p.count else { return false }
265
+ let c = p[pos]
266
+ return c == u("*") || c == u("+") || c == u("?") || (c == u("{") && braced(pos) != nil)
267
+ }
268
+
269
+ private func assertion(_ node: RNode) throws -> RNode {
270
+ if atQuantifier() { throw error("Nothing to repeat") }
271
+ return node
272
+ }
273
+
274
+ private func parseTerm() throws -> RNode {
275
+ let c = p[pos]
276
+ if c == u("^") { pos += 1; return try assertion(RAssertion(u("^"), multiline, false)) }
277
+ if c == u("$") { pos += 1; return try assertion(RAssertion(u("$"), multiline, false)) }
278
+ if c == u("\\") && pos + 1 < p.count && (p[pos + 1] == u("b") || p[pos + 1] == u("B")) {
279
+ pos += 2
280
+ return try assertion(RAssertion(p[pos - 1], false, unicodeMode && ignoreCase))
281
+ }
282
+ if at("(?=") || at("(?!") || at("(?<=") || at("(?<!") {
283
+ let ahead = p[pos + 2] != u("<")
284
+ let negative = p[pos + (ahead ? 2 : 3)] == u("!")
285
+ pos += ahead ? 3 : 4
286
+ let before = groupCount
287
+ let body = try parseDisjunction()
288
+ if pos >= p.count { throw error("Unterminated group") }
289
+ pos += 1
290
+ let node = RLook(ahead, negative, body)
291
+ if ahead && !unicodeMode { return try parseQuantifier(node, before) }
292
+ if atQuantifier() { throw error("Invalid quantifier") }
293
+ return node
294
+ }
295
+ let before = groupCount
296
+ return try parseQuantifier(try parseAtom(), before)
297
+ }
298
+
299
+ /// `{n}`, `{n,}` or `{n,m}` at `at`: min, max and the position after it.
300
+ private func braced(_ at: Int) -> (Int, Int, Int)? {
301
+ var i = at + 1
302
+ func number() -> Int? {
303
+ let start = i
304
+ var v = 0
305
+ while i < p.count && isDigitUnit(p[i]) { v = v > (INFINITE - 9) / 10 ? INFINITE : v * 10 + Int(p[i] - 0x30); i += 1 }
306
+ return i == start ? nil : v
307
+ }
308
+ guard let min = number() else { return nil }
309
+ var max = min
310
+ if i < p.count && p[i] == u(",") {
311
+ i += 1
312
+ max = number() ?? INFINITE
313
+ }
314
+ if i >= p.count || p[i] != u("}") { return nil }
315
+ return (min, max, i + 1)
316
+ }
317
+
318
+ private func parseQuantifier(_ atom: RNode, _ groupsBefore: Int) throws -> RNode {
319
+ guard pos < p.count else { return atom }
320
+ let min: Int, max: Int
321
+ switch p[pos] {
322
+ case u("*"): min = 0; max = INFINITE; pos += 1
323
+ case u("+"): min = 1; max = INFINITE; pos += 1
324
+ case u("?"): min = 0; max = 1; pos += 1
325
+ case u("{"):
326
+ guard let q = braced(pos) else {
327
+ if unicodeMode { throw error("Incomplete quantifier") }
328
+ return atom
329
+ }
330
+ min = q.0; max = q.1; pos = q.2
331
+ if min > max { throw error("numbers out of order in {} quantifier") }
332
+ default: return atom
333
+ }
334
+ var greedy = true
335
+ if pos < p.count && p[pos] == u("?") { pos += 1; greedy = false }
336
+ return RRepeat(atom, min, max, greedy, groupsBefore, groupCount - groupsBefore)
337
+ }
338
+
339
+ private func parseAtom() throws -> RNode {
340
+ let c = p[pos]
341
+ switch c {
342
+ case u("."):
343
+ pos += 1
344
+ let all = dotAll
345
+ return RClass(RSet().add { all || !isLineTerminator($0) }, false, false)
346
+ case u("("): return try parseGroup()
347
+ case u("["): return setsMode ? try parseSetClass() : try parseClass()
348
+ case u("\\"): return try parseAtomEscape()
349
+ case u("*"), u("+"), u("?"): throw error("Nothing to repeat")
350
+ case u("{"):
351
+ if braced(pos) != nil { throw error("Nothing to repeat") }
352
+ if unicodeMode { throw error("Lone quantifier brackets") }
353
+ case u("}"), u("]"):
354
+ if unicodeMode { throw error("Lone quantifier brackets") }
355
+ default: break
356
+ }
357
+ let cp = peekCodePoint()
358
+ pos += charCount(cp)
359
+ return RChar(cp, ignoreCase)
360
+ }
361
+
362
+ private func closeGroup() throws {
363
+ if pos >= p.count || p[pos] != u(")") { throw error("Unterminated group") }
364
+ pos += 1
365
+ }
366
+
367
+ private func parseGroup() throws -> RNode {
368
+ if at("(?:") {
369
+ pos += 3
370
+ let body = try parseDisjunction()
371
+ try closeGroup()
372
+ return body
373
+ }
374
+ if at("(?<") {
375
+ pos += 3
376
+ let name = try parseGroupName()
377
+ groupCount += 1
378
+ let index = groupCount
379
+ for other in names where other.name == name && !differentAlternatives(other.path, path) { throw error("Duplicate capture group name") }
380
+ names.append(NamedGroup(name: name, index: index, path: path))
381
+ let body = try parseDisjunction()
382
+ try closeGroup()
383
+ return RGroup(index, body)
384
+ }
385
+ if at("(?") { return try parseModifiers() }
386
+ pos += 1
387
+ groupCount += 1
388
+ let index = groupCount
389
+ let body = try parseDisjunction()
390
+ try closeGroup()
391
+ return RGroup(index, body)
392
+ }
393
+
394
+ private func differentAlternatives(_ a: [[Int]], _ b: [[Int]]) -> Bool {
395
+ var k = 0
396
+ while k < a.count && k < b.count && a[k][0] == b[k][0] {
397
+ if a[k][1] != b[k][1] { return true }
398
+ k += 1
399
+ }
400
+ return false
401
+ }
402
+
403
+ /// `(?ims-ims:…)`.
404
+ private func parseModifiers() throws -> RNode {
405
+ pos += 2
406
+ var add: [UInt16] = [], remove: [UInt16] = []
407
+ var dash = false
408
+ while true {
409
+ if pos >= p.count { throw error("Invalid group") }
410
+ let c = p[pos]
411
+ if c == u("i") || c == u("m") || c == u("s") {
412
+ if add.contains(c) || remove.contains(c) { throw error("Repeated flag in flag group") }
413
+ if dash { remove.append(c) } else { add.append(c) }
414
+ pos += 1
415
+ } else if c == u("-") {
416
+ if dash { throw error("Multiple dashes in flag group") }
417
+ dash = true
418
+ pos += 1
419
+ } else if c == u(":") {
420
+ pos += 1
421
+ break
422
+ } else { throw error("Invalid group") }
423
+ }
424
+ if dash && add.isEmpty && remove.isEmpty { throw error("Invalid flag group") }
425
+ let saved = (ignoreCase, multiline, dotAll)
426
+ if add.contains(u("i")) { ignoreCase = true }
427
+ if add.contains(u("m")) { multiline = true }
428
+ if add.contains(u("s")) { dotAll = true }
429
+ if remove.contains(u("i")) { ignoreCase = false }
430
+ if remove.contains(u("m")) { multiline = false }
431
+ if remove.contains(u("s")) { dotAll = false }
432
+ let body = try parseDisjunction()
433
+ try closeGroup()
434
+ (ignoreCase, multiline, dotAll) = saved
435
+ return body
436
+ }
437
+
438
+ /// A RegExpIdentifierName and its closing `>`.
439
+ private func parseGroupName() throws -> String {
440
+ var out = String.UnicodeScalarView()
441
+ while true {
442
+ if pos >= p.count { throw error("Invalid capture group name") }
443
+ var cp = codePointAt(pos)
444
+ if cp == 0x3E {
445
+ pos += 1
446
+ break
447
+ }
448
+ if cp == 0x5C {
449
+ pos += 1
450
+ if pos >= p.count || p[pos] != u("u") { throw error("Invalid capture group name") }
451
+ pos += 1
452
+ guard let v = parseUnicodeEscapeBody(true) else { throw error("Invalid capture group name") }
453
+ cp = v
454
+ } else { pos += charCount(cp) }
455
+ let props = scalar(cp)?.properties
456
+ let valid = out.isEmpty ? cp == 0x24 || cp == 0x5F || props?.isIDStart == true
457
+ : cp == 0x24 || cp == 0x200C || cp == 0x200D || props?.isIDContinue == true
458
+ guard valid, let s = scalar(cp) else { throw error("Invalid capture group name") }
459
+ out.append(s)
460
+ }
461
+ if out.isEmpty { throw error("Invalid capture group name") }
462
+ return String(out)
463
+ }
464
+
465
+ /// After `\u`: `XXXX` (a surrogate pair `\uXXXX\uXXXX` in unicode mode) or `{X…}` in unicode mode; nil if malformed.
466
+ private func parseUnicodeEscapeBody(_ unicode: Bool) -> Int? {
467
+ if unicode && pos < p.count && p[pos] == u("{") {
468
+ var i = pos + 1
469
+ var v = 0
470
+ while i < p.count && isHexDigit(p[i]) {
471
+ v = v * 16 + hexValue(p[i])
472
+ if v > 0x10FFFF { return nil }
473
+ i += 1
474
+ }
475
+ if i == pos + 1 || i >= p.count || p[i] != u("}") { return nil }
476
+ pos = i + 1
477
+ return v
478
+ }
479
+ guard let lead = hex4(pos) else { return nil }
480
+ pos += 4
481
+ if unicode && lead >= 0xD800 && lead <= 0xDBFF && at("\\u") {
482
+ if let trail = hex4(pos + 2), trail >= 0xDC00 && trail <= 0xDFFF {
483
+ pos += 6
484
+ return 0x10000 + ((lead - 0xD800) << 10) + (trail - 0xDC00)
485
+ }
486
+ }
487
+ return lead
488
+ }
489
+
490
+ private func hex4(_ at: Int) -> Int? {
491
+ if at + 4 > p.count { return nil }
492
+ var v = 0
493
+ for i in at..<(at + 4) {
494
+ if !isHexDigit(p[i]) { return nil }
495
+ v = v * 16 + hexValue(p[i])
496
+ }
497
+ return v
498
+ }
499
+
500
+ /// `\0`…`\377` outside unicode mode.
501
+ private func parseLegacyOctal() -> Int {
502
+ var v = Int(p[pos]) - 0x30
503
+ pos += 1
504
+ if pos < p.count && p[pos] >= u("0") && p[pos] <= u("7") {
505
+ v = v * 8 + Int(p[pos]) - 0x30
506
+ pos += 1
507
+ if v < 32 && pos < p.count && p[pos] >= u("0") && p[pos] <= u("7") {
508
+ v = v * 8 + Int(p[pos]) - 0x30
509
+ pos += 1
510
+ }
511
+ }
512
+ return v
513
+ }
514
+
515
+ private func classEscapeSet(_ c: UInt16) -> RSet? {
516
+ let extras = unicodeMode && ignoreCase
517
+ switch c {
518
+ case u("d"): return RSet().add(0x30, 0x39)
519
+ case u("D"): return RSet().add { !isDecimalDigit($0) }
520
+ case u("s"): return RSet().add { isJSWhitespace($0) }
521
+ case u("S"): return RSet().add { !isJSWhitespace($0) }
522
+ case u("w"): return RSet().add { isBasicWordChar($0) || (extras && ($0 == 0x17F || $0 == 0x212A)) }
523
+ case u("W"): return RSet().add { !(isBasicWordChar($0) || (extras && ($0 == 0x17F || $0 == 0x212A))) }
524
+ default: return nil
525
+ }
526
+ }
527
+
528
+ /// `\p{…}` / `\P{…}` after the `p` or `P`.
529
+ private func parseProperty(_ negated: Bool) throws -> RSet {
530
+ pos += 1
531
+ if pos >= p.count || p[pos] != u("{") { throw error("Invalid property name") }
532
+ guard let close = p[pos...].firstIndex(of: u("}")) else { throw error("Invalid property name") }
533
+ let text = String(decoding: p[(pos + 1)..<close], as: UTF16.self)
534
+ pos = close + 1
535
+ guard let test = UnicodeProperties.lookup(text) else { throw error("Invalid property name") }
536
+ return RSet().add(negated ? { !test($0) } : test)
537
+ }
538
+
539
+ private func parseAtomEscape() throws -> RNode {
540
+ pos += 1
541
+ if pos >= p.count { throw error("\\ at end of pattern") }
542
+ let c = p[pos]
543
+ if let set = classEscapeSet(c) { pos += 1; return RClass(set, false, ignoreCase) }
544
+ switch c {
545
+ case u("1")...u("9"):
546
+ let start = pos
547
+ var n = 0
548
+ while pos < p.count && isDigitUnit(p[pos]) { n = n > (INFINITE - 9) / 10 ? INFINITE : n * 10 + Int(p[pos] - 0x30); pos += 1 }
549
+ if n <= totalGroups { return RBackReference([n], ignoreCase) }
550
+ if unicodeMode { throw error("Invalid escape") }
551
+ pos = start
552
+ if c >= u("8") { pos += 1; return RChar(Int(c), ignoreCase) }
553
+ return RChar(parseLegacyOctal(), ignoreCase)
554
+ case u("0"):
555
+ if pos + 1 < p.count && isDigitUnit(p[pos + 1]) {
556
+ if unicodeMode { throw error("Invalid decimal escape") }
557
+ return RChar(parseLegacyOctal(), ignoreCase)
558
+ }
559
+ pos += 1
560
+ return RChar(0, ignoreCase)
561
+ case u("k") where unicodeMode || hasNamedGroups:
562
+ pos += 1
563
+ if pos >= p.count || p[pos] != u("<") { throw error("Invalid named reference") }
564
+ pos += 1
565
+ let ref = RBackReference([], ignoreCase)
566
+ namedReferences.append((try parseGroupName(), ref))
567
+ return ref
568
+ case u("p") where unicodeMode, u("P") where unicodeMode:
569
+ return RClass(try parseProperty(c == u("P")), false, ignoreCase)
570
+ default: break
571
+ }
572
+ return RChar(try parseCharacterEscape(false), ignoreCase)
573
+ }
574
+
575
+ /// CharacterEscape at `pos` (just after the backslash): control escapes, `\cX`, `\xHH`, `\u…`, and identity
576
+ /// escapes. Outside unicode mode a malformed `\c` leaves the backslash as a literal and `c` to be read next.
577
+ private func parseCharacterEscape(_ inClass: Bool) throws -> Int {
578
+ let c = p[pos]
579
+ switch c {
580
+ case u("f"): pos += 1; return 0x0C
581
+ case u("n"): pos += 1; return 0x0A
582
+ case u("r"): pos += 1; return 0x0D
583
+ case u("t"): pos += 1; return 0x09
584
+ case u("v"): pos += 1; return 0x0B
585
+ case u("c"):
586
+ if pos + 1 < p.count && (isAsciiLetter(p[pos + 1]) || (inClass && !unicodeMode && (isDigitUnit(p[pos + 1]) || p[pos + 1] == u("_")))) {
587
+ pos += 2
588
+ return Int(p[pos - 1]) % 32
589
+ }
590
+ if unicodeMode { throw error("Invalid Unicode escape") }
591
+ return 0x5C
592
+ case u("x"):
593
+ if pos + 2 < p.count && isHexDigit(p[pos + 1]) && isHexDigit(p[pos + 2]) {
594
+ pos += 3
595
+ return hexValue(p[pos - 2]) * 16 + hexValue(p[pos - 1])
596
+ }
597
+ if unicodeMode { throw error("Invalid escape") }
598
+ pos += 1
599
+ return Int(u("x"))
600
+ case u("u"):
601
+ pos += 1
602
+ let start = pos
603
+ if let v = parseUnicodeEscapeBody(unicodeMode) { return v }
604
+ if unicodeMode { throw error("Invalid Unicode escape") }
605
+ pos = start
606
+ return Int(u("u"))
607
+ default: break
608
+ }
609
+ if unicodeMode {
610
+ if "^$\\.*+?()[]{}|/".utf16.contains(c) || (inClass && c == u("-")) { pos += 1; return Int(c) }
611
+ throw error("Invalid escape")
612
+ }
613
+ let cp = peekCodePoint()
614
+ pos += charCount(cp)
615
+ return cp
616
+ }
617
+
618
+ private struct ClassAtom {
619
+ let cp: Int
620
+ let set: RSet?
621
+ }
622
+
623
+ private func parseClassAtom() throws -> ClassAtom {
624
+ let c = p[pos]
625
+ if c != u("\\") {
626
+ let cp = peekCodePoint()
627
+ pos += charCount(cp)
628
+ return ClassAtom(cp: cp, set: nil)
629
+ }
630
+ pos += 1
631
+ if pos >= p.count { throw error("\\ at end of pattern") }
632
+ let e = p[pos]
633
+ if let set = classEscapeSet(e) { pos += 1; return ClassAtom(cp: -1, set: set) }
634
+ switch e {
635
+ case u("b"): pos += 1; return ClassAtom(cp: 8, set: nil)
636
+ case u("-"): pos += 1; return ClassAtom(cp: 0x2D, set: nil)
637
+ case u("p") where unicodeMode, u("P") where unicodeMode: return ClassAtom(cp: -1, set: try parseProperty(e == u("P")))
638
+ case u("0")...u("9"):
639
+ if unicodeMode {
640
+ if e == u("0") && !(pos + 1 < p.count && isDigitUnit(p[pos + 1])) { pos += 1; return ClassAtom(cp: 0, set: nil) }
641
+ throw error("Invalid decimal escape")
642
+ }
643
+ if e >= u("8") { pos += 1; return ClassAtom(cp: Int(e), set: nil) }
644
+ return ClassAtom(cp: parseLegacyOctal(), set: nil)
645
+ case u("k") where unicodeMode, u("B") where unicodeMode: throw error("Invalid escape")
646
+ default: break
647
+ }
648
+ return ClassAtom(cp: try parseCharacterEscape(true), set: nil)
649
+ }
650
+
651
+ private func parseClass() throws -> RNode {
652
+ pos += 1
653
+ var negated = false
654
+ if pos < p.count && p[pos] == u("^") { negated = true; pos += 1 }
655
+ let set = RSet()
656
+ while true {
657
+ if pos >= p.count { throw error("Unterminated character class") }
658
+ if p[pos] == u("]") { pos += 1; break }
659
+ let a = try parseClassAtom()
660
+ if pos + 1 < p.count && p[pos] == u("-") && p[pos + 1] != u("]") {
661
+ pos += 1
662
+ let b = try parseClassAtom()
663
+ if a.set != nil || b.set != nil {
664
+ if unicodeMode { throw error("Invalid character class") }
665
+ addAtom(set, a)
666
+ set.add(0x2D)
667
+ addAtom(set, b)
668
+ } else {
669
+ if a.cp > b.cp { throw error("Range out of order in character class") }
670
+ set.add(a.cp, b.cp)
671
+ }
672
+ } else { addAtom(set, a) }
673
+ }
674
+ return RClass(set, negated, ignoreCase)
675
+ }
676
+
677
+ private func addAtom(_ set: RSet, _ a: ClassAtom) {
678
+ if let s = a.set { set.addAll(s) } else { set.add(a.cp) }
679
+ }
680
+
681
+ // `v` mode classes (ClassSetExpression): nesting, `&&`, `--` and `\q{…}` strings. Under `i` every leaf set is
682
+ // closed over case equivalents before the set operations combine them.
683
+
684
+ private func leaf(_ set: RSet) -> (Int) -> Bool {
685
+ if !ignoreCase { return { set.contains($0) } }
686
+ return { caseClosedContains(set, $0, true) }
687
+ }
688
+
689
+ private func parseSetClass() throws -> RNode {
690
+ pos += 1
691
+ let set = try parseSetContents()
692
+ let chars = RClass(RSet().add(set.test), false, false)
693
+ if set.strings.isEmpty { return chars }
694
+ var alternatives: [RNode] = []
695
+ let points = { (s: [UInt16]) -> [Int] in String(decoding: s, as: UTF16.self).unicodeScalars.map { Int($0.value) } }
696
+ for s in set.strings.filter({ !$0.isEmpty }).sorted(by: { points($0).count > points($1).count }) {
697
+ alternatives.append(RSeq(points(s).map { RChar($0, ignoreCase) }))
698
+ }
699
+ alternatives.append(chars)
700
+ if set.strings.contains([]) { alternatives.append(RSeq([])) }
701
+ return RAlt(alternatives)
702
+ }
703
+
704
+ /// After `[`: the contents, the closing `]`, and the complement for `[^…]`.
705
+ private func parseSetContents() throws -> SetClass {
706
+ let negated = pos < p.count && p[pos] == u("^")
707
+ if negated { pos += 1 }
708
+ let set = try parseSetExpression()
709
+ if !negated { return set }
710
+ if !set.strings.isEmpty { throw error("Negated character class may contain strings") }
711
+ let test = set.test
712
+ return SetClass(test: { !test($0) }, strings: [])
713
+ }
714
+
715
+ private func operandSet(_ o: SetOperand) -> SetClass { o.set ?? SetClass(test: leaf(RSet().add(o.cp)), strings: []) }
716
+
717
+ private func parseSetExpression() throws -> SetClass {
718
+ if pos >= p.count { throw error("Unterminated character class") }
719
+ if p[pos] == u("]") { pos += 1; return SetClass(test: { _ in false }, strings: []) }
720
+ let first = try parseSetOperand()
721
+ if at("&&") || at("--") {
722
+ let intersect = at("&&")
723
+ var test = operandSet(first).test
724
+ var strings = operandSet(first).strings
725
+ while true {
726
+ if pos >= p.count { throw error("Unterminated character class") }
727
+ if p[pos] == u("]") { pos += 1; break }
728
+ if !at(intersect ? "&&" : "--") { throw error("Invalid set operation in character class") }
729
+ pos += 2
730
+ if intersect && pos < p.count && p[pos] == u("&") { throw error("Invalid character in character class") }
731
+ let next = operandSet(try parseSetOperand())
732
+ let a = test, b = next.test
733
+ if intersect {
734
+ test = { a($0) && b($0) }
735
+ strings = strings.intersection(next.strings)
736
+ } else {
737
+ test = { a($0) && !b($0) }
738
+ strings = strings.subtracting(next.strings)
739
+ }
740
+ }
741
+ return SetClass(test: test, strings: strings)
742
+ }
743
+ let singles = RSet()
744
+ var tests: [(Int) -> Bool] = []
745
+ var strings = Set<[UInt16]>()
746
+ var operand = first
747
+ while true {
748
+ if pos < p.count && p[pos] == u("-") && !at("--") {
749
+ pos += 1
750
+ let end = try parseSetOperand()
751
+ if operand.set != nil || end.set != nil { throw error("Invalid character class") }
752
+ if operand.cp > end.cp { throw error("Range out of order in character class") }
753
+ singles.add(operand.cp, end.cp)
754
+ } else if let set = operand.set {
755
+ tests.append(set.test)
756
+ strings.formUnion(set.strings)
757
+ } else { singles.add(operand.cp) }
758
+ if pos >= p.count { throw error("Unterminated character class") }
759
+ if p[pos] == u("]") { pos += 1; break }
760
+ if at("&&") || at("--") { throw error("Invalid set operation in character class") }
761
+ operand = try parseSetOperand()
762
+ }
763
+ let single = leaf(singles)
764
+ let all = tests
765
+ return SetClass(test: { c in single(c) || all.contains { $0(c) } }, strings: strings)
766
+ }
767
+
768
+ private func parseSetOperand() throws -> SetOperand {
769
+ if pos >= p.count { throw error("Unterminated character class") }
770
+ let c = p[pos]
771
+ if c == u("[") {
772
+ pos += 1
773
+ return SetOperand(cp: -1, set: try parseSetContents())
774
+ }
775
+ if c == u("\\") {
776
+ pos += 1
777
+ if pos >= p.count { throw error("\\ at end of pattern") }
778
+ let e = p[pos]
779
+ if let set = classEscapeSet(e) { pos += 1; return SetOperand(cp: -1, set: SetClass(test: leaf(set), strings: [])) }
780
+ if e == u("p") || e == u("P") { return SetOperand(cp: -1, set: SetClass(test: leaf(try parseProperty(e == u("P"))), strings: [])) }
781
+ if e == u("q") { return SetOperand(cp: -1, set: try parseStringDisjunction()) }
782
+ return SetOperand(cp: try parseSetCharacterEscape(), set: nil)
783
+ }
784
+ return SetOperand(cp: try parseSetCharacter(), set: nil)
785
+ }
786
+
787
+ /// A ClassSetCharacter that is not an escape.
788
+ private func parseSetCharacter() throws -> Int {
789
+ let c = p[pos]
790
+ if "()[]{}/-|".utf16.contains(c) { throw error("Invalid character in character class") }
791
+ if "&!#$%*+,.:;<=>?@^`~".utf16.contains(c) && pos + 1 < p.count && p[pos + 1] == c { throw error("Invalid set operation in character class") }
792
+ let cp = codePointAt(pos)
793
+ pos += charCount(cp)
794
+ return cp
795
+ }
796
+
797
+ /// After the backslash of an escaped ClassSetCharacter.
798
+ private func parseSetCharacterEscape() throws -> Int {
799
+ let e = p[pos]
800
+ if e == u("b") { pos += 1; return 8 }
801
+ if "&-!#%,:;<=>@`~".utf16.contains(e) { pos += 1; return Int(e) }
802
+ if isDigitUnit(e) {
803
+ if e == u("0") && !(pos + 1 < p.count && isDigitUnit(p[pos + 1])) { pos += 1; return 0 }
804
+ throw error("Invalid decimal escape")
805
+ }
806
+ return try parseCharacterEscape(true)
807
+ }
808
+
809
+ /// `\q{a|bc|…}` after the backslash.
810
+ private func parseStringDisjunction() throws -> SetClass {
811
+ pos += 1
812
+ if pos >= p.count || p[pos] != u("{") { throw error("Invalid escape") }
813
+ pos += 1
814
+ let singles = RSet()
815
+ var strings = Set<[UInt16]>()
816
+ var current: [UInt16] = []
817
+ func finish() {
818
+ let points = String(decoding: current, as: UTF16.self).unicodeScalars
819
+ if points.count == 1 { singles.add(Int(points.first!.value)) } else { strings.insert(current) }
820
+ current = []
821
+ }
822
+ func append(_ cp: Int) {
823
+ if cp > 0xFFFF { current += [UInt16(0xD800 + ((cp - 0x10000) >> 10)), UInt16(0xDC00 + ((cp - 0x10000) & 0x3FF))] } else { current.append(UInt16(cp)) }
824
+ }
825
+ while true {
826
+ if pos >= p.count { throw error("Unterminated character class") }
827
+ switch p[pos] {
828
+ case u("}"):
829
+ pos += 1
830
+ finish()
831
+ return SetClass(test: leaf(singles), strings: strings)
832
+ case u("|"):
833
+ pos += 1
834
+ finish()
835
+ case u("\\"):
836
+ pos += 1
837
+ if pos >= p.count { throw error("\\ at end of pattern") }
838
+ append(try parseSetCharacterEscape())
839
+ default: append(try parseSetCharacter())
840
+ }
841
+ }
842
+ }
843
+ }
844
+
845
+ /// `\p{…}` names: General_Category values, binary properties, and Script / Script_Extensions values.
846
+ enum UnicodeProperties {
847
+ private static func category(_ cp: Int) -> Unicode.GeneralCategory { scalar(cp)?.properties.generalCategory ?? .surrogate }
848
+ private static func types(_ t: Unicode.GeneralCategory...) -> (Int) -> Bool { { t.contains(category($0)) } }
849
+ private static func has(_ test: @escaping (Unicode.Scalar.Properties) -> Bool) -> (Int) -> Bool { { cp in scalar(cp).map { test($0.properties) } ?? false } }
850
+
851
+ private static let categories: [String: (Int) -> Bool] = {
852
+ var out: [String: (Int) -> Bool] = [:]
853
+ func def(_ test: @escaping (Int) -> Bool, _ names: String...) { for n in names { out[n] = test } }
854
+ def(types(.uppercaseLetter, .lowercaseLetter, .titlecaseLetter, .modifierLetter, .otherLetter), "L", "Letter")
855
+ def(types(.uppercaseLetter, .lowercaseLetter, .titlecaseLetter), "LC", "Cased_Letter")
856
+ def(types(.uppercaseLetter), "Lu", "Uppercase_Letter")
857
+ def(types(.lowercaseLetter), "Ll", "Lowercase_Letter")
858
+ def(types(.titlecaseLetter), "Lt", "Titlecase_Letter")
859
+ def(types(.modifierLetter), "Lm", "Modifier_Letter")
860
+ def(types(.otherLetter), "Lo", "Other_Letter")
861
+ def(types(.nonspacingMark, .spacingMark, .enclosingMark), "M", "Mark", "Combining_Mark")
862
+ def(types(.nonspacingMark), "Mn", "Nonspacing_Mark")
863
+ def(types(.spacingMark), "Mc", "Spacing_Mark")
864
+ def(types(.enclosingMark), "Me", "Enclosing_Mark")
865
+ def(types(.decimalNumber, .letterNumber, .otherNumber), "N", "Number")
866
+ def(types(.decimalNumber), "Nd", "Decimal_Number", "digit")
867
+ def(types(.letterNumber), "Nl", "Letter_Number")
868
+ def(types(.otherNumber), "No", "Other_Number")
869
+ def(types(.connectorPunctuation, .dashPunctuation, .openPunctuation, .closePunctuation, .initialPunctuation, .finalPunctuation, .otherPunctuation), "P", "Punctuation", "punct")
870
+ def(types(.connectorPunctuation), "Pc", "Connector_Punctuation")
871
+ def(types(.dashPunctuation), "Pd", "Dash_Punctuation")
872
+ def(types(.openPunctuation), "Ps", "Open_Punctuation")
873
+ def(types(.closePunctuation), "Pe", "Close_Punctuation")
874
+ def(types(.initialPunctuation), "Pi", "Initial_Punctuation")
875
+ def(types(.finalPunctuation), "Pf", "Final_Punctuation")
876
+ def(types(.otherPunctuation), "Po", "Other_Punctuation")
877
+ def(types(.mathSymbol, .currencySymbol, .modifierSymbol, .otherSymbol), "S", "Symbol")
878
+ def(types(.mathSymbol), "Sm", "Math_Symbol")
879
+ def(types(.currencySymbol), "Sc", "Currency_Symbol")
880
+ def(types(.modifierSymbol), "Sk", "Modifier_Symbol")
881
+ def(types(.otherSymbol), "So", "Other_Symbol")
882
+ def(types(.spaceSeparator, .lineSeparator, .paragraphSeparator), "Z", "Separator")
883
+ def(types(.spaceSeparator), "Zs", "Space_Separator")
884
+ def(types(.lineSeparator), "Zl", "Line_Separator")
885
+ def(types(.paragraphSeparator), "Zp", "Paragraph_Separator")
886
+ def(types(.control, .format, .surrogate, .privateUse, .unassigned), "C", "Other")
887
+ def(types(.control), "Cc", "Control", "cntrl")
888
+ def(types(.format), "Cf", "Format")
889
+ def(types(.surrogate), "Cs", "Surrogate")
890
+ def(types(.privateUse), "Co", "Private_Use")
891
+ def(types(.unassigned), "Cn", "Unassigned")
892
+ return out
893
+ }()
894
+
895
+ /// Extended_Pictographic as of Unicode 15 (Swift's scalar properties do not have it).
896
+ private static let pictographic: [Int] = [
897
+ 0xA9, 0xA9, 0xAE, 0xAE, 0x203C, 0x203C, 0x2049, 0x2049, 0x2122, 0x2122, 0x2139, 0x2139, 0x2194, 0x2199, 0x21A9, 0x21AA,
898
+ 0x231A, 0x231B, 0x2328, 0x2328, 0x2388, 0x2388, 0x23CF, 0x23CF, 0x23E9, 0x23F3, 0x23F8, 0x23FA, 0x24C2, 0x24C2,
899
+ 0x25AA, 0x25AB, 0x25B6, 0x25B6, 0x25C0, 0x25C0, 0x25FB, 0x25FE, 0x2600, 0x2605, 0x2607, 0x2612, 0x2614, 0x2685,
900
+ 0x2690, 0x2705, 0x2708, 0x2712, 0x2714, 0x2714, 0x2716, 0x2716, 0x271D, 0x271D, 0x2721, 0x2721, 0x2728, 0x2728,
901
+ 0x2733, 0x2734, 0x2744, 0x2744, 0x2747, 0x2747, 0x274C, 0x274C, 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757,
902
+ 0x2763, 0x2767, 0x2795, 0x2797, 0x27A1, 0x27A1, 0x27B0, 0x27B0, 0x27BF, 0x27BF, 0x2934, 0x2935, 0x2B05, 0x2B07,
903
+ 0x2B1B, 0x2B1C, 0x2B50, 0x2B50, 0x2B55, 0x2B55, 0x3030, 0x3030, 0x303D, 0x303D, 0x3297, 0x3297, 0x3299, 0x3299,
904
+ 0x1F000, 0x1F0FF, 0x1F10D, 0x1F10F, 0x1F12F, 0x1F12F, 0x1F16C, 0x1F171, 0x1F17E, 0x1F17F, 0x1F18E, 0x1F18E,
905
+ 0x1F191, 0x1F19A, 0x1F1AD, 0x1F1E5, 0x1F201, 0x1F20F, 0x1F21A, 0x1F21A, 0x1F22F, 0x1F22F, 0x1F232, 0x1F23A,
906
+ 0x1F23C, 0x1F23F, 0x1F249, 0x1F3FA, 0x1F400, 0x1F53D, 0x1F546, 0x1F64F, 0x1F680, 0x1F6FF, 0x1F774, 0x1F77F,
907
+ 0x1F7D5, 0x1F7FF, 0x1F80C, 0x1F80F, 0x1F848, 0x1F84F, 0x1F85A, 0x1F85F, 0x1F888, 0x1F88F, 0x1F8AE, 0x1F8FF,
908
+ 0x1F90C, 0x1F93A, 0x1F93C, 0x1F945, 0x1F947, 0x1FAFF, 0x1FC00, 0x1FFFD,
909
+ ]
910
+
911
+ private static func inRanges(_ ranges: [Int], _ cp: Int) -> Bool {
912
+ var i = 0
913
+ while i < ranges.count {
914
+ if cp < ranges[i] { return false }
915
+ if cp <= ranges[i + 1] { return true }
916
+ i += 2
917
+ }
918
+ return false
919
+ }
920
+
921
+ private static func isPictographic(_ cp: Int) -> Bool { inRanges(pictographic, cp) }
922
+
923
+ private static let binary: [String: (Int) -> Bool] = {
924
+ var out: [String: (Int) -> Bool] = [:]
925
+ func def(_ test: @escaping (Int) -> Bool, _ names: String...) { for n in names { out[n] = test } }
926
+ def({ _ in true }, "Any")
927
+ def({ $0 < 0x80 }, "ASCII")
928
+ def({ category($0) != .unassigned }, "Assigned")
929
+ def(has { $0.isAlphabetic }, "Alphabetic", "Alpha")
930
+ def(has { $0.isLowercase }, "Lowercase", "Lower")
931
+ def(has { $0.isUppercase }, "Uppercase", "Upper")
932
+ def(has { $0.isWhitespace }, "White_Space", "space")
933
+ def(has { $0.isIDStart }, "ID_Start", "IDS")
934
+ def(has { $0.isIDContinue }, "ID_Continue", "IDC")
935
+ def(has { $0.isXIDStart }, "XID_Start", "XIDS")
936
+ def(has { $0.isXIDContinue }, "XID_Continue", "XIDC")
937
+ def(has { $0.isIdeographic }, "Ideographic", "Ideo")
938
+ def(has { $0.isUnifiedIdeograph }, "Unified_Ideograph", "UIdeo")
939
+ def(has { $0.isASCIIHexDigit }, "ASCII_Hex_Digit", "AHex")
940
+ def(has { $0.isHexDigit }, "Hex_Digit", "Hex")
941
+ def(has { $0.isBidiMirrored }, "Bidi_Mirrored", "Bidi_M")
942
+ def(has { $0.isBidiControl }, "Bidi_Control", "Bidi_C")
943
+ def({ isPictographic($0) }, "Extended_Pictographic", "ExtPict")
944
+ def(has { $0.isEmoji }, "Emoji")
945
+ def(has { $0.isEmojiPresentation }, "Emoji_Presentation", "EPres")
946
+ def(has { $0.isEmojiModifier }, "Emoji_Modifier", "EMod")
947
+ def(has { $0.isEmojiModifierBase }, "Emoji_Modifier_Base", "EBase")
948
+ def({ $0 >= 0x1F1E6 && $0 <= 0x1F1FF }, "Regional_Indicator", "RI")
949
+ def(has { $0.isCaseIgnorable }, "Case_Ignorable", "CI")
950
+ def(has { $0.isCased }, "Cased")
951
+ def(has { $0.isDefaultIgnorableCodePoint }, "Default_Ignorable_Code_Point", "DI")
952
+ def(has { $0.changesWhenCaseFolded }, "Changes_When_Casefolded", "CWCF")
953
+ def(has { $0.changesWhenCaseMapped }, "Changes_When_Casemapped", "CWCM")
954
+ def(has { $0.changesWhenLowercased }, "Changes_When_Lowercased", "CWL")
955
+ def(has { $0.changesWhenUppercased }, "Changes_When_Uppercased", "CWU")
956
+ def(has { $0.changesWhenTitlecased }, "Changes_When_Titlecased", "CWT")
957
+ def(has { $0.changesWhenNFKCCaseFolded }, "Changes_When_NFKC_Casefolded", "CWKCF")
958
+ def(has { $0.isMath }, "Math")
959
+ def(has { $0.isDash }, "Dash")
960
+ def(has { $0.isDiacritic }, "Diacritic", "Dia")
961
+ def(has { $0.isExtender }, "Extender", "Ext")
962
+ def(has { $0.isJoinControl }, "Join_Control", "Join_C")
963
+ def(has { $0.isNoncharacterCodePoint }, "Noncharacter_Code_Point", "NChar")
964
+ def(has { $0.isPatternSyntax }, "Pattern_Syntax", "Pat_Syn")
965
+ def(has { $0.isPatternWhitespace }, "Pattern_White_Space", "Pat_WS")
966
+ def(has { $0.isQuotationMark }, "Quotation_Mark", "QMark")
967
+ def(has { $0.isRadical }, "Radical")
968
+ def(has { $0.isSentenceTerminal }, "Sentence_Terminal", "STerm")
969
+ def(has { $0.isSoftDotted }, "Soft_Dotted", "SD")
970
+ def(has { $0.isTerminalPunctuation }, "Terminal_Punctuation", "Term")
971
+ def(has { $0.isVariationSelector }, "Variation_Selector", "VS")
972
+ def(has { $0.isGraphemeBase }, "Grapheme_Base", "Gr_Base")
973
+ def(has { $0.isGraphemeExtend }, "Grapheme_Extend", "Gr_Ext")
974
+ def(has { $0.isIDSBinaryOperator }, "IDS_Binary_Operator", "IDSB")
975
+ def(has { $0.isIDSTrinaryOperator }, "IDS_Trinary_Operator", "IDST")
976
+ def(has { $0.isLogicalOrderException }, "Logical_Order_Exception", "LOE")
977
+ def(has { $0.isDeprecated }, "Deprecated", "Dep")
978
+ return out
979
+ }()
980
+
981
+ /// Every scalar in order, as UTF-16, for ICU to report a script's ranges: Swift's scalar properties have no script.
982
+ private static let everyScalar: NSString = {
983
+ var units: [UInt16] = []
984
+ units.reserveCapacity(0x10000 - 0x800 + 2 * 0x100000)
985
+ for c in 0..<0x10000 where !isSurrogateCode(c) { units.append(UInt16(c)) }
986
+ for c in 0x10000...0x10FFFF { units += [UInt16(0xD800 + ((c - 0x10000) >> 10)), UInt16(0xDC00 + ((c - 0x10000) & 0x3FF))] }
987
+ return NSString(characters: units, length: units.count)
988
+ }()
989
+
990
+ private static var scripts: [String: [Int]] = [:]
991
+
992
+ private static func codePoint(at offset: Int) -> Int {
993
+ offset < 0xD800 ? offset : offset < 0xF800 ? offset + 0x800 : 0x10000 + (offset - 0xF800) / 2
994
+ }
995
+
996
+ /// A script's code points, as ICU's `\p{sc=…}` (or `\p{scx=…}`) has them, for a name spelled as JavaScript
997
+ /// spells it: its canonical name or its four-letter alias.
998
+ private static func script(_ name: String, extensions: Bool) -> ((Int) -> Bool)? {
999
+ guard let first = name.unicodeScalars.first, ("A"..."Z").contains(first) else { return nil }
1000
+ let words = name.split(separator: "_", omittingEmptySubsequences: false)
1001
+ guard name.count == 4 || words.allSatisfy({ w in w.first.map { ("A"..."Z").contains($0) } == true && w.dropFirst().allSatisfy { ("a"..."z").contains($0) } }) else { return nil }
1002
+ let key = (extensions ? "scx=" : "sc=") + name
1003
+ if scripts[key] == nil {
1004
+ guard let re = try? NSRegularExpression(pattern: "\\p{\(extensions ? "Script_Extensions" : "Script")=\(name)}+") else { return nil }
1005
+ var ranges: [Int] = []
1006
+ for m in re.matches(in: everyScalar as String, range: NSRange(location: 0, length: everyScalar.length)) {
1007
+ ranges += [codePoint(at: m.range.location), codePoint(at: m.range.location + m.range.length - 1)]
1008
+ }
1009
+ scripts[key] = ranges
1010
+ }
1011
+ let ranges = scripts[key]!
1012
+ return { inRanges(ranges, $0) }
1013
+ }
1014
+
1015
+ static func lookup(_ text: String) -> ((Int) -> Bool)? {
1016
+ guard let eq = text.firstIndex(of: "=") else { return categories[text] ?? binary[text] }
1017
+ let key = String(text[..<eq])
1018
+ let value = String(text[text.index(after: eq)...])
1019
+ switch key {
1020
+ case "General_Category", "gc": return categories[value]
1021
+ case "Script", "sc": return script(value, extensions: false)
1022
+ case "Script_Extensions", "scx": return script(value, extensions: true)
1023
+ default: return nil
1024
+ }
1025
+ }
1026
+ }
1027
+
1028
+ // Matching
1029
+ //
1030
+ // A pattern compiles to a bytecode program run by a backtracking VM. Choice points, and the undo records that put
1031
+ // captures and loop registers back, live on one stack of words: a step allocates nothing, and a match's depth is
1032
+ // bounded by `maxStack`, not by the thread's stack. The semantics are §22.2.2's: RepeatMatcher's capture resets and
1033
+ // empty-iteration check, a group set when its body completes, atomic lookarounds, lookbehind read right to left.
1034
+
1035
+ // The VM's instructions; each is its opcode and the operands listed.
1036
+ /// code point, forward
1037
+ private let OP_CHAR = 0
1038
+ /// class, forward
1039
+ private let OP_CLASS = 1
1040
+ /// literal (a run of BMP code units compared case-sensitively, forward)
1041
+ private let OP_LITERAL = 2
1042
+ /// kind (^ $ \b \B), multiline, word extras
1043
+ private let OP_ASSERT = 3
1044
+ /// preferred, other: goes on at `preferred`, backtracking to `other`
1045
+ private let OP_SPLIT = 4
1046
+ /// target
1047
+ private let OP_JUMP = 5
1048
+ /// group: notes where its text starts
1049
+ private let OP_GROUP_OPEN = 6
1050
+ /// group, forward: sets its capture
1051
+ private let OP_GROUP_CLOSE = 7
1052
+ /// register
1053
+ private let OP_LOOP_INIT = 8
1054
+ /// register, min, max, greedy, exit; LOOP_BODY follows
1055
+ private let OP_LOOP_HEAD = 9
1056
+ /// register, first capture slot reset, end of them
1057
+ private let OP_LOOP_BODY = 10
1058
+ /// register, head, min
1059
+ private let OP_LOOP_TAIL = 11
1060
+ /// class, min, max, greedy, forward: a quantified single character, without a loop
1061
+ private let OP_REPEAT = 12
1062
+ /// groups, ignore case, forward
1063
+ private let OP_BACKREF = 13
1064
+ /// negative, continuation; the body follows, ending in SUCCEED
1065
+ private let OP_LOOK = 14
1066
+ private let OP_SUCCEED = 15
1067
+
1068
+ private let ASSERT_START = 0
1069
+ private let ASSERT_END = 1
1070
+ private let ASSERT_BOUNDARY = 2
1071
+ private let ASSERT_NOT_BOUNDARY = 3
1072
+
1073
+ // Backtrack stack entries: their values, then the tag on top.
1074
+ /// pc, position: where to go on when what follows fails
1075
+ private let T_CHOICE = 0
1076
+ /// slot, old value
1077
+ private let T_UNDO = 1
1078
+ /// REPEAT op, least position, position: a greedy run giving back one character at a time
1079
+ private let T_GREEDY = 2
1080
+ /// REPEAT op, position, count: a lazy run taking one more character at a time
1081
+ private let T_LAZY = 3
1082
+
1083
+ /// How many of a match's first code units the search checks before an attempt.
1084
+ private let LEAD_LIMIT = 8
1085
+
1086
+ /// A greedy REPEAT whose run is never given back (RegexCompiler.followers).
1087
+ private let POSSESSIVE = -2
1088
+
1089
+ /// A character test with the answers for ASCII in a bitmap; `rest` answers for the others, none when nil.
1090
+ final class CharClass {
1091
+ nonisolated deinit {}
1092
+ private let low: UInt64, high: UInt64
1093
+ private let rest: ((Int) -> Bool)?
1094
+
1095
+ init(_ low: UInt64, _ high: UInt64, _ rest: ((Int) -> Bool)?) {
1096
+ self.low = low
1097
+ self.high = high
1098
+ self.rest = rest
1099
+ }
1100
+
1101
+ @inline(__always) func has(_ c: Int) -> Bool {
1102
+ if c < 128 { return ((c < 64 ? low >> UInt64(c) : high >> UInt64(c - 64)) & 1) != 0 }
1103
+ guard let rest else { return false }
1104
+ return rest(c)
1105
+ }
1106
+
1107
+ func union(_ other: CharClass) -> CharClass {
1108
+ let a = rest, b = other.rest
1109
+ return CharClass(low | other.low, high | other.high, a == nil ? b : b == nil ? a : { a!($0) || b!($0) })
1110
+ }
1111
+
1112
+ /// `test` as a class; `rest` must answer as `test` does from 128 on.
1113
+ static func of(_ test: (Int) -> Bool, _ rest: ((Int) -> Bool)?) -> CharClass {
1114
+ var low: UInt64 = 0, high: UInt64 = 0
1115
+ for c in 0..<64 where test(c) { low |= 1 << UInt64(c) }
1116
+ for c in 64..<128 where test(c) { high |= 1 << UInt64(c - 64) }
1117
+ return CharClass(low, high, rest)
1118
+ }
1119
+ }
1120
+
1121
+ /// Where the character read forward at `x` (before the end) ends: past a surrogate pair in unicode mode.
1122
+ @inline(__always) private func endAfter(_ s: UnsafeBufferPointer<UInt16>, _ x: Int, _ unicode: Bool) -> Int {
1123
+ unicode && isLeadUnit(s[x]) && x + 1 < s.count && isTrailUnit(s[x + 1]) ? x + 2 : x + 1
1124
+ }
1125
+
1126
+ /// Where the character read backward from `x` (after the start) starts.
1127
+ @inline(__always) private func startBefore(_ s: UnsafeBufferPointer<UInt16>, _ x: Int, _ unicode: Bool) -> Int {
1128
+ unicode && isTrailUnit(s[x - 1]) && x >= 2 && isLeadUnit(s[x - 2]) ? x - 2 : x - 1
1129
+ }
1130
+
1131
+ /// Whether `x` falls between the halves of a surrogate pair. As V8 reads `u`-mode patterns, a character read there
1132
+ /// fails (it desugars a lone surrogate to one not paired), so only what reads no character matches at such a position.
1133
+ @inline(__always) private func splitsPair(_ s: UnsafeBufferPointer<UInt16>, _ x: Int) -> Bool {
1134
+ x > 0 && x < s.count && isTrailUnit(s[x]) && isLeadUnit(s[x - 1])
1135
+ }
1136
+
1137
+ /// The character from `a` to `b`: one code unit or a surrogate pair.
1138
+ @inline(__always) private func pointIn(_ s: UnsafeBufferPointer<UInt16>, _ a: Int, _ b: Int) -> Int {
1139
+ b - a == 2 ? 0x10000 + ((Int(s[a]) - 0xD800) << 10) + (Int(s[a + 1]) - 0xDC00) : Int(s[a])
1140
+ }
1141
+
1142
+ @inline(__always) private func isWordAt(_ s: UnsafeBufferPointer<UInt16>, _ i: Int, _ extras: Bool) -> Bool {
1143
+ if i < 0 || i >= s.count { return false }
1144
+ let c = Int(s[i])
1145
+ return isBasicWordChar(c) || (extras && (c == 0x17F || c == 0x212A))
1146
+ }
1147
+
1148
+ /// Words that live as long as this object does.
1149
+ nonisolated final class RegexWords {
1150
+ let base: UnsafeMutablePointer<Int>
1151
+
1152
+ init(_ values: [Int]) {
1153
+ base = .allocate(capacity: max(1, values.count))
1154
+ base.initialize(from: values, count: values.count)
1155
+ }
1156
+
1157
+ deinit { base.deallocate() }
1158
+ }
1159
+
1160
+ /// A compiled pattern: immutable, so expressions with the same source and flags share it.
1161
+ final class RegexProgram {
1162
+ let groupCount: Int
1163
+ let groupNames: [(String, Int)]
1164
+ let unicode: Bool
1165
+ let code: UnsafeMutablePointer<Int>
1166
+ let codeCount: Int
1167
+ let classes: [CharClass]
1168
+ let literals: [[UInt16]]
1169
+ let references: [[Int]]
1170
+ /// Per REPEAT instruction, the code unit what follows it reads first (see RegexCompiler.followers).
1171
+ let followers: UnsafeMutablePointer<Int>
1172
+ /// Owns `code` and `followers`.
1173
+ private let words: RegexWords
1174
+ /// Captures (start and end per group), then where each open group started, then two registers per loop.
1175
+ let slotCount: Int
1176
+
1177
+ /// Text every match starts with, else empty.
1178
+ private let prefix: [UInt16]
1179
+ /// What the first character of every match satisfies, when the pattern cannot match empty.
1180
+ private let first: CharClass?
1181
+ /// Outside unicode mode, what each of the first code units of every match satisfies, when more than one is known.
1182
+ private let lead: [CharClass]?
1183
+ /// The class of an unbounded greedy run every match starts with (`\w+@…`), where no backreference reads where a
1184
+ /// match started. An attempt from inside the run of a failed one explores a subset of its continuations, so the
1185
+ /// search goes on where that run ends.
1186
+ private let leadingRun: CharClass?
1187
+
1188
+ init(_ root: RNode, _ groupCount: Int, _ groupNames: [(String, Int)], _ unicode: Bool) {
1189
+ self.groupCount = groupCount
1190
+ self.groupNames = groupNames
1191
+ self.unicode = unicode
1192
+ let c = RegexCompiler(groupCount, unicode)
1193
+ c.compile(root, true)
1194
+ c.emit(OP_SUCCEED)
1195
+ codeCount = c.code.count
1196
+ let f = c.followers()
1197
+ words = RegexWords(c.code + f)
1198
+ code = words.base
1199
+ followers = words.base + codeCount
1200
+ classes = c.classes
1201
+ literals = c.literals
1202
+ references = c.references
1203
+ slotCount = c.slotCount
1204
+ let prefix = RegexProgram.prefixOf(root)
1205
+ self.prefix = prefix
1206
+ first = prefix.isEmpty ? c.firstOf(root) : nil
1207
+ if prefix.isEmpty && !unicode, case let l = c.leadOf(root).0, l.count > 1 { lead = l } else { lead = nil }
1208
+ leadingRun = c.references.isEmpty ? RegexProgram.leadingRunOf(root).flatMap { c.firstOf($0.body) } : nil
1209
+ }
1210
+
1211
+ nonisolated deinit {}
1212
+
1213
+ private static func leadingRunOf(_ n: RNode) -> RRepeat? {
1214
+ switch n {
1215
+ case let r as RRepeat: return (r.body is RChar || r.body is RClass) && r.groupCount == 0 && r.greedy && r.min >= 1 && r.max == INFINITE ? r : nil
1216
+ case let g as RGroup: return leadingRunOf(g.body)
1217
+ case let s as RSeq: return s.items.first.flatMap { leadingRunOf($0) }
1218
+ default: return nil
1219
+ }
1220
+ }
1221
+
1222
+ /// Where to try after a failed attempt at `start`.
1223
+ func nextStart(_ s: UnsafeBufferPointer<UInt16>, _ start: Int) -> Int {
1224
+ guard let run = leadingRun else { return start + 1 }
1225
+ var x = start
1226
+ while x < s.count && !(unicode && splitsPair(s, x)) {
1227
+ let e = endAfter(s, x, unicode)
1228
+ if !run.has(pointIn(s, x, e)) { break }
1229
+ x = e
1230
+ }
1231
+ return x > start ? x : start + 1
1232
+ }
1233
+
1234
+ private static func literal(_ n: RNode) -> UInt16? {
1235
+ guard let c = n as? RChar, !c.ignoreCase, c.cp <= 0xFFFF, !isSurrogateCode(c.cp) else { return nil }
1236
+ return UInt16(c.cp)
1237
+ }
1238
+
1239
+ private static func prefixOf(_ n: RNode) -> [UInt16] {
1240
+ switch n {
1241
+ case is RChar: return literal(n).map { [$0] } ?? []
1242
+ case let g as RGroup: return prefixOf(g.body)
1243
+ case let r as RRepeat: return r.min > 0 ? prefixOf(r.body) : []
1244
+ case let s as RSeq:
1245
+ var out: [UInt16] = []
1246
+ for item in s.items {
1247
+ if let c = literal(item) { out.append(c) } else {
1248
+ if out.isEmpty { out = prefixOf(item) }
1249
+ break
1250
+ }
1251
+ }
1252
+ return out
1253
+ default: return []
1254
+ }
1255
+ }
1256
+
1257
+ /// The first position at or after `from` where a match may start, among those the search visits; -1 when none.
1258
+ func candidate(_ s: UnsafeBufferPointer<UInt16>, _ from: Int) -> Int {
1259
+ let n = s.count
1260
+ if !prefix.isEmpty {
1261
+ let c0 = prefix[0], k = prefix.count
1262
+ var x = from
1263
+ while x + k <= n {
1264
+ if s[x] == c0 {
1265
+ var j = 1
1266
+ while j < k && s[x + j] == prefix[j] { j += 1 }
1267
+ if j == k { return x }
1268
+ }
1269
+ x += 1
1270
+ }
1271
+ return -1
1272
+ }
1273
+ if let lead {
1274
+ let f = lead[0]
1275
+ var x = from
1276
+ while x < n {
1277
+ if f.has(Int(s[x])) {
1278
+ var j = 1
1279
+ while j < lead.count && x + j < n && lead[j].has(Int(s[x + j])) { j += 1 }
1280
+ if j == lead.count { return x }
1281
+ // No later position leaves room for the lead either.
1282
+ if x + j >= n { return -1 }
1283
+ }
1284
+ x += 1
1285
+ }
1286
+ return -1
1287
+ }
1288
+ guard let f = first else { return from }
1289
+ var x = from
1290
+ if !unicode {
1291
+ while x < n {
1292
+ if f.has(Int(s[x])) { return x }
1293
+ x += 1
1294
+ }
1295
+ return -1
1296
+ }
1297
+ while x < n {
1298
+ let e = endAfter(s, x, true)
1299
+ if f.has(pointIn(s, x, e)) { return x }
1300
+ x = e
1301
+ }
1302
+ return -1
1303
+ }
1304
+ }
1305
+
1306
+ final class RegexCompiler {
1307
+ nonisolated deinit {}
1308
+ var code: [Int] = []
1309
+ var classes: [CharClass] = []
1310
+ var literals: [[UInt16]] = []
1311
+ var references: [[Int]] = []
1312
+ private let groupStarts: Int
1313
+ var slotCount: Int
1314
+ let unicode: Bool
1315
+
1316
+ init(_ groupCount: Int, _ unicode: Bool) {
1317
+ groupStarts = 2 * (groupCount + 1)
1318
+ slotCount = 3 * (groupCount + 1)
1319
+ self.unicode = unicode
1320
+ }
1321
+
1322
+ @discardableResult func emit(_ words: Int...) -> Int {
1323
+ let at = code.count
1324
+ code += words
1325
+ return at
1326
+ }
1327
+
1328
+ private func charTest(_ n: RNode) -> (Int) -> Bool {
1329
+ let u = unicode
1330
+ if let c = n as? RChar {
1331
+ let cp = c.cp
1332
+ if !c.ignoreCase { return { $0 == cp } }
1333
+ let canon = CaseFolding.canonicalize(cp, u)
1334
+ return { $0 == cp || CaseFolding.canonicalize($0, u) == canon }
1335
+ }
1336
+ let k = n as! RClass
1337
+ let set = k.set, negated = k.negated
1338
+ if !k.ignoreCase { return { set.contains($0) != negated } }
1339
+ return { caseClosedContains(set, $0, u) != negated }
1340
+ }
1341
+
1342
+ /// `n` (a character or class) as a class, deciding characters past ASCII without `test` where the set allows.
1343
+ private func classOf(_ n: RNode) -> CharClass {
1344
+ let test = charTest(n)
1345
+ let rest: ((Int) -> Bool)?
1346
+ if let c = n as? RChar, !c.ignoreCase { rest = c.cp < 128 ? nil : test }
1347
+ else if let k = n as? RClass, !k.ignoreCase, k.set.predicates.isEmpty, k.set.ranges.allSatisfy({ $0.1 < 128 }) { rest = k.negated ? { _ in true } : nil }
1348
+ else { rest = test }
1349
+ return CharClass.of(test, rest)
1350
+ }
1351
+
1352
+ private func classIndex(_ n: RNode) -> Int {
1353
+ classes.append(classOf(n))
1354
+ return classes.count - 1
1355
+ }
1356
+
1357
+ /// What the first character of any match of `n` satisfies; nil when `n` can match empty or that is not known.
1358
+ func firstOf(_ n: RNode) -> CharClass? {
1359
+ switch n {
1360
+ case is RChar, is RClass: return classOf(n)
1361
+ case let g as RGroup: return firstOf(g.body)
1362
+ case let r as RRepeat: return r.min > 0 ? firstOf(r.body) : nil
1363
+ case let a as RAlt:
1364
+ var acc: CharClass?
1365
+ for alt in a.alternatives {
1366
+ guard let f = firstOf(alt) else { return nil }
1367
+ acc = acc?.union(f) ?? f
1368
+ }
1369
+ return acc
1370
+ // Assertions and lookarounds consume nothing: the first character is the next item's.
1371
+ case let s as RSeq: return s.items.first(where: { !($0 is RAssertion) && !($0 is RLook) }).flatMap { firstOf($0) }
1372
+ default: return nil
1373
+ }
1374
+ }
1375
+
1376
+ /// For each forward greedy REPEAT, the BMP code unit the instruction after it must read first, else -1: giving
1377
+ /// characters back stops only where that unit is, since anywhere else that instruction fails at once (a group's
1378
+ /// opening or closing between them only writes what that failure undoes). Where the repeated class excludes that
1379
+ /// unit, no character given back can be it, and the value is POSSESSIVE.
1380
+ func followers() -> [Int] {
1381
+ var out = [Int](repeating: -1, count: code.count)
1382
+ var pc = 0
1383
+ while pc < code.count {
1384
+ let op = code[pc]
1385
+ if op == OP_REPEAT && code[pc + 4] != 0 && code[pc + 5] != 0 {
1386
+ var next = pc + 6
1387
+ while next < code.count && (code[next] == OP_GROUP_CLOSE || code[next] == OP_GROUP_OPEN) { next += width(code[next]) }
1388
+ var unit = -1
1389
+ if next < code.count {
1390
+ if code[next] == OP_CHAR { unit = code[next + 2] != 0 && code[next + 1] <= 0xFFFF && !isSurrogateCode(code[next + 1]) ? code[next + 1] : -1 }
1391
+ else if code[next] == OP_LITERAL { unit = Int(literals[code[next + 1]][0]) }
1392
+ }
1393
+ out[pc] = unit >= 0 && !classes[code[pc + 1]].has(unit) ? POSSESSIVE : unit
1394
+ }
1395
+ pc += width(op)
1396
+ }
1397
+ return out
1398
+ }
1399
+
1400
+ private func width(_ op: Int) -> Int {
1401
+ switch op {
1402
+ case OP_SUCCEED: return 1
1403
+ case OP_LITERAL, OP_JUMP, OP_GROUP_OPEN, OP_LOOP_INIT: return 2
1404
+ case OP_CHAR, OP_CLASS, OP_SPLIT, OP_GROUP_CLOSE, OP_LOOK: return 3
1405
+ case OP_ASSERT, OP_LOOP_BODY, OP_LOOP_TAIL, OP_BACKREF: return 4
1406
+ default: return 6
1407
+ }
1408
+ }
1409
+
1410
+ /// Outside unicode mode, the classes of the first code units of every match of `n` (at most LEAD_LIMIT), and
1411
+ /// whether they are all of it: then what follows `n` goes on after them.
1412
+ func leadOf(_ n: RNode) -> ([CharClass], Bool) {
1413
+ switch n {
1414
+ case is RChar, is RClass: return ([classOf(n)], true)
1415
+ case let g as RGroup: return leadOf(g.body)
1416
+ case is RAssertion, is RLook: return ([], true)
1417
+ case let r as RRepeat:
1418
+ if (r.body is RChar || r.body is RClass) && r.min > 0 {
1419
+ let cls = classOf(r.body)
1420
+ return ([CharClass](repeating: cls, count: min(r.min, LEAD_LIMIT)), r.min == r.max && r.min <= LEAD_LIMIT)
1421
+ }
1422
+ return r.min > 0 ? (leadOf(r.body).0, false) : ([], false)
1423
+ case let s as RSeq:
1424
+ var out: [CharClass] = []
1425
+ var whole = true
1426
+ for item in s.items {
1427
+ let (classes, complete) = leadOf(item)
1428
+ out += classes
1429
+ if !complete || out.count >= LEAD_LIMIT {
1430
+ whole = complete
1431
+ break
1432
+ }
1433
+ }
1434
+ return (Array(out.prefix(LEAD_LIMIT)), whole && out.count <= LEAD_LIMIT)
1435
+ default: return ([], false)
1436
+ }
1437
+ }
1438
+
1439
+ private func isLiteral(_ n: RNode) -> Bool {
1440
+ guard let c = n as? RChar else { return false }
1441
+ return !c.ignoreCase && c.cp <= 0xFFFF && !isSurrogateCode(c.cp)
1442
+ }
1443
+
1444
+ func compile(_ n: RNode, _ forward: Bool) {
1445
+ let f = forward ? 1 : 0
1446
+ switch n {
1447
+ case let c as RChar:
1448
+ if c.ignoreCase { emit(OP_CLASS, classIndex(n), f) } else { emit(OP_CHAR, c.cp, f) }
1449
+ case is RClass: emit(OP_CLASS, classIndex(n), f)
1450
+ case let s as RSeq:
1451
+ if !forward {
1452
+ for item in s.items.reversed() { compile(item, false) }
1453
+ return
1454
+ }
1455
+ var i = 0
1456
+ while i < s.items.count {
1457
+ var j = i
1458
+ while j < s.items.count && isLiteral(s.items[j]) { j += 1 }
1459
+ if j - i >= 2 {
1460
+ literals.append(s.items[i..<j].map { UInt16(($0 as! RChar).cp) })
1461
+ emit(OP_LITERAL, literals.count - 1)
1462
+ i = j
1463
+ } else {
1464
+ compile(s.items[i], true)
1465
+ i += 1
1466
+ }
1467
+ }
1468
+ case let a as RAlt:
1469
+ var ends: [Int] = []
1470
+ for k in 0..<(a.alternatives.count - 1) {
1471
+ let split = emit(OP_SPLIT, 0, 0)
1472
+ code[split + 1] = code.count
1473
+ compile(a.alternatives[k], forward)
1474
+ ends.append(emit(OP_JUMP, 0))
1475
+ code[split + 2] = code.count
1476
+ }
1477
+ compile(a.alternatives[a.alternatives.count - 1], forward)
1478
+ for e in ends { code[e + 1] = code.count }
1479
+ case let a as RAssertion:
1480
+ let kind = a.kind == UInt16(ascii: "^") ? ASSERT_START : a.kind == UInt16(ascii: "$") ? ASSERT_END : a.kind == UInt16(ascii: "b") ? ASSERT_BOUNDARY : ASSERT_NOT_BOUNDARY
1481
+ emit(OP_ASSERT, kind, a.multiline ? 1 : 0, a.wordExtras ? 1 : 0)
1482
+ case let g as RGroup:
1483
+ emit(OP_GROUP_OPEN, groupStarts + g.index)
1484
+ compile(g.body, forward)
1485
+ emit(OP_GROUP_CLOSE, g.index, f)
1486
+ case let l as RLook:
1487
+ let look = emit(OP_LOOK, l.negative ? 1 : 0, 0)
1488
+ compile(l.body, l.ahead)
1489
+ emit(OP_SUCCEED)
1490
+ code[look + 2] = code.count
1491
+ case let b as RBackReference:
1492
+ references.append(b.groups)
1493
+ emit(OP_BACKREF, references.count - 1, b.ignoreCase ? 1 : 0, f)
1494
+ case let r as RRepeat:
1495
+ if r.max == 0 { return }
1496
+ if (r.body is RChar || r.body is RClass) && r.groupCount == 0 {
1497
+ emit(OP_REPEAT, classIndex(r.body), r.min, r.max, r.greedy ? 1 : 0, f)
1498
+ return
1499
+ }
1500
+ let register = slotCount
1501
+ slotCount += 2
1502
+ emit(OP_LOOP_INIT, register)
1503
+ let head = emit(OP_LOOP_HEAD, register, r.min, r.max, r.greedy ? 1 : 0, 0)
1504
+ emit(OP_LOOP_BODY, register, 2 * (r.firstGroup + 1), 2 * (r.firstGroup + r.groupCount + 1))
1505
+ compile(r.body, forward)
1506
+ emit(OP_LOOP_TAIL, register, head, r.min)
1507
+ code[head + 5] = code.count
1508
+ default: break
1509
+ }
1510
+ }
1511
+ }
1512
+
1513
+ private extension UInt16 {
1514
+ init(ascii c: Unicode.Scalar) { self = UInt16(c.value) }
1515
+ }
1516
+
1517
+ /// A match that needs more backtracking than the VM's stack holds.
1518
+ struct RegexStackOverflow: Error {}
1519
+
1520
+ /// The VM's state: one for the script thread, which a match never re-enters, since it runs no script. It lives as
1521
+ /// long as the program does, so its buffers are never freed.
1522
+ final class RegexVM {
1523
+ private var slots: UnsafeMutablePointer<Int>
1524
+ private var slotCapacity = 16
1525
+ private var stack: UnsafeMutablePointer<Int>
1526
+ private var stackCapacity = RegexVM.initialStack
1527
+ private var top = 0
1528
+ private var kept: [Int] = []
1529
+ private var program: RegexProgram!
1530
+ private var input = UnsafeBufferPointer<UInt16>(start: nil, count: 0)
1531
+
1532
+ private static let initialStack = 256
1533
+ /// A stack grown past this by one long match is let go after it rather than kept.
1534
+ private static let retainedStack = 1 << 16
1535
+ /// The most entries a match may hold: one that needs more is a RangeError, as in V8, whose backtrack stack
1536
+ /// stops at 64 MB. Kept equal to kit-android's, so a pattern overflows at the same depth on both.
1537
+ private static let maxStack = 1 << 24
1538
+
1539
+ init() {
1540
+ slots = .allocate(capacity: slotCapacity)
1541
+ stack = .allocate(capacity: stackCapacity)
1542
+ }
1543
+
1544
+ nonisolated deinit {}
1545
+
1546
+ /// The capture slots of the first match at or after `from` (exactly there when `sticky`), or nil.
1547
+ func search(_ p: RegexProgram, _ s: UnsafeBufferPointer<UInt16>, _ from: Int, _ sticky: Bool) throws(RegexStackOverflow) -> [Int]? {
1548
+ if slotCapacity < p.slotCount {
1549
+ slots.deallocate()
1550
+ slotCapacity = p.slotCount
1551
+ slots = .allocate(capacity: slotCapacity)
1552
+ }
1553
+ slots.update(repeating: -1, count: p.slotCount)
1554
+ program = p
1555
+ input = s
1556
+ top = 0
1557
+ defer {
1558
+ if stackCapacity > RegexVM.retainedStack {
1559
+ stack.deallocate()
1560
+ stackCapacity = RegexVM.initialStack
1561
+ stack = .allocate(capacity: stackCapacity)
1562
+ }
1563
+ program = nil
1564
+ input = UnsafeBufferPointer(start: nil, count: 0)
1565
+ }
1566
+ var start = from
1567
+ while start <= s.count {
1568
+ if !sticky {
1569
+ start = p.candidate(s, start)
1570
+ if start < 0 { return nil }
1571
+ }
1572
+ // A failed attempt unwinds every write it made, so the slots are all unset again for the next.
1573
+ let end = try run(0, start, 0)
1574
+ if end >= 0 {
1575
+ var captures = Array(UnsafeBufferPointer(start: slots, count: 2 * (p.groupCount + 1)))
1576
+ captures[0] = start
1577
+ captures[1] = end
1578
+ return captures
1579
+ }
1580
+ if sticky { return nil }
1581
+ // Past a leading run, else one code unit on: in `u` mode too, as V8 tries the positions inside a pair (see splitsPair).
1582
+ start = p.nextStart(s, start)
1583
+ }
1584
+ return nil
1585
+ }
1586
+
1587
+ private func grow(_ needed: Int) throws(RegexStackOverflow) {
1588
+ if needed > RegexVM.maxStack { throw RegexStackOverflow() }
1589
+ var capacity = stackCapacity * 2
1590
+ while capacity < needed { capacity *= 2 }
1591
+ let bigger = UnsafeMutablePointer<Int>.allocate(capacity: capacity)
1592
+ bigger.moveInitialize(from: stack, count: top)
1593
+ stack.deallocate()
1594
+ stack = bigger
1595
+ stackCapacity = capacity
1596
+ }
1597
+
1598
+ @inline(__always) private func push(_ a: Int, _ b: Int, _ tag: Int) throws(RegexStackOverflow) {
1599
+ if top + 3 > stackCapacity { try grow(top + 3) }
1600
+ stack[top] = a
1601
+ stack[top + 1] = b
1602
+ stack[top + 2] = tag
1603
+ top += 3
1604
+ }
1605
+
1606
+ @inline(__always) private func push(_ a: Int, _ b: Int, _ c: Int, _ tag: Int) throws(RegexStackOverflow) {
1607
+ if top + 4 > stackCapacity { try grow(top + 4) }
1608
+ stack[top] = a
1609
+ stack[top + 1] = b
1610
+ stack[top + 2] = c
1611
+ stack[top + 3] = tag
1612
+ top += 4
1613
+ }
1614
+
1615
+ /// Writes a slot, recording the old value for backtracking; a write that changes nothing records nothing.
1616
+ @inline(__always) private func set(_ slot: Int, _ value: Int) throws(RegexStackOverflow) {
1617
+ let old = slots[slot]
1618
+ if old == value { return }
1619
+ try push(slot, old, T_UNDO)
1620
+ slots[slot] = value
1621
+ }
1622
+
1623
+ @inline(__always) private func entrySize(_ tag: Int) -> Int { tag >= T_GREEDY ? 4 : 3 }
1624
+
1625
+ /// Drops the entries above `floor`, undoing their writes.
1626
+ private func unwind(_ floor: Int) {
1627
+ while top > floor {
1628
+ let tag = stack[top - 1]
1629
+ if tag == T_UNDO { slots[stack[top - 3]] = stack[top - 2] }
1630
+ top -= entrySize(tag)
1631
+ }
1632
+ }
1633
+
1634
+ /// Drops the choice points above `floor` and keeps the undo records, in order: a lookaround's body is atomic.
1635
+ private func keepUndos(_ floor: Int) throws(RegexStackOverflow) {
1636
+ kept.removeAll(keepingCapacity: true)
1637
+ var t = top
1638
+ while t > floor {
1639
+ let tag = stack[t - 1]
1640
+ if tag == T_UNDO {
1641
+ kept.append(stack[t - 3])
1642
+ kept.append(stack[t - 2])
1643
+ }
1644
+ t -= entrySize(tag)
1645
+ }
1646
+ top = floor
1647
+ var i = kept.count - 2
1648
+ while i >= 0 {
1649
+ try push(kept[i], kept[i + 1], T_UNDO)
1650
+ i -= 2
1651
+ }
1652
+ }
1653
+
1654
+ /// Runs from `startPc` at `startPos`: the position at SUCCEED, or -1 once backtracking has emptied the stack to `floor`.
1655
+ private func run(_ startPc: Int, _ startPos: Int, _ floor: Int) throws(RegexStackOverflow) -> Int {
1656
+ let p = program!
1657
+ let code = p.code
1658
+ let s = input
1659
+ let n = s.count
1660
+ let unicode = p.unicode
1661
+ var pc = startPc
1662
+ var pos = startPos
1663
+ while true {
1664
+ var ok = false
1665
+ let op = code[pc]
1666
+ switch op {
1667
+ case OP_CHAR:
1668
+ let c = code[pc + 1]
1669
+ if code[pc + 2] != 0 {
1670
+ if pos < n && Int(s[pos]) == c && (!unicode || c < 0xD800 || c > 0xDFFF) {
1671
+ pos += 1
1672
+ pc += 3
1673
+ ok = true
1674
+ } else if pos < n && unicode && !splitsPair(s, pos) {
1675
+ let e = endAfter(s, pos, true)
1676
+ if pointIn(s, pos, e) == c { pos = e; pc += 3; ok = true }
1677
+ }
1678
+ } else if pos > 0 && !(unicode && splitsPair(s, pos)) {
1679
+ let b = startBefore(s, pos, unicode)
1680
+ if pointIn(s, b, pos) == c { pos = b; pc += 3; ok = true }
1681
+ }
1682
+ case OP_CLASS:
1683
+ let cls = p.classes[code[pc + 1]]
1684
+ if unicode && splitsPair(s, pos) {
1685
+ } else if code[pc + 2] != 0 {
1686
+ if pos < n {
1687
+ let e = endAfter(s, pos, unicode)
1688
+ if cls.has(pointIn(s, pos, e)) { pos = e; pc += 3; ok = true }
1689
+ }
1690
+ } else if pos > 0 {
1691
+ let b = startBefore(s, pos, unicode)
1692
+ if cls.has(pointIn(s, b, pos)) { pos = b; pc += 3; ok = true }
1693
+ }
1694
+ case OP_LITERAL:
1695
+ let text = p.literals[code[pc + 1]]
1696
+ if pos + text.count <= n {
1697
+ var k = 0
1698
+ while k < text.count && s[pos + k] == text[k] { k += 1 }
1699
+ if k == text.count { pos += k; pc += 2; ok = true }
1700
+ }
1701
+ case OP_ASSERT:
1702
+ let multiline = code[pc + 2] != 0
1703
+ let extras = code[pc + 3] != 0
1704
+ switch code[pc + 1] {
1705
+ case ASSERT_START: ok = pos == 0 || (multiline && isLineTerminator(Int(s[pos - 1])))
1706
+ case ASSERT_END: ok = pos == n || (multiline && isLineTerminator(Int(s[pos])))
1707
+ case ASSERT_BOUNDARY: ok = isWordAt(s, pos - 1, extras) != isWordAt(s, pos, extras)
1708
+ default: ok = isWordAt(s, pos - 1, extras) == isWordAt(s, pos, extras)
1709
+ }
1710
+ if ok { pc += 4 }
1711
+ case OP_SPLIT:
1712
+ try push(code[pc + 2], pos, T_CHOICE)
1713
+ pc = code[pc + 1]
1714
+ ok = true
1715
+ case OP_JUMP:
1716
+ pc = code[pc + 1]
1717
+ ok = true
1718
+ case OP_GROUP_OPEN:
1719
+ try set(code[pc + 1], pos)
1720
+ pc += 2
1721
+ ok = true
1722
+ case OP_GROUP_CLOSE:
1723
+ let g = code[pc + 1]
1724
+ let opened = slots[2 * (p.groupCount + 1) + g]
1725
+ if code[pc + 2] != 0 { try set(2 * g, opened); try set(2 * g + 1, pos) } else { try set(2 * g, pos); try set(2 * g + 1, opened) }
1726
+ pc += 3
1727
+ ok = true
1728
+ case OP_LOOP_INIT:
1729
+ try set(code[pc + 1], 0)
1730
+ pc += 2
1731
+ ok = true
1732
+ case OP_LOOP_HEAD:
1733
+ // RepeatMatcher with min and max less the iterations done: past max, only the continuation;
1734
+ // past min, the body and the continuation in the quantifier's order.
1735
+ let count = slots[code[pc + 1]]
1736
+ if count >= code[pc + 3] { pc = code[pc + 5] }
1737
+ else if count >= code[pc + 2] {
1738
+ if code[pc + 4] != 0 {
1739
+ try push(code[pc + 5], pos, T_CHOICE)
1740
+ pc += 6
1741
+ } else {
1742
+ try push(pc + 6, pos, T_CHOICE)
1743
+ pc = code[pc + 5]
1744
+ }
1745
+ } else { pc += 6 }
1746
+ ok = true
1747
+ case OP_LOOP_BODY:
1748
+ try set(code[pc + 1] + 1, pos)
1749
+ var slot = code[pc + 2]
1750
+ while slot < code[pc + 3] { try set(slot, -1); slot += 1 }
1751
+ pc += 4
1752
+ ok = true
1753
+ case OP_LOOP_TAIL:
1754
+ let register = code[pc + 1]
1755
+ let count = slots[register]
1756
+ // An iteration past the minimum that matched empty fails.
1757
+ if !(count >= code[pc + 3] && pos == slots[register + 1]) {
1758
+ try set(register, count + 1)
1759
+ pc = code[pc + 2]
1760
+ ok = true
1761
+ }
1762
+ case OP_REPEAT:
1763
+ let cls = p.classes[code[pc + 1]]
1764
+ let min = code[pc + 2]
1765
+ let max = code[pc + 3]
1766
+ let forward = code[pc + 5] != 0
1767
+ if unicode && splitsPair(s, pos) {
1768
+ if min == 0 { pc += 6; ok = true }
1769
+ } else if code[pc + 4] != 0 {
1770
+ var at = pos
1771
+ var count = 0
1772
+ var least = min == 0 ? pos : -1
1773
+ while count < max {
1774
+ if forward {
1775
+ if at >= n { break }
1776
+ let e = endAfter(s, at, unicode)
1777
+ if !cls.has(pointIn(s, at, e)) { break }
1778
+ at = e
1779
+ } else {
1780
+ if at <= 0 { break }
1781
+ let b = startBefore(s, at, unicode)
1782
+ if !cls.has(pointIn(s, b, at)) { break }
1783
+ at = b
1784
+ }
1785
+ count += 1
1786
+ if count == min { least = at }
1787
+ }
1788
+ if count >= min {
1789
+ if count > min && p.followers[pc] != POSSESSIVE { try push(pc, least, at, T_GREEDY) }
1790
+ pos = at
1791
+ pc += 6
1792
+ ok = true
1793
+ }
1794
+ } else {
1795
+ var at = pos
1796
+ var count = 0
1797
+ while count < min {
1798
+ at = step(cls, s, at, forward, unicode)
1799
+ if at < 0 { break }
1800
+ count += 1
1801
+ }
1802
+ if at >= 0 {
1803
+ if max > min { try push(pc, at, min, T_LAZY) }
1804
+ pos = at
1805
+ pc += 6
1806
+ ok = true
1807
+ }
1808
+ }
1809
+ case OP_BACKREF:
1810
+ let next = backReference(p.references[code[pc + 1]], code[pc + 2] != 0, code[pc + 3] != 0, s, pos, unicode)
1811
+ if next >= 0 { pos = next; pc += 4; ok = true }
1812
+ case OP_LOOK:
1813
+ let mark = top
1814
+ let found = try run(pc + 3, pos, mark) >= 0
1815
+ if code[pc + 1] != 0 {
1816
+ if found { unwind(mark) } else { pc = code[pc + 2]; ok = true }
1817
+ } else if found {
1818
+ try keepUndos(mark)
1819
+ pc = code[pc + 2]
1820
+ ok = true
1821
+ }
1822
+ default: return pos
1823
+ }
1824
+ if ok { continue }
1825
+ backtrack: while true {
1826
+ if top <= floor { return -1 }
1827
+ switch stack[top - 1] {
1828
+ case T_CHOICE:
1829
+ pc = stack[top - 3]
1830
+ pos = stack[top - 2]
1831
+ top -= 3
1832
+ break backtrack
1833
+ case T_UNDO:
1834
+ slots[stack[top - 3]] = stack[top - 2]
1835
+ top -= 3
1836
+ case T_GREEDY:
1837
+ let op = stack[top - 4]
1838
+ let least = stack[top - 3]
1839
+ let at = stack[top - 2]
1840
+ // One character back, as the run read it: a pair straddling where it started is not one.
1841
+ let follower = p.followers[op]
1842
+ let next: Int
1843
+ if follower >= 0 {
1844
+ let unit = UInt16(follower)
1845
+ var found = at - 1
1846
+ while found >= least && s[found] != unit { found -= 1 }
1847
+ if found < least {
1848
+ top -= 4
1849
+ continue backtrack
1850
+ }
1851
+ next = found
1852
+ } else if code[op + 5] != 0 {
1853
+ next = unicode && at - 2 >= least && isTrailUnit(s[at - 1]) && isLeadUnit(s[at - 2]) ? at - 2 : at - 1
1854
+ } else {
1855
+ next = unicode && at + 2 <= least && isLeadUnit(s[at]) && isTrailUnit(s[at + 1]) ? at + 2 : at + 1
1856
+ }
1857
+ if next == least { top -= 4 } else { stack[top - 2] = next }
1858
+ pc = op + 6
1859
+ pos = next
1860
+ break backtrack
1861
+ default:
1862
+ let op = stack[top - 4]
1863
+ let count = stack[top - 2]
1864
+ let next = step(p.classes[code[op + 1]], s, stack[top - 3], code[op + 5] != 0, unicode)
1865
+ if next < 0 {
1866
+ top -= 4
1867
+ continue backtrack
1868
+ }
1869
+ if count + 1 >= code[op + 3] { top -= 4 } else {
1870
+ stack[top - 3] = next
1871
+ stack[top - 2] = count + 1
1872
+ }
1873
+ pc = op + 6
1874
+ pos = next
1875
+ break backtrack
1876
+ }
1877
+ }
1878
+ }
1879
+ }
1880
+
1881
+ /// One character of `cls` at `x`, read forward or backward: where it ends, or -1.
1882
+ @inline(__always) private func step(_ cls: CharClass, _ s: UnsafeBufferPointer<UInt16>, _ x: Int, _ forward: Bool, _ unicode: Bool) -> Int {
1883
+ if unicode && splitsPair(s, x) { return -1 }
1884
+ if forward {
1885
+ if x >= s.count { return -1 }
1886
+ let e = endAfter(s, x, unicode)
1887
+ return cls.has(pointIn(s, x, e)) ? e : -1
1888
+ }
1889
+ if x <= 0 { return -1 }
1890
+ let b = startBefore(s, x, unicode)
1891
+ return cls.has(pointIn(s, b, x)) ? b : -1
1892
+ }
1893
+
1894
+ /// The text the first of `groups` that took part captured, matched at `x`: where it ends, or -1; an unset group matches empty.
1895
+ private func backReference(_ groups: [Int], _ ignoreCase: Bool, _ forward: Bool, _ s: UnsafeBufferPointer<UInt16>, _ x: Int, _ unicode: Bool) -> Int {
1896
+ var start = -1, end = -1
1897
+ for g in groups where slots[2 * g] >= 0 { start = slots[2 * g]; end = slots[2 * g + 1]; break }
1898
+ if start < 0 { return x }
1899
+ let length = end - start
1900
+ let from = forward ? x : x - length
1901
+ if from < 0 || from + length > s.count { return -1 }
1902
+ if !ignoreCase {
1903
+ for i in 0..<length where s[start + i] != s[from + i] { return -1 }
1904
+ } else {
1905
+ func point(_ i: Int) -> Int {
1906
+ unicode && isLeadUnit(s[i]) && i + 1 < s.count && isTrailUnit(s[i + 1]) ? pointIn(s, i, i + 2) : Int(s[i])
1907
+ }
1908
+ var i = 0
1909
+ while i < length {
1910
+ let a = point(start + i), b = point(from + i)
1911
+ if CaseFolding.canonicalize(a, unicode) != CaseFolding.canonicalize(b, unicode) { return -1 }
1912
+ if charCount(a) != charCount(b) { return -1 }
1913
+ i += charCount(a)
1914
+ }
1915
+ }
1916
+ return forward ? x + length : from
1917
+ }
1918
+ }