@pinerohit11/testwidget 0.1.10 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. package/.next/cache/webpack/client-development/0.pack.gz +0 -0
  2. package/.next/cache/webpack/client-development/1.pack.gz +0 -0
  3. package/.next/cache/webpack/client-development/10.pack.gz +0 -0
  4. package/.next/cache/webpack/client-development/2.pack.gz +0 -0
  5. package/.next/cache/webpack/client-development/3.pack.gz +0 -0
  6. package/.next/cache/webpack/client-development/4.pack.gz +0 -0
  7. package/.next/cache/webpack/client-development/5.pack.gz +0 -0
  8. package/.next/cache/webpack/client-development/6.pack.gz +0 -0
  9. package/.next/cache/webpack/client-development/index.pack.gz +0 -0
  10. package/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  11. package/.next/cache/webpack/server-development/0.pack.gz +0 -0
  12. package/.next/cache/webpack/server-development/1.pack.gz +0 -0
  13. package/.next/cache/webpack/server-development/10.pack.gz +0 -0
  14. package/.next/cache/webpack/server-development/11.pack.gz +0 -0
  15. package/.next/cache/webpack/server-development/12.pack.gz +0 -0
  16. package/.next/cache/webpack/server-development/13.pack.gz +0 -0
  17. package/.next/cache/webpack/server-development/2.pack.gz +0 -0
  18. package/.next/cache/webpack/server-development/3.pack.gz +0 -0
  19. package/.next/cache/webpack/server-development/4.pack.gz +0 -0
  20. package/.next/cache/webpack/server-development/6.pack.gz +0 -0
  21. package/.next/cache/webpack/server-development/7.pack.gz +0 -0
  22. package/.next/cache/webpack/server-development/9.pack.gz +0 -0
  23. package/.next/cache/webpack/server-development/index.pack.gz +0 -0
  24. package/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
  25. package/.next/server/app/page.js +1 -1
  26. package/.next/server/vendor-chunks/next.js +5 -5
  27. package/.next/server/webpack-runtime.js +1 -1
  28. package/.next/static/chunks/app/layout.js +3 -3
  29. package/.next/static/chunks/app/page.js +45 -1
  30. package/.next/static/chunks/app-pages-internals.js +1 -1
  31. package/.next/static/chunks/main-app.js +5 -5
  32. package/.next/static/chunks/webpack.js +1 -1
  33. package/.next/static/webpack/app/{layout.2d35c83f0037d0e3.hot-update.js → layout.2f388e6b66349419.hot-update.js} +2 -2
  34. package/.next/static/webpack/app/{layout.eabe83a6bd680d72.hot-update.js → layout.5ff03b504f4dc152.hot-update.js} +2 -2
  35. package/.next/static/webpack/app/{layout.e5533e94660e066c.hot-update.js → layout.b62381d4132a6544.hot-update.js} +2 -2
  36. package/.next/static/webpack/app/layout.e1d7a6f7992b7b70.hot-update.js +31 -0
  37. package/.next/static/webpack/app/{page.4a9375b8e793c38e.hot-update.js → page.2e7b4aa2b22e65d9.hot-update.js} +1 -1
  38. package/.next/static/webpack/app/page.548fbaf72ba2981b.hot-update.js +62 -0
  39. package/.next/static/webpack/app/{page.81f6646c28a82804.hot-update.js → page.bb7fb7004da6fd3f.hot-update.js} +1 -1
  40. package/.next/static/webpack/{webpack.1f1fe21203e4c68b.hot-update.js → webpack.2e7b4aa2b22e65d9.hot-update.js} +1 -1
  41. package/.next/static/webpack/{webpack.213fdb98a15e3455.hot-update.js → webpack.2f388e6b66349419.hot-update.js} +1 -1
  42. package/.next/static/webpack/{webpack.0463e0d10a76f0e1.hot-update.js → webpack.548fbaf72ba2981b.hot-update.js} +1 -1
  43. package/.next/static/webpack/{webpack.14eb1ee43b84ca5f.hot-update.js → webpack.5ff03b504f4dc152.hot-update.js} +1 -1
  44. package/.next/static/webpack/webpack.b62381d4132a6544.hot-update.js +18 -0
  45. package/.next/static/webpack/webpack.bb7fb7004da6fd3f.hot-update.js +18 -0
  46. package/.next/static/webpack/webpack.e1d7a6f7992b7b70.hot-update.js +18 -0
  47. package/.next/trace +20 -116
  48. package/dist/{index.mjs → index.cjs} +91 -43
  49. package/dist/index.js +57 -77
  50. package/package.json +4 -3
  51. package/.next/static/webpack/1f1fe21203e4c68b.webpack.hot-update.json +0 -1
  52. package/.next/static/webpack/255aea9c6475b746.webpack.hot-update.json +0 -1
  53. package/.next/static/webpack/309e2d9634152b60.webpack.hot-update.json +0 -1
  54. package/.next/static/webpack/329e12e211658503.webpack.hot-update.json +0 -1
  55. package/.next/static/webpack/4a9375b8e793c38e.webpack.hot-update.json +0 -1
  56. package/.next/static/webpack/500c5340fb4c6cd5.webpack.hot-update.json +0 -1
  57. package/.next/static/webpack/5031cfaa2d3d892d.webpack.hot-update.json +0 -1
  58. package/.next/static/webpack/51f0e2a03e8d18a6.webpack.hot-update.json +0 -1
  59. package/.next/static/webpack/5ad56258b0e90bef.webpack.hot-update.json +0 -1
  60. package/.next/static/webpack/5c7e83ae2adb882e.webpack.hot-update.json +0 -1
  61. package/.next/static/webpack/5c8dada5acec56f7.webpack.hot-update.json +0 -1
  62. package/.next/static/webpack/5e709b5694e5ad26.webpack.hot-update.json +0 -1
  63. package/.next/static/webpack/6246449706d4b449.webpack.hot-update.json +0 -1
  64. package/.next/static/webpack/6498563004a57942.webpack.hot-update.json +0 -1
  65. package/.next/static/webpack/65c43818d6f690fe.webpack.hot-update.json +0 -1
  66. package/.next/static/webpack/681ce36f0645d689.webpack.hot-update.json +0 -1
  67. package/.next/static/webpack/6f00711e3d258954.webpack.hot-update.json +0 -1
  68. package/.next/static/webpack/81f6646c28a82804.webpack.hot-update.json +0 -1
  69. package/.next/static/webpack/8522f92ca02de0c8.webpack.hot-update.json +0 -1
  70. package/.next/static/webpack/893ddc36c19de1ea.webpack.hot-update.json +0 -1
  71. package/.next/static/webpack/896c5501cdf537b3.webpack.hot-update.json +0 -1
  72. package/.next/static/webpack/8cc442b31ec27e60.webpack.hot-update.json +0 -1
  73. package/.next/static/webpack/8ed684f639abe58b.webpack.hot-update.json +0 -1
  74. package/.next/static/webpack/97615cc2d368fba4.webpack.hot-update.json +0 -1
  75. package/.next/static/webpack/9775f51aeb80d3b2.webpack.hot-update.json +0 -1
  76. package/.next/static/webpack/9bbf208246a2eebb.webpack.hot-update.json +0 -1
  77. package/.next/static/webpack/a74f1afad4b7a8a2.webpack.hot-update.json +0 -1
  78. package/.next/static/webpack/aed2ae614f6605ed.webpack.hot-update.json +0 -1
  79. package/.next/static/webpack/app/layout.228b69a2a9a20202.hot-update.js +0 -22
  80. package/.next/static/webpack/app/layout.456a8cdc4e32bb1b.hot-update.js +0 -22
  81. package/.next/static/webpack/app/layout.8894e91a6b3fd5cb.hot-update.js +0 -22
  82. package/.next/static/webpack/app/layout.a74f1afad4b7a8a2.hot-update.js +0 -98
  83. package/.next/static/webpack/app/layout.bb4485d5c54b0ed1.hot-update.js +0 -22
  84. package/.next/static/webpack/app/layout.f3f79b681eb03ce7.hot-update.js +0 -22
  85. package/.next/static/webpack/app/page.0463e0d10a76f0e1.hot-update.js +0 -22
  86. package/.next/static/webpack/app/page.14eb1ee43b84ca5f.hot-update.js +0 -22
  87. package/.next/static/webpack/app/page.1f1fe21203e4c68b.hot-update.js +0 -21
  88. package/.next/static/webpack/app/page.213fdb98a15e3455.hot-update.js +0 -22
  89. package/.next/static/webpack/app/page.255aea9c6475b746.hot-update.js +0 -22
  90. package/.next/static/webpack/app/page.309e2d9634152b60.hot-update.js +0 -22
  91. package/.next/static/webpack/app/page.329e12e211658503.hot-update.js +0 -22
  92. package/.next/static/webpack/app/page.500c5340fb4c6cd5.hot-update.js +0 -22
  93. package/.next/static/webpack/app/page.5031cfaa2d3d892d.hot-update.js +0 -22
  94. package/.next/static/webpack/app/page.51f0e2a03e8d18a6.hot-update.js +0 -22
  95. package/.next/static/webpack/app/page.5ad56258b0e90bef.hot-update.js +0 -22
  96. package/.next/static/webpack/app/page.5c7e83ae2adb882e.hot-update.js +0 -22
  97. package/.next/static/webpack/app/page.5c8dada5acec56f7.hot-update.js +0 -22
  98. package/.next/static/webpack/app/page.5e709b5694e5ad26.hot-update.js +0 -22
  99. package/.next/static/webpack/app/page.6246449706d4b449.hot-update.js +0 -22
  100. package/.next/static/webpack/app/page.6498563004a57942.hot-update.js +0 -22
  101. package/.next/static/webpack/app/page.65c43818d6f690fe.hot-update.js +0 -22
  102. package/.next/static/webpack/app/page.681ce36f0645d689.hot-update.js +0 -22
  103. package/.next/static/webpack/app/page.6f00711e3d258954.hot-update.js +0 -22
  104. package/.next/static/webpack/app/page.8522f92ca02de0c8.hot-update.js +0 -54
  105. package/.next/static/webpack/app/page.893ddc36c19de1ea.hot-update.js +0 -22
  106. package/.next/static/webpack/app/page.896c5501cdf537b3.hot-update.js +0 -22
  107. package/.next/static/webpack/app/page.8cc442b31ec27e60.hot-update.js +0 -22
  108. package/.next/static/webpack/app/page.8ed684f639abe58b.hot-update.js +0 -603
  109. package/.next/static/webpack/app/page.97615cc2d368fba4.hot-update.js +0 -22
  110. package/.next/static/webpack/app/page.9775f51aeb80d3b2.hot-update.js +0 -22
  111. package/.next/static/webpack/app/page.9bbf208246a2eebb.hot-update.js +0 -22
  112. package/.next/static/webpack/app/page.aed2ae614f6605ed.hot-update.js +0 -22
  113. package/.next/static/webpack/app/page.b4b25d4db23dbc5a.hot-update.js +0 -22
  114. package/.next/static/webpack/app/page.b728482f9b82d921.hot-update.js +0 -571
  115. package/.next/static/webpack/app/page.b7a42026022db1f3.hot-update.js +0 -22
  116. package/.next/static/webpack/app/page.b90118a4d57e76ad.hot-update.js +0 -54
  117. package/.next/static/webpack/app/page.c0a3bb4128bc91cb.hot-update.js +0 -22
  118. package/.next/static/webpack/app/page.c5880161e6d8c38b.hot-update.js +0 -22
  119. package/.next/static/webpack/app/page.c91faac87e6e5e7d.hot-update.js +0 -21
  120. package/.next/static/webpack/app/page.cb281b61855d3afc.hot-update.js +0 -22
  121. package/.next/static/webpack/app/page.cc723ec7106788b2.hot-update.js +0 -22
  122. package/.next/static/webpack/app/page.d00ead7a6d6dd27a.hot-update.js +0 -22
  123. package/.next/static/webpack/app/page.d5492b6ce3aff19a.hot-update.js +0 -22
  124. package/.next/static/webpack/app/page.e1a0b7850e69b555.hot-update.js +0 -22
  125. package/.next/static/webpack/app/page.e6094793daace46f.hot-update.js +0 -22
  126. package/.next/static/webpack/app/page.ef9190246958611b.hot-update.js +0 -22
  127. package/.next/static/webpack/b4b25d4db23dbc5a.webpack.hot-update.json +0 -1
  128. package/.next/static/webpack/b728482f9b82d921.webpack.hot-update.json +0 -1
  129. package/.next/static/webpack/b7a42026022db1f3.webpack.hot-update.json +0 -1
  130. package/.next/static/webpack/b90118a4d57e76ad.webpack.hot-update.json +0 -1
  131. package/.next/static/webpack/bb4485d5c54b0ed1.webpack.hot-update.json +0 -1
  132. package/.next/static/webpack/c0a3bb4128bc91cb.webpack.hot-update.json +0 -1
  133. package/.next/static/webpack/c5880161e6d8c38b.webpack.hot-update.json +0 -1
  134. package/.next/static/webpack/c91faac87e6e5e7d.webpack.hot-update.json +0 -1
  135. package/.next/static/webpack/cb281b61855d3afc.webpack.hot-update.json +0 -1
  136. package/.next/static/webpack/cc723ec7106788b2.webpack.hot-update.json +0 -1
  137. package/.next/static/webpack/d00ead7a6d6dd27a.webpack.hot-update.json +0 -1
  138. package/.next/static/webpack/d5492b6ce3aff19a.webpack.hot-update.json +0 -1
  139. package/.next/static/webpack/e1a0b7850e69b555.webpack.hot-update.json +0 -1
  140. package/.next/static/webpack/e5533e94660e066c.webpack.hot-update.json +0 -1
  141. package/.next/static/webpack/e6094793daace46f.webpack.hot-update.json +0 -1
  142. package/.next/static/webpack/eabe83a6bd680d72.webpack.hot-update.json +0 -1
  143. package/.next/static/webpack/ef9190246958611b.webpack.hot-update.json +0 -1
  144. package/.next/static/webpack/f3f79b681eb03ce7.webpack.hot-update.json +0 -1
  145. package/.next/static/webpack/webpack.228b69a2a9a20202.hot-update.js +0 -18
  146. package/.next/static/webpack/webpack.255aea9c6475b746.hot-update.js +0 -18
  147. package/.next/static/webpack/webpack.2d35c83f0037d0e3.hot-update.js +0 -18
  148. package/.next/static/webpack/webpack.309e2d9634152b60.hot-update.js +0 -18
  149. package/.next/static/webpack/webpack.329e12e211658503.hot-update.js +0 -18
  150. package/.next/static/webpack/webpack.456a8cdc4e32bb1b.hot-update.js +0 -18
  151. package/.next/static/webpack/webpack.4a9375b8e793c38e.hot-update.js +0 -18
  152. package/.next/static/webpack/webpack.500c5340fb4c6cd5.hot-update.js +0 -18
  153. package/.next/static/webpack/webpack.5031cfaa2d3d892d.hot-update.js +0 -18
  154. package/.next/static/webpack/webpack.51f0e2a03e8d18a6.hot-update.js +0 -18
  155. package/.next/static/webpack/webpack.5ad56258b0e90bef.hot-update.js +0 -18
  156. package/.next/static/webpack/webpack.5c7e83ae2adb882e.hot-update.js +0 -18
  157. package/.next/static/webpack/webpack.5c8dada5acec56f7.hot-update.js +0 -18
  158. package/.next/static/webpack/webpack.5e709b5694e5ad26.hot-update.js +0 -18
  159. package/.next/static/webpack/webpack.6246449706d4b449.hot-update.js +0 -18
  160. package/.next/static/webpack/webpack.6498563004a57942.hot-update.js +0 -18
  161. package/.next/static/webpack/webpack.65c43818d6f690fe.hot-update.js +0 -18
  162. package/.next/static/webpack/webpack.681ce36f0645d689.hot-update.js +0 -18
  163. package/.next/static/webpack/webpack.6f00711e3d258954.hot-update.js +0 -18
  164. package/.next/static/webpack/webpack.81f6646c28a82804.hot-update.js +0 -18
  165. package/.next/static/webpack/webpack.8522f92ca02de0c8.hot-update.js +0 -30
  166. package/.next/static/webpack/webpack.8894e91a6b3fd5cb.hot-update.js +0 -18
  167. package/.next/static/webpack/webpack.893ddc36c19de1ea.hot-update.js +0 -18
  168. package/.next/static/webpack/webpack.896c5501cdf537b3.hot-update.js +0 -18
  169. package/.next/static/webpack/webpack.8cc442b31ec27e60.hot-update.js +0 -18
  170. package/.next/static/webpack/webpack.8ed684f639abe58b.hot-update.js +0 -18
  171. package/.next/static/webpack/webpack.97615cc2d368fba4.hot-update.js +0 -18
  172. package/.next/static/webpack/webpack.9775f51aeb80d3b2.hot-update.js +0 -18
  173. package/.next/static/webpack/webpack.9bbf208246a2eebb.hot-update.js +0 -18
  174. package/.next/static/webpack/webpack.a74f1afad4b7a8a2.hot-update.js +0 -18
  175. package/.next/static/webpack/webpack.aed2ae614f6605ed.hot-update.js +0 -18
  176. package/.next/static/webpack/webpack.b4b25d4db23dbc5a.hot-update.js +0 -18
  177. package/.next/static/webpack/webpack.b728482f9b82d921.hot-update.js +0 -18
  178. package/.next/static/webpack/webpack.b7a42026022db1f3.hot-update.js +0 -18
  179. package/.next/static/webpack/webpack.b90118a4d57e76ad.hot-update.js +0 -30
  180. package/.next/static/webpack/webpack.bb4485d5c54b0ed1.hot-update.js +0 -18
  181. package/.next/static/webpack/webpack.c0a3bb4128bc91cb.hot-update.js +0 -18
  182. package/.next/static/webpack/webpack.c5880161e6d8c38b.hot-update.js +0 -18
  183. package/.next/static/webpack/webpack.c91faac87e6e5e7d.hot-update.js +0 -18
  184. package/.next/static/webpack/webpack.cb281b61855d3afc.hot-update.js +0 -18
  185. package/.next/static/webpack/webpack.cc723ec7106788b2.hot-update.js +0 -18
  186. package/.next/static/webpack/webpack.d00ead7a6d6dd27a.hot-update.js +0 -18
  187. package/.next/static/webpack/webpack.d5492b6ce3aff19a.hot-update.js +0 -18
  188. package/.next/static/webpack/webpack.e1a0b7850e69b555.hot-update.js +0 -18
  189. package/.next/static/webpack/webpack.e5533e94660e066c.hot-update.js +0 -18
  190. package/.next/static/webpack/webpack.e6094793daace46f.hot-update.js +0 -18
  191. package/.next/static/webpack/webpack.eabe83a6bd680d72.hot-update.js +0 -18
  192. package/.next/static/webpack/webpack.ef9190246958611b.hot-update.js +0 -18
  193. package/.next/static/webpack/webpack.f3f79b681eb03ce7.hot-update.js +0 -18
  194. package/.vscode/settings.json +0 -22
  195. /package/.next/static/webpack/{0463e0d10a76f0e1.webpack.hot-update.json → 2e7b4aa2b22e65d9.webpack.hot-update.json} +0 -0
  196. /package/.next/static/webpack/{228b69a2a9a20202.webpack.hot-update.json → 2f388e6b66349419.webpack.hot-update.json} +0 -0
  197. /package/.next/static/webpack/{14eb1ee43b84ca5f.webpack.hot-update.json → 548fbaf72ba2981b.webpack.hot-update.json} +0 -0
  198. /package/.next/static/webpack/{2d35c83f0037d0e3.webpack.hot-update.json → 5ff03b504f4dc152.webpack.hot-update.json} +0 -0
  199. /package/.next/static/webpack/{456a8cdc4e32bb1b.webpack.hot-update.json → b62381d4132a6544.webpack.hot-update.json} +0 -0
  200. /package/.next/static/webpack/{213fdb98a15e3455.webpack.hot-update.json → bb7fb7004da6fd3f.webpack.hot-update.json} +0 -0
  201. /package/.next/static/webpack/{8894e91a6b3fd5cb.webpack.hot-update.json → e1d7a6f7992b7b70.webpack.hot-update.json} +0 -0
  202. /package/dist/{index.d.mts → index.d.cts} +0 -0
