@absolutejs/absolute 0.19.0-beta.999 → 0.20.0-beta.1

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 (341) hide show
  1. package/LICENSE +21 -13
  2. package/README.md +48 -2
  3. package/dist/angular/browser.js +82 -77
  4. package/dist/angular/browser.js.map +11 -11
  5. package/dist/angular/components/constants.js +43 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/hmrPreserveCore.ts +132 -134
  9. package/dist/angular/index.js +1719 -844
  10. package/dist/angular/index.js.map +34 -26
  11. package/dist/angular/server.js +1620 -768
  12. package/dist/angular/server.js.map +28 -20
  13. package/dist/build.js +4935 -2593
  14. package/dist/build.js.map +72 -57
  15. package/dist/cli/config/client.js +578 -0
  16. package/dist/cli/config/server.js +39587 -0
  17. package/dist/cli/htmx/htmx.min.js +1 -0
  18. package/dist/cli/index.js +16828 -3511
  19. package/dist/client/index.js +49 -46
  20. package/dist/client/index.js.map +12 -12
  21. package/dist/core/streamingSlotRegistrar.js +1 -19
  22. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  23. package/dist/core/streamingSlotRegistry.js +1 -19
  24. package/dist/core/streamingSlotRegistry.js.map +2 -2
  25. package/dist/dev/client/cssUtils.ts +98 -41
  26. package/dist/dev/client/domState.ts +2 -0
  27. package/dist/dev/client/errorOverlay.ts +14 -13
  28. package/dist/dev/client/handlers/angularHmrShim.ts +20 -20
  29. package/dist/dev/client/handlers/angularRemount.ts +74 -55
  30. package/dist/dev/client/handlers/angularRemountWiring.ts +1 -2
  31. package/dist/dev/client/handlers/html.ts +144 -41
  32. package/dist/dev/client/handlers/htmx.ts +43 -8
  33. package/dist/dev/client/handlers/react.ts +114 -32
  34. package/dist/dev/client/handlers/rebuild.ts +28 -8
  35. package/dist/dev/client/handlers/svelte.ts +92 -51
  36. package/dist/dev/client/handlers/vue.ts +36 -45
  37. package/dist/dev/client/hmrClient.ts +101 -26
  38. package/dist/dev/client/hmrTiming.ts +141 -0
  39. package/dist/dev/client/hmrToast.ts +22 -24
  40. package/dist/dev/client/reactRefreshSetup.ts +4 -0
  41. package/dist/dev/client/vendor/reactRefreshRuntime.d.ts +12 -0
  42. package/dist/dev/client/vendor/reactRefreshRuntime.js +313 -0
  43. package/dist/dev/serverBootstrap.js +45 -0
  44. package/dist/index.js +7153 -3224
  45. package/dist/index.js.map +118 -86
  46. package/dist/islands/browser.js +1 -19
  47. package/dist/islands/browser.js.map +3 -3
  48. package/dist/islands/index.js +709 -120
  49. package/dist/islands/index.js.map +18 -13
  50. package/dist/mobile/browser.js +428 -0
  51. package/dist/mobile/browser.js.map +12 -0
  52. package/dist/mobile/index.js +3058 -0
  53. package/dist/mobile/index.js.map +35 -0
  54. package/dist/react/browser.js +13 -62
  55. package/dist/react/browser.js.map +5 -6
  56. package/dist/react/components/browser/index.js +23 -13
  57. package/dist/react/components/index.js +30 -34
  58. package/dist/react/components/index.js.map +8 -7
  59. package/dist/react/hooks/index.js +1 -19
  60. package/dist/react/hooks/index.js.map +3 -3
  61. package/dist/react/index.js +1643 -679
  62. package/dist/react/index.js.map +29 -20
  63. package/dist/react/jsxDevRuntimeCompat.js +22 -20
  64. package/dist/react/jsxDevRuntimeCompat.js.map +5 -4
  65. package/dist/react/jsxRuntimeCompat.js +90 -0
  66. package/dist/react/jsxRuntimeCompat.js.map +10 -0
  67. package/dist/react/router/browser.js +77 -0
  68. package/dist/react/router/browser.js.map +10 -0
  69. package/dist/react/router/index.js +77 -0
  70. package/dist/react/router/index.js.map +10 -0
  71. package/dist/react/server.js +950 -565
  72. package/dist/react/server.js.map +16 -11
  73. package/dist/src/angular/components/constants.d.ts +21 -0
  74. package/dist/src/angular/hmrPreserveCore.d.ts +7 -20
  75. package/dist/src/angular/islands.d.ts +1 -1
  76. package/dist/src/angular/pageHandler.d.ts +2 -0
  77. package/dist/src/angular/ssrRender.d.ts +4 -1
  78. package/dist/src/build/bunStringRawUnicodePlugin.d.ts +12 -0
  79. package/dist/src/build/chainInlineSourcemaps.d.ts +1 -0
  80. package/dist/src/build/compileAngular.d.ts +5 -7
  81. package/dist/src/build/compileSvelte.d.ts +3 -0
  82. package/dist/src/build/compileVue.d.ts +3 -1
  83. package/dist/src/build/generateReactIndexes.d.ts +1 -0
  84. package/dist/src/build/islandRegistryTransform.d.ts +17 -0
  85. package/dist/src/build/maskLiterals.d.ts +28 -0
  86. package/dist/src/build/parseVueSpaRoutes.d.ts +5 -0
  87. package/dist/src/build/resolveBuildMode.d.ts +7 -0
  88. package/dist/src/build/serverExternals.d.ts +14 -0
  89. package/dist/src/build/spaSideManifests.d.ts +16 -0
  90. package/dist/src/build/tailwindCompiler.d.ts +0 -1
  91. package/dist/src/cli/add/dependencies.d.ts +13 -0
  92. package/dist/src/cli/config/absolute/AbsoluteConfigPanel.d.ts +6 -0
  93. package/dist/src/cli/config/absolute/editAbsoluteConfig.d.ts +5 -0
  94. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +19 -0
  95. package/dist/src/cli/config/auth/AuthPanel.d.ts +6 -0
  96. package/dist/src/cli/config/auth/authCatalog.d.ts +10 -0
  97. package/dist/src/cli/config/auth/authScaffolds.d.ts +16 -0
  98. package/dist/src/cli/config/auth/editAuthConfig.d.ts +5 -0
  99. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +14 -0
  100. package/dist/src/cli/config/auth/resolveAuthState.d.ts +2 -0
  101. package/dist/src/cli/config/auth/scaffoldAuthFeature.d.ts +6 -0
  102. package/dist/src/cli/config/client.d.ts +1 -0
  103. package/dist/src/cli/config/configCert.d.ts +12 -0
  104. package/dist/src/cli/config/eslint/EslintPanel.d.ts +6 -0
  105. package/dist/src/cli/config/eslint/configAst.d.ts +18 -0
  106. package/dist/src/cli/config/eslint/editConfigRule.d.ts +6 -0
  107. package/dist/src/cli/config/eslint/eslintStyles.d.ts +1 -0
  108. package/dist/src/cli/config/eslint/resolveConfig.d.ts +3 -0
  109. package/dist/src/cli/config/eslint/serializeValue.d.ts +9 -0
  110. package/dist/src/cli/config/guards.d.ts +4 -0
  111. package/dist/src/cli/config/integrations/IntegrationsPanel.d.ts +6 -0
  112. package/dist/src/cli/config/packageJson/PackageJsonPanel.d.ts +6 -0
  113. package/dist/src/cli/config/packageJson/editPackageJson.d.ts +9 -0
  114. package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +8 -0
  115. package/dist/src/cli/config/page/ConfigShell.d.ts +6 -0
  116. package/dist/src/cli/config/page/FieldEditor.d.ts +9 -0
  117. package/dist/src/cli/config/page/PanelHost.d.ts +6 -0
  118. package/dist/src/cli/config/page/configStyles.d.ts +1 -0
  119. package/dist/src/cli/config/panels.d.ts +7 -0
  120. package/dist/src/cli/config/prettier/PrettierPanel.d.ts +6 -0
  121. package/dist/src/cli/config/prettier/editPrettier.d.ts +5 -0
  122. package/dist/src/cli/config/prettier/resolvePrettier.d.ts +11 -0
  123. package/dist/src/cli/config/schema/fromJsonSchema.d.ts +3 -0
  124. package/dist/src/cli/config/schema/fromType.d.ts +1 -0
  125. package/dist/src/cli/config/schema/serialize.d.ts +1 -0
  126. package/dist/src/cli/config/server.d.ts +527 -0
  127. package/dist/src/cli/config/tsconfig/TsconfigPanel.d.ts +6 -0
  128. package/dist/src/cli/config/tsconfig/editTsconfig.d.ts +5 -0
  129. package/dist/src/cli/config/tsconfig/resolveTsconfig.d.ts +8 -0
  130. package/dist/src/cli/config/tsconfig/tsconfigStyles.d.ts +1 -0
  131. package/dist/src/cli/discoverInstances.d.ts +5 -0
  132. package/dist/src/cli/elysiaOpenApiTypeboxPlugin.d.ts +8 -0
  133. package/dist/src/cli/generate/componentTemplates.d.ts +7 -0
  134. package/dist/src/cli/generate/context.d.ts +30 -0
  135. package/dist/src/cli/generate/cssStrategy.d.ts +20 -0
  136. package/dist/src/cli/generate/frameworkKey.d.ts +3 -0
  137. package/dist/src/cli/generate/frameworks.d.ts +40 -0
  138. package/dist/src/cli/generate/generateApi.d.ts +3 -0
  139. package/dist/src/cli/generate/generateComponent.d.ts +4 -0
  140. package/dist/src/cli/generate/generatePage.d.ts +4 -0
  141. package/dist/src/cli/generate/naming.d.ts +5 -0
  142. package/dist/src/cli/generate/navData.d.ts +10 -0
  143. package/dist/src/cli/generate/outcome.d.ts +17 -0
  144. package/dist/src/cli/generate/pageTemplates.d.ts +11 -0
  145. package/dist/src/cli/generate/routeWiring.d.ts +40 -0
  146. package/dist/src/cli/generate/staticNav.d.ts +5 -0
  147. package/dist/src/cli/heapDiff.d.ts +1 -0
  148. package/dist/src/cli/htmx/install.d.ts +6 -0
  149. package/dist/src/cli/inspectData.d.ts +12 -0
  150. package/dist/src/cli/inspectTui.d.ts +1 -0
  151. package/dist/src/cli/instanceStatus.d.ts +22 -0
  152. package/dist/src/cli/integrations/addPlugin.d.ts +8 -0
  153. package/dist/src/cli/integrations/catalog.d.ts +20 -0
  154. package/dist/src/cli/psTui.d.ts +1 -0
  155. package/dist/src/cli/scripts/add.d.ts +1 -0
  156. package/dist/src/cli/scripts/analyze.d.ts +1 -0
  157. package/dist/src/cli/scripts/api.d.ts +1 -0
  158. package/dist/src/cli/scripts/build.d.ts +1 -1
  159. package/dist/src/cli/scripts/db.d.ts +20 -0
  160. package/dist/src/cli/scripts/dev.d.ts +5 -1
  161. package/dist/src/cli/scripts/doctor.d.ts +1 -0
  162. package/dist/src/cli/scripts/env.d.ts +7 -0
  163. package/dist/src/cli/scripts/eslint.d.ts +37 -2
  164. package/dist/src/cli/scripts/eslintChunked.d.ts +37 -0
  165. package/dist/src/cli/scripts/generate.d.ts +1 -0
  166. package/dist/src/cli/scripts/htmx.d.ts +1 -0
  167. package/dist/src/cli/scripts/inspect.d.ts +1 -0
  168. package/dist/src/cli/scripts/islands.d.ts +1 -0
  169. package/dist/src/cli/scripts/lintProof.d.ts +42 -0
  170. package/dist/src/cli/scripts/logs.d.ts +1 -0
  171. package/dist/src/cli/scripts/ls.d.ts +1 -0
  172. package/dist/src/cli/scripts/mem.d.ts +1 -0
  173. package/dist/src/cli/scripts/mobile.d.ts +1 -0
  174. package/dist/src/cli/scripts/prettier.d.ts +2 -0
  175. package/dist/src/cli/scripts/ps.d.ts +1 -0
  176. package/dist/src/cli/scripts/remove.d.ts +1 -0
  177. package/dist/src/cli/scripts/routes.d.ts +1 -0
  178. package/dist/src/cli/scripts/start.d.ts +6 -1
  179. package/dist/src/cli/scripts/tunnelRelay.d.ts +9 -0
  180. package/dist/src/cli/scripts/workspace.d.ts +3 -1
  181. package/dist/src/cli/serverBundleExternals.d.ts +2 -0
  182. package/dist/src/cli/tuiPrimitives.d.ts +14 -0
  183. package/dist/src/cli/typeGraphCoherence.d.ts +32 -0
  184. package/dist/src/cli/utils.d.ts +3 -1
  185. package/dist/src/cli/workspaceTui.d.ts +2 -1
  186. package/dist/src/client/hydrators/react.d.ts +1 -1
  187. package/dist/src/client/hydrators/svelte.d.ts +1 -1
  188. package/dist/src/client/hydrators/vue.d.ts +1 -1
  189. package/dist/src/client/islandStore.d.ts +3 -3
  190. package/dist/src/client/preserveIslandMarkup.d.ts +4 -1
  191. package/dist/src/constants.d.ts +21 -0
  192. package/dist/src/core/angularServerModule.d.ts +1 -0
  193. package/dist/src/core/build.d.ts +11 -3
  194. package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
  195. package/dist/src/core/index.d.ts +1 -0
  196. package/dist/src/core/pageResponseCache.d.ts +23 -0
  197. package/dist/src/core/prepare.d.ts +192 -154
  198. package/dist/src/core/requestContext.d.ts +18 -0
  199. package/dist/src/dev/angular/fastHmrCompiler.d.ts +5 -3
  200. package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
  201. package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
  202. package/dist/src/dev/clientManager.d.ts +10 -1
  203. package/dist/src/dev/configResolver.d.ts +2 -0
  204. package/dist/src/dev/moduleMapper.d.ts +1 -1
  205. package/dist/src/dev/moduleServer.d.ts +2 -1
  206. package/dist/src/dev/pathUtils.d.ts +1 -1
  207. package/dist/src/dev/reactComponentClassifier.d.ts +1 -1
  208. package/dist/src/dev/rebuildTrigger.d.ts +4 -0
  209. package/dist/src/dev/requestInspector.d.ts +31 -0
  210. package/dist/src/dev/serverBootstrap.d.ts +1 -0
  211. package/dist/src/dev/serverEntryWatcher.d.ts +3 -3
  212. package/dist/src/dev/tunnel/client.d.ts +20 -0
  213. package/dist/src/dev/tunnel/protocol.d.ts +85 -0
  214. package/dist/src/dev/tunnel/relay.d.ts +28 -0
  215. package/dist/src/dev/webSocket.d.ts +1 -1
  216. package/dist/src/mobile/androidConformance.d.ts +42 -0
  217. package/dist/src/mobile/androidEmulatorController.d.ts +99 -0
  218. package/dist/src/mobile/androidNativeWatcher.d.ts +19 -0
  219. package/dist/src/mobile/androidRelease.d.ts +47 -0
  220. package/dist/src/mobile/androidWebView.d.ts +46 -0
  221. package/dist/src/mobile/artifactStore.d.ts +47 -0
  222. package/dist/src/mobile/associationFiles.d.ts +49 -0
  223. package/dist/src/mobile/browser.d.ts +2 -0
  224. package/dist/src/mobile/buildMetadata.d.ts +10 -0
  225. package/dist/src/mobile/buildPipeline.d.ts +8 -0
  226. package/dist/src/mobile/buildRelease.d.ts +24 -0
  227. package/dist/src/mobile/capacitorBundle.d.ts +28 -0
  228. package/dist/src/mobile/capacitorProject.d.ts +9 -0
  229. package/dist/src/mobile/client.d.ts +35 -0
  230. package/dist/src/mobile/compatibilityDispatcher.d.ts +26 -0
  231. package/dist/src/mobile/config.d.ts +16 -0
  232. package/dist/src/mobile/emulatorDoctor.d.ts +25 -0
  233. package/dist/src/mobile/emulatorInstaller.d.ts +41 -0
  234. package/dist/src/mobile/index.d.ts +19 -0
  235. package/dist/src/mobile/materializedBundle.d.ts +36 -0
  236. package/dist/src/mobile/nativeDeepLinks.d.ts +5 -0
  237. package/dist/src/mobile/pageProtocol.d.ts +89 -0
  238. package/dist/src/mobile/producerContext.d.ts +4 -0
  239. package/dist/src/mobile/producerContextState.d.ts +10 -0
  240. package/dist/src/mobile/releaseArtifact.d.ts +75 -0
  241. package/dist/src/mobile/releaseDoctor.d.ts +13 -0
  242. package/dist/src/mobile/routeMatcher.d.ts +3 -0
  243. package/dist/src/mobile/routeMetadataTransform.d.ts +13 -0
  244. package/dist/src/mobile/shellBootstrap.d.ts +1 -0
  245. package/dist/src/mobile/transport.d.ts +31 -0
  246. package/dist/src/plugins/devtoolsJson.d.ts +6 -47
  247. package/dist/src/plugins/hmr.d.ts +22 -96
  248. package/dist/src/plugins/imageOptimizer.d.ts +150 -62
  249. package/dist/src/plugins/networking.d.ts +2 -2
  250. package/dist/src/plugins/openApiPlugin.d.ts +4 -0
  251. package/dist/src/plugins/telemetryPlugin.d.ts +36 -0
  252. package/dist/src/react/browser.d.ts +0 -2
  253. package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
  254. package/dist/src/react/index.d.ts +0 -2
  255. package/dist/src/react/jsxDevRuntimeCompat.d.ts +1 -1
  256. package/dist/src/react/jsxRuntimeCompat.d.ts +7 -0
  257. package/dist/src/react/pageHandler.d.ts +8 -0
  258. package/dist/src/react/router/UniversalRouter.d.ts +43 -0
  259. package/dist/src/react/router/browser.d.ts +2 -0
  260. package/dist/src/react/router/index.d.ts +2 -0
  261. package/dist/src/svelte/pageHandler.d.ts +5 -0
  262. package/dist/src/svelte/router/hashMode.d.ts +1 -6
  263. package/dist/src/svelte/router/matchPath.d.ts +4 -24
  264. package/dist/src/svelte/router/page.svelte.d.ts +1 -10
  265. package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
  266. package/dist/src/utils/cleanup.d.ts +1 -0
  267. package/dist/src/utils/defineConvention.d.ts +2 -2
  268. package/dist/src/utils/defineEnv.d.ts +4 -4
  269. package/dist/src/utils/formatBytes.d.ts +2 -0
  270. package/dist/src/utils/generatedDir.d.ts +1 -1
  271. package/dist/src/utils/iconVersion.d.ts +5 -0
  272. package/dist/src/utils/imageProcessing.d.ts +1 -1
  273. package/dist/src/utils/index.d.ts +2 -0
  274. package/dist/src/utils/inlinePageCss.d.ts +9 -0
  275. package/dist/src/utils/instanceRegistry.d.ts +13 -0
  276. package/dist/src/utils/isTestSourcePath.d.ts +1 -0
  277. package/dist/src/utils/jsonLd.d.ts +1 -1
  278. package/dist/src/utils/loadConfig.d.ts +11 -3
  279. package/dist/src/utils/logger.d.ts +2 -0
  280. package/dist/src/utils/portScan.d.ts +22 -0
  281. package/dist/src/utils/projectRoot.d.ts +17 -0
  282. package/dist/src/utils/resolveConvention.d.ts +1 -1
  283. package/dist/src/utils/resolveDevPort.d.ts +4 -1
  284. package/dist/src/utils/runtimeMode.d.ts +1 -1
  285. package/dist/src/utils/spaRouteCss.d.ts +10 -0
  286. package/dist/src/utils/spaRouteManifest.d.ts +8 -0
  287. package/dist/src/utils/stripStringsAndComments.d.ts +18 -0
  288. package/dist/src/utils/userAgentFunctions.d.ts +1 -1
  289. package/dist/src/utils/vueCompiler.d.ts +1 -0
  290. package/dist/src/vue/components/Image.d.ts +2 -2
  291. package/dist/src/vue/defineVuePage.d.ts +1 -11
  292. package/dist/src/vue/index.d.ts +3 -0
  293. package/dist/src/vue/pageHandler.d.ts +5 -0
  294. package/dist/src/vue/resolveGeneratedVueModulePath.d.ts +1 -0
  295. package/dist/src/vue/teleports.d.ts +2 -0
  296. package/dist/src/vue/useResource.d.ts +65 -0
  297. package/dist/svelte/browser.js +1 -19
  298. package/dist/svelte/browser.js.map +3 -3
  299. package/dist/svelte/components/Head.svelte +7 -1
  300. package/dist/svelte/index.js +1281 -543
  301. package/dist/svelte/index.js.map +27 -19
  302. package/dist/svelte/router/Link.svelte.d.ts +3 -3
  303. package/dist/svelte/router/Route.svelte.d.ts +5 -5
  304. package/dist/svelte/router/Router.svelte.d.ts +3 -3
  305. package/dist/svelte/router/hashMode.ts +6 -12
  306. package/dist/svelte/router/matchPath.ts +44 -61
  307. package/dist/svelte/router/page.d.ts +1 -10
  308. package/dist/svelte/router/page.js +6 -6
  309. package/dist/svelte/router/prefetchCache.ts +21 -23
  310. package/dist/svelte/router/viewTransitions.ts +22 -12
  311. package/dist/svelte/server.js +697 -565
  312. package/dist/svelte/server.js.map +14 -11
  313. package/dist/types/absoluteConfig.d.ts +22 -0
  314. package/dist/types/angular.d.ts +4 -1
  315. package/dist/types/authPanel.d.ts +62 -0
  316. package/dist/types/build.d.ts +116 -0
  317. package/dist/types/cli.d.ts +57 -0
  318. package/dist/types/config.d.ts +52 -0
  319. package/dist/types/eslintConfig.d.ts +68 -0
  320. package/dist/types/globals.d.ts +31 -10
  321. package/dist/types/image.d.ts +2 -0
  322. package/dist/types/index.d.ts +1 -0
  323. package/dist/types/integrationsPanel.d.ts +29 -0
  324. package/dist/types/messages.d.ts +12 -0
  325. package/dist/types/packageJson.d.ts +74 -0
  326. package/dist/types/packageJsonPanel.d.ts +29 -0
  327. package/dist/types/prettier.d.ts +26 -0
  328. package/dist/types/tsconfig.d.ts +31 -0
  329. package/dist/types/vue.d.ts +13 -15
  330. package/dist/vue/browser.js +14 -36
  331. package/dist/vue/browser.js.map +5 -5
  332. package/dist/vue/components/Image.js +3 -20
  333. package/dist/vue/components/Image.js.map +3 -3
  334. package/dist/vue/components/index.js +3 -20
  335. package/dist/vue/components/index.js.map +3 -3
  336. package/dist/vue/index.js +1573 -620
  337. package/dist/vue/index.js.map +34 -22
  338. package/dist/vue/server.js +800 -520
  339. package/dist/vue/server.js.map +17 -11
  340. package/package.json +145 -68
  341. package/dist/src/react/UniversalRouter.d.ts +0 -12