@@ -146,7 +146,7 @@ eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs *
146
146
  /***/ ((module, exports, __webpack_require__) => {
147
147
 
148
148
  "use strict";
149
- eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return OuterLayoutRouter;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-pages-browser)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-pages-browser)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _jsxruntime = __webpack_require__(/*! react/jsx-runtime */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/jsx-runtime.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _reactdom = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react-dom */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/index.js\"));\nconst _approutercontextsharedruntime = __webpack_require__(/*! ../../shared/lib/app-router-context.shared-runtime */ \"(app-pages-browser)/./node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js\");\nconst _fetchserverresponse = __webpack_require__(/*! ./router-reducer/fetch-server-response */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\");\nconst _unresolvedthenable = __webpack_require__(/*! ./unresolved-thenable */ \"(app-pages-browser)/./node_modules/next/dist/client/components/unresolved-thenable.js\");\nconst _errorboundary = __webpack_require__(/*! ./error-boundary */ \"(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js\");\nconst _matchsegments = __webpack_require__(/*! ./match-segments */ \"(app-pages-browser)/./node_modules/next/dist/client/components/match-segments.js\");\nconst _handlesmoothscroll = __webpack_require__(/*! ../../shared/lib/router/utils/handle-smooth-scroll */ \"(app-pages-browser)/./node_modules/next/dist/shared/lib/router/utils/handle-smooth-scroll.js\");\nconst _redirectboundary = __webpack_require__(/*! ./redirect-boundary */ \"(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js\");\nconst _notfoundboundary = __webpack_require__(/*! ./not-found-boundary */ \"(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js\");\nconst _getsegmentvalue = __webpack_require__(/*! ./router-reducer/reducers/get-segment-value */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js\");\nconst _createroutercachekey = __webpack_require__(/*! ./router-reducer/create-router-cache-key */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nconst _hasinterceptionrouteincurrenttree = __webpack_require__(/*! ./router-reducer/reducers/has-interception-route-in-current-tree */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js\");\n/**\n * Add refetch marker to router state at the point of the current layout segment.\n * This ensures the response returned is not further down than the current layout segment.\n */ function walkAddRefetch(segmentPathToWalk, treeToRecreate) {\n if (segmentPathToWalk) {\n const [segment, parallelRouteKey] = segmentPathToWalk;\n const isLast = segmentPathToWalk.length === 2;\n if ((0, _matchsegments.matchSegment)(treeToRecreate[0], segment)) {\n if (treeToRecreate[1].hasOwnProperty(parallelRouteKey)) {\n if (isLast) {\n const subTree = walkAddRefetch(undefined, treeToRecreate[1][parallelRouteKey]);\n return [\n treeToRecreate[0],\n {\n ...treeToRecreate[1],\n [parallelRouteKey]: [\n subTree[0],\n subTree[1],\n subTree[2],\n 'refetch'\n ]\n }\n ];\n }\n return [\n treeToRecreate[0],\n {\n ...treeToRecreate[1],\n [parallelRouteKey]: walkAddRefetch(segmentPathToWalk.slice(2), treeToRecreate[1][parallelRouteKey])\n }\n ];\n }\n }\n }\n return treeToRecreate;\n}\nconst __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = _reactdom.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available\n/**\n * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning\n */ function findDOMNode(instance) {\n // Tree-shake for server bundle\n if (typeof window === 'undefined') return null;\n // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.\n // We need to lazily reference it.\n const internal_reactDOMfindDOMNode = __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode;\n return internal_reactDOMfindDOMNode(instance);\n}\nconst rectProperties = [\n 'bottom',\n 'height',\n 'left',\n 'right',\n 'top',\n 'width',\n 'x',\n 'y'\n];\n/**\n * Check if a HTMLElement is hidden or fixed/sticky position\n */ function shouldSkipElement(element) {\n // we ignore fixed or sticky positioned elements since they'll likely pass the \"in-viewport\" check\n // and will result in a situation we bail on scroll because of something like a fixed nav,\n // even though the actual page content is offscreen\n if ([\n 'sticky',\n 'fixed'\n ].includes(getComputedStyle(element).position)) {\n if (true) {\n console.warn('Skipping auto-scroll behavior due to `position: sticky` or `position: fixed` on element:', element);\n }\n return true;\n }\n // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`\n // because `offsetParent` doesn't consider document/body\n const rect = element.getBoundingClientRect();\n return rectProperties.every((item)=>rect[item] === 0);\n}\n/**\n * Check if the top corner of the HTMLElement is in the viewport.\n */ function topOfElementInViewport(element, viewportHeight) {\n const rect = element.getBoundingClientRect();\n return rect.top >= 0 && rect.top <= viewportHeight;\n}\n/**\n * Find the DOM node for a hash fragment.\n * If `top` the page has to scroll to the top of the page. This mirrors the browser's behavior.\n * If the hash fragment is an id, the page has to scroll to the element with that id.\n * If the hash fragment is a name, the page has to scroll to the first element with that name.\n */ function getHashFragmentDomNode(hashFragment) {\n // If the hash fragment is `top` the page has to scroll to the top of the page.\n if (hashFragment === 'top') {\n return document.body;\n }\n var _document_getElementById;\n // If the hash fragment is an id, the page has to scroll to the element with that id.\n return (_document_getElementById = document.getElementById(hashFragment)) != null ? _document_getElementById : document.getElementsByName(hashFragment)[0];\n}\nclass InnerScrollAndFocusHandler extends _react.default.Component {\n componentDidMount() {\n this.handlePotentialScroll();\n }\n componentDidUpdate() {\n // Because this property is overwritten in handlePotentialScroll it's fine to always run it when true as it'll be set to false for subsequent renders.\n if (this.props.focusAndScrollRef.apply) {\n this.handlePotentialScroll();\n }\n }\n render() {\n return this.props.children;\n }\n constructor(...args){\n super(...args);\n this.handlePotentialScroll = ()=>{\n // Handle scroll and focus, it's only applied once in the first useEffect that triggers that changed.\n const { focusAndScrollRef, segmentPath } = this.props;\n if (focusAndScrollRef.apply) {\n // segmentPaths is an array of segment paths that should be scrolled to\n // if the current segment path is not in the array, the scroll is not applied\n // unless the array is empty, in which case the scroll is always applied\n if (focusAndScrollRef.segmentPaths.length !== 0 && !focusAndScrollRef.segmentPaths.some((scrollRefSegmentPath)=>segmentPath.every((segment, index)=>(0, _matchsegments.matchSegment)(segment, scrollRefSegmentPath[index])))) {\n return;\n }\n let domNode = null;\n const hashFragment = focusAndScrollRef.hashFragment;\n if (hashFragment) {\n domNode = getHashFragmentDomNode(hashFragment);\n }\n // `findDOMNode` is tricky because it returns just the first child if the component is a fragment.\n // This already caused a bug where the first child was a <link/> in head.\n if (!domNode) {\n domNode = findDOMNode(this);\n }\n // If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree.\n if (!(domNode instanceof Element)) {\n return;\n }\n // Verify if the element is a HTMLElement and if we want to consider it for scroll behavior.\n // If the element is skipped, try to select the next sibling and try again.\n while(!(domNode instanceof HTMLElement) || shouldSkipElement(domNode)){\n // No siblings found that match the criteria are found, so handle scroll higher up in the tree instead.\n if (domNode.nextElementSibling === null) {\n return;\n }\n domNode = domNode.nextElementSibling;\n }\n // State is mutated to ensure that the focus and scroll is applied only once.\n focusAndScrollRef.apply = false;\n focusAndScrollRef.hashFragment = null;\n focusAndScrollRef.segmentPaths = [];\n (0, _handlesmoothscroll.handleSmoothScroll)(()=>{\n // In case of hash scroll, we only need to scroll the element into view\n if (hashFragment) {\n domNode.scrollIntoView();\n return;\n }\n // Store the current viewport height because reading `clientHeight` causes a reflow,\n // and it won't change during this function.\n const htmlElement = document.documentElement;\n const viewportHeight = htmlElement.clientHeight;\n // If the element's top edge is already in the viewport, exit early.\n if (topOfElementInViewport(domNode, viewportHeight)) {\n return;\n }\n // Otherwise, try scrolling go the top of the document to be backward compatible with pages\n // scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen)\n // We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left\n // scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically\n htmlElement.scrollTop = 0;\n // Scroll to domNode if domNode is not in viewport when scrolled to top of document\n if (!topOfElementInViewport(domNode, viewportHeight)) {\n domNode.scrollIntoView();\n }\n }, {\n // We will force layout by querying domNode position\n dontForceLayout: true,\n onlyHashChange: focusAndScrollRef.onlyHashChange\n });\n // Mutate after scrolling so that it can be read by `handleSmoothScroll`\n focusAndScrollRef.onlyHashChange = false;\n // Set focus on the element\n domNode.focus();\n }\n };\n }\n}\nfunction ScrollAndFocusHandler(param) {\n let { segmentPath, children } = param;\n const context = (0, _react.useContext)(_approutercontextsharedruntime.GlobalLayoutRouterContext);\n if (!context) {\n throw new Error('invariant global layout router not mounted');\n }\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(InnerScrollAndFocusHandler, {\n segmentPath: segmentPath,\n focusAndScrollRef: context.focusAndScrollRef,\n children: children\n });\n}\n_c = ScrollAndFocusHandler;\n/**\n * InnerLayoutRouter handles rendering the provided segment based on the cache.\n */ function InnerLayoutRouter(param) {\n let { parallelRouterKey, url, childNodes, segmentPath, tree, // isActive,\n cacheKey } = param;\n const context = (0, _react.useContext)(_approutercontextsharedruntime.GlobalLayoutRouterContext);\n if (!context) {\n throw new Error('invariant global layout router not mounted');\n }\n const { buildId, changeByServerResponse, tree: fullTree } = context;\n // Read segment path from the parallel router cache node.\n let childNode = childNodes.get(cacheKey);\n // When data is not available during rendering client-side we need to fetch\n // it from the server.\n if (childNode === undefined) {\n const newLazyCacheNode = {\n lazyData: null,\n rsc: null,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n parallelRoutes: new Map(),\n loading: null\n };\n /**\n * Flight data fetch kicked off during render and put into the cache.\n */ childNode = newLazyCacheNode;\n childNodes.set(cacheKey, newLazyCacheNode);\n }\n // `rsc` represents the renderable node for this segment.\n // If this segment has a `prefetchRsc`, it's the statically prefetched data.\n // We should use that on initial render instead of `rsc`. Then we'll switch\n // to `rsc` when the dynamic response streams in.\n //\n // If no prefetch data is available, then we go straight to rendering `rsc`.\n const resolvedPrefetchRsc = childNode.prefetchRsc !== null ? childNode.prefetchRsc : childNode.rsc;\n // We use `useDeferredValue` to handle switching between the prefetched and\n // final values. The second argument is returned on initial render, then it\n // re-renders with the first argument.\n //\n // @ts-expect-error The second argument to `useDeferredValue` is only\n // available in the experimental builds. When its disabled, it will always\n // return `rsc`.\n const rsc = (0, _react.useDeferredValue)(childNode.rsc, resolvedPrefetchRsc);\n // `rsc` is either a React node or a promise for a React node, except we\n // special case `null` to represent that this segment's data is missing. If\n // it's a promise, we need to unwrap it so we can determine whether or not the\n // data is missing.\n const resolvedRsc = typeof rsc === 'object' && rsc !== null && typeof rsc.then === 'function' ? (0, _react.use)(rsc) : rsc;\n if (!resolvedRsc) {\n // The data for this segment is not available, and there's no pending\n // navigation that will be able to fulfill it. We need to fetch more from\n // the server and patch the cache.\n // Check if there's already a pending request.\n let lazyData = childNode.lazyData;\n if (lazyData === null) {\n /**\n * Router state with refetch marker added\n */ // TODO-APP: remove ''\n const refetchTree = walkAddRefetch([\n '',\n ...segmentPath\n ], fullTree);\n const includeNextUrl = (0, _hasinterceptionrouteincurrenttree.hasInterceptionRouteInCurrentTree)(fullTree);\n childNode.lazyData = lazyData = (0, _fetchserverresponse.fetchServerResponse)(new URL(url, location.origin), {\n flightRouterState: refetchTree,\n nextUrl: includeNextUrl ? context.nextUrl : null,\n buildId\n }).then((serverResponse)=>{\n (0, _react.startTransition)(()=>{\n changeByServerResponse({\n previousTree: fullTree,\n serverResponse\n });\n });\n return serverResponse;\n });\n }\n // Suspend infinitely as `changeByServerResponse` will cause a different part of the tree to be rendered.\n // A falsey `resolvedRsc` indicates missing data -- we should not commit that branch, and we need to wait for the data to arrive.\n (0, _react.use)(_unresolvedthenable.unresolvedThenable);\n }\n // If we get to this point, then we know we have something we can render.\n const subtree = /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.LayoutRouterContext.Provider, {\n value: {\n tree: tree[1][parallelRouterKey],\n childNodes: childNode.parallelRoutes,\n // TODO-APP: overriding of url for parallel routes\n url: url,\n loading: childNode.loading\n },\n children: resolvedRsc\n });\n // Ensure root layout is not wrapped in a div as the root layout renders `<html>`\n return subtree;\n}\n_c1 = InnerLayoutRouter;\n/**\n * Renders suspense boundary with the provided \"loading\" property as the fallback.\n * If no loading property is provided it renders the children without a suspense boundary.\n */ function LoadingBoundary(param) {\n let { children, hasLoading, loading, loadingStyles, loadingScripts } = param;\n // We have an explicit prop for checking if `loading` is provided, to disambiguate between a loading\n // component that returns `null` / `undefined`, vs not having a loading component at all.\n if (hasLoading) {\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {\n fallback: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {\n children: [\n loadingStyles,\n loadingScripts,\n loading\n ]\n }),\n children: children\n });\n }\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {\n children: children\n });\n}\n_c2 = LoadingBoundary;\nfunction OuterLayoutRouter(param) {\n let { parallelRouterKey, segmentPath, error, errorStyles, errorScripts, templateStyles, templateScripts, template, notFound, notFoundStyles } = param;\n const context = (0, _react.useContext)(_approutercontextsharedruntime.LayoutRouterContext);\n if (!context) {\n throw new Error('invariant expected layout router to be mounted');\n }\n const { childNodes, tree, url, loading } = context;\n // Get the current parallelRouter cache node\n let childNodesForParallelRouter = childNodes.get(parallelRouterKey);\n // If the parallel router cache node does not exist yet, create it.\n // This writes to the cache when there is no item in the cache yet. It never *overwrites* existing cache items which is why it's safe in concurrent mode.\n if (!childNodesForParallelRouter) {\n childNodesForParallelRouter = new Map();\n childNodes.set(parallelRouterKey, childNodesForParallelRouter);\n }\n // Get the active segment in the tree\n // The reason arrays are used in the data format is that these are transferred from the server to the browser so it's optimized to save bytes.\n const treeSegment = tree[1][parallelRouterKey][0];\n // If segment is an array it's a dynamic route and we want to read the dynamic route value as the segment to get from the cache.\n const currentChildSegmentValue = (0, _getsegmentvalue.getSegmentValue)(treeSegment);\n /**\n * Decides which segments to keep rendering, all segments that are not active will be wrapped in `<Offscreen>`.\n */ // TODO-APP: Add handling of `<Offscreen>` when it's available.\n const preservedSegments = [\n treeSegment\n ];\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {\n children: preservedSegments.map((preservedSegment)=>{\n const preservedSegmentValue = (0, _getsegmentvalue.getSegmentValue)(preservedSegment);\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(preservedSegment);\n return(/*\n - Error boundary\n - Only renders error boundary if error component is provided.\n - Rendered for each segment to ensure they have their own error state.\n - Loading boundary\n - Only renders suspense boundary if loading components is provided.\n - Rendered for each segment to ensure they have their own loading state.\n - Passed to the router during rendering to ensure it can be immediately rendered when suspending on a Flight fetch.\n */ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_approutercontextsharedruntime.TemplateContext.Provider, {\n value: /*#__PURE__*/ (0, _jsxruntime.jsx)(ScrollAndFocusHandler, {\n segmentPath: segmentPath,\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.ErrorBoundary, {\n errorComponent: error,\n errorStyles: errorStyles,\n errorScripts: errorScripts,\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(LoadingBoundary, {\n hasLoading: Boolean(loading),\n loading: loading == null ? void 0 : loading[0],\n loadingStyles: loading == null ? void 0 : loading[1],\n loadingScripts: loading == null ? void 0 : loading[2],\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_notfoundboundary.NotFoundBoundary, {\n notFound: notFound,\n notFoundStyles: notFoundStyles,\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_redirectboundary.RedirectBoundary, {\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(InnerLayoutRouter, {\n parallelRouterKey: parallelRouterKey,\n url: url,\n tree: tree,\n childNodes: childNodesForParallelRouter,\n segmentPath: segmentPath,\n cacheKey: cacheKey,\n isActive: currentChildSegmentValue === preservedSegmentValue\n })\n })\n })\n })\n })\n }),\n children: [\n templateStyles,\n templateScripts,\n template\n ]\n }, (0, _createroutercachekey.createRouterCacheKey)(preservedSegment, true)));\n })\n });\n}\n_c3 = OuterLayoutRouter;\nif ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=layout-router.js.map\nvar _c, _c1, _c2, _c3;\n$RefreshReg$(_c, \"ScrollAndFocusHandler\");\n$RefreshReg$(_c1, \"InnerLayoutRouter\");\n$RefreshReg$(_c2, \"LoadingBoundary\");\n$RefreshReg$(_c3, \"OuterLayoutRouter\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports signature on update so we can compare the boundary\n // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n module.hot.dispose(function (data) {\n data.prevSignature =\n self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports);\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevSignature !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevSignature, self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports))) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevSignature !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1wYWdlcy1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvY2xpZW50L2NvbXBvbmVudHMvbGF5b3V0LXJvdXRlci5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7ZUEwZXdCQTs7Ozs7OztnS0FwZEg7K0NBS2Q7cUNBQzZCO2dEQUNEOytDQUNMOzJDQUNEO3FKQUNNOytDQUNGOzhDQUNBOzZDQUNEOzZNQUNLOzRNQUNhO0FBRWxEOzs7O0lBUUUsSUFBSUUsS0FBQUEsY0FBbUI7UUFDckIsTUFBTSxDQUFDRSxTQUFTQyxHQUFBQTtRQUNoQixNQUFNQyxDQUFBQSxRQUFTSixDQUFBQSxpQkFBa0JLLEdBQUFBLEdBQU0sS0FBSztRQUU1QyxJQUFJQyxFQUFBQSxFQUFBQSxPQUFBQSxrQkFBQUEsRUFBWSxFQUFDTCxFQUFBQSxLQUFBQTtZQUNmLElBQUlBLGNBQWMsQ0FBQyxFQUFFLENBQUNNLFNBQUFBLEVBQUFBLEdBQWMsQ0FBQ0osVUFBQUEsQ0FBQUEsRUFBQUEsRUFBQUEsSUFBbUI7Z0JBQ3RELElBQUlDLFFBQVE7b0JBQ1YsTUFBTUksRUFBQUE7b0JBSU4sT0FBTzt3QkFDTFAsR0FBQUE7d0JBQ0E7OzRCQUVFLENBQUNFLEVBQUFBLGNBQUFBLENBQWlCLEVBQUU7Z0NBQ2xCSyxPQUFPLENBQUMsRUFBRTtnQ0FDVkEsT0FBTyxDQUFDLEVBQUU7Z0NBQ1ZBLE9BQU8sQ0FBQyxFQ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ZVswXSxcbiAgICAgICAgICAgICAgICBzdWJUcmVlWzFdLFxuICAgICAgICAgICAgICAgIHN1YlRyZWVbMl0sXG4gICAgICAgICAgICAgICAgJ3JlZmV0Y2gnLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gW1xuICAgICAgICAgIHRyZWVUb1JlY3JlYXRlWzBdLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIC4uLnRyZWVUb1JlY3JlYXRlWzFdLFxuICAgICAgICAgICAgW3BhcmFsbGVsUm91dGVLZXldOiB3YWxrQWRkUmVmZXRjaChcbiAgICAgICAgICAgICAgc2VnbWVudFBhdGhUb1dhbGsuc2xpY2UoMiksXG4gICAgICAgICAgICAgIHRyZWVUb1JlY3JlYXRlWzFdW3BhcmFsbGVsUm91dGVLZXldXG4gICAgICAgICAgICApLFxuICAgICAgICAgIH0sXG4gICAgICAgIF1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gdHJlZVRvUmVjcmVhdGVcbn1cblxuY29uc3QgX19ET01fSU5URVJOQUxTX0RPX05PVF9VU0VfT1JfV0FSTl9VU0VSU19USEVZX0NBTk5PVF9VUEdSQURFID0gKFxuICBSZWFjdERPTSBhcyBhbnlcbikuX19ET01fSU5URVJOQUxTX0RPX05PVF9VU0VfT1JfV0FSTl9VU0VSU19USEVZX0NBTk5PVF9VUEdSQURFXG5cbi8vIFRPRE8tQVBQOiBSZXBsYWNlIHdpdGggbmV3IFJlYWN0IEFQSSBmb3IgZmluZGluZyBkb20gbm9kZXMgd2l0aG91dCBhIGByZWZgIHdoZW4gYXZhaWxhYmxlXG4vKipcbiAqIFdyYXBzIFJlYWN0RE9NLmZpbmRET01Ob2RlIHdpdGggYWRkaXRpb25hbCBsb2dpYyB0byBoaWRlIFJlYWN0IFN0cmljdCBNb2RlIHdhcm5pbmdcbiAqL1xuZnVuY3Rpb24gZmluZERPTU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uICAgICAgICAgICAgICAgICAgZXJyb3JTY3JpcHRzPXtlcnJvclNjcmlwdHN9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPExvYWRpbmdCb3VuZGFyeVxuICAgICAgICAgICAgICAgICAgICBoYXNMb2FkaW5nPXtCb29sZWFuKGxvYWRpbmcpfVxuICAgICAgICAgICAgICAgICAgICBsb2FkaW5nPXtsb2FkaW5nPy5bMF19XG4gICAgICAgICAgICAgICAgICAgIGxvYWRpbmdTdHlsZXM9e2xvYWRpbmc/LlsxXX1cbiAgICAgICAgICAgICAgICAgICAgbG9hZGluZ1NjcmlwdHM9e2xvYWRpbmc/LlsyXX1cbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPE5vdEZvdW5kQm91bmRhcnlcbiAgICAgICAgICAgICAgICAgICAgICBub3RGb3VuZD17bm90Rm91bmR9XG4gICAgICAgICAgICAgICAgICAgICAgbm90Rm91bmRTdHlsZXM9e25vdEZvdW5kU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPFJlZGlyZWN0Qm91bmRhcnk+XG4gICAgICAgICAgICAgICAgICAgICAgICA8SW5uZXJMYXlvdXRSb3V0ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYWxsZWxSb3V0ZXJLZXk9e3BhcmFsbGVsUm91dGVyS2V5fVxuICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw9e3VybH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgdHJlZT17dHJlZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGROb2Rlcz17Y2hpbGROb2Rlc0ZvclBhcmFsbGVsUm91dGVyIX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgc2VnbWVudFBhdGg9e3NlZ21lbnRQYXRofVxuICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZUtleT17Y2FjaGVLZXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlzQWN0aXZlPXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Q2hpbGRTZWdtZW50VmFsdWUgPT09IHByZXNlcnZlZFNlZ21lbnRWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgIDwvUmVkaXJlY3RCb3VuZGFyeT5cbiAgICAgICAgICAgICAgICAgICAgPC9Ob3RGb3VuZEJvdW5kYXJ5PlxuICAgICAgICAgICAgICAgICAgPC9Mb2FkaW5nQm91bmRhcnk+XG4gICAgICAgICAgICAgICAgPC9FcnJvckJvdW5kYXJ5PlxuICAgICAgICAgICAgICA8L1Njcm9sbEFuZEZvY3VzSGFuZGxlcj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7dGVtcGxhdGVTdHlsZXN9XG4gICAgICAgICAgICB7dGVtcGxhdGVTY3JpcHRzfVxuICAgICAgICAgICAge3RlbXBsYXRlfVxuICAgICAgICAgIDwvVGVtcGxhdGVDb250ZXh0LlByb3ZpZGVyPlxuICAgICAgICApXG4gICAgICB9KX1cbiAgICA8Lz5cbiAgKVxufVxuIl0sIm5hbWVzIjpbIk91dGVyTGF5b3V0Um91dGVyIiwid2Fsa0FkZFJlZmV0Y2giLCJzZWdtZW50UGF0aFRvV2FsayIsInRyZWVUb1JlY3JlYXRlIiwic2VnbWVudCIsInBhcmFsbGVsUm91dGVLZXkiLCJpc0xhc3QiLCJsZW5ndGgiLCJtYXRjaFNlZ21lbnQiLCJoYXNPd25Qcm9wZXJ0eSIsInN1YlRyZWUiLCJ1bmRlZmluZWQiLCJzbGljZSIsIl9fRE9NX0lOVEVSTkFMU19ET19OT1RfVVNFX09SX1dBUk5fVVNFUlNfVEhFWV9DQU5OT1RfVVBHUkFERSIsIlJlYWN0RE9NIiwiZmluZERPTU5vZGUiLCJpbnN0YW5jZSIsIndpb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ZSIsIm5vdEZvdW5kIiwibm90Rm91bmRTdHlsZXMiLCJjaGlsZE5vZGVzRm9yUGFyYWxsZWxSb3V0ZXIiLCJ0cmVlU2VnbWVudCIsImN1cnJlbnRDaGlsZFNlZ21lbnRWYWx1ZSIsImdldFNlZ21lbnRWYWx1ZSIsInByZXNlcnZlZFNlZ21lbnRzIiwibWFwIiwicHJlc2VydmVkU2VnbWVudCIsInByZXNlcnZlZFNlZ21lbnRWYWx1ZSIsImNyZWF0ZVJvdXRlckNhY2hlS2V5IiwiVGVtcGxhdGVDb250ZXh0IiwiRXJyb3JCb3VuZGFyeSIsImVycm9yQ29tcG9uZW50IiwiQm9vbGVhbiIsIk5vdEZvdW5kQm91bmRhcnkiLCJSZWRpcmVjdEJvdW5kYXJ5IiwiaXNBY3RpdmUiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js\n"));
149
+ eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"default\", ({\n enumerable: true,\n get: function() {\n return OuterLayoutRouter;\n }\n}));\nconst _interop_require_default = __webpack_require__(/*! @swc/helpers/_/_interop_require_default */ \"(app-pages-browser)/./node_modules/@swc/helpers/esm/_interop_require_default.js\");\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(app-pages-browser)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _jsxruntime = __webpack_require__(/*! react/jsx-runtime */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/jsx-runtime.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/index.js\"));\nconst _reactdom = /*#__PURE__*/ _interop_require_default._(__webpack_require__(/*! react-dom */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react-dom/index.js\"));\nconst _approutercontextsharedruntime = __webpack_require__(/*! ../../shared/lib/app-router-context.shared-runtime */ \"(app-pages-browser)/./node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js\");\nconst _fetchserverresponse = __webpack_require__(/*! ./router-reducer/fetch-server-response */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/fetch-server-response.js\");\nconst _unresolvedthenable = __webpack_require__(/*! ./unresolved-thenable */ \"(app-pages-browser)/./node_modules/next/dist/client/components/unresolved-thenable.js\");\nconst _errorboundary = __webpack_require__(/*! ./error-boundary */ \"(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js\");\nconst _matchsegments = __webpack_require__(/*! ./match-segments */ \"(app-pages-browser)/./node_modules/next/dist/client/components/match-segments.js\");\nconst _handlesmoothscroll = __webpack_require__(/*! ../../shared/lib/router/utils/handle-smooth-scroll */ \"(app-pages-browser)/./node_modules/next/dist/shared/lib/router/utils/handle-smooth-scroll.js\");\nconst _redirectboundary = __webpack_require__(/*! ./redirect-boundary */ \"(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js\");\nconst _notfoundboundary = __webpack_require__(/*! ./not-found-boundary */ \"(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js\");\nconst _getsegmentvalue = __webpack_require__(/*! ./router-reducer/reducers/get-segment-value */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js\");\nconst _createroutercachekey = __webpack_require__(/*! ./router-reducer/create-router-cache-key */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js\");\nconst _hasinterceptionrouteincurrenttree = __webpack_require__(/*! ./router-reducer/reducers/has-interception-route-in-current-tree */ \"(app-pages-browser)/./node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js\");\n/**\n * Add refetch marker to router state at the point of the current layout segment.\n * This ensures the response returned is not further down than the current layout segment.\n */ function walkAddRefetch(segmentPathToWalk, treeToRecreate) {\n if (segmentPathToWalk) {\n const [segment, parallelRouteKey] = segmentPathToWalk;\n const isLast = segmentPathToWalk.length === 2;\n if ((0, _matchsegments.matchSegment)(treeToRecreate[0], segment)) {\n if (treeToRecreate[1].hasOwnProperty(parallelRouteKey)) {\n if (isLast) {\n const subTree = walkAddRefetch(undefined, treeToRecreate[1][parallelRouteKey]);\n return [\n treeToRecreate[0],\n {\n ...treeToRecreate[1],\n [parallelRouteKey]: [\n subTree[0],\n subTree[1],\n subTree[2],\n 'refetch'\n ]\n }\n ];\n }\n return [\n treeToRecreate[0],\n {\n ...treeToRecreate[1],\n [parallelRouteKey]: walkAddRefetch(segmentPathToWalk.slice(2), treeToRecreate[1][parallelRouteKey])\n }\n ];\n }\n }\n }\n return treeToRecreate;\n}\nconst __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = _reactdom.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available\n/**\n * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning\n */ function findDOMNode(instance) {\n // Tree-shake for server bundle\n if (typeof window === 'undefined') return null;\n // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.\n // We need to lazily reference it.\n const internal_reactDOMfindDOMNode = __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode;\n return internal_reactDOMfindDOMNode(instance);\n}\nconst rectProperties = [\n 'bottom',\n 'height',\n 'left',\n 'right',\n 'top',\n 'width',\n 'x',\n 'y'\n];\n/**\n * Check if a HTMLElement is hidden or fixed/sticky position\n */ function shouldSkipElement(element) {\n // we ignore fixed or sticky positioned elements since they'll likely pass the \"in-viewport\" check\n // and will result in a situation we bail on scroll because of something like a fixed nav,\n // even though the actual page content is offscreen\n if ([\n 'sticky',\n 'fixed'\n ].includes(getComputedStyle(element).position)) {\n if (true) {\n console.warn('Skipping auto-scroll behavior due to `position: sticky` or `position: fixed` on element:', element);\n }\n return true;\n }\n // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`\n // because `offsetParent` doesn't consider document/body\n const rect = element.getBoundingClientRect();\n return rectProperties.every((item)=>rect[item] === 0);\n}\n/**\n * Check if the top corner of the HTMLElement is in the viewport.\n */ function topOfElementInViewport(element, viewportHeight) {\n const rect = element.getBoundingClientRect();\n return rect.top >= 0 && rect.top <= viewportHeight;\n}\n/**\n * Find the DOM node for a hash fragment.\n * If `top` the page has to scroll to the top of the page. This mirrors the browser's behavior.\n * If the hash fragment is an id, the page has to scroll to the element with that id.\n * If the hash fragment is a name, the page has to scroll to the first element with that name.\n */ function getHashFragmentDomNode(hashFragment) {\n // If the hash fragment is `top` the page has to scroll to the top of the page.\n if (hashFragment === 'top') {\n return document.body;\n }\n var _document_getElementById;\n // If the hash fragment is an id, the page has to scroll to the element with that id.\n return (_document_getElementById = document.getElementById(hashFragment)) != null ? _document_getElementById : document.getElementsByName(hashFragment)[0];\n}\nclass InnerScrollAndFocusHandler extends _react.default.Component {\n componentDidMount() {\n this.handlePotentialScroll();\n }\n componentDidUpdate() {\n // Because this property is overwritten in handlePotentialScroll it's fine to always run it when true as it'll be set to false for subsequent renders.\n if (this.props.focusAndScrollRef.apply) {\n this.handlePotentialScroll();\n }\n }\n render() {\n return this.props.children;\n }\n constructor(...args){\n super(...args);\n this.handlePotentialScroll = ()=>{\n // Handle scroll and focus, it's only applied once in the first useEffect that triggers that changed.\n const { focusAndScrollRef, segmentPath } = this.props;\n if (focusAndScrollRef.apply) {\n // segmentPaths is an array of segment paths that should be scrolled to\n // if the current segment path is not in the array, the scroll is not applied\n // unless the array is empty, in which case the scroll is always applied\n if (focusAndScrollRef.segmentPaths.length !== 0 && !focusAndScrollRef.segmentPaths.some((scrollRefSegmentPath)=>segmentPath.every((segment, index)=>(0, _matchsegments.matchSegment)(segment, scrollRefSegmentPath[index])))) {\n return;\n }\n let domNode = null;\n const hashFragment = focusAndScrollRef.hashFragment;\n if (hashFragment) {\n domNode = getHashFragmentDomNode(hashFragment);\n }\n // `findDOMNode` is tricky because it returns just the first child if the component is a fragment.\n // This already caused a bug where the first child was a <link/> in head.\n if (!domNode) {\n domNode = findDOMNode(this);\n }\n // If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree.\n if (!(domNode instanceof Element)) {\n return;\n }\n // Verify if the element is a HTMLElement and if we want to consider it for scroll behavior.\n // If the element is skipped, try to select the next sibling and try again.\n while(!(domNode instanceof HTMLElement) || shouldSkipElement(domNode)){\n // No siblings found that match the criteria are found, so handle scroll higher up in the tree instead.\n if (domNode.nextElementSibling === null) {\n return;\n }\n domNode = domNode.nextElementSibling;\n }\n // State is mutated to ensure that the focus and scroll is applied only once.\n focusAndScrollRef.apply = false;\n focusAndScrollRef.hashFragment = null;\n focusAndScrollRef.segmentPaths = [];\n (0, _handlesmoothscroll.handleSmoothScroll)(()=>{\n // In case of hash scroll, we only need to scroll the element into view\n if (hashFragment) {\n domNode.scrollIntoView();\n return;\n }\n // Store the current viewport height because reading `clientHeight` causes a reflow,\n // and it won't change during this function.\n const htmlElement = document.documentElement;\n const viewportHeight = htmlElement.clientHeight;\n // If the element's top edge is already in the viewport, exit early.\n if (topOfElementInViewport(domNode, viewportHeight)) {\n return;\n }\n // Otherwise, try scrolling go the top of the document to be backward compatible with pages\n // scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen)\n // We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left\n // scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically\n htmlElement.scrollTop = 0;\n // Scroll to domNode if domNode is not in viewport when scrolled to top of document\n if (!topOfElementInViewport(domNode, viewportHeight)) {\n domNode.scrollIntoView();\n }\n }, {\n // We will force layout by querying domNode position\n dontForceLayout: true,\n onlyHashChange: focusAndScrollRef.onlyHashChange\n });\n // Mutate after scrolling so that it can be read by `handleSmoothScroll`\n focusAndScrollRef.onlyHashChange = false;\n // Set focus on the element\n domNode.focus();\n }\n };\n }\n}\nfunction ScrollAndFocusHandler(param) {\n let { segmentPath, children } = param;\n const context = (0, _react.useContext)(_approutercontextsharedruntime.GlobalLayoutRouterContext);\n if (!context) {\n throw new Error('invariant global layout router not mounted');\n }\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(InnerScrollAndFocusHandler, {\n segmentPath: segmentPath,\n focusAndScrollRef: context.focusAndScrollRef,\n children: children\n });\n}\n_c = ScrollAndFocusHandler;\n/**\n * InnerLayoutRouter handles rendering the provided segment based on the cache.\n */ function InnerLayoutRouter(param) {\n let { parallelRouterKey, url, childNodes, segmentPath, tree, // isActive,\n cacheKey } = param;\n const context = (0, _react.useContext)(_approutercontextsharedruntime.GlobalLayoutRouterContext);\n if (!context) {\n throw new Error('invariant global layout router not mounted');\n }\n const { buildId, changeByServerResponse, tree: fullTree } = context;\n // Read segment path from the parallel router cache node.\n let childNode = childNodes.get(cacheKey);\n // When data is not available during rendering client-side we need to fetch\n // it from the server.\n if (childNode === undefined) {\n const newLazyCacheNode = {\n lazyData: null,\n rsc: null,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n parallelRoutes: new Map(),\n loading: null\n };\n /**\n * Flight data fetch kicked off during render and put into the cache.\n */ childNode = newLazyCacheNode;\n childNodes.set(cacheKey, newLazyCacheNode);\n }\n // `rsc` represents the renderable node for this segment.\n // If this segment has a `prefetchRsc`, it's the statically prefetched data.\n // We should use that on initial render instead of `rsc`. Then we'll switch\n // to `rsc` when the dynamic response streams in.\n //\n // If no prefetch data is available, then we go straight to rendering `rsc`.\n const resolvedPrefetchRsc = childNode.prefetchRsc !== null ? childNode.prefetchRsc : childNode.rsc;\n // We use `useDeferredValue` to handle switching between the prefetched and\n // final values. The second argument is returned on initial render, then it\n // re-renders with the first argument.\n //\n // @ts-expect-error The second argument to `useDeferredValue` is only\n // available in the experimental builds. When its disabled, it will always\n // return `rsc`.\n const rsc = (0, _react.useDeferredValue)(childNode.rsc, resolvedPrefetchRsc);\n // `rsc` is either a React node or a promise for a React node, except we\n // special case `null` to represent that this segment's data is missing. If\n // it's a promise, we need to unwrap it so we can determine whether or not the\n // data is missing.\n const resolvedRsc = typeof rsc === 'object' && rsc !== null && typeof rsc.then === 'function' ? (0, _react.use)(rsc) : rsc;\n if (!resolvedRsc) {\n // The data for this segment is not available, and there's no pending\n // navigation that will be able to fulfill it. We need to fetch more from\n // the server and patch the cache.\n // Check if there's already a pending request.\n let lazyData = childNode.lazyData;\n if (lazyData === null) {\n /**\n * Router state with refetch marker added\n */ // TODO-APP: remove ''\n const refetchTree = walkAddRefetch([\n '',\n ...segmentPath\n ], fullTree);\n const includeNextUrl = (0, _hasinterceptionrouteincurrenttree.hasInterceptionRouteInCurrentTree)(fullTree);\n childNode.lazyData = lazyData = (0, _fetchserverresponse.fetchServerResponse)(new URL(url, location.origin), {\n flightRouterState: refetchTree,\n nextUrl: includeNextUrl ? context.nextUrl : null,\n buildId\n }).then((serverResponse)=>{\n (0, _react.startTransition)(()=>{\n changeByServerResponse({\n previousTree: fullTree,\n serverResponse\n });\n });\n return serverResponse;\n });\n }\n // Suspend infinitely as `changeByServerResponse` will cause a different part of the tree to be rendered.\n // A falsey `resolvedRsc` indicates missing data -- we should not commit that branch, and we need to wait for the data to arrive.\n (0, _react.use)(_unresolvedthenable.unresolvedThenable);\n }\n // If we get to this point, then we know we have something we can render.\n const subtree = /*#__PURE__*/ (0, _jsxruntime.jsx)(_approutercontextsharedruntime.LayoutRouterContext.Provider, {\n value: {\n tree: tree[1][parallelRouterKey],\n childNodes: childNode.parallelRoutes,\n // TODO-APP: overriding of url for parallel routes\n url: url,\n loading: childNode.loading\n },\n children: resolvedRsc\n });\n // Ensure root layout is not wrapped in a div as the root layout renders `<html>`\n return subtree;\n}\n_c1 = InnerLayoutRouter;\n/**\n * Renders suspense boundary with the provided \"loading\" property as the fallback.\n * If no loading property is provided it renders the children without a suspense boundary.\n */ function LoadingBoundary(param) {\n let { children, hasLoading, loading, loadingStyles, loadingScripts } = param;\n // We have an explicit prop for checking if `loading` is provided, to disambiguate between a loading\n // component that returns `null` / `undefined`, vs not having a loading component at all.\n if (hasLoading) {\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.Suspense, {\n fallback: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {\n children: [\n loadingStyles,\n loadingScripts,\n loading\n ]\n }),\n children: children\n });\n }\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {\n children: children\n });\n}\n_c2 = LoadingBoundary;\nfunction OuterLayoutRouter(param) {\n let { parallelRouterKey, segmentPath, error, errorStyles, errorScripts, templateStyles, templateScripts, template, notFound, notFoundStyles } = param;\n const context = (0, _react.useContext)(_approutercontextsharedruntime.LayoutRouterContext);\n if (!context) {\n throw new Error('invariant expected layout router to be mounted');\n }\n const { childNodes, tree, url, loading } = context;\n // Get the current parallelRouter cache node\n let childNodesForParallelRouter = childNodes.get(parallelRouterKey);\n // If the parallel router cache node does not exist yet, create it.\n // This writes to the cache when there is no item in the cache yet. It never *overwrites* existing cache items which is why it's safe in concurrent mode.\n if (!childNodesForParallelRouter) {\n childNodesForParallelRouter = new Map();\n childNodes.set(parallelRouterKey, childNodesForParallelRouter);\n }\n // Get the active segment in the tree\n // The reason arrays are used in the data format is that these are transferred from the server to the browser so it's optimized to save bytes.\n const treeSegment = tree[1][parallelRouterKey][0];\n // If segment is an array it's a dynamic route and we want to read the dynamic route value as the segment to get from the cache.\n const currentChildSegmentValue = (0, _getsegmentvalue.getSegmentValue)(treeSegment);\n /**\n * Decides which segments to keep rendering, all segments that are not active will be wrapped in `<Offscreen>`.\n */ // TODO-APP: Add handling of `<Offscreen>` when it's available.\n const preservedSegments = [\n treeSegment\n ];\n return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {\n children: preservedSegments.map((preservedSegment)=>{\n const preservedSegmentValue = (0, _getsegmentvalue.getSegmentValue)(preservedSegment);\n const cacheKey = (0, _createroutercachekey.createRouterCacheKey)(preservedSegment);\n return(/*\n - Error boundary\n - Only renders error boundary if error component is provided.\n - Rendered for each segment to ensure they have their own error state.\n - Loading boundary\n - Only renders suspense boundary if loading components is provided.\n - Rendered for each segment to ensure they have their own loading state.\n - Passed to the router during rendering to ensure it can be immediately rendered when suspending on a Flight fetch.\n */ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_approutercontextsharedruntime.TemplateContext.Provider, {\n value: /*#__PURE__*/ (0, _jsxruntime.jsx)(ScrollAndFocusHandler, {\n segmentPath: segmentPath,\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorboundary.ErrorBoundary, {\n errorComponent: error,\n errorStyles: errorStyles,\n errorScripts: errorScripts,\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(LoadingBoundary, {\n hasLoading: Boolean(loading),\n loading: loading == null ? void 0 : loading[0],\n loadingStyles: loading == null ? void 0 : loading[1],\n loadingScripts: loading == null ? void 0 : loading[2],\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_notfoundboundary.NotFoundBoundary, {\n notFound: notFound,\n notFoundStyles: notFoundStyles,\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_redirectboundary.RedirectBoundary, {\n children: /*#__PURE__*/ (0, _jsxruntime.jsx)(InnerLayoutRouter, {\n parallelRouterKey: parallelRouterKey,\n url: url,\n tree: tree,\n childNodes: childNodesForParallelRouter,\n segmentPath: segmentPath,\n cacheKey: cacheKey,\n isActive: currentChildSegmentValue === preservedSegmentValue\n })\n })\n })\n })\n })\n }),\n children: [\n templateStyles,\n templateScripts,\n template\n ]\n }, (0, _createroutercachekey.createRouterCacheKey)(preservedSegment, true)));\n })\n });\n}\n_c3 = OuterLayoutRouter;\nif ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=layout-router.js.map\nvar _c, _c1, _c2, _c3;\n$RefreshReg$(_c, \"ScrollAndFocusHandler\");\n$RefreshReg$(_c1, \"InnerLayoutRouter\");\n$RefreshReg$(_c2, \"LoadingBoundary\");\n$RefreshReg$(_c3, \"OuterLayoutRouter\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports signature on update so we can compare the boundary\n // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n module.hot.dispose(function (data) {\n data.prevSignature =\n self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports);\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevSignature !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevSignature, self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports))) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevSignature !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1wYWdlcy1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvY2xpZW50L2NvbXBvbmVudHMvbGF5b3V0LXJvdXRlci5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7ZUEwZXdCQTs7Ozs7OztnS0FwZEg7K0NBS2Q7cUNBQzZCO2dEQUNEOytDQUNMOzJDQUNEO3FKQUNNOytDQUNGOzhDQUNBOzZDQUNEOzZNQUNLOzRNQUNhO0FBRWxEOzs7O0lBUUUsSUFBSUUsS0FBQUEsY0FBbUI7UUFDckIsTUFBTSxDQUFDRSxTQUFTQyxHQUFBQTtRQUNoQixNQUFNQyxDQUFBQSxRQUFTSixDQUFBQSxpQkFBa0JLLEdBQUFBLEdBQU0sS0FBSztRQUU1QyxJQUFJQyxFQUFBQSxFQUFBQSxPQUFBQSxrQkFBQUEsRUFBWSxFQUFDTCxFQUFBQSxLQUFBQTtZQUNmLElBQUlBLGNBQWMsQ0FBQyxFQUFFLENBQUNNLFNBQUFBLEVBQUFBLEdBQWMsQ0FBQ0osVUFBQUEsQ0FBQUEsRUFBQUEsRUFBQUEsSUFBbUI7Z0JBQ3RELElBQUlDLFFBQVE7b0JBQ1YsTUFBTUksRUFBQUE7b0JBSU4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tcbiAgICAgICAgICAgIHRyZWVUb1JlY3JlYXRlWzBdLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAuLi50cmVlVG9SZWNyZWF0ZVsxXSxcbiAgICAgICAgICAgICAgW3BhcmFsbGVsUm91dGVLZXldOiBbXG4gICAgICAgICAgICAgICAgc3ViVHJlZVswXSxcbiAgICAgICAgICAgICAgICBzdWJUcmVlWzFdLFxuICAgICAgICAgICAgICAgIHN1YlRyZWVbMl0sXG4gICAgICAgICAgICAgICAgJ3JlZmV0Y2gnLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gW1xuICAgICAgICAgIHRyZWVUb1JlY3JlYXRlWzBdLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIC4uLnRyZWVUb1JlY3JlYXRlWzFdLFxuICAgICAgICAgICAgW3BhcmFsbGVsUm91dGVLZXldOiB3YWxrQWRkUmVmZXRjaChcbiAgICAgICAgICAgICAgc2VnbWVudFBhdGhUb1dhbGsuc2xpY2UoMiksXG4gICAgICAgICAgICAgIHRyZWVUb1JlY3JlYXRlWzFdW3BhcmFsbGVsUm91dGVLZXldXG4gICAgICAgICAgICApLFxuICAgICAgICAgIH0sXG4gICAgICAgIF1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gdHJlZVRvUmVjcmVhdGVcbn1cblxuY29uc3QgX19ET01fSU5URVJOQUxTX0RPX05PVF9VU0VfT1JfV0FSTl9VU0VSU19USEVZX0NBTk5PVF9VUEdSQURFID0gKFxuICBSZWFjdERPTSBhcyBhbnlcbikuX19ET01fSU5URVJOQUxTX0RPX05PVF9VU0VfT1JfV0FSTl9VU0VSU19USEVZX0NBTk5PVF9VUEdSQURFXG5cbi8vIFRPRE8tQVBQOiBSZXBsYWNlIHdpdGggbmV3IFJlYWN0IEFQSSBmb3IgZmluZGluZyBkb20gbm9kZXMgd2l0aG91dCBhIGBy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WVudFBhdGg9e3NlZ21lbnRQYXRofT5cbiAgICAgICAgICAgICAgICA8RXJyb3JCb3VuZGFyeVxuICAgICAgICAgICAgICAgICAgZXJyb3JDb21wb25lbnQ9e2Vycm9yfVxuICAgICAgICAgICAgICAgICAgZXJyb3JTdHlsZXM9e2Vycm9yU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgZXJyb3JTY3JpcHRzPXtlcnJvclNjcmlwdHN9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgPExvYWRpbmdCb3VuZGFyeVxuICAgICAgICAgICAgICAgICAgICBoYXNMb2FkaW5nPXtCb29sZWFuKGxvYWRpbmcpfVxuICAgICAgICAgICAgICAgICAgICBsb2FkaW5nPXtsb2FkaW5nPy5bMF19XG4gICAgICAgICAgICAgICAgICAgIGxvYWRpbmdTdHlsZXM9e2xvYWRpbmc/LlsxXX1cbiAgICAgICAgICAgICAgICAgICAgbG9hZGluZ1NjcmlwdHM9e2xvYWRpbmc/LlsyXX1cbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPE5vdEZvdW5kQm91bmRhcnlcbiAgICAgICAgICAgICAgICAgICAgICBub3RGb3VuZD17bm90Rm91bmR9XG4gICAgICAgICAgICAgICAgICAgICAgbm90Rm91bmRTdHlsZXM9e25vdEZvdW5kU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgPFJlZGlyZWN0Qm91bmRhcnk+XG4gICAgICAgICAgICAgICAgICAgICAgICA8SW5uZXJMYXlvdXRSb3V0ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYWxsZWxSb3V0ZXJLZXk9e3BhcmFsbGVsUm91dGVyS2V5fVxuICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw9e3VybH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgdHJlZT17dHJlZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGROb2Rlcz17Y2hpbGROb2Rlc0ZvclBhcmFsbGVsUm91dGVyIX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgc2VnbWVudFBhdGg9e3NlZ21lbnRQYXRofVxuICAgICAgICAgICAgICAgICAgICAgICAgICBjYWNoZUtleT17Y2FjaGVLZXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlzQWN0aXZlPXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Q2hpbGRTZWdtZW50VmFsdWUgPT09IHByZXNlcnZlZFNlZ21lbnRWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgIDwvUmVkaXJlY3RCb3VuZGFyeT5cbiAgICAgICAgICAgICAgICAgICAgPC9Ob3RGb3VuZEJvdW5kYXJ5PlxuICAgICAgICAgICAgICAgICAgPC9Mb2FkaW5nQm91bmRhcnk+XG4gICAgICAgICAgICAgICAgPC9FcnJvckJvdW5kYXJ5PlxuICAgICAgICAgICAgICA8L1Njcm9sbEFuZEZvY3VzSGFuZGxlcj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7dGVtcGxhdGVTdHlsZXN9XG4gICAgICAgICAgICB7dGVtcGxhdGVTY3JpcHRzfVxuICAgICAgICAgICAge3RlbXBsYXRlfVxuICAgICAgICAgIDwvVGVtcGxhdGVDb250ZXh0LlByb3ZpZGVyPlxuICAgICAgICApXG4gICAgICB9KX1cbiAgICA8Lz5cbiAgKVxufVxuIl0sIm5hbWVzIjpbIk91dGVyTGF5b3V0Um91dGVyIiwid2Fsa0FkZFJlZmV0Y2giLCJzZWdtZW50UGF0aFRvV2FsayIsInRyZWVUb1JlY3JlYXRlIiwic2VnbWVudCIsInBhcmFsbGVsUm91dGVLZXkiLCJpc0xhc3QiLCJsZW5ndGgiLCJtYXRjaFNlZ21lbnQiLCJoYXNPd25Qcm9wZXJ0eS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TdHlsZXMiLCJsb2FkaW5nU2NyaXB0cyIsIlN1c3BlbnNlIiwiZmFsbGJhY2siLCJlcnJvciIsImVycm9yU3R5bGVzIiwiZXJyb3JTY3JpcHRzIiwidGVtcGxhdGVTdHlsZXMiLCJ0ZW1wbGF0ZVNjcmlwdHMiLCJ0ZW1wbGF0ZSIsIm5vdEZvdW5kIiwibm90Rm91bmRTdHlsZXMiLCJjaGlsZE5vZGVzRm9yUGFyYWxsZWxSb3V0ZXIiLCJ0cmVlU2VnbWVudCIsImN1cnJlbnRDaGlsZFNlZ21lbnRWYWx1ZSIsImdldFNlZ21lbnRWYWx1ZSIsInByZXNlcnZlZFNlZ21lbnRzIiwibWFwIiwicHJlc2VydmVkU2VnbWVudCIsInByZXNlcnZlZFNlZ21lbnRWYWx1ZSIsImNyZWF0ZVJvdXRlckNhY2hlS2V5IiwiVGVtcGxhdGVDb250ZXh0IiwiRXJyb3JCb3VuZGFyeSIsImVycm9yQ29tcG9uZW50IiwiQm9vbGVhbiIsIk5vdEZvdW5kQm91bmRhcnkiLCJSZWRpcmVjdEJvdW5kYXJ5IiwiaXNBY3RpdmUiXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/layout-router.js\n"));
150
150
 
151
151
  /***/ }),
152
152