@@ -0,0 +1,428 @@
1
+ // @bun
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
12
+ var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
20
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
21
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ if (canCache)
29
+ cache.set(mod, to);
30
+ return to;
31
+ };
32
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, {
40
+ get: all[name],
41
+ enumerable: true,
42
+ configurable: true,
43
+ set: __exportSetter.bind(all, name)
44
+ });
45
+ };
46
+ var __legacyDecorateClassTS = function(decorators, target, key, desc) {
47
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
48
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
49
+ r = Reflect.decorate(decorators, target, key, desc);
50
+ else
51
+ for (var i = decorators.length - 1;i >= 0; i--)
52
+ if (d = decorators[i])
53
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
54
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
55
+ };
56
+ var __legacyMetadataTS = (k, v) => {
57
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
58
+ return Reflect.metadata(k, v);
59
+ };
60
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
61
+ var __require = import.meta.require;
62
+
63
+ // src/mobile/producerContextState.ts
64
+ var ABSOLUTE_MOBILE_PRODUCER_STORAGE_KEY = Symbol.for("absolutejs.mobileProducerAsyncLocalStorage");
65
+ var frameworks = new Set([
66
+ "angular",
67
+ "ember",
68
+ "html",
69
+ "htmx",
70
+ "react",
71
+ "svelte",
72
+ "vue"
73
+ ]);
74
+ var isCompatibilityPage = (value) => typeof value === "object" && value !== null && ("bundleHash" in value) && typeof value.bundleHash === "string" && ("contract" in value) && typeof value.contract === "string" && ("framework" in value) && typeof value.framework === "string" && frameworks.has(value.framework) && ("pageId" in value) && typeof value.pageId === "string" && ("propsSchemaHash" in value) && typeof value.propsSchemaHash === "string";
75
+ var getCurrentAbsoluteMobileProducerContext = () => {
76
+ const value = Reflect.get(globalThis, ABSOLUTE_MOBILE_PRODUCER_STORAGE_KEY);
77
+ if (typeof value !== "object" || value === null || !("getStore" in value) || typeof value.getStore !== "function") {
78
+ return;
79
+ }
80
+ const context = value.getStore();
81
+ if (typeof context !== "object" || context === null || !("page" in context) || !isCompatibilityPage(context.page) || !("releaseId" in context) || typeof context.releaseId !== "string") {
82
+ return;
83
+ }
84
+ return { page: context.page, releaseId: context.releaseId };
85
+ };
86
+
87
+ // src/mobile/pageProtocol.ts
88
+ var ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE = "application/vnd.absolute.page+json";
89
+ var ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION = 1;
90
+ var BAD_REQUEST_STATUS = 400;
91
+ var OK_STATUS = 200;
92
+ var SERVER_ERROR_STATUS = 500;
93
+ var UPGRADE_REQUIRED_STATUS = 426;
94
+ var MOBILE_PAGE_REQUEST_HEADERS = {
95
+ appBuild: "x-absolute-mobile-app-build",
96
+ pageBundle: "x-absolute-mobile-page-bundle",
97
+ pageContracts: "x-absolute-mobile-page-contracts",
98
+ pageId: "x-absolute-mobile-page-id",
99
+ protocol: "x-absolute-mobile-protocol",
100
+ runtime: "x-absolute-mobile-runtime"
101
+ };
102
+ var parseMediaType = (value) => value.split(";", 1)[0]?.trim().toLowerCase();
103
+ var acceptsAbsoluteMobilePage = (request) => {
104
+ if (!request)
105
+ return false;
106
+ return (request.headers.get("accept") ?? "").split(",").some((value) => parseMediaType(value) === ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE);
107
+ };
108
+ var readRequiredHeader = (request, name) => {
109
+ const value = request.headers.get(name)?.trim();
110
+ return value ? value : undefined;
111
+ };
112
+ var parseAbsoluteMobilePageRequest = (request) => {
113
+ if (!request || !acceptsAbsoluteMobilePage(request)) {
114
+ return { kind: "not-mobile" };
115
+ }
116
+ const protocolValue = readRequiredHeader(request, MOBILE_PAGE_REQUEST_HEADERS.protocol);
117
+ const runtime = readRequiredHeader(request, MOBILE_PAGE_REQUEST_HEADERS.runtime);
118
+ const appBuild = readRequiredHeader(request, MOBILE_PAGE_REQUEST_HEADERS.appBuild);
119
+ const pageBundle = readRequiredHeader(request, MOBILE_PAGE_REQUEST_HEADERS.pageBundle);
120
+ const pageContractsValue = readRequiredHeader(request, MOBILE_PAGE_REQUEST_HEADERS.pageContracts);
121
+ const pageId = readRequiredHeader(request, MOBILE_PAGE_REQUEST_HEADERS.pageId);
122
+ if (!protocolValue || !/^\d+$/.test(protocolValue)) {
123
+ return {
124
+ kind: "invalid",
125
+ message: `Missing or invalid ${MOBILE_PAGE_REQUEST_HEADERS.protocol} header.`
126
+ };
127
+ }
128
+ if (!runtime) {
129
+ return {
130
+ kind: "invalid",
131
+ message: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.runtime} header.`
132
+ };
133
+ }
134
+ if (!appBuild) {
135
+ return {
136
+ kind: "invalid",
137
+ message: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.appBuild} header.`
138
+ };
139
+ }
140
+ if (!pageBundle) {
141
+ return {
142
+ kind: "invalid",
143
+ message: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.pageBundle} header.`
144
+ };
145
+ }
146
+ if (!pageContractsValue) {
147
+ return {
148
+ kind: "invalid",
149
+ message: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.pageContracts} header.`
150
+ };
151
+ }
152
+ if (!pageId) {
153
+ return {
154
+ kind: "invalid",
155
+ message: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.pageId} header.`
156
+ };
157
+ }
158
+ const pageContracts = [
159
+ ...new Set(pageContractsValue.split(",").map((value) => value.trim()).filter(Boolean))
160
+ ];
161
+ if (pageContracts.length === 0) {
162
+ return {
163
+ kind: "invalid",
164
+ message: `${MOBILE_PAGE_REQUEST_HEADERS.pageContracts} must contain at least one contract.`
165
+ };
166
+ }
167
+ return {
168
+ client: {
169
+ appBuild,
170
+ pageBundle,
171
+ pageContracts,
172
+ pageId,
173
+ protocol: Number(protocolValue),
174
+ runtime
175
+ },
176
+ kind: "mobile"
177
+ };
178
+ };
179
+ var responseHeaders = () => {
180
+ const headers = new Headers({
181
+ "cache-control": "no-store",
182
+ "content-type": `${ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE}; version=${ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION}`
183
+ });
184
+ headerVaryValues.forEach((value) => headers.append("vary", value));
185
+ return headers;
186
+ };
187
+ var headerVaryValues = [
188
+ "Accept",
189
+ MOBILE_PAGE_REQUEST_HEADERS.protocol,
190
+ MOBILE_PAGE_REQUEST_HEADERS.runtime,
191
+ MOBILE_PAGE_REQUEST_HEADERS.appBuild,
192
+ MOBILE_PAGE_REQUEST_HEADERS.pageBundle,
193
+ MOBILE_PAGE_REQUEST_HEADERS.pageContracts,
194
+ MOBILE_PAGE_REQUEST_HEADERS.pageId
195
+ ];
196
+ var envelopeResponse = (response, status) => new Response(JSON.stringify({
197
+ protocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
198
+ response
199
+ }), { headers: responseHeaders(), status });
200
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
201
+ var normalizeJsonValue = (value) => {
202
+ const serialized = JSON.stringify(value);
203
+ if (serialized === undefined) {
204
+ throw new TypeError("Mobile page props must be JSON-serializable.");
205
+ }
206
+ const parsed = JSON.parse(serialized);
207
+ if (!isRecord(parsed)) {
208
+ throw new TypeError("Mobile page props must serialize to an object.");
209
+ }
210
+ return parsed;
211
+ };
212
+ var finalizeArchivedMobilePage = (context, input) => {
213
+ const { page } = context;
214
+ if (page.pageId !== input.compatibility.pageId || page.framework !== input.compatibility.framework) {
215
+ return envelopeResponse({
216
+ kind: "invalid-request",
217
+ message: "Archived producer page identity does not match its release artifact."
218
+ }, BAD_REQUEST_STATUS);
219
+ }
220
+ try {
221
+ const [currentRepresentation] = input.compatibility.representations;
222
+ if (!currentRepresentation) {
223
+ throw new TypeError("Mobile page has no current representation.");
224
+ }
225
+ return envelopeResponse({
226
+ contract: page.contract,
227
+ framework: page.framework,
228
+ kind: "page",
229
+ pageId: page.pageId,
230
+ props: normalizeJsonValue(currentRepresentation.mapProps(input.props)),
231
+ status: input.status ?? OK_STATUS
232
+ }, input.status ?? OK_STATUS);
233
+ } catch (error) {
234
+ console.error(`[Mobile] Archived producer ${context.releaseId} failed for ${page.pageId}:`, error);
235
+ return createAbsoluteMobilePageErrorResponse(page.pageId);
236
+ }
237
+ };
238
+ var createAbsoluteMobileInvalidRequestResponse = (message) => envelopeResponse({ kind: "invalid-request", message }, BAD_REQUEST_STATUS);
239
+ var createAbsoluteMobilePageErrorResponse = (pageId) => envelopeResponse({
240
+ code: "representation-failed",
241
+ kind: "error",
242
+ pageId,
243
+ status: SERVER_ERROR_STATUS
244
+ }, SERVER_ERROR_STATUS);
245
+ var createAbsoluteMobileUpgradeResponse = (result) => envelopeResponse(result, UPGRADE_REQUIRED_STATUS);
246
+ var finalizeAbsoluteMobilePage = (input) => {
247
+ const parsed = parseAbsoluteMobilePageRequest(input.request);
248
+ if (parsed.kind === "not-mobile")
249
+ return;
250
+ if (parsed.kind === "invalid") {
251
+ return envelopeResponse({ kind: "invalid-request", message: parsed.message }, BAD_REQUEST_STATUS);
252
+ }
253
+ const { client } = parsed;
254
+ if (client.pageId !== input.compatibility.pageId) {
255
+ return envelopeResponse({
256
+ kind: "invalid-request",
257
+ message: `Requested mobile page ${client.pageId} does not match ${input.compatibility.pageId}.`
258
+ }, BAD_REQUEST_STATUS);
259
+ }
260
+ const producerContext = getCurrentAbsoluteMobileProducerContext();
261
+ if (producerContext)
262
+ return finalizeArchivedMobilePage(producerContext, input);
263
+ if (client.protocol !== ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION) {
264
+ return envelopeResponse({
265
+ kind: "upgrade-required",
266
+ pageId: input.compatibility.pageId,
267
+ reason: "protocol"
268
+ }, UPGRADE_REQUIRED_STATUS);
269
+ }
270
+ if (!input.compatibility.runtimes.includes(client.runtime)) {
271
+ return envelopeResponse({
272
+ kind: "upgrade-required",
273
+ pageId: input.compatibility.pageId,
274
+ reason: "runtime",
275
+ supportedRuntimes: [...input.compatibility.runtimes]
276
+ }, UPGRADE_REQUIRED_STATUS);
277
+ }
278
+ const clientContracts = new Set(client.pageContracts);
279
+ const representation = input.compatibility.representations.find(({ contract }) => clientContracts.has(contract));
280
+ if (!representation) {
281
+ return envelopeResponse({
282
+ kind: "upgrade-required",
283
+ pageId: input.compatibility.pageId,
284
+ reason: "page-contract",
285
+ supportedContracts: input.compatibility.representations.map(({ contract }) => contract)
286
+ }, UPGRADE_REQUIRED_STATUS);
287
+ }
288
+ try {
289
+ return envelopeResponse({
290
+ contract: representation.contract,
291
+ framework: input.compatibility.framework,
292
+ kind: "page",
293
+ pageId: input.compatibility.pageId,
294
+ props: normalizeJsonValue(representation.mapProps(input.props)),
295
+ status: input.status ?? OK_STATUS
296
+ }, input.status ?? OK_STATUS);
297
+ } catch (error) {
298
+ console.error(`[Mobile] Failed to produce ${input.compatibility.pageId} representation ${representation.contract}:`, error);
299
+ return envelopeResponse({
300
+ code: "representation-failed",
301
+ kind: "error",
302
+ pageId: input.compatibility.pageId,
303
+ status: SERVER_ERROR_STATUS
304
+ }, SERVER_ERROR_STATUS);
305
+ }
306
+ };
307
+
308
+ // src/mobile/client.ts
309
+ class AbsoluteMobilePageProtocolError extends Error {
310
+ code;
311
+ constructor(code, message) {
312
+ super(message);
313
+ this.name = "AbsoluteMobilePageProtocolError";
314
+ this.code = code;
315
+ }
316
+ }
317
+ var frameworks2 = new Set([
318
+ "angular",
319
+ "ember",
320
+ "html",
321
+ "htmx",
322
+ "react",
323
+ "svelte",
324
+ "vue"
325
+ ]);
326
+ var upgradeReasons = new Set([
327
+ "app-release",
328
+ "page-contract",
329
+ "protocol",
330
+ "runtime"
331
+ ]);
332
+ var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
333
+ var isFramework = (value) => typeof value === "string" && frameworks2.has(value);
334
+ var isUpgradeReason = (value) => typeof value === "string" && upgradeReasons.has(value);
335
+ var parsePageResult = (value) => {
336
+ if (typeof value.contract !== "string" || !isFramework(value.framework) || typeof value.pageId !== "string" || typeof value.status !== "number") {
337
+ throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The mobile page response is missing required page metadata.");
338
+ }
339
+ if (!isRecord2(value.props)) {
340
+ throw new AbsoluteMobilePageProtocolError("invalid-props", "The mobile page response must contain an object props value.");
341
+ }
342
+ return {
343
+ contract: value.contract,
344
+ framework: value.framework,
345
+ kind: "page",
346
+ pageId: value.pageId,
347
+ props: value.props,
348
+ status: value.status
349
+ };
350
+ };
351
+ var parseUpgradeResult = (value) => {
352
+ if (typeof value.pageId !== "string" || !isUpgradeReason(value.reason)) {
353
+ throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The update response is missing its page or reason.");
354
+ }
355
+ return {
356
+ kind: "upgrade-required",
357
+ pageId: value.pageId,
358
+ reason: value.reason,
359
+ supportedContracts: Array.isArray(value.supportedContracts) ? value.supportedContracts.filter((contract) => typeof contract === "string") : undefined,
360
+ supportedRuntimes: Array.isArray(value.supportedRuntimes) ? value.supportedRuntimes.filter((runtime) => typeof runtime === "string") : undefined
361
+ };
362
+ };
363
+ var activateAbsoluteMobilePage = async (value, options) => {
364
+ const envelope = parseAbsoluteMobilePageEnvelope(value);
365
+ if (envelope.response.kind === "upgrade-required") {
366
+ return envelope.response;
367
+ }
368
+ if (envelope.response.kind !== "page") {
369
+ throw new AbsoluteMobilePageProtocolError("invalid-envelope", "Expected a renderable mobile page response.");
370
+ }
371
+ const target = options.target ?? window;
372
+ target.__INITIAL_PROPS__ = envelope.response.props;
373
+ target.__ABSOLUTE_PAGE_RENDER_MODE__ = "client";
374
+ await options.loadPage({
375
+ contract: envelope.response.contract,
376
+ pageId: envelope.response.pageId
377
+ });
378
+ return {
379
+ contract: envelope.response.contract,
380
+ kind: "rendered",
381
+ pageId: envelope.response.pageId
382
+ };
383
+ };
384
+ var parseAbsoluteMobilePageEnvelope = (value) => {
385
+ if (!isRecord2(value) || !isRecord2(value.response)) {
386
+ throw new AbsoluteMobilePageProtocolError("invalid-envelope", "The server did not return an AbsoluteJS mobile page envelope.");
387
+ }
388
+ if (value.protocol !== ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION) {
389
+ throw new AbsoluteMobilePageProtocolError("invalid-envelope", `Unsupported mobile page protocol ${String(value.protocol)}.`);
390
+ }
391
+ const { kind } = value.response;
392
+ if (kind === "page") {
393
+ return {
394
+ protocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
395
+ response: parsePageResult(value.response)
396
+ };
397
+ }
398
+ if (kind === "upgrade-required") {
399
+ return {
400
+ protocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
401
+ response: parseUpgradeResult(value.response)
402
+ };
403
+ }
404
+ if (kind === "invalid-request") {
405
+ throw new AbsoluteMobilePageProtocolError("server-rejected-request", typeof value.response.message === "string" ? value.response.message : "The server rejected the mobile page request.");
406
+ }
407
+ if (kind === "error") {
408
+ throw new AbsoluteMobilePageProtocolError("server-error", "The server could not create a compatible mobile page representation.");
409
+ }
410
+ throw new AbsoluteMobilePageProtocolError("invalid-envelope", `Unknown mobile page response kind ${String(kind)}.`);
411
+ };
412
+ export {
413
+ parseAbsoluteMobilePageRequest,
414
+ parseAbsoluteMobilePageEnvelope,
415
+ finalizeAbsoluteMobilePage,
416
+ createAbsoluteMobileUpgradeResponse,
417
+ createAbsoluteMobilePageErrorResponse,
418
+ createAbsoluteMobileInvalidRequestResponse,
419
+ activateAbsoluteMobilePage,
420
+ acceptsAbsoluteMobilePage,
421
+ MOBILE_PAGE_REQUEST_HEADERS,
422
+ AbsoluteMobilePageProtocolError,
423
+ ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
424
+ ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE
425
+ };
426
+
427
+ //# debugId=E4A7699378C91D3464756E2164756E21
428
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/mobile/producerContextState.ts", "../src/mobile/pageProtocol.ts", "../src/mobile/client.ts"],
4
+ "sourcesContent": [
5
+ "import type { AbsoluteMobileCompatibilityPage } from './releaseArtifact';\n\nexport type AbsoluteMobileProducerContext = {\n\tpage: AbsoluteMobileCompatibilityPage;\n\treleaseId: string;\n};\n\nexport const ABSOLUTE_MOBILE_PRODUCER_STORAGE_KEY = Symbol.for(\n\t'absolutejs.mobileProducerAsyncLocalStorage'\n);\n\nconst frameworks = new Set<string>([\n\t'angular',\n\t'ember',\n\t'html',\n\t'htmx',\n\t'react',\n\t'svelte',\n\t'vue'\n]);\n\nconst isCompatibilityPage = (\n\tvalue: unknown\n): value is AbsoluteMobileCompatibilityPage =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t'bundleHash' in value &&\n\ttypeof value.bundleHash === 'string' &&\n\t'contract' in value &&\n\ttypeof value.contract === 'string' &&\n\t'framework' in value &&\n\ttypeof value.framework === 'string' &&\n\tframeworks.has(value.framework) &&\n\t'pageId' in value &&\n\ttypeof value.pageId === 'string' &&\n\t'propsSchemaHash' in value &&\n\ttypeof value.propsSchemaHash === 'string';\n\nexport const getCurrentAbsoluteMobileProducerContext = () => {\n\tconst value: unknown = Reflect.get(\n\t\tglobalThis,\n\t\tABSOLUTE_MOBILE_PRODUCER_STORAGE_KEY\n\t);\n\tif (\n\t\ttypeof value !== 'object' ||\n\t\tvalue === null ||\n\t\t!('getStore' in value) ||\n\t\ttypeof value.getStore !== 'function'\n\t) {\n\t\treturn undefined;\n\t}\n\tconst context: unknown = value.getStore();\n\tif (\n\t\ttypeof context !== 'object' ||\n\t\tcontext === null ||\n\t\t!('page' in context) ||\n\t\t!isCompatibilityPage(context.page) ||\n\t\t!('releaseId' in context) ||\n\t\ttypeof context.releaseId !== 'string'\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn { page: context.page, releaseId: context.releaseId };\n};\n",
6
+ "import {\n\tgetCurrentAbsoluteMobileProducerContext,\n\ttype AbsoluteMobileProducerContext\n} from './producerContextState';\n\nexport const ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE =\n\t'application/vnd.absolute.page+json';\nexport const ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION = 1 as const;\nconst BAD_REQUEST_STATUS = 400;\nconst OK_STATUS = 200;\nconst SERVER_ERROR_STATUS = 500;\nconst UPGRADE_REQUIRED_STATUS = 426;\n\nexport const MOBILE_PAGE_REQUEST_HEADERS = {\n\tappBuild: 'x-absolute-mobile-app-build',\n\tpageBundle: 'x-absolute-mobile-page-bundle',\n\tpageContracts: 'x-absolute-mobile-page-contracts',\n\tpageId: 'x-absolute-mobile-page-id',\n\tprotocol: 'x-absolute-mobile-protocol',\n\truntime: 'x-absolute-mobile-runtime'\n} as const;\n\nexport type AbsoluteMobilePageFramework =\n\t| 'angular'\n\t| 'ember'\n\t| 'html'\n\t| 'htmx'\n\t| 'react'\n\t| 'svelte'\n\t| 'vue';\n\nexport type AbsoluteMobilePageClient = {\n\tappBuild: string;\n\tpageBundle: string;\n\tpageContracts: string[];\n\tpageId: string;\n\tprotocol: number;\n\truntime: string;\n};\n\nexport type AbsoluteMobilePageRepresentation<Props> = {\n\t/** Stable data contract understood by an embedded page bundle. */\n\tcontract: string;\n\t/**\n\t * Adapts the current route props to an older compatible contract. The\n\t * current representation normally uses the identity function.\n\t */\n\tmapProps: (props: Props) => Record<string, unknown>;\n};\n\nexport type AbsoluteMobilePageCompatibility<Props> = {\n\tframework: AbsoluteMobilePageFramework;\n\tpageId: string;\n\t/** Newest representation first, followed by retained compatibility forms. */\n\trepresentations: readonly AbsoluteMobilePageRepresentation<Props>[];\n\t/** Current runtime plus every retained compatible runtime generation. */\n\truntimes: readonly string[];\n};\n\nexport type AbsoluteMobilePageResult = {\n\tkind: 'page';\n\tcontract: string;\n\tframework: AbsoluteMobilePageFramework;\n\tpageId: string;\n\tprops: Record<string, unknown>;\n\tstatus: number;\n};\n\nexport type AbsoluteMobileUpgradeReason =\n\t| 'app-release'\n\t| 'page-contract'\n\t| 'protocol'\n\t| 'runtime';\n\nexport type AbsoluteMobileUpgradeRequiredResult = {\n\tkind: 'upgrade-required';\n\treason: AbsoluteMobileUpgradeReason;\n\tpageId: string;\n\tsupportedContracts?: string[];\n\tsupportedRuntimes?: string[];\n};\n\nexport type AbsoluteMobileInvalidRequestResult = {\n\tkind: 'invalid-request';\n\tmessage: string;\n};\n\nexport type AbsoluteMobilePageErrorResult = {\n\tcode: 'representation-failed';\n\tkind: 'error';\n\tpageId: string;\n\tstatus: typeof SERVER_ERROR_STATUS;\n};\n\nexport type AbsoluteMobilePageEnvelope = {\n\tprotocol: typeof ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION;\n\tresponse:\n\t\t| AbsoluteMobilePageErrorResult\n\t\t| AbsoluteMobileInvalidRequestResult\n\t\t| AbsoluteMobilePageResult\n\t\t| AbsoluteMobileUpgradeRequiredResult;\n};\n\ntype ParsedMobilePageRequest =\n\t| { kind: 'not-mobile' }\n\t| { kind: 'invalid'; message: string }\n\t| { kind: 'mobile'; client: AbsoluteMobilePageClient };\n\ntype FinalizeAbsoluteMobilePageInput<Props> = {\n\tcompatibility: AbsoluteMobilePageCompatibility<Props>;\n\tprops: Props;\n\trequest: Request | undefined;\n\tstatus?: number;\n};\n\nconst parseMediaType = (value: string) =>\n\tvalue.split(';', 1)[0]?.trim().toLowerCase();\n\nexport const acceptsAbsoluteMobilePage = (request: Request | undefined) => {\n\tif (!request) return false;\n\n\treturn (request.headers.get('accept') ?? '')\n\t\t.split(',')\n\t\t.some(\n\t\t\t(value) => parseMediaType(value) === ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE\n\t\t);\n};\n\nconst readRequiredHeader = (request: Request, name: string) => {\n\tconst value = request.headers.get(name)?.trim();\n\n\treturn value ? value : undefined;\n};\n\nexport const parseAbsoluteMobilePageRequest = (\n\trequest: Request | undefined\n): ParsedMobilePageRequest => {\n\tif (!request || !acceptsAbsoluteMobilePage(request)) {\n\t\treturn { kind: 'not-mobile' };\n\t}\n\n\tconst protocolValue = readRequiredHeader(\n\t\trequest,\n\t\tMOBILE_PAGE_REQUEST_HEADERS.protocol\n\t);\n\tconst runtime = readRequiredHeader(\n\t\trequest,\n\t\tMOBILE_PAGE_REQUEST_HEADERS.runtime\n\t);\n\tconst appBuild = readRequiredHeader(\n\t\trequest,\n\t\tMOBILE_PAGE_REQUEST_HEADERS.appBuild\n\t);\n\tconst pageBundle = readRequiredHeader(\n\t\trequest,\n\t\tMOBILE_PAGE_REQUEST_HEADERS.pageBundle\n\t);\n\tconst pageContractsValue = readRequiredHeader(\n\t\trequest,\n\t\tMOBILE_PAGE_REQUEST_HEADERS.pageContracts\n\t);\n\tconst pageId = readRequiredHeader(\n\t\trequest,\n\t\tMOBILE_PAGE_REQUEST_HEADERS.pageId\n\t);\n\n\tif (!protocolValue || !/^\\d+$/.test(protocolValue)) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `Missing or invalid ${MOBILE_PAGE_REQUEST_HEADERS.protocol} header.`\n\t\t};\n\t}\n\tif (!runtime) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.runtime} header.`\n\t\t};\n\t}\n\tif (!appBuild) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.appBuild} header.`\n\t\t};\n\t}\n\tif (!pageBundle) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.pageBundle} header.`\n\t\t};\n\t}\n\tif (!pageContractsValue) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.pageContracts} header.`\n\t\t};\n\t}\n\tif (!pageId) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `Missing ${MOBILE_PAGE_REQUEST_HEADERS.pageId} header.`\n\t\t};\n\t}\n\n\tconst pageContracts = [\n\t\t...new Set(\n\t\t\tpageContractsValue\n\t\t\t\t.split(',')\n\t\t\t\t.map((value) => value.trim())\n\t\t\t\t.filter(Boolean)\n\t\t)\n\t];\n\tif (pageContracts.length === 0) {\n\t\treturn {\n\t\t\tkind: 'invalid',\n\t\t\tmessage: `${MOBILE_PAGE_REQUEST_HEADERS.pageContracts} must contain at least one contract.`\n\t\t};\n\t}\n\n\treturn {\n\t\tclient: {\n\t\t\tappBuild,\n\t\t\tpageBundle,\n\t\t\tpageContracts,\n\t\t\tpageId,\n\t\t\tprotocol: Number(protocolValue),\n\t\t\truntime\n\t\t},\n\t\tkind: 'mobile'\n\t};\n};\n\nconst responseHeaders = () => {\n\tconst headers = new Headers({\n\t\t'cache-control': 'no-store',\n\t\t'content-type': `${ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE}; version=${ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION}`\n\t});\n\theaderVaryValues.forEach((value) => headers.append('vary', value));\n\n\treturn headers;\n};\n\nconst headerVaryValues = [\n\t'Accept',\n\tMOBILE_PAGE_REQUEST_HEADERS.protocol,\n\tMOBILE_PAGE_REQUEST_HEADERS.runtime,\n\tMOBILE_PAGE_REQUEST_HEADERS.appBuild,\n\tMOBILE_PAGE_REQUEST_HEADERS.pageBundle,\n\tMOBILE_PAGE_REQUEST_HEADERS.pageContracts,\n\tMOBILE_PAGE_REQUEST_HEADERS.pageId\n];\n\nconst envelopeResponse = (\n\tresponse: AbsoluteMobilePageEnvelope['response'],\n\tstatus: number\n) =>\n\tnew Response(\n\t\tJSON.stringify({\n\t\t\tprotocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,\n\t\t\tresponse\n\t\t} satisfies AbsoluteMobilePageEnvelope),\n\t\t{ headers: responseHeaders(), status }\n\t);\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst normalizeJsonValue = (value: Record<string, unknown>) => {\n\tconst serialized = JSON.stringify(value);\n\tif (serialized === undefined) {\n\t\tthrow new TypeError('Mobile page props must be JSON-serializable.');\n\t}\n\n\tconst parsed: unknown = JSON.parse(serialized);\n\tif (!isRecord(parsed)) {\n\t\tthrow new TypeError('Mobile page props must serialize to an object.');\n\t}\n\n\treturn parsed;\n};\n\nconst finalizeArchivedMobilePage = <Props>(\n\tcontext: AbsoluteMobileProducerContext,\n\tinput: FinalizeAbsoluteMobilePageInput<Props>\n) => {\n\tconst { page } = context;\n\tif (\n\t\tpage.pageId !== input.compatibility.pageId ||\n\t\tpage.framework !== input.compatibility.framework\n\t) {\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tkind: 'invalid-request',\n\t\t\t\tmessage:\n\t\t\t\t\t'Archived producer page identity does not match its release artifact.'\n\t\t\t},\n\t\t\tBAD_REQUEST_STATUS\n\t\t);\n\t}\n\n\ttry {\n\t\tconst [currentRepresentation] = input.compatibility.representations;\n\t\tif (!currentRepresentation) {\n\t\t\tthrow new TypeError('Mobile page has no current representation.');\n\t\t}\n\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tcontract: page.contract,\n\t\t\t\tframework: page.framework,\n\t\t\t\tkind: 'page',\n\t\t\t\tpageId: page.pageId,\n\t\t\t\tprops: normalizeJsonValue(\n\t\t\t\t\tcurrentRepresentation.mapProps(input.props)\n\t\t\t\t),\n\t\t\t\tstatus: input.status ?? OK_STATUS\n\t\t\t},\n\t\t\tinput.status ?? OK_STATUS\n\t\t);\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t`[Mobile] Archived producer ${context.releaseId} failed for ${page.pageId}:`,\n\t\t\terror\n\t\t);\n\n\t\treturn createAbsoluteMobilePageErrorResponse(page.pageId);\n\t}\n};\n\nexport const createAbsoluteMobileInvalidRequestResponse = (message: string) =>\n\tenvelopeResponse({ kind: 'invalid-request', message }, BAD_REQUEST_STATUS);\n\nexport const createAbsoluteMobilePageErrorResponse = (pageId: string) =>\n\tenvelopeResponse(\n\t\t{\n\t\t\tcode: 'representation-failed',\n\t\t\tkind: 'error',\n\t\t\tpageId,\n\t\t\tstatus: SERVER_ERROR_STATUS\n\t\t},\n\t\tSERVER_ERROR_STATUS\n\t);\n\nexport const createAbsoluteMobileUpgradeResponse = (\n\tresult: AbsoluteMobileUpgradeRequiredResult\n) => envelopeResponse(result, UPGRADE_REQUIRED_STATUS);\n\nexport const finalizeAbsoluteMobilePage = <Props>(\n\tinput: FinalizeAbsoluteMobilePageInput<Props>\n) => {\n\tconst parsed = parseAbsoluteMobilePageRequest(input.request);\n\tif (parsed.kind === 'not-mobile') return undefined;\n\tif (parsed.kind === 'invalid') {\n\t\treturn envelopeResponse(\n\t\t\t{ kind: 'invalid-request', message: parsed.message },\n\t\t\tBAD_REQUEST_STATUS\n\t\t);\n\t}\n\n\tconst { client } = parsed;\n\tif (client.pageId !== input.compatibility.pageId) {\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tkind: 'invalid-request',\n\t\t\t\tmessage: `Requested mobile page ${client.pageId} does not match ${input.compatibility.pageId}.`\n\t\t\t},\n\t\t\tBAD_REQUEST_STATUS\n\t\t);\n\t}\n\tconst producerContext = getCurrentAbsoluteMobileProducerContext();\n\tif (producerContext)\n\t\treturn finalizeArchivedMobilePage(producerContext, input);\n\tif (client.protocol !== ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION) {\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tkind: 'upgrade-required',\n\t\t\t\tpageId: input.compatibility.pageId,\n\t\t\t\treason: 'protocol'\n\t\t\t},\n\t\t\tUPGRADE_REQUIRED_STATUS\n\t\t);\n\t}\n\tif (!input.compatibility.runtimes.includes(client.runtime)) {\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tkind: 'upgrade-required',\n\t\t\t\tpageId: input.compatibility.pageId,\n\t\t\t\treason: 'runtime',\n\t\t\t\tsupportedRuntimes: [...input.compatibility.runtimes]\n\t\t\t},\n\t\t\tUPGRADE_REQUIRED_STATUS\n\t\t);\n\t}\n\n\tconst clientContracts = new Set(client.pageContracts);\n\tconst representation = input.compatibility.representations.find(\n\t\t({ contract }) => clientContracts.has(contract)\n\t);\n\tif (!representation) {\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tkind: 'upgrade-required',\n\t\t\t\tpageId: input.compatibility.pageId,\n\t\t\t\treason: 'page-contract',\n\t\t\t\tsupportedContracts: input.compatibility.representations.map(\n\t\t\t\t\t({ contract }) => contract\n\t\t\t\t)\n\t\t\t},\n\t\t\tUPGRADE_REQUIRED_STATUS\n\t\t);\n\t}\n\n\ttry {\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tcontract: representation.contract,\n\t\t\t\tframework: input.compatibility.framework,\n\t\t\t\tkind: 'page',\n\t\t\t\tpageId: input.compatibility.pageId,\n\t\t\t\tprops: normalizeJsonValue(representation.mapProps(input.props)),\n\t\t\t\tstatus: input.status ?? OK_STATUS\n\t\t\t},\n\t\t\tinput.status ?? OK_STATUS\n\t\t);\n\t} catch (error) {\n\t\tconsole.error(\n\t\t\t`[Mobile] Failed to produce ${input.compatibility.pageId} representation ${representation.contract}:`,\n\t\t\terror\n\t\t);\n\n\t\treturn envelopeResponse(\n\t\t\t{\n\t\t\t\tcode: 'representation-failed',\n\t\t\t\tkind: 'error',\n\t\t\t\tpageId: input.compatibility.pageId,\n\t\t\t\tstatus: SERVER_ERROR_STATUS\n\t\t\t},\n\t\t\tSERVER_ERROR_STATUS\n\t\t);\n\t}\n};\n",
7
+ "import {\n\tABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,\n\ttype AbsoluteMobilePageEnvelope,\n\ttype AbsoluteMobilePageFramework,\n\ttype AbsoluteMobilePageResult,\n\ttype AbsoluteMobileUpgradeReason,\n\ttype AbsoluteMobileUpgradeRequiredResult\n} from './pageProtocol';\n\ntype AbsoluteMobileClientTarget = {\n\t__ABSOLUTE_PAGE_RENDER_MODE__?: 'client' | 'hydrate';\n\t__INITIAL_PROPS__?: Record<string, unknown>;\n};\n\nexport type AbsoluteMobilePageLoader = (input: {\n\tcontract: string;\n\tpageId: string;\n}) => Promise<unknown>;\n\nexport type AbsoluteMobilePageActivation =\n\t| {\n\t\t\tkind: 'rendered';\n\t\t\tcontract: string;\n\t\t\tpageId: string;\n\t }\n\t| AbsoluteMobileUpgradeRequiredResult;\n\nexport type AbsoluteMobilePageActivationOptions = {\n\tloadPage: AbsoluteMobilePageLoader;\n\ttarget?: AbsoluteMobileClientTarget;\n};\n\nexport class AbsoluteMobilePageProtocolError extends Error {\n\treadonly code:\n\t\t| 'invalid-envelope'\n\t\t| 'invalid-props'\n\t\t| 'server-error'\n\t\t| 'server-rejected-request';\n\n\tconstructor(\n\t\tcode: AbsoluteMobilePageProtocolError['code'],\n\t\tmessage: string\n\t) {\n\t\tsuper(message);\n\t\tthis.name = 'AbsoluteMobilePageProtocolError';\n\t\tthis.code = code;\n\t}\n}\n\nconst frameworks = new Set<string>([\n\t'angular',\n\t'ember',\n\t'html',\n\t'htmx',\n\t'react',\n\t'svelte',\n\t'vue'\n]);\nconst upgradeReasons = new Set<string>([\n\t'app-release',\n\t'page-contract',\n\t'protocol',\n\t'runtime'\n]);\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst isFramework = (value: unknown): value is AbsoluteMobilePageFramework =>\n\ttypeof value === 'string' && frameworks.has(value);\n\nconst isUpgradeReason = (\n\tvalue: unknown\n): value is AbsoluteMobileUpgradeReason =>\n\ttypeof value === 'string' && upgradeReasons.has(value);\n\nconst parsePageResult = (\n\tvalue: Record<string, unknown>\n): AbsoluteMobilePageResult => {\n\tif (\n\t\ttypeof value.contract !== 'string' ||\n\t\t!isFramework(value.framework) ||\n\t\ttypeof value.pageId !== 'string' ||\n\t\ttypeof value.status !== 'number'\n\t) {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'invalid-envelope',\n\t\t\t'The mobile page response is missing required page metadata.'\n\t\t);\n\t}\n\tif (!isRecord(value.props)) {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'invalid-props',\n\t\t\t'The mobile page response must contain an object props value.'\n\t\t);\n\t}\n\n\treturn {\n\t\tcontract: value.contract,\n\t\tframework: value.framework,\n\t\tkind: 'page',\n\t\tpageId: value.pageId,\n\t\tprops: value.props,\n\t\tstatus: value.status\n\t};\n};\n\nconst parseUpgradeResult = (\n\tvalue: Record<string, unknown>\n): AbsoluteMobileUpgradeRequiredResult => {\n\tif (typeof value.pageId !== 'string' || !isUpgradeReason(value.reason)) {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'invalid-envelope',\n\t\t\t'The update response is missing its page or reason.'\n\t\t);\n\t}\n\n\treturn {\n\t\tkind: 'upgrade-required',\n\t\tpageId: value.pageId,\n\t\treason: value.reason,\n\t\tsupportedContracts: Array.isArray(value.supportedContracts)\n\t\t\t? value.supportedContracts.filter(\n\t\t\t\t\t(contract): contract is string =>\n\t\t\t\t\t\ttypeof contract === 'string'\n\t\t\t\t)\n\t\t\t: undefined,\n\t\tsupportedRuntimes: Array.isArray(value.supportedRuntimes)\n\t\t\t? value.supportedRuntimes.filter(\n\t\t\t\t\t(runtime): runtime is string => typeof runtime === 'string'\n\t\t\t\t)\n\t\t\t: undefined\n\t};\n};\n\nexport const activateAbsoluteMobilePage = async (\n\tvalue: unknown,\n\toptions: AbsoluteMobilePageActivationOptions\n) => {\n\tconst envelope = parseAbsoluteMobilePageEnvelope(value);\n\tif (envelope.response.kind === 'upgrade-required') {\n\t\treturn envelope.response;\n\t}\n\tif (envelope.response.kind !== 'page') {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'invalid-envelope',\n\t\t\t'Expected a renderable mobile page response.'\n\t\t);\n\t}\n\n\tconst target = options.target ?? window;\n\ttarget.__INITIAL_PROPS__ = envelope.response.props;\n\ttarget.__ABSOLUTE_PAGE_RENDER_MODE__ = 'client';\n\tawait options.loadPage({\n\t\tcontract: envelope.response.contract,\n\t\tpageId: envelope.response.pageId\n\t});\n\n\treturn {\n\t\tcontract: envelope.response.contract,\n\t\tkind: 'rendered',\n\t\tpageId: envelope.response.pageId\n\t} satisfies AbsoluteMobilePageActivation;\n};\n\nexport const parseAbsoluteMobilePageEnvelope = (value: unknown) => {\n\tif (!isRecord(value) || !isRecord(value.response)) {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'invalid-envelope',\n\t\t\t'The server did not return an AbsoluteJS mobile page envelope.'\n\t\t);\n\t}\n\tif (value.protocol !== ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION) {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'invalid-envelope',\n\t\t\t`Unsupported mobile page protocol ${String(value.protocol)}.`\n\t\t);\n\t}\n\n\tconst { kind } = value.response;\n\tif (kind === 'page') {\n\t\treturn {\n\t\t\tprotocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,\n\t\t\tresponse: parsePageResult(value.response)\n\t\t} satisfies AbsoluteMobilePageEnvelope;\n\t}\n\tif (kind === 'upgrade-required') {\n\t\treturn {\n\t\t\tprotocol: ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,\n\t\t\tresponse: parseUpgradeResult(value.response)\n\t\t} satisfies AbsoluteMobilePageEnvelope;\n\t}\n\tif (kind === 'invalid-request') {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'server-rejected-request',\n\t\t\ttypeof value.response.message === 'string'\n\t\t\t\t? value.response.message\n\t\t\t\t: 'The server rejected the mobile page request.'\n\t\t);\n\t}\n\tif (kind === 'error') {\n\t\tthrow new AbsoluteMobilePageProtocolError(\n\t\t\t'server-error',\n\t\t\t'The server could not create a compatible mobile page representation.'\n\t\t);\n\t}\n\n\tthrow new AbsoluteMobilePageProtocolError(\n\t\t'invalid-envelope',\n\t\t`Unknown mobile page response kind ${String(kind)}.`\n\t);\n};\n"
8
+ ],
9
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAM,uCAAuC,OAAO,IAC1D,4CACD;AAEA,IAAM,aAAa,IAAI,IAAY;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAED,IAAM,sBAAsB,CAC3B,UAEA,OAAO,UAAU,YACjB,UAAU,SACV,gBAAgB,UAChB,OAAO,MAAM,eAAe,aAC5B,cAAc,UACd,OAAO,MAAM,aAAa,aAC1B,eAAe,UACf,OAAO,MAAM,cAAc,YAC3B,WAAW,IAAI,MAAM,SAAS,MAC9B,YAAY,UACZ,OAAO,MAAM,WAAW,aACxB,qBAAqB,UACrB,OAAO,MAAM,oBAAoB;AAE3B,IAAM,0CAA0C,MAAM;AAAA,EAC5D,MAAM,QAAiB,QAAQ,IAC9B,YACA,oCACD;AAAA,EACA,IACC,OAAO,UAAU,YACjB,UAAU,QACV,EAAE,cAAc,UAChB,OAAO,MAAM,aAAa,YACzB;AAAA,IACD;AAAA,EAC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